[FFmpeg-user] how can I set limit_filesize or recording_time for the specific output dynamically?

Huang Soho soho123.2012 at gmail.com
Mon Oct 14 18:32:25 CEST 2013


2013/10/14 Carl Eugen Hoyos <cehoyos at ag.or.at>

> Huang Soho <soho123.2012 <at> gmail.com> writes:
>
> > how can I set limit_filesize or recording_time for the specific output?
> > Is it possible to set by "dynamically"?
> > for example:
> > if the command line is :
> > ffmpeg -sn -f video4linux2 -r 30 -s 1280x720 -input_format h264 -i
> > /dev/video1 -vcodec copy http://localhost:8090/feed2.ffm -vcodec copy
> > /var/tmp/usb/sda1/test1.ts
>
> (Complete, uncut console output missing.)
>
> There is the segment muxer, see 4.15 in
> http://ffmpeg.org/ffmpeg-formats.html
>
> I do not know about how to show the output from the example command line.
But the "segment" seems does not meet my requirement.
I would like to save multiple files that each file hase fixed size.
for example:
ffmpeg -sn -f video4linux2 -r 30 -s 1280x720 -input_format h264 -i
/dev/video1 -vcodec copy http://localhost:8090/feed2.ffm -vcodec copy
/var/tmp/usb/sda1/test1.ts
the command can capture live video data from /dev/video1 and send to
feed2.ffm for ffserver , then ffserver can output to remote side for
preview,
and can write video data to test1.ts, continuely.
the command can not set the file size while the file "test1.ts" is get
bigger.
I would like to :let ffserver output the live stream to remote side for
preview and save the live video stream to local SD card (multiple files)by
fixed size.

if the segment you mentioned can get the purpose that I want,
Could you kindly help to modify the command I write above for show me the
example?

every input is very appreciated!!!!
thanks a lot!


More information about the ffmpeg-user mailing list