diff --git a/265_personal b/265_personal index f0233e8..415b4e3 100755 --- a/265_personal +++ b/265_personal @@ -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 \ diff --git a/265_system b/265_system index 35a8b1d..caa2844 100755 --- a/265_system +++ b/265_system @@ -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 \ diff --git a/LICENSE b/LICENSE index d449d3e..1672bf1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) +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 diff --git a/README.md b/README.md index 7f7454f..31b26c6 100644 --- a/README.md +++ b/README.md @@ -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