OpenVisualCloud / SVT-VP9

SVT VP9 encoder. Scalable Video Technology (SVT) is a software-based video coding technology that is highly optimized for Intel® Xeon® processors. Using the open source SVT-VP9 encoder, it is possible to spread video encoding processing across multiple Intel® Xeon® processors to achieve a real advantage of processing efficiency.
Other
222 stars 48 forks source link

Source Height must be even for YUV_420 colorspace #155

Open FiberOnePL opened 2 years ago

FiberOnePL commented 2 years ago

Hi, I have this error:

Error Instance 1: Source Height must be even for YUV_420 colorspace Error instance 1: Source Height must be a multiple of 8

Demo downloaded from google:

Link to the article https://developers.google.com/media/vp9/settings/vod

Link to the source file http://ftp.nluug.nl/pub/graphics/blender/demo/movies/ToS/tearsofsteel_4k.mov

Sample 800 mb

https://drive.google.com/file/d/1XRiBVh32Jz_NlbeLlXAd4qM9WWNj0sVz/view?usp=sharing

My settings:

-vf scale=1920:-1 -c:v libsvt_vp9 -b:v 2000k -maxrate 4000k -bufsize 4000k -rc 1 -tune 1 -g 240 -preset 4

Most movies encode correctly, but that's what I have a problem with.

tianjunwork commented 2 years ago

Hi @Ballevill , could you let me know the output of ffprobe tearsofsteel_4k.mov? The file is 6.3G and prompt security warning when I tried to download. Let me see if I can debug without downloading the file.

FiberOnePL commented 2 years ago

Hi @tianjunwork

I have cut the version to 800mb for you.

https://drive.google.com/file/d/1XRiBVh32Jz_NlbeLlXAd4qM9WWNj0sVz/view?usp=sharing

Metadata: encoder : libebml v1.4.2 + libmatroska v1.6.4 creation_time : 2022-03-13T18:22:05.000000Z Duration: 00:01:49.13, start: 0.000000, bitrate: 61860 kb/s Stream #0:0: Video: h264 (High), yuv420p(progressive), 3840x1714 [SAR 1:1 DAR 1920:857], 24 fps, 24 tbr, 1k tbn (default) Metadata: BPS : 61678929 DURATION : 00:01:49.125000000 NUMBER_OF_FRAMES: 2619 NUMBER_OF_BYTES : 841339153 _STATISTICS_WRITING_APP: mkvmerge v65.0.0 ('Too Much') 64-bit _STATISTICS_WRITING_DATE_UTC: 2022-03-13 18:22:05 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp (default) Metadata: BPS : 183130 DURATION : 00:01:49.134000000 NUMBER_OF_FRAMES: 4700 NUMBER_OF_BYTES : 2498221 _STATISTICS_WRITING_APP: mkvmerge v65.0.0 ('Too Much') 64-bit _STATISTICS_WRITING_DATE_UTC: 2022-03-13 18:22:05 _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES

FiberOnePL commented 2 years ago

Hi @tianjunwork

I have one more problem, if I encode via libvpx-vp9, it plays 4k movies on all devices without any problems, but if I use libsvt_vp9, even the samsung s 22 ultra cuts when playing. What could this be caused by?

tianjunwork commented 2 years ago

Hi @Ballevill , your input is 3840x1714, downscale to 1920x857 with -vf scale=1920:-1. SVT-VP9 doesn't support odd and non-multiple-of-8 width/height.

You mean video playback stutter on samsung s 22 ultra? How about on desktop using VLC?

FiberOnePL commented 2 years ago

Hi @tianjunwork

It is a pity that it does not support, It does not crash on the computer, but using vp9 also does not cut after svt, I build a local vod portal and I can not tell someone to use vlc instead of the browser, maybe you have some hint why this is happening using svt?

It is this in s 21, s21 ultra, s22 ultra :/

tianjunwork commented 2 years ago

Hi, what do you mean cut? the video output is being cut and some portion is lost? Using VLC is to debug the issue, not asking your customer to use it. I would like to know if it is specific to samsung.

FiberOnePL commented 2 years ago

@tianjunwork

Sorry my english is not the best :) no cut just cuts when playing

tianjunwork commented 2 years ago

No worries. It is stuttering, jittering or lagging?

FiberOnePL commented 2 years ago

@tianjunwork

Hi, I made a video for you what it looks like.

https://drive.google.com/file/d/1z_nvVA6IzfuAGS8onwiGwJbqPy5CO7Dm/view?usp=sharing

The problem only occurs when using svt-vp9.

When I encode libsvt_vp9 all is well

FiberOnePL commented 2 years ago

Will the resolution problem be solved?

Because it's a big problem when you want to use svt to convert online videos

tianjunwork commented 2 years ago
  1. Could you upload a short clip encoded with SVT-VP9 which shows stutter during playback?
  2. SVT-VP9 currently supports all the most popular and standard resolutions. The odd and non-multiple-of-8 resolution can be supported. But engineering resources on SVT-VP9 are very limited, you will expect a delay. I suggest normalize the resolutions(crop) before encode following below standard: https://en.wikipedia.org/wiki/Display_resolution#/media/File:Vector_Video_Standards8.svg
FiberOnePL commented 2 years ago

@tianjunwork Hi, I am sending 2 versions, one svt and the other encoded vp9.

hostup.pl/vp9.webm

hostup.pl/svt.webm

Please check on the phone as you can see the svt version is not smooth and the picture is freezing. the normally encoded version does not have this problem.

Yeah I know you are focusing on av1 right now but this fix would have been handy too.

tianjunwork commented 2 years ago

I tried with VLC on desktop and my Galaxy S10e, svt.webm plays smoothly, no stutter at all. I don't have access to other Samsung devices. I also took a look at the timestamps in webm container, they are correct. Frame size looks normal too. Another way to get this working is to contact Samsung and ask them to debug on client side. Next time, if you upload a problematic video clip, better to be the one that you already showed, otherwise, I've no idea where you got stutter. https://drive.google.com/file/d/1z_nvVA6IzfuAGS8onwiGwJbqPy5CO7Dm/view?usp=sharing