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

Error compiling on Ubuntu 16.04 #19

Open
jedrekdomanski opened this issue Jan 13, 2018 · 5 comments
Open

Error compiling on Ubuntu 16.04 #19

jedrekdomanski opened this issue Jan 13, 2018 · 5 comments

Comments

@jedrekdomanski
Copy link

jedrekdomanski commented Jan 13, 2018

The script fails on Ubuntu 16.04. Output log below.

In file included from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/FDK_audio.h:98:0,
from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/aacdecoder_lib.h:347,
from libavcodec/libfdk-aacdec.c:20:
/home/jedrek/Dokumenty/Nvenc/include/fdk-aac/genericStds.h:402:5: warning: ‘IS_LITTLE_ENDIAN’ defined but not used [-Wunused-function]
int IS_LITTLE_ENDIAN(void) {
^
CC libavcodec/libmp3lame.o
In file included from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/FDK_audio.h:98:0,
from /home/jedrek/Dokumenty/Nvenc/include/fdk-aac/aacenc_lib.h:706,
from libavcodec/libfdk-aacenc.c:20:
/home/jedrek/Dokumenty/Nvenc/include/fdk-aac/genericStds.h:402:5: warning: ‘IS_LITTLE_ENDIAN’ defined but not used [-Wunused-function]
int IS_LITTLE_ENDIAN(void) {
^
CC libavcodec/libopus.o
CC libavcodec/libopusdec.o
CC libavcodec/libopusenc.o
CC libavcodec/libtheoraenc.o
CC libavcodec/libvorbisdec.o
CC libavcodec/libvorbisenc.o
CC libavcodec/libvpx.o
CC libavcodec/libvpxdec.o
CC libavcodec/libvpxenc.o
CC libavcodec/libx264.o
CC libavcodec/ljpegenc.o
libavcodec/libx264.c: In function ‘X264_frame’:
libavcodec/libx264.c:282:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
if (x264_bit_depth > 8)
^
libavcodec/libx264.c:282:9: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libx264.c: In function ‘X264_init_static’:
libavcodec/libx264.c:892:9: error: ‘x264_bit_depth’ undeclared (first use in this function)
if (x264_bit_depth == 8)
^
common.mak:60: polecenia dla obiektu 'libavcodec/libx264.o' failed
make: *** [libavcodec/libx264.o] Exit code 1
make: *** Waiting to terminate the task....

@kingprimex
Copy link

It is a bug in ffmpeg version. It still is in 3.4.

@bnku
Copy link

bnku commented Jan 22, 2018

Use the actual snapshot of ffmpeg from https://ffmpeg.org/releases/ffmpeg-snapshot-git.tar.bz2

@jedrekdomanski
Copy link
Author

@bnku
I've taken a look at the bash script and I see that the script uses version 3.1, here's the code.

ffmpeg_version="3.1"
if [ ! -f  ffmpeg-${ffmpeg_version}.tar.bz2 ]; then
  wget -4 http://ffmpeg.org/releases/ffmpeg-${ffmpeg_version}.tar.bz
fi

So I changed the script to use ffmpeg-snapshot-git.tar.bz2 version - as you suggest - but it errors out during configurations at line 201 --enable-x11grab.

Unknown option "--enable-x11grab".
See ./configure --help for available options.

Correct me if I am wrong.

@bnku
Copy link

bnku commented Jan 22, 2018

use the --enable-libxcb instead

@jedrekdomanski
Copy link
Author

After applying certain modifications to the script, it compiles everything fine. Here is the the modified parts of the script and a screen shot confirming it all works fine.

BuildFFmpeg() {
    echo "Compiling ffmpeg"
    cd $source_dir
    ffmpeg_version="snapshot-git"
    if [ ! -f  ffmpeg-${ffmpeg_version}.tar.bz2 ]; then
        wget -4 http://ffmpeg.org/releases/ffmpeg-${ffmpeg_version}.tar.bz2
    fi
    tar xjf ffmpeg-${ffmpeg_version}.tar.bz2
    cd ffmpeg
    PKG_CONFIG_PATH="${build_dir}/lib/pkgconfig" ./configure \
        --prefix="$build_dir" \
        --extra-cflags="-fPIC -m64 -I${inc_dir}" \
        --extra-ldflags="-L${build_dir}/lib" \
        --bindir="$bin_dir" \
        --enable-gpl \
        --enable-libass \
        --enable-libfdk-aac \
        --enable-libfreetype \
        --enable-libmp3lame \
        --enable-libopus \
        --enable-libtheora \
        --enable-libvorbis \
        --enable-libvpx \
        --enable-libx264 \
        --enable-nonfree \
        --enable-nvenc \
        --enable-pic \
        --enable-libxcb \
        --extra-ldexeflags=-pie \
        --enable-shared
    make -j${cpus}
    make install
}

I also removed my previous installation of OBS and now the new installation has NVENC.H264 encoder.
obs

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

No branches or pull requests

3 participants