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."
![]()
+ Reply to Thread
Results 1 to 5 of 5
-
-
-
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. -
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
Similar Threads
-
Fade in/Fade out, remove beginning or ending, invert
By Shinnen in forum Newbie / General discussionsReplies: 3Last Post: 22nd Mar 2021, 18:38 -
ffmpeg downloads only part of video
By repsol1976 in forum Video ConversionReplies: 8Last Post: 26th Feb 2019, 03:05 -
How to Remove Some Middle Part From Video .mp4 File
By Daringbaaz in forum Newbie / General discussionsReplies: 2Last Post: 12th Feb 2019, 06:02 -
FFMPEG - fade in logo independent of fade in video and subtitles
By EasyFeet in forum EditingReplies: 2Last Post: 16th May 2017, 00:59 -
Replacing titles at beginning and end of movie without re encoding
By thecrock in forum Newbie / General discussionsReplies: 4Last Post: 16th Oct 2016, 09:21