Gog Posted August 19, 2015 Share Posted August 19, 2015 Thanks for the change. As for the directory, don't sweat it. I'll just do a symbolic link and forget about it. Quote Link to comment
Squid Posted August 19, 2015 Share Posted August 19, 2015 Thanks for the change. As for the directory, don't sweat it. I'll just do a symbolic link and forget about it. +1. A lot easier than what RobJ volunteered me for Quote Link to comment
RobJ Posted August 19, 2015 Share Posted August 19, 2015 Thanks for the change. As for the directory, don't sweat it. I'll just do a symbolic link and forget about it. +1. A lot easier than what RobJ volunteered me for Yeah, sorry! But it's a good idea, although not particularly brilliant or even that new! It could help with container management for the future. Maybe when you have an itch to program, and nothing better to do, you might think about a deprecation process. But yes, I guess I am creating work for others! * It would allow container authors to not feel trapped by first version design limitations. They can redesign it the way they want, using everything they have learned since the first version. * It would help in the situation where there are multiple containers for the same application. One or more of the authors could decide to discontinue theirs and mark it as 'Deprecated in favor of ___'. * It would help where containers appear to be abandoned. If let's say no one is able to contact anyone responsible for container X for a month, and it has serious shortcomings, and there is a suitable replacement, then several container authors could vote to 'Deprecate in favor of _Y_' or just 'Deprecated'. Quote Link to comment
Squid Posted August 19, 2015 Share Posted August 19, 2015 Thanks for the change. As for the directory, don't sweat it. I'll just do a symbolic link and forget about it. +1. A lot easier than what RobJ volunteered me for Yeah, sorry! But it's a good idea, although not particularly brilliant or even that new! It could help with container management for the future. Maybe when you have an itch to program, and nothing better to do, you might think about a deprecation process. But yes, I guess I am creating work for others! * It would allow container authors to not feel trapped by first version design limitations. They can redesign it the way they want, using everything they have learned since the first version. * It would help in the situation where there are multiple containers for the same application. One or more of the authors could decide to discontinue theirs and mark it as 'Deprecated in favor of ___'. * It would help where containers appear to be abandoned. If let's say no one is able to contact anyone responsible for container X for a month, and it has serious shortcomings, and there is a suitable replacement, then several container authors could vote to 'Deprecate in favor of _Y_'. Actually i am beginning to run out of ideas for CA. Not quite but getting to the end of my list. I'm sure my wife will thank you however - she already complains about the amount of time i spend on the "store" But, dockerMan already supports something like that (just not pretty) it automatically appends :latest as a tag to the repository it pulls. No idea how much work is involved for authors to support different versions but if a version is appended to the repository when you add the container, dockerMan will grab that version instead of latest Quote Link to comment
perfessor101 Posted August 22, 2015 Share Posted August 22, 2015 Hello Sparklyballs, Thanks you for this great container I'm hoping this is the right place to ask this ... I'm trying to do some scripting to convert the way convert.sh works (The Question) I was curious if I can SSH into the container so that I can see what my script is actually doing? or would recreating a similar virtual machine be easier? (The Endless rambling of a sleep deprived night shift worker) I'm trying to start compression off when a file gets dropped into the Watched-Folder, (already set up to do this) It selects the largest file to start compressing from the Watched-Folder Compresses it with my settings (using my old style two pass settings, can't get same size / quality from RF) When done it moves the uncompressed file from the Watched-Folder to the /Output folder beside the compressed file It then Selects the next file which is the largest from the /Movies directory and moves it to the Watched-Folder Where it hopefully starts again from the top ... repeating until the /Movies and the /Watched-Folder are both empty When I'm in Windows 7 and move a bunch of files to the /Movies folder (copies slow) then drag them into the watched folder (fast copy) it only ever seems to kick off compression on the first video. Each first video I drop in converts, but not the rest. Thanks for your time, Bobby this is the poorly mangled attempt so far #!/bin/bash ########### EDITABLE VARIABLES ########## DEST_EXT=mkv ######################################### ##### DO NOT CHANGE ANYTHING BELOW HERE ############### SRC=/nobody/.config/ghb/Watch-Folder DEST=/Output HANDBRAKE_CLI=HandBrakeCLI # wait for file system to stabilize between unRaid and container sleep 10 IFS=$(echo -en "\n\b") for FILE in `ls $SRC` do pushd /$SRC # select largest file over a week old OUTPUT="$(find . -name "*.ts" -mtime +7 -maxdepth 1 -type f -printf "%p:%s\n" | sort -t":" -k2 -n | tail -1 | cut -f1 -d":" )" if [ -z "$OUTPUT" ]; then exit 1; fi FULLFILENAME=$(basename $OUTPUT) FILENAME=$(echo "$FULLFILENAME" | sed 's/\.[^\.]*$//') EXTENSION=$(echo "$FULLFILENAME" | sed 's/^.*\.//') popd # convert video with my favorite settings for HD Content # need to add BITRATE variable for SD versus HD (1500 for SD, 3000 for HD) # is there a formula that would work (height times width manipulated by X for letterboxed material) # then again don't know autocrop settings until after starting $HANDBRAKE_CLI --previews 20 -v -i $SRC/$FULLFILENAME -o $DEST/$FILENAME.$DEST_EXT --subtitle 1, -e x264 -T -x b-adapt=2:rc-lookahead=30 -b 3000 -a 1 -E faac -B 160 --decomb -2 >/nobody/.config/EncodeLogs/$FILENAME.log # move source to destination after conversion mv $SRC/$FULLFILENAME $DEST/$FULLFILENAME # chown all FILENAME to nobody:users chown nobody:users $DEST/$FILENAME.* # remove symlinks of last file converted # find /$SRC -name "$FILENAME.$EXTENSION" -maxdepth 1 -type l -exec rm -f {} \; # files to be converted (Next) pushd /Movies/ # select largest file over a week old OUTPUT="$(find . -name "*.ts" -mtime +7 -maxdepth 1 -type f -printf "%p:%s\n" | sort -t":" -k2 -n | tail -1 | cut -f1 -d":" )" if [ -z "$OUTPUT" ]; then break; fi FULLFILENAME=$(basename $OUTPUT) FILENAME=$(echo "$FULLFILENAME" | sed 's/\.[^\.]*$//') EXTENSION=$(echo "$FULLFILENAME" | sed 's/^.*\.//') popd # move in next largest video # drop in a symbolic link to trigger next conversion ? mv /Movies/$output /$SRC chown nobody:users /$SRC/$output done Quote Link to comment
trurl Posted August 22, 2015 Share Posted August 22, 2015 ... (The Question) I was curious if I can SSH into the container so that I can see what my script is actually doing? or would recreating a similar virtual machine be easier? ... docker exec -it container-name bash will give you a bash session inside a container. Quote Link to comment
Bitbass Posted August 22, 2015 Share Posted August 22, 2015 Thanks for setting this up. When I try to connect to it I'm getting the xrdp selection screen, some of the scrolling setup, and then a grey moire screen. I never get to handbrake. I've tried different browsers and both OS X and Win10. Quote Link to comment
perfessor101 Posted August 23, 2015 Share Posted August 23, 2015 ... (The Question) I was curious if I can SSH into the container so that I can see what my script is actually doing? or would recreating a similar virtual machine be easier? ... docker exec -it container-name bash will give you a bash session inside a container. Thank you trurl, this will help me see what kind of a mess I tried to mix into Sparklyballs good work Quote Link to comment
Chris Pollard Posted September 4, 2015 Share Posted September 4, 2015 Nice work, thanks for this. Quote Link to comment
thanhtran Posted September 16, 2015 Share Posted September 16, 2015 ... (The Question) I was curious if I can SSH into the container so that I can see what my script is actually doing? or would recreating a similar virtual machine be easier? ... docker exec -it container-name bash will give you a bash session inside a container. Thank you trurl, this will help me see what kind of a mess I tried to mix into Sparklyballs good work perfessor101 , I like your script ideas (moving file in and out watch folder, so you can monitor the process of Handbrake, cool). can you share your script when it work ? I have a lot of files to encore to .mkv container, hope your script will help me convert quicker. Thanks Thanks Quote Link to comment
thanhtran Posted September 17, 2015 Share Posted September 17, 2015 ... (The Question) I was curious if I can SSH into the container so that I can see what my script is actually doing? or would recreating a similar virtual machine be easier? ... docker exec -it container-name bash will give you a bash session inside a container. trurl , I install HB docker, It is seem working correct in GUI. But when I copy couple files to location Watch folder , video file doesn't convert by HB , even I manually start and stop Icon HB from docker tab, seem script file convert.sh not kick in . Do I need to run script convert.sh from terminal console ? I'm not Linux guy, pls gentle me. Thanks Quote Link to comment
chrissi5120 Posted September 19, 2015 Share Posted September 19, 2015 Thanks for that docker, really.. power per watt from my xeon 1220lv2 unraid box is sooooo much better then my i7 3820.. i guess you are saving some trees with this Quote Link to comment
dikkiedirk Posted October 26, 2015 Share Posted October 26, 2015 Looks very promising. Thank you for this docker I have a question that is Handbrake related. Let's say I have a bunch of wmv files in /user/media/Anime which I want to convert to mp4. I want the mp4 files saved in the same folder. Is this possible? What is the easiest way to accomplish this? Quote Link to comment
jtroberts Posted October 30, 2015 Share Posted October 30, 2015 Sparklyballs, first thank you for all your work. The dockers really make unraid awesome. I've been using your handbrake docker for sometime without issue. I see this question was brought up before and you responded that libdvdcss was not included in the HB docker. Are you interested in pursuing this? If not can you assist me? I've had HB working with libdvdcss before and it makes the backup process a lot simpler but lost this by switching to Unraid from a standalone server. Any help is greatly appreciated. Thanks Quote Link to comment
bakes82 Posted November 16, 2015 Share Posted November 16, 2015 How would we add a cron/job that would run the convert script every min? I have the same problem above, if you copy in multiple files it only converts the first one. Quote Link to comment
bakes82 Posted November 16, 2015 Share Posted November 16, 2015 Here is my modified script, it runs as a cron every 1 min. It looks in the watch folder for files and then removes it from the watch folder after being transcoded. It also checks to make sure only 1 instance of the script is running. #!/bin/bash # check if we are the only local instance if [[ "`pidof -x $(basename $0) -o %PPID`" ]]; then echo "This script is already running with PID `pidof -x $(basename $0) -o %PPID`" exit fi ########### EDITABLE VARIABLES ########## DEST_EXT=mp4 PRESET=Roku ######################################### ##### DO NOT CHANGE ANYTHING BELOW HERE ############### SRC=/Watch DEST=/Output HANDBRAKE_CLI=HandBrakeCLI IFS=$(echo -en "\n\b") for FILE in `ls $SRC` do filename=$(basename $FILE) extension=${filename##*.} filename=${filename%.*} $HANDBRAKE_CLI -i $SRC/$FILE -o $DEST/$filename.$DEST_EXT --preset $PRESET chown nobody:users $DEST/$filename.$DEST_EXT rm -rf $SRC/$FILE done Quote Link to comment
jtroberts Posted November 19, 2015 Share Posted November 19, 2015 I think what I am talking about is a bit different. Instead of using MakeMKV to backup a disc, you can integrate the libdvdcss dll into handbrake. this way when you open HB, select source, /dev/sr0/ it can decrypt the disc and encode all in one step. right now I have 2 steps, 1. MakeMKV to "extract and decode", 2. HB to re-encode and compress. I really wish SparklyBalls would respond. If he doesn't want to do it that's fine, but some guidance so I can do a tutorial would be helpful. Thanks Quote Link to comment
dikkiedirk Posted November 22, 2015 Share Posted November 22, 2015 How long should encoding a 30 min. HEVC h265 to AVC h264 take? What avg. fps can be expected? Quote Link to comment
jumperalex Posted November 22, 2015 Share Posted November 22, 2015 totally depends on your hardware Quote Link to comment
dikkiedirk Posted November 23, 2015 Share Posted November 23, 2015 I am loosing track here. I have the mappings set up like this: /Output ? /mnt/cache/videos/AVI/ /nobody/.config/ghb ? /mnt/cache/ /Movies ? /mnt/user/videos/AVI/ However I cant locate the converted files. I expected them to find in /mnt/cache/videos/AVI/ But they don't show up there. Handbrake ends the conversion normally without errors. Is there something wrong with my setup? Or are the files written to the docker. img this way? Quote Link to comment
Leifgg Posted November 23, 2015 Share Posted November 23, 2015 Haven’t used this Docker for a while but check if you selected the Output folder in the Handbrake GUI as well. Quote Link to comment
dikkiedirk Posted November 23, 2015 Share Posted November 23, 2015 Haven’t used this Docker for a while but check if you selected the Output folder in the Handbrake GUI as well. Thanks, but what do these settings do? I have options nobody desktop filesystem and other. I would like to save it in the same folder as the source file. Quote Link to comment
Leifgg Posted November 23, 2015 Share Posted November 23, 2015 There are two folders inside the Handbrake Container, Output and Movies. The Output folder is directed to /mnt/cache/videos/AVI/ (on your cache drive) The Movies folder is directed to /mnt/user/videos/AVI/ (on your array) If you want both the Output and Movies folder directed to same location you need to change the mappings. Edit: I looked a bit more into this and your mappings are actually correct (but a bit confusing). For clarity I would use /mnt/cache/videos/AVI/ for both Output and Movies. Also make sure that the share videos is set to Use cache disk: Only in Share Settings. Otherwise the Mover could move your files to the array. The default settings for the Destination is set to nobody as default so you need to change that to the Output folder. Click the down arrow and select Other and browse for the Output folder. Tested your config and input and output files are in same folder. Quote Link to comment
saarg Posted November 23, 2015 Share Posted November 23, 2015 I am loosing track here. I have the mappings set up like this: /Output ? /mnt/cache/videos/AVI/ /nobody/.config/ghb ? /mnt/cache/ /Movies ? /mnt/user/videos/AVI/ However I cant locate the converted files. I expected them to find in /mnt/cache/videos/AVI/ But they don't show up there. Handbrake ends the conversion normally without errors. Is there something wrong with my setup? Or are the files written to the docker. img this way? Not related to your problem, but I thought I'd mention it anyway. You should not map any config to only /mnt/cache as you have done in the second mapping. You risk overwriting something if you have two dockers config pointing to /mnt/cache. Quote Link to comment
morbidpete Posted November 25, 2015 Share Posted November 25, 2015 Here is my modified script, it runs as a cron every 1 min. It looks in the watch folder for files and then removes it from the watch folder after being transcoded. It also checks to make sure only 1 instance of the script is running. #!/bin/bash # check if we are the only local instance if [[ "`pidof -x $(basename $0) -o %PPID`" ]]; then echo "This script is already running with PID `pidof -x $(basename $0) -o %PPID`" exit fi ########### EDITABLE VARIABLES ########## DEST_EXT=mp4 PRESET=Roku ######################################### ##### DO NOT CHANGE ANYTHING BELOW HERE ############### SRC=/Watch DEST=/Output HANDBRAKE_CLI=HandBrakeCLI IFS=$(echo -en "\n\b") for FILE in `ls $SRC` do filename=$(basename $FILE) extension=${filename##*.} filename=${filename%.*} $HANDBRAKE_CLI -i $SRC/$FILE -o $DEST/$filename.$DEST_EXT --preset $PRESET chown nobody:users $DEST/$filename.$DEST_EXT rm -rf $SRC/$FILE done Having the same problem as another on top. How to I get this to run. I modified the sample script provided by the docker but unsure how to get it to kick off. So i need to add something to my go line? like make another sh that loops and calls the handbrake script? End goal here. Plug my microsd reader with card from my quad copter into my box, have unassigned devices auto mount and copy video files to watch folder, have watch folder be converted to output folder that Plex scans for my quad videos. I have the unassigned devices part working. just need them to auto convert now :-( 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.