Recherche avancée

Médias (91)

Autres articles (101)

  • MediaSPIP 0.1 Beta version

    25 avril 2011, par

    MediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
    The zip file provided here only contains the sources of MediaSPIP in its standalone version.
    To get a working installation, you must manually install all-software dependencies on the server.
    If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...)

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Amélioration de la version de base

    13 septembre 2013

    Jolie sélection multiple
    Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
    Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...)

Sur d’autres sites (11516)

  • 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;

  • 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;

  • Safari on Mac and IOS 14 Won't Play HTML 5 MP4 Video

    10 mars 2021, par Glen Elkins

    So i have developed a chat application that uses node for the back-end. When a user selects a video on their iphone it usually is .mov format so when it's sent to the node server it's then converted to mp4 with ffmpeg. All that works fine, then if i load up my chat again in Chrome on my mac the video plays just fine as the mp4.

    &#xA;

    enter image description here

    &#xA;

    This screenshot shows the video embed is there, set to mp4 yet it won't play in Safari on my mac or my phone, in fact it just shows the video as 0 seconds long yet i can play it in chrome and also download the mp4 file by accessing the embed url directly.

    &#xA;

    Any ideas ? I had it convert to mp4 to prevent things like this, but safari doesn't seem to even like mp4 files.

    &#xA;

    The back-end part that serves the private file is in Symfony 4 (PHP) :

    &#xA;

    /**&#xA;     * @Route("/private/files/download/{base64Path}", name="downloadFile")&#xA;     * @param string $base64Path&#xA;     * @param Request $request&#xA;     * @return Response&#xA;     */&#xA;    public function downloadFile(string $base64Path, Request $request) : Response&#xA;    {&#xA;&#xA;&#xA;        // get token&#xA;        if(!$token = $request->query->get(&#x27;token&#x27;)){&#xA;            return new Response(&#x27;Access Denied&#x27;,403);&#xA;        }&#xA;&#xA;&#xA;&#xA;        /** @var UserRepository $userRepo */&#xA;        $userRepo = $this->getDoctrine()->getRepository(User::class);&#xA;&#xA;        /** @var User $user */&#xA;        if(!$user = $userRepo->findOneBy([&#x27;deleted&#x27;=>false,&#x27;active&#x27;=>true,&#x27;systemUser&#x27;=>false,&#x27;apiKey&#x27;=>$token])){&#xA;            return new Response(&#x27;Access Denied&#x27;,403);&#xA;        }&#xA;&#xA;&#xA;&#xA;        // get path&#xA;        if($path = base64_decode($base64Path)){&#xA;&#xA;            // make sure the folder we need exists&#xA;            $fullPath = $this->getParameter(&#x27;private_upload_folder&#x27;) . &#x27;/&#x27; . $path;&#xA;&#xA;&#xA;&#xA;            if(!file_exists($fullPath)){&#xA;                return new Response(&#x27;File Not Found&#x27;,404);&#xA;            }&#xA;&#xA;        &#xA;&#xA;            $response = new Response();&#xA;            $response->headers->set(&#x27;Content-Type&#x27;, mime_content_type($fullPath));&#xA;            $response->headers->set(&#x27;Content-Disposition&#x27;, &#x27;inline; filename="&#x27; . basename($fullPath) . &#x27;"&#x27;);&#xA;            $response->headers->set(&#x27;Content-Length&#x27;, filesize($fullPath));&#xA;            $response->headers->set(&#x27;Pragma&#x27;, "no-cache");&#xA;            $response->headers->set(&#x27;Expires&#x27;, "0");&#xA;            $response->headers->set(&#x27;Content-Transfer-Encoding&#x27;, "binary");&#xA;&#xA;            $response->sendHeaders();&#xA;&#xA;            $response->setContent(readfile($fullPath));&#xA;&#xA;            return $response;&#xA;        }&#xA;&#xA;        return new Response(&#x27;Invalid Path&#x27;,404);&#xA;    }&#xA;

    &#xA;

    This works fine everywhere except safari when trying to embed the video. It's done like this because the videos are not public and need an access token.

    &#xA;

    UPDATE : Here is a test link of an mp4, you'll have to allow the insecure certificate as it's on a quick test sub domain. If you open it in chrome, you'll see a 3 second video of my 3d printer curing station, if you load the same link in safari, you'll see it doesn't work

    &#xA;

    https://tester.nibbrstaging.com/private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032

    &#xA;

    The server runs on cPanel with Apache and i think it might be something to do with the video needs streaming ?

    &#xA;

    UPDATED CODE THAT WORKS IN SAFARI BUT NOW BROKEN IN CHROME :

    &#xA;

    Chrome is now giving Content-Length : 0 but it's working fine in safari.

    &#xA;

    public function downloadFile(string $base64Path, Request $request) : ?Response&#xA;    {&#xA;&#xA;        ob_clean();&#xA;&#xA;        // get token&#xA;        if(!$token = $request->query->get(&#x27;token&#x27;)){&#xA;            return new Response(&#x27;Access Denied&#x27;,403);&#xA;        }&#xA;&#xA;&#xA;        &#xA;&#xA;        /** @var UserRepository $userRepo */&#xA;        $userRepo = $this->getDoctrine()->getRepository(User::class);&#xA;&#xA;        /** @var User $user */&#xA;        if(!$user = $userRepo->findOneBy([&#x27;deleted&#x27;=>false,&#x27;active&#x27;=>true,&#x27;systemUser&#x27;=>false,&#x27;apiKey&#x27;=>$token])){&#xA;            return new Response(&#x27;Access Denied&#x27;,403);&#xA;        }&#xA;&#xA;&#xA;&#xA;        // get path&#xA;        if($path = base64_decode($base64Path)){&#xA;&#xA;            // make sure the folder we need exists&#xA;            $fullPath = $this->getParameter(&#x27;private_upload_folder&#x27;) . &#x27;/&#x27; . $path;&#xA;&#xA;&#xA;&#xA;            if(!file_exists($fullPath)){&#xA;                return new Response(&#x27;File Not Found&#x27;,404);&#xA;            }&#xA;&#xA;&#xA;            $filesize = filesize($fullPath);&#xA;            $mime = mime_content_type($fullPath);&#xA;&#xA;            header(&#x27;Content-Type: &#x27; . $mime);&#xA;&#xA;            if(isset($_SERVER[&#x27;HTTP_RANGE&#x27;])){&#xA;&#xA;                // Parse the range header to get the byte offset&#xA;                $ranges = array_map(&#xA;                    &#x27;intval&#x27;, // Parse the parts into integer&#xA;                    explode(&#xA;                        &#x27;-&#x27;, // The range separator&#xA;                        substr($_SERVER[&#x27;HTTP_RANGE&#x27;], 6) // Skip the `bytes=` part of the header&#xA;                    )&#xA;                );&#xA;&#xA;&#xA;&#xA;                // If the last range param is empty, it means the EOF (End of File)&#xA;                if(!$ranges[1]){&#xA;                    $ranges[1] = $filesize - 1;&#xA;                }&#xA;&#xA;                header(&#x27;HTTP/1.1 206 Partial Content&#x27;);&#xA;                header(&#x27;Accept-Ranges: bytes&#x27;);&#xA;                header(&#x27;Content-Length: &#x27; . ($ranges[1] - $ranges[0])); // The size of the range&#xA;&#xA;                // Send the ranges we offered&#xA;                header(&#xA;                    sprintf(&#xA;                        &#x27;Content-Range: bytes %d-%d/%d&#x27;, // The header format&#xA;                        $ranges[0], // The start range&#xA;                        $ranges[1], // The end range&#xA;                        $filesize // Total size of the file&#xA;                    )&#xA;                );&#xA;&#xA;                // It&#x27;s time to output the file&#xA;                $f = fopen($fullPath, &#x27;rb&#x27;); // Open the file in binary mode&#xA;                $chunkSize = 8192; // The size of each chunk to output&#xA;&#xA;                // Seek to the requested start range&#xA;                fseek($f, $ranges[0]);&#xA;&#xA;                // Start outputting the data&#xA;                while(true){&#xA;                    // Check if we have outputted all the data requested&#xA;                    if(ftell($f) >= $ranges[1]){&#xA;                        break;&#xA;                    }&#xA;&#xA;                    // Output the data&#xA;                    echo fread($f, $chunkSize);&#xA;&#xA;                    // Flush the buffer immediately&#xA;                    @ob_flush();&#xA;                    flush();&#xA;                }&#xA;            }else{&#xA;&#xA;                // It&#x27;s not a range request, output the file anyway&#xA;                header(&#x27;Content-Length: &#x27; . $filesize);&#xA;&#xA;                // Read the file&#xA;                @readfile($filesize);&#xA;&#xA;                // and flush the buffer&#xA;                @ob_flush();&#xA;                flush();&#xA;&#xA;&#xA;&#xA;            }&#xA;&#xA;        }else {&#xA;&#xA;            return new Response(&#x27;Invalid Path&#x27;, 404);&#xA;        }&#xA;    }&#xA;

    &#xA;

    I have notice in chrome that it's sending the range header like this :

    &#xA;

    Range : bytes=611609-

    &#xA;

    Where safari sends

    &#xA;

    Range : bytes=611609-61160

    &#xA;

    So for some reason chrome is missing the second range amount, that obviously means my code can't find a range number for the second one.

    &#xA;

    Doesn’t matter what I do I can’t get it working in both chrome and safari. Safari wants the byte range part , chrome seems to request it then sends a new request for the full file but even the full file part of the code gives a 500 error. If I take out the byte range bit then it works fine in chrome but not safari.

    &#xA;

    UPDATE :

    &#xA;

    Here is some strange things going on in chrome :

    &#xA;

    For the video i am testing with it makes 3 range requests :

    &#xA;

    REQUEST 1 HEADERS - asking for bytes 0- (to the end of the file)

    &#xA;

    GET /private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032 HTTP/1.1&#xA;&#xA;Connection: keep-alive&#xA;User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36&#xA;Accept-Encoding: identity;q=1, *;q=0&#xA;Accept: */*&#xA;Sec-Fetch-Site: same-site&#xA;Sec-Fetch-Mode: no-cors&#xA;Sec-Fetch-Dest: video&#xA;Referer: https://gofollow.vip/&#xA;Accept-Language: en-US,en;q=0.9&#xA;Range: bytes=0-&#xA;

    &#xA;

    RESPONSE GIVES IT BACK ALL THE BYTES IN THE FILE AS THAT'S WHAT WAS ASKED FOR BY CHROME :

    &#xA;

    HTTP/1.1 206 Partial Content&#xA;Date: Wed, 10 Mar 2021 12:35:54 GMT&#xA;Server: Apache&#xA;Accept-Ranges: bytes&#xA;Content-Length: 611609&#xA;Content-Range: bytes 0-611609/611610&#xA;Vary: User-Agent&#xA;Keep-Alive: timeout=5, max=100&#xA;Connection: Keep-Alive&#xA;Content-Type: video/mp4&#xA;

    &#xA;

    SECOND REQUEST HEADERS : NOW IT'S ASKING FOR 589824 to the end of the file :

    &#xA;

    Connection: keep-alive&#xA;User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36&#xA;Accept-Encoding: identity;q=1, *;q=0&#xA;Accept: */*&#xA;Sec-Fetch-Site: same-site&#xA;Sec-Fetch-Mode: no-cors&#xA;Sec-Fetch-Dest: video&#xA;Referer: https://gofollow.vip/&#xA;Accept-Language: en-US,en;q=0.9&#xA;Range: bytes=589824-&#xA;

    &#xA;

    RESPONSE OBLIGES :

    &#xA;

    HTTP/1.1 206 Partial Content&#xA;Date: Wed, 10 Mar 2021 12:35:55 GMT&#xA;Server: Apache&#xA;Accept-Ranges: bytes&#xA;Content-Length: 21785&#xA;Content-Range: bytes 589824-611609/611610&#xA;Vary: User-Agent&#xA;Keep-Alive: timeout=5, max=99&#xA;Connection: Keep-Alive&#xA;Content-Type: video/mp4&#xA;

    &#xA;

    THEN IT'S MAKING THIS 3rd REQUEST THAT GIVES AN INTERNAL SERVER ERORR, THIS TIME IT'S LITERALLY ASKING FOR THE LAST BYTE :

    &#xA;

    GET /private/files/download/Y2hhdC83Nzk1Y2U2MC04MDFmLTExZWItYjkzYy1lZjI4ZGYwMDhkOTMubXA0?token=6ab1720bfe922d44208c25f655d61032 HTTP/1.1&#xA;&#xA;Connection: keep-alive&#xA;User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36&#xA;Accept-Encoding: identity;q=1, *;q=0&#xA;Accept: */*&#xA;Sec-Fetch-Site: same-site&#xA;Sec-Fetch-Mode: no-cors&#xA;Sec-Fetch-Dest: video&#xA;Referer: https://gofollow.vip/&#xA;Accept-Language: en-US,en;q=0.9&#xA;Range: bytes=611609-&#xA;

    &#xA;

    RESPONSE - THE CONTENT LENGTH IS 0 BECAUSE THERE IS NO DIFFERENCE BETWEEN THE REQUESTED BYTES AND THE BYTES RETURNED :

    &#xA;

    HTTP/1.1 500 Internal Server Error&#xA;Date: Wed, 10 Mar 2021 12:35:56 GMT&#xA;Server: Apache&#xA;Accept-Ranges: bytes&#xA;Cache-Control: max-age=0, must-revalidate, private&#xA;X-Frame-Options: DENY&#xA;X-XSS-Protection: 1&#xA;X-Content-Type-Options: nosniff&#xA;Referrer-Policy: origin&#xA;Strict-Transport-Security: max-age=31536000; includeSubDomains&#xA;Expires: Wed, 10 Mar 2021 12:35:56 GMT&#xA;Content-Length: 0&#xA;Content-Range: bytes 611609-611609/611610&#xA;Vary: User-Agent&#xA;Connection: close&#xA;Content-Type: text/html; charset=UTF-8&#xA;

    &#xA;