Open chundongwang opened 8 years ago
Install libav from source: https://libav.org/. When configuring, add --arch=x86_64 to the ./configure command.
Apply this patch to untrunc, and make. untrunc.txt
I went ahead and installed a few packages using brew: libav 11.4_2 libvpx 1.6.1 ffmpeg 3.2.2
Not sure if I needed all of them or not. I also ran brew doctor to make sure things look good on my system.
I then applied the untrunc.txt patch:
$ patch < untrunc.txt
patching file Makefile
patching file atom.cpp
patching file endian.h
patching file file.cpp
patching file track.cpp
Then I ran make, but I ran into the same error as the original poster of this issue.
$ make
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -I/sw/include -o main.o main.cpp
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -I/sw/include -o atom.o atom.cpp
atom.cpp:17:9: warning: delete called on non-final 'Atom' that has virtual functions but non-virtual destructor
[-Wdelete-non-virtual-dtor]
delete children[i];
^
atom.cpp:46:27: warning: comparison of integers of different signs: 'size_type' (aka 'unsigned long') and 'long long'
[-Wsign-compare]
if(content.size() < length -8)
~~~~~~~~~~~~~~ ^ ~~~~~~~~~
atom.cpp:231:13: warning: delete called on non-final 'Atom' that has virtual functions but non-virtual destructor
[-Wdelete-non-virtual-dtor]
delete child;
^
atom.cpp:257:27: warning: comparison of integers of different signs: 'size_type' (aka 'unsigned long') and 'long long'
[-Wsign-compare]
assert(content.size() >= offset + 4);
~~~~~~~~~~~~~~ ^ ~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/assert.h:93:25: note:
expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
4 warnings generated.
g++ -c -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -I/sw/include -o mp4.o mp4.cpp
mp4.cpp:29:10: fatal error: 'libavcodec/avcodec.h' file not found
#include "libavcodec/avcodec.h"
^
1 error generated.
make: *** [mp4.o] Error 1
@xdgc patch worked for me on Mac OS X 10.10.5.
I had previously installed libav from brew and just cloned the untrunc repo and run the g++ compile command.
Thanks!
I'm using macOS 10.13.1.
The error I encountered is, endian.h
not found. I have to replace:
#include <endian.h>
with:
#include <machine/endian.h>
I can do it after
brew install ffmpeg --with-libvpx
but not just withbrew install libvpx
. Not sure what exactly is blocking.The error message was