[MEncoder-users] Extracting video parts using mencoder

belcampo belcampo at zonnet.nl
Wed Apr 8 15:44:37 CEST 2009


Epithemeus wrote:
> 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.
> 
>
ffmpeg seeks accurate.
ffmpeg -ss 600.0 -t 600.0 source.mpg -acodec copy -vcodec copy -f mpeg 
result.mpg

alternative

ffmpeg -ss 600.0 -vframes 15000 source.mpg -acodec copy -vcodec copy -f 
mpeg result.mpg

As well as mplayer is able to create a edl file

start mplayer -edlout source.edl source.mpg

pause by pressing "." the dot, you can step frame by frame by pressing 
"." again. Press "i" where you want your cut to start.
Press "space" or "p" to start playing again.
Press "." near the point where you want your end-point. Step, by 
pressing "." to the exact point. Press another "i"

Now you've created source.edl which looks like

9552.735352 9612.935273 0

the difference in this case is 60sec.

This is a 'skip-list' the opposite of what you want.

So we edit the file to:

0.000000 9552.735352 0
9612.935273 9999999.000000 0

mencoder -edl source.edl -hr-edl-seek source.mpg -oac copy -ovc copy -o 
60secs.avi

Last number higher then end of file. Ctrl-C aborts but leaves the file OK.


More information about the MEncoder-users mailing list