Log in

View Full Version : Any 2021 lossless video comparison?


Pages : 1 [2]

PCU
23rd April 2022, 09:53
You are banned on the ffmpeg development mailing list. You participated in nothing constructive.

How to unsub from the FFmpeg mailing list? I still receive emails from them.

rwill
23rd April 2022, 11:33
x265 encoder library lossless mode is not very optimised, so it is known, but that is just because it does not yet support SCC, just CABAC. Read this, as you can see reference encoder lossy and lossless are so much better with scc https://www.cambridge.org/core/services/aop-cambridge-core/content/view/S2048770315000116

If you had actually understood the paper you are referencing you would have seen that the SCC extensions only work well with screen content like flat areas and text. The paper you referenced even shows clearly that there no gain for the video content like computer animation or camera captured content (normal video content this thread is about?).

SCC tools are completely useless except for screen content. It is very strong in video conferencing though. What you did is like saying PNG performs higher than JPEG.

CABAC is the entropy coder by the way, not a tool like SCC, you compared an Apple with an Orange.

Are you just typing words in google and use some GPT3 model to generate these forum posts ?

rwill
23rd April 2022, 11:35
How to unsub from the FFmpeg mailing list? I still receive emails from them.

Google "ffmpeg mailing list unsubscribe". Its the first hit (the FFMPEG FAQ).

poisondeathray
23rd April 2022, 15:42
x264 lossless mode is actually rather good, but a bit limited in that it doesnt support 10bit (afaik).

It does

1920x1080 10bit422 src (709,SDR) test, default settings incl. gop size (lossless outputs verified with psnr)

x264 445Mb/s
aom-av1 447Mb/s (bloody slow. Basically useless)
x265 454Mb/s
ffv1 462Mb/s

excellentswordfight
23rd April 2022, 18:46
It does

1920x1080 10bit422 src (709,SDR) test, default settings incl. gop size (lossless outputs verified with psnr)

x264 445Mb/s
aom-av1 447Mb/s (bloody slow. Basically useless)
x265 454Mb/s
ffv1 462Mb/s
Strange, when I feed 10bit to x264 it looks like this:

x264 [info]: profile High 4:4:4 Predictive, level 5.1, 4:2:0, 8-bit

and when i set high10 I get:

x264 [error]: high10 profile doesn't support lossless

edit.
Hmm when I set --input-depth 10 --output-depth 10 the output is 10bit, but then its not using the High 4:4:4 Predictive profile, its using high10 which --fullhelp say doesnt support lossless (the output is suspiciously low at 500Mbps for 2160p movie content so I dont think its lossless), adding --profile high444 doesnt help. So what switches should I use?

edit2.
Using:

x264 0.164.3079 d9a19f0
(libswscale 6.1.101)
(libavformat 59.9.102)
(ffmpegsource 3.0.1.0)
(lsmash 2.16.1)
built on Dec 9 2021, gcc: 11.2.0
x264 configuration: --chroma-format=all
libx264 configuration: --chroma-format=all

poisondeathray
23rd April 2022, 20:25
Strange, when I feed 10bit to x264 it looks like this:

x264 [info]: profile High 4:4:4 Predictive, level 5.1, 4:2:0, 8-bit

and when i set high10 I get:

x264 [error]: high10 profile doesn't support lossless

edit.
Hmm when I set --input-depth 10 --output-depth 10 the output is 10bit, but then its not using the High 4:4:4 Predictive profile, its using high10 which --fullhelp say doesnt support lossless (the output is suspiciously low at 500Mbps for 2160p movie content so I dont think its lossless), adding --profile high444 doesnt help. So what switches should I use?

edit2.
Using:

x264 0.164.3079 d9a19f0
(libswscale 6.1.101)
(libavformat 59.9.102)
(ffmpegsource 3.0.1.0)
(lsmash 2.16.1)
built on Dec 9 2021, gcc: 11.2.0
x264 configuration: --chroma-format=all
libx264 configuration: --chroma-format=all



Not sure, I used an old r3000 x264 tmod binary by jpdsr
https://github.com/jpsdr/x264/releases

I didn't set profile for any of them, they were all "auto". This is what mediainfo said for 3 methods below


Format profile : High 4:4:4 Predictive@L4
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:2
Bit depth : 10 bits



For direct input, I used demuxer lavf , src was prores file . If your binary does not have high bit depth support you won't get that "resize [warning]: converting from yuv422p10le to yuv422p16le"

.
.
.
lavf [info]:
Format : mov,mp4,m4a,3gp,3g2,mj2
Codec : prores ( ProRes (iCodec Pro) )
PixFmt : yuv422p10le
Framerate : 2997/125
Timebase : 1/23976
Duration : 0:00:26
lavf [info]: 1920x1080p 0:1 @ 24000/1001 fps (cfr)
lavf [info]: color matrix: GBR
mp4 [info]: audio muxing feature is disabled.
resize [warning]: converting from yuv422p10le to yuv422p16le
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile High 4:4:4 Predictive, level 4.0, 4:2:2, 10-bit
.
.
.


1) demuxer lavf , direct input

"x264_x64.exe" --demuxer lavf --input-csp i422 --input-depth 10 --input-res 1920x1080 --fps 24000/1001 --output-csp i422 --output-depth 10 --qp 0 -o "x264_demuxerlavf.mp4" "input.mov"


2) Or, for x264cli , you can use rawvideo pipe , e.g. ffmpeg rawvideo pipe

ffmpeg -i "input.mov" -pix_fmt yuv422p10le -f rawvideo - | "x264_x64.exe" --demuxer raw --input-csp i422 --input-depth 10 --input-res 1920x1080 --fps 24000/1001 --output-csp i422 --output-depth 10 --qp 0 -o x264_rawpipe.mp4 -


3) Or you can use ffmpeg libx264 directly, it will automatically set the pixel format to 10bit422 if input was 10bit422 .


ffmpeg -i input.mov -an -c:v libx264 -qp 0 libx264.mp4


All 3 methods were verified lossless by psnr

PCU
24th April 2022, 10:41
Google "ffmpeg mailing list unsubscribe". Its the first hit (the FFMPEG FAQ).

- Results:
Ignoring non-text/plain MIME parts
***@***.com is not a member of the ffmpeg-user mailing list

I still receive emails from the list!

MasterNobody
24th April 2022, 13:59
Strange, when I feed 10bit to x264 it looks like this:

x264 [info]: profile High 4:4:4 Predictive, level 5.1, 4:2:0, 8-bit

and when i set high10 I get:

x264 [error]: high10 profile doesn't support lossless

edit.
Hmm when I set --input-depth 10 --output-depth 10 the output is 10bit, but then its not using the High 4:4:4 Predictive profile, its using high10 which --fullhelp say doesnt support lossless (the output is suspiciously low at 500Mbps for 2160p movie content so I dont think its lossless), adding --profile high444 doesnt help. So what switches should I use?

edit2.
Using:

x264 0.164.3079 d9a19f0
(libswscale 6.1.101)
(libavformat 59.9.102)
(ffmpegsource 3.0.1.0)
(lsmash 2.16.1)
built on Dec 9 2021, gcc: 11.2.0
x264 configuration: --chroma-format=all
libx264 configuration: --chroma-format=all

1) H.264 lossless mode is supported only in high444 irrespectively of bit depth (8-bit or 10-bit). So you shouldn't specify profile (keep auto) or specify high444.
2) To enable lossless in x264 you should use `--qp 0` (not `--crf 0` especially for 10-bit).
3) To enable 10-bit encoding you should specify `--output-depth 10` (because default is 8 irrespectively of source).

excellentswordfight
24th April 2022, 15:06
1) H.264 lossless mode is supported only in high444 irrespectively of bit depth (8-bit or 10-bit). So you shouldn't specify profile (keep auto) or specify high444.
2) To enable lossless in x264 you should use `--qp 0` (not `--crf 0` especially for 10-bit).
3) To enable 10-bit encoding you should specify `--output-depth 10` (because default is 8 irrespectively of source).
Thank you! Using qp 0 and not crf did the trick! I can also see now that fullhelp states that qp 0 is the switch for lossless mode. But its a bit strange though as it seems like the encoder recognize crf 0 as lossless mode in some combinations.

rwill
24th April 2022, 21:37
- Results:
Ignoring non-text/plain MIME parts
***@***.com is not a member of the ffmpeg-user mailing list

I still receive emails from the list!

Maybe you are subscribed to the devel list...

Have you checked the links to the respective different ffmpeg mailing lists here:

https://ffmpeg.org/contact.html#MailingLists ?

Otherwise I guess you have to pester some ffmpeg admin.

FranceBB
24th April 2022, 22:16
For direct input, I used demuxer lavf , src was prores file . If your binary does not have high bit depth support you won't get that "resize [warning]: converting from yuv422p10le to yuv422p16le"

About the "resize warning", I deal with 10bit and 12bit sources all the time and I find it a bit annoying to go to 16bit planar every time in Avisynth only for x264 to then use the Sierra A2-4 error diffusion dithering to go back to 10bit planar...

Sometimes I get 10bit sources I don't have to apply any post processing to 'cause they're already fine and I'd just like to encode them to 10bit H.264, so going from 10bit planar to 16bit and then back to 10bit is a bit of a waste.
I just wish x264 supported all Avisynth high bit depth input (10bit, 12bit, 14bit) and not just 8bit and 16bit...

poisondeathray
24th April 2022, 23:43
About the "resize warning", I deal with 10bit and 12bit sources all the time and I find it a bit annoying to go to 16bit planar every time in Avisynth only for x264 to then use the Sierra A2-4 error diffusion dithering to go back to 10bit planar...

Sometimes I get 10bit sources I don't have to apply any post processing to 'cause they're already fine and I'd just like to encode them to 10bit H.264, so going from 10bit planar to 16bit and then back to 10bit is a bit of a waste.
I just wish x264 supported all Avisynth high bit depth input (10bit, 12bit, 14bit) and not just 8bit and 16bit...


I think it's because of the old avs demuxer, where pixel formats such as yuv422p10 were not supported...I would think it should be possible to update it...

Or if you use avs to raw pipe, or ffmpeg libx264 with avs input - there is no up/down conversion

Balling
20th May 2022, 22:09
Thank you! Using qp 0 and not crf did the trick! I can also see now that fullhelp states that qp 0 is the switch for lossless mode. But its a bit strange though as it seems like the encoder recognize crf 0 as lossless mode in some combinations.

No, 8 bit is always lossless with crf 0. It is just that profile high10 is in by itself not lossless so crf 0 for high10 is also not lossless, you need to force high444 [predictive] to do 10 bit lossless and that is what qp 0 does.

rwill
22nd May 2022, 10:44
"No, 10 bit is always lossless with crf -12.0"

Balling
31st May 2022, 20:35
"No, 10 bit is always lossless with crf -12.0"

Ffmpeg converted those (+12 for all of them). So no, -12 is not allowed. So no the problem is high10 does not support lossless, by design of x264 or by the spec.

Balling
22nd September 2022, 20:57
If you had actually understood the paper you are referencing you would have seen that the SCC extensions only work well with screen content like flat areas and text. The paper you referenced even shows clearly that there no gain for the video content like computer animation or camera captured content (normal video content this thread is about?).

SCC tools are completely useless except for screen content. It is very strong in video conferencing though. What you did is like saying PNG performs higher than JPEG.

CABAC is the entropy coder by the way, not a tool like SCC, you compared an Apple with an Orange.

Are you just typing words in google and use some GPT3 model to generate these forum posts ?

I am pretty sure I am not GPT3, thank you very much, though I did test that 4chan model, model that was banned everywhere, nice one. SCC is a profile, just like HIGH 10 and predictive, which you would know if you looked into not yet merged decoding patches for ffmpeg. PNG does indeed perfom much better, smaller size, for screenshots on my phone, because vector graphics and when there is no crazy color subpixel rendering, like in google drive pdf app, e.g. and anyway, the support is not yet added into overoptimised x265, so there is no way to say whether it will be better for camera images, I saw that YUV is indeed 0% better for lossless and even slightly worse for lossy. What I think you completly missed is it is much better for RGB camera captured, lossy not lossless. That is one of key moments why AV1 is better for RGB.