Skip to main content
Topic: FFmpeg segfaults when encoding to AV1. How to use aomenc? (Read 1135 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

FFmpeg segfaults when encoding to AV1. How to use aomenc?

I'm using uncompressed video from the Xiph test footage collection: https://media.xiph.org/video/derf/

Now, I wanted to see how the codec looks like and used FFmpeg to encode with AV1:

Code: [Select]
ffmpeg -i controlled_burn_1080p.y4m -c:v av1 -crf 30 -b:v 0 -strict experimental controlled_burn_1080p.mkv

The problem is, that FFmpeg segfaults after encoding around 50 frames.

I'd like to try out encoding the footage with aomenc, but there's next to no docs and the --help is rather confusing.
Can someone help me figure out the switched and options for aomenc, that does the same as -crf 30 -b:v 0 in FFmpeg?

I've installed aomenc from repos of my distribution, it's version 1.0.0.

When using -c:v avi it uses libaom-av1, in case you're wondering.

Re: FFmpeg segfaults when encoding to AV1. How to use aomenc?

Reply #1
I use Windows, so I downloaded ffmpeg.exe nightly build from Zeranoe. 32-bit version crashes very fast, 64-bit version consumes about 1.4 GB RAM but works, so...

a) Try to upgrade ffmpeg and libaom to latest nightly versions
b) I hope you use 64-bit OS and have enough RAM ?

Re: FFmpeg segfaults when encoding to AV1. How to use aomenc?

Reply #2
It is the latest FFmpeg available in the repos:
Code: [Select]
ffmpeg version 4.1.4 Copyright (c) 2000-2019 the FFmpeg developers
Same with libaom:
Code: [Select]
Version      : 1.0.0
Release      : 6.20180925gitd0076f5.fc30

I should have enough RAM (16GB total, not much these days, but should be adequate).
I know it's very slow. It takes hours to encode a couple frames.
There's SVT-AV1, but I haven't got it to work yet, it also segfaults, even when compiling it from source.

Re: FFmpeg segfaults when encoding to AV1. How to use aomenc?

Reply #3
FFmpeg needs to be latest master. Nobody test release.


Re: FFmpeg segfaults when encoding to AV1. How to use aomenc?

Reply #5
FFmpeg needs to be latest master. Nobody test release.
I don't understand your statement.

You're running a release of ffmpeg that was forked from master in 2018.  AV1 is a new format, so try the current git master (version), it is probably going to work a lot better.

Re: FFmpeg segfaults when encoding to AV1. How to use aomenc?

Reply #6
You're running a release of ffmpeg that was forked from master in 2018.  AV1 is a new format, so try the current git master (version), it is probably going to work a lot better.

I did try that. Problem is, with libaom-av1 and ffmpeg from the latest git, it segfaults after encoding around 50 frames.

I retried using ffmpeg and libaom from repos alone, and it does work, but it's just very, VERY slow.
I also recently tried SVT-AV1 from git, but it also segfaults, when encoding.
The code itself compiles fine.

So while ffmpeg, libaom (and SVT-av1) all compile fine when cloning from git, they all segfault when encoding. And they don't segfault immediately, it takes quite a while, it gets to frame 50 and then just sits there for a while, until segfaulting.

I ended up using the stable releases available in my distro's repos, to see how encoding AV1 videos look, and how the encoder works, etc. While FFmpeg is reasonably well documented when it comes to settings of the av1 encoder, aomenc isn't. I was kinda hoping I can check out both, etc. but I have a hard time figuring out the correct option settings for aomenc, such that it is equivalent to ffmpeg's -b:v 0 -crf 30.

Hence me asking.

Re: FFmpeg segfaults when encoding to AV1. How to use aomenc?

Reply #7
If the git build is segfaulting, I would ask on the ffmpeg mailing list for help. 

Re: FFmpeg segfaults when encoding to AV1. How to use aomenc?

Reply #8
Try to use a build from around march or april, for me any recent build suffers a secfaulf during the second pass in a two pass encoding.

 

Re: FFmpeg segfaults when encoding to AV1. How to use aomenc?

Reply #9
If the git build is segfaulting, I would ask on the ffmpeg mailing list for help.
Yeah, either that, or I'll just wait for a couple merges.

Try to use a build from around march or april, for me any recent build suffers a secfaulf during the second pass in a two pass encoding.
Huh, OK, I haven't yet tried an older snapshot.

Still though, when it comes to aomenc I still can't figure out the equivalent settings...

 
SimplePortal 1.0.0 RC1 © 2008-2019