Possible to create a decrypted backup from an encrypted ISO?

Discussion of advanced MakeMKV functionality, expert mode, conversion profiles
kja70
Posts: 17
Joined: Mon Jun 15, 2020 7:40 pm

Possible to create a decrypted backup from an encrypted ISO?

Post by kja70 »

I often create ISO files from old/scratched media using ddrescue. I understand the workflow to generate an MKV of a title from the ISO file, but have not been able to find a way to obtain the same functionality as "makemkvcon backup --decrypt" with an ISO file as the source, rather than a physical drive (i.e. where the output is the original filesystem, rather than a single MKV file). Am I missing something? If not, is there any reason why MakeMKV can't support this functionality?
Woodstock
Posts: 10312
Joined: Sun Jul 24, 2011 11:21 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by Woodstock »

You need to provide information that MakeMKV usually gets from asking the drive for. Search for "discatt" here on the forum for how to obtain it (assuming you have the original disk).
kja70
Posts: 17
Joined: Mon Jun 15, 2020 7:40 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by kja70 »

Woodstock wrote:
Mon Jun 15, 2020 8:30 pm
You need to provide information that MakeMKV usually gets from asking the drive for. Search for "discatt" here on the forum for how to obtain it (assuming you have the original disk).
Right, I do have the relevant discatt.dat file. But how do I tell makemkvcon (or makemkv) to make a decrypted backup of an ISO file source, rather than an MKV? "makemkvcon backup" doesn't appear to be willing to accept an ISO file as a target. If I open the discatt.dat file in makemkv, I only see the option to make an MKV output file, not a decrypted backup of the original.
kja70
Posts: 17
Joined: Mon Jun 15, 2020 7:40 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by kja70 »

This appears to be something slightly different -- if I make a decrypted backup of a physical disc, I can use other tools like VLC, ffmpeg, etc, directly on the m2ts files that have been thus decrypted. The instructions instructions at that link copy the discatt.dat file into the otherwise encrypted filesystem, which allows MakeMKV to create an MKV from the filesystem, but the files cannot be manipulated with any other tools expecting regular video content. Is there any way to create a backup decrypted filesystem from an ISO that is exactly the same as what you would get if you created a backup decrypted filesystem from a physical disc?
MartyMcNuts
Posts: 2849
Joined: Wed Nov 22, 2017 11:45 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by MartyMcNuts »

kja70 wrote:
Mon Jun 15, 2020 8:43 pm
Woodstock wrote:
Mon Jun 15, 2020 8:30 pm
You need to provide information that MakeMKV usually gets from asking the drive for. Search for "discatt" here on the forum for how to obtain it (assuming you have the original disk).
Right, I do have the relevant discatt.dat file. But how do I tell makemkvcon (or makemkv) to make a decrypted backup of an ISO file source, rather than an MKV? "makemkvcon backup" doesn't appear to be willing to accept an ISO file as a target. If I open the discatt.dat file in makemkv, I only see the option to make an MKV output file, not a decrypted backup of the original.
Have you tried mounting the ISO? I don't know if it would work or not but the discatt.dat file would also need to be in the root of the ISO. I might create an ISO and try this myself.
Cheers :D
----------------------------------------------------------------------------------------------------------------------------
For UHD enabled drives (AU/NZ/SG + Others) & DIY Single Drive Flasher (WW): https://uhdenableddrives.com
kja70
Posts: 17
Joined: Mon Jun 15, 2020 7:40 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by kja70 »

MartyMcNuts wrote:
Tue Jun 16, 2020 4:21 am
kja70 wrote:
Mon Jun 15, 2020 8:43 pm
Woodstock wrote:
Mon Jun 15, 2020 8:30 pm
You need to provide information that MakeMKV usually gets from asking the drive for. Search for "discatt" here on the forum for how to obtain it (assuming you have the original disk).
Right, I do have the relevant discatt.dat file. But how do I tell makemkvcon (or makemkv) to make a decrypted backup of an ISO file source, rather than an MKV? "makemkvcon backup" doesn't appear to be willing to accept an ISO file as a target. If I open the discatt.dat file in makemkv, I only see the option to make an MKV output file, not a decrypted backup of the original.
Have you tried mounting the ISO? I don't know if it would work or not but the discatt.dat file would also need to be in the root of the ISO. I might create an ISO and try this myself.
Yes. Even creating a new ISO with discatt.dat in the root of the filesystem, none of the content files can be accessed with other tools--ffmpeg, gst-discoverer, mencoder, etc, all report that none of the m2ts files are readable.

What I'm really looking for is the ability to do something like "makemkvcon backup --decrypt iso:image.iso" on a file created with ddrescue (or a modified file where discatt.dat has been added to the root file system). It appears makemkv doesn't support this -- wondering if there is a workaround or if not, can this be added as a feature request? I assume it wouldn't be difficult to have the tool pull from an ISO rather than a device node.
SamuriHL
Posts: 2323
Joined: Mon Jun 14, 2010 5:32 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by SamuriHL »

Enable LibreDrive before you use dd rescue. Then mount the resulting iso as a virtual drive, open makemkv and select the backup option to make a decrypted folder backup.

Sent from my SM-G975U using Tapatalk

kja70
Posts: 17
Joined: Mon Jun 15, 2020 7:40 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by kja70 »

SamuriHL wrote:
Tue Jun 16, 2020 12:36 pm
Enable LibreDrive before you use dd rescue. Then mount the resulting iso as a virtual drive, open makemkv and select the backup option to make a decrypted folder backup.
How would you mount the ISO as a "virtual drive" in Linux? The conventional method is to mount an ISO as a loopback device, in which case makemkv doesn't have an option to open the device, only a file within the already mounted filesystem. Once you open a file like discatt.dat, makemkv greys out the backup option.
kja70
Posts: 17
Joined: Mon Jun 15, 2020 7:40 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by kja70 »

One clunky solution that works -- I created a Linux VM and added the ddrescued ISO as an optical device, so it shows up as /dev/cdrom. makemkv from within the VM is then able to rip/decrypt it normally from that device node. Seems like it should be possible, then, to do this without a VM.
SamuriHL
Posts: 2323
Joined: Mon Jun 14, 2010 5:32 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by SamuriHL »

kja70 wrote:
Tue Jun 16, 2020 2:06 pm
SamuriHL wrote:
Tue Jun 16, 2020 12:36 pm
Enable LibreDrive before you use dd rescue. Then mount the resulting iso as a virtual drive, open makemkv and select the backup option to make a decrypted folder backup.
How would you mount the ISO as a "virtual drive" in Linux? The conventional method is to mount an ISO as a loopback device, in which case makemkv doesn't have an option to open the device, only a file within the already mounted filesystem. Once you open a file like discatt.dat, makemkv greys out the backup option.
Yes, you use a loopback device to mount it. If you create the ddrescue ISO with LibreDrive active, the discatt.dat isn't needed. That's useful for when bus encryption is enabled but LibreDrive disables bus encryption so you get a pure read of the disc into a raw ISO image. From there you can mount it and open it with MakeMKV using the backup option.
alxscott
Posts: 22
Joined: Tue Apr 23, 2013 9:00 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by alxscott »

SamuriHL wrote:
Tue Jun 16, 2020 8:38 pm
kja70 wrote:
Tue Jun 16, 2020 2:06 pm
SamuriHL wrote:
Tue Jun 16, 2020 12:36 pm
Enable LibreDrive before you use dd rescue. Then mount the resulting iso as a virtual drive, open makemkv and select the backup option to make a decrypted folder backup.
How would you mount the ISO as a "virtual drive" in Linux? The conventional method is to mount an ISO as a loopback device, in which case makemkv doesn't have an option to open the device, only a file within the already mounted filesystem. Once you open a file like discatt.dat, makemkv greys out the backup option.
Yes, you use a loopback device to mount it. If you create the ddrescue ISO with LibreDrive active, the discatt.dat isn't needed. That's useful for when bus encryption is enabled but LibreDrive disables bus encryption so you get a pure read of the disc into a raw ISO image. From there you can mount it and open it with MakeMKV using the backup option.
Just to clarify the above; is that via command line ( a backup of an iso)?.

I've tried this previously with no success so was curious to try again.

I interrogated the drive with "makemkvcon info disc:0", output confirmed LibreDirve used. Then ddrescue -n -b2048 /dev/sr0 OUTPUT.iso.

Loop Mounted the iso to a /tmp/ folder.

If you load the iso in MakeMKV GUI is states "The volume key is unknown for this disc - video can't be decrypted" As Expected. You cannot load the iso, or loop mounted folder location, to save a Backup.

Via cli and makemkvcon, backup switch requires "disc:" as source? iso: or file: options both fail.
kja70
Posts: 17
Joined: Mon Jun 15, 2020 7:40 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by kja70 »

alxscott wrote:
Wed Jun 17, 2020 12:59 pm
SamuriHL wrote:
Tue Jun 16, 2020 8:38 pm
kja70 wrote:
Tue Jun 16, 2020 2:06 pm

How would you mount the ISO as a "virtual drive" in Linux? The conventional method is to mount an ISO as a loopback device, in which case makemkv doesn't have an option to open the device, only a file within the already mounted filesystem. Once you open a file like discatt.dat, makemkv greys out the backup option.
Yes, you use a loopback device to mount it. If you create the ddrescue ISO with LibreDrive active, the discatt.dat isn't needed. That's useful for when bus encryption is enabled but LibreDrive disables bus encryption so you get a pure read of the disc into a raw ISO image. From there you can mount it and open it with MakeMKV using the backup option.
Just to clarify the above; is that via command line ( a backup of an iso)?.

I've tried this previously with no success so was curious to try again.

I interrogated the drive with "makemkvcon info disc:0", output confirmed LibreDirve used. Then ddrescue -n -b2048 /dev/sr0 OUTPUT.iso.

Loop Mounted the iso to a /tmp/ folder.

If you load the iso in MakeMKV GUI is states "The volume key is unknown for this disc - video can't be decrypted" As Expected. You cannot load the iso, or loop mounted folder location, to save a Backup.

Via cli and makemkvcon, backup switch requires "disc:" as source? iso: or file: options both fail.
I haven’t tried the libredrive option yet, but in your situation I attached the rescued ISO (with discard.dat added to the root file system) as an optical drive to a VM with makemkvcon running inside and it worked fine.
alxscott
Posts: 22
Joined: Tue Apr 23, 2013 9:00 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by alxscott »

kja70 wrote:
Wed Jun 17, 2020 1:04 pm
alxscott wrote:
Wed Jun 17, 2020 12:59 pm
SamuriHL wrote:
Tue Jun 16, 2020 8:38 pm


Yes, you use a loopback device to mount it. If you create the ddrescue ISO with LibreDrive active, the discatt.dat isn't needed. That's useful for when bus encryption is enabled but LibreDrive disables bus encryption so you get a pure read of the disc into a raw ISO image. From there you can mount it and open it with MakeMKV using the backup option.
Just to clarify the above; is that via command line ( a backup of an iso)?.

I've tried this previously with no success so was curious to try again.

I interrogated the drive with "makemkvcon info disc:0", output confirmed LibreDirve used. Then ddrescue -n -b2048 /dev/sr0 OUTPUT.iso.

Loop Mounted the iso to a /tmp/ folder.

If you load the iso in MakeMKV GUI is states "The volume key is unknown for this disc - video can't be decrypted" As Expected. You cannot load the iso, or loop mounted folder location, to save a Backup.

Via cli and makemkvcon, backup switch requires "disc:" as source? iso: or file: options both fail.
I haven’t tried the libredrive option yet, but in your situation I attached the rescued ISO (with discard.dat added to the root file system) as an optical drive to a VM with makemkvcon running inside and it worked fine.
Thanks! I've seen other people post that adding the disc.dat file works ( either through VM or through mounting the iso as read/write and dumping the file in that way.

I don't use the dd / ddrescue method personally; just interested as it adds options to a minimal, auto rip workflow... i.e. interrogate, clone disc, eject disc; repeat.
SamuriHL
Posts: 2323
Joined: Mon Jun 14, 2010 5:32 pm

Re: Possible to create a decrypted backup from an encrypted ISO?

Post by SamuriHL »

I don't use ddrescue either. I'm only attempting to translate what I do on windows every time I get a new UHD to the linux world. Here's my workflow:

Enable LibreDrive (makemkvcon64 info disc:x where x= 1 of my 2 drives)
Read to ISO image using ImgBurn (here is where your ddrescue would come into play)
Mount ISO image with virtual clonedrive on my laptop over my network (hahah)
Open MakeMKV, select backup, and pick my mounted drive
Write a decrypted backup folder

Yes my process is more involved than most people's but I don't have any optical drives on my laptop so the script to run the LibreDrive and ImgBurn is kicked off through a powershell session from my laptop to my server that has drives. I was simply thinking that adapting this process should work on linux IF you can mount the ISO so that MakeMKV can see it as a drive. That's the key. I don't need any discatt.dat for this process at all. The resulting ISO I make is not bus encrypted so it only needs the title key.
Post Reply