Selur's Little Message Board
[INFO] Av1an implementation. - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: [INFO] Av1an implementation. (/thread-2175.html)



Av1an implementation. - DevSker - 09.11.2021

Hybrid is currently my favorite encoding GUI, due to it's feature rich nature, but nothing is perfect and everything has room for improvement. That being said I'd like to ask if there's any plan in adding av1an to Hybrid, to speed up encoding time for codecs with poor multithreading like VP9 and AV1.

https://github.com/master-of-zen/Av1an


RE: Av1an implementation. - Selur - 09.11.2021

From what I gather av1an does the following:
1. analyse the source and split by scene changes (I guess)
2. encode each of these segments separately with ffmpeg
3. merge the segments together.
-> this will not happen in Hybrid, there are no plans to support this.
Since this is bound to cause problems (ignoring the quality loss) as soon as you handle vfr content, or use gpu for filtering/decoding/encoding).

Cu Selur


RE: Av1an implementation. - Selur - 15.11.2021

Curious as I am, the idea nagged me and I had to think about it some more and test this Angel.
I even wrote some code in Hybrid to:
1. do a scene change dectection on a source (took ~2min on an 45min SD source with a speed of ~600fps)
2. create a chunk for each of these scene changes (scene that are less than 10 frames get joined with the next until at least 10 frames make up a chunk)
3. encode X chunks in parallel (using aoemenc)
-> this allowed to max out the cpu with any aoemenc settings
4. join the chunks at the end
5. do the normal muxing&co
This worked, but (as expected) totally killed the progress indication.

So far so good, but then I thought about a few things that are problematic with this approach:
a. any filtering which might change the scene detection
b. any filtering which would change the frame count
since they would require that the scene detection is run on the filtered source and not like I did on the unfiltered source.
Also I don't see how 2pass encoding could be properly meaningfully done with this unless you do the first pass on the whole source, and do the second pass only on the chunks (which would require to manipulate the stats file).
qp file creation for chapters would also need to be disabled, but should not cause a problem since you would probably end up with may more key frames then you would normally get.
(Hybrid also tends to freeze a bit during navigation with 2500+ subjobs.)

Seeing these restrictions and that using 'Tile(colomns/rows)' 6/2 with 'CPU utilization' 0 already should help a lot with the cpu usage I'll probably won't finish this and dump the written code since all the restrictions that come with the chunking really seem to not make it seem worth the effort.

-> So, sorry I'm back at my inital "this will not happen in Hybrid, there are no plans to support this."

Cu Selur


RE: Av1an implementation. - Selur - 21.11.2021

Had some time, and implemented a bit more, send you a link to a dev version.

Cu Selur


RE: Av1an implementation. - DevSker - 25.11.2021

Hello,
The dev version you've sent me seems to have some issue. I can't launch Hybrid, instead I got a lot of error pop-ups complaining about missing some "vsHINet" stuff.


RE: Av1an implementation. - Selur - 25.11.2021

You can probably simply ignore the popups if possible.
Will look at it after work.


RE: Av1an implementation. - DevSker - 25.11.2021

The problem is, Hybrid won't even launch.


RE: Av1an implementation. - Selur - 25.11.2021

Then you will have to wait till after I finished work and had time to look at it.
This happens since I added support for 'vsHINet' but forgot to remove it completely when 'vsHINet' isn't present.

Cu Selur