[MPlayer-users] Using ffmpeg or mencoder to edit files with a edit list

James Board jpboard2 at yahoo.com
Sun Jul 14 18:45:00 CEST 2013





________________________________
 From: littlebat <dashing.meng at gmail.com>
To: James Board <jpboard2 at yahoo.com>; "MPlayer usage questions, feature requests, bug reports" <mplayer-users at mplayerhq.hu> 
Sent: Saturday, July 13, 2013 8:33 PM
Subject: Re: [MPlayer-users] Using ffmpeg or mencoder to edit files with a edit list
 

On Sat, 13 Jul 2013 14:25:57 -0700 (PDT)
James Board <jpboard2 at yahoo.com> wrote:

> Create a text file with one line for each segment to be deleted
> from the output video.  The format is:
>     beginTime EndTime 1
> You can have as many deleetd segments as you like.  Then run
> mencoder with the above file (the command is something
> like this command):
>     mencoder in.avi -oac copy -ovc copy -edl editlist.txt -o out.avi
> However, ffmpeg is supposedly replacing mencoder, so I was
> hoping someone here knows the equivallent way of doing this in ffmpeg.
> 

Have not used -edl option ever. Maybe you can try the shell scripting,
just like below:

1, read your editlist.txt, get another "reservedlist.txt" which with
one line for each segment to be reserved. The format is:
beginTime EndTime 1
2, one line by one line read your reservedlist.txt, use the command
like below to get every reserved segment:
ffmpeg -i in.mp4 -ss [start] -t [duration] -vcodec copy -acodec copy
asegmentout.mp4
3, use ffmpeg to join these segments.

You maybe need type more lines for processing your task, but it is maybe
more flexible than your searching an option in ffmpeg which is the
equivallent way of "-edl" in mencoder.

-------------------------------------------------------------------------------------------
Thank you.

I think you miss the point of my question.  I do already know how to apply a
lists of edits, sequentially, one by one, by calling ffmpeg for every
single segment.  In fact, I stated that in my email, and you quoted it.
I'm not convinced the audio will stay in sync if I do it that way.

What I'm looking for is a way to have all of the edits in a single
file, with one sequence per line of the file.  The format would be
    SegmentStart_1    SegmentEnd_1    1
    SegmentStart_2    SegmentEnd_2   1
    ....
And then I'd like to apply them all at once to the file and output
a single file.

The tool mencoder does this, but Carl tells me that mencoder is no
longer supported.  So how can I do the above?  If not with ffmpeg,
that's okay.  What other tool can do the above?  It seems like a simple
task.


More information about the MPlayer-users mailing list