Giter Club home page Giter Club logo

ffmpeg-ios-build-script's Introduction

FFmpeg iOS build script

See the following repository for Swift package, .xcframeworks and more:

https://github.com/kewlbear/FFmpeg-iOS

Build Status

This is a shell script to build FFmpeg libraries for iOS and tvOS apps.

Tested with:

  • FFmpeg 4.3.1
  • Xcode 12.2

Requirements

Usage

Use build-ffmpeg-tvos.sh for tvOS.

  • To build everything:

      ./build-ffmpeg.sh
    
  • To build arm64 libraries:

      ./build-ffmpeg.sh arm64
    
  • To build fat libraries for armv7 and x86_64 (64-bit simulator):

      ./build-ffmpeg.sh armv7 x86_64
    
  • To build fat libraries from separately built thin libraries:

      ./build-ffmpeg.sh lipo
    

Download

You can download a binary for FFmpeg 4.3.1 release at https://downloads.sourceforge.net/project/ffmpeg-ios/ffmpeg-ios-master.tar.bz2

External libraries

You should link your app with

  • libz.dylib
  • libbz2.dylib
  • libiconv.dylib

ffmpeg-ios-build-script's People

Contributors

ened avatar hellllll0world avatar kewlbear avatar lincolnlaw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ffmpeg-ios-build-script's Issues

How to convert .h264 file to .mp4 in iOS programmatically ?

Hi kewlbear,
Thank you very much for entire explanation to set up FFmpeg for iOS. I followed each step and successfully installed everything. I have a problem that i have to convert .h264 file to .mp4. Here is my question I have a .h264 file in my xcode project bundle, i have to convert the file in to .mp4, how to do this programmatically using this FFmpeg in Xcode?
Please give any suggestions or any snippet of code.

Thank you.

Xcode7.1 compile FFmpeg with fdk-aac error

i use the build-fdk-aac.sh(ARCHS="armv7 x86_64 i386")/build-ffmpeg.sh(ARCHS="x86_64 i386 armv7") compile success,but i copy the fdk-aac-ios to subdir of FFmpeg-iOS-build-script-master,it occurs error:
clang: warning: -framework ApplicationServices: 'linker' input unused
/var/folders/c5/pfgchldj5cg2xsldxgwr69940000gn/T/ffconf.xKkLU2f6.c:1:10: fatal error: 'ApplicationServices/ApplicationServices.h' file not found

include <ApplicationServices/ApplicationServices.h>

     ^

1 error generated.
check_pkg_config fdk-aac fdk-aac/aacenc_lib.h aacEncOpen
pkg-config --exists --print-errors fdk-aac
Package fdk-aac was not found in the pkg-config search path.
Perhaps you should add the directory containing `fdk-aac.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fdk-aac' found
clang: warning: argument unused during compilation: '-pthread'
ld: warning: object file (/Users/apple/Desktop/GitHub/BKFFmpeg/FFmpeg-iOS-build-script-master/fdk-aac/lib/libfdk-aac.a(aacenc_lib.o)) was built for newer iOS version (9.1) than being linked (6.0)
ld: '/Users/apple/Desktop/GitHub/BKFFmpeg/FFmpeg-iOS-build-script-master/fdk-aac/lib/libfdk-aac.a(aacenc_lib.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ERROR: libfdk_aac not found

xcrun -sdk iphoneos clang is unable to create an executable file.

xcrun -sdk iphoneos clang is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

what is up ?

what is up ?

/Users/lz/desktop/ff_07/0708/FFmpeg-iOS-build-script/ffmpeg-2.2.4/libavcodec/aarch64/h264dsp_neon.S:30:50: error: unknown token in expression
@.type _ff_h264_v_loop_filter_luma_neon, %function
^
/Users/lz/desktop/ff_07/0708/FFmpeg-iOS-build-script/ffmpeg-2.2.4/libavcodec/aarch64/h264dsp_neon.S:30:50: error: invalid operand
@.type _ff_h264_v_loop_filter_luma_neon, %function

ffmpeg build fail

I put the script file and ffmpeg source in the same folder, after run it , there is a warning .
osx version is 10.9.5 xcode version is 6.1.1
here is the output:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/c++/4.2.1
install prefix /Users/apple/thin/arm64
source path /Users/apple/ffmpeg-2.5.3
C compiler xcrun -sdk iphoneos clang
C library
host C compiler gcc
host C library
ARCH aarch64 (generic)
big-endian no
runtime cpu detection yes
NEON enabled yes
VFP enabled yes
debug symbols no
strip symbols yes
optimize for size no
optimizations yes
static yes
shared no
postprocessing support no
new filter support yes
network support yes
threading support pthreads
safe bitstream reader yes
SDL support no
opencl enabled no
texi2html enabled no
perl enabled yes
pod2man enabled yes
makeinfo enabled yes
makeinfo supports HTML no

External libraries:
bzlib iconv zlib

Enabled decoders:
aac bfi gsm
aac_latm bink gsm_ms
aasc binkaudio_dct h261
ac3 binkaudio_rdft h263
ac3_fixed bintext h263i
adpcm_4xm bmp h263p
adpcm_adx bmv_audio h264
adpcm_afc bmv_video hevc
adpcm_ct brender_pix hnm4_video
adpcm_dtk c93 huffyuv
adpcm_ea cavs iac
adpcm_ea_maxis_xa cdgraphics idcin
adpcm_ea_r1 cdxl idf
adpcm_ea_r2 cinepak iff_byterun1
adpcm_ea_r3 cljr iff_ilbm
adpcm_ea_xas cllc imc
adpcm_g722 comfortnoise indeo2
adpcm_g726 cook indeo3
adpcm_g726le cpia indeo4
adpcm_ima_amv cscd indeo5
adpcm_ima_apc cyuv interplay_dpcm
adpcm_ima_dk3 dca interplay_video
adpcm_ima_dk4 dfa jacosub
adpcm_ima_ea_eacs dirac jpeg2000
adpcm_ima_ea_sead dnxhd jpegls
adpcm_ima_iss dpx jv
adpcm_ima_oki dsd_lsbf kgv1
adpcm_ima_qt dsd_lsbf_planar kmvc
adpcm_ima_rad dsd_msbf lagarith
adpcm_ima_smjpeg dsd_msbf_planar loco
adpcm_ima_wav dsicinaudio mace3
adpcm_ima_ws dsicinvideo mace6
adpcm_ms dvbsub mdec
adpcm_sbpro_2 dvdsub metasound
adpcm_sbpro_3 dvvideo microdvd
adpcm_sbpro_4 dxa mimic
adpcm_swf dxtory mjpeg
adpcm_thp eac3 mjpegb
adpcm_vima eacmv mlp
adpcm_xa eamad mmvideo
adpcm_yamaha eatgq motionpixels
aic eatgv movtext
alac eatqi mp1
alias_pix eightbps mp1float
als eightsvx_exp mp2
amrnb eightsvx_fib mp2float
amrwb escape124 mp3
amv escape130 mp3adu
anm evrc mp3adufloat
ansi exr mp3float
ape ffv1 mp3on4
apng ffvhuff mp3on4float
ass ffwavesynth mpc7
asv1 fic mpc8
asv2 flac mpeg1video
atrac1 flashsv mpeg2video
atrac3 flashsv2 mpeg4
atrac3p flic mpegvideo
aura flv mpl2
aura2 fourxm msa1
avrn fraps msmpeg4v1
avrp frwu msmpeg4v2
avs g2m msmpeg4v3
avui g723_1 msrle
ayuv g729 mss1
bethsoftvid gif mss2
msvideo1 qpeg txd
mszh qtrle ulti
mts2 r10k utvideo
mvc1 r210 v210
mvc2 ra_144 v210x
mxpeg ra_288 v308
nellymoser ralf v408
nuv rawvideo v410
on2avc realtext vb
opus rl2 vble
paf_audio roq vc1
paf_video roq_dpcm vc1image
pam rpza vcr1
pbm rv10 vima
pcm_alaw rv20 vmdaudio
pcm_bluray rv30 vmdvideo
pcm_dvd rv40 vmnc
pcm_f32be s302m vorbis
pcm_f32le sami vp3
pcm_f64be sanm vp5
pcm_f64le sgi vp6
pcm_lxf sgirle vp6a
pcm_mulaw shorten vp6f
pcm_s16be sipr vp7
pcm_s16be_planar smackaud vp8
pcm_s16le smacker vp9
pcm_s16le_planar smc vplayer
pcm_s24be smvjpeg vqa
pcm_s24daud snow wavpack
pcm_s24le sol_dpcm webp
pcm_s24le_planar sonic webvtt
pcm_s32be sp5x wmalossless
pcm_s32le srt wmapro
pcm_s32le_planar ssa wmav1
pcm_s8 stl wmav2
pcm_s8_planar subrip wmavoice
pcm_u16be subviewer wmv1
pcm_u16le subviewer1 wmv2
pcm_u24be sunrast wmv3
pcm_u24le svq1 wmv3image
pcm_u32be svq3 wnv1
pcm_u32le tak ws_snd1
pcm_u8 targa xan_dpcm
pcm_zork targa_y216 xan_wc3
pcx text xan_wc4
pgm theora xbin
pgmyuv thp xbm
pgssub tiertexseqvideo xface
pictor tiff xl
pjs tmv xsub
png truehd xwd
ppm truemotion1 y41p
prores truemotion2 yop
prores_lgpl truespeech yuv4
ptx tscc zero12v
qcelp tscc2 zerocodec
qdm2 tta zlib
qdraw twinvq zmbv

Enabled encoders:
a64multi jpegls prores
a64multi5 ljpeg prores_aw
aac mjpeg prores_ks
ac3 movtext qtrle
ac3_fixed mp2 r10k
adpcm_adx mp2fixed r210
adpcm_g722 mpeg1video ra_144
adpcm_g726 mpeg2video rawvideo
adpcm_ima_qt mpeg4 roq
adpcm_ima_wav msmpeg4v2 roq_dpcm
adpcm_ms msmpeg4v3 rv10
adpcm_swf msvideo1 rv20
adpcm_yamaha nellymoser s302m
alac pam sgi
alias_pix pbm snow
amv pcm_alaw sonic
ass pcm_f32be sonic_ls
asv1 pcm_f32le srt
asv2 pcm_f64be ssa
avrp pcm_f64le subrip
avui pcm_mulaw sunrast
ayuv pcm_s16be svq1
bmp pcm_s16be_planar targa
cinepak pcm_s16le tiff
cljr pcm_s16le_planar tta
comfortnoise pcm_s24be utvideo
dca pcm_s24daud v210
dnxhd pcm_s24le v308
dpx pcm_s24le_planar v408
dvbsub pcm_s32be v410
dvdsub pcm_s32le vorbis
dvvideo pcm_s32le_planar wavpack
eac3 pcm_s8 webvtt
ffv1 pcm_s8_planar wmav1
ffvhuff pcm_u16be wmav2
flac pcm_u16le wmv1
flashsv pcm_u24be wmv2
flashsv2 pcm_u24le xbm
flv pcm_u32be xface
g723_1 pcm_u32le xsub
gif pcm_u8 xwd
h261 pcx y41p
h263 pgm yuv4
h263p pgmyuv zlib
huffyuv png zmbv
jpeg2000 ppm
Enabled hwaccels:

Enabled parsers:
aac dvd_nav mpegvideo
aac_latm dvdsub opus
ac3 flac png
adx gsm pnm
bmp h261 rv30
cavsvideo h263 rv40
cook h264 tak
dca hevc vc1
dirac mjpeg vorbis
dnxhd mlp vp3
dpx mpeg4video vp8
dvbsub mpegaudio vp9
Enabled demuxers:
aac h261 mxg
ac3 h263 nc
act h264 nistsphere
adf hevc nsv
adp hls nut
adx hnm nuv
aea ico ogg
afc idcin oma
aiff idf paf
amr iff pcm_alaw
anm ilbc pcm_f32be
apc image2 pcm_f32le
ape image2_alias_pix pcm_f64be
apng image2_brender_pix pcm_f64le
aqtitle image2pipe pcm_mulaw
asf image_bmp_pipe pcm_s16be
ass image_dpx_pipe pcm_s16le
ast image_exr_pipe pcm_s24be
au image_j2k_pipe pcm_s24le
avi image_jpeg_pipe pcm_s32be
avr image_jpegls_pipe pcm_s32le
avs image_pictor_pipe pcm_s8
bethsoftvid image_png_pipe pcm_u16be
bfi image_sgi_pipe pcm_u16le
bink image_sunrast_pipe pcm_u24be
bintext image_tiff_pipe pcm_u24le
bit image_webp_pipe pcm_u32be
bmv ingenient pcm_u32le
boa ipmovie pcm_u8
brstm ircam pjs
c93 iss pmp
caf iv8 pva
cavsvideo ivf pvf
cdg jacosub qcp
cdxl jv r3d
cine latm rawvideo
concat live_flv realtext
data lmlm4 redspark
daud loas rl2
dfa lrc rm
dirac lvf roq
dnxhd lxf rpl
dsf m4v rsd
dsicin matroska rso
dts mgsts rtp
dtshd microdvd rtsp
dv mjpeg sami
dxa mlp sap
ea mlv sbg
ea_cdata mm sdp
eac3 mmf sdr2
epaf mov segafilm
ffm mp3 shorten
ffmetadata mpc siff
filmstrip mpc8 sln
flac mpegps smacker
flic mpegts smjpeg
flv mpegtsraw smush
fourxm mpegvideo sol
frm mpl2 sox
g722 mpsub spdif
g723_1 msnwc_tcp srt
g729 mtv stl
gif mv str
gsm mvi subviewer
gxf mxf subviewer1
sup vc1t wsaud
swf vivo wsvqa
tak vmd wtv
tedcaptions vobsub wv
thp voc xa
tiertexseq vplayer xbin
tmv vqf xmv
truehd w64 xwma
tta wav yop
tty wc3 yuv4mpegpipe
txd webm_dash_manifest
vc1 webvtt

Enabled muxers:
a64 image2pipe pcm_s24be
ac3 ipod pcm_s24le
adts ircam pcm_s32be
adx ismv pcm_s32le
aiff ivf pcm_s8
amr jacosub pcm_u16be
asf latm pcm_u16le
asf_stream lrc pcm_u24be
ass m4v pcm_u24le
ast matroska pcm_u32be
au matroska_audio pcm_u32le
avi md5 pcm_u8
avm2 microdvd psp
bit mjpeg rawvideo
caf mkvtimestamp_v2 rm
cavsvideo mlp roq
crc mmf rso
dash mov rtp
data mp2 rtsp
daud mp3 sap
dirac mp4 segment
dnxhd mpeg1system smjpeg
dts mpeg1vcd smoothstreaming
dv mpeg1video sox
eac3 mpeg2dvd spdif
f4v mpeg2svcd spx
ffm mpeg2video srt
ffmetadata mpeg2vob stream_segment
filmstrip mpegts swf
flac mpjpeg tee
flv mxf tg2
framecrc mxf_d10 tgp
framemd5 null truehd
g722 nut uncodedframecrc
g723_1 oga vc1
gif ogg vc1t
gxf oma voc
h261 opus w64
h263 pcm_alaw wav
h264 pcm_f32be webm
hds pcm_f32le webm_dash_manifest
hevc pcm_f64be webp
hls pcm_f64le webvtt
ico pcm_mulaw wtv
ilbc pcm_s16be wv
image2 pcm_s16le yuv4mpegpipe

Enabled protocols:
cache http rtp
concat httpproxy srtp
crypto icecast subfile
data md5 tcp
ffrtmphttp mmsh udp
file mmst udplite
ftp pipe unix
gopher rtmp
hls rtmpt

Enabled filters:
adelay crop overlay
aecho curves pad
aeval dctdnoiz pan
aevalsrc decimate perms
afade dejudder pixdesctest
aformat deshake psnr
ainterleave drawbox removelogo
allpass drawgrid replaygain
alphaextract earwax rgbtestsrc
alphamerge edgedetect rotate
amerge elbg scale
amix equalizer select
amovie extractplanes sendcmd
anull fade separatefields
anullsink field setdar
anullsrc fieldmatch setfield
apad fieldorder setpts
aperms flanger setsar
aphaser format settb
aresample fps showcqt
aselect framepack showinfo
asendcmd framestep showspectrum
asetnsamples gradfun showwaves
asetpts haldclut shuffleplanes
asetrate haldclutsrc signalstats
asettb hflip silencedetect
ashowinfo highpass silenceremove
asplit histogram sine
astats hqx smptebars
astreamsync hue smptehdbars
atempo idet split
atrim il swapuv
avectorscope interleave telecine
bandpass join testsrc
bandreject lenscorrection thumbnail
bass life tile
bbox lowpass transpose
biquad lut treble
blackdetect lut3d trim
blend lutrgb unsharp
cellauto lutyuv vflip
channelmap mandelbrot vignette
channelsplit mergeplanes volume
codecview movie volumedetect
color negate w3fdif
colorbalance noformat xbr
colorchannelmixer noise yadif
compand null zoompan
concat nullsink
copy nullsrc

Enabled bsfs:
aac_adtstoasc imx_dump_header mp3_header_decompress
chomp mjpeg2jpeg noise
dump_extradata mjpega_dump_header remove_extradata
h264_mp4toannexb mov2textsub text2movsub

Enabled indevs:
avfoundation lavfi

Enabled outdevs:

License: LGPL version 2.1 or later
Creating config.mak, config.h, and doc/config.texi...
config.h is unchanged
libavutil/avconfig.h is unchanged

WARNING: pkg-config not found, library detection may fail.
/Users/apple/ffmpeg-2.5.3/Makefile:185: /Users/apple/ffmpeg-2.5.3/tests/Makefile: No such file or directory
make: *** No rule to make target `/Users/apple/ffmpeg-2.5.3/tests/Makefile'. Stop.

Error compiling for arm64

I'm getting the following error using build-ffmpeg script. I'm building for arm64

FFmpeg source not found. Trying to download...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 8372k  100 8372k    0     0  1333k      0  0:00:06  0:00:06 --:--:-- 1638k
building arm64...
xcrun -sdk iphoneos clang is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

Errors: Undefined symbols for architecture arm64

Hi!

Thanks for providing ffmpeg script, its really helpful! I am seeing following errors when trying to run on arm64 devices:

Undefined symbols for architecture arm64:
"_CVPixelBufferGetDataSize", referenced from:
      _avf_read_packet in libavdevice.a(avfoundation.o)
  "_CVPixelBufferLockBaseAddress", referenced from:
      _avf_read_packet in libavdevice.a(avfoundation.o)
  "_CVPixelBufferGetBaseAddress", referenced from:
      _avf_read_packet in libavdevice.a(avfoundation.o)
  "_CVImageBufferGetEncodedSize", referenced from:
      _avf_read_header in libavdevice.a(avfoundation.o)
  "_kCVPixelBufferPixelFormatTypeKey", referenced from:
      _avf_read_header in libavdevice.a(avfoundation.o)
  "_copy_ts", referenced from:
      _process_input in ffmpeg.o
      _do_video_out in ffmpeg.o
  "_dts_error_threshold", referenced from:
      _process_input in ffmpeg.o
      _do_video_out in ffmpeg.o
  "_audio_sync_method", referenced from:
      _write_frame in ffmpeg.o
      _do_audio_out in ffmpeg.o
  "_debug_ts", referenced from:
      _write_frame in ffmpeg.o
      _decode_video in ffmpeg.o
      _process_input in ffmpeg.o
      _reap_filters in ffmpeg.o
      _do_video_out in ffmpeg.o
      _do_audio_out in ffmpeg.o
  "_frame_drop_threshold", referenced from:
      _do_video_out in ffmpeg.o
  "_vstats_filename", referenced from:
      _flush_encoders in ffmpeg.o
      _do_video_stats in ffmpeg.o
      _do_video_out in ffmpeg.o
  "_print_stats", referenced from:
      _print_report in ffmpeg.o
  "_qp_hist", referenced from:
      _check_keyboard_interaction in ffmpeg.o
      _print_report in ffmpeg.o
  "_exit_on_error", referenced from:
      _write_frame in ffmpeg.o
      _do_subtitle_out in ffmpeg.o
      _process_input in ffmpeg.o
  "_do_hex_dump", referenced from:
      _check_keyboard_interaction in ffmpeg.o
      _process_input in ffmpeg.o
  "_do_pkt_dump", referenced from:
      _check_keyboard_interaction in ffmpeg.o
      _process_input in ffmpeg.o
  "_copy_tb", referenced from:
      _transcode_init in ffmpeg.o
  "_audio_volume", referenced from:
      _transcode_init in ffmpeg.o
  "_reset_options", referenced from:
      _doTranscode in ffmpeg.o
  "_ist_in_filtergraph", referenced from:
      _decode_audio in ffmpeg.o
      _decode_video in ffmpeg.o
  "_init_simple_filtergraph", referenced from:
      _transcode_init in ffmpeg.o
  "_configure_filtergraph", referenced from:
      _transcode_init in ffmpeg.o
      _decode_audio in ffmpeg.o
      _decode_video in ffmpeg.o
  "_stdin_interaction", referenced from:
      _transcode in ffmpeg.o
  "_sdp_filename", referenced from:
      _transcode_init in ffmpeg.o
      _print_sdp in ffmpeg.o
  "_do_benchmark_all", referenced from:
      _update_benchmark in ffmpeg.o
  "_hwaccels", referenced from:
      _get_hwaccel in ffmpeg.o
  "_dts_delta_threshold", referenced from:
      _process_input in ffmpeg.o
  "_video_sync_method", referenced from:
      _transcode_init in ffmpeg.o
      _write_frame in ffmpeg.o
      _do_video_out in ffmpeg.o
  "_show_usage", referenced from:
      _doTranscode in ffmpeg.o
  "_CVPixelBufferUnlockBaseAddress", referenced from:
      _avf_read_packet in libavdevice.a(avfoundation.o)
  "_frame_bits_per_raw_sample", referenced from:
      _transcode_init in ffmpeg.o
  "_options", referenced from:
      _doTranscode in ffmpeg.o
     (maybe you meant: _ff_rtsp_options, _ff_mpv_generic_options , _ff_img_options , _ff_rawvideo_options , _av_set_options_string , _show_help_options , _parse_options )
  "_ffmpeg_parse_options", referenced from:
      _doTranscode in ffmpeg.o
  "_do_benchmark", referenced from:
      _doTranscode in ffmpeg.o

I have also added the required frameworks, but still same error! can you please suggest what could have went wrong?

Thanks.

Bad_access with latest static libraries version ffmpeg 2.8.2 avcodec.a

I have an app, In which I am decoding video frames coming from ip camera, but the method avcodec_decode_video2(m_pCodecCtx, m_pFrame, &consumed_bytes, &avpkt); present in avcodec.h/ avcodec.a generating bad_access.

It was working fine with older version of static libraries but when i updated it to give my app support for arm64, its crashing with bad_access.

here crash log
kisafa 22-11-2015, 12-19 PM.txt

here is snapshot:
vidin

This is SO link to the issue.
http://stackoverflow.com/questions/33941165/error-while-decoding-camera-stream-video-frame-using-ffmpeg-ios

Link error when integrated in iOS projects

Xcode builld log:
Undefined symbols for architecture i386:
"_iconv", referenced from:
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_close", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_open", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

it doesn't create lib folder

Sorry but i always get that error : build-ffmpeg.sh: line 92: cd: /Users/MyMac/build/built/armv7/lib: No such file or directory

adding build for armv7s

If I also want to have the library for armv7s, is that I just need to edit ARCHS="arm64 armv7 x86_64 i386" to be ARCHS="arm64 armv7 armv7s x86_64 i386" in file build-ffmpeg.sh.

building with libmp3lame

This might sound like a newbie question, but I am trying to compile ffmpeg with mp3 support. From what I have searched, I have to use libmp3lame.

  • So I downloaded lame-3.99.5.tar, extracted it, ran ./configure, make, make install.
  • I then editted the build-ffmpeg.sh, adding "--enable-libmp3lame" to the configure flags.
  • running "./build-ffmpeg.sh" gives me an error libmp3lame >= 3.98.3 not found.

I clearly am missing a step. Am I suppose to copy files over to somewhere specific for it to look for? I would really appreciate some help.

illegal text-relocoation (direct reference) to (global,weak)

When linking an app with the results of this build script for the simulator, it fails with the following error:

ld: illegal text-relocoation (direct reference) to (global,weak) _ff_h264_cabac_tables in ...(cabac.o) from _ff_h264_decode_mb_cabac in ...(h264_cabac.o) for architecture i386

compile with x264

When uncomment the #X264=pwd/fat-x264 I get: ERROR: libx264 not found
I did put the libx264.a under the fat-x264

any idea?

libavformat unable to open mp4 or mov

If I link against libraries compiled with this script I get a "moov atom not found" error thrown whenever I try to call avformat_open_input on a mov or mp4 file generated by an iphone. When I simply link against dylibs homebrew generates for ffmpeg, it works just fine. Any ideas?

Header file not found

After i build it,and finally it shows "Done",so i think it built successfully.
Then i import it to a new xcode project and build.
it reports libavutil/samplefmt.h not found,not only this one,all the "liba**/**.h"format #include have same error.

xcrun -sdk iphoneos clang is unable to create an executable file.

Dear,

When executing the script I receive the following output :

sh build-ffmpeg.sh 
    building arm64...
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    xcrun -sdk iphoneos clang is unable to create an executable file.
    C compiler test failed.

The script is a fresh checkout, I'm trying ffmpeg version 2.7.2 & I've set the deployment target in the script to 7.0.

I've never done something like this before, so if you require additional logs/information I'll be happy too, if you point me to where I should get them from as well :)

Thanks in advance.

iOS build for ffmpeg 2.8.1

Hi

I found that the build does not have any of the muxers for example mpegts in the build. Is this by accident or by design. I tried building it using your shell script by adding configuration option --enable_muxers but no change. How do I get muxers into the build?

build x264 fail !

i download x264 source and rename to x264 in the directory .

run the command as : ./build-x264.sh
but fail

building arm64...
No working C compiler found.
make: *** No rule to make target install'. Stop. building armv7s... Unknown option --cpu=swift, ignored No working C compiler found. make: *** No rule to make targetinstall'. Stop.
building x86_64...
No working C compiler found.
make: *** No rule to make target install'. Stop. building i386... No working C compiler found. make: *** No rule to make targetinstall'. Stop.
building armv7...
No working C compiler found.
make: *** No rule to make target `install'. Stop.
building fat binaries...

missing libpostproc.a

I am trying to build iFrameExtractor and it instructs the user to first build ffmpeg and use the resultant libraries in its project. I used your build script and although it built most of the libraries, it is missing libpostproc.a. How do I go about building that?

https://github.com/PinkyJie/iFrameExtractor

./build-ffmpeg.sh arm64

Undefined symbols for architecture arm64:
"OBJC_CLASS$_AVCaptureVideoDataOutput", referenced from:
objc-class-ref in libavdevice.a(avfoundation.o)
"OBJC_CLASS$_AVCaptureAudioDataOutput", referenced from:
objc-class-ref in libavdevice.a(avfoundation.o)
"OBJC_CLASS$_AVCaptureDeviceInput", referenced from:
objc-class-ref in libavdevice.a(avfoundation.o)
"OBJC_CLASS$_AVCaptureSession", referenced from:
objc-class-ref in libavdevice.a(avfoundation.o)
"OBJC_CLASS$_AVCaptureDevice", referenced from:
objc-class-ref in libavdevice.a(avfoundation.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

fat-x264,not fat_x264

when run build-x264.the lib dir is "fat-x264"
but in build-ffmpeg.sh,you wrote "fat_x264". must be a minor mistake.

No accelerated colorspace conversion found from yuv420p to rgb24

I was looking around to find the reason for the warning while running with the compiled FFmpeg:
"No accelerated colorspace conversion found from yuv420p to rgb24"
and found it's related to the reason of not usging the GPU.

did the following with no difference:

  1. compiled the FFmpeg with x264
  2. added to the configure flags: --enable-neon

this warning become when calling:
sws_getContext with PIX_FMT_RGB24 where the source is YUV420P

libz.dylib required

I need to include libz.dylib in order to get my project succesfully compiled.

need neon support

if i removed the "--disable-asm" option, it shows "make: extras/gas-preprocessor.pl: No such file or directory" , please support neon。thx

cant compile .S file like fft_neon and mlpdsp_armv5te

i can compile i386, but when build arm64,armv7.i have such errors
libavcodec/aarch64/fft_neon.S:380:21: error: invalid immediate expression
add x4, x4, _ff_cos_32
libavcodec/arm/mlpdsp_armv5te.S:7513:9: error: unknown directive
.hword (70f - 0b) / 2, (71f - 0b) / 2, (72f - 0b) / 2, (73f - 0b) / 2, (74f - 0b) / 2

i have installed yasm in /usr/local/bin/yasm
downloaded latest gas-preprocessor.pl
ffmpegc2.3.1 xcode5.1.1
what is wrong ? plz help me.

libavutil.a(dict.o)' does not contain bitcode

'libavutil.a(dict.o)' does not contain bitcode.
You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
When I use a binary for FFmpeg 2.7.2

Mac OS 10.10 error

Got this trying to build ffmpeg on 10.10:

apple$ ./build-ffmpeg.sh armv7 x86_64
...

/Users/apple/Downloads/FFmpeg-iOS-build-script-master/ffmpeg-2.2.4/libavcodec/arm/vc1dsp_neon.S:2789:10: error: unexpected token in argument list
  rc .dn d30.i8
         ^
/Users/apple/Downloads/FFmpeg-iOS-build-script-master/ffmpeg-2.2.4/libavcodec/arm/vc1dsp_neon.S:2790:10: error: unexpected token in argument list
  rd .dn d31.i8
         ^
/Users/apple/Downloads/FFmpeg-iOS-build-script-master/ffmpeg-2.2.4/libavcodec/arm/vc1dsp_neon.S:2793:14: error: invalid operand for instruction
        vmov ra, #3 
             ^
/Users/apple/Downloads/FFmpeg-iOS-build-script-master/ffmpeg-2.2.4/libavcodec/arm/vc1dsp_neon.S:2794:14: error: invalid operand for instruction
        vmov rb, #18 
             ^
/Users/apple/Downloads/FFmpeg-iOS-build-script-master/ffmpeg-2.2.4/libavcodec/arm/vc1dsp_neon.S:2795:14: error: invalid operand for instruction
        vmov rc, #53 
             ^
/Users/apple/Downloads/FFmpeg-iOS-build-script-master/ffmpeg-2.2.4/libavcodec/arm/vc1dsp_neon.S:2796:14: error: invalid operand for instruction
        vmov rd, #4 
             ^
CC  libavcodec/arm/vp8dsp_init_armv6.o
make: *** [libavcodec/arm/vc1dsp_neon.o] Error 1
make: *** Waiting for unfinished jobs....

apple$ which gas-preprocessor.pl
/usr/bin/gas-preprocessor.pl

How can i compile ffmpeg with x264?

hi, thanks for your script, it's great helpful. Now i want to compile ffmpeg with x264 for iOS, what command should I write to use this script? Actually I want to use the 'preset' argument of ffmpeg but there is a hint "no such argument". I google that it needs the x264. So I want to compile the ffmpeg with x264. Thank you very much.

Apple Mach-O Linker Error

Hi kewlbear,
Could you help me to resolve my problem?

If i only build ffmpeg without x264lib, it work well.
But when i try to clone libx264 to local, build x264 by your "build-x264.sh". After that run "build-ffmpeg.sh". It's successful.

But when i import to Xcode project. That IDE give me error

Undefined symbols for architecture i386:
"_x264_bit_depth", referenced from:
_X264_init_static in libavcodec.a(libx264.o)
_X264_frame in libavcodec.a(libx264.o)
"_x264_encoder_close", referenced from:
_X264_close in libavcodec.a(libx264.o)
"_x264_encoder_delayed_frames", referenced from:
_X264_frame in libavcodec.a(libx264.o)
"_x264_encoder_encode", referenced from:
_X264_frame in libavcodec.a(libx264.o)
"_x264_encoder_headers", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_encoder_open_142", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_encoder_reconfig", referenced from:
_X264_frame in libavcodec.a(libx264.o)
"_x264_param_apply_fastfirstpass", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_param_apply_profile", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_param_default", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_param_default_preset", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_param_parse", referenced from:
_X264_init in libavcodec.a(libx264.o)
"_x264_picture_init", referenced from:
_X264_frame in libavcodec.a(libx264.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've tryed on real device, but still have same error.

Please help me.

Thanks and sorry for my bad english.

Error compiling for arm64

I'm getting the following error while compiling for arm64 using Xcode 7 in Yosemite 10.10.3

AS  libavcodec/aarch64/h264cmc_neon.o
<stdin>:190:21: error: invalid operand for instruction
        tbl v4.16b, {v4.16b}, v30.16b
                    ^
<stdin>:191:21: error: invalid operand for instruction
        tbl v5.16b, {v5.16b,v6.16b}, v31.16b
                    ^
<stdin>:215:21: error: invalid operand for instruction
        tbl v4.16b, {v4.16b}, v30.16b
                    ^
<stdin>:216:21: error: invalid operand for instruction
        tbl v5.16b, {v5.16b,v6.16b}, v31.16b
                    ^
<stdin>:293:21: error: invalid operand for instruction
        tbl v4.16b, {v4.16b}, v30.16b
                    ^
<stdin>:294:21: error: invalid operand for instruction
        tbl v5.16b, {v5.16b,v6.16b}, v31.16b
                    ^
<stdin>:332:21: error: invalid operand for instruction
        tbl v4.16b, {v4.16b}, v30.16b
                    ^
<stdin>:333:21: error: invalid operand for instruction
        tbl v5.16b, {v5.16b,v6.16b}, v31.16b
                    ^
CC  libavcodec/aarch64/h264dsp_init_aarch64.o
make: *** [libavcodec/aarch64/fft_neon.o] Error 1
make: *** Waiting for unfinished jobs....

Any idea about?

building armv7. fail

building arm64... It succeed.
building armv7...
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
GNU assembler not found, install/update gas-preprocessor

If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.

Static libraries giving architecture error

I am able to compile ffmpeg library but when integrate static library of ffmpeg its still giving undefined symbol error for various architecture.
I have tried with http://sourceforge.net/projects/ffmpeg-ios/postdownload?source=dlp too but this is giving same error
Undefined symbols for architecture armv7:
"_BZ2_bzDecompressInit", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_iconv", referenced from:
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_BZ2_bzDecompress", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_BZ2_bzDecompressEnd", referenced from:
_matroska_decode_buffer in libavformat.a(matroskadec.o)
"_iconv_open", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
"_iconv_close", referenced from:
_avcodec_open2 in libavcodec.a(utils.o)
_avcodec_decode_subtitle2 in libavcodec.a(utils.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

error

i got that error i down't know why ??

/Users/Munira/FFmpeg-iOS-build-script-master/ffmpeg-2.2.2/libavcodec/aarch64/h264cmc_neon.S:1450:9: error: unrecognized instruction mnemonic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.