This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

AV1 encode & decode build issue
#11
Thanks for your help! I am able to generate the aom executable files now 

However, when i run with my test video sequence with the CLI line below, the encode process will stuck at the second pass. 

CLI:
aomenc  --end-usage=vbr  --target-bitrate=1000  --kf-max-dist=60  --width=720  --height=480  -o output.yuv  test_420_10bit_720x480.yuv

Output:
Pass 1/2 frame 1800/1801  331384B    1472b/f   44184b/s   32672 ms (55.09 fps)                                       
Pass 2/2 frame   19/0          0B   32701 ms 34.86 fpm [ETA  unknown]             

Do you have any idea on this? and my input yuv is 900 frames, I wonder why the 1/2 pass will have frame=1800/1801.
Reply
#12
The command line you posted looks like it's for the 1st pass,..

If I remember correctly, 1st pass should include:
--passes=2 --pass=1  --target-bitrate=XXXX --end-usage=vbr --fpf="PATH TO THE .stats FILE"
and 2nd pass should include:
--passes=2 --pass=2  --target-bitrate=XXXX --end-usage=vbr --fpf="PATH TO THE .stats FILE"

Cu Selur
Reply
#13
This is the batch files I used to run the sequences.

Quote:aomenc.exe --passes=2 --pass=1 --end-usage=vbr --target-bitrate=1000 --width=780 --height=420 --fpf=aom1.log -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 -o output.webm park_joy_420_720p50.y4m


The output i get :
Quote:Pass 1/2 frame  500/501    92184B    1474b/f   73747b/s 6977506 us (71.66 fps)
Pass 2/2 frame   20/1      18046B   41031 ms 29.25 fpm [ETA  5:41:14]    18046F  

Currently by using the command that you give, it seems like able to encode 'some' frames but it will stuck afterwards or I should say the encode speed is very slow for me.
Do you have any idea on speed this up? or this is limited by my pc hardware?
Reply
#14
Atm. there is not much you can do about speed since av1s bitstream isn't frozen and afaik no real speed optimizations have been implemented.
That said you can change the:
  • '--cpu-used'
  • '--tile-colums'
  • '--threads'
So for example using a higher cpu-used value should increase the speed, but lower the compression ratio. (faster, but less quality for a given size)


Cu Selur
Reply
#15
The encoding is faster after I put in the cpu command.
But i wonder is the command line for decoding is same as encoding?

Quote:For example encoding:

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

decoding:
aomdec.exe --end-usage=vbr --target-bitrate=1000 --width=780 --height=420 --cpu-used=4 --threads=8 --limit=100 -o dec_output.webm output.webm

By the way, I am testing with the aom analyser but it is not a drop and view kind of analyser and so I still figuring out how to do the analysis with the software. Is there any recommendation software for analyse the bitstream under windows environment?

I had some experience in using Intel analyzer but the aom analyser seem like I have to run the decode process with it and the decoded result will be on a webserver?
Reply
#16
Looking at analysers before the bitstream is at least frozen seems like a bad idea.
Any thing you encode atm. is basically just for educational purpose.

Can't help with analysing av1 content atm. since due to the not frozen bitstream I looked into it at all.


Cu Selur
Reply
#17
(26.04.2018, 16:58)Selur Wrote: Looking at analysers before the bitstream is at least frozen seems like a bad idea.
Any thing you encode atm. is basically just for educational purpose.

Can't help with analysing av1 content atm. since due to the not frozen bitstream I looked into it at all.


Cu Selur

I see thanks for your info. However, I would like to know the overall PSNR performance. So,  to get the PSNR result should I do the decoding in order to generate the PSNR or I can get it directly by encoding
Reply
#18
iirc adding '--psnr' will output the PSNR after encoding.

Cu Selur
Reply
#19
(28.04.2018, 08:29)Selur Wrote: iirc adding '--psnr' will output the PSNR after encoding.

Cu Selur
I do added the --psnr into my command line, it will only output the average PSNR at the end of encoding without per frame PSNR.
Is there a command for per frame PSNR? and I tried adding the >PSNR.log at the end of command but nothing is logged to the file.
Reply
#20
Quote:I do added the --psnr into my command line, it will only output the average PSNR at the end of encoding without per frame PSNR.
Since you you asked for the 'overall PSNR performance' I assumed that is what you are looking for.

Looking at the command line aomenc options:
aomenc.exe --help
Usage: aomenc.exe <options> -o dst_filename src_filename

Options:
            --help                      Show usage options and exit
  -c <arg>, --cfg=<arg>                 Config file to use
  -D,       --debug                     Debug mode (makes output deterministic)
  -o <arg>, --output=<arg>              Output filename
            --codec=<arg>               Codec to use
  -p <arg>, --passes=<arg>              Number of passes (1/2)
            --pass=<arg>                Pass to execute (1/2)
            --fpf=<arg>                 First pass statistics file name
            --limit=<arg>               Stop encoding after n input frames
            --skip=<arg>                Skip the first n input frames
            --good                      Use Good Quality Deadline
  -q,       --quiet                     Do not print encode progress
  -v,       --verbose                   Show encoder parameters
            --psnr                      Show PSNR in status line
            --webm                      Output WebM (default when WebM IO is enabled)
            --ivf                       Output IVF
            --obu                       Output OBU
  -P,       --output-partitions         Makes encoder output partitions. Requires IVF output!
            --q-hist=<arg>              Show quantizer histogram (n-buckets)
            --rate-hist=<arg>           Show rate histogram (n-buckets)
            --disable-warnings          Disable warnings about potentially incorrect encode settings.
  -y,       --disable-warning-prompt    Display warnings, but do not prompt user to continue.
            --test-decode=<arg>         Test encode/decode mismatch
                                          off, fatal, warn

Encoder Global Options:
            --yv12                      Input file is YV12
            --i420                      Input file is I420 (default)
            --i422                      Input file is I422
            --i444                      Input file is I444
  -u <arg>, --usage=<arg>               Usage profile number to use
  -t <arg>, --threads=<arg>             Max number of threads to use
            --profile=<arg>             Bitstream profile number to use
  -w <arg>, --width=<arg>               Frame width
  -h <arg>, --height=<arg>              Frame height
            --forced_max_frame_width    Maximum frame width value to force
            --forced_max_frame_height   Maximum frame height value to force
            --stereo-mode=<arg>         Stereo 3D video format
                                          mono, left-right, bottom-top, top-bottom, right-left
            --timebase=<arg>            Output timestamp precision (fractional seconds)
            --fps=<arg>                 Stream frame rate (rate/scale)
            --global-error-resilient=<a Enable global error resiliency features
  -b <arg>, --bit-depth=<arg>           Bit depth for codec (8 for version <=1, 10 or 12 for version 2)
                                          8, 10, 12
            --lag-in-frames=<arg>       Max number of frames to lag
            --large-scale-tile=<arg>    Large scale tile coding (0: off (default), 1: on)
            --monochrome                Monochrome video (no chroma planes)

Rate Control Options:
            --drop-frame=<arg>          Temporal resampling threshold (buf %)
            --resize-mode=<arg>         Frame resize mode
            --resize-denominator=<arg>  Frame resize denominator
            --resize-kf-denominator=<ar Frame resize keyframe denominator
            --superres-mode=<arg>       Frame super-resolution mode
            --superres-denominator=<arg Frame super-resolution denominator
            --superres-kf-denominator=< Frame super-resolution keyframe denominator
            --superres-qthresh=<arg>    Frame super-resolution qindex threshold
            --superres-kf-qthresh=<arg> Frame super-resolution keyframe qindex threshold
            --end-usage=<arg>           Rate control mode
                                          vbr, cbr, cq, q
            --target-bitrate=<arg>      Bitrate (kbps)
            --min-q=<arg>               Minimum (best) quantizer
            --max-q=<arg>               Maximum (worst) quantizer
            --undershoot-pct=<arg>      Datarate undershoot (min) target (%)
            --overshoot-pct=<arg>       Datarate overshoot (max) target (%)
            --buf-sz=<arg>              Client buffer size (ms)
            --buf-initial-sz=<arg>      Client initial buffer size (ms)
            --buf-optimal-sz=<arg>      Client optimal buffer size (ms)

Twopass Rate Control Options:
            --bias-pct=<arg>            CBR/VBR bias (0=CBR, 100=VBR)
            --minsection-pct=<arg>      GOP min bitrate (% of target)
            --maxsection-pct=<arg>      GOP max bitrate (% of target)

Keyframe Placement Options:
            --kf-min-dist=<arg>         Minimum keyframe interval (frames)
            --kf-max-dist=<arg>         Maximum keyframe interval (frames)
            --disable-kf                Disable keyframe placement

AV1 Specific Options:
            --cpu-used=<arg>            CPU Used (0..8)
            --dev-sf=<arg>              Dev Speed (0..255)
            --auto-alt-ref=<arg>        Enable automatic alt reference frames
            --sharpness=<arg>           Loop filter sharpness (0..7)
            --static-thresh=<arg>       Motion detection threshold
            --single-tile-decoding=<arg Single tile decoding (0: off (default), 1: on)
            --tile-columns=<arg>        Number of tile columns to use, log2
            --tile-rows=<arg>           Number of tile rows to use, log2 (set to 0 while threads > 1)
            --arnr-maxframes=<arg>      AltRef max frames (0..15)
            --arnr-strength=<arg>       AltRef filter strength (0..6)
            --tune=<arg>                Distortion metric tuned with
                                          psnr, ssim, cdef-dist, daala-dist
            --cq-level=<arg>            Constant/Constrained Quality level
            --max-intra-rate=<arg>      Max I-frame bitrate (pct)
            --max-inter-rate=<arg>      Max P-frame bitrate (pct)
            --gf-cbr-boost=<arg>        Boost for Golden Frame in CBR mode (pct)
            --lossless=<arg>            Lossless mode (0: false (default), 1: true)
            --enable-cdef=<arg>         Enable the constrained directional enhancement filter (0: false, 1: true (default))
            --enable-restoration=<arg>  Enable the loop restoration filter (0: false, 1: true (default))
            --enable-qm=<arg>           Enable quantisation matrices (0: false (default), 1: true)
            --qm-min=<arg>              Min quant matrix flatness (0..15), default is 8
            --qm-max=<arg>              Max quant matrix flatness (0..15), default is 15
            --enable-dist-8x8=<arg>     Enable dist-8x8 (0: false (default), 1: true)
            --frame-parallel=<arg>      Enable frame parallel decodability features (0: false (default), 1: true)
            --error-resilient=<arg>     Enable error resilient features (0: false (default), 1: true)
            --aq-mode=<arg>             Adaptive quantization mode (0: off (default), 1: variance 2: complexity, 3: cyclic refresh)
            --deltaq-mode=<arg>         Delta qindex mode (0: off (default), 1: deltaq 2: deltaq + deltalf)
            --frame-boost=<arg>         Enable frame periodic boost (0: off (default), 1: on)
            --noise-sensitivity=<arg>   Noise sensitivity (frames to blur)
            --tune-content=<arg>        Tune content type
                                          default, screen
            --cdf-update-mode=<arg>     CDF update mode for entropy coding (0: no CDF update; 1: update CDF on all frames(default); 2: selectively update CDF on some frames
            --color-primaries=<arg>     Color primaries (CICP) of input content:
                                          bt709, unspecified, bt601, bt470m, bt470bg, smpte240, film, bt2020, xyz, smpte431, smpte432, ebu3213
            --transfer-characteristics= Transfer characteristics (CICP) of input content:
                                          unspecified, bt709, bt470m, bt470bg, bt601, smpte240, lin, log100, log100sq10, iec61966, bt1361, srgb, bt2020-10bit, bt2020-12bit, smpte2084, hlg, smpte428
            --matrix-coefficients=<arg> Matrix coefficients (CICP) of input content:
                                          identity, bt709, unspecified, fcc73, bt470bg, bt601, smpte240, ycgco, bt2020ncl, bt2020cl, smpte2085, chromncl, chromcl, ictcp
            --chroma-sample-position=<a The chroma sample position when chroma 4:2:0 is signaled:
                                          unknown, vertical, colocated
            --min-gf-interval=<arg>     min gf/arf frame interval (default 0, indicating in-built behavior)
            --max-gf-interval=<arg>     max gf/arf frame interval (default 0, indicating in-built behavior)
            --sb-size=<arg>             Superblock size to use
                                          dynamic, 64, 128
            --num-tile-groups=<arg>     Maximum number of tile groups, default is 1
            --mtu-size=<arg>            MTU size for a tile group, default is 0 (no MTU targeting), overrides maximum number of tile groups
            --timing-info=<arg>         Signal timing info in the bitstream:
                                          unspecified, constant
            --film-grain-test=<arg>     Film grain test vectors (0: none (default), 1: test-1  2: test-2, ... 16: test-16)
            --film-grain-table=<arg>    Path to file containing film grain parameters
            --enable-ref-frame-mvs=<arg Enable temporal mv prediction (default is 1)
  -b <arg>, --bit-depth=<arg>           Bit depth for codec (8 for version <=1, 10 or 12 for version 2)
                                          8, 10, 12
            --input-bit-depth=<arg>     Bit depth of input
            --sframe-dist=<arg>         S-Frame interval (frames)
            --sframe-mode=<arg>         S-Frame insertion mode (1..2)
            --annexb=<arg>              Save as Annex-B

Stream timebase (--timebase):
  The desired precision of timestamps in the output, expressed
  in fractional seconds. Default is 1/1000.

Included encoders:

    av1    - AOMedia Project AV1 Encoder 0.1.0-9092-gcc30cc79f (default)

        Use --codec to switch to a non-default encoder.
I don't see an option for a frame by frame PSNR comparision, so you probably have to do that by yourself somehow.

Cu Selur
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)