FFmpegPath when compiling OBS

danma06

New Member
Has anybody tried to compile OBS with a custom FFMPEG?

What options are needed in FFMPEG for this to work?

When I try to compile OBS with a custom built FFMPEG:

cmake -DUNIX_STRUCTURE=1 -DFFmpegPath=${HOME}/local/ffmpeg -DENABLE_PIPEWIRE=OFF -DCMAKE_INSTALL_PREFIX=${HOME}/local/obs -DBUILD_BROWSER=ON -DCEF_ROOT_DIR="../../cef_binary_4280_linux64" ..

I get all kinds of errors in the make process

obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-output.c:789:17: error: implicit declaration of function ‘rescale_ts’ [-Werror=implicit-function-declaration]
789 | packet.pts = rescale_ts(packet.pts, context,
| ^~~~~~~~~~
obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-output.c: In function ‘receive_audio’:
obs-studio/plugins/obs-ffmpeg/obs-ffmpeg-output.c:914:28: warning: initialization of ‘AVCodecContext *’ {aka ‘struct AVCodecContext *’} from incompatible pointer type ‘int *’ [-Wincompatible-pointer-types]
914 | AVCodecContext *context = data->audio_infos[track_order].ctx;
| ^~~~
cc1: some warnings being treated as errors
make[2]: *** [plugins/obs-ffmpeg/CMakeFiles/obs-ffmpeg.dir/build.make:102: plugins/obs-ffmpeg/CMakeFiles/obs-ffmpeg.dir/obs-ffmpeg-output.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1764: plugins/obs-ffmpeg/CMakeFiles/obs-ffmpeg.dir/all] Error 2
make: *** [Makefile:152: all] Error 2


And OBS fails to compile.

Am I missing something in my compiled FFMPEG?

When I don't include a FFmpegPath to the cmake, obs compiles without incident. But the system FFMPEG does not have SRT support. The custom compiled FFMPEG does.
 

danma06

New Member
Tried this on another box and the compile worked without issue. So I suppose this post can be disregarded.

I'll have to pick a part and see what is different between the two boxes. But definitely an issue on my end and not related to OBS and FFMPEG.
 
Top