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 21st September 2018, 15:04   #1001  |  Link
marcomsousa
Registered User
 
Join Date: Jul 2018
Posts: 61
Quote:
Originally Posted by LigH View Post
Just chatted a bit in IRC ... gnafu believes that CONFIG_LOWBITDEPTH=1 is a) still necessary to be set at compile time, b) in general useful, because it enables an optimized code path for 8 bit precision only, but does not alter the behaviour of higher bit depths.

I hope he is right.
I tested with CONFIG_LOWBITDEPTH=1 and it's faster. But it was disable because something...

Code:
Turn off CONFIG_LOWBITDEPTH by default

CodecWG agreed to have this off for default "C" model.
Commit
__________________
AV1 win64 VS2017 builds
Last build here | History
I also open source the build scripts at Github: here

Last edited by marcomsousa; 21st September 2018 at 16:28.
marcomsousa is offline   Reply With Quote
Old 21st September 2018, 17:50   #1002  |  Link
alex1399
Registered User
 
Join Date: Jun 2018
Posts: 51
Who is gnafu?
alex1399 is offline   Reply With Quote
Old 21st September 2018, 17:59   #1003  |  Link
SmilingWolf
I am maddo saientisto!
 
SmilingWolf's Avatar
 
Join Date: Aug 2018
Posts: 92
Quote:
Originally Posted by alex1399 View Post
Who is gnafu?
https://freenode.logbot.info/aomedia/20180921

If your question is "who's him in the project", I think he's just an enthusiast like most of the people here on doom9
SmilingWolf is offline   Reply With Quote
Old 21st September 2018, 18:48   #1004  |  Link
SmilingWolf
I am maddo saientisto!
 
SmilingWolf's Avatar
 
Join Date: Aug 2018
Posts: 92
Graphs time! Click to enlarge
Y axis: chosen metric
X axis: bits per pixel

720p:


1080p:


BD rates for 720p:
Code:
rav1e -> x264
        RATE (%) DSNR (dB)
 MSSSIM -18.3758 0.910887
PSNRHVS -17.3064 1.14428

x264 -> x265
        RATE (%) DSNR (dB)
 MSSSIM -25.6195 1.21115
PSNRHVS -29.8289 1.83058

x265 -> av1
        RATE (%) DSNR (dB)
 MSSSIM -16.6292 0.680221
PSNRHVS -13.0642 0.641722
BD rates for 1080p:
Code:
rav1e -> x264
        RATE (%) DSNR (dB)
 MSSSIM -19.4204 0.869977
PSNRHVS -16.9114 0.949348

x264 -> x265
        RATE (%) DSNR (dB)
 MSSSIM -28.9956 1.18206
PSNRHVS -31.474 1.63676

x265 -> av1
        RATE (%) DSNR (dB)
 MSSSIM -24.1474 0.840846
PSNRHVS -19.4281 0.796909

Clips used for 720p: F.Y.C, KimiNoNa720, PresageFlowerFight720, PresageFlowerWalk720, TearsOfSteel720, TheFifthElement, ThisIsHalloween
Clips used for 1080p: KimiNoNa, PresageFlowerFight, PresageFlowerWalk, TearsOfSteel

Encoders:
x264 157-2932-303c484
x265 2.8-68-fa57fa584898
rav1e 0.1.0-315-1fa32bbd
av1 1.0.0-577-g8ae39302e

VQM Tools:
dump_msssim and dump_psnrhvs from the daala git repo: https://github.com/xiph/daala
Everything glued together with some bash and python2 scripts
The metrics used are from the Total field of the tools' output, so they take into account both luma and chroma. In dump_msssim this just looks like an arithmetic mean between the three measurements, while dump_psnrhvs applies some weighting.
The final metrics-per-resolution have been obtained taking the measurement for each clip and weighting it with the number of pixels.

Cmdlines:
x264 --preset veryslow --tune ssim --crf 16 -o test.x264.crf16.264 orig.i420.y4m
x265 --preset veryslow --tune ssim --crf 16 -o test.x265.crf16.hevc orig.i420.y4m
rav1e -o test.rav1e.cq80.webm --quantizer 80 -s 3 --tune psnr orig.i420.y4m
aomenc --frame-parallel=0 --tile-columns=6 --auto-alt-ref=1 --cpu-used=4 --tune=psnr --passes=2 --threads=4 --end-usage=q --cq-level=20 --test-decode=fatal -o test.av1.cq20.webm orig.i420.y4m

Quality settings:
x264: CRF 16-24 step 1, and 24-34 step 2
x265: CRF 16-24 step 1, and 24-34 step 2
rav1e: CQ 80-160 step 16
aomenc: CQ 20-40 step 4

Clips used:
F.Y.C: https://amvnews.ru/index.php?go=Files&in=view&id=6801, second link, the 250.78Mb one. Clip cut with ffmpeg -ss 00:00:10 -t 20, 1280x720, 480 frames
KimiNoNa and KimiNoNa720: scene from the Kimi no Namae Wa, BD source. Clip cut with ffmpeg -ss 00:01:13 -t 17, 1920x1080, 410 frames
PresageFlowerFight and PresageFlowerFight720: scene from Fate/stay night: Heaven's Feel - Presage Flower, BD source. Clip cut with ffmpeg -ss 00:43:50 -t 15, 1920x1080, 360 frames
PresageFlowerWalk and PresageFlowerWalk720: scene from Fate/stay night: Heaven's Feel - Presage Flower, BD source. Clip cut with ffmpeg -ss 00:15:14 -t 13, 1920x1080, 312 frames
TearsOfSteel and TearsOfSteel720: https://media.xiph.org/tearsofsteel/...l-1080bis-png/ frames 13500 to 13900, 1920x800, 400 frames
TheFifthElement: clip found on the #aomedia channel: https://freenode.logbot.info/aomedia/20180726 -> themayhaks.com/~gideon/tfe.mkv, 1280x534, 240 frames
ThisIsHalloween: https://www.animemusicvideos.org/mem...o.php?v=196998, second link, the LOCAL/123 MiB one. Clip cut with ffmpeg -ss 00:01:50 -t 15, 1280x720, 450 frames

Clips notes/misc details:
All of them have been losslessly cut and stored in FFv1 in an MKV container to serve as master files, decoded to y4m for encoding. All the master files use 8bits 4:2:0 subsampling, and so do the encodes.
The *720 clips actually have been resized to a 1280 width and the heigth has been adjusted accordingly, so either 720 or 534 as required to keep the aspect ratio.
Resizing done with ffmpeg using the z.img library/zscale video filter, using a 4 taps lanczos kernel.
F.Y.C: mixed and superimposed anime/real life content, lots of effects, rain in a couple of scenes, fast motion, flashes, many scenecuts. AMV encoder unknown, final bitrate around 9.4Mb/s
KimiNoNa and KimiNoNa720: anime, detailed backgrounds, brief scene with moving croud, cut to moving trains, cut to moving background with static foreground, few scenecuts
PresageFlowerFight and PresageFlowerFight720: anime, fight between Rider and Saber for whoever knows what I'm talking about, lots of particles at some point, reasonably fast motion, few scenecuts
PresageFlowerWalk and PresageFlowerWalk720: anime, MC just walking around in the school, no really detailed backgrounds, mostly static and slow, very few scenecuts
TearsOfSteel and TearsOfSteel720: real life with synthetic/rendered elements, smoke, rapid camera movement and motion, very few scenecuts
TheFifthElement: real life, lots of film grain, static, very few scenecuts. The original uploader sourced the clip from the BD and resized it himself
ThisIsHalloween: anime, no effects, some flames in a scene, mostly static but brief scenes, many scenecuts. Scenes used come from the BD box of the anime (Soul Eater), the final encode of the AMV has been made with x264, CRF 15 and --preset veryslow --tune animation, final bitrate around 4.3Mb/s

As you have already noticed, my testbed mostly covers my personal interests: AMVs (F.Y.C and ThisIsHalloween) and anime in general, with some real life content thrown in the mix
Natural consequence, since I tailored this to my needs, is that I used only encoding settings I felt confortable with, especially with aomenc:
- maximum number of tiles allowed per clip for smooth playback and (whenever it didn't bug out) multithreaded encoding
- cpu-used no lower than 4 or I would have never seen the end of it

Alright, wall of text over, I'm open to any kind of feedback since I'm posting this to get corrections or suggestions

Last edited by SmilingWolf; 21st September 2018 at 19:21.
SmilingWolf is offline   Reply With Quote
Old 21st September 2018, 19:31   #1005  |  Link
NikosD
Registered User
 
Join Date: Aug 2010
Location: Athens, Greece
Posts: 2,708
Quote:
Originally Posted by SmilingWolf View Post
Alright, wall of text over, I'm open to any kind of feedback since I'm posting this to get corrections or suggestions
Oh man!

I'm speechless of your work and of your post!

Good to see you around.
__________________
Win 10 x64 (18363.476) - Core i3-9100F - nVidia 1660 (441.41)
HEVC decoding benchmarks
H.264 DXVA Benchmarks for all
NikosD is offline   Reply With Quote
Old 21st September 2018, 22:26   #1006  |  Link
marcomsousa
Registered User
 
Join Date: Jul 2018
Posts: 61
Quote:
Originally Posted by SmilingWolf View Post
...
Excelent post
__________________
AV1 win64 VS2017 builds
Last build here | History
I also open source the build scripts at Github: here
marcomsousa is offline   Reply With Quote
Old 22nd September 2018, 03:39   #1007  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 532
Quote:
Originally Posted by marcomsousa View Post
Excelent post
And +1
hydra3333 is offline   Reply With Quote
Old 22nd September 2018, 05:00   #1008  |  Link
Tommy Carrot
Registered User
 
Tommy Carrot's Avatar
 
Join Date: Mar 2002
Posts: 855
If anyone is curious how the encoding speed improved in the last half year or so, here's a little comparison between the different versions:
Code:
  version   | enc time  | filesize
0.1.0-9348  |    152    |  183494
0.1.0-9559  |    119    |  182391
0.1.0-9658  |    109    |  182118
1.0.0-6     |     94    |  182856
1.0.0-82    |     86    |  182952
1.0.0-181   |     61    |  184139
1.0.0-245   |     59    |  189154
1.0.0-399   |     51    |  180221
1.0.0-541   |     22    |  184505
1.0.0-629   |     15    |  184616
I used cpu-used=1 in all cases, and tried to match the bitrates as close as possible in constant quality mode. The encoding speed is still very slow, but as you can see, it finally started to improve at a higher pace lately (although the last 2 builds used CONFIG_LOWBITDEPTH=1, so they are not really comparable). Aomenc is still way too slow for any productive purpose, but at least it's possible to test it now.
Tommy Carrot is offline   Reply With Quote
Old 22nd September 2018, 05:46   #1009  |  Link
Nintendo Maniac 64
Registered User
 
Nintendo Maniac 64's Avatar
 
Join Date: Nov 2009
Location: Northeast Ohio
Posts: 428
Quote:
Originally Posted by marcomsousa View Post
Excelent post
And +2



Quote:
Originally Posted by SmilingWolf View Post
fight between Rider and Saber for whoever knows what I'm talking about
The original visual novel is better.

(and that's not all all because I've had a hand with some of the media stuff in the latest and upcoming unofficial English PC versions of "Fate/stay night Realta Nua", nope no way what 'choo talkin' bout Willis you crazy)
Nintendo Maniac 64 is offline   Reply With Quote
Old 22nd September 2018, 09:33   #1010  |  Link
NikosD
Registered User
 
Join Date: Aug 2010
Location: Athens, Greece
Posts: 2,708
Quote:
Originally Posted by Tommy Carrot View Post
If anyone is curious how the encoding speed improved in the last half year or so, here's a little comparison between the different versions:
Code:
  version   | enc time  | filesize
0.1.0-9348  |    152    |  183494
.
.
1.0.0-629   |     15    |  184616
It seems it's an order of magnitude faster.

10 times faster is a lot, but obviously it has further big margins to improve.

I wonder how long is going to take for another 10 times improvement.
__________________
Win 10 x64 (18363.476) - Core i3-9100F - nVidia 1660 (441.41)
HEVC decoding benchmarks
H.264 DXVA Benchmarks for all
NikosD is offline   Reply With Quote
Old 22nd September 2018, 10:20   #1011  |  Link
SmilingWolf
I am maddo saientisto!
 
SmilingWolf's Avatar
 
Join Date: Aug 2018
Posts: 92
Quote:
Originally Posted by Nintendo Maniac 64 View Post
I'd have you fight me IRL for dissing anything ufotable, but that evened out after you gave me a reason to install FSN again
(And for being on the first line in the works, thanks to y'all for what you do!)

Also, the pre-edit "the original visual novel from 2004" was just fine, I didn't choose FSN just because the clips look good

Quote:
Originally Posted by NikosD View Post
I wonder how long is going to take for another 10 times improvement.
That's an interesting question.
The 0.1.0-9348 build is from April, so that's 146 days between the first and the last tested build. Now, of course these things don't really follow a linear time-optimization correlation, buuuuut I wonder where we'll be in another 4 months
Maybe they'll get cpu-used=4 on par (speed wise) with x265's placebo-and-then-slowed-down-some-more, using the no-wpp etc. etc. settings benwaggoner suggested a few pages ago, which in my limited testing came around at half aomenc's time a week or two ago.
Also rav1e might become a real game changer for av1 encoding in the same timeframe. I surely hope so.

And a small heads up, Video Dev Days have officially begun, and today they're going to showoff dav1d, their very own decoder!

Exciting times ahead!

Last edited by SmilingWolf; 22nd September 2018 at 11:06.
SmilingWolf is offline   Reply With Quote
Old 22nd September 2018, 10:35   #1012  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,903
Quote:
And a small heads up, VideoLAN Developer Days have officially began, and today they're going to showoff dav1d, their very own encoder!
decoder not encoder
according to: https://www.videolan.org/videolan/ev...dd18/#saturday
__________________
Hybrid here in the forum, homepage
Notice: Since email notifications do not work here any more, it might take me quite some time to notice a reply to a thread,..
Selur is offline   Reply With Quote
Old 22nd September 2018, 10:40   #1013  |  Link
SmilingWolf
I am maddo saientisto!
 
SmilingWolf's Avatar
 
Join Date: Aug 2018
Posts: 92
Aye, caffeinated typo slipped in. Corrected, thanks!

EDIT: in the meantime, the presentation has finished. Does anyone know if there's a livestream or at least a youtube channel where they upload stuff as they go?
SmilingWolf is offline   Reply With Quote
Old 22nd September 2018, 10:48   #1014  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,833
Quote:
Originally Posted by SmilingWolf View Post
EDIT: in the meantime, the presentation has finished. Does anyone know if there's a livestream or at least a youtube channel where they upload stuff as they go?
Unfortunately, I don't think so. Its rather hilarious that a open-source multimedia conference can't figure out streaming or at least on-demand videos afterwards.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel is online now   Reply With Quote
Old 22nd September 2018, 15:49   #1015  |  Link
Mr_Khyron
Member
 
Mr_Khyron's Avatar
 
Join Date: Nov 2002
Posts: 117
dav1d source code
https://code.videolan.org/videolan/dav1d
Mr_Khyron is offline   Reply With Quote
Old 22nd September 2018, 16:14   #1016  |  Link
SmilingWolf
I am maddo saientisto!
 
SmilingWolf's Avatar
 
Join Date: Aug 2018
Posts: 92
Quote:
Originally Posted by Mr_Khyron View Post
Uwheee!

dav1d-0.0.1-7-bb521ef9: https://mega.nz/#!w9xlxZpT!_KfDw7rp9...aHkG8eJgoHLwrg
EDIT: botched on Windows because of the usual open(file, "r") bug. Needs to be open(file, "rb") for binary objects, lest files be treated as text and the input mangled.
Will submit a patch ASAP
EDIT2: https://code.videolan.org/videolan/d...uests/12/diffs

Last edited by SmilingWolf; 22nd September 2018 at 17:19.
SmilingWolf is offline   Reply With Quote
Old 22nd September 2018, 16:48   #1017  |  Link
Zebulon84
Registered User
 
Join Date: Apr 2015
Posts: 13
Previous Video Dev Days conferences are available on Vimeo so I guess it will be the same for 2018. But videos for 2017 Video Dev Days were posted last may, so we may have to wait quite a while.
Zebulon84 is offline   Reply With Quote
Old 22nd September 2018, 20:00   #1018  |  Link
hajj_3
Registered User
 
Join Date: Mar 2004
Posts: 905
Quote:
Originally Posted by Zebulon84 View Post
Previous Video Dev Days conferences are available on Vimeo so I guess it will be the same for 2018. But videos for 2017 Video Dev Days were posted last may, so we may have to wait quite a while.
possibly, the 2016 ones were posted on their youtube channel in a timely manner: https://www.youtube.com/user/VideoLANorg/videos
hajj_3 is online now   Reply With Quote
Old 23rd September 2018, 05:28   #1019  |  Link
Nintendo Maniac 64
Registered User
 
Nintendo Maniac 64's Avatar
 
Join Date: Nov 2009
Location: Northeast Ohio
Posts: 428
Now the wait begins for dav1d to be implemented into LAVfilters and for my low multi-threaded utilization woes to be gone once and for all!

...please tell me I'm not being overly optimistic by saying that? The way I see it, a Xeon x3470 shouldn't be all too different from the likes of an i7-8550U seeing as the Xeon has a ~33% IPC deficit while the i7 has a ~33% clockrate deficit, so the end result should be pretty similar (not counting AVX anyway).

I mean, if its too slow on an i7-8550U, then it'll be too slow for almost all laptops in existence except for maybe those 6core i9 laptops and those crazy gamer/professional laptops that have full-fat desktop CPUs like that Asus with a Ryzen 1700.




Quote:
Originally Posted by SmilingWolf View Post
you gave me a reason to install FSN again
Just as long as it's that upcoming "merge project" mentioned on the last couple of pages at the end of the linked thread, otherwise I'll never forgive you.

(to clarify, the original visual novel only renders at 800x600 while this "merge project" will have HD visuals and high-res text - that alone should make it a no-brainer)


Quote:
Originally Posted by SmilingWolf View Post
Also, the pre-edit "the original visual novel from 2004" was just fine
I only removed the "2004" text because I thought using "original" would be clearer to convey that the visual novel came before any think else Fate-related.
Nintendo Maniac 64 is offline   Reply With Quote
Old 23rd September 2018, 11:02   #1020  |  Link
SmilingWolf
I am maddo saientisto!
 
SmilingWolf's Avatar
 
Join Date: Aug 2018
Posts: 92
Quote:
Originally Posted by Nintendo Maniac 64 View Post
Now the wait begins for dav1d to be implemented into LAVfilters and for my low multi-threaded utilization woes to be gone once and for all!

...please tell me I'm not being overly optimistic by saying that? The way I see it, a Xeon x3470 shouldn't be all too different from the likes of an i7-8550U seeing as the Xeon has a ~33% IPC deficit while the i7 has a ~33% clockrate deficit, so the end result should be pretty similar (not counting AVX anyway).

I mean, if its too slow on an i7-8550U, then it'll be too slow for almost all laptops in existence except for maybe those 6core i9 laptops and those crazy gamer/professional laptops that have full-fat desktop CPUs like that Asus with a Ryzen 1700.
I'm afraid we're not quite there yet. Using my most CPU-intensive clip (PresageFlowerFight, 1080 encoded with as many tiles as possible) I have only been able to observe a 45% max utilization with --framethreads 8
My CPU is an i7-4770, with 4/8 cores

Some timings:
Code:
# time ./dav1d.exe --framethreads 8 -o /dev/null --muxer yuv4mpeg2 -i Fight.cq20.1080p.ivf 2> /dev/null

real    0m19,460s
user    0m0,000s
sys     0m0,000s

# time aomdec.exe --threads=8 -o /dev/null Fight.cq20.1080p.ivf

real    0m5,170s
user    0m0,000s
sys     0m0,000s
Right now dav1d is implemented in pure C and of course it shows. It'll be more interesting after ASM optimizations start trickling in.

EDIT: after playing a bit with the numbers I've been able to push the times down a bit further and CPU util higher (50-53% range):
Code:
# time ./dav1d.exe --framethreads 6 --tilethreads 2 -o /dev/null --muxer yuv4mpeg2 -i Fight.cq20.1080p.ivf 2> /dev/null

real    0m17,800s
user    0m0,000s
sys     0m0,000s
Quote:
Originally Posted by Nintendo Maniac 64 View Post
I only removed the "2004" text because I thought using "original" would be clearer to convey that the visual novel came before any think else Fate-related.
I see, I see

Last edited by SmilingWolf; 23rd September 2018 at 11:19.
SmilingWolf 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 11:53.


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