[FFmpeg-user] Change output file at specific time

Fabrice RAFART frafart at free.fr
Mon Dec 9 20:54:14 CET 2013


On 06/12/2013 18:40, Andrey Utkin wrote:
> 2013/12/6  <frafart at free.fr>:
>> Hi,
>>
>> I try to generate 5 minutes long TS file's from an udp streams. I can do it with segment (the accuracy is not very high but it works and I don't have really work on all the segment options).
>> My problem is : I want that the file rotate at specific time (at 00:00:00, 00:05:00, 00:05:10, ...).
>
> You could capture the stream with simpler tool, like netcat or socat,
> killing and restarting it when needed. The loss of data during restart
> should be merely noticeable.

I already use such a tool.
One home-made, ffmpeg segment and multicat.
All this 3 tools make ts file without cut in a middle of a frame, none 
of them are very good for me (start with a keyframe AND  be accurate 
with the duration).

I'll start another threads to explain/speak about another point with 
these files.

>> Is there a way with ffmpeg to specify not a duration but, for exemple an test like timestamp % 300 = 0 ?
>
> At command line level - no. You can do anything you want in
> application using libavformat API.

Thanks to this.

Fabrice.



More information about the ffmpeg-user mailing list