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

Nicolas George nicolas.george at normalesup.org
Thu Apr 28 10:31:42 CEST 2011


Le nonidi 9 floréal, an CCXIX, Ptitboul Ptitboul a écrit :
> Could you describe precisely how strem_pos is computed?
> 
> Because when I display stream_pos after a frame-by-frame stepping, just at
> the first frame of a commercial, and I cut the file exactly at that point
> (using dd), about half a second of the commercial is still present is the
> resulting TS file.
> The stream_pos value is a multiple of the packet size (188 bytes) but there
> may be some buffering that makes it slightly later than the frame which is
> displayed.

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 sterams.
Therefore, a single offset is probably quite meaningless.

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

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

Regards,

-- 
  Nicolas George


More information about the MPlayer-users mailing list