Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (111)

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

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

  • MediaSPIP version 0.1 Beta

    16 avril 2011, par

    MediaSPIP 0.1 beta est la première version de MediaSPIP décrétée comme "utilisable".
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Pour avoir une installation fonctionnelle, 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 (...)

Sur d’autres sites (8267)

  • Issue with streaming in realtime to HTML5 video player

    24 juillet 2023, par ImaSquareBTW

    ok so i created a project which should take an mkv file convert it to a sutaible fomrat in relatime and play it as it transcodes in the html 5 video player and should play as soon as small segement is ready for playback but unfornatlly it does seem to work heres my code if your curious, help would be very much appreicted

    


    &#xA;&#xA;  &#xA;    &#xA;  &#xA;  &#xA;    <video controls="controls">&#xA;      <source src="output.mp4" type="video/mp4">&#xA;    </source></video>&#xA;    <code class="echappe-js">&lt;script src=&quot;https://cdnjs.cloudflare.com/ajax/libs/ffmpeg/0.11.6/ffmpeg.min.js&quot; integrity=&quot;sha512-91IRkhfv1tLVYAdH5KTV&amp;#x2B;KntIZP/7VzQ9E/qbihXFSj0igeacWWB7bQrdiuaJVMXlCVREL4Z5r&amp;#x2B;3C4yagAlwEw==&quot; crossorigin=&quot;anonymous&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/script&gt;&#xA;    &lt;script src='http://stackoverflow.com/feeds/tag/player.js'&gt;&lt;/script&gt;&#xA;  &#xA;&#xA;

    &#xA;

    and my javscript :

    &#xA;

    let mediaSource;&#xA;let sourceBuffer;&#xA;let isTranscoding = false;&#xA;let bufferedSeconds = 0;&#xA;&#xA;async function setupMediaSource() {&#xA;  mediaSource = new MediaSource();&#xA;  const videoPlayer = document.getElementById(&#x27;video-player&#x27;);&#xA;  videoPlayer.src = URL.createObjectURL(mediaSource);&#xA;  await new Promise(resolve => {&#xA;    mediaSource.addEventListener(&#x27;sourceopen&#x27;, () => {&#xA;      sourceBuffer = mediaSource.addSourceBuffer(&#x27;video/mp4; codecs="avc1.64001E, mp4a.40.2"&#x27;); // Match the transcoded format&#xA;      sourceBuffer.addEventListener(&#x27;updateend&#x27;, () => {&#xA;        if (!sourceBuffer.updating &amp;&amp; mediaSource.readyState === &#x27;open&#x27;) {&#xA;          mediaSource.endOfStream();&#xA;          resolve();&#xA;        }&#xA;      });&#xA;    });&#xA;  });&#xA;}&#xA;&#xA;async function transcodeVideo() {&#xA;  const ffmpeg = createFFmpeg({ log: true });&#xA;  const videoPlayer = document.getElementById(&#x27;video-player&#x27;);&#xA;&#xA;  await ffmpeg.load();&#xA;  const transcodeCommand = [&#x27;-i&#x27;, &#x27;The Legend of Old Gregg S02E05.mkv&#x27;, &#x27;-c:v&#x27;, &#x27;libx264&#x27;, &#x27;-preset&#x27;, &#x27;ultrafast&#x27;, &#x27;-c:a&#x27;, &#x27;aac&#x27;, &#x27;-strict&#x27;, &#x27;experimental&#x27;, &#x27;-f&#x27;, &#x27;mp4&#x27;, &#x27;-movflags&#x27;, &#x27;frag_keyframe&#x2B;empty_moov&#x27;, &#x27;output.mp4&#x27;];&#xA;&#xA;  const videoUrl = &#x27;The Legend of Old Gregg S02E05.mkv&#x27;; // The URL of the original video file&#xA;&#xA;  let lastBufferedSeconds = 0;&#xA;  let currentTime = 0;&#xA;  while (currentTime &lt; videoPlayer.duration) {&#xA;    if (!isTranscoding &amp;&amp; sourceBuffer.buffered.length > 0 &amp;&amp; sourceBuffer.buffered.end(0) - currentTime &lt; 5) {&#xA;      isTranscoding = true;&#xA;      const start = sourceBuffer.buffered.end(0);&#xA;      const end = Math.min(videoPlayer.duration, start &#x2B; 10);&#xA;      await fetchAndTranscode(videoUrl, start, end, ffmpeg, transcodeCommand);&#xA;      isTranscoding = false;&#xA;      currentTime = end;&#xA;      bufferedSeconds &#x2B;= (end - start);&#xA;      const transcodingSpeed = bufferedSeconds / (currentTime);&#xA;      lastBufferedSeconds = bufferedSeconds;&#xA;      console.log(`Transcoded ${end - start} seconds of video. Buffered: ${bufferedSeconds.toFixed(2)}s (${transcodingSpeed.toFixed(2)}x speed)`);&#xA;    }&#xA;    await new Promise(resolve => setTimeout(resolve, 500));&#xA;  }&#xA;&#xA;  await ffmpeg.exit();&#xA;}&#xA;&#xA;async function fetchAndTranscode(url, start, end, ffmpeg, transcodeCommand) {&#xA;  const response = await fetch(url, { headers: { Range: `bytes=${start}-${end}` } });&#xA;  const data = new Uint8Array(await response.arrayBuffer());&#xA;  ffmpeg.FS(&#x27;writeFile&#x27;, &#x27;input.mkv&#x27;, data); // Use &#x27;input.mkv&#x27; as a temporary file&#xA;  await ffmpeg.run(...transcodeCommand);&#xA;  const outputData = ffmpeg.FS(&#x27;readFile&#x27;, &#x27;output.mp4&#x27;);&#xA;  appendSegmentToBuffer(outputData);&#xA;}&#xA;&#xA;function appendSegmentToBuffer(segment) {&#xA;  if (!sourceBuffer.updating) {&#xA;    sourceBuffer.appendBuffer(segment);&#xA;  } else {&#xA;    sourceBuffer.addEventListener(&#x27;updateend&#x27;, () => {&#xA;      sourceBuffer.appendBuffer(segment);&#xA;    });&#xA;  }&#xA;}&#xA;&#xA;async function createFFmpeg(options) {&#xA;  const { createFFmpeg } = FFmpeg;&#xA;  const ffmpeg = createFFmpeg(options);&#xA;  await ffmpeg.load();&#xA;  return ffmpeg;&#xA;}&#xA;&#xA;(async () => {&#xA;  await setupMediaSource();&#xA;  await transcodeVideo();&#xA;})();&#xA;&#xA;

    &#xA;

  • avcodec/mss2 : calculate draw region and revise split position

    18 octobre 2022, par Peter Ross
    avcodec/mss2 : calculate draw region and revise split position
    

    for videos with wmv9 rectangles, the region drawn by ff_mss12_decode_rect
    may be less than the entire video area. the wmv9 rectangles are used to
    calculate the ff_mss12_decode_rect draw region.

    Fixes tickets #3255 and #4043

    • [DH] libavcodec/mss2.c
  • Adding album cover art to FLAC audio files using `ffmpeg`

    27 décembre 2022, par user5395338

    I have ripped files from an audio CD I just bought. I ripped using the Music app on my Macbook Pro, Catalina 10.15.6 - output format was .wav as there was no option for FLAC. My plan was to change format using ffmpeg :

    &#xA;

    % ffmpeg -v&#xA;ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers&#xA;

    &#xA;

    Except for the "album cover artwork" addition, the .wav-to-.flac conversion implemented in the short bash script below seems to have worked as expected :

    &#xA;

    #!/bin/bash&#xA;for file in *.wav&#xA;do&#xA;echo $file &#xA;ffmpeg -loglevel quiet -i "$file" -ar 48000 -c:a flac -disposition:v AnotherLand.png -vsync 0 -c:v png "${file/%.wav/.flac}"&#xA;done&#xA;

    &#xA;

    A script very similar to this one worked some time ago on a series of FLAC-to-FLAC conversions I had to do to reduce the bit depth. However, in that case, the original FLAC files already had the artwork embedded. Since this script produced usable audio files, I decided that I would try adding the artwork with a second ffmpeg command.

    &#xA;

    I did some research, which informed me that there have been issues with ffmpeg (1, 2, 3, 4) on adding album artwork to FLAC files.

    &#xA;

    I have tried several commands given in the references above, but still have not found a way to add album artwork to my FLAC files. The following command was a highly upvoted answer, which I felt would work, but didn't :

    &#xA;

    % ffmpeg -i "01 Grave Walker.flac" -i ./AnotherLand.png -map 0:0 -map 1:0 -codec copy -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" output.flac&#xA;&#xA;...&#xA;&#xA;&#xA;Input #0, flac, from &#x27;01 Grave Walker.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.76.100&#xA;  Duration: 00:06:59.93, start: 0.000000, bitrate: 746 kb/s&#xA;  Stream #0:0: Audio: flac, 48000 Hz, stereo, s16&#xA;Input #1, png_pipe, from &#x27;./AnotherLand.png&#x27;:&#xA;  Duration: N/A, bitrate: N/A&#xA;  Stream #1:0: Video: png, rgba(pc), 522x522, 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;File &#x27;output.flac&#x27; already exists. Overwrite? [y/N] y&#xA;[flac @ 0x7fb4d701e800] Video stream #1 is not an attached picture. Ignoring&#xA;Output #0, flac, to &#x27;output.flac&#x27;:&#xA;  Metadata:&#xA;    encoder         : Lavf58.76.100&#xA;  Stream #0:0: Audio: flac, 48000 Hz, stereo, s16&#xA;  Stream #0:1: Video: png, rgba(pc), 522x522, q=2-31, 25 fps, 25 tbr, 25 tbn, 25 tbc&#xA;    Metadata:&#xA;      title           : Album cover&#xA;      comment         : Cover (front)&#xA;Stream mapping:&#xA;  Stream #0:0 -> #0:0 (copy)&#xA;  Stream #1:0 -> #0:1 (copy)&#xA;&#xA;...&#xA;&#xA;

    &#xA;

    I don't understand the error message : Video stream #1 is not an attached picture. It seems to imply that that the artwork is "attached" (embedded ???) in the input file, but as I've specified the artwork is a separate file, this makes no sense to me.

    &#xA;