VideoLAN Logo Google Summer of Code Logo

GSoC 2025 Final Report

VideoLAN – DVD-Audio Deciphering Module in VLC

Author: Saifelden Mohamed Ismail

saifeldenmi@gmail.com

General Information
Organization
Project
DVD-Audio Deciphering Module in VLC
Mentors
Jean-Baptiste Kempf, Steve Lhomme
Proposal Link
Abstract

This project's initial aim was to add CPPM decryption support into VLC. However, more was required to support the DVD-Audio format, so the initial aims were expanded upon. The final deliverables were updates to libdvdread to support the DVD-Audio format, libdvdcss for the decryption support, as well as a submodule for simple playback in VLC. All of this is well commented for documentation.

Project Goals
  • Provide a public API to read CPPM encrypted DVD-Audio blocks in libdvdcss
  • Provide a public API to change libdvdread's behavior to read DVD-Audio discs
  • Provide a way for the user to play encrypted DVD-Audio discs directly in VLC
Work Completed and Results

VLC now supports simple audio title-based playback on encrypted DVD-Audio discs without the need to extract the audio data. This makes VLC one of the only ways to play this type of disc as-is. Both libdvdread and libdvdcss have been extended to support DVD-Audio features (IFO files, decryption, path structures, etc.) in an OS-agnostic way.

Tested Discs
Deep Purple - Machine Head Album Cover
Encrypted
Deep Purple – Machine Head
DVD-Audio disc with CPPM protection
Brain Salad Surgery Album Cover
Unencrypted
Brain Salad Surgery
DVD-Audio disc without encryption
Fleetwood Mac - Say You Will Album Cover
Encrypted
Fleetwood Mac – Say You Will
DVD-Audio disc with CPPM protection
Eagles - Hotel California Album Cover
Encrypted
Eagles – Hotel California
DVD-Audio disc with CPPM protection
Live Demonstration
Fleetwood Mac – Say You Will
DVD-Audio disc playback in VLC media player
DVD-Audio Playback Demo
Encrypted disc successfully decrypted and played
Project Impact

This work builds the foundation for full DVD-Audio disc capabilities, making it by far the most thoroughly implemented DVD-Audio code so far. While many DVD-Audio discs are also DVD-Video, not all are, and DVD-Audio contains far higher audio quality as well as features built specifically for music albums that don't exist in DVD-Video, such as song lyrics that will now be easier to implement in the future. Due to how uncommon these discs are, they are considered collectors' items and require special DVD players to use fully. Making the software to play these discs more widely available will help preserve this media long term, which aligns with VLC's goals.

Merge Requests
libdvdread (version 6.1.3 to 7.0.0)
Initial DVD-Audio additions
+1205 / -133 lines
View
Follow-up adjustments/fixes
+20 / -7 lines
View
Follow-up adjustments/fixes
+95 / -73 lines
View
Follow-up adjustments/fixes
+199 / −81 lines
View
libdvdcss (version 1.4.3 to 1.5)
Initial CPPM support integration
+1492 / -9 lines
View
Follow-up adjustments/fixes
-2 lines
View
VLC (version 4.0.0)
DVD-Audio Disc (Qt Menu & Submodule)
+512 / −126 lines
View
Follow-up adjustments/fixes
+8 / −2 lines
View
Issues Resolved
libdvdread
Add sanity checks on DVD-Audio tables
Issue #22
View
VLC
dvda titles don't show the duration in the menu
Issue #29266
View
dvda mode doesn't seem to handle chapters
Issue #29265
View
Project Timeline
Phase 1: Research and Discovery (early weeks)

This took up a significant portion of this project. Familiarizing myself with the specifications for both CPPM and DVD-Audio discs as well as understanding the already existing libdvdread and libdvdcss code was not only quite challenging but I would say it was probably the main hurdle I needed to cross before this project could materialize. I would say this phase was around a month or more.

Core Implementation (mid-project)

Once I had built an understanding of everything, the changes I needed to make became very clear. After I had made the modifications to both libraries, fixing up and understanding how to create a VLC module that fit into the current DVD module took a substantial amount of time as well. This phase was a little less than a month.

Integration and refinement (later weeks)

It was in this phase that I was able to get my first encrypted disc to play, and I started to make merge requests for my changes in the DVD libraries. I would say this was the phase with the most work, considering that code refactoring was a very labor-intensive process, though it was very rewarding seeing my work become ready to be a part of the VLC codebase. This phase lasted less than a month, though I had to do more work than I usually had to.

Testing and Validation (later weeks)

It was in these weeks that I was cleaning up and validating the changes I had made to my libraries. libdvdread required a lot of changes and adjustments to ensure that its use was seamless and logical, with regards to DVD-Audio behavior. It was around this phase that I also began drafting my final report and notes that I had in my own little documentation page (link available in the header). This was when my changes to VLC had also been thoroughly reviewed and deemed acceptable.

Challenges
Documentation Issues

This topic is heavily undocumented, and the available resources are often poorly explained or contain errors. Much of the effort was spent manually analyzing the format to replicate the desired behaviors.

Material Acquisition

There was initial trouble acquiring material to work on, though discs were generously provided by the foundation.

Library Documentation

The DVD libraries are not as well documented as other pieces of software in VLC, causing initial friction in understanding how to extend them without breaking the API.

Code Standards

Reorganizing commits to fit VLC code standards was very time-consuming, though the remainder of the project ran more smoothly after the initial research phase.

MLP Demuxer Issues

The VLC demuxer had some issues working with MLP DVD-Audio streams that were difficult to resolve; this issue was dealt with by my mentor, Steve Lhomme, in a separate merge request.

Learning and Skills Development
  • Reading/Extending Large Codebases

    Since I had never worked on a project of this size before, let alone a project that wasn't my own, this was a novel experience for me. I can now say for sure that after some initial friction, I've become much quicker at reading code and understanding how large codebases work.

  • More Advanced Git Skills

    I, of course, was already familiar with Git, using it to coordinate with teammates on code projects before this. Though I had never used many of its more advanced features like rebase, reflog, and I had never really had to organize and keep my commits easily workable. I've also become very familiar with working on merge requests, issues, etc.

  • Code Practices/ Getting Accustomed to the Review Process

    In group projects before GSoC, I had never been put under a formal code review process or made to reform code/commits to adhere to a project's code practices. Because I am now more familiar with this process, I would say contributing to open source has become far less intimidating. It is likely that I will contribute to projects in the future because of this.

  • Writing Environment-Agnostic Code

    Before I started this project, I had no idea how code was written to run on multiple platforms or with multiple versions of dependencies. Now, I can say I’ve gained valuable experience using version-guard and feature test macros.

Acknowledgements

I would like to thank both of my mentors, Jean-Baptiste Kempf and Steve Lhomme, for their patience and time. I would also like to thank the foundation for providing me with difficult-to-access material for my work. This wouldn't have been possible without their guidance and support.