[MPlayer-users] Using mplayer as a MPEG-TS cutter

Ptitboul Ptitboul ptitboul.ptitboul at gmail.com
Thu Apr 28 17:23:08 CEST 2011


2011/4/28 Nicolas George <nicolas.george at normalesup.org>

> I do not know how stream_pos is computed, but I know this: MPEG-TS streams
> have usually a pretty large offset between the audio and video streams.
> Therefore, a single offset is probably quite meaningless.
>

Yes, it is certainly meaningless to ask a single offset to split a MPEG-TS
file into two parts without losing anything.
I would not have been surprised is after cutting at stream_pos I had lost
the last few moments of the movie, because either audio or video were
missing. However, I am suprised to have more movie than expected.


> Maybe you could try to play your fragment with -nosound and then -novideo
> and try to find which stream_pos is more relevant.
>

With -novideo it would be difficult to find precisely the beginning of the
commercial I want to delete.
But I will test if with -nosound the stream_pos is different.


> Unfortunately, due to this offset, cutting an MPEG-TS file without remuxing
> will usually give pretty bad results.
>

In practice, it gives good results, when the goal is to delete parts of the
stream.
This is because MPEG-TS streams (being designed for a non reliable
transmission) have efficient resynchronisation mechanisms.
However, I agree that if I want to split a MPEG-TS stream in two parts,
remux those parts, and merge the remuxed parts, I will lose a few moments
around the cut position.


More information about the MPlayer-users mailing list