anthwlock / untrunc

Restore a truncated mp4/mov. Improved version of ponchio/untrunc
GNU General Public License v2.0
2k stars 191 forks source link

OsX Build Error #18

Closed d1ma5 closed 5 years ago

d1ma5 commented 5 years ago

I have a need to fix a file that is larger than 7GB and use a OsX (10.13.6) as my primary machine these days. I cannot compile this fork of untrunc. I'm fairly new to all this and could use a little help.

Here is what i did:

  1. Downloaded the code and unzipped
  2. Downloaded and placed libav dir in the untrunc-master dir
  3. Compiled the libav binaries using the instructions on ponchio's instructions cd libav-12.3/ ./configure make cd ..
  4. Then running g++ -o untrunc file.cpp main.cpp track.cpp atom.cpp mp4.cpp -I./libav-12.3 -L./libav-12.3/libavformat -lavformat -L./libav-12.3/libavcodec -lavcodec -L./libav-12.3/libavutil -lavutil -lpthread -lz -framework CoreFoundation -framework CoreVideo -framework VideoDecodeAcceleration -lbz2 -DOSX see the attached log for the errors.

Any assistance would be appreciated. log.txt

anthwlock commented 5 years ago

You should follow the updated build instructions! Be sure to have the ffmpeg developer packages installed. If make does not work for you, please try the following commands:

  1. g++ -o untrunc -O3 *.cpp -lavformat -lavcodec -lavutil -std=c++11
  2. g++ -o untrunc -O3 *.cpp -lavformat -lavcodec -lavutil -std=c++11 -D_LARGEFILE64_SOURCE
  3. clang++ -o untrunc -O3 *.cpp -lavformat -lavcodec -lavutil -std=c++11 -Wno-unused-value
  4. clang++ -o untrunc -O3 *.cpp -lavformat -lavcodec -lavutil -std=c++11 -D_LARGEFILE64_SOURCE -Wno-unused-value

If none of the above worked, post the log of the 4th one.