Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Support converting BD folder to ISO ? #149

Open
sgmihai opened this issue Jan 19, 2020 · 33 comments
Open

Enhancement: Support converting BD folder to ISO ? #149

sgmihai opened this issue Jan 19, 2020 · 33 comments
Labels
enhancement New feature or request

Comments

@sgmihai
Copy link

sgmihai commented Jan 19, 2020

I found no way to do this, as the input must be a file. Is the resulting ISO even Bluray compliant ? ( UDF 2.50 ). If not, then I guess it would be a good feature request, because I found no way to make iso images from bluray folders and I have to use a windows vm with imgburn for this, which is not cool.

@FilipeAmadeuO
Copy link

Imgburn allows easily to create ISO compliant files from folder

@lighterowl lighterowl added the enhancement New feature or request label Jan 19, 2020
@lighterowl
Copy link
Contributor

While this is doable, it would probably require implementing UDF 2.50/2.60 from scratch, since support among source-available tools seems to be non-existent at best.

@sgmihai
Copy link
Author

sgmihai commented Jan 20, 2020

Ah ok, I was hoping that tsmuxer already has udf 2.50 support when writing to .iso. Too bad.
I wonder how did imgburn implement this ? Written from scratch or does windows have libraries that can be called to achieve this ? If there's windows native support for writing udf 2.50, I don't think we can find an open source implementation for windows that can be ported to linux. And we just have to wait until someone does this, as time would be better spent improving tsmuxer rather than adding this feature. Maybe start a bounty program for it.

@jcdr428
Copy link
Collaborator

jcdr428 commented Jan 20, 2020

@sgmihai Can't you use imgburn with wine on linux ?

@sgmihai
Copy link
Author

sgmihai commented Jan 20, 2020

@sgmihai Can't you use imgburn with wine on linux ?

Thanks for this message. It did not work for me so far and I did not bother to google it, but it seems that just setting the OS in wine to Windows XP fixes it. This is an acceptable temporary solution. Ideally it would be something that can be called from the command line though.

@justdan96
Copy link
Owner

I've sent off an email to an open source project working on UDF 2.5 ISO creation, if I get a response I'll post it here.

@justdan96
Copy link
Owner

No response from the author yet, NetBSD has full support for UDF 2.5 and 2.6 according to Wikipedia, the person that developed that functionality in NetBSD also developed a standalone program called UDF Client that works cross-platform. It appears that the code in NetBSD is newer than that of UDF Client but a lot of the code is similar. Crucially 2.5 and 2.6 write support are missing from UDF Client.

So either we convince the original UDF Client developer to move over the NetBSD code into the standalone program, we put the NetBSD code back into UDF Client ourselves or we take what we need from the NetBSD code and try to develop something that is cross-platform as a new project.

@God-damnit-all
Copy link

God-damnit-all commented Jan 27, 2020

I've been looking for a reliable way to create UDF 2.5/2.6 ISOs for quite some time. The lack of support for UDF on linux in general has been frustrating. I did my best to try and get ImgBurn to work properly on Wine but it never seemed to want to take.

@justdan96
Copy link
Owner

I've started some of the work on putting the NetBSD code back into UDF Client but there is still a lot missing. Maybe I'll just put up the code I have so far and hope someone else can help out with it!

@justdan96
Copy link
Owner

Also apparently Nero Linux 4 can create UDF 2.5 ISOs but I haven't had much success with it!
https://en.m.wikipedia.org/wiki/Nero_Linux

@justdan96
Copy link
Owner

Response from the developer "option would be to use NetBSDs 'makefs -t udf' where I added
support for creating (non bootable) UDF disc images as part of the UDF support. It will create fully populated UDF discs and it should be able to create UDF 2.50 BluRay disc images for BD-RE and BD-ROMs." I'd have to take a look at how to port NetBSD's makefs onto other platforms but I'm not sure I have the spare time.

For now I have wrote a guide on how to use nerocmd on Linux here: https://medium.com/@justdan96/using-nerocmd-in-ubuntu-19-10-627c5b157fed

@lighterowl
Copy link
Contributor

As mentioned in #201, support for nerocmd could be integrated into tsMuxer without a lot of effort, but full UDF 2.50 support would require significantly more time. @justdan96 If you agree with this approach, I guess it would make most sense to split this issue into two and track progress separately.

@sgmihai
Copy link
Author

sgmihai commented May 25, 2020

@justdan96 Can you confirm you managed to write an actual BD video image with nerocmd ?
I tried with both the nerolinux 3.5 from the Arch user repo, and the 4.0b pkgbuild found here:https://aur.archlinux.org/cgit/aur.git/tree/?h=nerolinux

With the gui I was only able to get it to write the image if running as root, and editing .nero/config to allow DVD overburn past 4600MB which is the default (cannot be changed from gui, it maxes out at 4600). I chose .iso format and it wrote it, but the resulting image was split every 16GB so it resulted in multiple parts. Mpv opened the .iso (First part) and only the first 16GB worth of movie was playable. Concatenating the 3 parts into one piece resulted in a functional image as far as I can tell.

With nerocmd I tried your command line from the article, but using the folder path instead of a single file.
echo "ECT-PPT-UDF-BD.iso" | nerocmd --write --drive=-1,0 --bd --udf --udf-revision=2.50 --udf-partition-type=physical --data "/path/to/bluraydisc"
Result is:

Last detected media: BD-R/RE, BD DL
Requested media: BD-R/RE, BD DL

There is not enough space to burn this compilation to this disc.

Please insert another disc that has enough space...
[#] Compilation will not fit onto a blank disc

Obviously ther is enough disk space, and I have no idea how to feed it a whole folder. You only gave an example with a zip file.

Please tell us how/if you did, and if you found any way to avoid the 16GB splitting problem, of if you found any more elegant solutions in the meantime.

@justdan96
Copy link
Owner

That command should be correct, I never had to burn anything bigger than 16GB so can't comment on that. The only open source solution for getting UDF 2.6 support (I think) would be to port NetBSDs 'makefs -t udf'.

@sgmihai
Copy link
Author

sgmihai commented May 25, 2020

@justdan96 Can you check your command syntax against a whole folder with files, subfolders, etc and see if it works for you ? I fail to see the use case of making an .iso with a single file in it.

@jcdr428
Copy link
Collaborator

jcdr428 commented May 26, 2020

@justdan96 I know nothing about Linux, but doesn't newfs_udf support UDF 2.50 ?

The newfs_udf utility creates an UDF file system on device special suitable for the media currently inserted.
The options are as follow:
[ ]
-V max_udf  Select max_udf as the maximum UDF version to be supported.  For UDF version 2.50, use ``0x250'' or ``2.50''.

Edit: it is for the open-source NetBSD only, I suppose it could be ported to any other Linux easily ?

@dfgweb
Copy link

dfgweb commented Nov 17, 2020

Just fyi, under Linux with Wine, I've used ImgBurn (http://www.imgburn.com/) to build UDF2.50 images and burn them.

@justdan96
Copy link
Owner

I successfully created a BD folder in tsMuxer, then created the ISO in the command line with:

cd BD_Folder
echo "BD_Folder.iso" | nerocmd --write --drive=-1,0 --bd --udf --udf-revision=2.60 --udf-partition-type=physical --data *

@jcdr428
Copy link
Collaborator

jcdr428 commented Jul 16, 2021

Hi @justdan96, but then if you use UDF 2.6 the Blu-ray player should only show the folders, not play the movie.

@justdan96
Copy link
Owner

@jcdr428 sorry I didn't quite understand you there? To be fair it would still need further testing and I don't have a Blu-ray player to really test it with, or even a Blu-ray drive for me to try to back up my existing disks and compare the files against the nerocmd output.

@pali
Copy link

pali commented Sep 12, 2021

Hello! Just one important note: Neither udftools nor udfclient nor NetBSD makefs/newfs_udf/ support ISO. All these tools supports only UDF. So if you are targeting ISO as written in the first comment then none of these tools helps and I think that ISO support into these tools would be never integrated (as aim of these tools is not ISO, but UDF).

Anyway, if somebody here is interested in developing generation of UDF 2.50/2.60 (not ISO), I can help with it for udftools.

And ad nerocmd, it can really generates UDF 2.50 suitable for blu-ray, I used it in past but I do not remember exact arguments. But it has also support to just generate UDF image and store it to disk (instead of burning to media, called virtual drive). So later you can use any other tool for burning or you can inspect image...

@Randrianasulu
Copy link

@pali, @justdan96 @xavery - from https://github.com/justdan96/tsMuxer/blob/master/tsMuxer/iso_writer.cpp it seems some support for this metadata file/partition was coded into tsmuxer. Not with bitmap file (so no support for adding/removing any file at any time), but some basics of filewriting.. I am on termux /android arm 32 bit environment right now, so I can't test real big files.

my hacks on udfclient (only compile fixes for termux) and newfs_udf from netbsd (already posted them on mkudffs/udftools page)
https://github.com/Randrianasulu/newfs_udf-linux
https://github.com/Randrianasulu/udfclient-termux

@Randrianasulu
Copy link

see also comments under this articke (I think back in 2010 tsmuxer was unable to write directly to image file) :

https://irishjesus.wordpress.com/2010/10/17/blu-ray-movie-authoring-in-linux/

imgburn commans from comments (creating image file with .iso extension but udf inside)

bash$ wine ~/.wine/drive_c/Program\ Files/ImgBurn/ImgBurn.exe /MODE BUILD /OUTPUTMODE IMAGEFILE /SRC “C:\users\username\Desktop\path\to\tsMuxer\output\folder” /DEST “C:\users\username\Desktop\path\to\final.iso” /FILESYSTEM “UDF” /UDFREVISION “2.50” /VOLUMELABEL “some disk label” /NOIMAGEDETAILS /START /CLOSE

@Randrianasulu
Copy link

according to source
https://github.com/NetBSD/src/blob/trunk/usr.sbin/makefs/udf.c

and man
https://man.netbsd.org/makefs.8

max version of udf fs for makefs is just 2.01 (

@Randrianasulu
Copy link

i mashed together makefs_udf for linux (termux)

https://github.com/Randrianasulu/makefs_termux

@Randrianasulu
Copy link

here we can see udfinfo output from tsmuxer-created iso burned to dvd... so yeah it contain some fs claiming to be udf 2.50

@justdan96
Copy link
Owner

@Randrianasulu that's really good work, I can see a lot of people using that!

@jcdr428 jcdr428 added bug Something isn't working and removed enhancement New feature or request labels Dec 12, 2021
@jcdr428
Copy link
Collaborator

jcdr428 commented Dec 12, 2021

@sgmihai @Randrianasulu please test latest release, to see whether the fixes are enough for a standalone player to recognize the ISOs as proper UDF 2.50.

@jcdr428
Copy link
Collaborator

jcdr428 commented Dec 19, 2021

@sgmihai tsMuxer now outputs compliant UDF2.5 ISOs (cf. issue #498).
I close this issue: to convert a folder to ISO is the purpose of an app such as imgburn or Nero, rather than tsMuxer.

@God-damnit-all
Copy link

God-damnit-all commented Dec 19, 2021

@sgmihai tsMuxer now outputs compliant UDF2.5 ISOs (cf. issue #498). I close this issue: to convert a folder to ISO is the purpose of an app such as imgburn or Nero, rather than tsMuxer.

Won't you please reconsider? Sometimes I have Bluray data in a folder that needs to be made into an ISO. While Randrianasulu did present a nice solution, it would be much more reassuring for a well-maintained program like tsMuxer to offer the functionality without having to rely on a netbsd fork that probably won't receive the long-term support that this project will.

I'd be willing to make a donation for the feature through this site's new GitHub Sponsors option, if you ever feel like setting that up. Kofi works too.

@jcdr428
Copy link
Collaborator

jcdr428 commented Dec 19, 2021

@sgmihai tsMuxer is fully coded to read files. It would imply really substantial changes to read folders.
As @Randrianasulu suggested, under Linux you can use k3b to create iso from folder. Best solution would remain to use imgburn with wine.

@God-damnit-all
Copy link

@sgmihai tsMuxer is fully coded to read files. It would imply really substantial changes to read folders. As @Randrianasulu suggested, under Linux you can use k3b to create iso from folder. Best solution would remain to use imgburn with wine.

I see. That's a shame.

k3b relies on creating a virtual block device/loopback device, and unfortunately, those are restricted on my remote server because of the security risks those present.

I know that's not your problem, but that's my reason for so badly wanting tsMuxer to have folder-to-ISO functionality.

@jcdr428 jcdr428 added enhancement New feature or request and removed bug Something isn't working labels Dec 28, 2021
@Randrianasulu
Copy link

in the meantime makefs_udf was improved by original author, I tried to re-import changes into my Linux hack and it sort of works ( I need to run it twice over same iso for getting all 3 AVDPs..) but might contain subtly bugs..

@ImportTaste can you (re) test? https://github.com/Randrianasulu/makefs_termux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants