[MEncoder-users] Extracting video parts using mencoder
Michiel Sikma
michiel at thingmajig.org
Wed Apr 8 13:09:47 CEST 2009
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
More information about the MEncoder-users
mailing list