xboxscene.org forums
OG Xbox Forums => Software Forums => Development => Topic started by: Gamester17 on February 27, 2005, 07:20:00 AM
-
XboxMediaCenter DVD-Video player core/library (Alpha!)
As you may have heard, the initial version of our new DVD-player core code with menu and navigation support has now been put into the public CVS on SourceForge, it's still in an very early alpha stage and thus is not enabled by default, please note and respect that we will not yet accept any bug-reports from non-developers for this core at this stage, (as for now there is still plenty of things still to be worked out and enough bugs left which we know of to keep us busy for a good while), in fact; we do not recommend you even try to use it at this point if you are an end-user, (we will let you know when that time comes). The only reason we moved it to public CVS now is that we feel it's time to get more developers involved in this sub-project, we hope that with your assistance the development may progress and mature more quickly. So please, get stuck in there and give it a go, please submit patches the usual way.
Some info on this new DVD-player core:
The core is DirectX API and framework dependent, it's currently based on libmpeg2, liba52 and libavcodec (FFmpeg) for audio and video-decoding plus libavformat (FFmpeg) for file demuxing. CSS-decryption is done with libdvdcss and the menu/navigation is handled by a ported version of libDVDnav, (libDVDnav is available as a stand-alone library at dvd.sourceforge.net which is what we used, however keep in mind that it is also available as integrated into XINE which is libDVDnav's reference player). (If you've been following the XBMC/XBMP project from the beginning you might remember that Grompf back in the summer of 2003 already partially ported libDVDnav from XINE to XBMP, however Grompf never finished libDVDnav for XBMP because it was too hard to hook it up to the MPlayer code in XBMP, which is partially why we now created a new core from scatch for MPEG-playback in XBMC). The only other open source projects we know of that have native DVD-menu/navigation support are XINE, VLC (VideoLan Client) TCVP and Ogle so it might be a good idea to look at those for reference if you get stuck or need ideas. Another good idea might be to also look at libmpeg2 derivatives (like the ones in MPlayer, XINE and VCL) as other projects which use libmpeg2 may have improved it but not actively feed the improvements back to the original libmpeg2 project.
Overview of what this core currently features:
- Video output (Working, but needs work and AR is not always correct)
- Audio output (Working, but needs work, currently only analog stereo output is supported)
- Selectable subtitles without the need for a restart (Working)
- Selectable audio streams without the need for a restart (Working)
- Synchronised Video / Audio Playback (Working)
- Menu Overlay's (Working, but needs work)
- DVD menu's (Buggy)
- DVD playback from HD and Samba shares (Working, but needs work)
And since the core has the option to use FFmpeg for audio / video decoding, it will play most files that FFmpeg supports too.
Can we please pleade with you and ask, are there any of you devs interesting in helping with coding for this new core?!, will here bellow list a few existing suggestions in the hope that more developers will help enhance existing features and add additional new ones. This new core is meant to become a highly optimized for MPEG playback in XBMC, (and it's foremost aimed at DVD-Video playback), the reason for starting a new dedicated core in the first place are; it will be small (thus customizable) and resource-efficient (thus fast). Here bellow are a few thing of what we hope you could help to achieve (in theory), however we don't expect any miracles or for any of these for happen over night ...realisticly maybe most of the major features will be in before the end of this year (then again maybe not but my fingers are crossed).
Some 'ideas' for the audio/video playback part (a few things of this is already in the initial CVS code):
- Software A/V sync clock (soft PLL SCR system clock like MPlayer, so work with all CPU's)(not like DVDx2.0/xboxdash),
(a software PTS/DTS audio/video sync clock is important as so sync will work on DreamX-1400 too).
- Optimize core code and compiling for SEE (or MMX/MMX2?) iDCT/DCT (Xbox Pentium III CPU) and DirectX.
- 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)
- Error resilience/tolerance or correction (skip/drop/mark bad sectors and corrupt frames without stopping playback)
(MPlayer is a good example of a player which has this as it's "rock solid playing damaged MPEG files")
- YV12->RGB conversion in hardware (such as Butcher/JMarshall has for the MPlayer-core in XBMC).
- Implement 1/2 pel ("Half-Pixel") and/or 1/4 pel ("Quarter Pixel") motion compensation (again via the GPU).
- If possible implement hardware motion-compensation and/or AlphaBlending via the nVIDIA GPU.
(Noted should be that the Xbox and the XDK do not have native support for DxVA nor XvMC).
- If possible(?) implement GPU assisted video decoding of MPEG-2 (link) via nVIDIA's "HDVP" feature (link).
- If possible code a wrapper that process some floating-point cycles in the GPU (I know that is a pipedream, I put on this list just in case).
- Implement option for interlaced output without conversion (pass-through interlaced video to TV) (link).
- A NTSC => PAL FPS and PAL => NTSC FPS frame-rate adjust and reclock filter for NTSC <=> PAL playback, (link to tip!).
(NTSC <=> PAL frame-rate adjust FPS ratios?: 23.97 => 25, 24 => 25, 30 => 25, 25 => 30)
- 2:3 pulldown or telecine process or deinterlacing for 24 progressive frames on 29.97 and 30 FPS TV's
- Also implement a proper software deinterlace filter (for playback of PAL interlaced DVD's on progessive TV's).
- Chroma upsampling bug-fix filter (for playback on progressive HDTV's).
- Implement ZOOM, 'Pan and Scan', Cropping and auto-widescreen filters.
- Implement configurable flicker filters for video playback with this core.
- Optional several Post-Processing filters for sharpen/soften, remove artifact, etc. (port from FFdshow? and/or MPlayer?)
- Implement AC3 and DTS SPDIF-out pass-through, plus AC3 and DTS software decoding to analog-out.
- Implement DTS software-decoding and re-encoding into AC3 in hardware for SPDIF-out.
- Implement DPL II (Dolby Pro Logic 2) encoding/upmixing in software to SPDIF-out.
- Implement a dymamic-recompression software filter for on-the-fly dymamic-range-compression for analog-out.
- Implement a dymamic-recompression software filter for on-the-fly dymamic-range-compression + AC3-encode for SPDIF-out.
- Implement a audio-normalization software-filter for on-the-fly normilization for analog-out.
The codec/container functions it should hopefully support some day (with your help):
Video:
- MPEG-1
- MPEG-2
- MPEG-PS (DVD-Video, like VOB)
- MPEG-TS (Transport Stream)
Audio (both pass-through and decode to analog options):
- MPEG audio layer 1 (including option to upsample mono/stereo to surround)
- MPEG audio layer 2 (including option to upsample mono/stereo to surround)
- PCM (including option to upsample mono/stereo to surround)
- LPCM (DVD-Audio) (including option to upsample mono/stereo to surround)
- AC3 2.0 (including option to upsample mono/stereo to surround)
- AC3 5.1 (including option to upsample downsample surround to stereo for analog-out)
- DTS (including option to upsample downsample surround to stereo for analog-out)
- Audio 44.1kHz to 48kHz re-sampler (sample rate coverter) (Code from "SRC"?)
Demuxer/Spliter (container):
- VOB (DVD-Video)
- IFO (parsing)
- DAT/BIN (VCD)
- CD/DVD-image parsing (via libCDIO)
Some 'ideas' for other basic/standard video playback functions (a few things of this is already in the initial CVS code):
- Play/Pause
- Rewind and Fast-Forward (x2-x32?) (link to potential source code)
- Skip +/- (5 minutes at a time?, I don't like % skip) (only when DVD-chapter is not available)
- Timestamp-based seeking
- Slow-motion, 1/8, 1/4, 1/2 speed (usually linked to the pause button) (link to potential source code)
- Frame-by-frame skip (a.k.a. frame stepping) (usually a part of the slow-motion function)
Some 'ideas' for the DVD-Video specific features (a few things of this is already in the initial CVS code):
- IFO-Parsing
- DVD-chapter support
- Stills (ex. from special features)
- Selectable colors for VobSub display support.
- Closed Captions pass-through (like DVDx2/xboxdash) and software-decoding for the hearing impaired.
- Decode and/or decrypt CSS decryption protection (via libdvdcss)
- Option to skip FBI warnings, ads and trailers on rentals
(or at least be able for fast-forward through them all)
Developers; specs, docs, source code, and other resources for DVD-playback:
- mpucoder.com, very updated and precise DVD information (specs and how-to).
- dvd.sourceforge.net, the home of libDVDnav and DVD info.
- Technical Notes On DVD-Video (by Billy Biggs).
- dvd-replica.com, site with a lot of DVD technical information.
- XINE, libDVDnav reference player (more up-to-date?)
- MPlayer, keep in mind that MPlayer has libmpdvdkit & libmpdvdkit2 (for reference).
- VLC/VideoLAN-Client, also supports DVD menus (via plugin).
- Ogle, a open-source (GPL) DVD player with menu support.
- TCVP, audio and video player with experimental DVD menu support.
- DVDPreview/VobBlanker, open source (C/C++) DVD VOB tools.
Projects we know of that contains libmpeg2 derivatives (but no one looked at yet):
- MPlayer.
- VeMP (VIA enhanced MPlayer), (also contain VIA hardware-specific MPEG-2 decoding acceleration).
- XINE, (two variations; "xine-lib/src/libmpeg2/" and "xine-lib/src/libmpeg2new/").
- VeXP (VIA enhanced Xine Player), (also contain VIA hardware-specific MPEG-2 decoding acceleration).
- FFmpeg (libavcodec/libavformat), (yes FFmpeg do contain MPEG1/MPEG2 code derivitive from libmpeg2).
- MPC (Media Player Classic).
- VLC (VideoLan-Client).
- TCVP, (also has experimental DVD menu support).
- DScaler Deinterlacer/Scaler(deinterlace)
Information on most other XBMC/Xbox development resources that could be of help for this project can be found over here.
We would appreciate if you try to document (with doxygen tags/comments) all patches that you submit for this core, (thanks in advance).
PS! @Non-developers; please do not clog up this developer discussion with feature or functions suggestions/requests, instead keep posting them over here.
And again, please respect that we will not accept any bug-reports at this stage, only developers may discuss coding issues and how to solve them so far, TIA
-
@Programmers: now that the dvdplayer-core has been made public the XBMC project needs more C/C++ programmers to actively assist with bug-fixing and the development of this new dvdplayer core, there are many ways in which you can help. For starters we advise you to make sure that you can compile XBMC GUI and the dvdplayer-core separately by yourself, once you done that you probably want to setup a debug environment on your Xbox with a debug-BIOS and XDK-launcher. Once you can compile XBMC and the dvdplayer then we suggest that you start by simply playing all the DVD-Video movies you and your friends own via the dvdplayer-core (testing all menu and playback functions), if and when you discover a bug/glitch then you try to fix it and submit a patch for it, if you can't fix it yourself then please submit a bug-report (with detailed problem/symptom description). Alternatively you go right ahead and either code GUI/playback optimizations or additional features/functions for the dvdplayer, ...there are many wanted features, some big and others small or semi-small that would probably even be good for C/C++ beginners and hobby programmers to get started on. Technical information on the new dvdplayer core can be found here, (please respect that that topic thread is for developers only), more recommended reading can be found here, here, and here.