Closed alatteri closed 4 years ago
the patch needs to be rebased i think
applying the patch on the ffmpeg
1 out of 4 hunks FAILED -- saving rejects to file configure.rej
You can use the patches from https://gist.github.com/1480c1/ecc1dd3a15093398492c86f2314f4a67
I rebased them and made them atomic so there's no order you need to follow. I am planning to update them whenever the FFmpeg patches get touched
@1480c1 unfortunatly this also doesn't work sufficient.
if i apply only you patch, --enable-libsvthevc
isn't available, and when i add the two other patches as used in the common OVC ffmpeg Dockerfiles, the patch stumbles over already existing content. :(
Did you make sure to apply the svt hevc patch in the gist? There's three total patches in it
i just pipped the the raw data representation by help of curl into | patch -p1
ok... now i got it! :) ... i'll try to compile it again... thanks!
@1480c1
hmm... the second patch unfortunately doesn't work anymore:
Step 27/33 : RUN cd /home/FFmpeg; curl -L https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/e018e943eee6675fe1ddb88eb07059066bff63cd/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch | patch -p1 && curl -L https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/e018e943eee6675fe1ddb88eb07059066bff63cd/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch | patch -p1 && curl -L https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/e018e943eee6675fe1ddb88eb07059066bff63cd/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch | patch -p1
---> Running in 61b8fe558ff8
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 22881 100 22881 0 0 360k 0 --:--:-- --:--:-- --:--:-- 360k
patching file configure
Hunk #2 succeeded at 1756 (offset -5 lines).
Hunk #3 succeeded at 3154 (offset -37 lines).
Hunk #4 succeeded at 6186 (offset -83 lines).
patching file libavcodec/Makefile
Hunk #1 succeeded at 961 (offset -21 lines).
patching file libavcodec/allcodecs.c
Hunk #1 succeeded at 681 with fuzz 2 (offset -14 lines).
patching file libavcodec/libsvt_av1.c
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 17169 100 17169 0 0 284k 0 --:--:-- --:--:-- --:--:-- 289k
patching file configure
Hunk #1 succeeded at 279 (offset -2 lines).
Hunk #2 succeeded at 1803 (offset -6 lines).
Hunk #3 succeeded at 3206 (offset -36 lines).
Hunk #4 succeeded at 6306 (offset -86 lines).
patching file libavcodec/Makefile
Hunk #1 succeeded at 1002 (offset -21 lines).
patching file libavcodec/allcodecs.c
Hunk #1 succeeded at 717 (offset -14 lines).
patching file libavcodec/avcodec.h
Hunk #1 succeeded at 708 with fuzz 2 (offset 176 lines).
patching file libavformat/dashenc.c
Hunk #1 succeeded at 1823 (offset -443 lines).
Hunk #2 succeeded at 1912 (offset -443 lines).
Hunk #3 succeeded at 1989 (offset -456 lines).
patching file libavformat/ivfenc.c
Hunk #2 succeeded at 119 (offset -2 lines).
patching file libavformat/matroskaenc.c
Hunk #1 FAILED at 152.
Hunk #2 FAILED at 2080.
Hunk #3 FAILED at 2258.
Hunk #4 FAILED at 2269.
Hunk #5 succeeded at 2401 with fuzz 2 (offset 117 lines).
Hunk #6 FAILED at 2306.
Hunk #7 FAILED at 2370.
Hunk #8 FAILED at 2394.
Hunk #9 succeeded at 2741 (offset 32 lines).
7 out of 9 hunks FAILED -- saving rejects to file libavformat/matroskaenc.c.rej
patching file libavformat/movenc.c
Hunk #1 FAILED at 5818.
Hunk #2 succeeded at 6758 (offset -218 lines).
1 out of 2 hunks FAILED -- saving rejects to file libavformat/movenc.c.rej
The command '/bin/sh -c cd /home/FFmpeg; curl -L https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/e018e943eee6675fe1ddb88eb07059066bff63cd/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch | patch -p1 && curl -L https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/e018e943eee6675fe1ddb88eb07059066bff63cd/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch | patch -p1 && curl -L https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/e018e943eee6675fe1ddb88eb07059066bff63cd/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch | patch -p1' returned a non-zero code: 1
0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch 0001-Add-ability-for-ffmpeg-to-run-svt-av1-with-svt-hevc.patch 0001-Add-ability-for-ffmpeg-to-run-svt-vp9-with-hevc-av1.patch Please apply these three one by one.
@tianjunwork if you are referring to the three parts in the gist from @1480c1, than i already applied them individually, as you can see in the quote of my last message.
but the order is a different in your suggestion... that's easy to change and try. i just used the actual order in the gist until now...
I will check again if SVT-VP9 master branch patch no longer works again
@mash-graz, can you try
curl -L "https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch" "https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch" "https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch" | git am
On the current FFmpeg master branch, (2b32068916)
ccom1@sv-kuri1:/code/FFmpeg$ curl -L "https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch" "https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch" "https://gist.githubusercontent.com/1480c1/ecc1dd3a15093398492c86f2314f4a67/raw/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch" | git am
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 22881 100 22881 0 0 99051 0 --:--:-- --:--:-- --:--:-- 99051
100 17169 100 17169 0 0 986k 0 --:--:-- --:--:-- --:--:-- 986k
100 24216 100 24216 0 0 1313k 0 --:--:-- --:--:-- --:--:-- 1313k
Applying: Add ability for ffmpeg to run svt-av1
Applying: Add ability for ffmpeg to run svt vp9
Applying: lavc/svt_hevc: add libsvt hevc encoder wrapper
@1480c1 sure! -- and thank's for all your efforts!
btw: thanks to @tianjunwork -- in the meanwhile i tested this alternative order as well, but unfortunatly it doesn't solve the issue... but nevertheless: thanks! :)
Oh wait, before that @mash-graz what branch/tag of FFmpeg are you on?
i can take whatever you like!
but i personally would prefer a more recent git version, because the older official releases (at least till 4.2.2) are plagued by an ugly bug, whenever you use multiple filters in complex -map
contexts, as it is necessary for DASH/HLS creation resp. different image scaling... but that's a minor issue, which i can workaround by other means resp. additional patching as well.
The patches I have in the gist are based on the master branch, the patches in this repo are based on the n4.2.2 tag, if you are going to use the patches here and in the other SVT repos, you will need to use n4.2.2, else you can use the master branch with the patches in the gist
@1480c1 i'll simply try your gist on ffmpeg master... if it works, it would fulfill all my needs...
@1480c1 there are still troubles... :(
at the ffmpeg linker stage i get the error:
gcc: error: libavcodec/libsvt_vp9.o: No such file or directory
ar: libavcodec/libsvt_vp9.o: No such file or directory
and while looking around, i saw, that there is no libsvt_vp9.c
at all in the libavcodec
dir:
root@b6269cd52b68:/home# find . -name libsvt*
./FFmpeg/libavcodec/libsvt_av1.c
./FFmpeg/libavcodec/libsvt_hevc.c
in your patches i also couldn't find any generating diff for this particular source...
did i miss any necessary additional step?
Try again, I regenerated the patch, it seems git missed the file when I rebased
thanks!!! this time it worked! :) i'll try to test it and make a interim image available, if everything works as expected.
if anyone needs access to my debian testing
and ffmpeg git master
branch based docker image, which provides all three SVT ffmpeg plugins, you can pull it from this public docker repository:
registry.gitlab.com/mash-graz/ffmpeg-svt
the used Dockerfile
resp. build environment is also available in the corresponding git repo:
https://gitlab.com/mash-graz/ffmpeg-svt
but i also have to report, that the VP9 plugin seems to work fine under moderate system load, but behaves very unreliable and buggy under high pressure. on my test-setup, where i transcode h.264, h.265, vp9 and av1 in parallel in 6 different image resolutions, the encoding process always freezes after a few seconds, when i utilize the libsvt_vp9 plugin instead of libvpx_vp9. libsvt_av1 in contrast works fine under the same conditions. i'll later report this particular flaw in another issue ticket in more detail.
Thank you @mash-graz for sharing the docker image. Yes, please let us know what issue you encounter with svt-vp9.
Hello,
Building on Ubuntu 19.10. After compiling SVT-HEVC/AV1/VP9. I go to apply all 3 patches per instructions, VP9 fails.