Recherche avancée

Médias (17)

Mot : - Tags -/wired

Autres articles (111)

  • Script d’installation automatique de MediaSPIP

    25 avril 2011, par

    Afin de palier aux difficultés d’installation dues principalement aux dépendances logicielles coté serveur, un script d’installation "tout en un" en bash a été créé afin de faciliter cette étape sur un serveur doté d’une distribution Linux compatible.
    Vous devez bénéficier d’un accès SSH à votre serveur et d’un compte "root" afin de l’utiliser, ce qui permettra d’installer les dépendances. Contactez votre hébergeur si vous ne disposez pas de cela.
    La documentation de l’utilisation du script d’installation (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Que fait exactement ce script ?

    18 janvier 2011, par

    Ce script est écrit en bash. Il est donc facilement utilisable sur n’importe quel serveur.
    Il n’est compatible qu’avec une liste de distributions précises (voir Liste des distributions compatibles).
    Installation de dépendances de MediaSPIP
    Son rôle principal est d’installer l’ensemble des dépendances logicielles nécessaires coté serveur à savoir :
    Les outils de base pour pouvoir installer le reste des dépendances Les outils de développements : build-essential (via APT depuis les dépôts officiels) ; (...)

Sur d’autres sites (10483)

  • Send Canvas to Images and Combine with FFmpeg

    19 décembre 2016, par user3783155

    I am making a web app that is a simple video editor. It has a file input, which loads media into <video></video> or <img style='max-width: 300px; max-height: 300px' /> elements, which are drawn onto a canvas with correct timing. The problem I am having is with exporting it to an .mp4. I save each frame into a .png file with AJAX and PHP. When all frames are saved, I call FFmpeg to merge them into a video. To prevent lag, on export, I set each video’s playbackRate to 0.01 and make the frame loop 0.01 times slower.
    If I set the clip’s duration to 30 seconds (which can be done in my app), it exports 30 seconds of video footage, but the exported video is faster than the original video. In other words, the exported video fits more in that 30 seconds.
    I want to know what I did wrong, or another approach to make it have the intended frame rate.

    Javascript (frame loop)

    var playLoop = setInterval(function() {
       if (paused) clearInterval(playLoop);

       playFrame(exp);  // <video>   exp --> exported (boolean)
       drawFrame(exp);  // <canvas>
       var addend = pps/(1000/frameRate);
       $(marker).css("left", "+="+addend);
       var left = $(marker).css("left");
       var value = left.substring(0, left.length-2);
       position = parseInt(value)/pps;
       if (stopButton.disabled) stopButton.disabled = false;
    }, exp ? frameRate/0.01 : frameRate);
    </canvas></video>

    Javascript drawFrame()

    ...
    // for export
    if (exp) {
    var dataURL = screen.toDataURL("image/png");

    $.ajax({
       type: "POST",
       url: "server/save.php",
       data: {
           frameNumber: frameNumber,
           imageBase64: dataURL
       },
       success: function(resp) {
           $("#exportstatusfilename").html(resp);
           console.log(resp);
       }
    });

    frameNumber++;

    if (position > maxDuration) {
       stopMovie();
       forEachMedia(function(media) {
           if (media.tagName === "VIDEO") {
               media.muted = false;
               media.playbackRate = 1;
           }
       });
       $.ajax({
           type: "POST",
           url: "server/produce.php",
           data: {
               fps: Math.round(1000/frameRate),
               width: screen.width,
               height: screen.height
           },
           success: function(resp) {
               alert("Video exported successfully");
               console.log(resp);

               // donwload file to client
               window.location.replace("server/download.php");

               // delete frames
               $.ajax({
                   type: "POST",
                   url: "server/clear.php"
               });
           }
       });
    }

    }

    PHP produce.php

    &lt;?php

    $fps = $_POST['fps'];
    $width = $_POST['width'];
    $height = $_POST['height'];

    $cmd = "..\\ffmpeg\\bin\\ffmpeg.exe -r $fps -f image2 -s {$width}x{$height} -i ..\\media\\movie0\\canvas_frame%d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p ..\\media\\movie0.mp4";
    $proc = popen($cmd, 'r');

    ...

    ?>
  • ffmpeg - how to build paths on windows

    7 décembre 2016, par Thomas

    I am building a command line for ffmpeg and I am going crazy. It seems like the tool has an abnormal path system and I can’t find any reliable documentation.

    Using Windows, I have a movie file at : "d :\test\movie.mp4"
    if we take the following command :

    fmpeg -i <myfile> -vf "select=gt(scene\,0.5), scale=640:360" -vsync vfr thumbnails%03d.png
    </myfile>

    I tried to build the the following ways :

    d:\test\movie.mp4
    d:\\test\movie.mp4
    d\\:\\test\movie.mp4
    d:\\:/test/movie.mp4

    It seems like only the 4th one work when called from a C# program, but doesn’t work in command line.

    Is there any documentation that explains this properly ? from what I gather, the drive letter has to be followed by double slashed then the column and I can’t figure out the reason.

  • FFMPEG : Adding font to Video gives error

    7 juin 2016, par janki gadhiya

    I am trying to execute ffmpeg on android. I have successfully executed 2-3 commands also. But i am stuck at one point where i am adding text to the video.

    Here is the command i am executing.

    NOT WORKING : because the text argument has a space between two words.

    "-i "+path+"out.mp4 -vf drawtext=fontfile="+path+"f1.ttf:text='Stack OverFlow' -y -c:v libx264 -c:a copy -movflags +faststart "+path+"output.mp4"

    WORKING : just removed space.

    "-i "+path+"out.mp4 -vf drawtext=fontfile="+path+"f1.ttf:text='StackOverFlow' -y -c:v libx264 -c:a copy -movflags +faststart "+path+"output.mp4"

    Here path contains my external Sd card’s path. out.mp4 and f1.ttf exists in my folder.

    My Question is why it is not working with space.

    Here is the stack trace i am getting.

    FAILED with output : WARNING: linker: /data/data/com.github.hiteshsondhi88.sampleffmpeg/files/ffmpeg has text relocations. This is wasting memory and prevents security hardening. Please fix.
    ffmpeg version n3.0.1 Copyright (c) 2000-2016 the FFmpeg developers
    built with gcc 4.8 (GCC)
    configuration: --target-os=linux --cross-prefix=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/bin/i686-linux-android- --arch=x86 --cpu=i686 --enable-runtime-cpudetect --sysroot=/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/sysroot --enable-pic --enable-libx264 --enable-libass --enable-libfreetype --enable-libfribidi --enable-libmp3lame --enable-fontconfig --enable-pthreads --disable-debug --disable-ffserver --enable-version3 --enable-hardcoded-tables --disable-ffplay --disable-ffprobe --enable-gpl --enable-yasm --disable-doc --disable-shared --enable-static --pkg-config=/home/vagrant/SourceCode/ffmpeg-android/ffmpeg-pkg-config --prefix=/home/vagrant/SourceCode/ffmpeg-android/build/x86 --extra-cflags='-I/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fstack-protector-all -march=i686' --extra-ldflags='-L/home/vagrant/SourceCode/ffmpeg-android/toolchain-android/lib -Wl,-z,relro -Wl,-z,now -pie' --extra-libs='-lpng -lexpat -lm' --extra-cxxflags=
    libavutil      55. 17.103 / 55. 17.103
    libavcodec     57. 24.102 / 57. 24.102
    libavformat    57. 25.100 / 57. 25.100
    libavdevice    57.  0.101 / 57.  0.101
    libavfilter     6. 31.100 /  6. 31.100
    libswscale      4.  0.100 /  4.  0.100
    libswresample   2.  0.101 /  2.  0.101
    libpostproc    54.  0.100 / 54.  0.100
    Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/storage/emulated/0/Testing/out.mp4':
    Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf57.25.100
    Duration: 00:00:05.00, start: 0.000000, bitrate: 117 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 300x300 [SAR 40:33 DAR 40:33], 113 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
    handler_name    : VideoHandler
    [NULL @ 0xb585f000] Unable to find a suitable output format for 'text='Stack'
    text='Stack: Invalid argument

    Why it is saying invalid argument. It will be great if any ffmpeg expert can guide me in what i am doing wrong here.

    I have refered this Question of SO : Text on video ffmpeg