Encoding/Compression Video and Audio Mega Thread

This is gonna hopefully be a thread to provide support, and general discussion for encoding/transcoding/compresssion of multimedia.

4 Likes

What was your docker config for tdarr+av1+intel arc. I want to recreate the situation you saw

I have been encoding av1 for about 3 and a half years. Before that hevc/x265.

Anyways I just picked up two intel arc gpus to mess with. Traditionally I encode with cpu.

1 Like

I deplore the slowness but also I really need to go easy on my CPU. Ive already disabled some buggy hardware onboard (disabled uOP cache and Watchdog HW Timers). It seriously doesnt need to be thrashed. Normal loads only haha

stock tdarr docker, arc passed to the container, and flow method of encoding. I setup ffmpeg flow chart and it just was a pain in the butt. No icq(crf) and no 10bit support.

Truenas > Truenas APP(TDARR[docker]) (ubuntu 20.04). I had gpu passed through and it would work I just had to manually set bit rate and could not use 10bit.

I got it fully working by passing through to a windows vm and installing native app (not docker).

tdarr flow chart

av1 parameters
image

-pix_fmt p010le -c:v av1_qsv -preset 1 -global_quality:v 18 -scenario 3

2 Likes

Is this documented anywhere? Im trying to dig up what people have spoken about on the issue. Any git issues?

Oooff i have no 10bit atm. But whats wrong with just using CBR?

Thanks. I need to go and look into this… This week

Family over this weekend so server cant be taken down for work

I

I spent hours trying to solve the issue, then looked at actual driver version capabilities. The features I wanted are non existent in the very outdated driver provided with the docker.

Nothing wrong other than to get a specific vmaf score it might require more bitrate and or less and they way you can insure average scores is by using icq(crf).

My vmaf score for my first intel encode was 95 and video bitrate was 5mbps. Source file is 10GB and final size is likely under 2GB. I can’t tell because tdarr didn’t add correct metadata to the file. I am gonna have to figure that out.

To note svt_av1 I see 13fps on 7950x, libaom i see 8fps, with arc (qsv) I am seeing 100+ fps with slowest preset (best optimization).

Thats a fucking phenomenal savings for little to no visual degradation (VMAF >=85)

So 3x film speed. Epic

What was the PSNR? I thinking a balance between optimizing both psnr and vmaf would yield image quality literally nobody would squint at and likely give us a similar reduction in size if not improved

My issue with VMAF is it seems to be fooled via a few encoding techniques one could employ but it would be detected with a psnr comparison. (How you detect bad encodes in general). If the vmaf is high and the psnr aint lining up. It aint as quality as the vmaf suggests

1 Like

Fuck dude. Here is something I just learned. There is no hdr metadata transferance for any gpu based encoder. it is all cpu or software encoders. So if you want to compress 4k bluray and tone map or retain hdr alltogether you need to do cpu encoding.

https://www.reddit.com/r/AV1/comments/1071enl/encoding_hdr10_masteringdisplay_metadata_using/

Good thing I havent bought into “HDR” lol but its good to be aware of

You can’t even tone map as far as I can tell. I think you should be able to. I just don’t know the paraemeters.

CBR is terrible for good quality encodes generally speaking.
If a certain scene requires a higher bitrate then you set in CBR, it will drop the quality to fit within the confines. On the contrary if a scene requires less bandwidth then you specified, the remaining headroom is filled with zero-data and thus wastes space for no good reason.

CBR has its place in streaming applications where you want a constant stream to the target, but that has more to do with networking then with the actual content.

2 Likes

https://ffmpeg.org/ffmpeg-all.html#tonemap_005fopencl

When I get around to encoding my movies to av1 I will look into this if there isnt hdr metadata that can be copied by then.

Which is why a crf equivalent is ideal.

Some tools to use to compare a encoded video to its source are ssim, pnsr and vmaf.

documentation and info