Recherche avancée

Médias (91)

Autres articles (46)

  • Les autorisations surchargées par les plugins

    27 avril 2010, par

    Mediaspip core
    autoriser_auteur_modifier() afin que les visiteurs soient capables de modifier leurs informations sur la page d’auteurs

  • 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 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

Sur d’autres sites (11822)

  • Issues in executing FFmpeg command in Java code in Linux

    12 août 2017, par Tina J

    I have problems executing this ffmpeg command in my java code :

    ffmpeg -i sample.mp4 -i ad.mp4 -filter_complex "[0:v]trim=0:15,setpts=PTS-STARTPTS[v0]; [1:v]trim=0:5,setpts=PTS-STARTPTS[v1]; [0:v]trim=20:30,setpts=PTS-STARTPTS[v2]; [v0][v1][v2]concat=n=3:v=1:a=0[out]" -map "[out]" output.mp4

    I used the getRuntime() method below, but that doesn’t work for me. Even if I simply remove the ", still it doesn’t work. When I simply copy-paste the equivalent string in terminal, it works.

    String c1=" -i "+dir+"sample.mp4 "+"-i "+dir+"ad.mp4 -fi‌​lter_complex [0:v]‌​trim=0:15,setpts=PTS‌​-STARTPTS[v0]; [1:v]trim=0:5,setpts=PTS-STARTPTS[v1]; [0:v]trim=20:30,setpts=PTS-STARTPTS[v2]; [v0][v1][v2]concat=n=3:v=1:a=0[out] -map [out] "+dir+"output.‌​mp4";
    RunCommand("ffmpeg"+c1);

    Using this method :

    private static void RunCommand(String command) throws InterruptedException {
       try {
           // Execute command
           Process proc = Runtime.getRuntime().exec(command);
           System.out.println(proc.exitValue());

           // Get output stream to write from it
           // Read the output

           BufferedReader reader =  
                   new BufferedReader(new InputStreamReader(proc.getInputStream()));
           String line = "";
           while((line = reader.readLine()) != null) {
               System.out.print(line + "\n");
               //              System.out.println(ads.get(0));
           }
           proc.waitFor();  

       } catch (IOException e) {
       }
    }

    This one doesn’t work also, and printing the exit value shows this :

    Exception in thread "main" java.lang.IllegalThreadStateException: process hasn't exited
       at java.lang.UNIXProcess.exitValue(UNIXProcess.java:423)
       at parser.Parser.RunCommand(Parser.java:106)
       at parser.Parser.commandGenerator2(Parser.java:79)
       at parser.Parser.main(Parser.java:44)

    If I move the proc.waitFor(); before printing the exit value, it is 1.

    What is the problem ? Why it doesn’t run in Java code ?

  • FFmpeg.js Extract images (jpeg/png) from MP4 file

    5 août 2017, par Anuragh27crony

    I’m trying to extract images/frames from a mp4 on client side with the help of ffmpeg.js.

    Equivalent Ffmpeg command :

    ffmpeg -i Sample.mp4 -r 1 output%d.png

    However i could try to create webm file from jpeg files but i couldn’t do the reverse and ends up with following error message

    Unable to find a suitable output format for ’output%d.png’

    Here is the code i’m trying to use.

    var ffmpeg = require("ffmpeg.js/ffmpeg-mp4");
    var fs = require("fs");
    var stdout = "";
    var stderr = "";

    var testData = new Uint8Array(fs.readFileSync("Sample.mp4"));

    var result = ffmpeg({
     MEMFS: [{name: "Sample.mp4", data: testData}],
     stdin: function() {},
     arguments: ["-i", "Sample.mp4","-r","1", "output%d.png"],
    });

    console.log(result.MEMFS.length)
    if(result.MEMFS.length>0){
       var out = result.MEMFS[0].data;
       fs.writeFileSync("test.jpg", Buffer(out.data));
       }

    Console Output

    ffmpeg version n3.1.2 Copyright (c) 2000-2016 the FFmpeg developers
     built with emcc (Emscripten gcc/clang-like replacement) 1.36.7 ()
     configuration: --cc=emcc --enable-cross-compile --target-os=none --arch=x86 --disable-runtime-cpudetect --disable-asm --disable-fast-unaligned --disable-pthreads --disable-w32threads --di
    sable-os2threads --disable-debug --disable-stripping --disable-all --enable-ffmpeg --enable-avcodec --enable-avformat --enable-avutil --enable-swresample --enable-swscale --enable-avfilter
    --disable-network --disable-d3d11va --disable-dxva2 --disable-vaapi --disable-vda --disable-vdpau --enable-decoder=vp8 --enable-decoder=vp9 --enable-decoder=theora --enable-decoder=mpeg2vid
    eo --enable-decoder=mpeg4 --enable-decoder=h264 --enable-decoder=hevc --enable-decoder=png --enable-decoder=mjpeg --enable-decoder=vorbis --enable-decoder=opus --enable-decoder=mp3 --enable
    -decoder=ac3 --enable-decoder=aac --enable-decoder=ass --enable-decoder=ssa --enable-decoder=srt --enable-decoder=webvtt --enable-demuxer=matroska --enable-demuxer=ogg --enable-demuxer=avi
    --enable-demuxer=mov --enable-demuxer=flv --enable-demuxer=mpegps --enable-demuxer=image2 --enable-demuxer=mp3 --enable-demuxer=concat --enable-protocol=file --enable-filter=aresample --ena
    ble-filter=scale --enable-filter=crop --enable-filter=overlay --disable-bzlib --disable-iconv --disable-libxcb --disable-lzma --disable-sdl --disable-securetransport --disable-xlib --disabl
    e-zlib --enable-encoder=libx264 --enable-encoder=libmp3lame --enable-encoder=aac --enable-muxer=mp4 --enable-muxer=mp3 --enable-muxer=null --enable-gpl --enable-libmp3lame --enable-libx264
    --extra-cflags=-I../lame/dist/include --extra-ldflags=-L../lame/dist/lib
     libavutil      55. 28.100 / 55. 28.100
     libavcodec     57. 48.101 / 57. 48.101
     libavformat    57. 41.100 / 57. 41.100
     libavfilter     6. 47.100 /  6. 47.100
     libswscale      4.  1.100 /  4.  1.100
     libswresample   2.  1.100 /  2.  1.100
    [h264 @ 0x809d50] Warning: not compiled with thread support, using thread emulation
    [aac @ 0x80e640] Warning: not compiled with thread support, using thread emulation
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Sample.mp4':
     Metadata:
       major_brand     : isom
       minor_version   : 512
       compatible_brands: isomiso2avc1mp41
       encoder         : Lavf57.56.100
     Duration: 00:01:00.00, start: 0.000000, bitrate: 137 kb/s
       Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 360x214, 113 kb/s, 1 fps, 1 tbr, 16384 tbn, 32768 tbc (default)
       Metadata:
         handler_name    : VideoHandler
       Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, mono, fltp, 23 kb/s (default)
       Metadata:
         handler_name    : SoundHandler
    [NULL @ 0x810d00] Unable to find a suitable output format for 'output%d.png'
    output%d.png: Invalid argument
  • Error using ffmpeg eq filter [duplicate]

    29 juin 2017, par user3216525

    This question already has an answer here :

    When trying to enhance a video using the following command :

    ffmpeg —i input.mp4 -vf eq=contrast=1.04:brightness=0.0:saturation=1.3:gamma=1.25 output.mp4

    I get the following error message :

    [NULL @ 0x7fe4d900ac00] Unable to find a suitable output format for '—i'
    —i: Invalid argument

    The equivalent ffplay command does work :

    ffplay input.mp4  -vf eq=contrast=1.04:brightness=0.0:saturation=1.3:gamma=1.25

    Any ideas ?

    Thanks in advance !