Edit decision list

From Official Kodi Wiki
Revision as of 04:50, 21 December 2009 by >Dteirney (Further tidy ups, adding more information about commercial breaks and MythTV support)
Jump to navigation Jump to search

An edit decision list (EDL) contains information about edits that should be made to the video during playback. Edit decision list information is contained in a separate file to the video that is read by XBMC Media Center just before the video is played. Inspiration for this functionality came from MPlayer EDL support http://www.mplayerhq.hu/DOCS/HTML/en/edl.html

The internal video player used by XBMC Media Center (dvdplayer) supports the following types of edits:

  • Cuts - the content is completely removed from playback as if it were never in the original video. For example, the total playback time is adjusted and the content is always automatically skipped during playback, seeking, fast forward or rewind.
  • Commercial Breaks - each commercial break is automatically skipped only once during playback. Commercial breaks that have been skipped can be seen by seeking backwards or rewinding. This is done so incorrectly flagged commercial breaks can see be seen (since commercial detection is rarely 100% accurate). Advanced configuration can help to remove incorrectly flagged breaks and merge commercial breaks that should be contiguous.
  • Scene Markers - these can be used to seek to points of interest within a video similar to how chapter seeking works for DVDs.


Supported File Formats

XBMC Media Center is able to read edit decision lists from multiple file formats. The EDL file for a video must be in the same folder as the video file and is looked for based on the file extensions for the supported formats.

For example if the video file is called The Matrix.avi XBMC will look for the following files, in order, until a valid file is found. Note the the file name may be case-sensitive based on the operating system being used.

  1. The Matrix.Vprj (VideoReDo)
  2. The Matrix.edl (MPlayer EDL)
  3. The Matrix.txt (Comskip)
  4. The Matrix.avi.chapters.xml (SnapStream BeyondTV)

If the video is being played through the [MythTV] integration, any commercial breaks flagged by MythTV will be used during playback.

VideoReDo

http://www.videoredo.com/ files are supported. The name of the file must be the same as the video but with a file extension of .Vprj. Only <SceneMarker> and <Cut> tags are read from the file - everything else is ignored. Cuts are treated as commercial breaks.

Scene marker and cut times are represented in milliseconds * 10,000.

<Version>2
<Filename>C:\Path\To\Video.mpg
<InputPIDList>
<VideoStreamPID>224</VideoStreamPID>
<AudioStreamPID>192</AudioStreamPID>
</InputPIDList>
<SceneMarker 1415932542>4235230000
<SceneMarker 1415932543>4284610000
<SceneMarker 1415932544>4585580000
<SceneMarker 1415932545>5035360000
<Cut>4235230000:5936600000
<Cut>9535530000:11527860000
<Cut>14385710000:16090090000

MPlayer EDL

http://www.mplayerhq.hu/DOCS/HTML/en/edl.html files are supported. The name of the file must be the same as the video but with a file extension of .edl.

The file contains the start and ends of the edits along with the type of action associated with each edit. The file format is:

[begin second] [end second] [action]

The actions supported by this file format has been extended by XBMC Media Center to include scene marker and commercial break actions. Supported actions are:

  • 0 - Cut
  • 1 - Mute (not implemented)
  • 2 - Scene Marker (the begin second is ignored)
  • 3 - Commercial Break

For example, the following .edl file content will skip from second 5.3 to second 7.1, mute at 15 seconds, unmute at 16.7 seconds (when/if implemented) and commercial skip from 420 seconds to 822 seconds. There will be two scene markers. The first at 255.3 seconds and the next at 720.1 seconds.

5.3   7.1    0
15    16.7   1
420   822    3
1     255.3  2
2     720.1  2

Comskip

http://www.kaashoek.com/comskip/ file are supported. The name of the file must be the same as the video but with a file extension of .txt. The file contains the frame markers for the commercial breaks that were detected. The Comskip file may or may not contain the frame rate. If the frame rate is not included, the detected frame rate of the video is used to convert from the frame markers to time offsets.

FILE PROCESSING COMPLETE
------------------------
12693	17792
28578	34549
43114	48222
FILE PROCESSING COMPLETE 678900 FRAMES AT 25
------------------------
12693	17792
28578	34549
43114	48222

SnapStream BeyondTV

http://www.snapstream.com/products/beyondtv/ files are supported. The name of the file must be the same as the video but with .chapters.xml appended to the filename.

Commercial break times are represented in milliseconds * 10,000.

<cutlist>
  <Region>
    <start comment="0:07:03.0000523">4235230000</start>
    <end comment="0:09:53.0000660">5936600000</end>
  </Region>
  <Region>
    <start comment="0:15:53.0000553">9535530000</start>
    <end comment="0:19:12.0000786">11527860000</end>
  </Region>
  <Region>
    <start comment="0:23:58.0000571">14385710000</start>
    <end comment="0:26:49.0000009">16090090000</end>
  </Region>
</cutlist>

MythTV

Files that are played through the integrated [MythTV] support have the commercial breaks loaded from mythbackend.

Scene Markers are additionally put in at the beginning and end of the flagged commercial breaks.

Commercial Break Merging

TODO: Describe how commercial breaks can be merged using the advanced settings.

Showing EDL Information During Playback

Information about the EDL status for the video can be obtained by showing the codec information during playback. Typically this is shown by pressing o on a keyboard or pressing the Title button on the XBox remote. See [Keymap.xml] for more information.

When the codec information for the playing video is shown on screen, e.g. the video and stream codecs being used, framerate, number of dropped frames etc. information about the EDL status will also be displayed. Edit decision list information is prefixed with edl: and followed by a dash or letters followed by numbers. The letter describes the type of edit and the following number the count of that type. For example, edl: c4s8 means there are 4 commercial breaks and 8 scene markers.

  • *c* = cut
  • *m* = mute
  • *b* = commercial break
  • *s* = scene marker
  • - (dash) = no edit decision list

Using Scene Markers

To use any scene markers that have been read, buttons on the remote need to be configured to go to the next/previous scene marker. These buttons will use the NextScene and PreviousScene codes in [Keymap.xml]. For example to assign the |< and >| buttons on the XBox remote in full screen video you could assign the following in keymap.xml

<FullscreenVideo>
  <remote>
    <skipplus>NextScene</skipplus>
    <skipminus>PreviousScene</skipminus>
  </remote>
</FullscreenVideo>

External Player Support

The edit decision lists that have been read can be used by MPlayer. MPlayer only supports cuts and mutes, so any scene markers that have been read are ignored, and any commercial breaks that have been read are converted to cuts.

Not Implemented

  • Compensation for cuts when percentage seeking is used and the movie length is unknown
  • Muting

Known Issues

  • MPlayer sometimes ignores search parameters, see Bug-Report #1803075