[MPlayer-users] How to encode the middle part of a file?

Adam Nielsen a.nielsen at optushome.com.au
Mon Oct 20 07:51:39 CEST 2003


>>>try using -sb <bytepos>, it works for me.
>>Well that stops the crash, but I lose the audio...
> does the demuxer report NO SOUND ?

yes, but I think I know why:

AVI: Missing video stream!? Contact the author, it may be a bug :(
MPEG-ES file format detected.

Because it's skipping so many bytes, it misses the AVI header and detects the 
MPEG data instead - so it thinks it's an MPEG file instead of an AVI.

> > I realised why -ss was failing though - I used "mencoder -oac copy -ovc
> > copy" to convert the MPEG transport stream into an AVI, however mplayer
> > cannot seek through that AVI file (it just quits when you try to seek) so
> > I think that's why mencoder failed too.
> try -vc ffmpeg2

Nope, still quits with "end of file" as soon as you try to seek.

> > drops frames in the first few seconds of encoding, which means I can't get
> > a frame-accurate cut
> you can -ss a little sooner and cut the encoded file with avidemux[2]

That's what I thought too, but it makes it just that little bit harder to get 
the file size accurate.  I think that's what I'll have to end up doing 
though.

Actually one other thing I might look into is the Matroska format - from a 
brief read of the specs it says it offers accurate cutting (on I suppose 
keyframe boundaries) so I could try going through Matroska to cut the 
original MPEG2 file to size and then encode that.

Thanks for all your replies,
Adam.



More information about the MPlayer-users mailing list