anthwlock / untrunc

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

Document Mac installation #142

Open ollycostello opened 1 year ago

ollycostello commented 1 year ago

It doesn't seem too well documented how the installation should go for Mac users.

Is it just:

I'm getting the make: *** [.build_shared/src/codec.o] Error 1 error which is reported in https://github.com/anthwlock/untrunc/issues/140 which is blocking me getting any further but because the readme only describes installation for windows or linux I'm not 100% I've done things right.

KenjiTakahashi commented 1 year ago

It is the right way for macOS as well. It used to work, before FFmpeg 6 got released. I suppose you could roll back to older FFmpeg version (for home-brew: remove ffmpeg and install sth like ffmpeg@5 or ffmpeg@4), but not tested.

thpryrchn commented 11 months ago

This works: https://github.com/anthwlock/untrunc/issues/131#issuecomment-1415408517

as stated in there:

git clone https://github.com/anthwlock/untrunc.git
cd untrunc
brew install wget
make FF_VER=3.3.9
sudo cp untrunc /usr/local/bin
medikoo commented 3 months ago

Above method unfortunately fails on Sonoma (14.4.1)

libavcodec/aarch64/h264dsp_init_aarch64.c:84:38: error: incompatible function pointer types assigning to 'h264_weight_func' (aka 'void (*)(unsigned char *, long, int, int, int, int)') from 'void (uint8_t *, int, int, int, int, int)' (aka 'void (unsigned char *, int, int, int, int, int)') [-Wincompatible-function-pointer-types]
        c->weight_h264_pixels_tab[0] = ff_weight_h264_pixels_16_neon;
                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:85:38: error: incompatible function pointer types assigning to 'h264_weight_func' (aka 'void (*)(unsigned char *, long, int, int, int, int)') from 'void (uint8_t *, int, int, int, int, int)' (aka 'void (unsigned char *, int, int, int, int, int)') [-Wincompatible-function-pointer-types]
        c->weight_h264_pixels_tab[1] = ff_weight_h264_pixels_8_neon;
                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:86:38: error: incompatible function pointer types assigning to 'h264_weight_func' (aka 'void (*)(unsigned char *, long, int, int, int, int)') from 'void (uint8_t *, int, int, int, int, int)' (aka 'void (unsigned char *, int, int, int, int, int)') [-Wincompatible-function-pointer-types]
        c->weight_h264_pixels_tab[2] = ff_weight_h264_pixels_4_neon;
                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:88:40: error: incompatible function pointer types assigning to 'h264_biweight_func' (aka 'void (*)(unsigned char *, unsigned char *, long, int, int, int, int, int)') from 'void (uint8_t *, uint8_t *, int, int, int, int, int, int)' (aka 'void (unsigned char *, unsigned char *, int, int, int, int, int, int)') [-Wincompatible-function-pointer-types]
        c->biweight_h264_pixels_tab[0] = ff_biweight_h264_pixels_16_neon;
                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:89:40: error: incompatible function pointer types assigning to 'h264_biweight_func' (aka 'void (*)(unsigned char *, unsigned char *, long, int, int, int, int, int)') from 'void (uint8_t *, uint8_t *, int, int, int, int, int, int)' (aka 'void (unsigned char *, unsigned char *, int, int, int, int, int, int)') [-Wincompatible-function-pointer-types]
        c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels_8_neon;
                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/aarch64/h264dsp_init_aarch64.c:90:40: error: incompatible function pointer types assigning to 'h264_biweight_func' (aka 'void (*)(unsigned char *, unsigned char *, long, int, int, int, int, int)') from 'void (uint8_t *, uint8_t *, int, int, int, int, int, int)' (aka 'void (unsigned char *, unsigned char *, int, int, int, int, int, int)') [-Wincompatible-function-pointer-types]
        c->biweight_h264_pixels_tab[2] = ff_biweight_h264_pixels_4_neon;
                                       ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
make[1]: *** [libavcodec/aarch64/h264dsp_init_aarch64.o] Error 1
make: *** [ffmpeg-3.3.9/libavcodec/libavcodec.a] Error 2
sk9c00 commented 2 months ago

The docker method (basically emulate another linux distro on your mac) works for now at least. I wrote a guide here. Hope this helps.

alvins82 commented 1 month ago

Try this -

make FF_VER=3.3.9 EXTRA_FF_OPTS="--extra-cflags=\"-Wno-error=incompatible-function-pointer-types -Wno-int-conversion\""