Edit decision list: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Dteirney
(Adding the SnapStream BeyondTV file format information)
>Dteirney
(Further tidy ups, adding more information about commercial breaks and MythTV support)
Line 1: Line 1:
EDL (Edit Decision List) support.
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 EDL (Edit Decision List) system allows you to automatically skip or mute sections of videos during playback, based on a movie specific EDL configuration file. This can for example be used for commercial skipping or to censor scenes or sounds from a movie.


SceneMarkers (chapter file) support.  
The internal video player used by XBMC Media Center (dvdplayer) supports the following types of edits:
* SceneMarker files allow you to jump from scene to scene, like with DVD-Video chapters.
* '''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.




===Features===
= Supported File Formats =
*Support for EDLs/Scenemarkers in the following formats:
** EDL (Edit Decision List) .edl format with added type '2' for scenemarkers
** ComSkip .txt format (with framerate information)
** VideoReDo version 2 .vprj format
** SnapStream Beyond TV Smart Chapters (a.k.a. smartskip) .chapters.xml format.
 
* Automatically adjusts seeking so cutpoints are skipped.
 
* Total time of the movie is adjusted for the EDL cuts.
 
* EDL/Scenemarker usage information in video information.
 
* Supported for [[DVDPlayer]] (experimental) and [[MPlayer]] video-player cores.
 
* NOTE: Muting is not implemented.
 
===Usage===
 
 
= EDL format with scenemarkers extension =
 
An Edit Decision List or EDL allows you to automatically skip or mute sections of videos during playback, based on a movie specific EDL configuration file. The EDL can for example be used to to skip commecials or intros. XBMC adds a third option to use scenemarkers. Scenemarkers can be used to quickly jump to a scene, similar to DVD chapters.
 
The current EDL file format is:
[begin second] [end second] [action]
 
Where the seconds are floating-point numbers and the action is either 0 for cut, 1 for mute, 2 for a scene marker, 3 for a commercial break. Example:
 
<pre>
5.3  7.1    0
15    16.7  1
420  822    3
1    255.3  2
2    720.1  2
</pre>
 
 
 
=SceneMarker seeking=
To assign a button for next/previous scenemarker, use the NextScene/PreviousScene codes in keymap.xml.
For example to assing the <nowiki>|< and >|</nowiki> buttons on the xbox remote in full screen video:
<pre>
<FullscreenVideo>
    <remote>
      <skipplus>NextScene</skipplus>
      <skipminus>PreviousScene</skipminus>
</pre>
 
= EDL information display =
 
Pressing the black button (Title on the XBox remote) will show information regarding the currently playing video stream such as codecs, framerate and more. Edit decision list related information is shown prefixed with '''edl:''' followed by a dash or letters followed by numbers. The letter denotes 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 = '''c'''uts
* m = '''m'''utes
* b = commercial '''b'''reaks
* s = '''s'''cene markers
* '''-''' (dash) = no edit decision list
 
=Not implemented=
* Compensation for cutpoint when movie length is unknown and percentage seeking is used.
* Muting is not yet implemented for [[DVDPlayer]] nor for [[MPlayer]]
 
=Possible issues=
 
* The readers now stop reading at the first format error, and invalidates the EDL.
* MPlayer sometimes seems to ignore search parameters, see Bug-report #1803075.
 
=Possible future expansions=
* Read other scene marker formats, like DVD-Video authoring formats, so DVDrip's can have the original scene markers.
* Read other EDL/chapter file formats
* Implement muting
 
 
[[category:Scraper]]
[[category:Library]]
[[category:Video Library]]
[[category:Customization]]
[[category:Usage]]
[[category:How To]]
 
= 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.
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.
Line 96: Line 16:
# '''The Matrix.txt''' (Comskip)
# '''The Matrix.txt''' (Comskip)
# '''The Matrix.avi.chapters.xml''' (SnapStream BeyondTV)
# '''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 ==
== VideoReDo ==
Line 123: Line 45:
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'''.
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 time offsets for the start and ends of the edits along with the type of action associated with the edit. The file format is:
The file contains the start and ends of the edits along with the type of action associated with each edit. The file format is:
<pre>
<pre>
[begin second] [end second] [action]
[begin second] [end second] [action]
Line 132: Line 54:
* 1 - Mute (not implemented)
* 1 - Mute (not implemented)
* 2 - Scene Marker (the ''begin second'' is ignored)
* 2 - Scene Marker (the ''begin second'' is ignored)
* 3 - Commercial Break (treated as a "soft" cut so the video can be re-entered again)
* 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.
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.
Line 168: Line 90:
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.
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 breaks times are represented in milliseconds * 10,000.
Commercial break times are represented in milliseconds * 10,000.


<pre>
<pre>
Line 185: Line 107:
   </Region>
   </Region>
</cutlist>
</cutlist>
</pre>
== 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* = '''c'''ut
* *m* = '''m'''ute
* *b* = commercial '''b'''reak
* *s* = '''s'''cene 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 <nowiki>|<</nowiki> and <nowiki>>|</nowiki> buttons on the XBox remote in full screen video you could assign the following in ''keymap.xml''
<pre>
<FullscreenVideo>
  <remote>
    <skipplus>NextScene</skipplus>
    <skipminus>PreviousScene</skipminus>
  </remote>
</FullscreenVideo>
</pre>
</pre>


Line 190: Line 146:


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.
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
[[category:Library]]
[[category:Video Library]]
[[category:Customization]]
[[category:Usage]]
[[category:How To]]

Revision as of 04:50, 21 December 2009

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