[FFmpeg-user] Use of the -t option with multiple output files.

William C Bonner wimbonner at gmail.com
Sat Aug 31 23:14:34 CEST 2013


I've successfully been using ffmpeg to create multiple outputs, one a
network stream and one a local file with the following command:

ffmpeg -s 1280x720 -f v4l2 -vcodec h264 -i /dev/video0 -copyinkf -vcodec
copy -f rtp rtp://192.168.0.10:8090/ -vcodec copy test.mp4

I want it to only run for a set period of time. For testing I've been
trying to use 30 seconds. What I've not been able to figure out is where is
the appropriate place to put a "-t 30" in the command line. When I was
creating a single output file, I put it right before the name of the output
and everything worked correctly. If I duplicate the -t 30 in front of each
file things work for the first 30 seconds, but then ffmpeg stops visibly
outputting, but doesn't exit. If I put it before the -i (input) ffmpeg
doesn't stop at 30 seconds.

Any suggestions are appreciated.

Wim.


More information about the ffmpeg-user mailing list