Recherche avancée

Médias (1)

Mot : - Tags -/publishing

Autres articles (60)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • L’utiliser, en parler, le critiquer

    10 avril 2011

    La première attitude à adopter est d’en parler, soit directement avec les personnes impliquées dans son développement, soit autour de vous pour convaincre de nouvelles personnes à l’utiliser.
    Plus la communauté sera nombreuse et plus les évolutions seront rapides ...
    Une liste de discussion est disponible pour tout échange entre utilisateurs.

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (8231)

  • When I use Fluent-Ffmpeg to access Ffmpeg, there are two different threads but I dont want it

    25 mars 2019, par Ahmet Hakan Billur

    I try to broadcast with rtsp live stream from IP camera on web app that is improved with node.js-jsmpeg([a link]https://www.npmjs.com/package/fluent-ffmpeg !), web socket, html5(canvas).Everything ok that live streaming works but missing frame and high CPU usaged by streaming on web app and I try to reduce so I can intervene ffmpeg with fluent-ffmpeg but when I monitor CPU usaged I can see there 2 different threads following as and look at screenshot of CPU ;
    enter image description here

    ffmpeg -rtsp_trasport tcp -i rtsp ://10.6.0.225 -f mpeg1video - is worked by jsmpeg and canvas/html5
    index.html

       

       
       
       
       

       <div><canvas width="640" height="360"></canvas></div>
       div><canvas width="640" height="360"></canvas>  
       <code class="echappe-js">&lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/jsmpeg.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot; src='http://stackoverflow.com/feeds/tag/jsLib/ffmpegUtil.js'&gt;&lt;/script&gt;

    &lt;script type=&quot;text/javascript&quot;&gt;<br />
         var canvas = document.getElementById('videoCanvas');<br />
         var ws = new WebSocket(&quot;ws://10.6.0.206:9999&quot;)<br />
         var player = new jsmpeg(ws, {canvas:canvas, autoplay:true,audio:false,loop: true});<br />
       &lt;/script&gt;

    other one /usr/bin/ffmpeg -i rtsp ://10.6.0.225 -y out.ts is work by following piece of code in app.js

    Stream = require('node-rtsp-stream');
    stream = new Stream({
       name: 'name',
       streamUrl: 'rtsp://10.6.0.225',
       wsPort: 9999
    });

    var ffmpeg = require('fluent-ffmpeg');
    var proc = new ffmpeg();

    proc
    .addInput('rtsp://10.6.0.225')
    .on('start', function(ffmpegCommand) {
       /// log something maybe
       console.log('start-->'+ffmpegCommand)
    })
    .on('progress', function(data) {
       /// do stuff with progress data if you want
       console.log('progress-->'+data)
    })
    .on('end', function() {
       /// encoding is complete, so callback or move on at this point
       console.log('end-->')
    })
    .on('error', function(error) {
       /// error handling
       console.log('error-->'+error)

    })
    .output('out.ts')
    .run();

    and then I don’t want to get two different ffmpeg command threads in there.
    Does anyone have an idea ?
    Thanks in advice.

  • Command failed ffmpeg in Lambda function (Node js)

    14 février 2019, par Arun

    I am trying to convert a video file to an audio file inside the lambda function. But I keep getting FFmpeg command failed error. I put FFmpeg binary exe file inside the project directory. but still, I am getting the same error. I tried this ( Lambda not connecting to ffmpeg ) but my issue is not solving yet. Any helps ?? thanks,

    Here is my lambda function code

    process.env.PATH = process.env.PATH + ':/tmp/';
    process.env['FFMPEG_PATH'] = '/tmp/ffmpeg';
    const BIN_PATH = process.env['LAMBDA_TASK_ROOT'];
    process.env['PATH'] = process.env['PATH'] + ':' + BIN_PATH;

    const fs = require('fs');
    const AWS = require('aws-sdk');

    AWS.config.update({
       region : 'us-east-2'
    });
    const s3 = new AWS.S3({apiVersion: '2006-03-01'});


    exports.handler = (event, context, callback) => {
       require('child_process').exec(
           'cp /var/task/ffmpeg /tmp/.; chmod 755 /tmp/ffmpeg;',
           function (error, stdout, stderr) {
               if (error) {
                   console.log('Erro occured',error);
               } else {
                   var ffmpeg = require('ffmpeg');
                   var params = {
                       Bucket: "bucket_name",
                       Key: event.Records[0].s3.object.key
                   };
                   s3.getObject(params, function(err, data) {
                       if (err) {
                           console.log("Error", err);
                       }
                       fs.writeFile("/tmp/vid.mp4", data.Body, function (err) {
                           if (err) console.log(err.code, "-", err.message);
                           return callback(err);
                       }, function() {
                           try {
                               var stats = fs.statSync("/tmp/vid.mp4");
                               console.log("size of the file1 ", stats["size"]);
                               try {
                                   console.log("Yeah");
                                   var process = new ffmpeg('/tmp/vid.mp4');
                                   process.then(function (video) {
                                       // Callback mode
                                       console.log("video function ", video);
                                       video.fnExtractSoundToMP3('/tmp/video.mp3', function (error, file) {
                                           if (!error)
                                               console.log('Audio file: ' + file);
                                           else console.log('error video ', error);
                                       });
                                   }, function (err) {
                                       console.log('Error: ' + err);
                                   });
                               } catch (e) {
                                   console.log(e.code);
                                   console.log(e.msg);
                               }
                           } catch (e) {
                               console.log("file is not complete", e);
                           }
                       });
                       return callback(err);
                   });
               }
           }
       )
    }

    Error message

    { Error: Command failed: ffmpeg -i /tmp/vid.mp4 -vn -ar 44100 -ac 2 -ab 192 -f mp3 /tmp/video.mp3

       at ChildProcess.exithandler (child_process.js:275:12)
       at emitTwo (events.js:126:13)
       at ChildProcess.emit (events.js:214:7)
       at maybeClose (internal/child_process.js:925:16)
       at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
       killed: false,
           code: null,
       signal: 'SIGSEGV',
       cmd: 'ffmpeg -i /tmp/vid.mp4 -vn -ar 44100 -ac 2 -ab 192 -f mp3 /tmp/video.mp3' }
  • FFmpeg saving rtmp live stream cuts off after 3 minutes

    29 octobre 2022, par user1636922

    I was playing with ffmpeg and was able to save a live stream to a file. The command to do so is :

    &#xA;&#xA;

    ffmpeg -re -i "rtmp://<ip addr="addr">/livestream live=1" -f h264 test.flv&#xA;</ip>

    &#xA;&#xA;

    However, I have tested this twice, and both times ffmpeg stops after grabbing 3:28 worth of live video.

    &#xA;&#xA;

    The entire output is here :

    &#xA;&#xA;

    bash-4.2$ ffmpeg -re -i "rtmp://<ip addr="addr">/livestream live=1" -vcodec libx264 -f h264 test.flv&#xA;WARNING: gnome-keyring:: couldn&#x27;t connect to: /home/me/.cache/keyring-bpajcJ/pkcs11: No such file or directory&#xA;ffmpeg version 0.10.4 Copyright (c) 2000-2012 the FFmpeg developers&#xA;  built on Jul 20 2012 22:01:52 with gcc 4.7.0 20120507 (Red Hat 4.7.0-5)&#xA;  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib --mandir=/usr/share/man --arch=i686 --extra-cflags=&#x27;-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables&#x27; --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib --cpu=i686 --enable-runtime-cpudetect&#xA;  libavutil      51. 35.100 / 51. 35.100&#xA;  libavcodec     53. 61.100 / 53. 61.100&#xA;  libavformat    53. 32.100 / 53. 32.100&#xA;  libavdevice    53.  4.100 / 53.  4.100&#xA;  libavfilter     2. 61.100 /  2. 61.100&#xA;  libswscale      2.  1.100 /  2.  1.100&#xA;  libswresample   0.  6.100 /  0.  6.100&#xA;  libpostproc    52.  0.100 / 52.  0.100&#xA;WARNING: gnome-keyring:: couldn&#x27;t connect to: /home/me/.cache/keyring-bpajcJ/pkcs11: No such file or directory&#xA;Metadata:&#xA;  videocodecid          avc1&#xA;  width                 320.00&#xA;  height                240.00&#xA;  frameWidth            320.00&#xA;  frameHeight           240.00&#xA;  displayWidth          320.00&#xA;  displayHeight         240.00&#xA;  framerate             29.97&#xA;trackinfo:&#xA;  timescale             90000.00&#xA;  language              eng&#xA;sampledescription:&#xA;  sampletype            H264&#xA;  type                  video&#xA;  profile-level-id      42e00c&#xA;  sprop-parameter-sets  Z0LgDNoFB&#x2B;wEQAAC7sAAr8gh,aM4zyA==&#xA;  description           {H264CodecConfigInfo: profile: "Baseline", level: 1.2, frameSize: 320x240, displaySize: 320x240, PAR: 1:1, frameRate: 29.97}&#xA;rtpsessioninfo:&#xA;  name                  H264 Stream 1&#xA;  origin                - 1486490083 118668671 IN IP4 10.93.183.3&#xA;  timing                0 0&#xA;  protocolversion       0&#xA;attributes:&#xA;  range                 npt=now-&#xA;[flv @ 0x9578ee0] Estimating duration from bitrate, this may be inaccurate&#xA;Input #0, flv, from &#x27;rtmp://<ip addr="addr">/livestream live=1&#x27;:&#xA;  Duration: N/A, start: 0.000000, bitrate: N/A&#xA;    Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 14.99 tbr, 1k tbn, 59.94 tbc&#xA;[buffer @ 0x99ee900] w:320 h:240 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:&#xA;[libx264 @ 0x9584540] using SAR=1/1&#xA;[libx264 @ 0x9584540] using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2&#xA;[libx264 @ 0x9584540] profile High, level 1.2&#xA;Output #0, h264, to &#x27;test.flv&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf53.32.100&#xA;    Stream #0:0: Video: h264, yuv420p, 320x240 [SAR 1:1 DAR 4:3], q=-1--1, 90k tbn, 14.99 tbc&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (h264 -> libx264)&#xA;Press [q] to stop, [?] for help&#xA;RTMP_ReadPacket, failed to read RTMP packet body. len: 16582bitrate= 212.1kbits/s    &#xA;frame= 3111 fps= 15 q=-2.0 Lsize=    5385kB time=00:03:27.47 bitrate= 212.6kbits/s    &#xA;video:5385kB audio:0kB global headers:0kB muxing overhead 0.000000%&#xA;[libx264 @ 0x9584540] frame I:13    Avg QP:18.70  size: 31866&#xA;[libx264 @ 0x9584540] frame P:1908  Avg QP:22.29  size:  2392&#xA;[libx264 @ 0x9584540] frame B:1190  Avg QP:29.24  size:   451&#xA;[libx264 @ 0x9584540] consecutive B-frames: 39.5% 24.0% 13.0% 23.4%&#xA;[libx264 @ 0x9584540] mb I  I16..4:  0.2%  1.2% 98.6%&#xA;[libx264 @ 0x9584540] mb P  I16..4:  0.0%  0.0%  0.7%  P16..4: 22.0%  3.5%  2.6%  0.0%  0.0%    skip:71.2%&#xA;[libx264 @ 0x9584540] mb B  I16..4:  0.0%  0.0%  0.2%  B16..8: 15.6%  2.8%  1.1%  direct: 1.3%  skip:78.9%  L0:47.0% L1:42.2% BI:10.8%&#xA;[libx264 @ 0x9584540] 8x8 transform intra:2.2% inter:8.5%&#xA;[libx264 @ 0x9584540] coded y,uvDC,uvAC intra: 98.0% 94.9% 73.9% inter: 14.5% 16.0% 11.3%&#xA;[libx264 @ 0x9584540] i16 v,h,dc,p:  0% 50% 17% 33%&#xA;[libx264 @ 0x9584540] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 21% 11%  3% 13%  6% 21%  4% 14%&#xA;[libx264 @ 0x9584540] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 21% 14%  5% 11%  7% 14%  5% 12%&#xA;[libx264 @ 0x9584540] i8c dc,h,v,p: 65% 15% 10% 10%&#xA;[libx264 @ 0x9584540] Weighted P-Frames: Y:0.5% UV:0.1%&#xA;[libx264 @ 0x9584540] ref P L0: 80.8% 10.4%  7.6%  1.2%  0.0%&#xA;[libx264 @ 0x9584540] ref B L0: 94.9%  4.8%  0.2%&#xA;[libx264 @ 0x9584540] ref B L1: 96.4%  3.6%&#xA;[libx264 @ 0x9584540] kb/s:212.48&#xA;</ip></ip>

    &#xA;&#xA;

    Although I don't see any errors. It just looks like ffmpeg thought the stream had ended ? But that's not possible since it's a live stream.

    &#xA;