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

Builds fails using ffmpeg n5.0 or greater #603

Closed
echoxxzz opened this issue Jan 17, 2022 · 13 comments · Fixed by #679
Closed

Builds fails using ffmpeg n5.0 or greater #603

echoxxzz opened this issue Jan 17, 2022 · 13 comments · Fixed by #679

Comments

@echoxxzz
Copy link

echoxxzz commented Jan 17, 2022

If I call the build script with -ffmpeg-git-checkout-version=n5.0 or any greater ffmpeg version the build fails with the following error:

Unknown option: "--enable-libsvthevc".

According to the output from ./configure --help it doesn't even show this as a valid option in 5.0 or greater of ffmpeg.

@MI2-2
Copy link

MI2-2 commented Jan 17, 2022

Unknown option "--enable-libsvthevc" with building ffmpeg
#564

Edit the script line 2333 like this
if [[ $ffmpeg_git_checkout_version == *"n5.0"* ]] || [[ $ffmpeg_git_checkout_version == *"master"* ]]; then

@echoxxzz
Copy link
Author

echoxxzz commented Jan 17, 2022

It also fails using n5.1-dev so you probably need some kind of check to catch any version greater than 5.0. Also if you set the ffmpeg_git_checkout_version using a git hash it always fails.

@rdp
Copy link
Owner

rdp commented Feb 23, 2022 via email

@MI2-2
Copy link

MI2-2 commented Apr 10, 2022

Not yet...

I cannot build master and n5.0.1 in my environment.
WSL Ubuntu on Win11

@rdp
Copy link
Owner

rdp commented Apr 11, 2022 via email

@naabtog
Copy link
Contributor

naabtog commented Apr 12, 2022

n5.0.1 successfully builds on Ubuntu, so I suppose this issue is WSL-related.

@MI2-2
Copy link

MI2-2 commented Apr 12, 2022

My environment is as follows.
Ubuntu 20. WSL on Win11

When command option below.
./cross_compile_ffmpeg.sh --ffmpeg-git-checkout-version=n5.0.1 --disable-nonfree=n --build-intel-qsv=y --build-ffmpeg-static=y --compiler-flavors=win64

Error message:
When ./configure of ffmpeg

Unknown option "--enable-libsvthevc".

When command option below.
./cross_compile_ffmpeg.sh --disable-nonfree=n --build-intel-qsv=y --build-ffmpeg-static=y --compiler-flavors=win64

. /configure passes.
Error message:

libavcodec/libsvt_hevc.c:571:23: note: (near initialization for 'ff_libsvt_hevc_encoder.cb.decode')
CC      libavcodec/libvorbisdec.o
CC      libavcodec/libvorbisenc.o
make: *** [ffbuild/common.mak:78: libavcodec/libsvt_hevc.o] Error 1
make: *** Waiting for unfinished jobs....

Can someone please tell me how to solve this problem?

@jam365
Copy link

jam365 commented Apr 12, 2022

My environment is as follows. Ubuntu 20. WSL on Win11

When command option below. ./cross_compile_ffmpeg.sh --ffmpeg-git-checkout-version=n5.0.1 --disable-nonfree=n --build-intel-qsv=y --build-ffmpeg-static=y --compiler-flavors=win64

Error message: When ./configure of ffmpeg

Unknown option "--enable-libsvthevc".

When command option below. ./cross_compile_ffmpeg.sh --disable-nonfree=n --build-intel-qsv=y --build-ffmpeg-static=y --compiler-flavors=win64

. /configure passes. Error message:

libavcodec/libsvt_hevc.c:571:23: note: (near initialization for 'ff_libsvt_hevc_encoder.cb.decode')
CC      libavcodec/libvorbisdec.o
CC      libavcodec/libvorbisenc.o
make: *** [ffbuild/common.mak:78: libavcodec/libsvt_hevc.o] Error 1
make: *** Waiting for unfinished jobs....

Can someone please tell me how to solve this problem?

I was having the same issue and manage to solve it by disabling SVT-HEVC, I don't have a need for that in my build.

If that is your case too, you can build it by commenting out lines 2352 and 2378, like:

: # git apply "$work_dir/SVT-HEVC_git/ffmpeg_plugin/master-0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch"
# config_options+=" --enable-libsvthevc"

Seems like the patch for SVT-HEVC is not applying correctly,

@rdp
Copy link
Owner

rdp commented Apr 19, 2022 via email

@MI2-2
Copy link

MI2-2 commented Apr 19, 2022

I have successfully built n5.0.1!!
Thanks alot!!

@cmoore1776
Copy link
Contributor

Made it opt-in now, give it a shot :)

@rdp am I understanding the fix correctly that the workaround for this is to not build svt at all by passing --build-svt=n?

If so, I would like to be able to selectively exclude only libsvthevc and still enable libsvtav1 and libvpx.

I can file a PR to add this, but I wanted to make sure I understand what the change was that made the svthevc optional

@rdp
Copy link
Owner

rdp commented Dec 2, 2022 via email

@rgomezc
Copy link

rgomezc commented Jan 18, 2023

I don't think libvpx is included by default right now. In the script it is inside the section that only gets called if you enabled SVT. Right now it is around line 2385.

I had to move it outside that if (to line 2386) for it to be included on the ffmpeg build.

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

Successfully merging a pull request may close this issue.

7 participants