[Support] Djoss - HandBrake


Recommended Posts

20 hours ago, rbroberts said:

Well, my message was a bit confusing. I really want to get all the watch directories in the same tree. And I don't see a variable for that; those appear to be mount points at /watch2, /watch3, etc. So while I can make the output directories all part of the same tree, I can't seem to do that for the inputs, at least not that I can tell.

I keep looking at the existing scripts, and since I don't really understand how docker works, I'm pretty sure I'm looking in the wrong place.

 

The watch directories get mounted in /watch, /watch2, etc., but I'm wondering what it would take to do this differently. If on the unraid server, I've got them as some-path/watch/1080, some-path/watch/0720, etc, there's nothing to prevent mounting some-path/watch and symlinking from /watch -> mount-point-for-some-path/1080, etc. Well, nothing except figuring out how to manage the configuration, though I would just throw that at the user. Maybe a flag that says use symlinks. The main point of this being that the pre- and post-conversion scripts don't have to change, and everything that assumes files in /watch, /watch2, etc., still works.

 

Admittedly, in the overall scheme of how long it takes to do multiple conversions, the copy time is small, but still, for a single bluray video it's a few minutes.

Link to comment
On 3/19/2020 at 7:47 PM, cbr600ds2 said:

Maybe I'm doing this wrong but this is my log and its definitely not pulling.   What I did was create a folder under the completed called DE (DONE ENCODING) and TBE (TO BE ENCODED)  original I know.   Anyways it seemed like it wasn't pulling it because of permissions so using the add another path I added both of them again in the hopes that it creates the correct permissions.  Well, the log below is what I got.  I just don't want it to use the completed folder as I don't feel the need to re-encode EVERYTHING but only what I move (yeah, I get it defeats the purpose but I'm weird like that)  Thoughts?  


[autovideoconverter] starting...
[autovideoconverter] Processing watch folder '/watch'...
[autovideoconverter] Skipping '/watch/FILE.mkv' (7f6a4731fab123cb02580bf4d47002c0): already processed with failure.
[autovideoconverter] Watch folder '/watch' processing terminated.
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Unsupported high keycode 372 for name <I372> ignored
> X11 cannot support keycodes above 255.
> This warning only shows for the first high keycode.
> Internal error: Could not resolve keysym XF86MonBrightnessCycle
> Internal error: Could not resolve keysym XF86RotationLockToggle

 

Ok - so I've been to even do it manually and it says I don't have read/write access to the file folder but according to this (screenshot) below I do. Should I change the container path to the same as the host path?    

image.png.ea41a5b12e0034021c1cb8e558b3b07c.png

Link to comment
On 3/19/2020 at 7:47 PM, cbr600ds2 said:

[autovideoconverter] starting...
[autovideoconverter] Processing watch folder '/watch'...
[autovideoconverter] Skipping '/watch/FILE.mkv' (7f6a4731fab123cb02580bf4d47002c0): already processed with failure.
[autovideoconverter] Watch folder '/watch' processing terminated.

 

That doesn't look like a permission problem, but maybe I'm missing something. I assume you tried touching the file to make it appear new? Did you also look for dot files in the output directory to see if something was left lying about from a previous failed attempt? I think that touching the file is sufficient to invalidate any dot files. What am I talking about...?

 

Right now my encoder is running and I have this:

root@Tower:/mnt/user/Video/rip# find output/* -type f | grep "Yesterday (2019).mkv"
output/1080/.RsjOZG/Yesterday (2019).mkv

I've see those files get left if the encoding failed, or (naturally) I restarted the container.

 

  • Like 1
Link to comment

Xposted this from my post in the Nvidia plug-in thread:

 

am at a loss. I have been unsuccessful at getting my GTX1070 to work on my Unraid 6.8.3 server. Want to use it on Handbrake and then Plex, no VMs. I have been at it for a couple of months and my build is defaulting to CPU transcoding, not GPU. Here's what I have tried.

1. Latest unraid and nvidia plug-in version. It sees it as GPU0 and gives a UUID number

2. Using Djaydevs version of Handbrake to support Nvidia GPU

3. Set Handbrakes NVIDIA_DRIVER_CAPABILITIES = all

4.Set the extra parm: --runtime=nvidia

5. Verified there is no trailing space after the GPU UUID

6. Confirmed in my BIOS that the server graphics are using the on-board  GPU and not Nvidia

7. Confirmed ASRock supports ths GPU

 

...what am I missing here?

Unraid: 6.8.3

System board: ASRock x570 Phantom Gaming 4, BiOS P1.30

CPU [dont laugh]: AMD Ryzen 3 3200G with Radeon Vega Grahics @3600

GPU: Nvidia GTX 1070 w/ driver version 440.59

Mem: 8GiB DDR4

Link to comment

Hmm, this is not exactly a HandBrake question. This looks like my container restarted last night, which orphaned a nearly completed transcode.

 

Any ideas on how to track down why it restarted?

 

Encoding /watch/Avatar/Avatar.mkv: 85.38 % (2.66 fps, avg 4.06 fps, ETA 02h19m45s)
[services.d] stopping services
[services.d] stopping app...
[services.d] stopping openbox...
[services.d] stopping statusmonitor...
[services.d] stopping logmonitor...
[services.d] stopping autovideoconverter...
Encoding /watch/Avatar/Avatar.mkv: 85.39 % (2.72 fps, avg 4.06 fps, ETA 02h19m40s)
Encoding /watch/Avatar/Avatar.mkv: 85.39 % (2.72 fps, avg 4.06 fps, ETA 02h19m40s)
Encoding /watch/Avatar/Avatar.mkv: 85.39 % (2.72 fps, avg 4.06 fps, ETA 02h19m40s)
s6-svlisten1: fatal: timed out
[services.d] stopping x11vnc...
caught signal: 15
24/03/2020 03:12:45 deleted 40 tile_row polling images.
[services.d] stopping xvfb...
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Unsupported high keycode 372 for name <I372> ignored
>                   X11 cannot support keycodes above 255.
>                   This warning only shows for the first high keycode.
> Internal error:   Could not resolve keysym XF86MonBrightnessCycle
> Internal error:   Could not resolve keysym XF86RotationLockToggle
Errors from xkbcomp are not fatal to the X server
[services.d] stopping nginx...
[services.d] stopping certsmonitor...
[services.d] stopping s6-fdholderd...
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...

 

Link to comment
On 3/22/2020 at 10:47 PM, rbroberts said:

 

That doesn't look like a permission problem, but maybe I'm missing something. I assume you tried touching the file to make it appear new? Did you also look for dot files in the output directory to see if something was left lying about from a previous failed attempt? I think that touching the file is sufficient to invalidate any dot files. What am I talking about...?

 

Right now my encoder is running and I have this:


root@Tower:/mnt/user/Video/rip# find output/* -type f | grep "Yesterday (2019).mkv"
output/1080/.RsjOZG/Yesterday (2019).mkv

I've see those files get left if the encoding failed, or (naturally) I restarted the container.

 

Thanks RTR!   i'll try that. 

Link to comment
On 3/22/2020 at 10:47 PM, rbroberts said:

 

That doesn't look like a permission problem, but maybe I'm missing something. I assume you tried touching the file to make it appear new? Did you also look for dot files in the output directory to see if something was left lying about from a previous failed attempt? I think that touching the file is sufficient to invalidate any dot files. What am I talking about...?

 

Right now my encoder is running and I have this:


root@Tower:/mnt/user/Video/rip# find output/* -type f | grep "Yesterday (2019).mkv"
output/1080/.RsjOZG/Yesterday (2019).mkv

I've see those files get left if the encoding failed, or (naturally) I restarted the container.

 

Didn't work.  I tried doing it manually again and says it doesn't have read/write access to that file folder.   

 

Link to comment

I changed the settings - just for S&G's - it looks right in the fact that the correct folders are being given rw status

 

'AUTOMATED_CONVERSION_SOURCE_MIN_DURATION'='10' -e 'AUTOMATED_CONVERSION_CHECK_INTERVAL'='5' -e 'AUTOMATED_CONVERSION_MAX_WATCH_FOLDERS'='5' -e 'AUTOMATED_CONVERSION_NO_GUI_PROGRESS'='0' -e 'AUTOMATED_CONVERSION_HANDBRAKE_CUSTOM_ARGS'='' -e 'AUTOMATED_CONVERSION_INSTALL_PKGS'='' -p '7803:5800/tcp' -p '7903:5900/tcp' -v '/mnt/user':'/storage':'ro' -v '/mnt/user/Downloads/TBE/':'/watch':'rw' -v '/mnt/user/Downloads/DE/':'/output':'rw' -v '/mnt/user/Downloads/TBE/':'/mnt/user/Downloads/TBE/':'rw' -v '/mnt/user/Downloads/DE/':'/mnt/user/Downloads/DE/':'rw' -v '/mnt/user/appdata/HandBrake':'/config':'rw' 'jlesage/handbrake' 

d138e76b84388eb56b27d97e7df4611bca9bbb1e895673173d763f52d4b6e6e3

 

and I made a change so I don't get the same file processed with error - 

 

[autovideoconverter] Change detected in watch folder '/watch'.
[autovideoconverter] Processing watch folder '/watch'...
[autovideoconverter] Waiting 5 seconds before processing '/watch/Rocketman.mkv'...
[autovideoconverter] Starting conversion of '/watch/Rocketman.mkv' (f736caed3663af737ce46609b5e92f94) using preset '4K process'...
[autovideoconverter] 1 title(s) to process.
[autovideoconverter] Conversion failed.

 

if I manually try to start the encode it gives me a can't read or write error...  I'm not sure what else to check. 

Edited by cbr600ds2
Link to comment
On 3/21/2020 at 4:48 PM, rbroberts said:

I keep looking at the existing scripts, and since I don't really understand how docker works, I'm pretty sure I'm looking in the wrong place.

 

The watch directories get mounted in /watch, /watch2, etc., but I'm wondering what it would take to do this differently. If on the unraid server, I've got them as some-path/watch/1080, some-path/watch/0720, etc, there's nothing to prevent mounting some-path/watch and symlinking from /watch -> mount-point-for-some-path/1080, etc. Well, nothing except figuring out how to manage the configuration, though I would just throw that at the user. Maybe a flag that says use symlinks. The main point of this being that the pre- and post-conversion scripts don't have to change, and everything that assumes files in /watch, /watch2, etc., still works.

 

Admittedly, in the overall scheme of how long it takes to do multiple conversions, the copy time is small, but still, for a single bluray video it's a few minutes.

What about mapping the different watch folders to the same folder on unRAID ?  Make sure that you configure the automatic video converter to not touch the source files.  You can then manually clean the source files once all conversions are done.

  • Like 1
Link to comment
On 3/23/2020 at 1:49 PM, endessunraid said:

Xposted this from my post in the Nvidia plug-in thread:

 

am at a loss. I have been unsuccessful at getting my GTX1070 to work on my Unraid 6.8.3 server. Want to use it on Handbrake and then Plex, no VMs. I have been at it for a couple of months and my build is defaulting to CPU transcoding, not GPU. Here's what I have tried.

1. Latest unraid and nvidia plug-in version. It sees it as GPU0 and gives a UUID number

2. Using Djaydevs version of Handbrake to support Nvidia GPU

3. Set Handbrakes NVIDIA_DRIVER_CAPABILITIES = all

4.Set the extra parm: --runtime=nvidia

5. Verified there is no trailing space after the GPU UUID

6. Confirmed in my BIOS that the server graphics are using the on-board  GPU and not Nvidia

7. Confirmed ASRock supports ths GPU

 

...what am I missing here?

Unraid: 6.8.3

System board: ASRock x570 Phantom Gaming 4, BiOS P1.30

CPU [dont laugh]: AMD Ryzen 3 3200G with Radeon Vega Grahics @3600

GPU: Nvidia GTX 1070 w/ driver version 440.59

Mem: 8GiB DDR4

You are in the wrong thread!  This container doesn't support Nvidia hardware acceleration...

 

Link to comment
20 hours ago, cbr600ds2 said:

I changed the settings - just for S&G's - it looks right in the fact that the correct folders are being given rw status

 

'AUTOMATED_CONVERSION_SOURCE_MIN_DURATION'='10' -e 'AUTOMATED_CONVERSION_CHECK_INTERVAL'='5' -e 'AUTOMATED_CONVERSION_MAX_WATCH_FOLDERS'='5' -e 'AUTOMATED_CONVERSION_NO_GUI_PROGRESS'='0' -e 'AUTOMATED_CONVERSION_HANDBRAKE_CUSTOM_ARGS'='' -e 'AUTOMATED_CONVERSION_INSTALL_PKGS'='' -p '7803:5800/tcp' -p '7903:5900/tcp' -v '/mnt/user':'/storage':'ro' -v '/mnt/user/Downloads/TBE/':'/watch':'rw' -v '/mnt/user/Downloads/DE/':'/output':'rw' -v '/mnt/user/Downloads/TBE/':'/mnt/user/Downloads/TBE/':'rw' -v '/mnt/user/Downloads/DE/':'/mnt/user/Downloads/DE/':'rw' -v '/mnt/user/appdata/HandBrake':'/config':'rw' 'jlesage/handbrake' 

d138e76b84388eb56b27d97e7df4611bca9bbb1e895673173d763f52d4b6e6e3

 

and I made a change so I don't get the same file processed with error - 

 

[autovideoconverter] Change detected in watch folder '/watch'.
[autovideoconverter] Processing watch folder '/watch'...
[autovideoconverter] Waiting 5 seconds before processing '/watch/Rocketman.mkv'...
[autovideoconverter] Starting conversion of '/watch/Rocketman.mkv' (f736caed3663af737ce46609b5e92f94) using preset '4K process'...
[autovideoconverter] 1 title(s) to process.
[autovideoconverter] Conversion failed.

 

if I manually try to start the encode it gives me a can't read or write error...  I'm not sure what else to check. 

Did you check the ownership and permission of /mnt/user/Downloads/DE in unRAID ?

Link to comment
7 hours ago, Djoss said:

ls -l /mnt/user/Downloads
ls -l /mnt/user/Downloads/DE

 

root@Skynet:~# ls -l /mnt/user/Downloads
total 0
drwxrwxrwx 1 nobody users    0 Mar 26 14:39 DE/
drwxrwxrwx 1 nobody users   16 Mar 26 14:39 TBE/
drwxrwxr-x 1 nobody users  908 Mar 26 14:35 complete/
drwxrwxrwx 1 nobody users 3046 Mar 22 10:54 incomplete/

 

hmm... I thought maybe it was because I created the folders through my windows 10 machine so I deleted and then used krusader to create the folders but stilll same errors. 

Link to comment
On 3/25/2020 at 7:37 PM, Djoss said:

What about mapping the different watch folders to the same folder on unRAID ?  Make sure that you configure the automatic video converter to not touch the source files.  You can then manually clean the source files once all conversions are done.

Actually, that's pretty clever. I was actually thinking of trying to install a second instance of the container to see if is possible to rip the different versions in parallel, and that would very neatly work for that, too.

Link to comment

how do you set it up  so when I copy a like mkv and a srt  to the folder for processing it automatically adds it to a mp4 the subtitle  it doesn't automatically do it.. I wanna keep the same format the mkv file is in   just convert it to a mp4 and import the srt file into it

Edited by comet424
Link to comment

Hey Guys,

 

I just installed this Docker, and I am having some trouble getting it to move items into the queue.  I keep getting an error say "Can not read or write the directory".

 

Here are my mappings :

 

/storage/mnt/user/Plex Media/Converted Videos/
/watch/mnt/user/Plex Media/Converted Videos/
/output/mnt/user/Plex Media/Converted Videos/
/config/mnt/user/appdata/HandBrake

 

Thanks for any help!

 

Link to comment
11 hours ago, tbuttery120589 said:

Here are my mappings :

 

/storage/mnt/user/Plex Media/Converted Videos/
/watch/mnt/user/Plex Media/Converted Videos/
/output/mnt/user/Plex Media/Converted Videos/
/config/mnt/user/appdata/HandBrake

 

I assume you meant
 

/storage => /mnt/user/Plex Media/Converted Videos/
/watch => /mnt/user/Plex Media/Converted Videos/
/output => /mnt/user/Plex Media/Converted Videos/
/config => /mnt/user/appdata/Handbrake

If not, then you'll have to explain a bit more.

 

I'm not sure docker will let you munt the same directory three times with different permissions. /storage is normally read-only. /watch normally is, but doesn't have to be. /output is obviously read-write.

 

Also, if your input and output containers are the same type, you're going to shoot yourself in the foot.

 

 

 

Link to comment
3 minutes ago, rbroberts said:

 

I assume you meant
 


/storage => /mnt/user/Plex Media/Converted Videos/
/watch => /mnt/user/Plex Media/Converted Videos/
/output => /mnt/user/Plex Media/Converted Videos/
/config => /mnt/user/appdata/Handbrake

If not, then you'll have to explain a bit more.

 

I'm not sure docker will let you munt the same directory three times with different permissions. /storage is normally read-only. /watch normally is, but doesn't have to be. /output is obviously read-write.

 

Also, if your input and output containers are the same type, you're going to shoot yourself in the foot.

 

 

 


Forgive me I am a complete noob with Docker.

 

I have experience with handbrake on my main PC but not in UnRaid.
 

Any guidance on how to set up my mappings would be greatly appreciated.  

Link to comment
On 3/24/2020 at 11:19 PM, cbr600ds2 said:

I changed the settings - just for S&G's - it looks right in the fact that the correct folders are being given rw status

 

'AUTOMATED_CONVERSION_SOURCE_MIN_DURATION'='10' -e 'AUTOMATED_CONVERSION_CHECK_INTERVAL'='5' -e 'AUTOMATED_CONVERSION_MAX_WATCH_FOLDERS'='5' -e 'AUTOMATED_CONVERSION_NO_GUI_PROGRESS'='0' -e 'AUTOMATED_CONVERSION_HANDBRAKE_CUSTOM_ARGS'='' -e 'AUTOMATED_CONVERSION_INSTALL_PKGS'='' -p '7803:5800/tcp' -p '7903:5900/tcp' -v '/mnt/user':'/storage':'ro' -v '/mnt/user/Downloads/TBE/':'/watch':'rw' -v '/mnt/user/Downloads/DE/':'/output':'rw' -v '/mnt/user/Downloads/TBE/':'/mnt/user/Downloads/TBE/':'rw' -v '/mnt/user/Downloads/DE/':'/mnt/user/Downloads/DE/':'rw' -v '/mnt/user/appdata/HandBrake':'/config':'rw' 'jlesage/handbrake' 

d138e76b84388eb56b27d97e7df4611bca9bbb1e895673173d763f52d4b6e6e3

 

That looks really strange to me. One of my instances looks like this:

 

Quote

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='HandBrake-0480' --net='bridge' --cpuset-cpus='10,11,12,13,34,35,36,37' -e TZ="America/New_York" -e HOST_OS="Unraid" -e 'AUTOMATED_CONVERSION_PRESET'='Custom H.265 MKV 480p' -e 'AUTOMATED_CONVERSION_FORMAT'='mkv' -e 'AUTOMATED_CONVERSION_KEEP_SOURCE'='1' -e 'AUTOMATED_CONVERSION_NON_VIDEO_FILE_ACTION'='ignore' -e 'AUTOMATED_CONVERSION_OUTPUT_DIR'='/output/0480' -e 'AUTOMATED_CONVERSION_OUTPUT_SUBDIR'='SAME_AS_SRC' -e 'USER_ID'='99' -e 'GROUP_ID'='100' -e 'UMASK'='000' -e 'APP_NICENESS'='' -e 'DISPLAY_WIDTH'='1280' -e 'DISPLAY_HEIGHT'='768' -e 'SECURE_CONNECTION'='0' -e 'X11VNC_EXTRA_OPTS'='' -e 'AUTOMATED_CONVERSION_NON_VIDEO_FILE_EXTENSIONS'='jpg jpeg bmp png gif txt nfo' -e 'AUTOMATED_CONVERSION_SOURCE_STABLE_TIME'='5' -e 'AUTOMATED_CONVERSION_SOURCE_MIN_DURATION'='10' -e 'AUTOMATED_CONVERSION_CHECK_INTERVAL'='5' -e 'AUTOMATED_CONVERSION_MAX_WATCH_FOLDERS'='1' -e 'AUTOMATED_CONVERSION_NO_GUI_PROGRESS'='0' -e 'AUTOMATED_CONVERSION_HANDBRAKE_CUSTOM_ARGS'='' -e 'AUTOMATED_CONVERSION_INSTALL_PKGS'='' -p '7801:5800/tcp' -p '7901:5900/tcp' -v '/mnt/user/Video/rip':'/storage':'ro' -v '/mnt/user/Video/rip/watch':'/watch':'rw' -v '/mnt/user/Video/rip/output':'/output':'rw' -v '/mnt/cache/appdata/HandBrake-0480':'/config':'rw' 'jlesage/handbrake'

 

What looks weird in yours is those extra mounts that seem to be mapping a path on the host to the same path in the container.

Link to comment
1 minute ago, tbuttery120589 said:


Forgive me I am a complete noob with Docker.

 

I have experience with handbrake on my main PC but not in UnRaid.
 

Any guidance on how to set up my mappings would be greatly appreciated.  

 

I don't really know what's "normal" for /storage, I'm not completely sure why it's there at all. But I generally make it a parent directory of all the video-related things I want to operate on.

 

Then I have subdirectories that map one-to-one with the container. My original config looked like this:

/storage => /mnt/user/Videos/rip
/watch => /mnt/user/Videos/rip/watch
/output => /mnt/user/Videos/rip/output

I use MakeMKV to rip the original media into /mnt/user/Videos/rip/staging. Then once that's done and I've renamed my files to something meaningful, I move the whole directory into "watch". Once Handbrake is finished, I move the watch subdirectory into /mnt/user/Videos/rip/done, and the output subdirectory into my Plex tree. You could, of course, just have Handbrake convert directly into your Plex output directory, which seems to be what you were aiming for, but I prefer to have Plex be ignorant of what's in process until I'm done.

Link to comment
On 3/25/2020 at 7:37 PM, Djoss said:

What about mapping the different watch folders to the same folder on unRAID ?  Make sure that you configure the automatic video converter to not touch the source files.  You can then manually clean the source files once all conversions are done.

Hmm. I've set this up with a single /watch all mapped the same for each converter and, for blurays, this seems like it will work well. In fact, I've set up three instances and assigned different CPU sets to each instance, so they can run in parallel and not fight each other. But....

 

Only my 480p config makes sense for DVDs. All three instances will try to rip them, and I have a post conversion script that will rename them so they don't conflict when I eventually merge the outputs, but the 1080p config's output won't be any different than the 480p config's output. With the old single instance, the pre conversion script would detect that and move the input to the next queue.

 

Looking at autovideoconverter/run, there doesn't seem to be any way to veto a conversion except to move the input file.

Link to comment
19 minutes ago, rbroberts said:

Looking at autovideoconverter/run, there doesn't seem to be any way to veto a conversion except to move the input file.

 

And...a veto would be much nicer that the move stuff anyway. I really do like that one watch directory for them all. The 480p and 720p configs convert much faster than the 1080p (naturally), so stacking them behind the 1080p partially defeats the parallel setup.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.