GithubHelp home page GithubHelp logo

openvisualcloud / svt-vp9 Goto Github PK

View Code? Open in Web Editor NEW
217.0 22.0 47.0 1.56 MB

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.

License: Other

Shell 0.14% CMake 0.29% C 96.49% Assembly 2.99% Batchfile 0.07% Meson 0.02%

svt-vp9's Introduction

Scalable Video Technology for VP9 Encoder (SVT-VP9 Encoder)

AppVeyor Build Status Travis Build Status Coverage Status

The Scalable Video Technology for VP9 Encoder (SVT-VP9 Encoder) is a VP9-compliant encoder library core. The SVT-VP9 Encoder development is a work-in-progress targeting performance levels applicable to both VOD and Live encoding/transcoding video applications.

The SVT-VP9 Encoder is being optimized to achieve excellent performance levels currently supporting 10 density-quality presets (please refer to the user guide for more details) on a system with a dual Intel® Xeon® Scalable processor targeting:

  • Real-time encoding of up to two 4Kp60 streams on the Gold 6140 with M8.

SVT-VP9 Encoder also supports 3 modes:

  • A visually optimized mode for visual quality (-tune 0)

  • An PSNR/SSIM optimized mode for PSNR / SSIM benchmarking (-tune 1 (Default setting))

  • An VMAF optimized mode for VMAF benchmarking (-tune 2)

License

SVT-VP9 Encoder is licensed under the OSI-approved BSD+Patent license. See LICENSE for details.

Documentation

More details about the SVT-VP9 Encoder usage can be found under:

System Requirements

Operating System

SVT-VP9 Encoder may run on any Windows* or Linux* 64 bit operating systems. The list below represents the operating systems that the encoder application and library were tested and validated on:

  • Windows* Operating Systems (64-bit):

    • Windows* Server 2016
  • Linux* Operating Systems (64-bit):

    • Ubuntu* 16.04 Server LTS

    • Ubuntu* 18.04 Server LTS

Hardware

The SVT-VP9 Encoder library supports the x86 architecture

  • CPU Requirements

In order to achieve the performance targeted by the SVT-VP9 Encoder, the specific CPU model listed above would need to be used when running the encoder. Otherwise, the encoder runs on any 5th Generation Intel® Core™ processor, (Intel® Xeon® CPUs, E5-v4 or newer).

  • RAM Requirements

In order to run the highest resolution supported by the SVT-VP9 Encoder, at least 10GB of RAM is required to run a 4k 8bit stream multi-threading on an 8180 system. The SVT-VP9 Encoder application will display an error if the system does not have enough RAM to support this. The following table shows the minimum amount of RAM required for some standard resolutions of 8bit video per stream:

Resolution Minimum Footprint (GB)
4k 10
1080p 4
720p 3
480p 2

Build and Install

Windows* Operating Systems (64-bit):

  • Build Requirements
    • Visual Studio* 2017 (download here) or 2019 (download here)
    • CMake 3.14 or later (download here)
    • YASM Assembler version 1.2.0 or later
      • Download the yasm exe from the following link
      • Rename yasm-1.3.0-win64.exe to yasm.exe
      • Copy yasm.exe into a location that is in the PATH environment variable
  • Build Instructions

    • Generate the Visual Studio* 2017 project files by following the steps below cd Build\windows - run generate_vs17.bat [such would generate the visual studio project files]
    • Open the "svt-vp9.sln" using Visual Studio* 2017 and click on Build -- > Build Solution
  • Binaries Location

    • Binaries can be found under \Bin/Release or \Bin/Debug, depending on whether Debug or Release were selected in the build mode
  • Installation

  • For the binaries to operate properly on your system, the following conditions have to be met: - On any of the Windows* Operating Systems listed in the OS requirements section, install Visual Studio* 2017 - Once the installation is complete, copy the binaries to a location making sure that both the sample application "SvtVp9EncApp.exe” and library "SvtVp9Enc.dll” are in the same folder. - Open the command prompt window at the chosen location and run the sample application to encode.

    SvtVp9EncApp.exe -i [in.yuv] -w [width] -h [height] -b [out.ivf]. - Sample application supports reading from pipe. E.g: ffmpeg -i [input.mp4] -nostdin -f rawvideo -pix_fmt yuv420p - | SvtVp9EncApp.exe -i stdin -n [number_of_frames_to_encode] -w [width] -h [height].

Linux* Operating Systems (64-bit):

  • Build Requirements

    • GCC 5.4.0 or later
    • CMake 3.5.1 or later
    • YASM Assembler version 1.2.0 or later
  • Build Instructions

    • ./Build/linux/build.sh <release | debug> (if none specified, both release and debug will be built)
    • To build a static library and binary, append static
    • Additional options can be found by typing ./Build/linux/build.sh --help
  • Sample Binaries location

    • Binaries can be found under Bin/Release and / or Bin/Debug
  • Installation For the binaries to operate properly on your system, the following conditions have to be met:

    • On any of the Linux* Operating Systems listed above, copy the binaries under a location of your choice.
    • Change the permissions on the sample application “SvtVp9EncApp” executable by running the command: >chmod +x SvtVp9EncApp
    • cd into your chosen location
    • Run the sample application to encode. > ./SvtVp9EncApp -i [in.yuv] -w [width] -h [height] -b [out.ivf].
    • Sample application supports reading from pipe. E.g: >ffmpeg -i [input.mp4] -nostdin -f rawvideo -pix_fmt yuv420p - | ./SvtVp9EncApp -i stdin -n [number_of_frames_to_encode] -w [width] -h [height].

How to evaluate by ready-to-run executables with docker

Refer to the guide here.

Demo features and limitations

  • Multi-instance support: The multi-instance functionality is a demo feature implemented in the SVT-VP9 Encoder sample application as an example of one sample application using multiple encoding libraries. Encoding using the multi-instance support is limited to only 6 simultaneous streams. For example two channels encoding on Windows: SvtVp9EncApp.exe -nch 2 -c firstchannel.cfg secondchannel.cfg
  • Features enabled: The library will display an error message any feature combination that is not currently supported.

How to Contribute

We welcome community contributions to the SVT-VP9 Encoder. Thank you for your time! By contributing to the project, you agree to the license and copyright terms in the OSI-approved BSD+Patent license and to the release of your contribution under these terms. See LICENSE for details.

Contribution process

  • Follow the coding guidelines

  • Validate that your changes do not break a build

  • Perform smoke tests and ensure they pass

  • Submit a pull request for review to the maintainer

How to Report Bugs and Provide Feedback

Use the Issues tab on Github. To avoid duplicate issues, please make sure you go through the existing issues before logging a new one.

IRC

#svt on Freenode. Join via Freenode Webchat or use your favorite IRC client.

Notices and Disclaimers

The notices and disclaimers can be found here

svt-vp9's People

Contributors

1480c1 avatar austin-hu avatar dinesh0603 avatar dronimal-ya avatar ewouth avatar geo25rey avatar heijligen avatar intelmark avatar issaelaltero avatar jamrial avatar jsunintel avatar lijing0010 avatar tianjunwork avatar wader avatar xvitaly avatar yakorum avatar zvictoria avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svt-vp9's Issues

Does this work on AWS or GCE?

Does this work on AWS or GCE instances or does it need some sort of lower level access than they provide for the "scalable" part of the Xeons?

Playback errors caused by mp4box streaming.

Sample command line:
@echo off
CD /D "%~dp0"
"E:\GPAC\mp4box.exe" -add "%~dpn1.ivf#trackID=1:fps=23.976:par=1:1:name=" -add "%~dpn1.aac#trackID=1:lang=jpn:name=" -tmp "D:\" -new "%~dpn1.mp4"

It is known that modifying the timestamp in MKVToolNix will cause similar errors.
Cause the player to Caton.

Sample command line:
"C:/Program Files/MKVToolNix\mkvmerge.exe" --ui-language zh_CN --output ^"C:\Users\Administrator\Downloads\VP9.mkv^" --language 0:und --default-duration 0:24000/1001p ^"^(^" ^"C:\Users\Administrator\Downloads\VP9.ivf^" ^"^)^"

@tianjunwork

Dash-player does not play back ffmpeg vs (libsvt_vp9) dash encoder's segment mpd

while I have confirmed that ffmpeg-master: Worked around the "Too many invisible frames" issue for mp4 has been fixed. SVT_VP9 encoder generated mp4 file now can be played back correctly.

ffmpeg dash encoded segment mpd (using svt_vp9) does not play back. I think something in "dashenc.c" needs to be patched much like the patch in "movenc.c".

low latency usage

How do I configure the API for low latency usage?
Ideally, I want the encoder to buffer at most N frames (N<2).
I thought that the pred_structure parameter would let me do that, but verify_settings does this:

    if (config->pred_structure != 2) {
        SVT_LOG("Error instance %u: Pred Structure must be [2]\n", channel_number + 1);
        return_error = EB_ErrorBadParameter;
    }

============================
PS: it would be nice if the encoder limits were part of the header file.
ie:

#define MIN_LUMA_WIDTH 64
#define MIN_LUMA_HEIGHT 64
#define MAX_LUMA_WIDTH 8192
#define MAX_LUMA_HEIGHT 4320

Also, the "enc_mode" and how it relates to the input_resolution could be documented a bit better I think.

Quality comparison

I see there are no claims as to quality per bit here. I understand that quality is a super hard thing to measure and it depends on a ton of factors, however, I'm curious if you could throw out some simple claims.

For example, you could pick some clips from the derf set and say "according to VMAF we are X better than x264 medium mode with Y GOP size and Y bit rates and Z resolutions."

I'm thrilled for the contribution to the community, don't get me wrong, but, that sort of data might help people get over initial skepticism that pervades this industry (and rightly so) when it comes to encoding.

Shared lib executable stack

Compiled shared lib has warning from rpmlint:

The binary declares the stack as executable. Executable stack is usually an
error as it is only needed if the code contains GCC trampolines or similar
constructs which uses code on the stack. One common source for needlessly
executable stack cases are object files built from assembler files which don't
define a proper .note.GNU-stack section.

Solve it please.

Unable to build SVT-VP9 ffmpeg plugin as static library

I've been trying to build SVT-VP9 as static ffmpeg plugin and I haven't been able to do so...
This is CMAKE vars that I used

-- CMAKE_BUILD_TYPE = Release
-- CMAKE_C_COMPILER = /usr/bin/gcc
-- CMAKE_ASM_NASM_COMPILER = /usr/bin/yasm
-- CMAKE_AR = /usr/bin/gcc-ar
-- CMAKE_RANLIB = /usr/bin/gcc-ranlib
-- CMAKE_INSTALL_PREFIX = /home/ariffinsetya/Workspace/ffmpeg-static/target
-- BUILD_SHARED_LIBS = off

and the errors i got is

EbEncHandle.c.o (symbol from plugin): In function lib_svt_encoder_send_error_exit': (.text+0x0): multiple definition of ignore_handler_s'
CMakeFiles/SvtVp9EncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbEncHandle.c.o (symbol from plugin): In function lib_svt_encoder_send_error_exit': (.text+0x0): multiple definition of invoke_safe_str_constraint_handler'
CMakeFiles/SvtVp9EncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbEncHandle.c.o (symbol from plugin): In function lib_svt_encoder_send_error_exit': (.text+0x0): multiple definition of strncpy_ss'
CMakeFiles/SvtVp9EncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbEncHandle.c.o (symbol from plugin): In function lib_svt_encoder_send_error_exit': (.text+0x0): multiple definition of strcpy_ss'
CMakeFiles/SvtVp9EncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbEncHandle.c.o (symbol from plugin): In function lib_svt_encoder_send_error_exit': (.text+0x0): multiple definition of strnlen_ss'
CMakeFiles/SvtVp9EncApp.dir/EbAppFifo.c.o (symbol from plugin):(.text+0x0): first defined here
EbUtility.c.o (symbol from plugin): In function pa_get_block_stats': (.text+0x0): multiple definition of eb_start_time'
CMakeFiles/SvtVp9EncApp.dir/EbTime.c.o (symbol from plugin):(.text+0x0): first defined here
EbUtility.c.o (symbol from plugin): In function pa_get_block_stats': (.text+0x0): multiple definition of eb_finish_time'
CMakeFiles/SvtVp9EncApp.dir/EbTime.c.o (symbol from plugin):(.text+0x0): first defined here
EbUtility.c.o (symbol from plugin): In function pa_get_block_stats': (.text+0x0): multiple definition of eb_compute_overall_elapsed_time'
CMakeFiles/SvtVp9EncApp.dir/EbTime.c.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
Source/App/CMakeFiles/SvtVp9EncApp.dir/build.make:225: recipe for target '../../../Bin/Release/SvtVp9EncApp' failed
make[3]: *** [../../../Bin/Release/SvtVp9EncApp] Error 1
CMakeFiles/Makefile2:475: recipe for target 'Source/App/CMakeFiles/SvtVp9EncApp.dir/all' failed
make[2]: *** [Source/App/CMakeFiles/SvtVp9EncApp.dir/all] Error 2
CMakeFiles/Makefile2:487: recipe for target 'Source/App/CMakeFiles/SvtVp9EncApp.dir/rule' failed
make[1]: *** [Source/App/CMakeFiles/SvtVp9EncApp.dir/rule] Error 2
Makefile:255: recipe for target 'SvtVp9EncApp' failed

Any idea how to do this?
If i build it without the -- BUILD_SHARED_LIBS = off and change it to on it build okay.. but it's just much more convenient to have it static...

960x540 resolution crash

I've been testing encoding at several different resolutions and I found that when trying to run specifically with -w 960 -h 540 it doesn't start encoding and a few seconds later the app crashes.

I haven't found this to happen with any other resolution that I've tried so far.

YV12 chroma channels swapped

I've tried to encode a YV12 export, created with avidemux.
The exported file is a avidemux YV12 raw video file.
Encoding works fine, but the chroma channels appear to be swapped (blue is red, red is blue).

I've attached a single frame from the YV12 (raw) file and the encoded vp9 file.
Also attached is out.txt for the output of:
SvtVp9EncApp -i frame.raw -b frame.vp9 -w 1920 -h 1080 -fps 30 -q 60

The version used is the latest git, 68b81bd

frame.raw.gz
frame.vp9.gz
out.txt

Don't use AVX2 instructions on unsupported cpus

My CPU is Xeon 2665 v1

Program terminated with signal SIGILL, Illegal instruction.
#0  0x00007fcf8c41f6b2 in avc_style_luma_interpolation_filter_horizontal_avx2_intrin ()

$ cpuid | grep -i avx

   AVX/YMM features (0xd/2):
      AVX/YMM save state byte size             = 0x00000100 (256)
      AVX/YMM save state byte offset           = 0x00000240 (576)
      AVX: advanced vector extensions         = true
      AVX2: advanced vector extensions 2       = false
      AVX512F: AVX-512 foundation instructions = false
      AVX512DQ: double & quadword instructions = false
      AVX512IFMA: fused multiply add           = false
      AVX512PF: prefetch instructions          = false
      AVX512ER: exponent & reciprocal instrs   = false
      AVX512CD: conflict detection instrs      = false
      AVX512BW: byte & word instructions       = false
      AVX512VL: vector length                  = false
      AVX512VBMI: vector byte manipulation     = false
      AVX512_4VNNIW: neural network instrs     = false
      AVX512_4FMAPS: multiply acc single prec  = false
         XCR0 supported: AVX state            = true
         XCR0 supported: AVX-512 opmask       = false
         XCR0 supported: AVX-512 ZMM_Hi256    = false
         XCR0 supported: AVX-512 Hi16_ZMM     = false

encode is hung when used with intra-period >150

Hi, I found that svt-vp9 is likely to get stuck used with intra-period >150, please take a look and let me know if I understand it wrong. @tianjunwork

  • FFmpeg cli
    ./ffmpeg -i input -r 30/1 -vsync 2 -copyts -filter_complex "[0]scale=w=1920:h=1080:flags=lanczos[scale_1_out]" -map [scale_1_out]:v? -an -pix_fmt yuv420p -color_primaries bt709 -colorspacebt709 -color_trc iec61966-2-1 -color_range 0 -vcodec libsvt_vp9 -preset 8 -rc 2 -g 250 -vb 4000k output.mp4

  • test seq
    https://share.weiyun.com/fPZbLH6k

  • Other info
    Number of logical cores available: 24
    Number of PPCS 37
    SVT [config]: Profile [0] Level (auto)
    SVT [config]: EncoderMode / Tune : 8 / 0
    SVT [config]: EncoderBitDepth : 8
    SVT [config]: SourceWidth / SourceHeight : 1920 / 1080
    SVT [config]: Fps_Numerator / Fps_Denominator / Gop Size : 30 / 1 / 250
    SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure : 3 / 0 / 2
    SVT [config]: RCMode / TargetBitrate : CBR / 4000000

Question: Dual or single Gold

In the readme I see

"The SVT-VP9 Encoder is being optimized to achieve excellent performance levels currently supporting 10 density-quality presets (please refer to the user guide for more details) on a system with a dual Intel® Xeon® Scalable processor targeting:

Real-time encoding of up to two 4Kp60 streams on the Gold 6140 with M8."

I can't tell from the second part if you mean dual gold 6140 CPUs or just a single one. Can you advise?

ABR without FFMPG

I'm trying to do ABR with MPEGDASH using SVT-VP9 and normally I'd be using FFMPEG with 2-pass but the encoder I'm using is Windows based and the FFMPEG plugin is not done for windows.

Are there particular settings I should use so I can get usable output for use with ABR?

Shared lib call exit

I am try package svt-vp9 for Fedora and it has some warnings.

First of all compiled shared lib call exit. rpmlint message:
This library package calls exit() or _exit(), probably in a non-fork()
context. Doing so from a library is strongly discouraged - when a library
function calls exit(), it prevents the calling program from handling the
error, reporting it to the user, closing files properly, and cleaning up any
state that the program has. It is preferred for the library to return an
actual error code and let the calling program decide how to handle the
situation.

Can you remove call exit?

Build error MacOS 10.15.2

After building SVT-AV1 and SVT-HEVC, now trying to build on MacOS Catalina 10.15.2 but this one fails with the following error:

$ cmake -DCMAKE_INSTALL_PREFIX=/usr/local/bin -DBUILD_SHARED_LIBS=0 ../
-- Found YASM: /usr/local/bin/bin/yasm
-- CMAKE_BUILD_TYPE = Release
-- CMAKE_C_COMPILER = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- CMAKE_ASM_NASM_COMPILER = /usr/local/bin/bin/yasm
-- CMAKE_AR = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
-- CMAKE_RANLIB = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib
-- CMAKE_INSTALL_PREFIX = /usr/local/bin
-- Configuring done
-- Generating done
-- Build files have been written to: svt-vp9/SVT-VP9/Build
$ make
[ 30%] Built target libVPX
[ 39%] Built target VP9_ASM_AVX2
[ 43%] Built target VP9_C_DEFAULT
[ 54%] Built target VP9_ASM_SSE2
[ 58%] Built target VP9_ASM_SSSE3
[ 59%] Built target VP9_ASM_SSE4_1
[ 60%] Building C object Source/Lib/Codec/CMakeFiles/SvtVp9Enc.dir/EbEncHandle.c.o
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:390:39: error: use of undeclared identifier 'eb_vp9_lp_group'; did you mean
'eb_vp9_num_groups'?
memset(eb_vp9_lp_group, 0, sizeof(eb_vp9_lp_group));
^~~~~~~~~~~~~~~
eb_vp9_num_groups
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:77:33: note:
expanded from macro 'memset'
__builtin___memset_chk (dest, VA_ARGS, __darwin_obsz0 (dest))
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:127:34: note: 'eb_vp9_num_groups' declared here
uint8_t eb_vp9_num_groups = 0;
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:390:12: error: use of undeclared identifier 'eb_vp9_lp_group'; did you mean
'eb_vp9_num_groups'?
memset(eb_vp9_lp_group, 0, sizeof(eb_vp9_lp_group));
^~~~~~~~~~~~~~~
eb_vp9_num_groups
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:77:62: note:
expanded from macro 'memset'
__builtin___memset_chk (dest, VA_ARGS, __darwin_obsz0 (dest))
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_common.h:38:55: note:
expanded from macro '__darwin_obsz0'
#define __darwin_obsz0(object) __builtin_object_size (object, 0)
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:127:34: note: 'eb_vp9_num_groups' declared here
uint8_t eb_vp9_num_groups = 0;
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:390:12: error: use of undeclared identifier 'eb_vp9_lp_group'; did you mean
'eb_vp9_num_groups'?
memset(eb_vp9_lp_group, 0, sizeof(eb_vp9_lp_group));
^~~~~~~~~~~~~~~
eb_vp9_num_groups
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/secure/_string.h:77:27: note:
expanded from macro 'memset'
__builtin___memset_chk (dest, VA_ARGS, __darwin_obsz0 (dest))
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:127:34: note: 'eb_vp9_num_groups' declared here
uint8_t eb_vp9_num_groups = 0;
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:412:13: error: use of undeclared identifier 'eb_vp9_lp_group'; did you mean
'eb_vp9_num_groups'?
eb_vp9_lp_group[socket_id].group[eb_vp9_lp_group[socket_id].num++] = processor_id;
^~~~~~~~~~~~~~~
eb_vp9_num_groups
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:127:34: note: 'eb_vp9_num_groups' declared here
uint8_t eb_vp9_num_groups = 0;
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:412:28: error: subscripted value is not an array, pointer, or vector
eb_vp9_lp_group[socket_id].group[eb_vp9_lp_group[socket_id].num++] = processor_id;
~~~~~~~~~~~~~~~^~~~~~~~~~
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:412:46: error: use of undeclared identifier 'eb_vp9_lp_group'
eb_vp9_lp_group[socket_id].group[eb_vp9_lp_group[socket_id].num++] = processor_id;
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:602:14: warning: unused variable 'num_logical_processors' [-Wunused-variable]
uint32_t num_logical_processors = get_num_cores();
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:600:69: warning: unused parameter 'config_ptr' [-Wunused-parameter]
void eb_set_thread_management_parameters( EbSvtVp9EncConfiguration *config_ptr){
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:2981:17: warning: unused parameter 'msg' [-Wunused-parameter]
const char *msg,
^
svt-vp9/SVT-VP9/Source/Lib/Codec/EbEncHandle.c:2983:11: warning: unused parameter 'error' [-Wunused-parameter]
Errno error)
^
4 warnings and 6 errors generated.
make[2]: *** [Source/Lib/Codec/CMakeFiles/SvtVp9Enc.dir/EbEncHandle.c.o] Error 1
make[1]: *** [Source/Lib/Codec/CMakeFiles/SvtVp9Enc.dir/all] Error 2
make: *** [all] Error 2

Don't find anything on the net, so I'm asking here and hoping for some help.

-lp parameter (Logical Processor number) does not work

CommadLine BKC section mentions:
LogicalProcessorNumber (-lp) and TargetSocket (-ss) parameters can be used to management the threads. Or you can use OS commands like below.
But on using -lp parameter,an error is returned mentioning 'Unprocessed token -lp'
Is thread management supported? If yes,can you share a working example to show how it works.

Add support for requesting a keyframe during encoding

Oftentimes, to mitigate transmission loss, a sender, who also encodes video content, has to generate a keyframe (IDR) so that the receiver recovers its decoded video state. There seems to be no way to request an IDR from SVT-VP9 mid-encoding process in its API.

Tag stable release

Many package managers require a Git repository to have at least one tagged release before they integrate it. Could we tag a release?

FPS floating point

I'm trying to encode a 29.97 fps source and have SVT output a 29.97 .ivf using fps-num 30000 and fps-denom 1001. Everything looks correct while it is encoding, but when I then go to convert it to a webm with ffmpeg, I get an Invalid frame rate error, also when I try to use mediainfo with the .ivf file it doesn't allow me to see any of the metadata and only gives an Invalid floating point operation error.

I've tested the same workflow using fps 30 and it outputs fine, I can see the mediainfo on it and it will convert to webm.

I'm sure other people are outputting 29.97 and 23.976 properties so I'm trying to figure out what I'm doing wrong or if there is some other parameter that I am not thinking with that is required.

Command:

SvtVp9EncApp.exe -i %sourcePath% -w 1920 -h 1080 -enc-mode 8 -fps-num 30000 -fps-denom 1001 -rc 1 -tbr 5000000 -intra-period 60 -b %destFile%

Is it just me, or does the ffmpeg build process not work?

I get this when I try to build it according to the directions provided.

./configure --enable-libsvtvp9
ERROR: SvtVp9Enc not found using pkg-config

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.

ffmpeg plugin broken?

SvtVp9EncApp produces great VP9 output from raw yuv quickly, but encoding via the ffmpeg plugin produces corrupted output at the moment. First keyframe is OK but the rest is not playable. Tried a bunch of permutations and seeing the same thing.

Also tested with same result;
FFMPEG 4.1 series (4.1.4)
different linux flavors (debian9, debian10, Intel Clear Linux)
different gcc flavors (gcc8, gcc9)
different output containers (ivf, webm, mp4)

test run output:
ffmpeg -i test.mp4 -c:v libsvt_vp9 -an out.ivf
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9 (Clear Linux OS for Intel Architecture)
...
SVT [version] : SVT-VP9 Encoder Lib v0.1.0
SVT [build] : GCC 9.2.1 64 bit
LIB Build date: Sep 14 2019 02:31:29

Output #0, ivf, to 'out.ivf':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isom
encoder : Lavf58.29.100
Stream #0:0(und): Video: vp9 (libsvt_vp9) (VP90 / 0x30395056), yuv420p, 1280x720, q=10-48, 7000 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default)
Metadata:
creation_time : 2007-04-20T09:58:24.000000Z
handler_name : GPAC ISO Video Handler
encoder : Lavc58.54.100 libsvt_vp9
frame= 85 fps=0.0 q=-0.0 size= 512kB time=00:00:00.83 bitrate=2733.6kbits/frame= 720 fps=210 q=-0.0 Lsize= 10220kB time=00:00:29.73 bitrate=2815.2kbits/s dup=1 drop=0 speed=8.67x

a bug in ffmpeg wrapper(libsvt_vp9.c)

we exit encoding in ffmpeg by testing if flag == EB_BUFFERFLAG_EOS, but some time the last frame's flag is EB_BUFFERFLAG_SHOW_EXT | EB_BUFFERFLAG_EOS in this case ffmpeg will hang in function eb_receive_packet.

VP9 output is invalid

I tried a basic VP9 encode w/ ffmpeg. Here is my command:

ffmpeg -i 30sec.mp4 -c:v libsvt_vp9 -rc 1 -b:v 1M -r 30 -preset 8 -an -y test.webm

WebM output file: https://storage.googleapis.com/jluther/test_8.webm
Also an IVF here: https://storage.googleapis.com/jluther/test.ivf

I tried a number of different input files, got the same results. Output container also doesn't seem to matter, I got the same result with .webm as well as .ivf.

When I play the output in VLC, frames are blocky and playback is choppy, as if it is only decoding interframes.

I tried to get info about the keyframes using ffprobe and got this:

[vp9 @ 0x55aff4dcc880] Invalid compressed header size
    Last message repeated 50 times
[vp9 @ 0x55aff4dcc880] Marker bit was set
    Last message repeated 17 times
[vp9 @ 0x55aff4dcc880] Invalid compressed header size

I had to apply the MAX_CACHE 32 change in #2 to get the encoder to work w/o errors. Otherwise I followed all the build instructions exactly.

I am running a small Google Cloud Linux instance to get an idea of performance on non-scalable Xeons. Here is the cpuinfo:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    2
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 85
Model name:            Intel(R) Xeon(R) CPU @ 2.00GHz
Stepping:              3
CPU MHz:               2000.164
BogoMIPS:              4000.32
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              56320K
NUMA node0 CPU(s):     0,1
Flags:   fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush
 mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology
 nonstop_tsc pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes
 xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb
 stibp kaiser fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f
 avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec
 xgetbv1 xsaves arat arch_capabilities

Thanks in advance for any assistance!

ffmpeg: Can't encode to webm nor mkv

git clone https://github.com/FFmpeg/FFmpeg.git --branch=release/4.2 # or 4.1 too
curl "https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/master/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch" | git apply
mkdir build
cd build
../configure --enable-libvorbis --enable-nonfree --enable-gpl  --enable-libopus --enable-libsvtvp9
make -j 10

and running ffmpeg -y -i input.mkv -c:v libsvt_vp9 output.webm or ffmpeg -y -i input.mkv -c:v libsvt_vp9 output.mkv causes

[AVBSFContext @ 0x55f93bb172c0] Too many invisible frames
[AVBSFContext @ 0x55f93bb172c0] Failed to receive packet from filter vp9_superframe for stream 0

similar to #13

ffmpeg: Video corrupted

Building on SVT-VP9 master (615e4a4) with FFmpeg master (4d980a8ceb) on Ubuntu 19.10

git clone https://github.com/OpenVisualCloud/SVT-VP9.git
cd SVT-VP9/Build/linux
cmake ../.. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF
make -j $(nproc) && sudo make install
cd -
git clone https://github.com/FFmpeg/FFmpeg.git
cd FFmpeg
curl https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/master/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch | git am
mkdir build && cd build
../configure --enable-libsvtvp9 --enable-static --disable-shared && make -j $(nproc)
youtube-dl -f 137 i1IKnWDecwA -o phoenix.mp4 # 1080p24 fps video only, no audio selected
./ffmpeg -i phoenix.mp4 -c:v libsvt_vp9 phoenix.ivf

Original video ~2 seconds in. Played through vlc (Latest 3.0.8 Windows 10)
vlcsnap-2019-11-07-14h59m40s094

Encoded video ~2 seconds in. Played through vlc (Latest 3.0.8 Windows 10)
vlcsnap-2019-11-07-14h54m28s388

CMake Error: Error in cmake code

Hi, in CentOS7:
CMake Error: Error in cmake code at /root/ffmpeg_sources/SVT-VP9/Source/Lib/VPX/CMakeLists.txt:1: Parse error. Expected a command name, got unquoted argument with text "". CMake Error: Error in cmake code at /root/ffmpeg_sources/SVT-VP9/Source/Lib/Codec/CMakeLists.txt:1: Parse error. Expected a command name, got unquoted argument with text "". CMake Error: Error in cmake code at /root/ffmpeg_sources/SVT-VP9/Source/Lib/C_DEFAULT/CMakeLists.txt:1: Parse error. Expected a command name, got unquoted argument with text "". CMake Error: Error in cmake code at /root/ffmpeg_sources/SVT-VP9/Source/Lib/ASM_SSE2/CMakeLists.txt:1: Parse error. Expected a command name, got unquoted argument with text "". CMake Error: Error in cmake code at /root/ffmpeg_sources/SVT-VP9/Source/Lib/ASM_SSSE3/CMakeLists.txt:1: Parse error. Expected a command name, got unquoted argument with text "". CMake Error: Error in cmake code at /root/ffmpeg_sources/SVT-VP9/Source/Lib/ASM_AVX2/CMakeLists.txt:1: Parse error. Expected a command name, got unquoted argument with text "". -- Configuring incomplete, errors occurred! See also "/root/ffmpeg_sources/SVT-VP9/CMakeFiles/CMakeOutput.log". See also "/root/ffmpeg_sources/SVT-VP9/CMakeFiles/CMakeError.log".

Any idea how to solve this?

ffmpeg "Too many invisible frames" issue still exists for mp4

While ffmpeg "Too many invisible frames" issue has been fixed for mkv and webm. But it still exists for mp4.
It can easily reproduced by the following test command in ffmpeg release/4.2.
./ffmpeg -i input.mp4 -vframes 1000 -c:v libsvt_vp9 -y test.mp4

Build failed on fresh debian 9 install

I can't seem to get SVT-VP9 to build on a fresh Debian 9 install. I am using the following instructions:

git clone https://github.com/OpenVisualCloud/SVT-VP9
cd SVT-VP9
cd Build && cmake .. && make -j nproc && sudo make install

And at the make -j part I receive this:

CMakeFiles/Makefile2:310: recipe for target 'Source/Lib/ASM_SSSE3/CMakeFiles/VP9_ASM_SSSE3.dir/all' failed
make[1]: *** [Source/Lib/ASM_SSSE3/CMakeFiles/VP9_ASM_SSSE3.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 59%] Built target VP9_ASM_SSE4_1
[ 59%] Built target VP9_C_DEFAULT
CMakeFiles/Makefile2:255: recipe for target 'Source/Lib/ASM_SSE2/CMakeFiles/VP9_ASM_SSE2.dir/all' failed
make[1]: *** [Source/Lib/ASM_SSE2/CMakeFiles/VP9_ASM_SSE2.dir/all] Error 2
[ 59%] Built target libVPX
[ 59%] Built target VP9_ASM_AVX2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Here is the full output: https://pastebin.com/4C3ei4C7

This is a brand new install of Debian 9, with cmake 3.7.2-1, gcc 6.3.0-18 and yasm 1.3.0-2

I also tried this on Ubuntu 18.04 before and it was the same errors. Maybe I am just doing something wrong? Any hints here? I've tried with root and without also.

ffmpeg_plugin fails to apply against n4.2.3

Regressed by FFmpeg/FFmpeg@477275795865 and FFmpeg/FFmpeg@7f2ab227e038.

$ cd ffmpeg
$ git checkoun n4.2.3

$ patch -CEfsp1 -i ../SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch
2 out of 8 hunks failed while patching libavformat/matroskaenc.c

$ git apply ../SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch
error: patch failed: libavformat/matroskaenc.c:2401
error: libavformat/matroskaenc.c: patch does not apply

[ffmpeg_plugin] Output files have only 1 frame

SvtVp9EncApp appears unaffected but I haven't checked if default encoding settings are the same.

$ curl -O https://media.xiph.org/video/derf/y4m/elephants_dream_720p24.y4m.xz
$ xz -d elephants_dream_720p24.y4m.xz
$ ffmpeg -hide_banner -i elephants_dream_720p24.y4m -c:v libsvt_vp9 -frames:v 125 -y elephants_dream_720p24.ivf
Input #0, yuv4mpegpipe, from 'elephants_dream_720p24.y4m':
  Duration: 00:10:53.79, start: 0.000000, bitrate: 265421 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p(progressive), 1280x720, SAR 1:1 DAR 16:9, 24 fps, 24 tbr, 24 tbn, 24 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> vp9 (libsvt_vp9))
Press [q] to stop, [?] for help
SVT [version]   : SVT-VP9 Encoder Lib v0.1.0
SVT [build]     : GCC 4.2.1      64 bit
LIB Build date: Feb 21 2019 10:02:15
-------------------------------------------

[WARNING] For best speed performance, run with sudo privileges !

Number of logical cores available: 8
Number of PPCS 30
-------------------------------------------
SVT [config]: Profile [0]       Level (auto)
SVT [config]: EncoderMode / Tune                                                : 9 / 0
SVT [config]: EncoderBitDepth                                                   : 8
SVT [config]: SourceWidth / SourceHeight                                        : 1280 / 720
SVT [config]: Fps_Numerator / Fps_Denominator / Gop Size / IntraRefreshType     : 24 / 1 / 12 / 1
SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure          : 3 / 0 / 2
SVT [config]: BRC Mode / QP                                                     : CQP / 32
-------------------------------------------


Output #0, ivf, to 'elephants_dream_720p24.ivf':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: vp9 (libsvt_vp9) (VP90 / 0x30395056), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=10-48, 7000 kb/s, 24 fps, 24 tbn, 24 tbc
    Metadata:
      encoder         : Lavc58.35.100 libsvt_vp9
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
[AVBSFContext @ 0x88aec85c0] Too many invisible framesFailed to send packet to filter vp9_superframe for stream 0
frame=  125 fps= 41 q=-0.0 Lsize=       0kB time=-00:00:00.25 bitrate=N/A speed=N/A
video:899kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

$ ffprobe -hide_banner elephants_dream_720p24.ivf
Input #0, ivf, from 'elephants_dream_720p24.ivf':
  Duration: N/A, start: 0.291667, bitrate: N/A
    Stream #0:0: Video: vp9 (Profile 0) (VP90 / 0x30395056), yuv420p(tv), 1280x720, 24 tbr, 24 tbn, 24 tbc

$ hd elephants_dream_720p24.ivf
00000000  44 4b 49 46 00 00 20 00  56 50 39 30 00 05 d0 02  |DKIF.. .VP90....|
00000010  18 00 00 00 01 00 00 00  ff ff ff ff ff ff ff ff  |................|
00000020  8c 01 00 00 07 00 00 00  00 00 00 00 82 49 83 42  |.............I.B|
00000030  00 4f f0 2c f6 02 00 80  00 01 80 60 00 00 6b 7f  |.O.,.......`..k.|
00000040  7f ff fb f7 1a c2 ff ff  9a 4f ff f9 a4 73 70 c5  |.........O...sp.|
00000050  cd ed e3 48 d9 28 81 2c  85 53 d9 a8 b4 31 9d bc  |...H.(.,.S...1..|
00000060  69 1b 25 10 25 90 aa 7b  35 16 86 33 b7 8d 24 59  |i.%.%..{5..3..$Y|
00000070  ee b2 49 5c e1 95 1b bf  83 fe e7 0a 2a a3 77 f0  |..I\........*.w.|
00000080  7f dc e1 45 54 6e fe 0f  fb 9c 28 aa ac 74 b4 60  |...ETn....(..t.`|
00000090  61 89 d9 9d ae 24 4b e7  0c a8 dd fc 1f f7 38 51  |a....$K.......8Q|
000000a0  55 1b bf 83 fe e7 0a 2a  a3 78 7b 37 ce 19 51 bb  |U......*.x{7..Q.|
000000b0  f8 3f ee 70 a2 aa 37 7f  07 fd ce 14 55 46 ef e0  |.?.p..7.....UF..|
000000c0  ff b9 c2 8a a8 dd fc 22  73 76 54 6e fe 0f fb 9c  |......."svTn....|
000000d0  28 aa 8d df c1 ff 73 85  15 51 bb f8 3f ee 70 a2  |(.....s..Q..?.p.|
000000e0  aa 37 7f 07 fd d9 9b 7b  cf 8d 1e e7 0a 2a a3 77  |.7.....{.....*.w|
000000f0  f0 7f dc e1 45 54 6e fe  0f fb 9c 28 aa 8d df c1  |....ETn....(....|
00000100  ff 73 85 4b 6c b0 77 55  54 c1 3b 33 b5 c4 89 7c  |.s.Kl.wUT.;3...||
00000110  e1 95 1b bf 83 fe e7 0a  2a a3 77 f0 7f dc e1 45  |........*.w....E|
00000120  55 63 a5 a3 03 0c 4e cc  ed 71 22 5f 38 65 46 ef  |Uc....N..q"_8eF.|
00000130  e0 ff b9 c2 8a a8 dd fc  1f f7 38 51 55 1b c3 d9  |..........8QU...|
00000140  be 70 ca 8d df c1 ff 73  85 15 51 bb f8 3f ee 70  |.p.....s..Q..?.p|
00000150  a2 aa 37 7f 07 fd ce 14  55 46 ef e1 13 9b b2 a3  |..7.....UF......|
00000160  77 f0 7f dc e1 45 54 6e  fe 0f fb 9c 28 aa 8d df  |w....ETn....(...|
00000170  c1 ff 73 85 15 51 bb f8  3f ee cc db de 7c 68 f7  |..s..Q..?....|h.|
00000180  38 51 55 1b bf 83 fe e7  0a 2a a3 77 f0 7f dc e1  |8QU......*.w....|
00000190  45 54 6e fe 0f fb 9c 29  b4 8e ea 79 2a 79 cf 8f  |ETn....)...y*y..|
000001a0  a5 bd 6c ba 98 e2 84 3f  a1 57 f3 05 08 d7 a9 e4  |..l....?.W......|
000001b0  a9 e7 3e 3e 96 f5 98 00                           |..>>....|
000001b8

FFMPEG patch fails when combined with AV1 & HEVC

Hello,

Building on Ubuntu 19.10. After compiling SVT-HEVC/AV1/VP9.
I go to apply all 3 patches per instructions, VP9 fails.

administrator@colorstreamS02:~/ffmpeg_sources$ git clone https://github.com/FFmpeg/FFmpeg ffmpeg
Cloning into 'ffmpeg'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 589146 (delta 4), reused 3 (delta 2), pack-reused 589138
Receiving objects: 100% (589146/589146), 229.34 MiB | 26.76 MiB/s, done.
Resolving deltas: 100% (461076/461076), done.
administrator@colorstreamS02:~/ffmpeg_sources$ cd ffmpeg
administrator@colorstreamS02:~/ffmpeg_sources/ffmpeg$ git checkout -b tag4.2.2 n4.2.2
Switched to a new branch 'tag4.2.2'
administrator@colorstreamS02:~/ffmpeg_sources/ffmpeg$ export LD_LIBRARY_PATH+=":/usr/local/lib"
administrator@colorstreamS02:~/ffmpeg_sources/ffmpeg$ export PKG_CONFIG_PATH+=":/usr/local/lib/pkgconfig"
administrator@colorstreamS02:~/ffmpeg_sources/ffmpeg$ git apply ../SVT-HEVC/ffmpeg_plugin/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch
administrator@colorstreamS02:~/ffmpeg_sources/ffmpeg$ git apply ../SVT-AV1/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch
administrator@colorstreamS02:~/ffmpeg_sources/ffmpeg$ git apply ../SVT-VP9/ffmpeg_plugin/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch
error: patch failed: configure:264
error: configure: patch does not apply
error: patch failed: libavcodec/Makefile:991
error: libavcodec/Makefile: patch does not apply
error: patch failed: libavcodec/allcodecs.c:707
error: libavcodec/allcodecs.c: patch does not apply
administrator@colorstreamS02:~/ffmpeg_sources/ffmpeg$ PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
administrator@colorstreamS02:~/ffmpeg_sources/ffmpeg$ ./configure --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-libsvtav1 --enable-libsvtvp9  --enable-libsvthevc
Unknown option "--enable-libsvtvp9".
See ./configure --help for available options.

Defining a "Scalable" processor?

Sorry to ask more questions.

If I understand right, the "scalable processor" performance optimizations exist within Skylake-SP xeon processors and up.

If I am correct in that, I presume that a Xeon W-2195 is NOT an ideal processor for running this software on.

Can you confirm? Thank you again!

Encoding: stack smashing detected

Appears to crash after reaching the end of the input file:

 time ./svt-vp9\ build/SvtVp9EncApp -i "test_seq01.yuv" -w "2048" -h "858" -fps "24" -tune 0 -enc-mode 0 -rc 1 -tbr 4000000 -b output.ivf
-------------------------------------
SVT-VP9 Encoder v0.1.0
SVT [version]	: SVT-VP9 Encoder Lib v0.1.0
SVT [build]	: GCC 8.2.1	 64 bit
LIB Build date: Feb 17 2019 12:29:02
-------------------------------------------

[WARNING] For best speed performance, run with sudo privileges !

Number of logical cores available: 4
Number of PPCS 30
------------------------------------------- 
SVT [config]: Profile [0]	Level (auto)	
SVT [config]: EncoderMode / Tune 						: 0 / 0 
SVT [config]: EncoderBitDepth 							: 8 
SVT [config]: SourceWidth / SourceHeight					: 2048 / 860 
SVT [config]: FrameRate / Gop Size						: 24 / 24 
SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure		: 3 / 0 / 2 
SVT [config]: RCMode / TargetBitrate						: VBR / 4000000 
------------------------------------------- 


Encoding          *** stack smashing detected ***: <unknown> terminated
Aborted (core dumped)

AddressSanitizer: global-buffer-overflow (on any input)

Found on FreeBSD with Clang 8.0. Lines correspond to e92a57c snapshot

$ curl -O https://media.xiph.org/video/derf/y4m/bus_cif.y4m
$ ffmpeg -i bus_cif.y4m -y bus_cif.yuv
$ SvtVp9EncApp -i bus_cif.yuv -w 352 -h 288 -b bus_cif.ivf
-------------------------------------
SVT-VP9 Encoder v0.1.0
SVT [version]   : SVT-VP9 Encoder Lib v0.1.0
SVT [build]     : GCC 4.2.1      64 bit
LIB Build date: Feb 21 2019 09:30:59
-------------------------------------------

[WARNING] For best speed performance, run with sudo privileges !

Number of logical cores available: 8
Number of PPCS 75
-------------------------------------------
SVT [config]: Profile [0]       Level (auto)
SVT [config]: EncoderMode / Tune                                                : 9 / 1
SVT [config]: EncoderBitDepth                                                   : 8
SVT [config]: SourceWidth / SourceHeight                                        : 352 / 288
SVT [config]: FrameRate / Gop Size                                              : 60 / 64
SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure          : 4 / 0 / 2
SVT [config]: BRC Mode / QP                                                     : CQP / 45
-------------------------------------------
=================================================================
==7729==ERROR: AddressSanitizer: global-buffer-overflow on address 0x0008011b682d at pc 0x00080154bb21 bp 0x7fffffff7ef0 sp 0x7fffffff7ee8
READ of size 1 at 0x0008011b682d thread T0
    #0 0x80154bb20 in md_scan_all_blks Source/Lib/Codec/EbUtility.c:513:59
    #1 0x80154bea3 in md_scan_all_blks Source/Lib/Codec/EbUtility.c:524:9
    #2 0x80154bea3 in md_scan_all_blks Source/Lib/Codec/EbUtility.c:524:9
    #3 0x80154bea3 in md_scan_all_blks Source/Lib/Codec/EbUtility.c:524:9
    #4 0x80154d227 in build_ep_block_stats Source/Lib/Codec/EbUtility.c:723:5
    #5 0x80129a838 in eb_init_encoder Source/Lib/Codec/EbEncHandle.c:723:5
    #6 0x1124fa0 in init_encoder Source/App/EbAppContext.c:439:20
    #7 0x1127094 in main Source/App/EbAppMain.c:159:53
    #8 0x106611c in _start /usr/src/lib/csu/amd64/crt1.c:76:7

0x0008011b682d is located 51 bytes to the left of global variable '<string literal>' defined in 'Source/Lib/Codec/EbUtility.c:611:21' (0x8011b6860) of size 4
  '<string literal>' is ascii string '


'
0x0008011b682d is located 0 bytes to the right of global variable 'blocksize_to_txsize' defined in 'Source/Lib/Codec/EbUtility.h:60:23' (0x8011b6820) of size 13
SUMMARY: AddressSanitizer: global-buffer-overflow Source/Lib/Codec/EbUtility.c:513:59 in md_scan_all_blks
Shadow bytes around the buggy address:
  0x400100236cb0: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
  0x400100236cc0: 00 00 00 00 04 f9 f9 f9 f9 f9 f9 f9 00 00 00 00
  0x400100236cd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x400100236ce0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x400100236cf0: 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 00 07 f9 f9
=>0x400100236d00: f9 f9 f9 f9 00[05]f9 f9 f9 f9 f9 f9 04 f9 f9 f9
  0x400100236d10: f9 f9 f9 f9 07 f9 f9 f9 f9 f9 f9 f9 03 f9 f9 f9
  0x400100236d20: f9 f9 f9 f9 05 f9 f9 f9 f9 f9 f9 f9 03 f9 f9 f9
  0x400100236d30: f9 f9 f9 f9 00 00 07 f9 f9 f9 f9 f9 00 00 00 00
  0x400100236d40: 00 00 00 00 00 00 00 00 00 06 f9 f9 f9 f9 f9 f9
  0x400100236d50: 00 00 00 00 00 00 00 00 00 00 07 f9 f9 f9 f9 f9
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==7729==ABORTING

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.