VideoPlayer: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>RyanDesign
m (typo)
>NedBot
m (Bot: Automated text replacement (-__NOEDITSECTION__ + ); cosmetic changes)
Line 2: Line 2:
{{XBMC faq toc Inline}}
{{XBMC faq toc Inline}}
__TOC__
__TOC__
__NOEDITSECTION__
 
'''[[DVDPlayer]]''' is XBMC's video player, capable of playing DVD video and many other video formats. DVDPlayer supports DVD video with menus, from CD/DVD-media, harddrive, network, ISO/IMG-images and RAR/ZIP archives (and even RARed ISO/IMG-images as long as they are in 'stored/archive' mode and not compressed).
'''[[DVDPlayer]]''' is XBMC's video player, capable of playing DVD video and many other video formats. DVDPlayer supports DVD video with menus, from CD/DVD-media, harddrive, network, ISO/IMG-images and RAR/ZIP archives (and even RARed ISO/IMG-images as long as they are in 'stored/archive' mode and not compressed).
==Currently Supported Codecs==
== Currently Supported Codecs ==
*[http://www.ffmpeg.org FFmpeg] - all audio and video decoders supported by FFmpeg (avcodec/avformat) open source codec-suit
* [http://www.ffmpeg.org FFmpeg] - all audio and video decoders supported by FFmpeg (avcodec/avformat) open source codec-suit
*[http://en.wikipedia.org/wiki/Mpeg2 MPEG-1/MPEG-2] video decoder based on [http://libmpeg2.sourceforge.net/ libmpeg2]
* [http://en.wikipedia.org/wiki/Mpeg2 MPEG-1/MPEG-2] video decoder based on [http://libmpeg2.sourceforge.net/ libmpeg2]
*MPEG-1/MPEG-2 (Layer I, Layer II, and Layer III, inc. MP3) audio decoder based on [http://www.underbit.com/products/mad/ libmad]
* MPEG-1/MPEG-2 (Layer I, Layer II, and Layer III, inc. MP3) audio decoder based on [http://www.underbit.com/products/mad/ libmad]
*[http://en.wikipedia.org/wiki/Dts DTS (Digital Theater System)] audio decoder based on [http://developers.videolan.org/libdca.html libdca] (formaly known as "libdts")
* [http://en.wikipedia.org/wiki/Dts DTS (Digital Theater System)] audio decoder based on [http://developers.videolan.org/libdca.html libdca] (formaly known as "libdts")
*[http://en.wikipedia.org/wiki/Dolby_Digital Dolby Digital AC3] audio decoder based on [http://liba52.sourceforge.net/ liba52]
* [http://en.wikipedia.org/wiki/Dolby_Digital Dolby Digital AC3] audio decoder based on [http://liba52.sourceforge.net/ liba52]
*[http://en.wikipedia.org/wiki/Advanced_Audio_Coding AAC (Advanced Audio Coding)] MPEG-4 audio decoder based on AudioCoding.com's [http://www.audiocoding.com libfaad2]
* [http://en.wikipedia.org/wiki/Advanced_Audio_Coding AAC (Advanced Audio Coding)] MPEG-4 audio decoder based on AudioCoding.com's [http://www.audiocoding.com libfaad2]




==Known Issues==
== Known Issues ==
For every month that goes by, the native DVD-Player in XBMC is becoming more and more usable/stable for the average end-user. However, there is still a lot of work that can be done on it:
For every month that goes by, the native DVD-Player in XBMC is becoming more and more usable/stable for the average end-user. However, there is still a lot of work that can be done on it:
For one thing there are still quite a few bugs left in it that should be found and fixed, something we really need your help with (see the "[[DVDPlayer#Bug_Reporting|Bug Reporting]]" section below).
For one thing there are still quite a few bugs left in it that should be found and fixed, something we really need your help with (see the "[[DVDPlayer#Bug Reporting|Bug Reporting]]" section below).
Another thing is that not all features that you might expect from a normal DVD-player are implemented yet. Some of these features are listed below under "[[DVDPlayer#Unimplemented_Features|Unimplemented Features]]" and are not considered to be bugs, that does not mean that features not listed below under can be reported as bugs (something that happens too many times)!
Another thing is that not all features that you might expect from a normal DVD-player are implemented yet. Some of these features are listed below under "[[DVDPlayer#Unimplemented Features|Unimplemented Features]]" and are not considered to be bugs, that does not mean that features not listed below under can be reported as bugs (something that happens too many times)!




===Known Bugs===
=== Known Bugs ===
The official list/tracker of known bugs can be found [http://trac.xbmc.org trac]
The official list/tracker of known bugs can be found [http://trac.xbmc.org trac]


:Note! A bug is only ever a bug if the DVDplayer was designed to do something and that thing does not work, for example; a DVD-movie crashes in the middle, produces garbled output, or you see different navigation-menu behaviour compared to a normal standalone DVD-player, or WinDVD/PowerDVD on a PC, or the original DVD-Player of the Xbox.
:Note! A bug is only ever a bug if the DVDplayer was designed to do something and that thing does not work, for example; a DVD-movie crashes in the middle, produces garbled output, or you see different navigation-menu behaviour compared to a normal standalone DVD-player, or WinDVD/PowerDVD on a PC, or the original DVD-Player of the Xbox.


==Bug Reporting==
== Bug Reporting ==
When reporting bugs or problems there are a few things to keep in mind before posting your bug report(s).
When reporting bugs or problems there are a few things to keep in mind before posting your bug report(s).
Bug-reports should be reported at [http://sourceforge.net/tracker/?atid=581838&group_id=87054&func=browse&_category=566353 sourceforge.net], this way we are able to track all bugs on one tracker which makes our lifes a lot easier. However, before posting a bug-report there, make sure it is a valid bug-report and not a feature-request or something that is your own fault (ie. user-error). To do that you can start a new topic thread on the XBMC [http://www.xboxmediacenter.com/forum/forumdisplay.php?f=8 bug-discussion forum] to verify this with others. But most importantly, use the search functions first [http://sourceforge.net/tracker/?atid=581838&group_id=87054&func=browse&_category=566353 here] and [http://www.xboxmediacenter.com/forum/search.php here], to make sure you are not posting duplicate bug reports. Duplicate reports/posts of the same bug makes it much harder for us to keep track of all the bug-reports/posts, not doing so will also save you a lot of work.
Bug-reports should be reported at [http://sourceforge.net/tracker/?atid=581838&group_id=87054&func=browse&_category=566353 sourceforge.net], this way we are able to track all bugs on one tracker which makes our lifes a lot easier. However, before posting a bug-report there, make sure it is a valid bug-report and not a feature-request or something that is your own fault (ie. user-error). To do that you can start a new topic thread on the XBMC [http://www.xboxmediacenter.com/forum/forumdisplay.php?f=8 bug-discussion forum] to verify this with others. But most importantly, use the search functions first [http://sourceforge.net/tracker/?atid=581838&group_id=87054&func=browse&_category=566353 here] and [http://www.xboxmediacenter.com/forum/search.php here], to make sure you are not posting duplicate bug reports. Duplicate reports/posts of the same bug makes it much harder for us to keep track of all the bug-reports/posts, not doing so will also save you a lot of work.
Line 31: Line 31:


Some things that should be in a bug report:
Some things that should be in a bug report:
*A clear description of the problem and what you did (step-by-step) to see it so that we can then replicate it if and when we have the same DVD-disc or a sample (see “Sample” below).
* A clear description of the problem and what you did (step-by-step) to see it so that we can then replicate it if and when we have the same DVD-disc or a sample (see “Sample” below).
*A log file (see “Log file” below)
* A log file (see “Log file” below)
*The XBMC version you are using (exact build date)
* The XBMC version you are using (exact build date)
*Did you build XBMC yourself (from SVN) or...?
* Did you build XBMC yourself (from SVN) or...?
*Audio output mode (analog stereo, passthrough, ...)
* Audio output mode (analog stereo, passthrough, ...)
*Video output mode (output resolution, PAL or NTSC...)
* Video output mode (output resolution, PAL or NTSC...)
*The amount of free memory! See the “log file” chapter below on how to enable free memory display!
* The amount of free memory! See the “log file” chapter below on how to enable free memory display!
**Before playing the DVD
** Before playing the DVD
**During the problem
** During the problem
**After the problem (if XBMC did not crash and just went back to the normal GUI)  
** After the problem (if XBMC did not crash and just went back to the normal GUI)  
*If it is a non-menu related problem
* If it is a non-menu related problem
**Can you play the .vob file correctly with the DVDPlayer? (select dvdplayer with the 'play with dialog')
** Can you play the .vob file correctly with the DVDPlayer? (select dvdplayer with the 'play with dialog')
**Can you play the .vob file correctly with MPlayer? (select mplayer with the 'play with dialog')  
** Can you play the .vob file correctly with MPlayer? (select mplayer with the 'play with dialog')  
*Other information you think that might be relevant
* Other information you think that might be relevant


Please have a look at [[HOW-TO Submit a Proper Bug Report]] for additional information.
Please have a look at [[HOW-TO Submit a Proper Bug Report]] for additional information.




===Log File===
=== Log File ===
XBMC is able to create a log file that provides us with a lot of useful information when trying to locate a bug. However, the normal log-file that XBMC creates everytime you run XBMC does not contain much information by default, therefore you must start XBMC in debug-mode so that a maximum amount of information is written to the log file. To start XBMC in debug-mode simply hold X+Y on startup of XBMC, you will know that XBMC is in debug-mode when you see a free memory indicator in the upper left corner of the screen when XBMC is running and if you look in the log-file you will see a lot of “DEBUG” items. The logfile can be found in the directory where XBMC is installed under the name "xbmc.log" or "xbmc_old.log", in general you only need the "xbmc.log" file but if you are running XBMC as dashboard and you have to restart your Xbox (because of a crash/hang) then you probably need to have "xbmc_old.log" instead. Make sure you have the correct logfile by looking at its contents, the information can be read in any text-editor (like Notepad in Micosoft Windows).
XBMC is able to create a log file that provides us with a lot of useful information when trying to locate a bug. However, the normal log-file that XBMC creates everytime you run XBMC does not contain much information by default, therefore you must start XBMC in debug-mode so that a maximum amount of information is written to the log file. To start XBMC in debug-mode simply hold X+Y on startup of XBMC, you will know that XBMC is in debug-mode when you see a free memory indicator in the upper left corner of the screen when XBMC is running and if you look in the log-file you will see a lot of “DEBUG” items. The logfile can be found in the directory where XBMC is installed under the name "xbmc.log" or "xbmc_old.log", in general you only need the "xbmc.log" file but if you are running XBMC as dashboard and you have to restart your Xbox (because of a crash/hang) then you probably need to have "xbmc_old.log" instead. Make sure you have the correct logfile by looking at its contents, the information can be read in any text-editor (like Notepad in Micosoft Windows).


Line 57: Line 57:


This log file can be made public in a few ways:
This log file can be made public in a few ways:
*You zip it and upload it together with the bug-report to xbmc.org/trac.
* You zip it and upload it together with the bug-report to xbmc.org/trac.
*Post parts of the logfile in the bug report itself on [http://trac.xbmc.org xbmc.org/trac] or the [http://forum.xbmc.org/forumdisplay.php?f=8 XBMC Bug-Discussion Forum].
* Post parts of the logfile in the bug report itself on [http://trac.xbmc.org xbmc.org/trac] or the [http://forum.xbmc.org/forumdisplay.php?f=8 XBMC Bug-Discussion Forum].
*Use [http://pastebin.com/ pastebin] and provide the link in your bug-report.
* Use [http://pastebin.com/ pastebin] and provide the link in your bug-report.
*You can post *parts* of the log on the forum as it might help developers pin-point the problem, (please read the log file and post only the parts you think are usefull. The first part is logging every setting which most of the time is not useful).
* You can post *parts* of the log on the forum as it might help developers pin-point the problem, (please read the log file and post only the parts you think are usefull. The first part is logging every setting which most of the time is not useful).


===Sample===
=== Sample ===
While it sometimes can be complicated to provide us with samples, it is usually worth the effort. With samples that show the problem we are able to fix bugs much easier and quicker, because with a sample we can very simply replicate the bug ourselves in our own debug enviroment, and most of the time these bugs can be fixed the same day if there is a developer with some free time available and willing. Without a sample, it will take much longer because we cannot replicate the bug ourselves and we will have to try a lot of things (which can break the current working version again).
While it sometimes can be complicated to provide us with samples, it is usually worth the effort. With samples that show the problem we are able to fix bugs much easier and quicker, because with a sample we can very simply replicate the bug ourselves in our own debug enviroment, and most of the time these bugs can be fixed the same day if there is a developer with some free time available and willing. Without a sample, it will take much longer because we cannot replicate the bug ourselves and we will have to try a lot of things (which can break the current working version again).


Line 75: Line 75:
In all cases you must first test the sample yourself before you send it to the XBMC developer/team, the sample needs to have the same problem as the original DVD, (since it is not of much use otherwise).
In all cases you must first test the sample yourself before you send it to the XBMC developer/team, the sample needs to have the same problem as the original DVD, (since it is not of much use otherwise).


==Unimplemented Features==
== Unimplemented Features ==
This is a list of some unsupported features which are not yet planned. If you can program in C/C++ then please feel free to develop a new feature/function or improve/enhance the existing code and [[HOW-TO_submit_a_patch|submit a patch]]). Developers are always welcomed to ask question or request help/assistance in our forums (and on IRC) when programming for XBMC:
This is a list of some unsupported features which are not yet planned. If you can program in C/C++ then please feel free to develop a new feature/function or improve/enhance the existing code and [[HOW-TO submit a patch|submit a patch]]). Developers are always welcomed to ask question or request help/assistance in our forums (and on IRC) when programming for XBMC:
*External subtitle support when playing DVD's (.SRT/.SUB text-based and. IDX/.SUB bitmap-based subtitles support for DVD-video)
* External subtitle support when playing DVD's (.SRT/.SUB text-based and. IDX/.SUB bitmap-based subtitles support for DVD-video)
**including a option to manually browse for external subtitle (to select subtitle with different name and from any HDD/share location)
** including a option to manually browse for external subtitle (to select subtitle with different name and from any HDD/share location)
*Embedded text-based subtitle support (.SRT/.SUB, etc. embedded in .AVI, .MKV, .MP4, .OGM containers)
* Embedded text-based subtitle support (.SRT/.SUB, etc. embedded in .AVI, .MKV, .MP4, .OGM containers)
**including a option to manually browse for external subtitle (to select subtitle with different name and from any HDD/share location)
** including a option to manually browse for external subtitle (to select subtitle with different name and from any HDD/share location)
*Cache/Buffer for unnoticeable layer skip (for dual-layer DVD's, a.k.a. DVD9 for originals, and DVD+R Dual-Layer 8.5GB for backups)
* Cache/Buffer for unnoticeable layer skip (for dual-layer DVD's, a.k.a. DVD9 for originals, and DVD+R Dual-Layer 8.5GB for backups)
*Automatic deinterlace for interlaced DVDs on progressive TVs, (possible port deinterlacer from [http://avisynth.org.ru/yadif/yadif.html YADIF], [http://sourceforge.net/projects/deinterlace DScaler], or [http://www.mir.com/DMG/Software/y4mscaler.html y4mscaler]?)
* Automatic deinterlace for interlaced DVDs on progressive TVs, (possible port deinterlacer from [http://avisynth.org.ru/yadif/yadif.html YADIF], [http://sourceforge.net/projects/deinterlace DScaler], or [http://www.mir.com/DMG/Software/y4mscaler.html y4mscaler]?)
*Post-Processing filters to enhance visual quality and remove artifacts, etc. (port mainly from [http://www.mplayerhq.hu/ MPlayer] and [http://ffdshow.sourceforge.net/tikiwiki/ FFdshow]?)
* Post-Processing filters to enhance visual quality and remove artifacts, etc. (port mainly from [http://www.mplayerhq.hu/ MPlayer] and [http://ffdshow.sourceforge.net/tikiwiki/ FFdshow]?)
**SSP (Statistical-Post-Proc.), DeBlocking, DeRinging, Sharpen, Soften, ReQuantization, Auto-Luminance, Blurring/DeNoising
** SSP (Statistical-Post-Proc.), DeBlocking, DeRinging, Sharpen, Soften, ReQuantization, Auto-Luminance, Blurring/DeNoising
*2:3 pull-down / ivtc (inverse telecine) for 24 progressive-frames on 30 FPS TV's (use [http://sourceforge.net/projects/deinterlace DScaler] or [http://www.mir.com/DMG/Software/y4mscaler.html y4mscaler], or GPU pixel shader?)
* 2:3 pull-down / ivtc (inverse telecine) for 24 progressive-frames on 30 FPS TV's (use [http://sourceforge.net/projects/deinterlace DScaler] or [http://www.mir.com/DMG/Software/y4mscaler.html y4mscaler], or GPU pixel shader?)
*NTSC => PAL, and PAL => NTSC frame-rate (FPS) adjust and reclock filter for NTSC <=> PAL conversion  
* NTSC => PAL, and PAL => NTSC frame-rate (FPS) adjust and reclock filter for NTSC <=> PAL conversion  
**NTSC <=> PAL frame-rate adjust FPS ratios?: 23.97 <=> 25, 24 <=> 25, 30 <=> 25, 25 <=> 30
** NTSC <=> PAL frame-rate adjust FPS ratios?: 23.97 <=> 25, 24 <=> 25, 30 <=> 25, 25 <=> 30
*Option to manually set a specific DVD region (so you can always in the future play those disc that can't be fooled by 'region masking')
* Option to manually set a specific DVD region (so you can always in the future play those disc that can't be fooled by 'region masking')
*Dual-subtitle-display (display two subtitles/languages at the same time, one at the bottom as normal plus one at the top of the screen)
* Dual-subtitle-display (display two subtitles/languages at the same time, one at the bottom as normal plus one at the top of the screen)
*Audio 44.1kHz/88.2kHz/96kHz/192kHz to 48kHz re-sampler (sample rate converter) (like [http://www.mega-nerd.com/SRC/ SRC] which already been ported to XBMC?)
* Audio 44.1kHz/88.2kHz/96kHz/192kHz to 48kHz re-sampler (sample rate converter) (like [http://www.mega-nerd.com/SRC/ SRC] which already been ported to XBMC?)
*[http://mediainfo.sourceforge.net/ DVD-Video tags/meta reading] (collect and display IFO/MPEG/AC3/DTS tags)
* [http://mediainfo.sourceforge.net/ DVD-Video tags/meta reading] (collect and display IFO/MPEG/AC3/DTS tags)
*[http://mediainfo.sourceforge.net/ DVD-Video codec-info reading] (collect and display encoding-info like codecs, resolution, aspect, FPS, bitrate, sample-rate, channels)
* [http://mediainfo.sourceforge.net/ DVD-Video codec-info reading] (collect and display encoding-info like codecs, resolution, aspect, FPS, bitrate, sample-rate, channels)
*Display current playback-time + total duration, title, chapter, subtitle, angle, aspect-ratio, audio-source, and DVD volume info
* Display current playback-time + total duration, title, chapter, subtitle, angle, aspect-ratio, audio-source, and DVD volume info
**Plus under "advanced" also display: disc-region, resolution, frames-per-second, bitrate, sample-rate, and codecs/filters in use)
** Plus under "advanced" also display: disc-region, resolution, frames-per-second, bitrate, sample-rate, and codecs/filters in use)
*Timestamp-based seeking (jump to a given time)
* Timestamp-based seeking (jump to a given time)
*Slow-motion, 1/8, 1/4, 1/2 speed (usually linked to the pause button)
* Slow-motion, 1/8, 1/4, 1/2 speed (usually linked to the pause button)
*Frame-by-frame skip (a.k.a. 'frame stepping'), usually a part of the 'slow-motion' function
* Frame-by-frame skip (a.k.a. 'frame stepping'), usually a part of the 'slow-motion' function
*Auto-resume support, if pressing 'pause' before 'stop' then the position is saved, like a hidden bookmark
* Auto-resume support, if pressing 'pause' before 'stop' then the position is saved, like a hidden bookmark
**When insert play the same DVD again check DISCID and give option to resume, (like [http://www.cyberlink.com/multi/products/main_1_ENU.html PowerDVD])
** When insert play the same DVD again check DISCID and give option to resume, (like [http://www.cyberlink.com/multi/products/main_1_ENU.html PowerDVD])
*[http://sourceforge.net/tracker/index.php?func=detail&aid=817653&group_id=87054&atid=581841 Closed Captions pass-through (like DVDx2/xboxdash)], and [http://sourceforge.net/tracker/index.php?func=detail&aid=817654&group_id=87054&atid=581841 software-decoding] (from 32 streams) for the deaf and hard-of-hearing
* [http://sourceforge.net/tracker/index.php?func=detail&aid=817653&group_id=87054&atid=581841 Closed Captions pass-through (like DVDx2/xboxdash)], and [http://sourceforge.net/tracker/index.php?func=detail&aid=817654&group_id=87054&atid=581841 software-decoding] (from 32 streams) for the deaf and hard-of-hearing
** FYI, [http://www.xinehq.de/ xine] has support for SPU decoder for subpictures and Closed Captions software decoding, so does [http://www.dtek.chalmers.se/groups/dvd/ Ogle] but not as good)
** FYI, [http://www.xinehq.de/ xine] has support for SPU decoder for subpictures and Closed Captions software decoding, so does [http://www.dtek.chalmers.se/groups/dvd/ Ogle] but not as good)
*[http://mplayerhq.hu/pipermail/mplayer-dev-eng/2005-September/thread.html#37221 DVDDiscID], DVDUDFVolumeInfo and DVDISOVolumeInfo reading (and displaying) support
* [http://mplayerhq.hu/pipermail/mplayer-dev-eng/2005-September/thread.html#37221 DVDDiscID], DVDUDFVolumeInfo and DVDISOVolumeInfo reading (and displaying) support
*Use the DVDDiscID/DISCID to cache CSS-keys in libdvdcss (as supported by libdvdcss version 1.2.9 and later)
* Use the DVDDiscID/DISCID to cache CSS-keys in libdvdcss (as supported by libdvdcss version 1.2.9 and later)
*Option to 'bypass' PUO (Prohibited User Operations), (should be disabled by default as on a normal standalone DVD-player)
* Option to 'bypass' PUO (Prohibited User Operations), (should be disabled by default as on a normal standalone DVD-player)
*An option to skip FBI/copyright-warnings, ads and 'pre-menu' trailers and jump directly to the main title-menu
* An option to skip FBI/copyright-warnings, ads and 'pre-menu' trailers and jump directly to the main title-menu
** Plus an additional alternatively option to jump directly to main movie would be very nice as well
** Plus an additional alternatively option to jump directly to main movie would be very nice as well
*Parental control, set parental-level: G, Level-2, PG, PG-13, Level-5, R, NC-17, Level-8, Unlimited (default)
* Parental control, set parental-level: G, Level-2, PG, PG-13, Level-5, R, NC-17, Level-8, Unlimited (default)


==Development==
== Development ==
See the [http://forum.xbmc.org/showthread.php?t=10216 DVDPlayer core/library topic thread in the XBMC development forum] for now.
See the [http://forum.xbmc.org/showthread.php?t=10216 DVDPlayer core/library topic thread in the XBMC development forum] for now.
:Help is always wanted, so if you can program C/C++, please feel free to code and [[HOW-TO_submit_a_patch|submit a patch]].
:Help is always wanted, so if you can program C/C++, please feel free to code and [[HOW-TO submit a patch|submit a patch]].




===Technical Details===
=== Technical Details ===
See the [http://forum.xbmc.org/showthread.php?t=10216 DVDPlayer core/library topic thread in the XBMC development forum] for now.
See the [http://forum.xbmc.org/showthread.php?t=10216 DVDPlayer core/library topic thread in the XBMC development forum] for now.




===Classes===
=== Classes ===
*InputStreams
* InputStreams
**FactoryInputStream, creates an inputstream based on the filename
** FactoryInputStream, creates an inputstream based on the filename
**File, general file access (hd, cdrom, samba)
** File, general file access (hd, cdrom, samba)
**Http
** Http
**Navigator, for accessing dvd  
** Navigator, for accessing dvd  
*Demuxers
* Demuxers
**FactoryDemuxer, creates a demuxer based on inputstream information
** FactoryDemuxer, creates a demuxer based on inputstream information
**FFmpeg, ffmpeg demuxer wrapper (supports all ffmpeg demuxers)
** FFmpeg, ffmpeg demuxer wrapper (supports all ffmpeg demuxers)
**Shoutcast, for demuxing shoutcast streams  
** Shoutcast, for demuxing shoutcast streams  
*Codecs
* Codecs
**FactoryCodec, creates audio and video codecs based upon demuxer information
** FactoryCodec, creates audio and video codecs based upon demuxer information
**Audio
** Audio
***FFmpeg, ffmpeg audio decoder wrapper
*** FFmpeg, ffmpeg audio decoder wrapper
***Liba52, liba52 wrapper
*** Liba52, liba52 wrapper
***LibDts, libdca wrapper
*** LibDts, libdca wrapper
***LibFaad, libfaad wrapper
*** LibFaad, libfaad wrapper
***LibMad, libmad wrapper (for mp1, mp2, mp3 decoding)
*** LibMad, libmad wrapper (for mp1, mp2, mp3 decoding)
***LPcm, lpcm decoding
*** LPcm, lpcm decoding
***Passthrough, for digital passthrough  
*** Passthrough, for digital passthrough  
**Video
** Video
***LibMpeg2
*** LibMpeg2
***FFmpeg, ffmpeg video decoder wrapper  
*** FFmpeg, ffmpeg video decoder wrapper  
*Subtitles
* Subtitles




===Modules===
=== Modules ===
The player is divided up into a few modules
The player is divided up into a few modules




====Main Module====
==== Main Module ====
Runs in a separate thread
Runs in a separate thread
Reads data from one of the input streams and sends it over to one of the other modules listed below
Reads data from one of the input streams and sends it over to one of the other modules listed below
Line 155: Line 155:




====Audio Module====
==== Audio Module ====
Runs in a separate thread.
Runs in a separate thread.
Decodes audio data and outputs it to the xbox audio renderer
Decodes audio data and outputs it to the xbox audio renderer




====Video Module====
==== Video Module ====
Runs in a separate thread.
Runs in a separate thread.
Decodes raw video data into video frames and outputs them to the xbox video renderer
Decodes raw video data into video frames and outputs them to the xbox video renderer




====Subtitle Module====
==== Subtitle Module ====
Process subtitles
Process subtitles


==Building Libraries (Audio / Video Codecs)==
== Building Libraries (Audio / Video Codecs) ==
The dvdplayer depends on other libraries to function. These libraries are included in SVN by default as dll's under the [http://xbmc.svn.sourceforge.net/viewvc/xbmc/trunk/XBMC/system/players/dvdplayer/ "XBMC/system/players/dvdplayer"] subfolder. The full source code of these libraries can be found under the [http://xbmc.svn.sourceforge.net/viewvc/xbmc/trunk/docs/sources/dvdplayer/ "/docs/sources/dvdplayer/"] subfolder in the SVN. To build these dll's yourself you need to have the following installed, (the .dll's must be then be placed under the "[XBMCFOLDER]/system/players/dvdplayer" subfolder).
The dvdplayer depends on other libraries to function. These libraries are included in SVN by default as dll's under the [http://xbmc.svn.sourceforge.net/viewvc/xbmc/trunk/XBMC/system/players/dvdplayer/ "XBMC/system/players/dvdplayer"] subfolder. The full source code of these libraries can be found under the [http://xbmc.svn.sourceforge.net/viewvc/xbmc/trunk/docs/sources/dvdplayer/ "/docs/sources/dvdplayer/"] subfolder in the SVN. To build these dll's yourself you need to have the following installed, (the .dll's must be then be placed under the "[XBMCFOLDER]/system/players/dvdplayer" subfolder).


*MinGW and MSYS
* MinGW and MSYS
**see [http://ml20rc.msnfanatic.com/ffmpeg/1.html http://ml20rc.msnfanatic.com/ffmpeg/1.html] for installation for ffmpeg
** see [http://ml20rc.msnfanatic.com/ffmpeg/1.html http://ml20rc.msnfanatic.com/ffmpeg/1.html] for installation for ffmpeg
**use binutils version 2.16.91 (20060119) 1  
** use binutils version 2.16.91 (20060119) 1  
*unrar
* unrar




Line 180: Line 180:
Startup msys and browse to the extracted sources. make sure you are in the root of these sources (a directory xbox resides in it) and give the follwing commands.
Startup msys and browse to the extracted sources. make sure you are in the root of these sources (a directory xbox resides in it) and give the follwing commands.


*xbox/configure.sh
* xbox/configure.sh
*xbox/compile.sh
* xbox/compile.sh




Line 187: Line 187:
compile.sh issues a make command, strips the dll's of unnecessary information which makes them smaller and copies the DLL to the Xbox.
compile.sh issues a make command, strips the dll's of unnecessary information which makes them smaller and copies the DLL to the Xbox.


 
[[Category:Inner Workings]]
[[category:Inner Workings]]
[[Category:To-Do]]
[[Category:To-Do]]

Revision as of 14:46, 7 September 2011

Incomplete.png INCOMPLETE:
This page or section is incomplete. Please add information or correct uncertain data which is marked with a ?

Template:XBMC faq toc Inline

  DVDPlayer is XBMC's video player, capable of playing DVD video and many other video formats. DVDPlayer supports DVD video with menus, from CD/DVD-media, harddrive, network, ISO/IMG-images and RAR/ZIP archives (and even RARed ISO/IMG-images as long as they are in 'stored/archive' mode and not compressed).

Currently Supported Codecs


Known Issues

For every month that goes by, the native DVD-Player in XBMC is becoming more and more usable/stable for the average end-user. However, there is still a lot of work that can be done on it: For one thing there are still quite a few bugs left in it that should be found and fixed, something we really need your help with (see the "Bug Reporting" section below). Another thing is that not all features that you might expect from a normal DVD-player are implemented yet. Some of these features are listed below under "Unimplemented Features" and are not considered to be bugs, that does not mean that features not listed below under can be reported as bugs (something that happens too many times)!


Known Bugs

The official list/tracker of known bugs can be found trac

Note! A bug is only ever a bug if the DVDplayer was designed to do something and that thing does not work, for example; a DVD-movie crashes in the middle, produces garbled output, or you see different navigation-menu behaviour compared to a normal standalone DVD-player, or WinDVD/PowerDVD on a PC, or the original DVD-Player of the Xbox.

Bug Reporting

When reporting bugs or problems there are a few things to keep in mind before posting your bug report(s). Bug-reports should be reported at sourceforge.net, this way we are able to track all bugs on one tracker which makes our lifes a lot easier. However, before posting a bug-report there, make sure it is a valid bug-report and not a feature-request or something that is your own fault (ie. user-error). To do that you can start a new topic thread on the XBMC bug-discussion forum to verify this with others. But most importantly, use the search functions first here and here, to make sure you are not posting duplicate bug reports. Duplicate reports/posts of the same bug makes it much harder for us to keep track of all the bug-reports/posts, not doing so will also save you a lot of work.

When reporting a bug there are a few things we will need, if these things are not provided, it will be much harder (and many times impossible) to replicate the problem and find the bug. In the case of an invalid bug-report the report will be closed without us even looking at it.

Some things that should be in a bug report:

  • A clear description of the problem and what you did (step-by-step) to see it so that we can then replicate it if and when we have the same DVD-disc or a sample (see “Sample” below).
  • A log file (see “Log file” below)
  • The XBMC version you are using (exact build date)
  • Did you build XBMC yourself (from SVN) or...?
  • Audio output mode (analog stereo, passthrough, ...)
  • Video output mode (output resolution, PAL or NTSC...)
  • The amount of free memory! See the “log file” chapter below on how to enable free memory display!
    • Before playing the DVD
    • During the problem
    • After the problem (if XBMC did not crash and just went back to the normal GUI)
  • If it is a non-menu related problem
    • Can you play the .vob file correctly with the DVDPlayer? (select dvdplayer with the 'play with dialog')
    • Can you play the .vob file correctly with MPlayer? (select mplayer with the 'play with dialog')
  • Other information you think that might be relevant

Please have a look at HOW-TO Submit a Proper Bug Report for additional information.


Log File

XBMC is able to create a log file that provides us with a lot of useful information when trying to locate a bug. However, the normal log-file that XBMC creates everytime you run XBMC does not contain much information by default, therefore you must start XBMC in debug-mode so that a maximum amount of information is written to the log file. To start XBMC in debug-mode simply hold X+Y on startup of XBMC, you will know that XBMC is in debug-mode when you see a free memory indicator in the upper left corner of the screen when XBMC is running and if you look in the log-file you will see a lot of “DEBUG” items. The logfile can be found in the directory where XBMC is installed under the name "xbmc.log" or "xbmc_old.log", in general you only need the "xbmc.log" file but if you are running XBMC as dashboard and you have to restart your Xbox (because of a crash/hang) then you probably need to have "xbmc_old.log" instead. Make sure you have the correct logfile by looking at its contents, the information can be read in any text-editor (like Notepad in Micosoft Windows).

Note! Only log-files made in debug-mode are useful to Team-XBMC (developers and technical-support mods)!, see above.

The logfile can be found in the directory where XBMC is installed under the name 'xbmc.log' or 'xbmc_old.log'. In general you need xbmc.log, but if you are running xbmc as dash and you have to restart your xbox (because of a crash) you probably need to have xbmc_old.log. Make sure you have the correct logfile by looking at its contents!.

This log file can be made public in a few ways:

  • You zip it and upload it together with the bug-report to xbmc.org/trac.
  • Post parts of the logfile in the bug report itself on xbmc.org/trac or the XBMC Bug-Discussion Forum.
  • Use pastebin and provide the link in your bug-report.
  • You can post *parts* of the log on the forum as it might help developers pin-point the problem, (please read the log file and post only the parts you think are usefull. The first part is logging every setting which most of the time is not useful).

Sample

While it sometimes can be complicated to provide us with samples, it is usually worth the effort. With samples that show the problem we are able to fix bugs much easier and quicker, because with a sample we can very simply replicate the bug ourselves in our own debug enviroment, and most of the time these bugs can be fixed the same day if there is a developer with some free time available and willing. Without a sample, it will take much longer because we cannot replicate the bug ourselves and we will have to try a lot of things (which can break the current working version again).

Simplest is to just to snail-mail one of the developers a 1:1 copy of the DVD-disc (or the original DVD-disc if the bug has something todo with encryption problems), you can create a such 1:1 copy on your PC using softwares like “DVDDecrypter”. Another possibility is to compress (ZIP/RAR) the sample and send it over the internet, (since most DVDs are a bit to big to send over the internet you can try to strip unneeded data out of it (read the section below about “DVD-menu related problems”). If you have the possibility to either snail-mail the disc (shipping the actual disc) or send a sample over the internet please post so in your bug-repost. Note! Please understand that if you send in a DVD-disc (copy or original) we can not send it back!

For DVD-menu related problems, the next can be done:

strip all non-menu related vob files.
These files take up most of the space. What is needed are the ifo and bup files, together with all menu vobs. If you are lucky the DVD has a few 1GB big vob files (these are probably the main movie and thus not needed) and one or two small vob files. These small vob files are needed. RAR or ZIP those vobs together with the ifo and bug files and provide them to us. Upload them to an upload site or find another way (like posting them on your own website or creating a torrent).

If the problem has something todo with the main movie, the only thing left todo is to take the problematic vob file and to strip it as much as is possible.

In all cases you must first test the sample yourself before you send it to the XBMC developer/team, the sample needs to have the same problem as the original DVD, (since it is not of much use otherwise).

Unimplemented Features

This is a list of some unsupported features which are not yet planned. If you can program in C/C++ then please feel free to develop a new feature/function or improve/enhance the existing code and submit a patch). Developers are always welcomed to ask question or request help/assistance in our forums (and on IRC) when programming for XBMC:

  • External subtitle support when playing DVD's (.SRT/.SUB text-based and. IDX/.SUB bitmap-based subtitles support for DVD-video)
    • including a option to manually browse for external subtitle (to select subtitle with different name and from any HDD/share location)
  • Embedded text-based subtitle support (.SRT/.SUB, etc. embedded in .AVI, .MKV, .MP4, .OGM containers)
    • including a option to manually browse for external subtitle (to select subtitle with different name and from any HDD/share location)
  • Cache/Buffer for unnoticeable layer skip (for dual-layer DVD's, a.k.a. DVD9 for originals, and DVD+R Dual-Layer 8.5GB for backups)
  • Automatic deinterlace for interlaced DVDs on progressive TVs, (possible port deinterlacer from YADIF, DScaler, or y4mscaler?)
  • Post-Processing filters to enhance visual quality and remove artifacts, etc. (port mainly from MPlayer and FFdshow?)
    • SSP (Statistical-Post-Proc.), DeBlocking, DeRinging, Sharpen, Soften, ReQuantization, Auto-Luminance, Blurring/DeNoising
  • 2:3 pull-down / ivtc (inverse telecine) for 24 progressive-frames on 30 FPS TV's (use DScaler or y4mscaler, or GPU pixel shader?)
  • NTSC => PAL, and PAL => NTSC frame-rate (FPS) adjust and reclock filter for NTSC <=> PAL conversion
    • NTSC <=> PAL frame-rate adjust FPS ratios?: 23.97 <=> 25, 24 <=> 25, 30 <=> 25, 25 <=> 30
  • Option to manually set a specific DVD region (so you can always in the future play those disc that can't be fooled by 'region masking')
  • Dual-subtitle-display (display two subtitles/languages at the same time, one at the bottom as normal plus one at the top of the screen)
  • Audio 44.1kHz/88.2kHz/96kHz/192kHz to 48kHz re-sampler (sample rate converter) (like SRC which already been ported to XBMC?)
  • DVD-Video tags/meta reading (collect and display IFO/MPEG/AC3/DTS tags)
  • DVD-Video codec-info reading (collect and display encoding-info like codecs, resolution, aspect, FPS, bitrate, sample-rate, channels)
  • Display current playback-time + total duration, title, chapter, subtitle, angle, aspect-ratio, audio-source, and DVD volume info
    • Plus under "advanced" also display: disc-region, resolution, frames-per-second, bitrate, sample-rate, and codecs/filters in use)
  • Timestamp-based seeking (jump to a given time)
  • Slow-motion, 1/8, 1/4, 1/2 speed (usually linked to the pause button)
  • Frame-by-frame skip (a.k.a. 'frame stepping'), usually a part of the 'slow-motion' function
  • Auto-resume support, if pressing 'pause' before 'stop' then the position is saved, like a hidden bookmark
    • When insert play the same DVD again check DISCID and give option to resume, (like PowerDVD)
  • Closed Captions pass-through (like DVDx2/xboxdash), and software-decoding (from 32 streams) for the deaf and hard-of-hearing
    • FYI, xine has support for SPU decoder for subpictures and Closed Captions software decoding, so does Ogle but not as good)
  • DVDDiscID, DVDUDFVolumeInfo and DVDISOVolumeInfo reading (and displaying) support
  • Use the DVDDiscID/DISCID to cache CSS-keys in libdvdcss (as supported by libdvdcss version 1.2.9 and later)
  • Option to 'bypass' PUO (Prohibited User Operations), (should be disabled by default as on a normal standalone DVD-player)
  • An option to skip FBI/copyright-warnings, ads and 'pre-menu' trailers and jump directly to the main title-menu
    • Plus an additional alternatively option to jump directly to main movie would be very nice as well
  • Parental control, set parental-level: G, Level-2, PG, PG-13, Level-5, R, NC-17, Level-8, Unlimited (default)

Development

See the DVDPlayer core/library topic thread in the XBMC development forum for now.

Help is always wanted, so if you can program C/C++, please feel free to code and submit a patch.


Technical Details

See the DVDPlayer core/library topic thread in the XBMC development forum for now.


Classes

  • InputStreams
    • FactoryInputStream, creates an inputstream based on the filename
    • File, general file access (hd, cdrom, samba)
    • Http
    • Navigator, for accessing dvd
  • Demuxers
    • FactoryDemuxer, creates a demuxer based on inputstream information
    • FFmpeg, ffmpeg demuxer wrapper (supports all ffmpeg demuxers)
    • Shoutcast, for demuxing shoutcast streams
  • Codecs
    • FactoryCodec, creates audio and video codecs based upon demuxer information
    • Audio
      • FFmpeg, ffmpeg audio decoder wrapper
      • Liba52, liba52 wrapper
      • LibDts, libdca wrapper
      • LibFaad, libfaad wrapper
      • LibMad, libmad wrapper (for mp1, mp2, mp3 decoding)
      • LPcm, lpcm decoding
      • Passthrough, for digital passthrough
    • Video
      • LibMpeg2
      • FFmpeg, ffmpeg video decoder wrapper
  • Subtitles


Modules

The player is divided up into a few modules


Main Module

Runs in a separate thread Reads data from one of the input streams and sends it over to one of the other modules listed below Handle dvd events (such as audio / subtitle / video stream changes) Handle events from xbmc (such as audio / subtitle changes)


Audio Module

Runs in a separate thread. Decodes audio data and outputs it to the xbox audio renderer


Video Module

Runs in a separate thread. Decodes raw video data into video frames and outputs them to the xbox video renderer


Subtitle Module

Process subtitles

Building Libraries (Audio / Video Codecs)

The dvdplayer depends on other libraries to function. These libraries are included in SVN by default as dll's under the "XBMC/system/players/dvdplayer" subfolder. The full source code of these libraries can be found under the "/docs/sources/dvdplayer/" subfolder in the SVN. To build these dll's yourself you need to have the following installed, (the .dll's must be then be placed under the "[XBMCFOLDER]/system/players/dvdplayer" subfolder).


All dll's can be build the following way. Startup msys and browse to the extracted sources. make sure you are in the root of these sources (a directory xbox resides in it) and give the follwing commands.

  • xbox/configure.sh
  • xbox/compile.sh


configure.sh configures the library with its needed options. compile.sh issues a make command, strips the dll's of unnecessary information which makes them smaller and copies the DLL to the Xbox.