jiapei100
New Member
I'm trying to build the most recent obs-studio (say, 27.2.4 ) under Ubuntu 22.04, with ffmpeg 5.0 . But failed with the following ERROR messages:
So, when will obs-studio be compatible with ffmpeg-5.0?
Cheers
Pei
So, when will obs-studio be compatible with ffmpeg-5.0?
Bash:
[ 12%] Building C object libobs/CMakeFiles/libobs.dir/util/base.c.o
cd ....../obs-studio/build/libobs && /usr/bin/cc -DHAVE_OBSCONFIG_H -DLIBOBS_EXPORTS -DUSE_XDG -Dlibobs_EXPORTS -I/usr/include/glib-2.0/gio -I....../obs-studio/deps/libcaption -I....../obs-studio/libobs -I....../obs-studio/build/config -Wall -Wextra -Wvla -Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-braces -Wno-missing-field-initializers -std=gnu99 -fno-strict-aliasing -O3 -DNDEBUG -fPIC -pthread -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -mmmx -msse -msse2 -MD -MT libobs/CMakeFiles/libobs.dir/util/base.c.o -MF CMakeFiles/libobs.dir/util/base.c.o.d -o CMakeFiles/libobs.dir/util/base.c.o -c ....../obs-studio/libobs/util/base.c
....../obs-studio/libobs/media-io/media-remux.c: In function ‘init_output’:
....../obs-studio/libobs/media-io/media-remux.c:91:49: error: ‘AVStream’ has no member named ‘codec’
91 | job->ofmt_ctx, in_stream->codec->codec);
| ^~
....../obs-studio/libobs/media-io/media-remux.c:103:23: error: implicit declaration of function ‘avcodec_copy_context’ [-Werror=implicit-function-declaration]
103 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ^~~~~~~~~~~~~~~~~~~~
....../obs-studio/libobs/media-io/media-remux.c:103:54: error: ‘AVStream’ has no member named ‘codec’
103 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ^~
....../obs-studio/libobs/media-io/media-remux.c:103:72: error: ‘AVStream’ has no member named ‘codec’
103 | ret = avcodec_copy_context(out_stream->codec, in_stream->codec);
| ^~
....../obs-studio/libobs/media-io/media-remux.c:117:27: error: ‘AVStream’ has no member named ‘codec’
117 | out_stream->codec->codec_tag = 0;
| ^~
....../obs-studio/libobs/media-io/media-remux.c:118:51: error: ‘AVStream’ has no member named ‘codec’
118 | out_stream->time_base = out_stream->codec->time_base;
| ^~
....../obs-studio/libobs/media-io/media-remux.c:120:35: error: ‘AVStream’ has no member named ‘codec’
120 | out_stream->codec->flags |= CODEC_FLAG_GLOBAL_H;
| ^~
....../obs-studio/libobs/media-io/media-remux.c:30:29: error: ‘AV_CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ‘CODEC_FLAG_GLOBAL_H’?
30 | #define CODEC_FLAG_GLOBAL_H AV_CODEC_FLAG_GLOBAL_HEADER
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
....../obs-studio/libobs/media-io/media-remux.c:120:53: note: in expansion of macro ‘CODEC_FLAG_GLOBAL_H’
120 | out_stream->codec->flags |= CODEC_FLAG_GLOBAL_H;
| ^~~~~~~~~~~~~~~~~~~
....../obs-studio/libobs/media-io/media-remux.c:30:29: note: each undeclared identifier is reported only once for each function it appears in
30 | #define CODEC_FLAG_GLOBAL_H AV_CODEC_FLAG_GLOBAL_HEADER
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
....../obs-studio/libobs/media-io/media-remux.c:120:53: note: in expansion of macro ‘CODEC_FLAG_GLOBAL_H’
120 | out_stream->codec->flags |= CODEC_FLAG_GLOBAL_H;
| ^~~~~~~~~~~~~~~~~~~
....../obs-studio/libobs/media-io/media-remux.c: In function ‘media_remux_job_create’:
....../obs-studio/libobs/media-io/media-remux.c:163:9: error: implicit declaration of function ‘av_register_all’ [-Werror=implicit-function-declaration]
163 | av_register_all();
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [libobs/CMakeFiles/libobs.dir/build.make:513: libobs/CMakeFiles/libobs.dir/media-io/media-remux.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 12%] Building C object libobs/CMakeFiles/libobs.dir/util/platform.c.o
cd ....../obs-studio/build/libobs && /usr/bin/cc -DHAVE_OBSCONFIG_H -DLIBOBS_EXPORTS -DUSE_XDG -Dlibobs_EXPORTS -I/usr/include/glib-2.0/gio -I....../obs-studio/deps/libcaption -I....../obs-studio/libobs -I....../obs-studio/build/config -Wall -Wextra -Wvla -Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-braces -Wno-missing-field-initializers -std=gnu99 -fno-strict-aliasing -O3 -DNDEBUG -fPIC -pthread -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -mmmx -msse -msse2 -MD -MT libobs/CMakeFiles/libobs.dir/util/platform.c.o -MF CMakeFiles/libobs.dir/util/platform.c.o.d -o CMakeFiles/libobs.dir/util/platform.c.o -c ....../obs-studio/libobs/util/platform.c
[ 13%] Linking C shared library libobsglad.so
cd ....../obs-studio/build/deps/glad && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/glad.dir/link.txt --verbose=1
/usr/bin/cc -fPIC -Wall -Wextra -Wvla -Wno-unused-function -Werror-implicit-function-declaration -Wno-missing-braces -Wno-missing-field-initializers -std=gnu99 -fno-strict-aliasing -O3 -DNDEBUG -shared -Wl,-soname,libobsglad.so.0 -o libobsglad.so.0 CMakeFiles/glad.dir/src/glad.c.o CMakeFiles/glad.dir/src/glad_egl.c.o CMakeFiles/glad.dir/src/glad_glx.c.o /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libEGL.so -ldl
cd ....../obs-studio/build/deps/glad && /usr/local/bin/cmake -E cmake_symlink_library libobsglad.so.0 libobsglad.so.0 libobsglad.so
cd ....../obs-studio/build/deps/glad && /usr/local/bin/cmake -E copy ....../obs-studio/build/deps/glad/libobsglad.so.0 ....../obs-studio/build/rundir/Release/bin/64bit/libobsglad.so.0
make[2]: Leaving directory '....../obs-studio/build'
[ 13%] Built target glad
make[2]: Leaving directory '....../obs-studio/build'
make[1]: *** [CMakeFiles/Makefile2:997: libobs/CMakeFiles/libobs.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '....../obs-studio/build'
[ 13%] Built target obspython_swig_compilation
make[1]: Leaving directory '....../obs-studio/build'
make: *** [Makefile:159: all] Error 2
Cheers
Pei