[MEncoder-users] Extracting video parts using mencoder

Epithemeus epithemeus.afterthought at googlemail.com
Wed Apr 8 14:23:09 CEST 2009


Yes, certainly seems like seeking within MPG files is imprecise! Trial and error is an option but to do this for several videos may prove to be time-consuming. Unfortunately, I wasn't able to find much about using EDL and -hr-edl-seek. Anyone with the experience of having used this? 

Alternatively, is there an easy alternative to splitting/extracting parts of videos? Please note that I can use time or size of the split files as bounding conditions to extract the video parts.



> -----Original Message-----
> From: mencoder-users-bounces at mplayerhq.hu [mailto:mencoder-users-
> bounces at mplayerhq.hu] On Behalf Of Michiel Sikma
> Sent: Wednesday, April 08, 2009 1:10 PM
> To: MEncoder usage discussions
> Subject: Re: [MEncoder-users] Extracting video parts using mencoder
> 
> On Wed, Apr 8, 2009 at 12:42 PM, The Wanderer
> <inverseparadox at comcast.net> wrote:
> > Epithemeus wrote:
> >
> >> Hi All,
> >>
> >> I am trying to extract specific parts of a video (MPG format) using
> >> MEncoder.
> >>
> >> 1.       Upon using:
> >>
> >> mencoder inputFile.mpg -ss 0.0 -endpos 600.0 -ovc copy -oac copy -o
> >> outputPart1.mpg
> >>
> >> This allows me to extract the first 600 seconds of the video.
> >>
> >> 2.       To extract the next 600 seconds, I use the following:
> >>
> >> mencoder inputFile.mpg -ss 600.0 -endpos 600.0 -ovc copy -oac copy -
> o
> >> outputPart2.mpg
> >>
> >> For some reason, this only yields the last 200 seconds (approx.) of
> >> the video.
> >>
> >> Am I missing something here? Any ideas would be very helpful!
> >
> > Seeking in MPEG files is very imprecise. If you try '-ss 600' on that
> > input file with MPlayer, you'll probably see that it doesn't actually
> > start anywhere near the 600-second mark; it probably starts about 200
> > seconds from the end of the file.
> >
> > The only solution for this that I remember offhand is trial-and-error
> > testing to find the correct "magic" value for -ss for that particular
> > file and that particular target seek point.
> >
> > You might also have luck with an EDL and -hr-edl-seek, but I haven't
> > used that myself so I can't say much about it.
> >
> > --
> >      The Wanderer
> >
> > Warning: Simply because I argue an issue does not mean I agree with
> any
> > side of it.
> >
> > Secrecy is the beginning of tyranny.
> > _______________________________________________
> > MEncoder-users mailing list
> > MEncoder-users at mplayerhq.hu
> > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> >
> 
> Just curious, is it also possible to segment a file by length only?
> I'm currently working on a personal project which uploads videos to
> YouTube, but a movie can't be longer than about 10 minutes. I want to
> be able to encode things with a special flag so that this limit is
> (roughly) obeyed. If it's not possible, I'll guess I need to use ss
> and endpos?
> 
> Michiel
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users



More information about the MEncoder-users mailing list