Print " -d -dstdir - Target directory of new transcoded files. ![]() Print " -s -srcdir - Source directory of files to transcode. "~/Library/Application Support/HandBrake/EncodeLogs")ĭef_presets_plist = os.path.expanduser("~/.config/ghb/presets")ĭef_log_dir = os.path.expanduser("~/.config/ghb/EncodeLogs") "~/Library/Application Support/HandBrake/ist") Hbcli = "~/Source/hb/HandBrake/build.dbg/HandBrakeCLI"ĭef_ext = "ts,mp4,m4v,avi,mkv,mov,wmv,iso,vob" You can add any additional HandBrakeCLI options you like (after a "-" on the command line). You can set a list of file name extensions to match when searching for files to transcode. It can lanuch multiple instances of HandBrakeCLI simultaneously in order to more fully utilize the CPU. It creates activity log files for all encodes in the same place as the gui does (~/.config/ghb/EncodeLogs). n -dryrun - Show what would be done, but do nothing.It can use custom presets that you have created with the handbrake gui. I -instances - Set number of simultaneous encodes. L -log-dir - Directory where activity logs are stored. p -presets-file - Load custom preset file. e -ext - Set the source extensions to match.ĭefault ts,mp4,m4v,avi,mkv,mov,wmv,iso,vob r -recursive - Recursively process all subdirectories. d -dstdir - Target directory of new transcoded files. s -srcdir - Source directory of files to transcode. So for the script above, the file name would be "Cakes Show - E01"Ĭode: pyhb.py If it matters the actual video files are always named just like the directory but it also has the episode number. I would like it to just look in the /storage00/Temp/TV/ directory, convert the files, and then when it's done, move the file to the appropriate directory under /storage00/Temp/TV/, while still moving the original file to a Completed directory. The process works the way I want it to, but I really want it down to one script if it's possible. ![]() #move the original folder so it doesn't convert again Mv *.mp4 "/storage00/Video/Share/TV Shows/Cakes Show" #finds all files recursively in folders and converts them to mp4įind "$TRANSCODEDIR"/* -type f -exec bash -c 'HandBrakeCLI -i "$1" -o "$ \ TRANSCODEDIR="/storage00/Temp/TV/Cakes Show" You can list them by running: "HandBrakeCLI $ # Change this to specify a different handbrake preset.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |