diff --git a/PKGBUILD b/PKGBUILD index 1b109ce..3c2effc 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Misti pkgname=compressor-git -pkgver=r16.0a9cb23 +pkgver=r17.739419a pkgrel=1 pkgdesc="Video compressor service that watches input directory and compresses videos using ffmpeg" arch=('x86_64' 'aarch64') diff --git a/cmd/compressor/config.go b/cmd/compressor/config.go index 278224f..7690266 100644 --- a/cmd/compressor/config.go +++ b/cmd/compressor/config.go @@ -23,7 +23,7 @@ const ( defaultStabilityDuration = 3 * time.Second ) -const defaultFFMPEGCommand = "-y -hide_banner -nostats -hwaccel cuda -hwaccel_device 0 -i {{input}} -c:v hevc_nvenc -qp 25 -preset p6 -gpu 0 -b_qfactor 1.1 -b_ref_mode middle -bf 3 -g 250 -i_qfactor 0.75 -max_muxing_queue_size 1024 -multipass 1 -rc vbr -rc-lookahead 20 -temporal-aq 1 -tune hq -c:a aac -af volume=2.0 {{output}}" +const defaultFFMPEGCommand = "-y -hide_banner -nostats -hwaccel cuda -hwaccel_device 0 -i {{input}} -c:v hevc_nvenc -vf format=nv12 -qp 25 -preset p6 -gpu 0 -b_qfactor 1.1 -b_ref_mode middle -bf 3 -g 250 -i_qfactor 0.75 -max_muxing_queue_size 1024 -multipass 1 -rc vbr -rc-lookahead 20 -temporal-aq 1 -tune hq -c:a aac -af volume=2.0 {{output}}" const defaultFFMPEGCommandCPU = "-y -hide_banner -nostats -i {{input}} -c:v libx265 -preset slow -crf 24 -c:a aac -af volume=2.0 {{output}}" diff --git a/compressor.service b/compressor.service index 47d084e..456ff08 100644 --- a/compressor.service +++ b/compressor.service @@ -11,8 +11,8 @@ Environment=INPUT_DIR=/srv/syncthing/compressor_input Environment=OUTPUT_DIR=/srv/syncthing/compressor_output # FFmpeg configuration # Environment=FFMPEG_BIN=ffmpeg -# Environment=FFMPEG_COMMAND=-y -hwaccel cuda -hwaccel_device 0 -i {{input}} -c:v hevc_nvenc -qp 25 -preset p6 -gpu 0 -b_qfactor 1.1 -b_ref_mode middle -bf 3 -g 250 -i_qfactor 0.75 -max_muxing_queue_size 1024 -multipass 1 -rc vbr -rc-lookahead 20 -temporal-aq 1 -tune hq -c:a aac -af volume=2.0 {{output}} -# Environment=FFMPEG_COMMAND_CPU=-y -i {{input}} -c:v libx265 -preset slow -crf 24 -c:a aac -af volume=2.0 {{output}} +# Environment=FFMPEG_COMMAND="-y -hwaccel cuda -hwaccel_device 0 -i {{input}} -c:v hevc_nvenc -qp 25 -preset p6 -gpu 0 -b_qfactor 1.1 -b_ref_mode middle -bf 3 -g 250 -i_qfactor 0.75 -max_muxing_queue_size 1024 -multipass 1 -rc vbr -rc-lookahead 20 -temporal-aq 1 -tune hq -c:a aac -af volume=2.0 {{output}}" +# Environment=FFMPEG_COMMAND_CPU="-y -hide_banner -nostats -i {{input}} -c:v libx265 -preset slow -crf 24 -c:a aac -af volume=2.0 {{output}}" # Processing options # Environment=DELETE_SOURCE=false # Environment=PROCESSING_SUFFIX=.processing @@ -31,4 +31,4 @@ Restart=on-failure RestartSec=5 [Install] -WantedBy=default.target \ No newline at end of file +WantedBy=default.target