VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. HI everyone,

    I have a Video, and i want to add FADE OUT & FADE IN filter at the starting and Ending without re-encoding video in FFMPEG...

    Is this possible guys ?

    "I already tried Split video into three parts and add FADE to black filter through Avidmux, and then join all parts...
    But every time i facing problem with different encoding parameters and it take a lot of time."


    Quote Quote  
  2. You can cut 5 seconds start and end pieces and recode them with same resolution and codec as the original movie, applying the fades.
    Then join the 3 parts frame accurate with Videoredo.
    Quote Quote  
  3. Originally Posted by ProWo View Post
    You can cut 5 seconds start and end pieces and recode them with same resolution and codec as the original movie, applying the fades.
    Then join the 3 parts frame accurate with Videoredo.
    i tried it... but problem is difference parameters after re-coding fadded parts. Is VideoReDo have option for Fade to black filter ?
    Quote Quote  
  4. What different parameter?
    Same fps, same resolution (width x height) , same codec.
    Encode only the videostream, then remux audio.
    Do this with both start and end cuttings.
    Then join.
    Quote Quote  
  5. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    FFMpeg works for me on a regular basis doing this.

    1. Cut the 5 seconds from front and end as ProWo suggested.. Bear in mind cutting is usually on a keyframe basis so if you 5 second endpoint of the start or the Start point of your end cut is not a keyframe, a glithch will arise when you join them (Frozen frame, Play speed, etc.)

    2. Reencode the 5 seconds at first and the 5 seconds at the end with the fade in/out effects. At this point they may be different as far as format, level, profile or # ref frames but this should be not a factor if you used the same codec and kept the same size size. They can also be set diffenently if you wish through FFmpeg.

    3. concat losslessly by using the scripts:

    Code:
    ffmpeg -i input1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
    ffmpeg -i input2.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
    ffmpeg -i input3.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
    ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts" -c copy -bsf:a aac_adtstoasc output.mp4
    The format settings, level, Profile and # Ref Frames will be the same throughout as the first fadein video. This shouldn't be a problem but can be altered when you encode as a fade in video if you wish.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!