View Full Version : Converting av1 to hevc
traragorn
5th November 2024, 14:06
I have a meta quest 2 vr device which can only play h264 & hevc. (both from youtube and other websites or locally) Until like 1 year ago in youtube vr180 & vr360 videos were available as vp9. Then they started converting everything over 4k to av1 which quest 2 isn't capable of decoding in reasonable speeds (can do like 1080p at most in av1) . And since a few months now they began serving the newer videos even at 4k in av1. One, they already had very bad quality even at 4k and up (decreased bitrates clearly). Two, quest 2 is capable of playing videos encoded in h264 and 265 up to 8k 30 fps , evrn some 60 fps (tried a lot of videos)
I am downloading those 8k or whatever highest quality they made it available and planning to convert them to h265. There are great sightseeing and similar slow paced videos which would look better at higher resolution and want to archive these for local viewing.
My question is : which would be the fastest (less encoding time) and also achieving most similar quality to av1 original , way to convert those videos to h265 ? I have a 5700x3d cpu and also a rx 6600 8 gb amd gpu. I am on windows 10. Can you guys suggest the best app / device I could use to do this ?
Z2697
5th November 2024, 14:18
Is there any bitrate (i.e. file size) constraint?
If you just want speed you can totally use HW decoder and encoder of your graphics card, but you'll need higher bitrate to achieve same level of quality.
You don't have much choice though, the high resolution x265 encoding will be a pain in the ass (slow), and if you are to using faster settings the result might even worse than HW encoder, although AMD's old encoder are weaker (than Intel and Nvidia's)
traragorn
5th November 2024, 15:33
With this "https://bluesky-soft.com/en/AsVideoConv.html" that makes use of my gpu tried same bitrate as av1 and yes speed is as good as it can be (these videos are around 3500 to 4120p) but quality really takes a hit. Would a higher bitrate help with this and is there some other encoding gui maybe that wpuld give me more options while letting me use amd's h265 encoder.
traragorn
6th November 2024, 12:00
ffmpeg -i lofoten.mp4 -profile:v main -qmin 18 -qmax 24 -rc-lookahead 32 -g 250 -c:v hevc_amf -c:a copy -c:s copy output.mp4
With this much faster than the other apps, almost all of them use one core of the cpu , and it seems since there is no hardware accelerated decoding on my cpu it is best to max out software. I am getting around 0.6x time and around 2.5x bigger file size. If I don't enter qmax - qmin file size is around 1.5x.But both of them take the same time to finish. Is there anything else I can tweak to get faster speeds ? (cpu is maxed on all cores while decoding it seems)
Z2697
6th November 2024, 14:13
RX 6600 is capable of doing AV1 HW decoding (I googled it) and you can do it like this:
ffmpeg -hwaccel d3d11va -hwaccel_output_format d3d11 -i input -c:v hevc_amf ...
traragorn
6th November 2024, 15:29
already tried that , gives this error :
[vist#0:0/av1 @ 000001ddf986fb80] [dec:av1 @ 000001ddf22dee40] Error submitting packet to decoder: Cannot allocate memory
[AVHWFramesContext @ 000001ddf22af340] Static surface pool size exceeded.
[av1 @ 000001ddf24de440] get_buffer() failed
[av1 @ 000001ddf24de440] thread_get_buffer() failed
[av1 @ 000001ddf24de440] Failed to allocate space for current frame.
[av1 @ 000001ddf24de440] Get current frame error
By the way this is on EVERY frame :/ And closes after a while. Also same even with a 1080p av1 source.
Z2697
6th November 2024, 16:39
Try different decoding api, update FFmpeg and driver... But I assume you have tried them already?
traragorn
6th November 2024, 21:51
thanks for helping but it seems there is a problem with hw decoding for av1, probably not only for amd someone even mentions nvidia.
can't give links here for some reason but if you search it on google there are a few posts on ffmpeg forum regarding this with no answers.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.