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

build fails on osx. #16

Open
robclemamzn opened this issue Oct 13, 2022 · 2 comments
Open

build fails on osx. #16

robclemamzn opened this issue Oct 13, 2022 · 2 comments

Comments

@robclemamzn
Copy link

cd src ; make ../caption-inspector
clang -c -Wpedantic -Wno-deprecated-declarations -I ../include source/mcc_file.c -o ../obj/mcc_file.o
In file included from source/mcc_file.c:29:
In file included from ../include/captions_file.h:23:
In file included from ../include/pipeline_utils.h:23:
../include/context.h:117:5: error: unknown type name 'AVCodecContext'
AVCodecContext* decoderContext;

any ideas??

@robdt
Copy link
Member

robdt commented Nov 8, 2022

Did you get FFMPEG installed? There is also a flag to compile without it. I think AVCodecContext is FFMPEG.

@bbgdzxng1
Copy link

bbgdzxng1 commented Dec 6, 2022

@robclemamzn, note that @robdt has updated the build instructions on the README , and if you follow the new instructions carefully, it will install the FFmpeg 4.0.2 headers, even on Apple Silicon.

Having trusted the new instructions, I now have Caption Inspector back and running - even on M1. Thanks for the update @robdt.

brew install nasm yasm
cd $HOME
curl -s http://ffmpeg.org/releases/ffmpeg-4.0.2.tar.gz | tar zxvf - -C . 
cd ffmpeg-4.0.2/
./configure  --enable-version3 --enable-hardcoded-tables --enable-shared --enable-static --enable-small --enable-libass --enable-postproc --enable-avresample --enable-libfreetype --disable-lzma --enable-opencl --enable-pthreads
make
make install                                         # note may require sudo depending on your system permissions
make distclean
cd $HOME
git clone https://github.com/Comcast/caption-inspector.git
cd caption-inspector
make caption-inspector

Then, copy the $HOME/caption-inspector/caption-inspector executable to somewhere appropriate, for example somewhere like /opt/caption-inspector/bin/ or /usr/local/bin/.

Tested on both M1 and x86 running Monterey - and the FFmpeg 4.0.2 does not fight with my brew installed FFmpeg 5.x. Good times.

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