[FFmpeg-user] Generete one second of black video and relative silence audio with the same duration
barsnick at gmx.net
Sun Jan 26 00:21:32 EET 2020
On Sat, Jan 25, 2020 at 20:54:20 +0000, Gian Maria Allibrante wrote:
> How can I generate a black mp4 video with relative silent audio track with ffmpeg, I need the audio and video tracks to correspond to the duration of 1 second.
> ffmpeg -f lavfi -i color=c=black:s=1920x1080:r=24/1 -c:v h264 -f lavfi -i anullsrc=cl=stereo:r=44100 -video_track_timescale 90k -c:a mp3 -b:a 320k -ar 44100 -ac 2 -t 1 out.mp4
> VIDEO FORMAT CONTAINER DURATION: 3.026000
> VIDEO STREAM DURATION: 3.000000
> how can i match these durations?
Which tool gives you this information? If I use your command, I get one
second duration. The ffmpeg conversion command says so, as does a
check of the resulting file with ffmpeg and mediainfo.
More information about the ffmpeg-user