Sample Header Ad - 728x90

trim and fade in/out video and audio with avconv (or different tool)

5 votes
2 answers
2856 views
I'm using avconv for trimming and converting videos. Let's say I want to drop the first 7 and last 2.5 seconds of the video stream and one audio stream of an one-hour mts file: avconv -i input.mts -map 0:0 -map 0:3 -ss 0:0:07 -t 0:59:50.5 out.mov This works so far, but now I want to add two seconds of fading in and out at the beginning and the end by adding: -vf fade=type=in:start_frame=350:nb_frames=100 -vf fade=type=out:start_frame=178750:nb_frames=100 Those frames are calculated with the 50 fps that avconv reports for the video source. But there is neither fading in nor out. 1) What goes wrong with the video fading and how to do it right? 2) How to add audio fading. There seems to be an -afade option. but I don't find it documented. Alternatively, you can propose a different tool for this goal (trim and fade video and audio), preferrably available as package for Debian 8.
Asked by Philippos (13680 rep)
May 18, 2017, 08:42 AM
Last activity: Apr 4, 2021, 05:12 AM