Recherche avancée

Médias (0)

Mot : - Tags -/navigation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (55)

  • La file d’attente de SPIPmotion

    28 novembre 2010, par

    Une file d’attente stockée dans la base de donnée
    Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
    Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...)

  • Les vidéos

    21 avril 2011, par

    Comme les documents de type "audio", Mediaspip affiche dans la mesure du possible les vidéos grâce à la balise html5 .
    Un des inconvénients de cette balise est qu’elle n’est pas reconnue correctement par certains navigateurs (Internet Explorer pour ne pas le nommer) et que chaque navigateur ne gère en natif que certains formats de vidéos.
    Son avantage principal quant à lui est de bénéficier de la prise en charge native de vidéos dans les navigateur et donc de se passer de l’utilisation de Flash et (...)

  • Ecrire une actualité

    21 juin 2013, par

    Présentez les changements dans votre MédiaSPIP ou les actualités de vos projets sur votre MédiaSPIP grâce à la rubrique actualités.
    Dans le thème par défaut spipeo de MédiaSPIP, les actualités sont affichées en bas de la page principale sous les éditoriaux.
    Vous pouvez personnaliser le formulaire de création d’une actualité.
    Formulaire de création d’une actualité Dans le cas d’un document de type actualité, les champs proposés par défaut sont : Date de publication ( personnaliser la date de publication ) (...)

Sur d’autres sites (6910)

  • ffmpeg converted video from s3 bucket downloads before playing the video

    12 octobre 2020, par Rutu

    I making a video streaming application with react and node js.
I am converting video into different resolution with ffmpeg and storing directly to S3 bucket with the help of piping.

    


    I am streaming uploaded resolution video from S3 bucket directly through cloudfront in HTML5 tag with video.js

    


    When i tried to play original video through cloudfront in player its working fine, But as soon i play ffmpeg converted video to video player in cloudfront i am facing issue :

    


    Video takes a lot load (Downloads in browser) before playing in player.

    


    Below is my ffmpeg command

    


    await loadProcess( [&#xA;&#x27;i&#x27;,<s3 url="url" of="of" original="original" video="video">,&#xA;  &#x27;-movflags&#x27;,&#xA;  &#x27;frag_keyframe&#x2B;empty_moov&#x27;,&#x27;-vf&#x27;, &#x27;scale=-2:360&#x27;,&#x27;-c:v&#x27;,&#x27;h264&#x27;,&#x27;-profile:v&#x27;,&#x27;baseline&#x27;,&#x27;-r&#x27;,30,&#x27;-g&#x27;, 60,&#x27;-b:v&#x27;,&#x27;1M&#x27;,&#x27;-f&#x27;,&#x27;mp4&#x27;,&#x27;-&#x27;]&#xA;, outPath,&#x27;video/mp4&#x27;)&#xA;&#xA;</s3>

    &#xA;

    this is my loadProcess function : i am using aws cli to direct upload resolution video to S3 bucket :

    &#xA;

    export function loadProcess(ffmpegOptions, outPath,contentType) {&#xA;    return new Promise((resolve, reject) => {&#xA;        const  videoPath = outPath.replace(/\\/g, "/");&#xA;        let ffmpeg = spawn(conf.ffmpeg, ffmpegOptions);&#xA;        let awsPipe = spawn(&#x27;aws&#x27;, [&#x27;s3&#x27;, &#x27;cp&#x27;, &#x27;--content-type&#x27;, `${contentType}`, &#x27;-&#x27;, `s3://${process.env.AWS_S3_BUCKET}/${process.env.AWS_S3_VIDEOS_FOLDER}${videoPath}` ])&#xA;        ffmpeg.stdout.pipe(awsPipe.stdin)&#xA;&#xA;        // ffmpeg write stream flow&#xA;        let ffmpegData = &#x27;&#x27;&#xA;        ffmpeg.stderr.on(&#x27;data&#x27;, (_data) => {&#xA;            ffmpegData &#x2B;= _data.toString();&#xA;        })&#xA;        ffmpeg.on(&#x27;close&#x27;, (code) => {&#xA;            if (code === 0) {&#xA;                resolve(outPath)&#xA;            }&#xA;            else {&#xA;                let _dataSplit=ffmpegData.split(&#x27;\n&#x27;);&#xA;                _dataSplit.pop();&#xA;                console.log({action: &#x27;close&#x27;, message:_dataSplit.pop(), more:[conf.ffmpeg].concat(ffmpegOptions).join(&#x27; &#x27;)&#x2B;&#x27;\n&#x27;&#x2B;ffmpegData, code})&#xA;            }&#xA;        });&#xA;        ffmpeg.on(&#x27;error&#x27;, (err) => {&#xA;            reject({action: &#x27; ffmpeg error&#x27;, message: err});&#xA;        });&#xA;        &#xA;        // aws s3 cli read stream pipe flow&#xA;        let awsPipeData = &#x27;&#x27;&#xA;        awsPipe.stderr.on(&#x27;data&#x27;, _data => {&#xA;            awsPipeData &#x2B;= _data.toString()&#xA;        });&#xA;        awsPipe.on(&#x27;close&#x27;, (code) => {&#xA;            if (code === 0) {&#xA;                resolve(outPath)&#xA;            }else{&#xA;                console.log({action: &#x27;close&#x27;, message: awsPipeData})&#xA;            }&#xA;        });&#xA;        awsPipe.on(&#x27;error&#x27;, (err) => {&#xA;            reject({action: &#x27;awsPipe error&#x27;, message: err});&#xA;        })&#xA;&#xA;    })&#xA;}&#xA;

    &#xA;

    I have tried using +faststart option in ffmpeg but getting command failed error.&#xA;Can someone please help me this ?

    &#xA;

    Thanks in advance

    &#xA;

  • Streaming a video to multiple end users with node.js and ffmpeg

    9 juin 2023, par Nick Knapp

    I'm designed an API endpoint with node.js and express which will accept a url from a different part of the application, convert it into a webm stream, and allow multiple different end users to receive the end result without too much backend processing.

    &#xA;

    I'd like to have the process running once and pipe the resulting stream to n endpoint calls without using temp files to hold it. So far, all of my attempts to store the output in a temporary object have failed.

    &#xA;

    What would be the best method of going about doing this ?

    &#xA;

    The following does not work, but is an example of what I've been trying to do.

    &#xA;

    import express from &#x27;express&#x27;;&#xA;import cors from &#x27;cors&#x27;;&#xA;import FfmpegCommand from &#x27;fluent-ffmpeg&#x27;;&#xA;import stream from &#x27;stream&#x27;;&#xA;&#xA;const app = express();&#xA;const port = 3002;&#xA;const activeStreams = {};&#xA;&#xA;app.use(cors());&#xA;&#xA;app.get(&#x27;/video/stream&#x27;, (req, res) => {&#xA;&#xA;  var streamUrl = new URL(req.query.streamurl);&#xA;  var protocol = streamUrl.protocol;&#xA;&#xA;  if (activeStreams[streamUrl] === undefined) {&#xA;    activeStreams[streamUrl] = new stream.Duplex();&#xA;    if ([&#x27;udp:&#x27;, &#x27;rtmp:&#x27;, &#x27;rtsp:&#x27;].includes(protocol)) {&#xA;      FfmpegCommand(path)&#xA;      .toFormat(&#x27;webm&#x27;)&#xA;      .on(&#x27;error&#x27;, function(err, stdout, stderr) {&#xA;          console.log(&#x27;an error occurred&#x27;, err.message);&#xA;          console.log("stdout:\n" &#x2B; stdout);&#xA;          console.log("stderr:\n" &#x2B; stderr);&#xA;      })&#xA;      .pipe(activeStreams[streamUrl], {end: true});&#xA;    }&#xA;    activeStreams[streamUrl].read().pipe(res);&#xA;  } else {&#xA;    activeStreams[streamUrl].read().pipe(res);   &#xA;  }&#xA;});&#xA;

    &#xA;

  • How can I allow my users to combine audio and video tracks for downloading a youtube video ? [closed]

    1er décembre 2023, par Faizan Ahanger

    I have a website which, along a bunch a text, has a embedded youtube videos to play. I want to allow my users to also a be able to download those videos. There are too many videos there to store on my own server and I know that there are already website like y2mate.com and savefrom.net which do this.

    &#xA;

    I used yt-dlp and using the --print-json parameter I can get the urls for downloading the files but the audio and video tracks are not combined for higher videos. Using ffmpeg seems to be the obvious solution but I don't understand where the videos should be combined. Should I download both needed tracks on my server and combine them before serving it to users ? This seems very inefficient as it take a lot of bandwidth for handling all download requests. There is also this library ffmpeg.wasm which according to them is "a pure WebAssembly / JavaScript port of FFmpeg enabling video & audio record, convert and stream right inside browsers !"

    &#xA;

    This should work but it will require the users to download a 30MB webapp before they can download any video. This is also not very efficient, especially if they are downloading a video which is only a few MBs in size.

    &#xA;

    Are these the only two options that I have or is there a better way to do this ?

    &#xA;