brinx Posted March 20, 2019 Share Posted March 20, 2019 Hi, i have a problem docker installs i open webUI and select a file select all details for ripping and when i want to start conversion I ged error below: Quote Link to comment
Jorgen Posted March 20, 2019 Share Posted March 20, 2019 Hi, i have a problem docker installs i open webUI and select a file select all details for ripping and when i want to start conversion I ged error below: From the handbrake UI you need to set the destination folder to:/output/finished Sent from my iPhone using Tapatalk Quote Link to comment
mbc0 Posted March 23, 2019 Share Posted March 23, 2019 On 3/20/2019 at 11:34 AM, Djoss said: So your "handbrakedocker" folder seems to have the correct/normal ownership/permissions. Likely a permission issue with SMB? Hi, I am still having a problem with this so I deleted the folder "handbrakedocker" then restarted the docker and it created the folder "handbrakedocker" again but I am unable to write to it? I have tons of shares which I can write to from my Desktop it is just this one folder I cannot write to any more? Any ideas? Thank you Quote Link to comment
Djoss Posted March 25, 2019 Author Share Posted March 25, 2019 On 3/23/2019 at 5:03 PM, mbc0 said: Hi, I am still having a problem with this so I deleted the folder "handbrakedocker" then restarted the docker and it created the folder "handbrakedocker" again but I am unable to write to it? I have tons of shares which I can write to from my Desktop it is just this one folder I cannot write to any more? Any ideas? Thank you Doing chmod 777 on your folder didn't help? What is the value of SMB security setting for the share? Quote Link to comment
mbc0 Posted March 26, 2019 Share Posted March 26, 2019 20 hours ago, Djoss said: Doing chmod 777 on your folder didn't help? What is the value of SMB security setting for the share? Hi mate, sorry if I confused things, executing a chmod 777 does fix the issue but wondering why I am having to do it all the time to the handbrakedocker output folder? never had to before... Quote Link to comment
Jorgen Posted March 26, 2019 Share Posted March 26, 2019 On 3/17/2019 at 4:00 AM, Djoss said: Or it might be a good feature to add... Can you add feature request at https://github.com/jlesage/docker-handbrake/issues ? Hi @Djoss, saw the notification from github that you added the post_watch_folder_processing hook, thank you so much for that! To test, I pulled down the latest image and added the following post-watch script: #!/bin/sh # # This is an example of a post watch folder processing hook. This script is # always invoked with /bin/sh (shebang ignored). # # The argument of the script is the path to the watch folder. # WATCH_FOLDER=$1 echo "post-watch folder processing: Watch folder = $WATCH_FOLDER" if [ -d "/$WATCH_FOLDER" ] && [ -z "$(ls -A "$WATCH_FOLDER")" ]; then echo "watch folder empty, shutting down" killall -sigterm ghb fi And it worked beautifully: [autovideoconverter] Conversion ended successfully. [autovideoconverter] Removed /watch/movie.mp4'. [autovideoconverter] Watch folder '/watch' processing terminated. [autovideoconverter] Executing post watch folder processing hook... post-watch folder processing: Watch folder = /watch watch folder empty, shutting down [autovideoconverter] Post watch folder processing hook exited with 0 [autovideoconverter] Conversion ended successfully. [autovideoconverter] Removed /watch/movie.mp4'. [autovideoconverter] Watch folder '/watch' processing terminated. [autovideoconverter] Executing post watch folder processing hook... post-watch folder processing: Watch folder = /watch watch folder empty, shutting down [autovideoconverter] Post watch folder processing hook exited with 0 [services.d] stopping services [services.d] stopping app... [services.d] stopping x11vnc... caught signal: 15 26/03/2019 23:50:01 deleted 40 tile_row polling images. [services.d] stopping statusmonitor... [services.d] stopping openbox... [services.d] stopping logmonitor... [services.d] stopping xvfb... [services.d] stopping autovideoconverter... [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. So again, thank you! Quote Link to comment
Djoss Posted March 27, 2019 Author Share Posted March 27, 2019 On 3/26/2019 at 4:41 AM, mbc0 said: Hi mate, sorry if I confused things, executing a chmod 777 does fix the issue but wondering why I am having to do it all the time to the handbrakedocker output folder? never had to before... Do you have another container/application that could change the permission on the folder? Quote Link to comment
mbc0 Posted March 27, 2019 Share Posted March 27, 2019 2 minutes ago, Djoss said: Do you have another container/application that could change the permission on the folder? Hi, Only Handbrake Docker Can Access The Folder, I already thought of that as you guided me that way before! 🙂 Quote Link to comment
Djoss Posted March 27, 2019 Author Share Posted March 27, 2019 7 minutes ago, mbc0 said: Hi, Only Handbrake Docker Can Access The Folder, I already thought of that as you guided me that way before! 🙂 Do you know at which moment the permissions are changed? Or what trigger the change? Quote Link to comment
chris_netsmart Posted March 28, 2019 Share Posted March 28, 2019 On 3/19/2019 at 4:32 PM, Djoss said: Try to copy-paste or download the script from https://gist.githubusercontent.com/jlesage/b2770b32bcfb8d1138887d86673ad8a8/raw/b82a2a089e7bd63d74d5d66cff4d8798763c3d1b/pre_conversion.sh. It's working for me. I have checked my code and it is the same as the above, but I am still getting that error :-( Quote Link to comment
mbc0 Posted March 28, 2019 Share Posted March 28, 2019 On 3/27/2019 at 2:36 PM, Djoss said: Do you know at which moment the permissions are changed? Or what trigger the change? Not yet mate, I will see what happens after a reboot tomorrow morning and let you know Quote Link to comment
cybrnook Posted March 28, 2019 Share Posted March 28, 2019 31 minutes ago, chris_netsmart said: I have checked my code and it is the same as the above, but I am still getting that error 😞 Could you not add a chmod and chown in your script to clean up after the mkdir and mv's? Quote Link to comment
chris_netsmart Posted March 29, 2019 Share Posted March 29, 2019 12 hours ago, cybrnook said: Could you not add a chmod and chown in your script to clean up after the mkdir and mv's? Can you please give me an example as my level of coding in shell is zero. And the above code was giving to me. Quote Link to comment
Djoss Posted March 29, 2019 Author Share Posted March 29, 2019 16 hours ago, chris_netsmart said: I have checked my code and it is the same as the above, but I am still getting that error 😞 Make sure to download the file. Sometime, copy-pasting from web browser introduce some undesired, invisible utf-8 characters. wget https://gist.githubusercontent.com/jlesage/b2770b32bcfb8d1138887d86673ad8a8/raw/b82a2a089e7bd63d74d5d66cff4d8798763c3d1b/pre_conversion.sh mv pre_conversion.sh /mnt/user/appdata/HandBrake/hooks Quote Link to comment
chris_netsmart Posted March 29, 2019 Share Posted March 29, 2019 4 hours ago, Djoss said: Make sure to download the file. Sometime, copy-pasting from web browser introduce some undesired, invisible utf-8 characters. wget https://gist.githubusercontent.com/jlesage/b2770b32bcfb8d1138887d86673ad8a8/raw/b82a2a089e7bd63d74d5d66cff4d8798763c3d1b/pre_conversion.sh mv pre_conversion.sh /mnt/user/appdata/HandBrake/hooks thanks that did the trick Quote Link to comment
IamSpartacus Posted April 3, 2019 Share Posted April 3, 2019 Just set this docker up and my conversions from the watch directory are failing with the following error: mktemp: No such file or directory [autovideoconverter] ERROR: Failed to create temporary directory under 'SAME_AS_SRC'. I'm using the variable value SAME_AS_SRC for the key AUTOMATED_CONVERSION_OUTPUT_DIR. Thoughts? Quote Link to comment
Djoss Posted April 3, 2019 Author Share Posted April 3, 2019 12 hours ago, IamSpartacus said: Just set this docker up and my conversions from the watch directory are failing with the following error: mktemp: No such file or directory [autovideoconverter] ERROR: Failed to create temporary directory under 'SAME_AS_SRC'. I'm using the variable value SAME_AS_SRC for the key AUTOMATED_CONVERSION_OUTPUT_DIR. Thoughts? It seems that you are referring to the wrong variable. The value "SAME_AS_SRC" is applicable only to AUTOMATED_CONVERSION_OUTPUT_SUBDIR. Quote Link to comment
IamSpartacus Posted April 3, 2019 Share Posted April 3, 2019 5 minutes ago, Djoss said: It seems that you are referring to the wrong variable. The value "SAME_AS_SRC" is applicable only to AUTOMATED_CONVERSION_OUTPUT_SUBDIR. Yup, that was it. Thank you! Quote Link to comment
IamSpartacus Posted April 3, 2019 Share Posted April 3, 2019 Does anyone have this setup on some sort of a schedule so the container is only encoding say overnight when one's server is more likely to be idle? Quote Link to comment
Jorgen Posted April 3, 2019 Share Posted April 3, 2019 Does anyone have this setup on some sort of a schedule so the container is only encoding say overnight when one's server is more likely to be idle?Yep, I do. I have a script on a cron schedule in User Scripts that checks if the watch folder contains any files once every night. If it does, the script starts the container.Then I use a hook script to shut down the container when the watch folder is empty. See a few posts up for that script.End result is that Handbrake only runs at night, and only when there is work to be done. I can post the start script when I get home tonight if you’re interested?Sent from my iPhone using Tapatalk Quote Link to comment
IamSpartacus Posted April 3, 2019 Share Posted April 3, 2019 2 hours ago, Jorgen said: Yep, I do. I have a script on a cron schedule in User Scripts that checks if the watch folder contains any files once every night. If it does, the script starts the container. Then I use a hook script to shut down the container when the watch folder is empty. See a few posts up for that script. End result is that Handbrake only runs at night, and only when there is work to be done. I can post the start script when I get home tonight if you’re interested? Sent from my iPhone using Tapatalk Yes thank you that would be super helpful! Quote Link to comment
Jorgen Posted April 4, 2019 Share Posted April 4, 2019 9 hours ago, IamSpartacus said: Yes thank you that would be super helpful! Here you go, just edit with your own watch folder path and set it up on a schedule with User Scripts. The script will first check that the folder exists, then start Handbrake if the folder is not empty. #!/bin/bash # Set the path to the Handbrake watch folder as seen from the Unraid command line WATCH="/mnt/user/Media/Handbrake_hotfolder/watch" if [ -d "$WATCH" ] && [ -n "$(ls -A "/$WATCH")" ]; then docker start HandBrake logger "HandBrake started by User Scripts" fi And here's what I do to stop it once the watch folder is emptied again. I only use the watch folder to process files. Not sure if this is safe to run if you are also processing files via the GUI at the same time. I think it will shut down the container mid-processing in that case. Quote Link to comment
IamSpartacus Posted April 4, 2019 Share Posted April 4, 2019 3 hours ago, Jorgen said: Here you go, just edit with your own watch folder path and set it up on a schedule with User Scripts. The script will first check that the folder exists, then start Handbrake if the folder is not empty. #!/bin/bash # Set the path to the Handbrake watch folder as seen from the Unraid command line WATCH="/mnt/user/Media/Handbrake_hotfolder/watch" if [ -d "$WATCH" ] && [ -n "$(ls -A "/$WATCH")" ]; then docker start HandBrake logger "HandBrake started by User Scripts" fi And here's what I do to stop it once the watch folder is emptied again. I only use the watch folder to process files. Not sure if this is safe to run if you are also processing files via the GUI at the same time. I think it will shut down the container mid-processing in that case. Thank you for this. I've been thinking a lot about how I want to accomplish encodes and I've come up with a little bit of a different configuration that I'm looking to implement. I don't want handbrake to run the moment a file is downloaded because I don't want handbrake running during "primetime" hours. So having a script waiting for a file in the watch directory isn't really great because I won't have control over when handbrake is running. However, what I don't want is for movies and tv shows to take longer to be available because with OMBI for requests my users (and myself) have gotten very used to requesting a movie and having it available in 5-10 minutes (thanks to Gigabit internet). So what I'm thinking is to sort of take advantage of the intermediate period where media sits on my cache pool (I only move files once a day) and have my handbrake "watch" folder be something like /mnt/cache/Media. This way, Sonarr and Radarr will add those files to Plex as soon as they are downloaded and users can watch them. Then I'd have a script set to startup handbrake and convert all new media sitting on cache. Then once the conversions are done, handbrake shuts back down and then the mover kicks off. Quote Link to comment
IamSpartacus Posted April 4, 2019 Share Posted April 4, 2019 (edited) Ok so I have handbrake watching my /mnt/cache/Media directory now. The issue I'm running into is using the SAME_AS_SRC key value for AUTOMATED_CONVERSION_OUTPUT_SUBDIR. It can't start the conversion because the file already exists (obviously since it's trying to name the new file the same as the old one in the same directory). Trying to figure out a way to make this work. Edited April 4, 2019 by IamSpartacus Quote Link to comment
Djoss Posted April 4, 2019 Author Share Posted April 4, 2019 19 minutes ago, IamSpartacus said: Ok so I have handbrake watching my /mnt/cache/Media directory now. The issue I'm running into is using the SAME_AS_SRC key value for AUTOMATED_CONVERSION_OUTPUT_SUBDIR. It can't start the conversion because the file already exists (obviously since it's trying to name the new file the same as the old one in the same directory). Trying to figure out a way to make this work. Having the watch and output folders pointing to the same location won't work. From what I understand, it seems that you try to accomplish something like this: Quote Link to comment
Recommended Posts
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.