Open breezytm opened 5 years ago
Before I do that, would you encrypt the password on the text .cfg file?
Also how come it is working for you but not working for me? Do you nzbget or whatever tool you use running as root? I have nzbget running as nzbget user
fair call.. I currently don't have any encryption in the .cfg file... I'll need to do some research as to how to handle that... personally, my biggest concern is around giving the script sudo access (as opposed to the sudo password being stored within the .cfg). encrypting this will prevent anyone with access to the .cfg learning the password, and also protect people when they post their .cfg here asking for help.
For me this works becasue my NAS does not accept su or sudo. NZBGet runs as admin user, but the way the busybox commands work mount and umount work when called by admin.
@clinton-hall From a security perspective I see this is as a very bad idea. The permissions of the user to run that command should be an environment configuration. For example you can use a combination of sudo and visudo to give passwordless access to the user for discretionary access to execute the command while not allowing other root commands. This should not be done by the application, there are too many ways it could be a security concern.
Edit: Just saw that this was related to mounting/unmounting - there's a good reason that mounting/unmounting requires root as it can be used for privilege escalation. I don't see an effective way of automating this without opening serious security concerns.
@labrys agreed... the 7zip methodology worked well, but the issue is 7zip does not support bluray .iso. Likewise isoparser fails.
There has to be someway of using python to browse and extract from bluray .iso files, but this is way above my capabilities...
mount works fine for me on my NAS but obviously not on any system requiring sudo.
do you know if the ctypes library (snippet of code above that came from a sourceforge page) would allow mounting and parsing without requiring root privileges? or is that essentially going to emulate the mount command and have the same limitations?
FWIW, I note a request on 7zip page to support BD iso. I have provided info there to see if this can be added.
I'm fairly certain that mounting with ctypes requires root.
Have you tried using rar? I'm fairly sure it can extract bluray isos.
testing unrar at my end does not work. I have seen some indication online that winRAR does work, but unrar on linux does not.
I have provided more info to 7zip dev to see if 7zip can support UDF 2.50 and 2.60 iso files. If so, then I am confident the changes I have made will work for bluray images.
To Sum up: -1. Bluray file structure is supported. - All video files are transoced in order (main movie followed by extra features) -2. 7zip is called first for .iso files -3. If 7zip failed to match DVD or Bluray file structure the script attempts to mount and then parse the folder structure.
So if mount works (some busybox
systems or any system where the downloader runs as root) this will work.
Otherwise if/when 7zip is updated, this will work.
I'll remove the changes I have made for the sudo password...
Sounds good. Is there a ticket on their side you can add to this thread for us to track the changes on there end.
@clinton-hall can you detect that the reason for failure is a bluray iso? If so then possibly raise warning informing user to manually extract?
Ticket at 7zip: https://sourceforge.net/p/sevenzip/discussion/45797/thread/21f213e2/
I can't currently detect bluray iso as the reason for failure. In fact the issue is that 7zip actually does produce a file list, but it isn't correct (as per thread linked above Igor has indicated this is actually parsing an internal zip file) and therefore doesn't look like the expected DVD / BluRay structure.
@breezytm for what it is worth, I transcoded that same movie to 1080p (so it should now be playable). Remembering that this is for the full 3+ hours of bonus features etc as well... the transcoding on my NAS took about 48 hours!
Hey I was out for a little while dealing with my mothers passing. Glad to see you open a case to get this included.
@breezytm Sorry to hear that. I hope you and your family are doing well. As soon as I can get either 7zip that handles these, or another iso-parsing tool, I will update this further.
Hello Clinton,
Is there a way for nzbToMedia to transcode the bluray to mkv?