Easily Create EDL's to skip credits
#1
MythTV has been serving me wonderfully for years. It’s an incredible system and is still my primary media solution to this day. Unfortunately, the tools provided for managing video metadata have fallen a little behind. I recently switch away from Boxee and gave XBMC a try. What a fantastic front end and the media management tools are perfect.

My wife and I watch Star Trek Voyager each night to fall asleep (I hear you snickering). A minor frustration is that I have to fast forward through the intro credits, and I also have to exit out at the end, select the next episode and then get through those intro credits in a few minutes. It’s a really minor annoyance but one I am proud to say I have overcome with the build-in EDL (edit decision lists) that are supported by XBMC. EDL is a file type that informs XMBC to skip or mute a particular section of a video. The file format is pretty simple, each line has the start time in seconds, end time in seconds and then a numeric representation of what to do (skip 0, mute 1). The problem is creating these files can be a bit of a pain. I simplified the process with a small batch file, mplayer and NotePad++ (you can use regular notepad).

Source code for edl.bat
Code:
@ECHO OFF
set str=%1
for /f "useback tokens=*" %%a in ('%str%') do set str=%%~a
"C:\Program Files (x86)\SMPlayer\mplayer\mplayer.exe" %1.avi -edlout %1.edl
"C:\Program Files (x86)\SMPlayer\mplayer\mplayer.exe" -frames 0 -identify %1.avi | find "ID_LENGTH"
"C:\Program Files (x86)\Notepad++\notepad++.exe" "%str%.edl"
The only tool you really need is MPlayer (free). Once you have mplayer installed and the proper paths reflected in the batch file, The workflow is:

  1. Go to a command prompt in the folder containing the above batch file and execute: edl.bat “M:\STV\Season 2\Star Trek Voyager S02E25″ (notice the lack of extension)
  2. Navigate to the beginning of the intro credits and press i.
  3. Navigate to the end of the intro credits and press i again.
  4. Navigate to the beginning of the ending credits and press i.
  5. Press i again and then q.
  6. The script will determine the total length of the video and print it on the command line, it will then launch your text editor and open the edl file
  7. Change the second to last number on the last line to match the total length.
  8. Save the edl and close it
  9. Repeat for all of the video files you want to edit.

MPlayer has pretty easy navigation controls. PgUp for forward 10-min, up-arrow forward 1 min, right arrow forward 10-sec. I can create an EDL in about 30-seconds.

This process can be used to remove or mute any part of a file. Finally, just use the XMBC “Play from here…” context item and you can have continuous play of the entire series without any interruption.

This is also written up in my personal blog. Hope it helps.
Reply
#2
I've been looking for something like this thanks
Skygo Addons Repo
Repo - Skygo V2

SkyGo V2 Addon Forum
Reply
#3
Hey,

I know this post is a bit old, but I've modified this so you can just drag and drop a file to get it working. Just make a batch file in the same directory as mplayer.exe and drop any files onto it.

On a side note, does anyone have an easier method of skipping regular sections? I'm in the process of writing something that will use image detection with reference images to auto create edl timestamps, but it seems needlesly complex.

Code:
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set fName=%1
if '%1' equ '' set /p fName=Enter file name:
for /f "tokens=* delims= " %%F in ('echo %fName%') do (
set fNameWithoutExt=%%~nF
set driveLetter=%%~dF
set folderPath=%%~pF
)

set SRC_FILE=%1%
set TGT_PATH=%driveLetter%%folderPath%%fNameWithoutExt%

"%~dp0mplayer.exe" %SRC_FILE% -edlout "%TGT_PATH%.edl"
"%~dp0mplayer.exe" -frames 0 -identify %SRC_FILE% | find "ID_LENGTH"
"notepad" "%TGT_PATH%.edl"

pause

It's probably not the nicest bash script, but I'm not too familiar with it.
Reply
#4
Hello HeWhoWas, did you have any success with your "project"?
Reply
#5
Hello! Same story here. We're watching series like The Simpsons or Family Guy, and usually we fall asleep.
But then we wake up because of the intro/ending credits music. 
I think the best way would be to automatically create EDL Files per season with a fix skip time,
because some seasons have a different intro-duration. Of course there can always be runaways, but that
would need a manual adjustment anyways. 
And for the ending credit we would need some program, that reads out the video file's duration.
And finally, our automation tool would have to add a second skip line on that time index minus the usual ending credit's length.
That's it in a nut shell.
Reply
#6
Firstly do you realise this thread was 4 years old?

Secondly an EDL file is just a simple text file, and would be easy to set up and duplicate to do this.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply

Logout Mark Read Team Forum Stats Members Help
Easily Create EDL's to skip credits0