[FFmpeg-user] What is the best way to split a transport stream file?

Soner CAN soner2 at gmail.com
Fri Mar 25 01:30:31 CET 2016


Hi,

(You can download files here: http://dropcanvas.com/2gmsg/1 )
I have a .ts file (see attached sample.ts).

I want to split this video while I expect ALL other properties remain same
including pts time.

Here is what I try to achieve this:
ffmpeg -ss 0.000 -i sample.ts -y -c copy -t 3 splitted.ts

(Also see attached splitted.ts)

I expect the above command should only take first 3 seconds of the .ts file
and all other stuff to stay same. I've seen copyts and copytb options from
the documentation but I wan't able to use them.

However, here is the previous start time: 94678.950389 and here is the new
one: 1.402367.

Actually, I need start time to be exactly same because I will be using the
splitted segment as a continuous segment in my HLS playlist file. While the
start times are so different it causes playback problems with the player.

So how do I do this?

Thank you


More information about the ffmpeg-user mailing list