
Recherche avancée
Médias (3)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
-
Podcasting Legal guide
16 mai 2011, par
Mis à jour : Mai 2011
Langue : English
Type : Texte
-
Creativecommons informational flyer
16 mai 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (58)
-
Mise à jour de la version 0.1 vers 0.2
24 juin 2013, parExplications 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, parCertains 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 ;
-
Ecrire une actualité
21 juin 2013, parPré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 (7797)
-
Workflow and data format for sending MediaRecorder output to express server
30 avril 2021, par MaxI've been trying to figure this out for a while but got lost between different ways of sending files and different data formats.


I am recording the stream of a canvas animation with MediaRecorder. As far as I understand this returns a blob with the video in binary format. Now I want to send this data to my express server and convert it to an h264 encoded mp4 file. My first impulse was to use ffmpeg on the server. Unfortunately I'm struggling with the details of the implementation. I am unsure on how to best transmit the data and in what format and how to feed it to ffmpeg.


This is what I have on the client side :


// Get stream from element
stream = element.captureStream(30)

// Create media recorder with stream
const recorder = new MediaRecorder(stream)

// Save to file
recorder.ondataavailable = ({ data }) => {
 
 const formData = new FormData()
 formData.append("file", data)

 const options = {
 method: "POST",
 body: formData,
 }

 fetch("http://localhost:3001/api/blob_to_mp4", options).then(
 (res) => {
 console.log(res)
 }
 )
}



And this is what I have on the server side :


"use strict";

const express = require("express");
const cors = require("cors");
const ffmpeg = require("fluent-ffmpeg");
const fs = require("fs");

const port = process.env.PORT || 3001;
const app = express();
var command = ffmpeg();

app.use(cors());
app.use(express.urlencoded({ extended: true }));
app.use(express.json());

app.post("/api/blob_to_mp4", function (req, res) {
 var data = Buffer.from("");

 // Add data
 req.on("data", function (chunk) {
 data = Buffer.concat([data, chunk]);
 });

 // Full data available
 req.on("end", () => {
 req.rawBody = data;
 });

 res.send("hello world");
});

app.listen(port);
console.log(`Server running on port ${port}`);



-
How can I use ffmpeg to create a seamless looping gif ? [closed]
27 juin 2024, par DavidNyan10I have an MP4 file which contains animation repeating in a loop. Let's just say, for example, a video of rain. However, when loop is turned on, the video cuts off at the wrong place and does not make a nice smooth animation. The part where it loops is obvious. It's just that the video contains more than one cycle of the loop, but not an exact integer of the full cycle.


My goal is to turn this video into a gif with a seamless loop. In other words, I want the last frame of the video to match the first frame.


My approach : I found a "Seamless loop creator" website on Google, tried it out, and it worked REALLY well. I thought all my problems have been solved. But little did I know, I've been only looking at the few seconds at the beginning and at the end of the video, not paying attention to what's in the middle. The sneaky pesky little website cuts off the video right in the middle, stitch the "seamless transition" at the beginning and end of the video, and put an ugly cross-fade in the middle where the frames don't line up. That is stupid. This of course, isn't noticable on rain videos, but on videos like a character jumping, the crossfade is very visible.


My second approach : I'd use FFMPEG to get the first frame of the video, then starting from the last frame of the video and backwards, it'd try to find a frame that matches exactly with the first frame.


Steps :


- 

- Get the first frame and save it as a PNG or something I don't know
- Reverse the original video
- Match the image to each frame of the video in step 2. It is now easier because it's not doing it backwards frame by frame.
- When a frame match is found, cut off all the frames before this matched frame.
- Reverse back the video












Can I achieve something like this in ffmpeg, preferably a one-liner in windows cmd ?


Follow-up question : Would it be better to leave the last frame the same as first frame or should I remove it ? For example, when it's looping, it would repeat that exact frame two times, is that good ? Or which one provides better results ? And if it's better to not include the last frame (the one that matches), how would I do it in my process above ?


I tried ChatGPT, expecting a ready-made code. Put it in the command prompt and lost my original video file. Had to use a recovery tool because the file was overwritten.


-
Grab audio samples with ffmpeg and C, error with official example code
31 août 2020, par nji9For dev with mingw-w64 I'm using ffmpeg v. 4.3.1. and also the latest Git version of ffmpeg (Zeranoe's Windows 64 builds).


I get "strange" problems when running the official example code for decoding audio


https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/decode_audio.c


MP3DirectCut(Lib-bass).mp3


http://www.mediafire.com/file/ozmjjcpwyhhdnr7/MP3DirectCut(Lib-bass).mp3/file


Generates pcm, but outputs :


"Warning: the sample format the decoder produced is planar (s16p).
This example will output the first channel only."



But the output pcm has both channels !??


When recoding the above mp3 to wav with ffmpeg (4.1.4, no error message)


http://www.mediafire.com/file/gcq7ryg43pd57q5/ffmpeg4.1.4.wav/file


and also when recoding the latter to mp3 again


http://www.mediafire.com/file/ij865dkrprn2lta/ffmpeg4.1.4_recode.mp3/file


the example code breaks and produces these error messages :


avcodec_send_packet ()
from within:
"[mp2 @ <someaddress>] Header missing"
and returns error code -1094995529
(= "Invalid data found when processing input")
</someaddress>


It produces that error message for literally all other formats
I tried, and also when written with another editor (Audition 3.0).
But all the files play and show fine on all programs I have.


I'm at a lost at this point.
What is going on and wrong here ?