[Support] Djoss - HandBrake


Recommended Posts

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:

 

 

127843402_FireShotCapture007-HandBrake-192_168.1_236.png.72084ce98352f60615ef006b0e136391.png

1721516686_FireShotCapture008-BANANAVM_UpdateContainer-192_168.1_236.png.9ba1446ec203d414293fb0d874e727e2.png

 

From the handbrake UI you need to set the destination folder to:

/output/finished

 

 

 

Sent from my iPhone using Tapatalk

Link to comment
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

Link to comment
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?

Link to comment
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...

 

image.png.7cdd320c3e942839bcf486f09d98fdca.png

image.png

Link to comment
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!

Link to comment
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...

 

image.png.7cdd320c3e942839bcf486f09d98fdca.png

image.png

Do you have another container/application that could change the permission on the folder?

Link to comment
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

 

Link to comment
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

Link to comment

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?

Link to comment
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.

Link to comment
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
Link to comment
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!

Link to comment
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.

 

Link to comment
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.

Link to comment

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 by IamSpartacus
Link to comment
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:

 

 

 

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.