Recherche avancée

Médias (91)

Autres articles (31)

  • Librairies et binaires spécifiques au traitement vidéo et sonore

    31 janvier 2010, par

    Les logiciels et librairies suivantes sont utilisées par SPIPmotion d’une manière ou d’une autre.
    Binaires obligatoires FFMpeg : encodeur principal, permet de transcoder presque tous les types de fichiers vidéo et sonores dans les formats lisibles sur Internet. CF ce tutoriel pour son installation ; Oggz-tools : outils d’inspection de fichiers ogg ; Mediainfo : récupération d’informations depuis la plupart des formats vidéos et sonores ;
    Binaires complémentaires et facultatifs flvtool2 : (...)

  • Support audio et vidéo HTML5

    10 avril 2011

    MediaSPIP utilise les balises HTML5 video et audio pour la lecture de documents multimedia en profitant des dernières innovations du W3C supportées par les navigateurs modernes.
    Pour les navigateurs plus anciens, le lecteur flash Flowplayer est utilisé.
    Le lecteur HTML5 utilisé a été spécifiquement créé pour MediaSPIP : il est complètement modifiable graphiquement pour correspondre à un thème choisi.
    Ces technologies permettent de distribuer vidéo et son à la fois sur des ordinateurs conventionnels (...)

  • De l’upload à la vidéo finale [version standalone]

    31 janvier 2010, par

    Le chemin d’un document audio ou vidéo dans SPIPMotion est divisé en trois étapes distinctes.
    Upload et récupération d’informations de la vidéo source
    Dans un premier temps, il est nécessaire de créer un article SPIP et de lui joindre le document vidéo "source".
    Au moment où ce document est joint à l’article, deux actions supplémentaires au comportement normal sont exécutées : La récupération des informations techniques des flux audio et video du fichier ; La génération d’une vignette : extraction d’une (...)

Sur d’autres sites (4772)

  • avcodec/dxvenc : Fix data races with slice threading

    24 janvier 2024, par Andreas Rheinhardt
    avcodec/dxvenc : Fix data races with slice threading
    

    The old code set a common struct from each thread ;
    this only "worked" (but is still UB) because the values
    written are the same for each thread.
    Fix this by moving the assignments to the main thread.

    (This also avoids casting const away from a const AVFrame*.)

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/dxvenc.c
  • flvdec : Honor the "flv_metadata" option for the "datastream" metadata field

    9 février 2024, par Martin Storsjö
    flvdec : Honor the "flv_metadata" option for the "datastream" metadata field
    

    By default the option "flv_metadata" (internally using the field
    name "trust_metadata") is set to 0, meaning that we don't allocate
    streams based on information in the metadata, only based on
    actual streams we encounter. However the "datastream" metadata field
    still would allocate a subtitle stream.

    When muxing, the "datastream" field is added if either a data stream
    or subtitle stream is present - but the same metadata field is used
    to preemtively create a subtitle stream only. Thus, if the field
    was added due to a data stream, not a subtitle stream, the demuxer
    would create a stream which won't get any actual packets.

    If there was such an extra, empty subtitle stream, running
    avformat_find_stream_info still used to terminate within reasonable
    time before 3749eede66c3774799766b1f246afae8a6ffc9bb. After that
    commit, it no longer would terminate until it reaches the max
    analyze duration, which is 90 seconds for flv streams (see
    e6a084641aada7a2e4672172f2ee26642800a361,
    24fdf7334d2bb9aab0abdbc878b8ae51eb57c86b and
    f58e011a1f30332ba824c155078ca701e29aef63).

    Before that commit (which removed the deprecated AVStream.codec), the
    "st->codecpar->codec_id = AV_CODEC_ID_TEXT", set within the demuxer,
    would get propagated into st->codec->codec_id by numerous
    avcodec_parameters_to_context(st->codec, st->codecpar), then further
    into st->internal->avctx->codec_id by update_stream_avctx within
    read_frame_internal in libavformat/utils.c (demux.c these days).

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavformat/flvdec.c
  • node-fluent-ffmpeg conversion to mp3 does not fire any "end" or "finish" event

    27 février 2024, par 1voy

    I am downloading a video using ytdl-core and converting it to mp3 using node-fluent-ffmpeg. It seems that the code after the ffmpeg conversion gets executed before the conversion finishes as trying to upload the .mp3 file to a Google Cloud Storage bucket throws an error. I am trying to detect 'end' or 'finish' events but none are being triggered.

    &#xA;

    Code :

    &#xA;

    ytdl(url?.toString() as string)&#xA;    .once(&#x27;data&#x27;, (data) => {&#xA;      console.log(&#x27;start&#x27;, data);&#xA;    })&#xA;    .on(&#x27;progress&#x27;, async function (progress, downloaded, total) {&#xA;      console.log(parseInt(((downloaded / total) * 100).toString()) &#x2B; &#x27;%&#x27;);&#xA;      &#xA;    })&#xA;    .on(&#x27;finish&#x27;, async function () {&#xA;      console.log(&#x27;Download finished...&#x27;);&#xA;      &#xA;      console.log(&#x27;using ffmpeg to convert into mp3&#x27;);&#xA;      Ffmpeg({ source: `/Users/user/project/server/output/${videoId}.mp4` })&#xA;        .setFfmpegPath(ffmpeg.path)&#xA;        .toFormat(&#x27;mp3&#x27;)&#xA;        .saveToFile(`/Users/user/project/server/output/${videoId}.mp3`)&#xA;        .on(&#x27;finish&#x27;, () => {&#xA;          console.log(&#x27;finished conversion&#x27;);&#xA;        });&#xA;      console.log(&#x27;after ffmpeg mp3 conversion&#x27;);&#xA;&#xA;      const storage = new Storage({&#xA;        keyFilename: `./key.json`,&#xA;      });&#xA;&#xA;      const bucketName = &#x27;bucketname&#x27;;&#xA;      const bucket = storage.bucket(bucketName);&#xA;      let mp3_url;&#xA;      console.log(&#xA;        fs.existsSync(`/Users/user/project/server/output/${videoId}.mp3`)&#xA;      ); // returns false&#xA;      bucket.upload(&#xA;        `/Users/user/project/server/output/${videoId}.mp3`,&#xA;// Error uploading: Error: ENOENT: no such file or directory, open &#x27;/Users/me/project/server/output/RMvenf7E-Dg.mp3&#x27;&#xA;        {&#xA;          destination: `${userId}/${videoId}.mp3`,&#xA;        },&#xA;        function (err, file) {&#xA;          if (err) {&#xA;            console.error(`Error uploading: ${err}`);&#xA;          } else {&#xA;            console.log(`mp3 uploaded to ${bucketName}.`);&#xA;            console.log(file?.publicUrl());&#xA;          }&#xA;        }&#xA;      );&#xA;&#xA;      &#xA;    .pipe(&#xA;      fs.createWriteStream(`/Users/me/project/server/output/${videoId}.mp4`)&#xA;    );&#xA;&#xA;  console.log(&#x27;after download and conversion&#x27;);&#xA;&#xA;  req.on(&#x27;close&#x27;, async () => {&#xA;    res.end();&#xA;  });&#xA;

    &#xA;

    Error uploading: Error: ENOENT: no such file or directory, open &#x27;/Users/polo/makeklips/server/output/RMvenf7E-Dg.mp3&#x27;&#xA;[1] /Users/me/project/server/node_modules/.pnpm/fluent-ffmpeg@2.1.2/node_modules/fluent-ffmpeg/lib/processor.js:182&#xA;[1]           handleExit(new Error(&#x27;ffmpeg exited with code &#x27; &#x2B; code));&#xA;[1]                      ^&#xA;[1] Error: ffmpeg exited with code 1: Output #0, mp3, to &#x27;/Users/me/project/server/output/RMvenf7E-Dg.mp3&#x27;:&#xA;[1] Output file #0 does not contain any stream&#xA;

    &#xA;