A few fixes

main
Hugh Smalley 1 year ago
parent e517b51e53
commit b7309e5bb3
No known key found for this signature in database

12
265

@ -63,7 +63,7 @@ function convert_video_vappi_memory() {
-vf 'scale_vaapi=format=p010,scale_vaapi=w=1920:-2' -c:v hevc_vaapi -profile:v main10 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags "/dev/shm/${_filename}.mkv" || exit 1
mv -vu "/dev/shm/${_filename}" "${d}/${_filename}" || rm -f "/dev/shm/${_filename}.mkv"
file_size=$(stat -c%s "${d}/${_filename}.mp4")
file_size=$(stat -c%s "${d}/${_filename}.mkv")
# To account for the space space savings of being converted
if ((file_size >= video_size_50)); then
cleanup
@ -76,7 +76,7 @@ function convert_video_vaapi() {
-i "${video}" -map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy -c:a copy \
-vf 'scale_vaapi=format=p010,scale_vaapi=w=1920:-2' -c:v hevc_vaapi -profile:v main10 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags "${d}/${_filename}.mkv" || exit 1
file_size=$(stat -c%s "${d}/${_filename}.mp4")
file_size=$(stat -c%s "${d}/${_filename}.mkv")
# To account for the space space savings of being converted
if ((file_size >= video_size_50)); then
cleanup
@ -86,11 +86,11 @@ function convert_video_vaapi() {
# Use Quick Sync to transcode video into memory then move it back to disk
function convert_video_qsv_memory() {
nice -n 19 ~/Downloads/ffmpeg/ffmpeg -hide_banner -loglevel quiet -y -threads 4 -hwaccel qsv -hwaccel_output_format qsv -analyzeduration 20000000 -probesize 20000000 \
-i "${video}" -map 0:v:0 -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy -c:a copy \
-i "${video}" -map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy -c:a copy \
-c:v hevc_qsv -low_power false -preset 4 -profile:v 1 -scenario 3 -look_ahead 1 -global_quality 20 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags "/dev/shm/${_filename}.mkv" || exit 1
mv -vu "/dev/shm/${_filename}" "${d}/${_filename}" || rm -f "/dev/shm/${_filename}.mkv"
file_size=$(stat -c%s "${d}/${_filename}.mp4")
file_size=$(stat -c%s "${d}/${_filename}.mkv")
# To account for the space space savings of being converted
if ((file_size >= video_size_50)); then
cleanup
@ -100,10 +100,10 @@ function convert_video_qsv_memory() {
# Use Quick Sync to transcode video
function convert_video_qsv() {
nice -n 19 ~/Downloads/ffmpeg/ffmpeg -hide_banner -loglevel quiet -y -threads 4 -hwaccel qsv -hwaccel_output_format qsv -analyzeduration 20000000 -probesize 20000000 \
-i "${video}" -map 0:v:0 -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy -c:a copy \
-i "${video}" -map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy -c:a copy \
-c:v hevc_qsv -low_power false -preset 4 -profile:v 1 -scenario 3 -look_ahead 1 -global_quality 20 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags "${d}/$_filename.mkv" || exit 1
file_size=$(stat -c%s "${d}/${_filename}.mp4")
file_size=$(stat -c%s "${d}/${_filename}.mkv")
# To account for the space space savings of being converted
if ((file_size >= video_size_50)); then
cleanup

Loading…
Cancel
Save