formatting and corrections

hwip
Hugh Smalley 2 years ago
parent 2edf221250
commit 1862da5b75

10
265

@ -26,14 +26,14 @@ for video; do
else
poster=""
fi
if [[ ! ${video_codec} =~ "HEVC" ]] || [[ ! ${audio_codec} =~ "Opus" ]] ; then
if [[ ! ${video_codec} =~ "HEVC" ]] || [[ ! ${audio_codec} =~ "Opus" ]]; then
_filename=$(echo "${filename}" | sed -e 's/h264/x265/g' -e 's/x264/x265/g' -e 's/XviD/x265/g' -e 's/AAC/Opus/g' -e 's/DTS/Opus/g' -e 's/EAC3/Opus/g' -e 's/AC3/Opus/g' -e 's/TrueHD/Opus/g' -e 's/Vorbis/Opus/g' -e 's/Atmos//g').mkv
#-c:a libopus -b:a 128k -vbr on -compression_level 10 -frame_duration 60 -application audio -mapping_family 1 -ac 6 \
~/convert265/tools/ffmpeg -hide_banner -loglevel info -y -hwaccel auto -analyzeduration 20000000 -probesize 20000000 \
-i "${video}" -map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy \
-c:v hevc_nvenc -rc-lookahead 30 -surfaces 64 -qmin 0 -qmax 24 -profile:v main10 -preset p7 -tune hq -multipass 1 \
-c:a libopus -b:a 128k -vbr on -compression_level 10 -frame_duration 60 -application audio -mapping_family 1 -ac 6 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags "/dev/shm/$_filename" || exit 1
-i "${video}" -map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy \
-c:v hevc_nvenc -rc-lookahead 30 -surfaces 64 -qmin 0 -qmax 24 -profile:v main10 -preset p7 -tune hq -multipass 1 \
-c:a libopus -b:a 128k -vbr on -compression_level 10 -frame_duration 60 -application audio -mapping_family 1 -ac 6 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags "/dev/shm/$_filename" || exit 1
cmp "/dev/shm/${_filename}" "${video}" || rm -vf "${video}"
mv -vu "/dev/shm/${_filename}" "${d}/${_filename}" || rm -f "/dev/shm/${_filename}"
fi

@ -17,21 +17,21 @@ for video; do
audio_codec=$(mediainfo --Inform="Audio;%Format%" "${video}")
video_codec=$(mediainfo --Inform="Video;%Format%" "${video}")
echo -e "${video} // ${video_codec} // ${audio_codec}"
if [[ ! ${video_codec} =~ "HEVC" ]] || [[ ! ${audio_codec} =~ "Opus" ]] ; then
if [[ ! ${video_codec} =~ "HEVC" ]] || [[ ! ${audio_codec} =~ "Opus" ]]; then
_filename=$(echo "${filename}" | sed -e 's/h264/x265/g' -e 's/x264/x265/g' -e 's/XviD/x265/g' -e 's/AAC/Opus/g' -e 's/DTS/Opus/g' -e 's/EAC3/Opus/g' -e 's/AC3/Opus/g' -e 's/TrueHD/Opus/g' -e 's/Vorbis/Opus/g' -e 's/Atmos//g')_H265.mkv
ffmpeg -hide_banner -loglevel info -y -threads 4 -hwaccel vaapi -hwaccel_output_format vaapi -hwaccel_device /dev/dri/renderD128 -analyzeduration 20000000 -probesize 20000000 \
-i "${video}" -map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy \
-vf 'scale_vaapi=format=p010,scale_vaapi=w=1920:-2' \
-c:v hevc_vaapi -profile:v main10 \
-c:a copy \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags \
"/dev/shm/$_filename" || exit 1
-i "${video}" -map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy \
-vf 'scale_vaapi=format=p010,scale_vaapi=w=1920:-2' \
-c:v hevc_vaapi -profile:v main10 \
-c:a copy \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags \
"/dev/shm/$_filename" || exit 1
mv -vu "/dev/shm/${_filename}" "${d}/${_filename}" || rm -f "/dev/shm/${_filename}"
if [[ -f "${d}/${_filename}" ]]; then
cmp "${d}/${_filename}" "${video}" || rm -vf "${video}"
fi
fi
done
#-vf 'format=p010,hwupload,scale=1920x1080:flags=lanczos' -c:v hevc_vaapi -profile:v main10 \
#-vf 'scale_vaapi=format=p010,scale_vaapi=w=1920' \
#-c:v hevc_vaapi -profile:v main10 -b:v 15M \
#-vf 'format=p010,hwupload,scale=1920x1080:flags=lanczos' -c:v hevc_vaapi -profile:v main10 \
#-vf 'scale_vaapi=format=p010,scale_vaapi=w=1920' \
#-c:v hevc_vaapi -profile:v main10 -b:v 15M \

@ -6,7 +6,6 @@ IFS=$'\n\t'
# find /mnt/ -maxdepth 25 -regex ".*\.\(mkv\|mp4\|wmv\|flv\|webm\|mov\|avi\|m4v\)" | parallel ./parallel_convert_265 {}
# OR
# parallel 'find {} -type f -name "*.mkv"' ::: /Muninn/TV /Muninn/Movies | parallel --progress ~/convert265/265 {}
# parallel 'find {} -type f -maxdepth 5 -regex ".*\.\(mkv\|mp4\|wmv\|flv\|webm\|mov\|avi\|m4v\)"' ::: /Muninn/TV /Muninn/Movies | parallel --jobs 2 --progress ~/convert265/265 {}
for video; do
@ -17,17 +16,15 @@ for video; do
audio_codec=$(mediainfo --Inform="Audio;%Format%" "${video}")
video_codec=$(mediainfo --Inform="Video;%Format%" "${video}")
echo -e "${video} // ${video_codec} // ${audio_codec}"
if [[ ! ${video_codec} =~ "HEVC" ]] || [[ ! ${audio_codec} =~ "Opus" ]] ; then
_filename=$(echo "${filename}" | sed -e 's/h264/x265/g' -e 's/x264/x265/g' -e 's/XviD/x265/g' -e 's/AAC/Opus/g' -e 's/DTS/Opus/g' -e 's/EAC3/Opus/g' -e 's/AC3/Opus/g' -e 's/TrueHD/Opus/g' -e 's/Vorbis/Opus/g' -e 's/Atmos//g').mkv
ffmpeg -hide_banner -loglevel info -y -threads 4 -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -analyzeduration 20000000 -probesize 20000000 \
-i "${video}" -map 0:v:0 -map 0:a \
-c:v hevc_vaapi -profile:v main10 \
-c:a libopus -b:a 128k -vbr on -compression_level 10 -frame_duration 60 -application audio -mapping_family 1 -ac 2 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags \
"/dev/shm/$_filename" || exit 1
if [[ ! ${video_codec} =~ "HEVC" ]]; then
_filename=$(echo "${filename}" | sed -e 's/h264/x265/g' -e 's/x264/x265/g' -e 's/XviD/x265/g').mkv
nice -n 19 ffmpeg -hide_banner -loglevel info -y -threads 4 -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -analyzeduration 20000000 -probesize 20000000 \
-i "${video}" -map 0:v:0 -map 0:a -c:a copy \
-c:v hevc_vaapi -profile:v main10 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags "/dev/shm/$_filename" || exit 1
mv -vu "/dev/shm/${_filename}" "${d}/${_filename}" || rm -f "/dev/shm/${_filename}"
if [[ -f "${d}/${_filename}" ]]; then
cmp "${d}/${_filename}" "${video}" || rm -vf "${video}" "/dev/shm/${_filename}-0.log"
cmp "${d}/${_filename}" "${video}" || rm -vf "${video}"
fi
fi
done

@ -6,7 +6,6 @@ IFS=$'\n\t'
# find /mnt/ -maxdepth 25 -regex ".*\.\(mkv\|mp4\|wmv\|flv\|webm\|mov\|avi\|m4v\)" | parallel ./parallel_convert_265 {}
# OR
# parallel 'find {} -type f -name "*.mkv"' ::: /Muninn/TV /Muninn/Movies | parallel --progress ~/convert265/265 {}
# parallel 'find {} -type f -maxdepth 5 -regex ".*\.\(mkv\|mp4\|wmv\|flv\|webm\|mov\|avi\|m4v\)"' ::: /Muninn/TV /Muninn/Movies | parallel --jobs 2 --progress ~/convert265/265 {}
for video; do
@ -17,14 +16,13 @@ for video; do
audio_codec=$(mediainfo --Inform="Audio;%Format%" "${video}")
video_codec=$(mediainfo --Inform="Video;%Format%" "${video}")
echo -e "${video} // ${video_codec} // ${audio_codec}"
if [[ ! ${video_codec} =~ "HEVC" ]] || [[ ! ${audio_codec} =~ "Opus" ]] ; then
_filename=$(echo "${filename}" | sed -e 's/h264/x265/g' -e 's/x264/x265/g' -e 's/XviD/x265/g' -e 's/AAC/Opus/g' -e 's/DTS/Opus/g' -e 's/EAC3/Opus/g' -e 's/AC3/Opus/g' -e 's/TrueHD/Opus/g' -e 's/Vorbis/Opus/g' -e 's/Atmos//g').mkv
if [[ ! ${video_codec} =~ "HEVC" ]]; then
_filename=$(echo "${filename}" | sed -e 's/h264/x265/g' -e 's/x264/x265/g' -e 's/XviD/x265/g').mkv
nice -n 19 ffmpeg -hide_banner -loglevel info -y -threads 4 -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -analyzeduration 20000000 -probesize 20000000 \
-i "${video}" -map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy \
-c:v hevc_vaapi -profile:v main10 \
-c:a libopus -b:a 128k -vbr on -compression_level 10 -frame_duration 60 -application audio -mapping_family 1 -ac 2 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags \
"/dev/shm/$_filename" || exit 1
-i "${video}" -map 0:v -map 0:a -map 0:s? -map 0:d? -map 0:t? -c:s copy \
-c:a libopus -b:a 128k -vbr on -compression_level 10 -frame_duration 60 -application audio -mapping_family 1 -ac 2 \
-c:v hevc_vaapi -profile:v main10 \
-max_muxing_queue_size 1024 -movflags +faststart -movflags use_metadata_tags "/dev/shm/$_filename" || exit 1
mv -vu "/dev/shm/${_filename}" "${d}/${_filename}" || rm -f "/dev/shm/${_filename}"
if [[ -f "${d}/${_filename}" ]]; then
cmp "${d}/${_filename}" "${video}" || rm -vf "${video}"

@ -16,12 +16,12 @@ for video; do
audio_codec=$(mediainfo --Inform="Audio;%Format%" "${video}")
video_codec=$(mediainfo --Inform="Video;%Format%" "${video}")
echo -e "${video} // ${video_codec} // ${audio_codec}"
if [[ ! ${video_codec} =~ "HEVC" ]] ; then
if [[ ! ${video_codec} =~ "HEVC" ]]; then
_filename=$(echo "${filename}" | sed -e 's/h264/x265/g' -e 's/x264/x265/g' -e 's/XviD/x265/g').mkv
nice -n 19 ffmpeg -hide_banner -loglevel info -y -threads 4 -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 -analyzeduration 20000000 -probesize 20000000 \
-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 "/dev/shm/$_filename" || exit 1
-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 "/dev/shm/$_filename" || exit 1
mv -vu "/dev/shm/${_filename}" "${d}/${_filename}" || rm -f "/dev/shm/${_filename}"
if [[ -f "${d}/${_filename}" ]]; then
cmp "${d}/${_filename}" "${video}" || rm -vf "${video}"

Loading…
Cancel
Save