Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 | Link |
Registered User
Join Date: Dec 2013
Posts: 531
|
BlurayTestAndDecrypt - tool to test bluray files and remove AACS
Created another small tool mainly for my personal needs, but enhanced it a little bit because of @Hironimo s question for a tool to decrypt m2ts files.
In short:
I've >1000 DVDs in my collection and also >100 Blurays but simply no space in the living rooms - so I decided to rip them all to harddisk and store the discs in the basement. Unfortunately not all rips are 100% correct - I noticed problems during the playback for a few of them and so I started this tool to verify if the iso created from a bluray has errors or not. This is now 'Mode 1' in the tool. When I copied the decrypt-procedures from FindVUK into this tool I created the other 3 modes. # Mode 1 - Simple Test Each m2ts file on a bluray can be sliced into units of 6144 bytes length and the first 16 bytes of each unit are always unprotected and can be used to check 2 details. In case the 'copy permission indicator' is set to 'unit encrypted': is the mpg-ts-synchronisation-byte of the first mpg-block correct? (this is byte 5 of each unit and has to be 0x47) And in case it is not protected: check if all synchronisation-bytes are set correctly (unit is further sliced into mpg-transport-packets of 192bytes length) and the synchronisation byte for each packet is verified. This mode is the fastest test mode and does not require a VUK for the bluray! (but it cannot detect all defective units in encrypted files) >> this test takes ~3 Min for an encrypted bluray iso read from my internal SSD (it detects 491 error-units in my damaged test-iso file) # Mode 2 - Test incl. decryption of each encrypted unit performs the same tests as before and additionally checks if each encrypted unit can be correctly decrypted with VUK (read from keydb.cfg) (>> all synchronisation bytes are set correctly after decryption) This mode requires a VUK in the local keydb.cfg file for the disc! >> this test takes ~7 Min for an encrypted bluray iso read from my internal SSD (it detects 514 error-units in my damaged test-iso file) # Mode 3 - Decrypt but stop on error Basically the same as Mode 2 - but this time all decrypted units are written to disc but it stops in case a defective unit is encountered. # Mode 4 - Decrypt but continue on error Identical to Mode 3 with the small difference that it continues in case of an error (but only successfully decoded units are written to the destination file) # Mode 5 - ISO2ISO or ISO-Inplace Decrypt (decrypts AACS and repairs BD+) New mode introduced with 0.41 (ISO-Inplace since 0.61) - complete disc structure remains unchanged! # Mode 6 - List UnitKeys New mode introduced with 0.48 - the correct unit keys for all files are listed (nothing get's decrypted - just an info mode) # Mode 7 - Dump disc and test final iso file for errors New mode introduced with 0.62 To use it simply drag one of the supported items on the exe-File:
A few settings can be set in an ini-file, the most important ones are:
And now a few words about the BD+ repair feature: Basically BD+ introduces damages to the video files and usually all the BD+ fuzz is to get hands on the fixup-table to repair those damages. libbdplus stopped working a long time ago - so at the moment there's no 'open source' way to get hands on fixup tables - but there are commercial applications that help us in this case ![]() Pavtube BdMagic is the tool of my choice (honestly I haven't found it myself - got a hint from another member here in the forum - so kudos to him! ) - if you need a table for a disc just start the tool, open the disc and it downloads the table for this and stores it in your userfolder. BTD now scans all available tables and in case it finds one that matches the current disc if converts it into the 'open source' convtab format and stores the converted table in the directory userfolder\appdata\roaming\bdplus\convtab You can view those tables with 'ConvTableView' if you're interested. In case you don't need the Pavtube application for something else, you can set the ini value 'DeletePavtubeTableAfterConversion' to 1 so the source table is always deleted after the conversion to the convtab format. But be aware that Pavtube is sometimes wrong - I've one disc in my collection were it downloads a fixup table that does not belong to the disc... so usually it's working fine, but sometimes it fails. Finally the video files are correctly playable - but it's possible that the BD-J menu is not working. Usually the BD+ VM and the BD-J menu interact with each other - and in case the BD+ VM isn't running at all, the menu doesn't load at all (e.g. on the disc 'Hitman' I get a message that my player needs a firmware update - but the original disc plays without problems and in case I'll remove all protections with the fox it's also working as expected - but in this the JAR files of the menu are completely different in comparison to the original files, so this is nothing that can be done easily and will never be part of BTD ![]() History of the tool: 20160820 .. 0.18 First public release 20160821 .. 0.20
20161030 .. 0.41
20161110 .. 0.42
20161111 .. 0.43
20161111 .. 0.47
20170121 .. 0.48
20170203 .. 0.51
20170228 .. 0.53
20170302 .. 0.54
20180130 .. 0.61
20180319 .. BTAD 0.62
20180321 .. BTAD 0.63
20180324 .. BTAD 0.64
20181015 .. BTAD 0.70
20191212 .. BTAD 0.77
20200420 .. Download BTAD 0.79
20210810 .. Download BTAD 0.80
20210810 .. Download BTAD 0.81
20230425 .. Download BTAD 0.94
Last edited by nalor; 25th April 2023 at 11:59. Reason: Release 0.81 |
![]() |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Jun 2005
Posts: 261
|
It is somewhat confusing that you need to delete the ini to select a different mode. You could print this info in the window maybe. Also first I thought you could drag files into the window, but you need to close and drag onto the exe. Btw, check PM
|
![]() |
![]() |
![]() |
#3 | Link |
Registered User
Join Date: Dec 2013
Posts: 531
|
Hi - I know the version available here has a few bugs that I noticed while testing my own images... so it's still not perfect.
At the moment I'm trying to parse the ISO files with UDF filesystem directly to create 1:1 copies of isos with only AACS getting removed. The easiest way to choose between different modes without deleting the ini files every time is by creating multiple copies of the exe with different filenames - usually the name of the ini follows the name of the exe, so although it might not be the best solution it should do the trick. |
![]() |
![]() |
![]() |
#4 | Link |
Registered User
Join Date: Jun 2005
Posts: 261
|
Btw, have you tried comparing decrypted files from your tool with DVDFab decrypted ones? I sometimes get many differences compared to DVDFab (which are not BD+ related 5-bytes errors). Your images seem to be the same as DumpHD though
|
![]() |
![]() |
![]() |
#5 | Link | |
Registered User
Join Date: Jan 2010
Posts: 74
|
Quote:
|
|
![]() |
![]() |
![]() |
#6 | Link | |
Registered User
Join Date: Dec 2013
Posts: 531
|
Quote:
So honestly there's not much that can go wrong... (but I've already noticed in the past that dvdfab isn't really verifying if the created files are really correct. e.g. in case the source cannot be read properly it simply writes wrongly decrypted blocks into the destination file... ) |
|
![]() |
![]() |
![]() |
#7 | Link | |
Registered User
Join Date: Jun 2005
Posts: 261
|
Quote:
I used TSPE - Transport Stream Packet Editor / Analyser (anyone have the old freeware version of this tool?) to scan the rips of a BD+ disc and VLC to play them: - BlurayTest&Decrypt (remove AACS): TSPE = OK, VLC = corruption since BD+ is not removed - DumpHD (remove AACS & BD+): TSPE = PMT continuity & CRC errors, VLC = OK - DVDFab (remove AACS & BD+): TSPE = OK, VLC = OK So I'm thinking it's either: - DumpHD contains bugs writing the M2TS - applying BD+ patches fixes errors on video PES level but introduces errors on M2TS packet level which must be fixed. After demuxing, the elementary video and audio streams are identical between DumpHD and DVDFab so it seems DVDFab is doing this - BD+v3 conversion table produced by DumpHD and DVDFab ![]() Update: tested some other discs and they all have errors according to TSPE so can't draw any real conclusions. DVFab seems to alter the streams for an unknown reason after decrypting, which is quite annoying Last edited by candela; 22nd September 2016 at 09:04. |
|
![]() |
![]() |
![]() |
#8 | Link |
Registered User
Join Date: Jun 2005
Posts: 261
|
There are some problems with relative paths on command line
1) works: - BlurayTestAndDecrypt.exe F:\BDMV\STREAM\00001.m2ts 2) doesn't work: - cd F:\BDMV\STREAM - C: - BlurayTestAndDecrypt.exe F:00001.m2ts 3) doesn't work: - F: - cd F:\BDMV\STREAM - BlurayTestAndDecrypt.exe 00001.m2ts (scenarios from memory, may not be 100% accurate ![]() |
![]() |
![]() |
![]() |
#9 | Link | |
Registered User
Join Date: Dec 2013
Posts: 531
|
Quote:
|
|
![]() |
![]() |
![]() |
#10 | Link |
Registered User
Join Date: Dec 2013
Posts: 531
|
Just released BTD 0.41
2 major new features: # integrated UDF support - this allows to directly read from iso files without the need for a virtual drive in between and also direct ISO2ISO decrypting # BD+ repair support - with the help of fixup tables that can be downloaded with Pavtube BdMagic it's possible to repair the BD+ damages (you're not limited to Pavtube - but for me it's the most convenient way...) Hopefully it's working well ![]() |
![]() |
![]() |
![]() |
#11 | Link |
Registered User
Join Date: Jun 2005
Posts: 261
|
I found several errors while attempting to decrypt single files:
1) DecryptDestination = D:\BDMV\ 01:19:25 - Detected File >F:\BDMV\STREAM\00801.m2ts< 01:19:31 - Decrypt OutputDir: D:\BDMV\C981D0350CD9AD659EC4832E59D94B56963F0229_THE_BOOK_OF_LIFE\ 01:21:57 - MODULE.BDPLUS [E] ERROR! Sourcefile invalid >D:\BDMV\C981D0350CD9AD659EC4832E59D94B56963F0229_THE_BOOK_OF_LIFE\00801.m2ts< => error because file is actually saved as D:\BDMV\00801.m2ts 2) DecryptDestination = D:\BDMV 2016-11-10 00:35:32 # 12678897 # MODULE.BDPLUS [E] ERROR! Sourcefile invalid >D:\BDMV\C981D0350CD9AD659EC4832E59D94B56963F0229_THE_BOOK_OF_LIFE\00801.m2ts< => error because file is actually saved as D:\BDMV00801.m2ts (file & dir combined) 3) update: actually it also happens if I try to decrypt F:, it saves the files in a wrong dir Last edited by candela; 10th November 2016 at 01:44. |
![]() |
![]() |
![]() |
#13 | Link | |
Registered User
Join Date: Dec 2013
Posts: 531
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#14 | Link | |
Registered User
Join Date: Jun 2005
Posts: 261
|
Now it works if I drag a single file but when I drag the drive F: it gives
Quote:
|
|
![]() |
![]() |
![]() |
#17 | Link |
Registered User
Join Date: Jan 2002
Posts: 267
|
Ah, this is a tool I've been looking for, but there's one feature that would be awesome.
Imagine I have a bluray that is damaged (scratched), I can ddrescue as much of it as I can (i.e. copies it sector by sector and keeps a map of what it couldn't read), I can then ddrescue a different disc (even if also damaged) to fill in the missing sectors. I can generate an encrypted iso this way. Now, since I have the disk, your tool should be able to generate the appropriate decryption keys via the drive but use them to decrypt the complete iso. Would help for discs whose VUK isn't in the keydb. |
![]() |
![]() |
![]() |
#19 | Link | |
Registered User
Join Date: Dec 2013
Posts: 531
|
Quote:
And to get the VUK you can already use FindVUK - although it's limited to Windows because it relies on the tools from DVDfab it's also possible to get the VUK for scratched discs and iso files on harddrive. So finally I think you can get the VUK with FindVUK and afterwards decrypt your rescued iso with BTAD. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|