Recherche avancée

Médias (1)

Mot : - Tags -/iphone

Autres articles (40)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

  • Participer à sa documentation

    10 avril 2011

    La documentation est un des travaux les plus importants et les plus contraignants lors de la réalisation d’un outil technique.
    Tout apport extérieur à ce sujet est primordial : la critique de l’existant ; la participation à la rédaction d’articles orientés : utilisateur (administrateur de MediaSPIP ou simplement producteur de contenu) ; développeur ; la création de screencasts d’explication ; la traduction de la documentation dans une nouvelle langue ;
    Pour ce faire, vous pouvez vous inscrire sur (...)

  • Encodage et transformation en formats lisibles sur Internet

    10 avril 2011

    MediaSPIP transforme et ré-encode les documents mis en ligne afin de les rendre lisibles sur Internet et automatiquement utilisables sans intervention du créateur de contenu.
    Les vidéos sont automatiquement encodées dans les formats supportés par HTML5 : MP4, Ogv et WebM. La version "MP4" est également utilisée pour le lecteur flash de secours nécessaire aux anciens navigateurs.
    Les documents audios sont également ré-encodés dans les deux formats utilisables par HTML5 :MP3 et Ogg. La version "MP3" (...)

Sur d’autres sites (6357)

  • iOS Build PJSIP with FFmpeg+libx264

    22 février 2021, par Meonardo

    I have built the FFmpeg with libx264 into static libs, here is my directory tree.

    


    ./ffmpeg
├── include
│   ├── libavcodec
│   │   ├── ac3_parser.h
│   │   ├── adts_parser.h
│   │   ├── avcodec.h
│   │   ├── avdct.h
│   │   ├── avfft.h
│   │   ├── bsf.h
│   │   ├── codec.h
│   │   ├── codec_desc.h
│   │   ├── codec_id.h
│   │   ├── codec_par.h
│   │   ├── d3d11va.h
│   │   ├── dirac.h
│   │   ├── dv_profile.h
│   │   ├── dxva2.h
│   │   ├── jni.h
│   │   ├── mediacodec.h
│   │   ├── packet.h
│   │   ├── qsv.h
│   │   ├── vaapi.h
│   │   ├── vdpau.h
│   │   ├── version.h
│   │   ├── videotoolbox.h
│   │   ├── vorbis_parser.h
│   │   └── xvmc.h
│   ├── libavdevice
│   │   ├── avdevice.h
│   │   └── version.h
│   ├── libavfilter
│   │   ├── avfilter.h
│   │   ├── buffersink.h
│   │   ├── buffersrc.h
│   │   └── version.h
│   ├── libavformat
│   │   ├── avformat.h
│   │   ├── avio.h
│   │   └── version.h
│   ├── libavutil
│   │   ├── adler32.h
│   │   ├── aes.h
│   │   ├── aes_ctr.h
│   │   ├── attributes.h
│   │   ├── audio_fifo.h
│   │   ├── avassert.h
│   │   ├── avconfig.h
│   │   ├── avstring.h
│   │   ├── avutil.h
│   │   ├── base64.h
│   │   ├── blowfish.h
│   │   ├── bprint.h
│   │   ├── bswap.h
│   │   ├── buffer.h
│   │   ├── camellia.h
│   │   ├── cast5.h
│   │   ├── channel_layout.h
│   │   ├── common.h
│   │   ├── cpu.h
│   │   ├── crc.h
│   │   ├── des.h
│   │   ├── dict.h
│   │   ├── display.h
│   │   ├── dovi_meta.h
│   │   ├── downmix_info.h
│   │   ├── encryption_info.h
│   │   ├── error.h
│   │   ├── eval.h
│   │   ├── ffversion.h
│   │   ├── fifo.h
│   │   ├── file.h
│   │   ├── frame.h
│   │   ├── hash.h
│   │   ├── hdr_dynamic_metadata.h
│   │   ├── hmac.h
│   │   ├── hwcontext.h
│   │   ├── hwcontext_cuda.h
│   │   ├── hwcontext_d3d11va.h
│   │   ├── hwcontext_drm.h
│   │   ├── hwcontext_dxva2.h
│   │   ├── hwcontext_mediacodec.h
│   │   ├── hwcontext_opencl.h
│   │   ├── hwcontext_qsv.h
│   │   ├── hwcontext_vaapi.h
│   │   ├── hwcontext_vdpau.h
│   │   ├── hwcontext_videotoolbox.h
│   │   ├── hwcontext_vulkan.h
│   │   ├── imgutils.h
│   │   ├── intfloat.h
│   │   ├── intreadwrite.h
│   │   ├── lfg.h
│   │   ├── log.h
│   │   ├── lzo.h
│   │   ├── macros.h
│   │   ├── mastering_display_metadata.h
│   │   ├── mathematics.h
│   │   ├── md5.h
│   │   ├── mem.h
│   │   ├── motion_vector.h
│   │   ├── murmur3.h
│   │   ├── opt.h
│   │   ├── parseutils.h
│   │   ├── pixdesc.h
│   │   ├── pixelutils.h
│   │   ├── pixfmt.h
│   │   ├── random_seed.h
│   │   ├── rational.h
│   │   ├── rc4.h
│   │   ├── replaygain.h
│   │   ├── ripemd.h
│   │   ├── samplefmt.h
│   │   ├── sha.h
│   │   ├── sha512.h
│   │   ├── spherical.h
│   │   ├── stereo3d.h
│   │   ├── tea.h
│   │   ├── threadmessage.h
│   │   ├── time.h
│   │   ├── timecode.h
│   │   ├── timestamp.h
│   │   ├── tree.h
│   │   ├── twofish.h
│   │   ├── tx.h
│   │   ├── version.h
│   │   ├── video_enc_params.h
│   │   └── xtea.h
│   ├── libpostproc
│   │   ├── postprocess.h
│   │   └── version.h
│   ├── libswresample
│   │   ├── swresample.h
│   │   └── version.h
│   ├── libswscale
│   │   ├── swscale.h
│   │   └── version.h
│   └── libx264
│       ├── x264.h
│       └── x264_config.h
└── lib
    ├── libavcodec.a
    ├── libavdevice.a
    ├── libavfilter.a
    ├── libavformat.a
    ├── libavutil.a
    ├── libpostproc.a
    ├── libswresample.a
    ├── libswscale.a
    └── libx264.a


    


    The final lib was created successfully, no error message in log file,
but when I import the lib to my Xcode Project,
the linker give me tons of errors(missing symbols like : Undefined symbol: _pjsua_vid_codec_set_priority).
I found the pjsua_vid.o is very small(200Bytes) compare to my pjsip+openh264 build file(was 47KB), perhaps this is the reason cause the link error.

    


    Here is my build log :
log_file

    


    the build script I am using :

    


    #!/bin/sh&#xA;&#xA;# see http://stackoverflow.com/a/3915420/318790&#xA;function realpath { echo $(cd $(dirname "$1"); pwd)/$(basename "$1"); }&#xA;__FILE__=`realpath "$0"`&#xA;__DIR__=`dirname "${__FILE__}"`&#xA;&#xA;# download&#xA;function download() {&#xA;    "${__DIR__}/download.sh" "$1" "$2" #--no-cache&#xA;}&#xA;&#xA;BASE_DIR="$1"&#xA;PJSIP_URL="https://github.com/pjsip/pjproject/archive/2.10.zip"&#xA;#http://www.pjsip.org/release/2.8.0/pjproject-2.8.0.tar.bz2&#xA;PJSIP_DIR="$1/src"&#xA;LIB_PATHS=("pjlib/lib" \&#xA;           "pjlib-util/lib" \&#xA;           "pjmedia/lib" \&#xA;           "pjnath/lib" \&#xA;           "pjsip/lib" \&#xA;           "third_party/lib")&#xA;&#xA;OPENSSL_PREFIX=&#xA;FFMPEG_PREFIX=&#xA;OPENH264_PREFIX=&#xA;OPUS_PREFIX=&#xA;while [ "$#" -gt 0 ]; do&#xA;    case $1 in&#xA;        --with-openssl)&#xA;            if [ "$#" -gt 1 ]; then&#xA;                OPENSSL_PREFIX=$(python -c "import os,sys; print os.path.realpath(sys.argv[1])" "$2")&#xA;                shift 2&#xA;                continue&#xA;            else&#xA;                echo &#x27;ERROR: Must specify a non-empty "--with-openssl PREFIX" argument.&#x27; >&amp;2&#xA;                exit 1&#xA;            fi&#xA;            ;;&#xA;        --with-openh264)&#xA;            if [ "$#" -gt 1 ]; then&#xA;                OPENH264_PREFIX=$(python -c "import os,sys; print os.path.realpath(sys.argv[1])" "$2")&#xA;                shift 2&#xA;                continue&#xA;            else&#xA;                echo &#x27;ERROR: Must specify a non-empty "--with-openh264 PREFIX" argument.&#x27; >&amp;2&#xA;                exit 1&#xA;            fi&#xA;            ;;&#xA;        --with-ffmpeg)&#xA;            if [ "$#" -gt 1 ]; then&#xA;                FFMPEG_PREFIX=$(python -c "import os,sys; print os.path.realpath(sys.argv[1])" "$2")&#xA;                shift 2&#xA;                continue&#xA;            else&#xA;                echo &#x27;ERROR: Must specify a non-empty "--with-ffmpeg PREFIX" argument.&#x27; >&amp;2&#xA;                exit 1&#xA;            fi&#xA;            ;;&#xA;        --with-opus)&#xA;            if [ "$#" -gt 1 ]; then&#xA;                OPUS_PREFIX=$(python -c "import os,sys; print os.path.realpath(sys.argv[1])" "$2")&#xA;                shift 2&#xA;                continue&#xA;            else&#xA;                echo &#x27;ERROR: Must specify a non-empty "--with-opus PREFIX" argument.&#x27; >&amp;2&#xA;                exit 1&#xA;            fi&#xA;            ;;&#xA;    esac&#xA;&#xA;    shift&#xA;done&#xA;&#xA;function config_site() {&#xA;    SOURCE_DIR=$1&#xA;    PJSIP_CONFIG_PATH="${SOURCE_DIR}/pjlib/include/pj/config_site.h"&#xA;    HAS_VIDEO=&#xA;&#xA;    echo "Creating config_site.h ..."&#xA;&#xA;    if [ -f "${PJSIP_CONFIG_PATH}" ]; then&#xA;        rm "${PJSIP_CONFIG_PATH}"&#xA;    fi&#xA;&#xA;    echo "#define PJ_CONFIG_IPHONE 1" >> "${PJSIP_CONFIG_PATH}"&#xA;    echo "#define PJ_HAS_IPV6 1" >> "${PJSIP_CONFIG_PATH}" # Enable IPV6&#xA;    if [[ ${OPENH264_PREFIX} ]]; then&#xA;        # echo "#define PJMEDIA_HAS_VID_TOOLBOX_CODEC 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        # echo "#define PJMEDIA_HAS_OPENH264_CODEC 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#define PJMEDIA_HAS_FFMPEG_VID_CODEC 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        HAS_VIDEO=1&#xA;    fi&#xA;    if [[ ${HAS_VIDEO} ]]; then&#xA;        echo "#define PJMEDIA_HAS_VIDEO 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#define PJMEDIA_VIDEO_DEV_HAS_OPENGL 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#define PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#define PJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#include <opengles></opengles>ES3/glext.h>" >> "${PJSIP_CONFIG_PATH}"&#xA;    fi&#xA;    echo "#include <pj></pj>config_site_sample.h>" >> "${PJSIP_CONFIG_PATH}"&#xA;}&#xA;&#xA;function clean_libs () {&#xA;    ARCH=${1}&#xA;    for SRC_DIR in ${LIB_PATHS[*]}; do&#xA;        DIR="${PJSIP_DIR}/${SRC_DIR}"&#xA;        if [ -d "${DIR}" ]; then&#xA;            rm -rf "${DIR}"/*&#xA;        fi&#xA;&#xA;        DIR="${PJSIP_DIR}/${SRC_DIR}-${ARCH}"&#xA;        if [ -d "${DIR}" ]; then&#xA;            rm -rf "${DIR}"&#xA;        fi&#xA;    done&#xA;}&#xA;&#xA;function copy_libs () {&#xA;    ARCH=${1}&#xA;&#xA;    for SRC_DIR in ${LIB_PATHS[*]}; do&#xA;        SRC_DIR="${PJSIP_DIR}/${SRC_DIR}"&#xA;        DST_DIR="${SRC_DIR}-${ARCH}"&#xA;        if [ -d "${DST_DIR}" ]; then&#xA;            rm -rf "${DST_DIR}"&#xA;        fi&#xA;        cp -R "${SRC_DIR}" "${DST_DIR}"&#xA;        rm -rf "${SRC_DIR}"/* # delete files because this directory will be used for the final lipo output&#xA;    done&#xA;}&#xA;&#xA;function _build() {&#xA;    pushd . > /dev/null&#xA;    cd ${PJSIP_DIR}&#xA;&#xA;    ARCH=$1&#xA;    LOG=${BASE_DIR}/${ARCH}.log&#xA;&#xA;    # configure&#xA;    CONFIGURE="./configure-iphone"&#xA;    if [[ ${OPENSSL_PREFIX} ]]; then&#xA;        CONFIGURE="${CONFIGURE} --with-ssl=${OPENSSL_PREFIX}"&#xA;    fi&#xA;    # if [[ ${OPENH264_PREFIX} ]]; then&#xA;    #     CONFIGURE="${CONFIGURE} --with-openh264=${OPENH264_PREFIX}"&#xA;    # fi&#xA;    if [[ ${FFMPEG_PREFIX} ]]; then&#xA;        CONFIGURE="${CONFIGURE} --with-ffmpeg=${FFMPEG_PREFIX}"&#xA;    fi&#xA;    if [[ ${OPUS_PREFIX} ]]; then&#xA;        CONFIGURE="${CONFIGURE} --with-opus=${OPUS_PREFIX}"&#xA;    fi&#xA;&#xA;    # flags&#xA;    if [[ ! ${CFLAGS} ]]; then&#xA;        export CFLAGS=&#xA;    fi&#xA;    if [[ ! ${LDFLAGS} ]]; then&#xA;        export LDFLAGS=&#xA;    fi&#xA;    if [[ ${OPENSSL_PREFIX} ]]; then&#xA;        export CFLAGS="${CFLAGS} -I${OPENSSL_PREFIX}/include"&#xA;        export LDFLAGS="${LDFLAGS} -L${OPENSSL_PREFIX}/lib"&#xA;    fi&#xA;    # if [[ ${OPENH264_PREFIX} ]]; then&#xA;    #     export CFLAGS="${CFLAGS} -I${OPENH264_PREFIX}/include"&#xA;    #     export LDFLAGS="${LDFLAGS} -L${OPENH264_PREFIX}/lib"&#xA;    # fi&#xA;    if [[ ${FFMPEG_PREFIX} ]]; then&#xA;        export CFLAGS="${CFLAGS} -I${FFMPEG_PREFIX}/include"&#xA;        export LDFLAGS="${LDFLAGS} -L${FFMPEG_PREFIX}/lib"&#xA;    fi&#xA;    export LDFLAGS="${LDFLAGS} -lstdc&#x2B;&#x2B;"&#xA;&#xA;    echo "Building for ${ARCH}..."&#xA;&#xA;    clean_libs ${ARCH}&#xA;&#xA;    make distclean > ${LOG} 2>&amp;1&#xA;    ARCH="-arch ${ARCH}" ${CONFIGURE} >> ${LOG} 2>&amp;1&#xA;    make dep >> ${LOG} 2>&amp;1&#xA;    make clean >> ${LOG}&#xA;    make lib >> ${LOG} 2>&amp;1&#xA;&#xA;    copy_libs ${ARCH}&#xA;}&#xA;&#xA;# function armv7() {&#xA;#     export DEVPATH="`xcrun -sdk iphoneos --show-sdk-platform-path`/Developer"&#xA;#     export CFLAGS="-miphoneos-version-min=8.0"&#xA;#     export LDFLAGS=&#xA;#     _build "armv7"&#xA;# }&#xA;# function armv7s() {&#xA;#     export DEVPATH="`xcrun -sdk iphoneos --show-sdk-platform-path`/Developer"&#xA;#     export CFLAGS="-miphoneos-version-min=8.0"&#xA;#     export LDFLAGS=&#xA;#     _build "armv7s"&#xA;# }&#xA;function arm64() {&#xA;    export DEVPATH="`xcrun -sdk iphoneos --show-sdk-platform-path`/Developer"&#xA;    export CFLAGS="-miphoneos-version-min=8.0"&#xA;    export LDFLAGS=&#xA;    _build "arm64"&#xA;}&#xA;function i386() {&#xA;    export DEVPATH="`xcrun -sdk iphonesimulator --show-sdk-platform-path`/Developer"&#xA;    export CFLAGS="-O2 -m32 -mios-simulator-version-min=8.0"&#xA;    export LDFLAGS="-O2 -m32 -mios-simulator-version-min=8.0"&#xA;    _build "i386"&#xA;}&#xA;function x86_64() {&#xA;    export DEVPATH="`xcrun -sdk iphonesimulator --show-sdk-platform-path`/Developer"&#xA;    export CFLAGS="-O2 -m32 -mios-simulator-version-min=8.0"&#xA;    export LDFLAGS="-O2 -m32 -mios-simulator-version-min=8.0"&#xA;    _build "x86_64"&#xA;}&#xA;&#xA;function lipo() {&#xA;    TMP=`mktemp -t lipo`&#xA;    echo "Lipo libs... (${TMP})"&#xA;&#xA;    for LIB_DIR in ${LIB_PATHS[*]}; do # loop over libs&#xA;        DST_DIR="${PJSIP_DIR}/${LIB_DIR}"&#xA;&#xA;        # use the first architecture to find all libraries&#xA;        PATTERN_DIR="${DST_DIR}-$1"&#xA;        for PATTERN_FILE in `ls -l1 "${PATTERN_DIR}"`; do&#xA;            OPTIONS=""&#xA;&#xA;            # loop over all architectures and collect the current library&#xA;            for ARCH in "$@"; do&#xA;                FILE="${DST_DIR}-${ARCH}/${PATTERN_FILE/-$1-/-${ARCH}-}"&#xA;                if [ -e "${FILE}" ]; then&#xA;                    OPTIONS="$OPTIONS -arch ${ARCH} ${FILE}"&#xA;                fi&#xA;            done&#xA;&#xA;            if [ "$OPTIONS" != "" ]; then&#xA;                OUTPUT_PREFIX=$(dirname "${DST_DIR}")&#xA;                OUTPUT="${OUTPUT_PREFIX}/lib/${PATTERN_FILE/-$1-/-}"&#xA;&#xA;                OPTIONS="${OPTIONS} -create -output ${OUTPUT}"&#xA;                echo "$OPTIONS" >> "${TMP}"&#xA;            fi&#xA;        done&#xA;    done&#xA;&#xA;    while read LINE; do&#xA;        xcrun -sdk iphoneos lipo ${LINE}&#xA;    done &lt; "${TMP}"&#xA;}&#xA;&#xA;# download "${PJSIP_URL}" "${PJSIP_DIR}"&#xA;config_site "${PJSIP_DIR}"&#xA;arm64 &amp;&amp; i386 &amp;&amp; x86_64&#xA;lipo arm64 i386 x86_64&#xA;

    &#xA;

    Thanks for any advice.

    &#xA;

  • FFMPEG unwanted rotation

    5 mars 2015, par Ben

    When I add a watermark image with a landscape orientation to a video that has a portrait orientation the video automatically rotates to landscape. How do I prevent this ? Also, the audio file isn’t being merged into the output. How can I include the audio.mp3 to be the sole audio track ?

    ffmpeg -i 1425500438.MOV -i hashtag.png -itsoffset 00:00:07 -i audio.mp3  -filter_complex "[0:v]curves=preset=vintage[a];[a][1:v]overlay=10:10[out]"  -vcodec libx264 -pix_fmt yuv420p -ss 0:0:07 -t 14 -map "[out]" -y processed.mov

    EDIT****

    ffmpeg version 2.1.4 Copyright (c) 2000-2014 the FFmpeg developers
     built on Mar 19 2014 12:48:02 with Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
     configuration: --prefix=/usr/local/Cellar/ffmpeg/2.1.4 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libfreetype --enable-libvorbis --enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-aacenc --enable-libass --enable-ffplay --enable-libspeex --enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-frei0r --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1/include/openjpeg-1.5 '
     libavutil      52. 48.101 / 52. 48.101
     libavcodec     55. 39.101 / 55. 39.101
     libavformat    55. 19.104 / 55. 19.104
     libavdevice    55.  5.100 / 55.  5.100
     libavfilter     3. 90.100 /  3. 90.100
     libavresample   1.  1.  0 /  1.  1.  0
     libswscale      2.  5.101 /  2.  5.101
     libswresample   0. 17.104 /  0. 17.104
     libpostproc    52.  3.100 / 52.  3.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1425500438.MOV':
     Metadata:
       major_brand     : qt  
       minor_version   : 0
       compatible_brands: qt  
       creation_time   : 2015-03-04 20:20:14
       encoder         : 8.1.2
       encoder-eng     : 8.1.2
       date            : 2015-03-04T14:20:14-0600
       date-eng        : 2015-03-04T14:20:14-0600
       model           : iPhone 6
       model-eng       : iPhone 6
       make            : Apple
       make-eng        : Apple
     Duration: 00:00:10.56, start: 0.000000, bitrate: 703 kb/s
       Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m), 480x360, 696 kb/s, 30.02 fps, 30.08 tbr, 600 tbn, 1200 tbc (default)
       Metadata:
         rotate          : 90
         creation_time   : 2015-03-04 20:20:14
         handler_name    : Core Media Data Handler
    Input #1, image2, from 'hashtag.png':
     Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
       Stream #1:0: Video: png, rgba, 131x29, 25 tbr, 25 tbn, 25 tbc
    Input #2, mp3, from 'audio.mp3':
     Metadata:
       encoder         : Lavf55.19.104
     Duration: 00:00:10.44, start: 0.000000, bitrate: 128 kb/s
       Stream #2:0: Audio: mp3, 16000 Hz, stereo, s16p, 128 kb/s
    [libx264 @ 0x7f9894017200] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX AVX2 FMA3 BMI1 BMI2
    [libx264 @ 0x7f9894017200] profile High, level 3.0
    [libx264 @ 0x7f9894017200] 264 - core 125 - H.264/MPEG-4 AVC codec - Copyleft 2003-2012 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=12 lookahead_threads=2 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
    Output #0, mov, to 'processed.mov':
     Metadata:
       major_brand     : qt  
       minor_version   : 0
       compatible_brands: qt  
       make-eng        : Apple
       make            : Apple
       encoder-eng     : 8.1.2
       date            : 2015-03-04T14:20:14-0600
       date-eng        : 2015-03-04T14:20:14-0600
       model           : iPhone 6
       model-eng       : iPhone 6
       encoder         : Lavf55.19.104
       Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 480x360, q=-1--1, 11552 tbn, 30.08 tbc (default)
    Stream mapping:
     Stream #0:0 (h264) -> curves
     Stream #1:0 (png) -> overlay:overlay
     overlay -> Stream #0:0 (libx264)
    Press [q] to stop, [?] for help
    frame=  422 fps=413 q=-1.0 Lsize=     361kB time=00:00:13.96 bitrate= 211.9kbits/s dup=303 drop=0    
    video:356kB audio:0kB subtitle:0 global headers:0kB muxing overhead 1.574185%
    [libx264 @ 0x7f9894017200] frame I:2     Avg QP:20.09  size: 19764
    [libx264 @ 0x7f9894017200] frame P:134   Avg QP:22.29  size:  2248
    [libx264 @ 0x7f9894017200] frame B:286   Avg QP:28.02  size:    79
    [libx264 @ 0x7f9894017200] consecutive B-frames:  9.2%  0.0%  3.6% 87.2%
    [libx264 @ 0x7f9894017200] mb I  I16..4:  6.6% 45.0% 48.4%
    [libx264 @ 0x7f9894017200] mb P  I16..4:  1.8%  2.4%  0.7%  P16..4: 40.8% 13.6%  4.5%  0.0%  0.0%    skip:36.1%
    [libx264 @ 0x7f9894017200] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8: 10.9%  0.1%  0.0%  direct: 0.0%  skip:89.0%  L0:56.5% L1:42.3% BI: 1.2%
    [libx264 @ 0x7f9894017200] 8x8 transform intra:47.6% inter:61.5%
    [libx264 @ 0x7f9894017200] coded y,uvDC,uvAC intra: 51.3% 81.4% 36.7% inter: 5.6% 8.5% 0.5%
    [libx264 @ 0x7f9894017200] i16 v,h,dc,p: 21% 27% 12% 40%
    [libx264 @ 0x7f9894017200] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 27% 19%  5%  4%  4%  7%  5%  6%
    [libx264 @ 0x7f9894017200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 22% 12%  4%  5%  5%  6%  4%  6%
    [libx264 @ 0x7f9894017200] i8c dc,h,v,p: 40% 28% 22% 10%
    [libx264 @ 0x7f9894017200] Weighted P-Frames: Y:16.4% UV:10.4%
    [libx264 @ 0x7f9894017200] ref P L0: 73.7% 12.2% 11.7%  2.3%  0.2%
    [libx264 @ 0x7f9894017200] ref B L0: 93.5%  5.8%  0.7%
    [libx264 @ 0x7f9894017200] ref B L1: 97.2%  2.8%
    [libx264 @ 0x7f9894017200] kb/s:207.25
  • iOS Build PJSIP with FFmpeg+libx264

    22 février 2021, par Meonardo

    I have built the FFmpeg with libx264 into static libs, here is my directory tree.

    &#xA;

    ./ffmpeg&#xA;├── include&#xA;│&#xA0;&#xA0; ├── libavcodec&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── ac3_parser.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── adts_parser.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avcodec.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avdct.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avfft.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── bsf.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── codec.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── codec_desc.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── codec_id.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── codec_par.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── d3d11va.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── dirac.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── dv_profile.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── dxva2.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── jni.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── mediacodec.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── packet.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── qsv.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── vaapi.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── vdpau.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── version.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── videotoolbox.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── vorbis_parser.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; └── xvmc.h&#xA;│&#xA0;&#xA0; ├── libavdevice&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avdevice.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; └── version.h&#xA;│&#xA0;&#xA0; ├── libavfilter&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avfilter.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── buffersink.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── buffersrc.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; └── version.h&#xA;│&#xA0;&#xA0; ├── libavformat&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avformat.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avio.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; └── version.h&#xA;│&#xA0;&#xA0; ├── libavutil&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── adler32.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── aes.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── aes_ctr.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── attributes.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── audio_fifo.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avassert.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avconfig.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avstring.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── avutil.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── base64.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── blowfish.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── bprint.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── bswap.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── buffer.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── camellia.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── cast5.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── channel_layout.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── common.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── cpu.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── crc.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── des.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── dict.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── display.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── dovi_meta.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── downmix_info.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── encryption_info.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── error.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── eval.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── ffversion.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── fifo.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── file.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── frame.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hash.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hdr_dynamic_metadata.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hmac.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_cuda.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_d3d11va.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_drm.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_dxva2.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_mediacodec.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_opencl.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_qsv.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_vaapi.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_vdpau.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_videotoolbox.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── hwcontext_vulkan.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── imgutils.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── intfloat.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── intreadwrite.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── lfg.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── log.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── lzo.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── macros.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── mastering_display_metadata.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── mathematics.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── md5.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── mem.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── motion_vector.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── murmur3.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── opt.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── parseutils.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── pixdesc.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── pixelutils.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── pixfmt.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── random_seed.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── rational.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── rc4.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── replaygain.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── ripemd.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── samplefmt.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── sha.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── sha512.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── spherical.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── stereo3d.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── tea.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── threadmessage.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── time.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── timecode.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── timestamp.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── tree.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── twofish.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── tx.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── version.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── video_enc_params.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; └── xtea.h&#xA;│&#xA0;&#xA0; ├── libpostproc&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── postprocess.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; └── version.h&#xA;│&#xA0;&#xA0; ├── libswresample&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── swresample.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; └── version.h&#xA;│&#xA0;&#xA0; ├── libswscale&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; ├── swscale.h&#xA;│&#xA0;&#xA0; │&#xA0;&#xA0; └── version.h&#xA;│&#xA0;&#xA0; └── libx264&#xA;│&#xA0;&#xA0;     ├── x264.h&#xA;│&#xA0;&#xA0;     └── x264_config.h&#xA;└── lib&#xA;    ├── libavcodec.a&#xA;    ├── libavdevice.a&#xA;    ├── libavfilter.a&#xA;    ├── libavformat.a&#xA;    ├── libavutil.a&#xA;    ├── libpostproc.a&#xA;    ├── libswresample.a&#xA;    ├── libswscale.a&#xA;    └── libx264.a&#xA;

    &#xA;

    The final lib was created successfully, no error message in log file,&#xA;but when I import the lib to my Xcode Project,&#xA;the linker give me tons of errors(missing symbols like : Undefined symbol: _pjsua_vid_codec_set_priority).&#xA;I found the pjsua_vid.o is very small(200Bytes) compare to my pjsip+openh264 build file(was 47KB), perhaps this is the reason cause the link error.

    &#xA;

    Here is my build log :&#xA;log_file

    &#xA;

    the build script I am using :

    &#xA;

    #!/bin/sh&#xA;&#xA;# see http://stackoverflow.com/a/3915420/318790&#xA;function realpath { echo $(cd $(dirname "$1"); pwd)/$(basename "$1"); }&#xA;__FILE__=`realpath "$0"`&#xA;__DIR__=`dirname "${__FILE__}"`&#xA;&#xA;# download&#xA;function download() {&#xA;    "${__DIR__}/download.sh" "$1" "$2" #--no-cache&#xA;}&#xA;&#xA;BASE_DIR="$1"&#xA;PJSIP_URL="https://github.com/pjsip/pjproject/archive/2.10.zip"&#xA;#http://www.pjsip.org/release/2.8.0/pjproject-2.8.0.tar.bz2&#xA;PJSIP_DIR="$1/src"&#xA;LIB_PATHS=("pjlib/lib" \&#xA;           "pjlib-util/lib" \&#xA;           "pjmedia/lib" \&#xA;           "pjnath/lib" \&#xA;           "pjsip/lib" \&#xA;           "third_party/lib")&#xA;&#xA;OPENSSL_PREFIX=&#xA;FFMPEG_PREFIX=&#xA;OPENH264_PREFIX=&#xA;OPUS_PREFIX=&#xA;while [ "$#" -gt 0 ]; do&#xA;    case $1 in&#xA;        --with-openssl)&#xA;            if [ "$#" -gt 1 ]; then&#xA;                OPENSSL_PREFIX=$(python -c "import os,sys; print os.path.realpath(sys.argv[1])" "$2")&#xA;                shift 2&#xA;                continue&#xA;            else&#xA;                echo &#x27;ERROR: Must specify a non-empty "--with-openssl PREFIX" argument.&#x27; >&amp;2&#xA;                exit 1&#xA;            fi&#xA;            ;;&#xA;        --with-openh264)&#xA;            if [ "$#" -gt 1 ]; then&#xA;                OPENH264_PREFIX=$(python -c "import os,sys; print os.path.realpath(sys.argv[1])" "$2")&#xA;                shift 2&#xA;                continue&#xA;            else&#xA;                echo &#x27;ERROR: Must specify a non-empty "--with-openh264 PREFIX" argument.&#x27; >&amp;2&#xA;                exit 1&#xA;            fi&#xA;            ;;&#xA;        --with-ffmpeg)&#xA;            if [ "$#" -gt 1 ]; then&#xA;                FFMPEG_PREFIX=$(python -c "import os,sys; print os.path.realpath(sys.argv[1])" "$2")&#xA;                shift 2&#xA;                continue&#xA;            else&#xA;                echo &#x27;ERROR: Must specify a non-empty "--with-ffmpeg PREFIX" argument.&#x27; >&amp;2&#xA;                exit 1&#xA;            fi&#xA;            ;;&#xA;        --with-opus)&#xA;            if [ "$#" -gt 1 ]; then&#xA;                OPUS_PREFIX=$(python -c "import os,sys; print os.path.realpath(sys.argv[1])" "$2")&#xA;                shift 2&#xA;                continue&#xA;            else&#xA;                echo &#x27;ERROR: Must specify a non-empty "--with-opus PREFIX" argument.&#x27; >&amp;2&#xA;                exit 1&#xA;            fi&#xA;            ;;&#xA;    esac&#xA;&#xA;    shift&#xA;done&#xA;&#xA;function config_site() {&#xA;    SOURCE_DIR=$1&#xA;    PJSIP_CONFIG_PATH="${SOURCE_DIR}/pjlib/include/pj/config_site.h"&#xA;    HAS_VIDEO=&#xA;&#xA;    echo "Creating config_site.h ..."&#xA;&#xA;    if [ -f "${PJSIP_CONFIG_PATH}" ]; then&#xA;        rm "${PJSIP_CONFIG_PATH}"&#xA;    fi&#xA;&#xA;    echo "#define PJ_CONFIG_IPHONE 1" >> "${PJSIP_CONFIG_PATH}"&#xA;    echo "#define PJ_HAS_IPV6 1" >> "${PJSIP_CONFIG_PATH}" # Enable IPV6&#xA;    if [[ ${OPENH264_PREFIX} ]]; then&#xA;        # echo "#define PJMEDIA_HAS_VID_TOOLBOX_CODEC 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        # echo "#define PJMEDIA_HAS_OPENH264_CODEC 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#define PJMEDIA_HAS_FFMPEG_VID_CODEC 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        HAS_VIDEO=1&#xA;    fi&#xA;    if [[ ${HAS_VIDEO} ]]; then&#xA;        echo "#define PJMEDIA_HAS_VIDEO 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#define PJMEDIA_VIDEO_DEV_HAS_OPENGL 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#define PJMEDIA_VIDEO_DEV_HAS_OPENGL_ES 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#define PJMEDIA_VIDEO_DEV_HAS_IOS_OPENGL 1" >> "${PJSIP_CONFIG_PATH}"&#xA;        echo "#include <opengles></opengles>ES3/glext.h>" >> "${PJSIP_CONFIG_PATH}"&#xA;    fi&#xA;    echo "#include <pj></pj>config_site_sample.h>" >> "${PJSIP_CONFIG_PATH}"&#xA;}&#xA;&#xA;function clean_libs () {&#xA;    ARCH=${1}&#xA;    for SRC_DIR in ${LIB_PATHS[*]}; do&#xA;        DIR="${PJSIP_DIR}/${SRC_DIR}"&#xA;        if [ -d "${DIR}" ]; then&#xA;            rm -rf "${DIR}"/*&#xA;        fi&#xA;&#xA;        DIR="${PJSIP_DIR}/${SRC_DIR}-${ARCH}"&#xA;        if [ -d "${DIR}" ]; then&#xA;            rm -rf "${DIR}"&#xA;        fi&#xA;    done&#xA;}&#xA;&#xA;function copy_libs () {&#xA;    ARCH=${1}&#xA;&#xA;    for SRC_DIR in ${LIB_PATHS[*]}; do&#xA;        SRC_DIR="${PJSIP_DIR}/${SRC_DIR}"&#xA;        DST_DIR="${SRC_DIR}-${ARCH}"&#xA;        if [ -d "${DST_DIR}" ]; then&#xA;            rm -rf "${DST_DIR}"&#xA;        fi&#xA;        cp -R "${SRC_DIR}" "${DST_DIR}"&#xA;        rm -rf "${SRC_DIR}"/* # delete files because this directory will be used for the final lipo output&#xA;    done&#xA;}&#xA;&#xA;function _build() {&#xA;    pushd . > /dev/null&#xA;    cd ${PJSIP_DIR}&#xA;&#xA;    ARCH=$1&#xA;    LOG=${BASE_DIR}/${ARCH}.log&#xA;&#xA;    # configure&#xA;    CONFIGURE="./configure-iphone"&#xA;    if [[ ${OPENSSL_PREFIX} ]]; then&#xA;        CONFIGURE="${CONFIGURE} --with-ssl=${OPENSSL_PREFIX}"&#xA;    fi&#xA;    # if [[ ${OPENH264_PREFIX} ]]; then&#xA;    #     CONFIGURE="${CONFIGURE} --with-openh264=${OPENH264_PREFIX}"&#xA;    # fi&#xA;    if [[ ${FFMPEG_PREFIX} ]]; then&#xA;        CONFIGURE="${CONFIGURE} --with-ffmpeg=${FFMPEG_PREFIX}"&#xA;    fi&#xA;    if [[ ${OPUS_PREFIX} ]]; then&#xA;        CONFIGURE="${CONFIGURE} --with-opus=${OPUS_PREFIX}"&#xA;    fi&#xA;&#xA;    # flags&#xA;    if [[ ! ${CFLAGS} ]]; then&#xA;        export CFLAGS=&#xA;    fi&#xA;    if [[ ! ${LDFLAGS} ]]; then&#xA;        export LDFLAGS=&#xA;    fi&#xA;    if [[ ${OPENSSL_PREFIX} ]]; then&#xA;        export CFLAGS="${CFLAGS} -I${OPENSSL_PREFIX}/include"&#xA;        export LDFLAGS="${LDFLAGS} -L${OPENSSL_PREFIX}/lib"&#xA;    fi&#xA;    # if [[ ${OPENH264_PREFIX} ]]; then&#xA;    #     export CFLAGS="${CFLAGS} -I${OPENH264_PREFIX}/include"&#xA;    #     export LDFLAGS="${LDFLAGS} -L${OPENH264_PREFIX}/lib"&#xA;    # fi&#xA;    if [[ ${FFMPEG_PREFIX} ]]; then&#xA;        export CFLAGS="${CFLAGS} -I${FFMPEG_PREFIX}/include"&#xA;        export LDFLAGS="${LDFLAGS} -L${FFMPEG_PREFIX}/lib"&#xA;    fi&#xA;    export LDFLAGS="${LDFLAGS} -lstdc&#x2B;&#x2B;"&#xA;&#xA;    echo "Building for ${ARCH}..."&#xA;&#xA;    clean_libs ${ARCH}&#xA;&#xA;    make distclean > ${LOG} 2>&amp;1&#xA;    ARCH="-arch ${ARCH}" ${CONFIGURE} >> ${LOG} 2>&amp;1&#xA;    make dep >> ${LOG} 2>&amp;1&#xA;    make clean >> ${LOG}&#xA;    make lib >> ${LOG} 2>&amp;1&#xA;&#xA;    copy_libs ${ARCH}&#xA;}&#xA;&#xA;# function armv7() {&#xA;#     export DEVPATH="`xcrun -sdk iphoneos --show-sdk-platform-path`/Developer"&#xA;#     export CFLAGS="-miphoneos-version-min=8.0"&#xA;#     export LDFLAGS=&#xA;#     _build "armv7"&#xA;# }&#xA;# function armv7s() {&#xA;#     export DEVPATH="`xcrun -sdk iphoneos --show-sdk-platform-path`/Developer"&#xA;#     export CFLAGS="-miphoneos-version-min=8.0"&#xA;#     export LDFLAGS=&#xA;#     _build "armv7s"&#xA;# }&#xA;function arm64() {&#xA;    export DEVPATH="`xcrun -sdk iphoneos --show-sdk-platform-path`/Developer"&#xA;    export CFLAGS="-miphoneos-version-min=8.0"&#xA;    export LDFLAGS=&#xA;    _build "arm64"&#xA;}&#xA;function i386() {&#xA;    export DEVPATH="`xcrun -sdk iphonesimulator --show-sdk-platform-path`/Developer"&#xA;    export CFLAGS="-O2 -m32 -mios-simulator-version-min=8.0"&#xA;    export LDFLAGS="-O2 -m32 -mios-simulator-version-min=8.0"&#xA;    _build "i386"&#xA;}&#xA;function x86_64() {&#xA;    export DEVPATH="`xcrun -sdk iphonesimulator --show-sdk-platform-path`/Developer"&#xA;    export CFLAGS="-O2 -m32 -mios-simulator-version-min=8.0"&#xA;    export LDFLAGS="-O2 -m32 -mios-simulator-version-min=8.0"&#xA;    _build "x86_64"&#xA;}&#xA;&#xA;function lipo() {&#xA;    TMP=`mktemp -t lipo`&#xA;    echo "Lipo libs... (${TMP})"&#xA;&#xA;    for LIB_DIR in ${LIB_PATHS[*]}; do # loop over libs&#xA;        DST_DIR="${PJSIP_DIR}/${LIB_DIR}"&#xA;&#xA;        # use the first architecture to find all libraries&#xA;        PATTERN_DIR="${DST_DIR}-$1"&#xA;        for PATTERN_FILE in `ls -l1 "${PATTERN_DIR}"`; do&#xA;            OPTIONS=""&#xA;&#xA;            # loop over all architectures and collect the current library&#xA;            for ARCH in "$@"; do&#xA;                FILE="${DST_DIR}-${ARCH}/${PATTERN_FILE/-$1-/-${ARCH}-}"&#xA;                if [ -e "${FILE}" ]; then&#xA;                    OPTIONS="$OPTIONS -arch ${ARCH} ${FILE}"&#xA;                fi&#xA;            done&#xA;&#xA;            if [ "$OPTIONS" != "" ]; then&#xA;                OUTPUT_PREFIX=$(dirname "${DST_DIR}")&#xA;                OUTPUT="${OUTPUT_PREFIX}/lib/${PATTERN_FILE/-$1-/-}"&#xA;&#xA;                OPTIONS="${OPTIONS} -create -output ${OUTPUT}"&#xA;                echo "$OPTIONS" >> "${TMP}"&#xA;            fi&#xA;        done&#xA;    done&#xA;&#xA;    while read LINE; do&#xA;        xcrun -sdk iphoneos lipo ${LINE}&#xA;    done &lt; "${TMP}"&#xA;}&#xA;&#xA;# download "${PJSIP_URL}" "${PJSIP_DIR}"&#xA;config_site "${PJSIP_DIR}"&#xA;arm64 &amp;&amp; i386 &amp;&amp; x86_64&#xA;lipo arm64 i386 x86_64&#xA;

    &#xA;

    Thanks for any advice.

    &#xA;