AV1 encoding and decoding setting

1,923 views
Skip to first unread message

wai

unread,
Apr 27, 2018, 1:41:14 AM4/27/18
to Codec Developers
Hello,

Currently I am using aomenc.exe under Windows with the following settings

aomenc.exe --passes=2 --pass=1 --end-usage=vbr --target-bitrate=1000 --width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8 --limit=100 -o output.webm park_joy_420_720p50.y4m
aomenc.exe --passes=2 --pass=2 --end-usage=vbr --target-bitrate=1000 --width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8 --limit=100 -o output.webm park_joy_420_720p50.y4m

But I wish to get the PSNR results, so how should I modify the settings in order to generate a PSNR ? Or do i need to use the aomdec.exe in order to generate the PSNR?

James Zern

unread,
Apr 27, 2018, 1:46:52 AM4/27/18
to codec...@webmproject.org
Hi,
You can add --psnr to the command line, try --help to see more. Note for
the second pass speed 1 is a bit better tested, and should give better
results, though it will be slower.

wai

unread,
Apr 27, 2018, 1:51:58 AM4/27/18
to Codec Developers
Hi James,

Thanks for your reply. I do try to add the --psnr into my command line but I did not see any psnr related information printed out in terminal or logged into a file, or it will generate after the end of encoding?
and what do you mean by second pass speed 1 ?

James Zern

unread,
Apr 27, 2018, 3:03:27 AM4/27/18
to codec...@webmproject.org
On Thu, Apr 26, 2018 at 10:51 PM wai <waiy...@gmail.com> wrote:

> Hi James,

> Thanks for your reply. I do try to add the --psnr into my command line
but I did not see any psnr related information printed out in terminal or
logged into a file, or it will generate after the end of encoding?


With --psnr at the end of encoding you should see something like:
Stream 0 PSNR (Overall/Avg/Y/U/V) 59.420 60.592 59.412 64.558 65.311

During the encoding the per-frame psnr will be output along with the
status. If you're not seeing any output you might be mixing builds and
command prompts (e.g., a visual studio build executing in cygiwn) where a
console hasn't been allocated.

> and what do you mean by second pass speed 1 ?


Sorry I chose the wrong term, I meant --cpu-used=1

> On Friday, 27 April 2018 13:46:52 UTC+8, James Zern wrote:

>> Hi,

>> On Thu, Apr 26, 2018 at 10:41 PM wai <waiy...@gmail.com> wrote:

>> > Hello,

>> > Currently I am using aomenc.exe under Windows with the following
settings

>> > aomenc.exe --passes=2 --pass=1 --end-usage=vbr --target-bitrate=1000
>> --width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8
>> --limit=100 -o output.webm park_joy_420_720p50.y4m
>> > aomenc.exe --passes=2 --pass=2 --end-usage=vbr --target-bitrate=1000
>> --width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8
>> --limit=100 -o output.webm park_joy_420_720p50.y4m

>> > But I wish to get the PSNR results, so how should I modify the settings
>> in order to generate a PSNR ? Or do i need to use the aomdec.exe in order
>> to generate the PSNR?


>> You can add --psnr to the command line, try --help to see more. Note for
>> the second pass speed 1 is a bit better tested, and should give better
>> results, though it will be slower.

> --
> You received this message because you are subscribed to the Google Groups
"Codec Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to codec-devel...@webmproject.org.
> To post to this group, send email to codec...@webmproject.org.
> Visit this group at
https://groups.google.com/a/webmproject.org/group/codec-devel/.
> For more options, visit
https://groups.google.com/a/webmproject.org/d/optout.

wai

unread,
Apr 27, 2018, 3:39:23 AM4/27/18
to Codec Developers
Hi James,


With --psnr at the end of encoding you should see something like:
Stream 0 PSNR (Overall/Avg/Y/U/V) 59.420 60.592 59.412 64.558 65.311 

Okay, now I see the PSNR is printed out at the end of the encoding process ( previously I always terminate the process after a while because the encoding is too slow), but is there any way to log this to a text file?
 

Sorry I chose the wrong term, I meant --cpu-used=1


and currently I try to encode a 1920x1080 video for 64 frames only, but with cpu-used=1 setting, the estimated finished time is about 2.30hours. Is this normal? or any command I can add-on to increase the encoding speed?

James Zern

unread,
Apr 27, 2018, 2:08:46 PM4/27/18
to codec...@webmproject.org
On Fri, Apr 27, 2018 at 12:39 AM wai <waiy...@gmail.com> wrote:

> Hi James,


>> With --psnr at the end of encoding you should see something like:
>> Stream 0 PSNR (Overall/Avg/Y/U/V) 59.420 60.592 59.412 64.558 65.311


> Okay, now I see the PSNR is printed out at the end of the encoding
process ( previously I always terminate the process after a while because
the encoding is too slow), but is there any way to log this to a text file?


The output goes to stderr, from a windows console you can use 2> output.txt
to capture it.



>> Sorry I chose the wrong term, I meant --cpu-used=1


> and currently I try to encode a 1920x1080 video for 64 frames only, but
with cpu-used=1 setting, the estimated finished time is about 2.30hours. Is
this normal? or any command I can add-on to increase the encoding speed?


The encoder is still under active development and is expected to be slow at
this time especially for large resolutions. You can try cpu-used 2-4 to
help improve the speed, but those paths are less tested and will produce
lower quality results.

wai

unread,
Apr 28, 2018, 11:23:59 AM4/28/18
to Codec Developers


The output goes to stderr, from a windows console you can use 2> output.txt
to capture it.

I tried this but nothing logged into my destination file. Is it because I build the aomenc.exe by third party built environment?
If third party build will mess up the printing, is there other ways to save the print or fix this issue?

waiy...@gmail.com

unread,
Apr 30, 2018, 3:07:59 PM4/30/18
to Codec Developers
Hello,

I am currently encoding a test video using av1 with the following setting.

aomenc.exe --passes=2 --pass=1 --end-usage=vbr --target-bitrate=1000 --width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8 --limit=100 -o output.webm park_joy_420_720p50.y4m
aomenc.exe --passes=2 --pass=2 --end-usage=vbr --target-bitrate=1000 --width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8 --limit=100 -o output.webm park_joy_420_720p50.y4m

How can I generate the PSNR results from here?Do I need to use the aomdec?


Yunqing Wang

unread,
Apr 30, 2018, 3:22:05 PM4/30/18
to codec...@webmproject.org
You can run the following to find encoding options:
./aomenc --help

--psnr                      Show PSNR in status line

Yunqing


--
You received this message because you are subscribed to the Google Groups "Codec Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codec-devel+unsubscribe@webmproject.org.

James Zern

unread,
Apr 30, 2018, 10:58:07 PM4/30/18
to codec...@webmproject.org
On Mon, Apr 30, 2018 at 12:22 PM 'Yunqing Wang' via Codec Developers <
codec...@webmproject.org> wrote:

> You can run the following to find encoding options:
> ./aomenc --help

> --psnr Show PSNR in status line

> Yunqing


> On Thu, Apr 26, 2018 at 10:28 PM, <waiy...@gmail.com> wrote:

>> Hello,

>> I am currently encoding a test video using av1 with the following
setting.

>> aomenc.exe --passes=2 --pass=1 --end-usage=vbr --target-bitrate=1000
--width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8
--limit=100 -o output.webm park_joy_420_720p50.y4m
>> aomenc.exe --passes=2 --pass=2 --end-usage=vbr --target-bitrate=1000
--width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8
--limit=100 -o output.webm park_joy_420_720p50.y4m

>> How can I generate the PSNR results from here?Do I need to use the
aomdec?


If you want to get the psnr from an encoded file you'd need to decode it to
yuv, then a tool like tiny_psnr can compare the source to the encoded
version. You'll likely need to compile that from source, however.

James Zern

unread,
Apr 30, 2018, 11:04:30 PM4/30/18
to codec...@webmproject.org
On Sat, Apr 28, 2018 at 8:24 AM wai <waiy...@gmail.com> wrote:



>> The output goes to stderr, from a windows console you can use 2>
output.txt
>> to capture it.

> I tried this but nothing logged into my destination file. Is it because I
build the aomenc.exe by third party built environment?

Possibly. How were the binaries built and what console are you running them
under?

> If third party build will mess up the printing, is there other ways to
save the print or fix this issue?


It may be simpler to build the tools locally. The aom README [1] gives some
detail on how to set that up.

[1] https://aomedia.googlesource.com/aom

wai

unread,
May 14, 2018, 12:05:55 AM5/14/18
to Codec Developers
I do tried with the official build with Windows. However, when I run the cmake path/to/aom -G "Visual Studio 15 2017" , it does not give aomenc.exe.
I opened the aom.sln and build in released mode it will gives error.
Do you have any idea on how to generate the aomenc.exe from here?

James Zern

unread,
May 14, 2018, 2:49:46 PM5/14/18
to codec...@webmproject.org
On Sun, May 13, 2018 at 9:05 PM wai <waiy...@gmail.com> wrote:
I do tried with the official build with Windows. However, when I run the cmake path/to/aom -G "Visual Studio 15 2017" , it does not give aomenc.exe.

That's expected, cmake is just used to generate the build files.
 
I opened the aom.sln and build in released mode it will gives error.
Do you have any idea on how to generate the aomenc.exe from here?

If you can post the output it will help to diagnose the issue. This is built nightly, so I expect it is something specific to your setup.
 

On Tuesday, 1 May 2018 11:04:30 UTC+8, James Zern wrote:
On Sat, Apr 28, 2018 at 8:24 AM wai <waiy...@gmail.com> wrote:



>> The output goes to stderr, from a windows console you can use 2>
output.txt
>> to capture it.

> I tried this but nothing logged into my destination file. Is it because I
build the aomenc.exe by third party built environment?

Possibly. How were the binaries built and what console are you running them
under?

> If third party build will mess up the printing, is there other ways to
save the print or fix this issue?


It may be simpler to build the tools locally. The aom README [1] gives some
detail on how to set that up.

[1] https://aomedia.googlesource.com/aom

--

wai

unread,
May 14, 2018, 8:03:58 PM5/14/18
to Codec Developers
>> If you can post the output it will help to diagnose the issue. 
This is the error I facing:
Code : MSB6006 
Description : "cmd.exe? exited with cide - 1073741819
Project: ZERO_CHECK

When I click on the error , it will bring me to Microsoft.CppCommon.targets line171 
<CustomBuild 
...

>>This is built nightly, so I expect it is something specific to your setup.
What does the build nightly mean, sorry I am new to this so I might asking a lot questions.

Once again thanks for your explanation.

James Zern

unread,
May 14, 2018, 10:44:01 PM5/14/18
to codec...@webmproject.org
On Mon, May 14, 2018 at 5:03 PM wai <waiy...@gmail.com> wrote:

> >> If you can post the output it will help to diagnose the issue.
> This is the error I facing:
> Code : MSB6006
> Description : "cmd.exe? exited with cide - 1073741819
> Project: ZERO_CHECK

> When I click on the error , it will bring me to
Microsoft.CppCommon.targets line171
> <CustomBuild
> ...


I believe that project just tries to invoke cmake. You can try to build it
and increase the build verbosity to help diagnose it. Also make sure Visual
Studio is up to date and try to pull a new copy of cmake from cmake.org.
Another common issue with windows builds is building in a path with spaces
in it. If you have that, you may want to try a simpler folder structure.

> >>This is built nightly, so I expect it is something specific to your
setup.
> What does the build nightly mean, sorry I am new to this so I might
asking a lot questions.


All I meant was that it builds locally for me and is built every night to
make sure this target doesn't break.

aydinya...@gmail.com

unread,
Aug 17, 2018, 12:43:48 PM8/17/18
to Codec Developers
Hello,

Currently I am using aomenc under Linux Ubuntu16.04 with the following settings

aomenc --passes=2 --pass=1 --end-usage=vbr --target-bitrate=1000 --width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8 --limit=100 -o output.ivf park_joy_420_720p50.y4m
aomenc --passes=2 --pass=2 --end-usage=vbr --target-bitrate=1000 --width=780 --height=420 --fpf=aom1.log --cpu-used=4 --threads=8 --limit=100 -o output.ivf park_joy_420_720p50.y4m

After this I use aomdec to decode that files aomdec output.ivf | mpv - and its work.

The problem is  when I send that file to another computer with Windows OS or MacOSX and use aomdec.exe or aomdec.dylib it couldn't open.(corrupted file...)

Thanks in advance ...
Apr 27

Pankaj Sharma

unread,
Jan 25, 2019, 1:18:52 AM1/25/19
to Codec Developers
Guys, I am looking for AV1 developer who can integrate av1 codec in my technology stack. Interested ones can contact on pan...@melpapp.com
Reply all
Reply to author
Forward
0 new messages