diff --git a/README.md b/README.md index a4c330d..12d6b29 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,21 @@ -V3.1 -README COMING SOON +V3 +USAGE: +`bash transcode.sh [num. transcodes]` + +Presumes you have ffmpeg (V > 4.4), ffprobe, bc, ssh, rsync, scp. + +Will take in the files listed at $hostFile (default is `/tmp/transcode/list.txt` +) and transcode them to x265. It will attempt to identify and burn-in foreign- +audio subtitle files (subtitle track < ~15% of the run time) if multiple +subtitle files are specified. You can either run until all files are processed +(without a following number); or for a specified number of loops. + +At present time I only have PGS subs done (the ones in most DVDs and/or Blu-rays +future progress would be other types). + +Will use your `~.ssh/config` file for the HostName, or you can use `localhost` +if it will be contained on the same system. Comments and concerns? Leave 'em, +don't know if I can address them, but there's a higher chance I'll address +something that way anyway. + +Your best bet is St. Isidore (patron St. of computers and those that use them) diff --git a/transcode.sh b/transcode.sh index d1290f8..3145637 100644 --- a/transcode.sh +++ b/transcode.sh @@ -9,7 +9,7 @@ #to pray to St. Isidore... good luck if you encounter issues. #Default operations, change if necessary -HostName="Clementine" #if localhost then will do locally (removes ssh/scp cmds) +HostName="localhost" #if localhost then will do locally (removes ssh/scp cmds) hostFile="/tmp/transcode/list.txt" tmpDIR="$PWD/tmpTranscode" workDIR="$PWD/transcode" @@ -30,20 +30,20 @@ function burnSubs { local tmpFL=$2 local outFL=$3 local track=$4 - - encode "$inFL" "$tmpFL" - - rm "$inFL" #SAVE SPACE - + #EVIDTNELY NECESSARY SO THAT FILES AREN'T 198+ HRS IN LEN. AT THE END local DURATION=$( ffprobe -loglevel error -show_entries format=duration \ - -of default=noprint_wrappers=1:nokey=1 "$tmpFL" ) + -of default=noprint_wrappers=1:nokey=1 "$inFL" ) - ffmpeg -hide_banner -loglevel error -stats -i "$tmpFL" \ + ffmpeg -hide_banner -loglevel error -stats -i "$inFL" \ -filter_complex "[0:v][0:s:$track]overlay[v]" -map "[v]" \ -map 0:a -c:a copy -map 0:s -map -0:s:$track -c:s copy \ -map_metadata 0 -map_chapters 0 -max_muxing_queue_size 9999 \ - -t $DURATION "$outFL" + -t $DURATION "$tmpFL" + + rm "$inFL" #SAVE SPACE + + encode "$tmpFL" "$outFL" } #MAIN FUNCTION BEGINS