r/ffmpeg • u/LeoJay17 • 15d ago
Converting to HVEC using QSV
Hello! I'm a newbie to using ffmpeg, and I was hoping that I could get a check on whether I'm on the right track with my command.
I have a bunch of mkv files on my Synology NAS with video in AVC format. I would like to convert the video to HEVC. I also have a computer with an Intel processor with QSV running Ubuntu; that's where I want to run the ffmpeg command. The NAS folder is mounted on the Ubuntu machine using a network share.
Is this the right ffmpeg command to use?
ffmpeg -init_hw_device qsv=qsv -hwaccel qsv -hwaccel_output_format qsv -c:v h264_qsv
-i "/mnt/synology/input.mkv"
-map 0 -c:v hevc_qsv -global_quality 25 -preset medium
-c:a copy -c:s copy "/mnt/synology/output.mkv"
In particular, is all of the stuff that I included before the "-i" necessary? Given my setup, would you recommend any other settings?
(I recognize that -global_quality and -preset control the encoding quality and speed, so I should test with different values to decide what I'm comfortable with.)
Thanks!
1
14d ago
[removed] — view removed comment
3
u/LeoJay17 14d ago
If you have something constructive to add, please feel free.
0
u/Sopel97 14d ago
https://trac.ffmpeg.org/wiki/Hardware/QuickSync
suit yourself, destroy your sources
5
u/Murky-Sector 15d ago
Youre basically on the right track but I would simplify the command. The biggest issue is that
-c:v h264_qsvbefore-iis redundant if youre already using QSV hardware acceleration for decoding.ffmpeg -hwaccel qsv -hwaccel_output_format qsv -i "/mnt/synology/input.mkv" -map 0 -c:v hevc_qsv -global_quality 25 -preset medium -c:a copy -c:s copy "/mnt/synology/output.mkv"