Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A littlle lack of details #607

Open
luca2125 opened this issue Jul 18, 2021 · 7 comments
Open

A littlle lack of details #607

luca2125 opened this issue Jul 18, 2021 · 7 comments

Comments

@luca2125
Copy link

luca2125 commented Jul 18, 2021

hi @tianjunwork , @guojiansheng0925 ,

Good morning while I wating for your review about my previous post:
#606

I have performed a deep quality test A/B Libx265 vs Libsvrt with similar parameters.

Here the shared folder with all tests with video / command lines and screeeshot comparation
https://drive.google.com/drive/folders/1kdhGvSdS0JBh3xFBUZTfYT4cG0uR2mz_?usp=sharing

There no doubt that Libsvrt is more faster than Libx265 (2 or 3 times on my CPU) and with less noise, but I found a littlle lack of details.

After this I have tried the preset very slow and lower the CP paramter and I don't get too much difference.

and than I was thinked: what happen If I add "-vf vaguedenoiser" on Libx265 ? and with my surprise I see the result of Libx265 very close to source without noise and without sacrify more additional encoding time.

Here a samples:

Original
original

Libx265
libx265_nr

Libsvrt
libsvrt

Becouse I need to encode about 4 TB of videos (and this means months of PC running) the encoding time is prioritary and I can't use Libx265 becouse need too much time, If is possible restore more details in some way without sacrify more encoding time will be a very good news, if no, pacience, considetation the time save to get the result is a good compromise for my need.

Many thanks !

@tianjunwork
Copy link
Contributor

Hi @luca2125, I am not sure which is the command line you used to encode with SVT-HEVC. Could you paste the command line here?

@luca2125
Copy link
Author

luca2125 commented Jul 18, 2021

Yes:

libsvt (-qp 19)
ffmpeg.exe -i "title_t00_ori_60_sec.mkv" -y -c:v libsvt_hevc -preset 5 -qp 19 -map 0:0 -map 0:s -disposition:a:2 -default-forced -c:s copy -metadata:s:v:0 Language="rom" -t 60 "title_t00_libsvrt_60_Sec_no_audio_no_10_bit_19_gp.mkv"

libsvt
ffmpeg.exe -i "title_t00_ori_60_sec.mkv" -y -c:v libsvt_hevc -preset 5 -qp 21 -map 0:0 -map 0:s -disposition:a:2 -default-forced -c:s copy -metadata:s:v:0 Language="rom" -t 60 "title_t00_libsvrt_60_Sec_no_audio_no_10_bit.mkv"

libx265
ffmpeg.exe -vsync 1 -i "title_t00_ori_60_sec.mkv" -y -c:v libx265 -crf 21 -pix_fmt yuv420p10le -map 0:0 -preset slow -c:s copy -vf vaguedenoiser -metadata:s:v:0 Language="rom" -t 60 "title_t00_Libx265_60_sec_Slow_no_audio_nr.mkv"

however on:
https://drive.google.com/drive/folders/1kdhGvSdS0JBh3xFBUZTfYT4cG0uR2mz_?usp=sharing

you find the screenshots, the command lines, the video and others, where you can compare better the results.

To avoid any doubts I have now uploaded in the some folder the ffmpeg.exe binary that I have used for all tests.

In theory if you lanuch the command line with this ffmpeg.exe you will get the exact files that there are on google grive.

Please let me known if you need more matherial for this or for the other post.

@tianjunwork
Copy link
Contributor

Hi @luca2125 , thanks. Even though you set both encoders with same preset and qp/crf, it doesn't mean they will produce same quality output. The internal implementation of preset tuning is quite different and specific to each encoder.
The file size produced by libsvt is smaller compared with libx265, which means video data is more compressed. To be fair, use smaller preset or qp with libsvt until it generates output file with similar size.

@luca2125
Copy link
Author

luca2125 commented Jul 19, 2021

Hi @tianjunwork,

Thank you for your reponse.

I have upload all these files on google drive to show you what happen:

Even though you set both encoders with same preset and qp/crf, it doesn't mean they will produce same quality output

You have right for this reason I have lowered the GP to 19 on "title_t00_libsvrt_60_Sec_no_audio_no_10_bit_19.mkv" that produce a more great file 28 MB vs 23 MB, but stil missiong part of detail.

The file size produced by libsvt is smaller compared with libx265, which means video data is more compressed. To be fair, use smaller preset or qp with libsvt until it generates output file with similar size.

My test confirm what you say for this reason I have included a smaller Libx265 "title_t00_Libx265_60_sec_Slow_no_audio_nr.mkv"

If you see:

title_t00_libsvrt_60_Sec_no_audio_no_10_bit_19_gp
28 MB

title_t00_Libx265_60_sec_Slow_no_audio_nr
23 MB

the Libx265 is smaller than libsvrt but there is more details.

As I say in my previous message lower the gp < 21 and lower the preset don't do much difference in term of details.

If need I can send other samples but I think onle these files are the demostration.

Please let me known.

Best Reagrds

Marco

@tianjunwork
Copy link
Contributor

I guess gp is qp(quantization parameter)? Could you set preset to 0 to see if any improvement?

@luca2125
Copy link
Author

luca2125 commented Jul 19, 2021

I guess gp is qp(quantization parameter)?

Yes, is correct.

I confirm that if I set the preset to 0 I get improvement and at the some way if lower gp I get improvement.

Please excuse me I have used a wrong words. What I mean that to match the some details SVT-HEVC need more space.

To do an example:

70 MB
title_t00_libsvrt_60_Sec_no_audio_no_10_bit_15_gp.mkv

23 MB
title_t00_Libx265_60_sec_Slow_no_audio_nr.mkv

these files are similar level of details.

I have uploaded in this folder the screenshot do to A/B test:
https://drive.google.com/drive/folders/1fMp-A689F0kwUKfFq4DB6PxZ4UP3eL4o?usp=sharing

In my test SVT-HEVC with my PC is more 2/3 times faster than libx265 but need 2/3 the space to match the some level of details (this is a aproximative).

In my case the speed is prioritary , however if you think is possibile restore more details without sacrify time and size, will be a good thing, otherwise it is good result considering the time it takes.

@tianjunwork
Copy link
Contributor

There is no plan of adding new encoding algorithms to improve encoding efficiency for SVT-HEVC. What I can suggest is to find a trade-off between encoding speed and output quality for your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants