Recherche avancée

Médias (91)

Autres articles (105)

  • L’espace de configuration de MediaSPIP

    29 novembre 2010, par

    L’espace de configuration de MediaSPIP est réservé aux administrateurs. Un lien de menu "administrer" est généralement affiché en haut de la page [1].
    Il permet de configurer finement votre site.
    La navigation de cet espace de configuration est divisé en trois parties : la configuration générale du site qui permet notamment de modifier : les informations principales concernant le site (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

Sur d’autres sites (4256)

  • ffmpeg remote url not working in lambda function

    9 septembre 2024, par Komal

    I have created lambda function to trim video.

    


    I run this command :

    


    /opt/bin/ffmpeg -protocol_whitelist file,http,https,tcp,tls -i 'https://source-bucket.s3.amazonaws.com/1.mp4' -ss 5 -t 10 -loglevel 48 -y -avoid_negative_ts 1 -acodec copy /tmp/output.mp4


    


    It gives following output :

    


    "ffmpeg version 7.0.2-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2024 the FFmpeg developers\n  built with gcc 8 (Debian 8.3.0-6)\n  configuration: --enable-gpl --enable-version3
--enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg\n  libavutil      59.  8.100 / 59.  8.100\n  libavcodec     61.  3.100 / 61.  3.100\n  libavformat    61.  1.100 / 61.  1.100\n  libavdevice    61.  1.100 /
61.  1.100\n  libavfilter    10.  1.100 / 10.  1.100\n  libswscale      8.  1.100 /  8.  1.100\n  libswresample   5.  1.100 /  5.  1.100\n  libpostproc    58.  1.100 / 58.  1.100\nSplitting the commandline.\nReading option '-protocol_whitelist' ... matched as AVOption 'protocol_whitelist' with argument 'file,http,https,tcp,tls'.\nReading option '-i' ... matched as input url with argument 'https://source-bucket.s3.amazonaws.com/1.mp4'.\nReading option '-ss' ... matched as option 'ss' (start transcoding at specified time) with argument '50'.\nReading option '-t' ... matched as option 't' (stop transcoding after specified duration) with argument '100'.\nReading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument '48'.\nReading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'.\nReading option '-avoid_negative_ts' ... matched as AVOption 'avoid_negative_ts' with argument '1'.\nReading option '-acodec' ... matched as option 'acodec' (alias for -c:a (select encoder/decoder for audio streams)) with argument 'copy'.\nReading option '/tmp/output.mp4' ... matched as output url.\nFinished splitting the commandline.\nParsing a group of options: global .\nApplying option loglevel (set logging level) with argument 48.\nApplying option y (overwrite output files) with argument
1.\nSuccessfully parsed a group of options.\nParsing a group of options: input url https://source-bucket.s3.amazonaws.com/1.mp4.\nSuccessfully parsed a group of options.\nOpening an input file: https://source-bucket.s3.amazonaws.com/1.mp4.\n[AVFormatContext @ 0x70ea0c0] Opening 'https://source-bucket.s3.amazonaws.com/1.mp4' for reading\n"


    


    So, its not going beyond this : 'Opening 'https://source-bucket.s3.amazonaws.com/1.mp4' ; for reading\n'

    


    And after this, it immediately gets out. Need suggestions, where its going wrong. Same command working fine on local computer.

    


    I tried cloudfront and signed url as well, as mentioned in this post : How to read remote video on Amazon S3 using ffmpeg. But it doesnt work with url. Only working when downloaded into tmp folder.

    


    Following is the final log, which you can see is no timeout. It actually finish function execution within 2-3 seconds. I have timeout set for 15 mins to the function which is maximum :
enter image description here

    


    REPORT RequestId: 4acd7b38-017c-4dce-bb65-8f6fd3cf37e0  Duration: 1297.93 ms    Billed Duration: 1298 ms    Memory Size: 1024 MB    Max Memory Used: 103 MB Init Duration: 328.76 ms    


    


  • ffmpeg No such filter : 'palettegen' in linux

    29 juillet 2016, par royise

    1.

    my system
    uname -a
    Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux

    2.ffmpeg is download from
    http://johnvansickle.com/ffmpeg/

    3.I had download the ffmpeg-release-64bit-static.tar.xz ,unpackage this file, and run : ./ffmpeg
    then ffmpeg has installed. I check it by using : ffmpeg -version
    no problems.

    I run those command in my system is no problem :

    cd /home/web/tomcat-6.0.29/zhouletest/ffmpeg-3.1.1-64bit-static

    ./ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -vf fps=10,scale=177:-1:flags=lanczos,palettegen /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png

    ./ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -i /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png -filter_complex "fps=10,scale=177:-1:flags=lanczos[x];[x][1:v]paletteuse" /home/web/tomcat-6.0.29/zhouletest/gif_images/6.gif

    but when I invoke this command in java, errors happend, why ?

    String cmd1 = "/home/web/tomcat-6.0.29/zhouletest/ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -vf fps=10,scale=177:-1:flags=lanczos,palettegen /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png";
    String cmd2 = "/home/web/tomcat-6.0.29/zhouletest/ffmpeg-3.1.1-64bit-static/ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -i /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png -filter_complex \"fps=10,scale=177:-1:flags=lanczos[x];[x][1:v]paletteuse\" /home/web/tomcat-6.0.29/zhouletest/gif_images/6.gif";

    String result1 = executeCommand(cmd1);
    String result2 = executeCommand(cmd2);

    private static String executeCommand(String command) {
       StringBuffer output = new StringBuffer();
       Process p;
       try {
           p = Runtime.getRuntime().exec(command);
           p.waitFor();
           BufferedReader reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));

           String line = "";
           while ((line = reader.readLine())!= null) {
               output.append(line + "\n");
           }

       } catch (Exception e) {
           e.printStackTrace();
       }
       return output.toString();
    }

    errors :

    result1 :
    result2:ffmpeg version 3.1.1-static
    http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg
    developers
    built with gcc 5.4.0 (Debian 5.4.0-4) 20160609
    configuration : —enable-gpl —enable-version3 —enable-static
    —disable-debug —enable-libmp3lame —enable-libx264 —enable-libx265 —enable-libwebp —enable-libspeex —enable-libvorbis —enable-libvpx —enable-libfreetype —enable-fontconfig —enable-libxvid —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libtheora —enable-libvo-amrwbenc —enable-gray —enable-libopenjpeg —enable-libopus —enable-libass —enable-gnutls —enable-libvidstab —enable-libsoxr —enable-frei0r —enable-libfribidi —disable-indev=sndio —disable-outdev=sndio —enable-librtmp —enable-libmfx —enable-libzimg —cc=gcc
    libavutil 55. 28.100 / 55. 28.100
    libavcodec 57.
    48.101 / 57. 48.101
    libavformat 57. 41.100 / 57. 41.100
    libavdevice 57. 0.101 / 57. 0.101
    libavfilter
    6. 47.100 / 6. 47.100
    libswscale 4. 1.100 / 4. 1.100
    libswresample 2. 1.100 / 2. 1.100
    libpostproc
    54. 0.100 / 54. 0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ’/home/web/tomcat-6.0.29/zhouletest/videos/6.mp4’ :
    Metadata :

    major_brand : isom
    minor_version : 512
    compatible_brands : isomiso2avc1mp41
    encoder : Lavf56.40.101
    Duration : 00:04:36.64, start : -3.338000, bitrate : 1089 kb/s
    Stream #0:0(und) : Video : h264 (Main) (avc1 / 0x31637661), yuv420p, 480x360, 997 kb/s, 15 fps, 15 tbr, 16k tbn, 30 tbc (default)
    Metadata :
    handler_name : VideoHandler
    Stream #0:1(und) : Audio : aac (Main) (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 88 kb/s (default)
    Metadata :
    handler_name : SoundHandler
    Input #1, png_pipe, from ’/home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png’ :

    Duration : N/A, bitrate : N/A
    Stream #1:0 : Video : png, rgba(pc), 16x16 [SAR 1:1 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
    [AVFilterGraph @ 0x45c5260] No such filter :
    ’"fps’
    Error initializing complex filters.
    Invalid
    argument

  • ffmpeg No such filter : 'palettegen' in linux

    19 octobre 2020, par royise

    1.

    



    my system 
uname -a
Linux localhost.localdomain 2.6.32-220.el6.x86_64 #1 SMP Tue Dec 6 19:48:22 GMT 2011 x86_64 x86_64 x86_64 GNU/Linux


    



    2.ffmpeg is download from
http://johnvansickle.com/ffmpeg/

    



    3.I had download the ffmpeg-release-64bit-static.tar.xz ,unpackage this file, and run : ./ffmpeg
then ffmpeg has installed. I check it by using : ffmpeg -version
    
no problems.

    



    I run those command in my system is no problem :

    



    cd /home/web/tomcat-6.0.29/zhouletest/ffmpeg-3.1.1-64bit-static 

./ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -vf fps=10,scale=177:-1:flags=lanczos,palettegen /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png 

./ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -i /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png -filter_complex "fps=10,scale=177:-1:flags=lanczos[x];[x][1:v]paletteuse" /home/web/tomcat-6.0.29/zhouletest/gif_images/6.gif


    



    but when I invoke this command in java, errors happend, why ?

    



    String cmd1 = "/home/web/tomcat-6.0.29/zhouletest/ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -vf fps=10,scale=177:-1:flags=lanczos,palettegen /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png";
String cmd2 = "/home/web/tomcat-6.0.29/zhouletest/ffmpeg-3.1.1-64bit-static/ffmpeg -y -ss 10 -t 3 -i /home/web/tomcat-6.0.29/zhouletest/videos/6.mp4 -i /home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png -filter_complex \"fps=10,scale=177:-1:flags=lanczos[x];[x][1:v]paletteuse\" /home/web/tomcat-6.0.29/zhouletest/gif_images/6.gif";

String result1 = executeCommand(cmd1);
String result2 = executeCommand(cmd2);

private static String executeCommand(String command) {
    StringBuffer output = new StringBuffer();
    Process p;
    try {
        p = Runtime.getRuntime().exec(command);
        p.waitFor();
        BufferedReader reader = new BufferedReader(new InputStreamReader(p.getErrorStream()));

        String line = "";
        while ((line = reader.readLine())!= null) {
            output.append(line + "\n");
        }

    } catch (Exception e) {
        e.printStackTrace();
    }
    return output.toString();
}


    



    errors :

    



    


    result1 :
    result2:ffmpeg version 3.1.1-static
 http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2016 the FFmpeg
 developers
    built with gcc 5.4.0 (Debian 5.4.0-4) 20160609
    
 configuration : —enable-gpl —enable-version3 —enable-static
 —disable-debug —enable-libmp3lame —enable-libx264 —enable-libx265 —enable-libwebp —enable-libspeex —enable-libvorbis —enable-libvpx —enable-libfreetype —enable-fontconfig —enable-libxvid —enable-libopencore-amrnb —enable-libopencore-amrwb —enable-libtheora —enable-libvo-amrwbenc —enable-gray —enable-libopenjpeg —enable-libopus —enable-libass —enable-gnutls —enable-libvidstab —enable-libsoxr —enable-frei0r —enable-libfribidi —disable-indev=sndio —disable-outdev=sndio —enable-librtmp —enable-libmfx —enable-libzimg —cc=gcc
    libavutil 55. 28.100 / 55. 28.100
    libavcodec 57.
 48.101 / 57. 48.101
    libavformat 57. 41.100 / 57. 41.100
    libavdevice 57. 0.101 / 57. 0.101
    libavfilter
    
 6. 47.100 / 6. 47.100
    libswscale 4. 1.100 / 4. 1.100
    libswresample 2. 1.100 / 2. 1.100
    libpostproc
    
 54. 0.100 / 54. 0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/web/tomcat-6.0.29/zhouletest/videos/6.mp4' :
    Metadata :

    
 major_brand : isom
    
 minor_version : 512
    
 compatible_brands : isomiso2avc1mp41
    
 encoder : Lavf56.40.101
    Duration : 00:04:36.64, start : -3.338000, bitrate : 1089 kb/s
    
 Stream #0:0(und) : Video : h264 (Main) (avc1 / 0x31637661), yuv420p, 480x360, 997 kb/s, 15 fps, 15 tbr, 16k tbn, 30 tbc (default)
    
 Metadata :
    
 handler_name : VideoHandler
    
 Stream #0:1(und) : Audio : aac (Main) (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 88 kb/s (default)
    
 Metadata :
    
 handler_name : SoundHandler
    Input #1, png_pipe, from '/home/web/tomcat-6.0.29/zhouletest/gif_images/palettegens/6.png' :

    Duration : N/A, bitrate : N/A
    
 Stream #1:0 : Video : png, rgba(pc), 16x16 [SAR 1:1 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
    [AVFilterGraph @ 0x45c5260] No such filter :
 '"fps'
    Error initializing complex filters.
    Invalid
 argument