[FFmpeg-user] adding black silence (for commercial break)
john at jjdev.com
Sat Jan 12 00:43:09 CET 2013
I have a video file that I need to insert breaks that are silent and black.
They are there so the video can be the same length as the tv show
are these the correct steps?
cut video into pieces, make black, silent clips, concat all togeter?
I've tried the following and my blank video is not correct and the
concat stuff doesn't work (the ending file is small)
ffmpeg -ss 00:00:00 -t 00:00:05 -i original_video.mp4 -acodec copy -vcodec copy 1.mp4
ffmpeg -ss 00:00:05 -i original_video.mp4 -acodec copy -vcodec copy 3.mp4
then I tried to make a black vid like this:
sox -n -r 44100 -b 16 -c 2 -L silence.wav trim 0.0 5.00
(I also tried this ffmpeg -ar 48000 -t 5 -f s16le -i /dev/zero -ab 64K -f mp4 -acodec libfdk_aac -y silence.mp4)
ffmpeg -shortest -s 640x360 -t 5 -f rawvideo -pix_fmt rgb24 -i /dev/zero -i silence.wav -vcodec libx264 -acodec libfdk_aac 2.mp4
then concat like this:
ffmpeg -i concat:"1.mp4|2.mp4|3.mp4" -c copy output.mp4
More information about the ffmpeg-user