A little more cleanup

hwip
Hugh Smalley 1 year ago
parent c285782c84
commit a36c47483b
No known key found for this signature in database

@ -2,10 +2,6 @@
set -o pipefail
IFS=$'\n\t'
pro_dir="/opt/amdgpu-pro/etc/vulkan/icd.d"
export LD_LIBRARY_PATH="/opt/amdgpu/libdrm/lib64:/opt/amdgpu/libdrm/lib32:$LD_LIBRARY_PATH"
export VK_ICD_FILENAMES="${pro_dir}/amd_icd32.json:${pro_dir}/amd_icd64.json"
for video; do
if [[ ! -f "${video}.json" ]]; then
ffprobe -v quiet -print_format json -show_streams "${video}" > "${video}.json"
@ -31,6 +27,3 @@ for video; do
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 \

@ -16,6 +16,9 @@ for video; do
video_codec=$(jq -r '.streams[0].codec_name' < "${video}.json")
video_height=$(jq -r '.streams[0].height' < "${video}.json")
echo -e "${video} // ${video_codec} // ${video_height}"
if [[ ${video_codec} =~ "av1" ]]; then
exit
fi
if [[ ! ${video_codec} =~ "hevc" || ${video_height} -gt 1080 ]]; then
_filename=$(echo "${filename}" | sed -e 's/h264/x265/g' -e 's/x264/x265/g' -e 's/AVC/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 \

@ -1,6 +1,6 @@
MIT License
Copyright (c) <year> <copyright holders>
Copyright (c) 2022 Hugh Smalley
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

@ -1,6 +1,6 @@
# convert265
# [convert265](https://github.com/hsmalley/convert265)
Script to convert media to x265
Scripts to convert media to x265
These are mostly a hack job since I'm trying to save space for my media by converting things into HEVC.
@ -12,17 +12,20 @@ the NVIDIA in a few years, so it's kinda stale.
265_system is the one that you should use if you're going to use it.
265_qsv uses Intel Quick Sync to use your igpu.
265_qsv uses Intel Quick Sync to use your igpu.
You'll have to compile ffmpeg with the --enable-libmfx option to enable qsv support. I think jellyfin/emby include qsv with their builds too.
You'll have to compile ffmpeg with the --enable-libmfx option to enable qsv support. I think jellyfin/emby include qsv
with their builds too.
Adjust the -global_quality flag to change the quality. The lower the number the higher the bitrate. 20 seems to be a good balance of quality vs file size.
Adjust the -global_quality flag to change the quality. The lower the number the higher the bitrate. 20 seems to be a
good balance of quality vs file size.
Here's the options I used to compile it and make qsv work for me:
```text
--enable-gpl --enable-version3 --enable-gnutls --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-libmfx
```
I use it with parallel to do multiple files at once like this:
```shell

Loading…
Cancel
Save