Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th March 2018, 09:31   #501  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,577
@all: Is there some documentation about the command line parametes of aomenc somewhere?
Looking at the output of 'aomenc --help' there a quite a few option without explanations about min/max values of the arguments or what the default argument is.
Code:
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
            --i440                     	Input file is I440
  -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)
            --error-resilient=<arg>    	Enable 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)
            --tile-loopfilter-v=<arg>  	Enable loop filter across vertical tile boundary
            --tile-loopfilter-h=<arg>  	Enable loop filter across horizontal tile boundary
            --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)
            --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
            --disable-tempmv=<arg>     	Disable temporal mv prediction (default is 0)
  -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

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-8663-gaf35e318e (default)

        Use --codec to switch to a non-default encoder.
So I'm wondering is there some documentation somewhere what all those parameters are for and what their values are?
Or is this simply still to early to expect a bit more detailed documentation?
Seeing that a few folks did some tests here I wonder how they chose the settings they used. (some parameters are kept from vpx, but quite a few are new)

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 16th March 2018, 20:22   #502  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,425
AOM v0.1.0-8698-gba7b8fe27
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 16th March 2018, 22:14   #503  |  Link
colinhunt
Registered User
 
Join Date: Dec 2002
Posts: 998
Thank you LigH for providing binaries. I did a little test yesterday, and noticed that it would take 4 hours to encode 1 second of 1080p60 footage. Am I guessing correctly there's no multithreading in the encoder yet? I noticed the -t parameter for number of threads, but setting it to 8-12 had no effect; aomenc kept running on a single core.

Last edited by colinhunt; 16th March 2018 at 22:38.
colinhunt is offline   Reply With Quote
Old 16th March 2018, 22:19   #504  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,425
I only tested it with a tiny resolution so far, and blamed the low resolution for the lack of threading. If it doesn't use threading for larger resolutions either ... then it's not yet implemented, I guess.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 16th March 2018, 22:38   #505  |  Link
colinhunt
Registered User
 
Join Date: Dec 2002
Posts: 998
^ Okay... might it be possible that -t parameter is referring to something else besides multithreading? Just trying to figure out if I messed something up.
colinhunt is offline   Reply With Quote
Old 16th March 2018, 23:29   #506  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,425
No, I could only agree: I would expect multi-threaded processing of frames, possibly in a slices or wavefront partition technology. (AFAIR, AV1 still uses small macroblock-like windows, just more overlapping to neighborhoods...)
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 17th March 2018, 03:41   #507  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,333
I don't think anyone but the developers know what half the options mean or do, though some expected values are in the code. You might try --cpu-used=8, which is supposed to max out the processing power.

Actually don't bother, that argument does nothing, they nerfed it without removing the option. Hm. Maybe pthreads isn't detected correctly? OK, tracing the code, you have to have more than one tile-column to get more than one thread; threading is tile-based only. You'd think default would equal threads, but...?
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order. ~ Ed Howdershelt
foxyshadis is offline   Reply With Quote
Old 17th March 2018, 06:01   #508  |  Link
Tommy Carrot
Registered User
 
Tommy Carrot's Avatar
 
Join Date: Mar 2002
Posts: 821
--cpu-used is actually the speed/quality slider, it has nothing to do with threading, they just named it stupidly. The lower it is, the more additional tools and searches are enabled, so 0 is the highest quality, but ridiculously slow, and 8 is the "fastest", but lowest quality.
Tommy Carrot is offline   Reply With Quote
Old 17th March 2018, 12:58   #509  |  Link
colinhunt
Registered User
 
Join Date: Dec 2002
Posts: 998
This cmdline

ffmpeg -i moto--x264-8bit-420-1080p2400fps-468frames.mp4 -strict -1 -f yuv4mpegpipe - | aomenc -w 1920 -h 1080 -v --fps=24000/1000 --cpu-used=8 --dev-sf=255 --tile-columns=6 --limit=48 --i420 -t 24 -b 8 --input-bit-depth=8 --end-usage=cbr --target-bitrate=1024 -p 1 --webm --num-tile-groups=32 -o aomout.webm -

resulted in aomenc running 15 threads and cpu load bouncing around between 4 and 20 percent. Encoding 48 frames took approx. 10 minutes.
colinhunt is offline   Reply With Quote
Old 17th March 2018, 14:54   #510  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,425
IMHO, aomenc (and vpxenc the same way) will need a lot of simplification regarding sane defaults and relations between parameters to become user friendly... balancing the presets (and "everything default" equals to the "medium" preset) for x264 and x265 took quite an important part of their development efforts.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 17th March 2018 at 14:57.
LigH is offline   Reply With Quote
Old 17th March 2018, 17:05   #511  |  Link
colinhunt
Registered User
 
Join Date: Dec 2002
Posts: 998
Source: 1080p24 8bit 4:2:0 468 frames (19.5 seconds)

cmdline: ffmpeg -i moto--x264-8bit-420-1080p2400fps-468frames.mp4 -strict -1 -f yuv4mpegpipe - | aomenc -w 1920 -h 1080 -v --fps=24000/1000 --cpu-used=4 --tile-columns=6 --i420 -t 14 -b 8 --input-bit-depth=8 --end-usage=vbr --target-bitrate=1024 -p 1 --webm -o aomout.webm -

Encoding took 74 minutes, running on 14 threads. Output has a reported (mediainfo) bitrate of 1047 kbps. Oddly enough framerate is reported as 24.025 fps.
colinhunt is offline   Reply With Quote
Old 17th March 2018, 17:37   #512  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,425
Maybe aomenc doesn't count the duration of the very last frame, only the gaps between all of them.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 17th March 2018 at 17:40.
LigH is offline   Reply With Quote
Old 17th March 2018, 17:44   #513  |  Link
colinhunt
Registered User
 
Join Date: Dec 2002
Posts: 998
Quote:
Originally Posted by LigH View Post
Maybe aomenc doesn't count the duration of the very last frame, only the gaps between all of them.
You mean that framerate? That number is from Mediainfo.
colinhunt is offline   Reply With Quote
Old 17th March 2018, 17:50   #514  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,425
Hmm, yes, it looks a bit like "duration / (framecount-1)". So, maybe the opposite way, aomenc counted the duration of the last frame, MediaInfo instead assumes it does not count.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 17th March 2018, 22:54   #515  |  Link
colinhunt
Registered User
 
Join Date: Dec 2002
Posts: 998
I encoded the same 1080p24 8bit 4:2:0 source on aomenc 0.1.0-8449-g6471e8bd7 twice, first with --cpu-used=4 and then with --cpu-used=2. Target bitrate was set for 1024 kbps. Below are the 3SSIM Metric graphs for both encodes.



--cpu-used=4 (green) took 4440 seconds to encode, while --cpu-used=2 (red) took 9060 seconds.

Last edited by colinhunt; 17th March 2018 at 23:00.
colinhunt is offline   Reply With Quote
Old 20th March 2018, 17:32   #516  |  Link
bstrobl
Registered User
 
Join Date: Jun 2016
Posts: 51
IETF 101: https://www.youtube.com/watch?v=qS7hfrFWeic

Spec is somewhat "frozen", so only bugfixes left.

Last edited by bstrobl; 20th March 2018 at 17:42.
bstrobl is offline   Reply With Quote
Old 20th March 2018, 19:15   #517  |  Link
iwod
Registered User
 
Join Date: Apr 2002
Posts: 719
Quote:
Originally Posted by bstrobl View Post
IETF 101: https://www.youtube.com/watch?v=qS7hfrFWeic

Spec is somewhat "frozen", so only bugfixes left.
And for anyone that has not been following it, it has been somewhat "Frozen" for nearly 6 months.

As said in the video, there are still crap loads of things going on under the hood. That is not necessarily a bad thing, they are taking the time to properly finish it.

But I have slightly less confident given how they have handle it, I hope they release a preview or beta to the industry before going final.
iwod is offline   Reply With Quote
Old 20th March 2018, 19:20   #518  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,286
Quote:
Originally Posted by iwod View Post
But I have slightly less confident given how they have handle it, I hope they release a preview or beta to the industry before going final.
The part of the industry that cares is involved in the development already, so whats left?
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is offline   Reply With Quote
Old 20th March 2018, 19:21   #519  |  Link
bstrobl
Registered User
 
Join Date: Jun 2016
Posts: 51
The interesting part about the xvc presentation is that this is basically the current state of JVET/JEM, along with its current bitrate performance that ISO/ITU and co. have managed to achieve.

Obviously there is no way in hell Divideon is getting away with basically a direct rip of JVET, so if xvc gains any commercial ground whatsoever it will simply get sued into oblivion or into updating and making a poor codec. Might as well use VP9/AV1 in that case, especially if no old files become incompatible. The best they can hope for is to basically become a replacement for MPEG LA, but I don't see any lists where they have gained any companies as licensors.
bstrobl is offline   Reply With Quote
Old 20th March 2018, 21:27   #520  |  Link
hajj_3
Registered User
 
Join Date: Mar 2004
Posts: 819
Quote:
Originally Posted by bstrobl View Post
The interesting part about the xvc presentation is that this is basically the current state of JVET/JEM, along with its current bitrate performance that ISO/ITU and co. have managed to achieve.

Obviously there is no way in hell Divideon is getting away with basically a direct rip of JVET, so if xvc gains any commercial ground whatsoever it will simply get sued into oblivion or into updating and making a poor codec. Might as well use VP9/AV1 in that case, especially if no old files become incompatible. The best they can hope for is to basically become a replacement for MPEG LA, but I don't see any lists where they have gained any companies as licensors.
They should just try and sell their patents to google/Netflix for a few million dollars and get google/Netflix to donate the patents to IETF to be used in AV2.

P.S mediainfo 18.03 has just been released that can detect AV1 files: http://mediaarea.net/en/MediaInfo

Last edited by hajj_3; 20th March 2018 at 22:12.
hajj_3 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:30.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.