
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (111)
-
MediaSPIP v0.2
21 juin 2013, parMediaSPIP 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, parPar 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, parMediaSPIP 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 ImaSquareBTWok 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




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

<script src='http://stackoverflow.com/feeds/tag/player.js'></script>

 



and my javscript :


let mediaSource;
let sourceBuffer;
let isTranscoding = false;
let bufferedSeconds = 0;

async function setupMediaSource() {
 mediaSource = new MediaSource();
 const videoPlayer = document.getElementById('video-player');
 videoPlayer.src = URL.createObjectURL(mediaSource);
 await new Promise(resolve => {
 mediaSource.addEventListener('sourceopen', () => {
 sourceBuffer = mediaSource.addSourceBuffer('video/mp4; codecs="avc1.64001E, mp4a.40.2"'); // Match the transcoded format
 sourceBuffer.addEventListener('updateend', () => {
 if (!sourceBuffer.updating && mediaSource.readyState === 'open') {
 mediaSource.endOfStream();
 resolve();
 }
 });
 });
 });
}

async function transcodeVideo() {
 const ffmpeg = createFFmpeg({ log: true });
 const videoPlayer = document.getElementById('video-player');

 await ffmpeg.load();
 const transcodeCommand = ['-i', 'The Legend of Old Gregg S02E05.mkv', '-c:v', 'libx264', '-preset', 'ultrafast', '-c:a', 'aac', '-strict', 'experimental', '-f', 'mp4', '-movflags', 'frag_keyframe+empty_moov', 'output.mp4'];

 const videoUrl = 'The Legend of Old Gregg S02E05.mkv'; // The URL of the original video file

 let lastBufferedSeconds = 0;
 let currentTime = 0;
 while (currentTime < videoPlayer.duration) {
 if (!isTranscoding && sourceBuffer.buffered.length > 0 && sourceBuffer.buffered.end(0) - currentTime < 5) {
 isTranscoding = true;
 const start = sourceBuffer.buffered.end(0);
 const end = Math.min(videoPlayer.duration, start + 10);
 await fetchAndTranscode(videoUrl, start, end, ffmpeg, transcodeCommand);
 isTranscoding = false;
 currentTime = end;
 bufferedSeconds += (end - start);
 const transcodingSpeed = bufferedSeconds / (currentTime);
 lastBufferedSeconds = bufferedSeconds;
 console.log(`Transcoded ${end - start} seconds of video. Buffered: ${bufferedSeconds.toFixed(2)}s (${transcodingSpeed.toFixed(2)}x speed)`);
 }
 await new Promise(resolve => setTimeout(resolve, 500));
 }

 await ffmpeg.exit();
}

async function fetchAndTranscode(url, start, end, ffmpeg, transcodeCommand) {
 const response = await fetch(url, { headers: { Range: `bytes=${start}-${end}` } });
 const data = new Uint8Array(await response.arrayBuffer());
 ffmpeg.FS('writeFile', 'input.mkv', data); // Use 'input.mkv' as a temporary file
 await ffmpeg.run(...transcodeCommand);
 const outputData = ffmpeg.FS('readFile', 'output.mp4');
 appendSegmentToBuffer(outputData);
}

function appendSegmentToBuffer(segment) {
 if (!sourceBuffer.updating) {
 sourceBuffer.appendBuffer(segment);
 } else {
 sourceBuffer.addEventListener('updateend', () => {
 sourceBuffer.appendBuffer(segment);
 });
 }
}

async function createFFmpeg(options) {
 const { createFFmpeg } = FFmpeg;
 const ffmpeg = createFFmpeg(options);
 await ffmpeg.load();
 return ffmpeg;
}

(async () => {
 await setupMediaSource();
 await transcodeVideo();
})();




-
avcodec/mss2 : calculate draw region and revise split position
18 octobre 2022, par Peter Rossavcodec/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
-
Adding album cover art to FLAC audio files using `ffmpeg`
27 décembre 2022, par user5395338I 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 forFLAC
. My plan was to change format usingffmpeg
:

% ffmpeg -v
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers



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

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



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 originalFLAC
files already had the artwork embedded. Since this script produced usable audio files, I decided that I would try adding the artwork with a secondffmpeg
command.

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

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 :

% 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

...


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

...




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.