Editing a Video by Generating and Using an EDL File on Windows

Album Cover: Flight of the Conchords

"She's so hot, she's making me sexist."
Flight of the Conchords / Boom

Posted on April 15, 2009 12:45 AM in Computers
Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.

Tonight, I had an HD video file from a DVR recording of which I wanted to edit out some commercials. To accomplish this on my new beast of a Windows machine, I first downloaded MPlayer for Windows (with the SMPlayer frontend) so I could generate an EDL file. Simply put, an EDL file is used as a set of instructions on how a video file should be edited.

Once MPlayer was installed, I ignored the fact that I now had a graphical frontend for the tool, since I wanted to use the core executable to create my EDL file. After a default install, the mplayer.exe file ends up being in a subfolder named mplayer underneath the root SMPlayer installation directory, so I ran the following command from within that subdirectory to start generating my EDL file:

mplayer.exe myvideo.avi -edlout myedlfile.edl

Once the video was playing in the core mplayer window, it was up to me to let the program know when the sections to trim out should start and stop. I used the right arrow key to skip ahead when necessary, and the left arrow key to skip back. Once I saw a section where I wanted to start trimming, I hit the "I" key. When I saw the end of the section I wanted to trim, I hit the "I" key yet again. More information on how this works is available in the MPlayer documentation.

Because I only had one commercial break I wanted to trim out, my myedlfile.edl ended up containing one instruction when I was finished (notice the preciseness):

391.307770 558.344910 0

Those first two floats describe the beginning and ending time of the section to trim out, and that last 0 is the instruction for trimming the section out. Now that I had a good EDL to work with, I needed to actually find a way to trim that section out of the video. To do this, I needed to find a version of MEncoder that would work on Windows. Thanks to all my experience with Lando, I already knew about a special windows build of MEncoder that would meet my needs. I unzipped that build to my "Program Files" directory and then ran the following command from that new folder:

mencoder.exe myvideo.avi -edl myedlfile.edl -ovc copy -oac copy -o myeditedvideo.avi

This is one of the most basic ways to "transcode" a video. The -ovc copy and -oac copy arguments essentially tell MEncoder to stick with the video and audio codecs already being used in the source video. The -edl myeditfile.edl argument is the most important of the bunch, since it tells MEncoder to use the instructions included in the EDL while performing the "transcoding."

When all was said and done, I ended up with a video of the same quality as the original, but with the commercials removed according to my generated EDL file. Luckily for me, my processor is on steroids, so the "transcoding" process only took a few seconds. On older computers, it might take a bit longer, but you should see the same end result regardless.

Comments

roger on June 28, 2011 at 5:58 AM:

http://oss.netfarm.it/mplayer-win32.php has updated mencoder for windows builds.
Also thanks for your tutorial--one of the few on the web that describes transcoding with edl (though because it can only seek to i-frames, it will be slightly off, but reasonably good).

Permalink

vector logo design service on September 03, 2016 at 1:26 AM:

Pleasant online journal and totally exceptional. You can improve yet despite everything I say this perfect.Keep striving generally advantageous.

Permalink

how to get more followers on instagram on September 06, 2016 at 11:19 PM:

much obliged this is great web journal.

Permalink

get likes on instagram on September 06, 2016 at 11:19 PM:

Much thanks for keep this data.

Permalink

minecraft servers for pe on September 24, 2016 at 1:44 AM:

It's fitting time to make a few arrangements for the future and the time has come to be cheerful. I have perused this post and on the off chance that I might I be able to wish to recommend you few fascinating things or guidance. Maybe you could compose next articles alluding to this article. I yearning to peruse much more things about it!

Permalink

netflix accounts 2016 on September 24, 2016 at 1:44 AM:

I read your web journal much of the time and I just thought I'd say keep up the astonishing work!

Permalink

agen judi on March 18, 2017 at 12:20 PM:

All the contents you mentioned in post is too good and can be very useful. I will keep it in mind, thanks for sharing the information

Permalink

دكتورة on March 24, 2017 at 10:38 AM:

I just want to let you know that I just check out your site and I find it very interesting and informative.

Permalink

seo backlinks service on March 28, 2017 at 5:39 AM:

Thanks for all your information, Website is very nice and informative content.

Permalink

office bags for mens on April 04, 2017 at 7:26 AM:

Offering wide collection of men designer bags made from high quality materials. Our bags made in Italy and we ship it for free to you.

Permalink

فينير on April 09, 2017 at 12:04 PM:

I have bookmarked your blog, the articles are way better than other similar blogs.. thanks for a great blog!

Permalink

carding forum on April 23, 2017 at 8:56 AM:

I really thank you for the valuable info on this great subject and look forward to more great posts.

Permalink

leather briefcase sale on April 30, 2017 at 2:15 AM:

Offering wide collection of leather briefcases made in Italy.

Permalink

csgo betting on May 02, 2017 at 1:23 PM:

Bet on an outcome of events in Counter Strike:Global Offensive matches and earn coins for purchasing of skins in the Store.

Permalink

dwxcidgs on May 15, 2017 at 5:23 AM:
v 1969 on June 02, 2017 at 5:28 AM:

This is such a great resource that you are providing and you give it away for free.

Permalink

marathi actress on July 27, 2017 at 1:14 PM:

This blog has got lots of really helpful information on it! Cheers for sharing it with me!

Permalink

designer bags sale uk on July 31, 2017 at 2:04 AM:

Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up.

Permalink

Agen Sbobet on September 13, 2017 at 4:06 AM:

very bautiful post

Permalink

Agen Taruhan on September 13, 2017 at 4:10 AM:

Nice Article

Permalink

Agen Judi Online on September 13, 2017 at 4:11 AM:

Pleasant online journal and totally exceptional. You can improve yet despite everything I say this perfect.Keep striving generally advantageous.

Permalink

Agen Judi Online on September 13, 2017 at 4:13 AM:

Nice Post

Permalink

Agen Bola Terpercaya on September 13, 2017 at 4:14 AM:

I read your web journal much of the time and I just thought I'd say keep up the astonishing work!

Permalink

Prediksi Bola Akurat on September 13, 2017 at 4:14 AM:

Offering wide collection of leather briefcases made in Italy.

Permalink

Master Agen Betting on September 13, 2017 at 4:15 AM:

Bet on an outcome of events in Counter Strike:Global Offensive matches and earn coins for purchasing of skins in the Store.

Permalink

Agen Judi Bola on September 13, 2017 at 4:21 AM:

like this post

Permalink

Bandar Bola on September 13, 2017 at 4:21 AM:

Kunjungi kami agen judi bola online terpercaya

Permalink

Prediksi Skor Jitu on September 13, 2017 at 4:22 AM:

website resmi prediksi judi bola terpercaya

Permalink

Agen Bola Sbobet on September 13, 2017 at 4:24 AM:

kami agen judi bola terpercaya, silahkan langsung kunjungi kami di http://167.114.18.218/

Permalink

Agen Maxbet on September 13, 2017 at 4:25 AM:

Kami Agen Judi Maxbet / Ibcbet Resmi, http://win88bet.net/

Permalink

Agen Ibcbet Terpercaya on September 13, 2017 at 4:25 AM:

Kami Agen Judi Online Terpercaya 2017, Kunjungi Kami di http://win88bet.org/

Permalink

Agen Sbobet Online on September 13, 2017 at 4:26 AM:

Kami Agen Resmi Sbobet Indonesia, kunjungi kami di http://tokosbobet.com/

Permalink

Prediksi Skor on September 13, 2017 at 4:27 AM:

Prediksi Aktual Adalah situs resmi prediksi bola terpercaya http://prediksiaktual.com/

Permalink

Prediksi Skor Sbobet on September 13, 2017 at 4:28 AM:

Kami adalah situs resmi prediksi bola sbobet, http://prediksiskorsbobet.com/

Permalink

Prediksi Taruhan Bola on September 13, 2017 at 4:29 AM:

http://prediksitaruhan.com/ adalah situs resmi prediksi taruhan bola paling akurat

Permalink

Niky Eddie on March 17, 2018 at 2:27 PM:

Post Comments

If you feel like commenting on the above item, use the form below. Your email address will be used for personal contact reasons only, and will not be shown on this website.

Name:

Email Address:

Website:

Comments:

Check this box if you hate spam.