Compilation of shared libraries for macOS
Hi, I have a problem with compilation of shared libraries on macOS Catalina to include FFmpeg 4.3.1 dylibs for my app video for a simple video playback: ./configure --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-hardcoded-tables --enable-avcodec --enable-avformat --enable-avresample --enable-postproc I compile successfully all dylibs. But my app crashes when I try to open any video file: * Symbol not found: _av_rescale_q_rnd Referenced from: /Users/USER/*/TestPlayer.app/Contents/Frameworks/LibAV/libavformat.58.dylib Expected in: /usr/local/lib/libavcodec.58.dylib* With another configuration: ./configure --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= My app doesn't crash, but it fails on avformat_open_input() - “EXC_I386_GPFLT” What am I doing wrong? With Zeranoe's dylibs everything works fine. I would be grateful for any advice.
Am So., 2. Aug. 2020 um 19:40 Uhr schrieb Екатерина <beautyofnorth@gmail.com>:
I have a problem with compilation of shared libraries on macOS Catalina to include FFmpeg 4.3.1 dylibs for my app video for a simple video playback:
./configure --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-hardcoded-tables --enable-avcodec --enable-avformat --enable-avresample --enable-postproc
Unrelated to your problem: Most of the options above make little sense, I wonder if you need avresample. And I am curious: Why are you using --enable-hardcoded-tables?
I compile successfully all dylibs. But my app crashes when I try to open any video file:
* Symbol not found: _av_rescale_q_rnd Referenced from: /Users/USER/*/TestPlayer.app/Contents/Frameworks/LibAV/libavformat.58.dylib Expected in: /usr/local/lib/libavcodec.58.dylib*
This symbol is part of libavutil (since 2012), not libavcodec. You could test with ffmpeg (the application) first to see if your libraries work. And please remember that only current FFmpeg git head is supported here (and that we do not like top-posting), Carl Eugen
Hi Carl, Thanks for your reply and I apologize that I probably posted incorrectly my question. Most likely, my problem will occur with the current version of FFmpeg, too. I tried many combinations of configure options. The problem occurs even if I use only 1 option: --enable-shared I'll check the location of _av_rescale_q_rnd symbol for the correct library. I use Freepascal, not C/C++. It complicates this work. I already checked the work of my app with dylibs downloaded from Zeranoe website. Everything works correctly. I even successfully compiled static FFmpeg and ffmpeg and ffplay executables work fine. The problem is only with shared libraries. вс, 2 авг. 2020 г. в 22:14, Carl Eugen Hoyos <ceffmpeg@gmail.com>:
Am So., 2. Aug. 2020 um 19:40 Uhr schrieb Екатерина < beautyofnorth@gmail.com>:
I have a problem with compilation of shared libraries on macOS Catalina to include FFmpeg 4.3.1 dylibs for my app video for a simple video playback:
./configure --prefix=/usr/local/Cellar/ffmpeg/4.3.1 --enable-shared --enable-pthreads --enable-hardcoded-tables --enable-avcodec --enable-avformat --enable-avresample --enable-postproc
Unrelated to your problem: Most of the options above make little sense, I wonder if you need avresample. And I am curious: Why are you using --enable-hardcoded-tables?
I compile successfully all dylibs. But my app crashes when I try to open any video file:
* Symbol not found: _av_rescale_q_rnd Referenced from:
/Users/USER/*/TestPlayer.app/Contents/Frameworks/LibAV/libavformat.58.dylib
Expected in: /usr/local/lib/libavcodec.58.dylib*
This symbol is part of libavutil (since 2012), not libavcodec.
You could test with ffmpeg (the application) first to see if your libraries work.
And please remember that only current FFmpeg git head is supported here (and that we do not like top-posting), Carl Eugen _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
Hi, How do you use a specific library version? Do you have two different versions of the app? Or are you simply switching different dylibs in usr local lib? Regards, Ted Park
Ted, I put dylibs to a local folder in my APP bundle > Frameworks. So I can switch between different versions of FFmpeg dylibs (my compiled dylibs or Zeranoe dylibs). Version of FFmpeg is the same 4.3.1 in both cases. пн, 3 авг. 2020 г. в 00:53, Ted Park <kumowoon1025@gmail.com>:
Hi,
How do you use a specific library version? Do you have two different versions of the app? Or are you simply switching different dylibs in usr local lib?
Regards, Ted Park _______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
On Sun, Aug 2, 2020 at 1:40 PM Екатерина <beautyofnorth@gmail.com> wrote:
Hi,
I have a problem with compilation of shared libraries on macOS Catalina to include FFmpeg 4.3.1 dylibs for my app video for a simple video playback:
I compile successfully all dylibs. But my app crashes when I try to open
any video file:
What am I doing wrong? With Zeranoe's dylibs everything works fine. I would
be grateful for any advice.
Hi, What do you use to write the app? If it’s an actual .app package then I think you can put the one you want in a directory like <Application>.app/Contents/Frameworks and link to the included dylib so it doesn’t depend on the installed version. Regards, Ted Park
Hi Ted, I used Freepascal to write my app. And this app works fine when I use FFmpeg's dylibs downloaded from Zeranoe website. But my app doesn't work with dylibs which I compiled from FFmpeg sources (the same version) in an attempt to reduce a file size of the app. вс, 2 авг. 2020 г. в 22:31, Ted Park <kumowoon1025@gmail.com>:
On Sun, Aug 2, 2020 at 1:40 PM Екатерина <beautyofnorth@gmail.com> wrote:
Hi,
I have a problem with compilation of shared libraries on macOS Catalina to include FFmpeg 4.3.1 dylibs for my app video for a simple video playback:
I compile successfully all dylibs. But my app crashes when I try to open
any video file:
What am I doing wrong? With Zeranoe's dylibs everything works fine. I would
be grateful for any advice.
Hi,
What do you use to write the app? If it’s an actual .app package then I think you can put the one you want in a directory like <Application>.app/Contents/Frameworks and link to the included dylib so it doesn’t depend on the installed version.
Regards, Ted Park
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-user
To unsubscribe, visit link above, or email ffmpeg-user-request@ffmpeg.org with subject "unsubscribe".
participants (4)
-
Aleksid -
Carl Eugen Hoyos -
Ted Park -
Екатерина