Recherche avancée

Médias (2)

Mot : - Tags -/doc2img

Autres articles (69)

  • Mise à jour de la version 0.1 vers 0.2

    24 juin 2013, par

    Explications des différents changements notables lors du passage de la version 0.1 de MediaSPIP à la version 0.3. Quelles sont les nouveautés
    Au niveau des dépendances logicielles Utilisation des dernières versions de FFMpeg (>= v1.2.1) ; Installation des dépendances pour Smush ; Installation de MediaInfo et FFprobe pour la récupération des métadonnées ; On n’utilise plus ffmpeg2theora ; On n’installe plus flvtool2 au profit de flvtool++ ; On n’installe plus ffmpeg-php qui n’est plus maintenu au (...)

  • Personnaliser en ajoutant son logo, sa bannière ou son image de fond

    5 septembre 2013, par

    Certains thèmes prennent en compte trois éléments de personnalisation : l’ajout d’un logo ; l’ajout d’une bannière l’ajout d’une image de fond ;

  • 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

Sur d’autres sites (11763)

  • how use pipe instead of save method in fluent-ffmpeg ?

    27 juin 2019, par Mohsen Rahnamaei

    I gonna use fluent ffmpeg to write something on video
    I use this cod

    var proc = ffmpeg(req.filePath). videoFilters(
     {
       filter: 'drawtext',
       options: {
         text: 'VERY LONG TEXT VERY VERY VERY VERY LOL!!!',
         fontsize: 36,
         fontcolor: 'white',
         x: '(main_w/2-text_w/2)',
         y: '(text_h/2)+15',
         shadowcolor: 'black',
         shadowx: 2,
         shadowy: 2
       }}

    )
    // use the 'flashvideo' preset (located in /lib/presets/flashvideo.js)
    .on('end', function() {
     console.log('file has been converted succesfully');
    })
    .on('error', function(err) {
     console.log('an error happened: ' + err.message);
    }).save('/home/gheidar/Desktop/ffmpeg_test/rt.ts');

    and everything is correct
    but I want to export this output to stream for the response of the request
    means that I want to use pipe() instead of save method

    something like this :

    var proc = ffmpeg(req.filePath). videoFilters(
     {
       filter: 'drawtext',
       options: {
         text: 'VERY LONG TEXT VERY VERY VERY VERY LOL!!!',
         fontsize: 36,
         fontcolor: 'white',
         x: '(main_w/2-text_w/2)',
         y: '(text_h/2)+15',
         shadowcolor: 'black',
         shadowx: 2,
         shadowy: 2
       }}

    )
    // use the 'flashvideo' preset (located in /lib/presets/flashvideo.js)
    .on('end', function() {
     console.log('file has been converted succesfully');
    })
    .on('error', function(err) {
     console.log('an error happened: ' + err.message);
    }).pipe(res)

    its just change in the last line
    and I get this error :

    an error happened: ffmpeg exited with code 1: pipe:1: Invalid argument

    how can export this ffmpeg command to stream response ????

  • ffmpeg to hls not running correctly with error :Uncaught RangeError : Source is too large

    4 juillet 2019, par Mohsen Rahnamaei

    I want to add watermark in each video file which produce from hls server.
    inorder to do that I am using fluent ffmpeg js componnent.
    and this is my backend code of hls server

    self.provider.getSegmentStream(req, function (err, stream) {



    res.setHeader('Content-Type', CONTENT_TYPE.SEGMENT)
    res.statusCode = 200
    var proc = ffmpeg(req.filePath). videoFilters(
    {
    filter: 'drawtext',
    options: {
     text: 'VERY LONG TEXT VERY VERY VERY VERY LOL!!!',
     fontsize: 36,
     fontcolor: 'white',
     x: '(main_w/2-text_w/2)',
     y: '(text_h/2)+15',
     shadowcolor: 'black',
     shadowx: 2,
     shadowy: 2
    }}

    )

    .videoCodec('libx264')

    .audioBitrate('128k')

    .audioCodec('aac')

    .format('mpegts')
    .on('end', function(stdout, stderr) {
    console.log('Transcoding succeeded !',req.filePath);

    })

    .on('error', function(err) {
    console.log('an error happened: ' + err.message);
    }).pipe(res ,{end:true})

    and in my client i am using this code :

    if(Hls.isSupported())
    {
     console.log('hls is suported');
       var video = document.getElementById('video');
       var hls = new Hls();
       hls.loadSource('http://serverip:8182/streams/stream.m3u8');
       hls.attachMedia(video);
       hls.on(Hls.Events.MANIFEST_PARSED,function()
       {
           video.play();
       });
    }
    else if (video.canPlayType('application/vnd.apple.mpegurl'))
    {
     console.log('hls isnot suported');

       video.src = 'http://serverip/streams/stream.m3u8';
       video.addEventListener('canplay',function()
       {
           video.play();
       });
    }

    but i have problem becaus its just play first ts file but after that hls has stoped and in console i get this error :

    Uncaught RangeError: Source is too large
    at Uint8Array.set (<anonymous>)
    at e.remuxAudio (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
    at e.remux (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
    at e.append (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
    at e.pushDecrypted (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
    at e.push (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)
    at blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1
    </anonymous>

    what should i do

  • ffmpeg to hls not running correctly with error :Uncaught RangeError : Source is too large

    4 juillet 2019, par Mohsen Rahnamaei

    I want to add watermark in each video file which produce from hls server.&#xA;inorder to do that I am using fluent ffmpeg js componnent.&#xA;and this is my backend code of hls server

    &#xA;&#xA;

     self.provider.getSegmentStream(req, function (err, stream) {&#xA;&#xA;&#xA;&#xA;res.setHeader(&#x27;Content-Type&#x27;, CONTENT_TYPE.SEGMENT)&#xA;res.statusCode = 200&#xA;var proc = ffmpeg(req.filePath). videoFilters(&#xA; {&#xA;filter: &#x27;drawtext&#x27;,&#xA;options: {&#xA;  text: &#x27;VERY LONG TEXT VERY VERY VERY VERY LOL!!!&#x27;,&#xA;  fontsize: 36,&#xA;  fontcolor: &#x27;white&#x27;,&#xA;  x: &#x27;(main_w/2-text_w/2)&#x27;,&#xA;  y: &#x27;(text_h/2)&#x2B;15&#x27;,&#xA;  shadowcolor: &#x27;black&#x27;,&#xA;  shadowx: 2,&#xA;  shadowy: 2&#xA;}}&#xA;&#xA; ) &#xA;&#xA;.videoCodec(&#x27;libx264&#x27;)&#xA;&#xA; .audioBitrate(&#x27;128k&#x27;)&#xA;&#xA; .audioCodec(&#x27;aac&#x27;)&#xA;&#xA;.format(&#x27;mpegts&#x27;)&#xA;.on(&#x27;end&#x27;, function(stdout, stderr) {&#xA;console.log(&#x27;Transcoding succeeded !&#x27;,req.filePath);&#xA;&#xA;})&#xA;&#xA;.on(&#x27;error&#x27;, function(err) {&#xA; console.log(&#x27;an error happened: &#x27; &#x2B; err.message);&#xA; }).pipe(res ,{end:true})&#xA;

    &#xA;&#xA;

    and in my client i am using this code :

    &#xA;&#xA;

    if(Hls.isSupported())&#xA;{&#xA;  console.log(&#x27;hls is suported&#x27;);&#xA;    var video = document.getElementById(&#x27;video&#x27;);&#xA;    var hls = new Hls();&#xA;    hls.loadSource(&#x27;http://serverip:8182/streams/stream.m3u8&#x27;);&#xA;    hls.attachMedia(video);&#xA;    hls.on(Hls.Events.MANIFEST_PARSED,function()&#xA;    {&#xA;        video.play();&#xA;    });&#xA;}&#xA;else if (video.canPlayType(&#x27;application/vnd.apple.mpegurl&#x27;))&#xA;{&#xA;  console.log(&#x27;hls isnot suported&#x27;);&#xA;&#xA;    video.src = &#x27;http://serverip/streams/stream.m3u8&#x27;;&#xA;    video.addEventListener(&#x27;canplay&#x27;,function()&#xA;    {&#xA;        video.play();&#xA;    });&#xA;}&#xA;

    &#xA;&#xA;

    but i have problem becaus its just play first ts file but after that hls has stoped and in console i get this error :

    &#xA;&#xA;

    Uncaught RangeError: Source is too large&#xA;at Uint8Array.set (<anonymous>)&#xA;at e.remuxAudio (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)&#xA;at e.remux (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)&#xA;at e.append (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)&#xA;at e.pushDecrypted (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)&#xA;at e.push (blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1)&#xA;at blob:null/44d66ff1-a411-411b-842b-4904552a58a4:1&#xA;</anonymous>

    &#xA;&#xA;

    what should i do

    &#xA;