-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using a flow to convert large video files to AV1 causes the output file to always be of terrible, poor quality #677
Comments
Use handbrake, as ffmpeg doesn't yield for me personally good quality too, tried also many combinations of commands as well, also make sure your vpl and driver binaries updated as Intel states them self too, av1 control is locked behind vpl, without it only basic stuff will work. You can create a preset in the gui, and use that preset in tdarr, or if you know your way around the cli commands use these :) |
There is currently a bug that uses the -qp parameter with intel QSV but it has to use -global_quality instead, thus always resulting in shit quality when using QSV in a flow. It's more or less a one liner to fix in the plugin or use vaapi instead for now. |
I've been working on this issue, and have come up with a reasonable fix. Here's my Flow: https://pastebin.com/qFxd3wqd If you look at the "Added AV1 Config" node, and the "Set Video Encoder" node, you will see, I've added multiple redundant options for -global_quality:v and -crf. Which one is doing the work, I don't know, but adjusting them all to be the value you want, seems to solve the problem. Output is clean enough at about 24. Just remember to change all of them to the same value. You could probably remove the -crf option, I only threw it in there as a hail mary pass. Disregard the rest of the junk I've got in the flow, it's still a work in progress. |
Hey, man, I noticed you included your Sonarr API key in the flow, you might want to remove it. Unrelated - Can I use that flow to encode my library to AV1 using my nvidia GPU? |
Woops! Missed that, thanks. Fixed now, I can't delete the paste, so regenerated the API key. Thanks for pointing out my screw up! As for your question about using the nVidia card and my flow - I don't think it would work, purely because most of the ffmpeg flags are specific to the Intel ARC series of cards. I did work on the nVidia settings at one point, but I gifted the card when I got the ARC card for my Plex Server. It took me ages to figure out the ARC ffmpeg flags, because they're not well documented. As far as I know, the "Set Video Encoder" flow node should work with nVidia cards. The AV1 and nVidia card is listed there, but I don't know how good it will be. If I get my hands on another nVidia card that is capable of AV1, I will post an update. Best of luck mate! |
Trying to use your flow above and have encountered an issue that I am trying to work around but I can't get my head around. Some information on my setup On line 45 it looks like ffmpeg is attempting to use nvenc to decode the source file, however there is no nvidia media encoder available so it is failing. |
If using in docker enviroment, it doesnt play nicely with the arc gpu as of yet. |
It is a docker on TrueNAS that I am using. |
I have no experience with truenas but if it is possible to run an LXC container on it, you can use the gpu in docker as well in LXC simultaneously. AV1 needs VPL libraries which are not correctly present in the official docker container. |
No option of LXC containers as of yet, it is on the roadmap however.
CPU Transcoding works, I tested and had a look at some files, the quality is about as good as the source file and I confirmed with VLC the output file is AV1. |
Line 45 is only telling you the way the source video was encoded. It's saying that the source video is encoded using
Indicating that the source audio was encoded using FFMPEG is being told to convert it to AV1 on line 58:
See the input is
And the audio to If it's of any help, here is my docker config that I've setup with the Intel ARC A310: https://pastebin.com/geYq6rpw |
100% accurate, file would have been encoded on tdarr using either an nVidia GT1050 in my old NAS or the 3060TI in my desktop which I previously had configured as a node.
Currently not of any help as the custom app function is blocked on TrueNAS. This is because I am running Beta1 of the 24.10 release, it might be available in RC1 due next week and I can try get this running. Does anyone know if the docker has Handbrake already installed in it? |
Yes handbrake is built in |
Perfect, hopefully it doesn't have the same issues but I guess I will find out in time.
The plan was to create and test a preset and then import it into tdarr before creating a flow to use the preset for transcoding. |
this might be related to #707 |
I've updated my flow: https://pastebin.com/TJfWHycH I've added fixes for common issues with certain file types and codecs that are incompatible with the Intel ARC GPU decoder/encoder hardware. I've also added fixes for common ffmpeg/container issues. I'm pretty crap at notations, but I've added a few comments to explain what each part is doing and why. I've also broken down the ffmpeg command so that it is easier to understand and tweak to your liking. I hope someone else finds it useful. :) |
Updated again.
|
Describe the bug
Similar to what this person reported a few months ago:
https://www.reddit.com/r/Tdarr/comments/1b98ooj/convert_to_av1/
The flow I set up will use my A310 for AV1 hardware encoding, but the output file is always 4-10% the size of the original file and is extremely low-quality, no matter what I set the FFmpeg Quality to (I could set it to 0, which should be lossless and it would still come out an extremely low-quality and blurry video, and the exact same size.)
I updated to 2.21.01 today, but happened with the previous version also
Here is the flow
To Reproduce
Steps to reproduce the behavior:
Use the above flow to encode any file into AV1 with an Arc card
Expected behavior
File size and quality should change based on the chosen ffmpeg quality.
Screenshots
79C76j2XU1-log.txt
OS: Unraid
OS version: 6.12.10 with custom kernel: https://github.com/thor2002ro/unraid_kernel/releases
CPU: Intel Core i5-1235U
GPU: Intel Arc A310
Docker version: 2.21.01
Device model: Ugreen DXP6800 Pro
Browser/OS: Chrome
The text was updated successfully, but these errors were encountered: