Recherche avancée

Médias (1)

Mot : - Tags -/biomaping

Autres articles (97)

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

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

Sur d’autres sites (10412)

  • Transcoding from VP8 to H264 is not working using fluent-ffmpeg library using node.js

    3 septembre 2019, par Mihir Patel

    I have tried transcoding stream from VP8 to H264 using command line it’s working fine but when I tried the same thing using fluent-ffmpeg it is not working as expected.

    Version information

    fluent-ffmpeg version : "2.1.2"

    ffmpeg version : "3.4.4-1 16.04.york0"

    OS : "Ubuntu"

    Trasncoding from VP8 to H264 is working using command

    ffmpeg -analyzeduration 300M -probesize 300M -protocol_whitelist file,udp,rtp -i portal-vp8.sdp -c:v libx264 -profile:v high -level:v 3.2 -pix_fmt yuv420p -x264-params keyint=25:scenecut=0 -r 25 -c:a aac -ar 16k -ac 1 -preset ultrafast -tune zerolatency -f flv rtmp://my-server-ip/myapp/testvp8

    My sdp is

    v=0
    o=- 0 0 IN IP4 127.0.0.1
    s=No Name
    c=IN IP4 127.0.0.1
    t=0 0
    a=tool:libavformat 55.2.100
    m=audio 5396 TCP 111
    a=rtpmap:111 opus/48000
    m=video 5398 RTP/AVP 100
    a=rtpmap:100 VP8/90000
    a=fmtp:100 packetization-mode=1

    Trasncoding from VP8 to H264 is not working using library

    var sdpString = "v=0\r\no=- 0 0 IN IP4 127.0.0.1\r\ns=No Name\r\nc=IN IP4 127.0.0.1\r\nt=0 0\r\na=tool:libavformat 55.2.100\r\nm=audio 5120 TCP 111\r\na=rtpmap:111 opus/48000\r\nm=video 5122 RTP/AVP 100\r\na=rtpmap:100 VP8/90000";

    let sdp = stringToStream(sdpString);
    var inputOptions = [];
       inputOptions.push('-analyzeduration');
       inputOptions.push('300M');
       inputOptions.push('-probesize');
       inputOptions.push('300M');
       inputOptions.push('-protocol_whitelist');
       inputOptions.push('file,udp,rtp,pipe');

    var outputOptions = [];
       outputOptions.push('-c:v');
       outputOptions.push('libx264');

       outputOptions.push('-profile:v');
       outputOptions.push('high');

       outputOptions.push('-level:v');
       outputOptions.push('3.2');

       outputOptions.push('-pix_fmt');
       outputOptions.push('yuv420p');

       outputOptions.push('-x264-params');
       outputOptions.push('keyint=25:scenecut=0');

       outputOptions.push('-r');
       outputOptions.push('25');

       outputOptions.push('-c:a');
       outputOptions.push('aac');

       outputOptions.push('-ar');
       outputOptions.push('16k');

       outputOptions.push('-ac');
       outputOptions.push('1');

       outputOptions.push('-preset');
       outputOptions.push('ultrafast');

       outputOptions.push('-tune');
       outputOptions.push('zerolatency');

       outputOptions.push('-f');
       outputOptions.push('flv');

    var outputUrl = "rtmp://my-server-ip/myapp/testvp8";

    var command = FfmpegCommand(sdp).inputOptions(inputOptions).outputOptions(outputOptions).output(outputUrl)
           .on('start', function (commandLine) {
               console.log('Spawned Ffmpeg with command: ' + commandLine);
           })
           .on('stderr', function(stderrLine) {
               console.log('FFMPEG Stderr output: ' + stderrLine);
           });

       command.run();
    });

    Produced command using library

    ffmpeg -analyzeduration 300M -probesize 300M -protocol_whitelist file,udp,rtp,pipe -i pipe:0 -c:v libx264 -profile:v high -level:v 3.2 -pix_fmt yuv420p -x264-params keyint=25:scenecut=0 -r 25 -c:a aac -ar 16k -ac 1 -preset ultrafast -tune zerolatency -f flv rtmp://my-server-ip/myapp/testvp8

    FFmpeg logs

    FFMPEG Stderr output: ffmpeg version 3.4.4-1~16.04.york0 Copyright (c) 2000-2018 the FFmpeg developers
    FFMPEG Stderr output:   built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
    FFMPEG Stderr output:   configuration: --prefix=/usr --extra-version='1~16.04.york0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
    FFMPEG Stderr output:   libavutil      55. 78.100 / 55. 78.100
    FFMPEG Stderr output:   libavcodec     57.107.100 / 57.107.100
    FFMPEG Stderr output:   libavformat    57. 83.100 / 57. 83.100
    FFMPEG Stderr output:   libavdevice    57. 10.100 / 57. 10.100
    FFMPEG Stderr output:   libavfilter     6.107.100 /  6.107.100
    FFMPEG Stderr output:   libavresample   3.  7.  0 /  3.  7.  0
    FFMPEG Stderr output:   libswscale      4.  8.100 /  4.  8.100
    FFMPEG Stderr output:   libswresample   2.  9.100 /  2.  9.100
    FFMPEG Stderr output:   libpostproc    54.  7.100 / 54.  7.100
    FFMPEG Stderr output: [sdp @ 0x55c28151c180] max delay reached. need to consume packet
    FFMPEG Stderr output: [sdp @ 0x55c28151c180] RTP: missed 1 packets

    Observed results

    I have observed that inputted VP8 stream is not transcoded to H264 using FFmpeg library

    Expected results

    Inputted VP8 stream should be transcoded to H264 using the library.

    Please help so how can I resolve the issue.

  • How to insert bullet screen comments into a video by using ffmpeg ?

    7 septembre 2019, par Saeron Meng

    I would like to add some real-time comments in my video but I do not know how to use ffmpeg to realize this. The comments are like screen bullets through the screen, scrolling from right to left.

    My thought is to count the length of the comments and define speeds for them to move. Don’t worry about the source of the comments, I have already gotten them saved as an xml file. Also, I can transfer it into srt. For instance :

    <chat timestamp="671.195">
       <ems utctime="1562584080" sender="Bill">
           <richtext></richtext>
       </ems>
    </chat>
    <chat timestamp="677.798">
       <ems utctime="1562584086" sender="Jack">
           <richtext></richtext>
       </ems>
    </chat>

    The final result is like this (I did not find an example displayed in English), these fancy characters can move horizontally :

    example

    I have searched some solutions on the Internet, most of which talk about how to write ass/srt files and add motionless subtitles. Like this :

    3
    00:00:39,770 --> 00:00:41,880
    When I was lying there in the VA hospital ...

    4
    00:00:42,550 --> 00:00:44,690
    ... with a big hole blown through the middle of my life,

    5
    00:00:45,590 --> 00:00:48,120
    ... I started having these dreams of flying.

    ffmpeg -i infile.mp4 -i infile.srt -c copy -c:s mov_text outfile.mp4

    But I need another kind of "subtitles" which can move.

    So my question is, how to modify the ffmpeg command and the template of srt file so as to arrange the subtitles from the top to the bottom and let them move from right to left ?

  • Moving .wav files from S3 to /tmp folder in AWS Lambda

    1er août 2019, par sleepyrobot

    I am currently trying to overlay two .wav files from S3 in AWS Lambda using FFMPEG. I am using node.js to do this. Here’s my process :

    1. Retrieve the files from S3, and save it to the Lambda /tmp folder
    2. Merge the two audio files, and save the output to the /tmp folder
    3. Upload the output from /tmp folder to S3.

    However, I am encountering errors on the first part, since the .wav files being downloaded are corrupted and distorted.

    I have tried using streams for this. However, I am still grasping its concept. I would appreciate any help. For my first try, I tried to retrieve an object from S3 and reupload the same

    I have tried using function for getting the audio file from S3 :

    async function readIn(bucketName, inputFilename, transfer, local) {
       console.log('reading in locally?', local);
       console.log(`reading from ${inputFilename} to ${transfer}`);

    // inputFilename is the key name (object name)
    // transfer is the filepath to where the obj will be transferred to (example: /tmp/audio1.wav)

       const writeStream = fs.createWriteStream(transfer);
       var file;

       local? await new Promise((resolve, revoke) => {
           file = fs.createReadStream(inputFilename);
           writeStream.on('finish', () => {
               console.log('file finished reading');
               resolve();
           });
           writeStream.on('error', (err) => {
               console.log('things messed up');
               revoke();
           });
           file.pipe(writeStream);
       }) : await new Promise((resolve, revoke) => {
           writeStream.on('finish', () => {
               console.log('file finished reading');
               resolve();
           });
           writeStream.on('error', (err) => {
               console.log('things messed up');
               revoke();
           });
           s3.getObject({
               Bucket : bucketName,
               Key    : inputFilename
           }, function(err, data) {
               if (err) {
                   console.log(err, err.stack);
               } else {
                   console.log('data got!');
               }
           }).createReadStream().pipe(writeStream);
       });
       console.log('returning to main from reading');
       return;
    }

    For uploading the file to S3 :

    async function writeOut(bucketName, outFile, transfer, contentType) {

           console.log('uploading', bucketName, outFile, transfer);
           return s3.upload({
               Bucket: bucketName,
               Key: outFile,
               Body: fs.createReadStream(transfer),
               //ACL: 'private',
               ContentType: contentType
           }).promise();
    }

    For merging the files (I haven’t tried this yet) :

    async function mergeFile(transfer1, transfer2, output) {
       await new Promise((resolve, revoke) => {
           console.log('beginning merge');
           var outStream = fs.createWriteStream('/tmp/output.wav');

           childProcess.exec('cp /var/task/ffmpeg /tmp/.; chmod 755 /tmp/ffmpeg;',
           function (error, stdout, stderr) {
               if (error) {
                   console.log('[ERROR]: An error occured in altering FFMPEG permission: ', error);
               } else {
                  console.log("[SUCCESS]: Successfully altered FFMPEG permission!");
                  // merge audio files
                   ffmpeg('/tmp/audio1.wav')
                   .input('/tmp/audio2.wav')
                   .on('error', function(err) {
                   console.log('An error occurred with merging: ' + err.message);
                   })
                   .complexFilter(
                   {
                   filter: 'amix',
                   inputs: ['0:a','1:a']
                   })
                   .on('end', function() {
                   console.log('Merging finished!');
                   })
                   .pipe(outStream, { end: true });
                   //.save('/tmp/output.wav');
                   //////  
               }
           })
       });}

    However, the resulting file is corrupted. Is there any error in the functions ? Please help. Thanks !