Recherche avancée

Médias (91)

Autres articles (86)

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

  • Dépôt de média et thèmes par FTP

    31 mai 2013, par

    L’outil MédiaSPIP traite aussi les média transférés par la voie FTP. Si vous préférez déposer par cette voie, récupérez les identifiants d’accès vers votre site MédiaSPIP et utilisez votre client FTP favori.
    Vous trouverez dès le départ les dossiers suivants dans votre espace FTP : config/ : dossier de configuration du site IMG/ : dossier des média déjà traités et en ligne sur le site local/ : répertoire cache du site web themes/ : les thèmes ou les feuilles de style personnalisées tmp/ : dossier de travail (...)

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

Sur d’autres sites (8373)

  • Revision 36899 : améliorations et ajout des filtres avfilters gérés

    4 avril 2010, par kent1@… — Log

    améliorations et ajout des filtres avfilters gérés

  • OpenCV compile process fails

    12 septembre 2017, par bork

    So I’m following this post on how to install openCV for Python 3. And I’m running into some issues at the compile process. Running the make -j4 command goes fine up until it’s 28% through when I get this error message : error: use of undeclared identifier 'avcodec_free_frame'; did you mean 'avcodec_get_name'?

    I don’t even know where to start to solve this issue. I’ve got ffmpeg installed through brew.

    Complete list of commands :

    cd ~
    git clone https://github.com/Itseez/opencv.git
    cd opencv
    git checkout 3.0.0
    cd ~
    git clone https://github.com/Itseez/opencv_contrib.git
    cd opencv_contrib
    git checkout 3.0.0
    cd ~/opencv
    mkdir build
    cd build
    cmake CMAKE_BUILD_TYPE=RELEASE \
       -D CMAKE_INSTALL_PREFIX=/usr/local \
       -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
       -D PYTHON3_LIBRARY=/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config-3.5m/libpython3.5.dylib \
       -D PYTHON3_INCLUDE_DIR=/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/include/python3.5m/ \
       -D PYTHON3_EXECUTABLE=$VIRTUAL_ENV/bin/python \
       -D BUILD_opencv_python2=OFF \
       -D BUILD_opencv_python3=ON \
       -D INSTALL_PYTHON_EXAMPLES=ON \
       -D INSTALL_C_EXAMPLES=OFF \
       -D BUILD_EXAMPLES=ON .. \
       -D FFMPEG_INCLUDE_DIR=/usr/local/Cellar/ffmpeg/3.3.4/include/
       -D FFMPEG_LIB_DIR=/usr/local/Cellar/ffmpeg/3.3.4/lib/
       -D WITH_FFMPEG=ON
    cmake
    make -j4

    I got the FFMPEG_INCLUDE_DIR, FFMPEG_LIB_DIR and WITH_FFMPEG from this post : http://blog.jiashen.me/2014/12/23/build-opencv-3-on-mac-os-x-with-python-3-and-ffmpeg-support/

    The full error log :

    [ 28%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:317:9: error: use of undeclared identifier
         'avcodec_free_frame'; did you mean 'avcodec_get_name'?
           avcodec_free_frame(&picture);
           ^~~~~~~~~~~~~~~~~~
           avcodec_get_name
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavcodec/avcodec.h:6289:13: note: 'avcodec_get_name' declared here
    const char *avcodec_get_name(enum AVCodecID id);
               ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:317:28: error: cannot initialize a parameter of type
         'enum AVCodecID' with an rvalue of type 'AVFrame **'
           avcodec_free_frame(&picture);
                              ^~~~~~~~
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavcodec/avcodec.h:6289:45: note: passing argument to parameter 'id' here
    const char *avcodec_get_name(enum AVCodecID id);
                                               ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:632:23: error: use of undeclared identifier
         'avcodec_alloc_frame'
               picture = avcodec_alloc_frame();
                         ^
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:635:41: error: use of undeclared identifier
         'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
                       avpicture_get_size( PIX_FMT_BGR24,
                                           ^~~~~~~~~~~~~
                                           AV_PIX_FMT_BGR24
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
       AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
       ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:638:29: error: use of undeclared identifier
         'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
                               PIX_FMT_BGR24, enc->width, enc->height );
                               ^~~~~~~~~~~~~
                               AV_PIX_FMT_BGR24
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
       AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
       ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:738:67: error: use of undeclared identifier
         'PIX_FMT_RGB24'; did you mean 'AV_PIX_FMT_RGB24'?
       avpicture_fill((AVPicture*)&rgb_picture, rgb_picture.data[0], PIX_FMT_RGB24,
                                                                     ^~~~~~~~~~~~~
                                                                     AV_PIX_FMT_RGB24
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:64:5: note: 'AV_PIX_FMT_RGB24' declared here
       AV_PIX_FMT_RGB24,     ///< packed RGB 8:8:8, 24bpp, RGBRGB...
       ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:756:17: error: use of undeclared identifier
         'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
                   PIX_FMT_BGR24,
                   ^~~~~~~~~~~~~
                   AV_PIX_FMT_BGR24
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
       AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
       ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1110:15: error: use of undeclared identifier
         'avcodec_alloc_frame'
       picture = avcodec_alloc_frame();
                 ^
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1113:33: error: unknown type name 'PixelFormat'; did you
         mean 'AVPixelFormat'?
       size = avpicture_get_size( (PixelFormat) pix_fmt, width, height);
                                   ^~~~~~~~~~~
                                   AVPixelFormat
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
    enum AVPixelFormat {
        ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1122:25: error: unknown type name 'PixelFormat'; did you
         mean 'AVPixelFormat'?
                          (PixelFormat) pix_fmt, width, height);
                           ^~~~~~~~~~~
                           AVPixelFormat
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
    enum AVPixelFormat {
        ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1230:19: error: unknown type name 'PixelFormat'; did you
         mean 'AVPixelFormat'?
       c->pix_fmt = (PixelFormat) pixel_format;
                     ^~~~~~~~~~~
                     AVPixelFormat
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
    enum AVPixelFormat {
        ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1405:26: error: use of undeclared identifier
         'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
       if (input_pix_fmt == PIX_FMT_BGR24) {
                            ^~~~~~~~~~~~~
                            AV_PIX_FMT_BGR24
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
       AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
       ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1410:31: error: use of undeclared identifier
         'PIX_FMT_GRAY8'; did you mean 'AV_PIX_FMT_GRAY8'?
       else if (input_pix_fmt == PIX_FMT_GRAY8) {
                                 ^~~~~~~~~~~~~
                                 AV_PIX_FMT_GRAY8
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:70:5: note: 'AV_PIX_FMT_GRAY8' declared here
       AV_PIX_FMT_GRAY8,     ///<        Y        ,  8bpp
       ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1423:25: error: unknown type name 'PixelFormat'; did you
         mean 'AVPixelFormat'?
                          (PixelFormat)input_pix_fmt, width, height);
                           ^~~~~~~~~~~
                           AVPixelFormat
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
    enum AVPixelFormat {
        ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1429:47: error: unknown type name 'PixelFormat'; did you
         mean 'AVPixelFormat'?
                                                (PixelFormat)input_pix_fmt,
                                                 ^~~~~~~~~~~
                                                 AVPixelFormat
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
    enum AVPixelFormat {
        ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1447:25: error: unknown type name 'PixelFormat'; did you
         mean 'AVPixelFormat'?
                          (PixelFormat)input_pix_fmt, width, height);
                           ^~~~~~~~~~~
                           AVPixelFormat
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:60:6: note: 'AVPixelFormat' declared here
    enum AVPixelFormat {
        ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1604:25: error: use of undeclared identifier
         'PIX_FMT_BGR24'; did you mean 'AV_PIX_FMT_BGR24'?
           input_pix_fmt = PIX_FMT_BGR24;
                           ^~~~~~~~~~~~~
                           AV_PIX_FMT_BGR24
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:65:5: note: 'AV_PIX_FMT_BGR24' declared here
       AV_PIX_FMT_BGR24,     ///< packed RGB 8:8:8, 24bpp, BGRBGR...
       ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1607:25: error: use of undeclared identifier
         'PIX_FMT_GRAY8'; did you mean 'AV_PIX_FMT_GRAY8'?
           input_pix_fmt = PIX_FMT_GRAY8;
                           ^~~~~~~~~~~~~
                           AV_PIX_FMT_GRAY8
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:70:5: note: 'AV_PIX_FMT_GRAY8' declared here
       AV_PIX_FMT_GRAY8,     ///<        Y        ,  8bpp
       ^
    In file included from /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg.cpp:45:
    /Users/myuser/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp:1683:25: error: use of undeclared identifier
         'PIX_FMT_YUV422P'; did you mean 'AV_PIX_FMT_YUV422P'?
           codec_pix_fmt = PIX_FMT_YUV422P;
                           ^~~~~~~~~~~~~~~
                           AV_PIX_FMT_YUV422P
    /usr/local/Cellar/ffmpeg/3.3.4/include/libavutil/pixfmt.h:66:5: note: 'AV_PIX_FMT_YUV422P' declared here
       AV_PIX_FMT_YUV422P,   ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
       ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    /Users/myuser/opencv/modules/videoio/src/cap_qtkit.mm:46:9: fatal error: 'QTKit/QTKit.h' file not found
    #import <qtkit></qtkit>QTKit.h>
           ^
    1 error generated.
    make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_qtkit.mm.o] Error 1
    make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
    make: *** [all] Error 2

    This question on openCV’s website seems to adress the same issue but there is no solution posted : http://answers.opencv.org/question/90091/error-use-of-undeclared-identifier-avcodec_free_frame-did-you-mean-avcodec_get_name/

  • bash script to install / update ffmpeg static builds

    1er mars 2017, par Joakim

    Hi I’m trying to make my first "real" bash script to do some real work than can be executed both manually and through cron jobs.

    The script should download and install the ffmpeg-static-build from https://johnvansickle.com/ffmpeg

    Here is what I’ve got so far :

    #!/bin/bash
    # Still to come, see if the script runs with root privileges else exit
    #Download FFMPEG static daily build and it's md5
    cd ~
    wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz | tar -xf
    #wget https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5
    curl -L https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5 | tar -xf | tee -a https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz | cut -d\  -f1 | md5sum > md5sum.txt


    #Chech the md5 is currect
    #md5sum -c MD5SUMS
    file1="md5sum.txt"
    file2="ffmpeg-git-64bit-static.tar.xz.md5"

    if ! cmp --silent "$file1" "$file2"; then
       echo "md5sum doesn't match...\n exit" >&amp;2
       exit 1
    fi


    #tar -xf ffmpeg-*.tar.xz
    cp ffmpeg-*-static/ff* /usr/bin/
    cp ffmpeg-*-static/ff* /usr/local/bin/
    cp ffmpeg-*-static/qt-faststart /usr/bin/
    cp ffmpeg-*-static/qt-faststart /usr/local/bin/
    # Consider change second location to use ln -s
    # Remove downloads and do some clean up

    rm -fr ffmpeg-*

    #EOF

    As you can see in the script i would like to add the md5sum check but it fails (got the md5sum check part from Compare md5 sums in bash script)

    If i remove the md5sum part the script is working, but right now the script fails at the | tar -xf | part with this code

    2017-02-28 00:10:24 (617 KB/s) - ‘ffmpeg-git-64bit-static.tar.xz’ saved [17564756/17564756]

    tar: option requires an argument -- 'f'
    Try 'tar --help' or 'tar --usage' for more information.
    tee: 'https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz': No such file or directory
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
    100    65  100    65    0     0     87      0 --:--:-- --:--:-- --:--:--    87
    (23) Failed writing body
    md5sum doesn't match...
    exit

    As this is my first, I would appreciate any "I’m 4 years old" advices and why

    update

    Have made some changes to the script based on the suggestions in this thread, but my problem is I have no output what so ever at this state :( So I think it’s time to ask for the next clue

    #!/bin/bash

    # version 0.3z

    ## Download FFMPEG static daily build and it's md5
    ##
    ## To make this script working you might need to change the below values
    ## based on whether you are using a 32bit or 64 bit OS
    ## to obtain the right links you have to have a look @ https://johnvansickle.com/ffmpeg/
    ## and then change those below
    ##
    ## If you are running on a shared server or dowsn't have root priviliges you might need to uncomment
    ## point 5.


    # a "~" means running users home folder :) and should be different from destination dir
    download_dir=~

    # as this can change if the ffmpeg is to be stored on ex. shared server
    dest_dir=/usr/bin/

    # The version it equal the filename from above link
    version=ffmpeg-git-64bit-static.tar.xz

    ## Do not change anything below here!!
    source_url=https://johnvansickle.com/ffmpeg/builds/${version}
    md5_url=https://johnvansickle.com/ffmpeg/builds/${version}.md5

    # Still to come, see if the script runs with write privileges else exit

    # 1. Can we enter download directory else exit
    cd ${download_dir} ||

           printf "%s\n" "You can't enter this folder.\nPlease chage download_dir in this script..." >&amp;2
           exit 1

    # 2. Check the md5 is correct or have changed from last check
    ## instead of downloading ffmpeg-git-64bit-static.tar.xz every time,
    ## regardless if it is new or not, I recommend only downloading it
    ## if the md5 does not match. Would save John some bandwidth at least
    ## thx for the idea to @LordNeckbeard



    ## So somehow i'll guess some sed or grep only first part is nessesary :(
    ## This is getting more advance than expected for a first time script :/

    if ! diff &lt;(md5sum ${version}) &lt;(curl -s ${md5_url})

       then
           printf "%s\n" "md5sum doesn't match...\n
                           Downloading new version" >&amp;2
           rm -f ${version} >&amp;2
           curl ${source_url} -o ${download_dir}/${version} >&amp;2
           #exit 2

       elif
           diff &lt;(md5sum ${version}) &lt;(curl -s ${md5_url})
           printf "%s\n" "Nothing new to download" >&amp;2
         exit 3
    fi

    # 3. untar
    tar -xf ffmpeg-git-*-static.tar.xz

    # 4. Move builds to destination directories

    mv ${download_dir}/ffmpeg-*-static/ff* ${dest_dir}/
    mv ${download_dir}/ffmpeg-*-static/qt-faststart ${dest_dir}/

    # 5. Make soft links to static builds
    ln -sfn ${dest_dir}/qt-faststart /usr/local/bin/qt-faststart
    ln -sfn ${dest_dir}/ffmpeg /usr/local/bin/ffmpeg
    ln -sfn ${dest_dir}/ffmpeg-10bit /usr/local/bin/ffmpeg-10bit
    ln -sfn ${dest_dir}/ffprobe /usr/local/bin/ffprobe
    ln -sfn ${dest_dir}/ffserver /usr/local/bin/ffserver

    # Remove unzipped folder to do some clean up

    rm -fr ffmpeg-git-*-static/

    #EOF

    note : do to some more in depth answering of why not compile from source :
    1. This precompiled is usable on all Linux variations, despite distro and version
    2. It usable on shared hosting servers with ssh access

    UPDATE 2

       #!/bin/bash

    # version 0.4z

    ## Download FFMPEG static daily build and it's md5
    ##
    ## To make this script working you might need to change the below values
    ## based on whether you are using a 32bit or 64 bit OS
    ## to obtain the right links you have to have a look @ https://johnvansickle.com/ffmpeg/
    ## and then change those below
    ##
    ## Finished and working script should be distributed under GPLv3: free as in freedom
    ##
    ## If you are running on a shared server or dowsn't have root priviliges you might need to uncomment
    ## point 5.


    # a "~" means running users home folder :) and should be different from destination dir
    download_dir=~

    # as this can change if the ffmpeg is to be stored on ex. shared server
    dest_dir=/usr/bin/

    # The version it equal the filename from above link
    version=ffmpeg-git-64bit-static.tar.xz

    ## Do not change anything below here!!
    source_url=https://johnvansickle.com/ffmpeg/builds/${version}
    md5="curl -s https://johnvansickle.com/ffmpeg/builds/${version}.md5"

    # Still to come, see if the script runs with write privileges else exit

    # 1. Can we enter download directory else exit
    cd ${download_dir} ||
           printf "%s\n" "You can't enter this folder.\nPlease chage download_dir in this script..." >&amp;2
           exit 1

    # 2. Check the md5 is correct or have changed from last check
    ## instead of downloading ffmpeg-git-64bit-static.tar.xz every time,
    ## regardless if it is new or not, I recommend only downloading it
    ## if the md5 does not match. Would save John some bandwidth at least
    ## thx for the idea to @LordNeckbeard

    ## This is getting more advance than expected for a first time script :/

    if diff &lt;(md5sum ${version}) &lt;(${md5})

       then
           printf "%s\n" "No new version availeble" >&amp;2
           exit 1

    elif ! diff &lt;(md5sum ${version}) &lt;(${md5})
       then
           rm -f ${version}
           curl ${source_url} > ${version}
           exit 0

           #only proceed if downloaded version match it's md5
           if ! diff &lt;(md5sum ${version}) &lt;(${md5})
               then
               rm -f ${version}
               printf "%s\n" "Downloaded version is damaged, try later\ndamaged version have been deleted" >&amp;2
               exit 1
           fi

               # 3. untar
               tar -xf ffmpeg-git-*-static.tar.xz

               # 4. Move builds to destination directories
               mv ${download_dir}/ffmpeg-*-static/ff* ${dest_dir}/
               mv ${download_dir}/ffmpeg-*-static/qt-faststart ${dest_dir}/

               # 5. Make soft links to static builds
               ln -sfn ${dest_dir}/qt-faststart /usr/local/bin/qt-faststart
               ln -sfn ${dest_dir}/ffmpeg /usr/local/bin/ffmpeg
               ln -sfn ${dest_dir}/ffmpeg-10bit /usr/local/bin/ffmpeg-10bit
               ln -sfn ${dest_dir}/ffprobe /usr/local/bin/ffprobe
               ln -sfn ${dest_dir}/ffserver /usr/local/bin/ffserver

               # Remove unzipped folder to do some clean up
               rm -fr ffmpeg-git-*-static/
               printf "%s\n" "Going to install new version" >&amp;2
               exit 1
    fi
    #EOF

    But still having some issues :(

    1. Running this script returns : a blanc shell, but I’ve expected one of the printf statements
    2. When I’m trying to narrow down the problem and going back to basic and trying to run the script with only the "if" part it fails with 44 : Syntax error : "(" unexpected
    3. running the very same "if" part typed directly into the shell/terminal itself it’s all happy !!
      if diff &lt;(md5sum ffmpeg-git-64bit-static.tar.xz) &lt;(curl -s "https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5"); then printf "%s\n" "No new version availeble" >&amp;2; elif ! diff &lt;(md5sum ffmpeg-git-64bit-static.tar.xz) &lt;(curl -s "https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz.md5"); then rm -f ffmpeg-git-64bit-static.tar.xz; curl https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-64bit-static.tar.xz > ffmpeg-git-64bit-static.tar.xz; printf "%s\n" "Going to install new version" >&amp;2; fi

    4. I’m confused