Jellyfin Forum
Do the transcoding quality settings actually work? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Do the transcoding quality settings actually work? (/t-do-the-transcoding-quality-settings-actually-work)



Do the transcoding quality settings actually work? - flo f - 2024-03-05

I changed CRF for H264 to a different value but I don't see where it would be reflected in the call to ffmpeg. Does this setting actually do anything? And how about the encoding preset? I have it on Ultrafast but it doesn't seem to make any difference to fast.

Code:
/usr/lib/jellyfin-ffmpeg/ffmpeg -analyzeduration 200M -init_hw_device vaapi=va:,kernel_driver=i915,driver=iHD -init_hw_device qsv=qs@va -init_hw_device opencl=ocl@va -filter_hw_device ocl -autorotate 0 -canvas_size 1920x1080 -i file:"/mnt/data/usenet/library/movies/movie.mkv" -map_metadata -1 -map_chapters -1 -threads 0 -map 0:0 -map 0:2 -map -0:0 -codec:v:0 h264_qsv -low_power 1 -preset 7 -look_ahead 0 -b:v 6616000 -maxrate 6616000 -bufsize 13232000 -g:v:0 72 -keyint_min:v:0 72 -filter_complex "[0:3]scale=s=1920x1080:flags=fast_bilinear[sub];[0:0]setparams=color_primaries=bt2020:color_trc=smpte2084:colorspace=bt2020nc,scale=trunc(min(max(iw\,ih*a)\,1920)/2)*2:trunc(ow/a/2)*2,format=yuv420p[main];[main][sub]overlay=eof_action=pass:shortest=1:repeatlast=0" -start_at_zero -codec:a:0 libfdk_aac -ac 2 -ab 384000 -af "volume=2" -copyts -avoid_negative_ts disabled -max_muxing_queue_size 2048 -f hls -max_delay 5000000 -hls_time 3 -hls_segment_type mpegts -start_number 0 -hls_segment_filename "/var/lib/jellyfin/transcodes/d94ee3b60f37f3a8af08debcb4e2332b%d.ts" -hls_playlist_type vod -hls_list_size 0 -y "/var/lib/jellyfin/transcodes/d94ee3b60f37f3a8af08debcb4e2332b.m3u8"



RE: Do the transcoding quality settings actually work? - Efficient_Good_5784 - 2024-03-05

Are you using HWA (GPU transcoding)? Looks like you're using either VAAPI or QSV from the log you shared.

In my experience, those encode settings only apply to CPU transcoding.


RE: Do the transcoding quality settings actually work? - gnattu - 2024-03-05

Quote:In my experience, those encode settings only apply to CPU transcoding.

Yes. These settings only applies to CPU encoders.

These CRF settings typically have no effect on hardware encoders because:
  • The hardware vendor's own metrics, such as "CQ," have different interpretations across vendors, and they differ from the CRF used in software encoders.
  • Most of the time, we will have a bitrate limit that overrides the constant quality setting on hardware encoders. The actual override policy is vendor-specific.

If you want to trade off quality for speed, you can select an Encoding Preset. We have some internal mappings from these presets to hardware vendor-defined quality levels.