Browse Source

Localhost now default; added readme; changed order of sub. burning so resulting files are actually x265

master
rbeck4 2 years ago
parent
commit
44400c2f26
2 changed files with 30 additions and 11 deletions
  1. +21
    -2
      README.md
  2. +9
    -9
      transcode.sh

+ 21
- 2
README.md View File

@ -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)

+ 9
- 9
transcode.sh View File

@ -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

Loading…
Cancel
Save