GithubHelp home page GithubHelp logo

cnsuhao / libbdplus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shiftmediaproject/libbdplus

0.0 0.0 0.0 185 KB

Unofficial LibBDPlus with added custom native Visual Studio project build tools. LibBDPlus: libbdplus is a research project to implement the BD+ System Specifications. This research project provides, through an open-source library, a way to understand how the BD+ works.

Home Page: http://www.videolan.org/developers/libbdplus.html

License: GNU Lesser General Public License v2.1

Makefile 0.72% C 90.09% Batchfile 1.79% Shell 0.01% M4 4.94% C++ 2.06% Objective-C 0.40%

libbdplus's Introduction

Disclaimer
----------

This library is written for the purpose of playing Blu-ray movies. It is
intended for software that want to support Blu-ray playback (such as VLC and
MPlayer). We, the authors of this library, do not condone nor endorse piracy.

This library is simply a tool for playback of Blu-ray movies. Like any tool, the
use of this tool can also be abused. There are already numerous laws in
different countries and juridictions all over the world that protect copyrighted
material, such as Blu-ray movies. With that said, it would have been
inappropriate for us to distribute this library with terms such as "you cannot
use this library for piracy". Instead, we present to everyone this disclaimer.

As a reminder, here is also the disclaimer found at the beginning of any movie
in relation to copyrights.

ATTENTION

International agreement and national laws protect copyrighted motion pictures,
videotapes, and sound recordings.

UNAUTHORIZED REPRODUCTION, EXHIBITION OR DISTRIBUTION OF COPYRIGHTED MOTION
PICTURES CAN RESULT IN SEVERE CRIMINAL AND CIVIL PENALTIES UNDER THE LAWS OF
YOUR COUNTRY.

The International Criminal Police Organization - INTERPOL, has expressed its
concern about motion picture and sound recording piracy to all of its member
national police forces. (Resolution adopted at INTERPOL General Assembly,
Stockholm, Sweden, September 8, 1977.)


Welcome to the BD+ library.
---------------------------

This library is not complete, in that it will never be complete and
will always require updates to stay up to date with the latest Bluray
disks released.

The general flow on this library is that the higher level 'player'
code will call us if there exist a "BDSVM/00000.svm" file on the disk. If
this is the case it will call bdplus_init(), connect the library with
other parts of BluRay player and call bdplus_start().

BD+ VM executes the DLX assembled code inside the SVM file.
This will perform thousands of AES, SHA, file reads and detailed
memory checks to guess the authenticity of the player.

If all goes well, the SVM will eventually spit out a 'conversion
table'. This is a large table (usually about 1-2MB but it varies) which
contains offsets into the M2TS video file. (usually the main title).

The video file has been purposely corrupted at random places. These
offsets, and 12 bytes of data for each one, is used to repair the
video file.

However, the conversion table is also 'encoded' (XOR). So the VM is
further executed to ask for the decode-keys for each part (segment) of
the conversion table.

============================================

the BD+ library will need various keys to perform its task. More
precisely, it needs:

6 AES Player keys (each 16 bytes)

There are also 5 dumps of the Player Discovery replies.

There is player memory dumps that needs to be simulated. Including
player name, version and executable map.

Configuration directory (vm0) is searched from following places:

  Linux (xdg specification):
    /etc/xdg/bdplus/
    $HOME/.config/bdplus/

  Windows:
    %APPDATA%/bdplus/

  Mac OS:
    ~/Library/Preferences/bdplus/

Configuration data is not included with libbdplus.

============================================

The BD+ design also uses 'slots', that is like a save-file stored on
NVRam/USB-Stick or similar permanent storage. The slot layout is 500
slots of 256 bytes each.  The SVM can request a new/free slot to
write, or look for one previously written. In here it can store
information for future play attempts.

Slots are stored in the following file:

  Linux (xdg specification):
    $HOME/.cache/bdplus/slots.bin

  Windows:
    %APPDATA%/bdplus/slots.bin

  Mac OS:
    ~/Library/Caches/bdplus/


============================================

The SVM also communicates with BluRay player BDJ and HDMV subsystems,
using the PSR102, PSR103 and PSR104 registers. To set up callback
functions for communication, BluRay player calls bdplus_set_psr().

============================================

What if things go wrong? And they will! Each new disk brought out will
potentially expose new issues with libbdplus. There are things that
can be done to help fix libbdplus.

You can set environment variables:

 DBG_BDPLUS : General BDPlus debugging, traps etc.

where you can watch the SVM perform its various tasks. It is quite
hard to know where it goes wrong, unless you have something to compare
against though. I don't know if we can record traps and breaks anymore...

 DBG_DLX: In-depth DLX assembly instruction debugging.

This is very verbose and shows the DLX instructions executing. It
would be unlikely to be bugs in the DLX opcodes, but you never
know. Included for amusements sake.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.