
Recherche avancée
Médias (91)
-
#3 The Safest Place
16 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#4 Emo Creates
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#2 Typewriter Dance
15 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
#1 The Wires
11 octobre 2011, par
Mis à jour : Février 2013
Langue : English
Type : Audio
-
ED-ME-5 1-DVD
11 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Audio
-
Revolution of Open-source and film making towards open film making
6 octobre 2011, par
Mis à jour : Juillet 2013
Langue : English
Type : Texte
Autres articles (101)
-
Multilang : améliorer l’interface pour les blocs multilingues
18 février 2011, parMultilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela. -
L’agrémenter visuellement
10 avril 2011MediaSPIP est basé sur un système de thèmes et de squelettes. Les squelettes définissent le placement des informations dans la page, définissant un usage spécifique de la plateforme, et les thèmes l’habillage graphique général.
Chacun peut proposer un nouveau thème graphique ou un squelette et le mettre à disposition de la communauté. -
Possibilité de déploiement en ferme
12 avril 2011, parMediaSPIP peut être installé comme une ferme, avec un seul "noyau" hébergé sur un serveur dédié et utilisé par une multitude de sites différents.
Cela permet, par exemple : de pouvoir partager les frais de mise en œuvre entre plusieurs projets / individus ; de pouvoir déployer rapidement une multitude de sites uniques ; d’éviter d’avoir à mettre l’ensemble des créations dans un fourre-tout numérique comme c’est le cas pour les grandes plate-formes tout public disséminées sur le (...)
Sur d’autres sites (7663)
-
How do you generate a looping animated gif for Facebook with ffmpeg
7 février 2020, par Alan W. SmithWhen I paste a giphy url (like this one) into a facebook post or comment, the gif plays immediately and loops indefinitely. When I upload ones I make from ffmpeg, neither of those things happen. You have to click a play button to start the animation and then it ends after one time through.
I have a couple of ffmpeg commands I use to create the gifs. They are :
ffmpeg -ss 10 -t 5 -i input.m4v -vf "fps=15,scale=800:-2:flags=lanczos,palettegen" -y palette.png
and
ffmpeg -ss 10.6 -t 5 -i input.m4v -i palette.png -filter_complex "fps=15,scale=800:-1:lanczos[video];[video][1:v]paletteuse" output.gif
The first one generates a custom color pallet that’s used by the second one to create a high quality animated gif. I’ve also tried adding
-loop 0
(i.e.ffmpeg -ss 10.6 -t 5 -i input.m4v -i palette.png -filter_complex "fps=15,scale=800:-1:lanczos[video];[video][1:v]paletteuse" -loop 0 output.gif
) but that didn’t work either.I also tried uploading the ffmpeg generated images to a personal website and calling them from there but those didn’t load at all.
In case it helps, here’s a copy of one of the gifs (which autostarts and loops on StackOverflow for me but not on FB)
How does one go about creating a gif that will autostart and loop indefinitely for facebook ?
(Note : I’ve got no problem if I need to do something with a personal website, but I don’t want to use Giphly or the other animated gif sites directly if at all possible. Also worth pointing out that I discovered if I download the image from giphly and upload it, it doesn’t autostart either. So, this may be something internal to FB, but I’d still like to figure that out.)
-
Running ffmpeg (WASM/NodeJS) on multiple input files in a React App
17 septembre 2024, par FlipFloopI recently followed a tutorial by Fireship.io going over making a React App that enables a user to input a video file and convert it into a gif. Here is the source GitHub Repo.


The packages used by the project are
@ffmpeg/ffmpeg
and@ffmpeg/core
, which take care of converting the video into a GIF (although this can be changed to whatever, like the FFmpeg CLI tool).

I wanted to take this a step further and make it possible for me to convert multiple videos at once, each into their own separate gif, however, I am having trouble running the next task when the first is finished.


Here is documentation I found about the ffmpeg wasm package. I also read this example given by the package providers to have multiple outputs from a single file.


Here is my code (App.jsx) :


import { createFFmpeg, fetchFile } from '@ffmpeg/ffmpeg';
const ffmpeg = createFFmpeg({ log: true });

function App() {
 const [ready, setReady] = useState(false);
 const [videos, setVideos] = useState([]);
 const [gifs, setGifs] = useState([]);
 const load = async () => {
 await ffmpeg.load();
 setReady(true);
 };

 useEffect(() => {
 load();
 }, []);

 const onInputChange = (e) => {
 for (let i = 0; i < e.target.files.length; i++) {
 const newVideo = e.target.files[i];
 setVideos((videos) => [...videos, newVideo]);
 }
 };

 const batchConvert = async (video) => {
 const name = video.name.split('.mp4').join('');

 ffmpeg.FS('writeFile', name + '.mp4', await fetchFile(video));
 await ffmpeg.run(
 '-i',
 name + '.mp4',
 '-f',
 'gif',
 name + '.gif',
 );

 const data = ffmpeg.FS('readFile', name + '.gif');

 const url = URL.createObjectURL(
 new Blob([data.buffer], { type: 'image/gif' }),
 );

 setGifs((gifs) => [...gifs, url]);
 };

 const convertToGif = async () => {
 videos.forEach((video) => {
 batchConvert(video);
 }
 );

return ready ? (
<div classname="App">
 {videos &&
 videos.map((video) => (
 <video controls="controls" width="250" src="{URL.createObjectURL(video)}"></video>
 ))}

 <input type="file" multiple="multiple" />

 {videos && <button>Convert to Gif</button>}

 {gifs && (
 <div>
 <h3>Result</h3>
 {gifs.map((gif) => (
 <img src="http://stackoverflow.com/feeds/tag/{gif}" width="250" style='max-width: 300px; max-height: 300px' />
 ))}
 </div>
 )}
</div>
) : (
 <p>Loading...</p>
);
}

export default App;



The error I am getting is along the lines of "Cannot run multiple instances of FFmpeg at once", which I understand, however, I have no idea how to make the batchConvert function only run one instance at a time, whether it's outside or inside the function.


Thank you !


-
JPEG image quality problems
2 mars 2020, par atokzzI have two different JPEG images captured by the same source (stream IP Boroscope MJPEG). I analyzed the bytes and the structure and, with my very little experience with image byte structures, I couldn’t tell the difference between the two. So, based on the image that has no defects, what makes JPEG 2 have quality problems ?
PS. : Both of them has the correct SOI and EOI markers (FFD8 and FFD9)
JPEG 1 : Image without quality problems download from here to see the bytes
Image’s preview (do not download from here)
JPEG 2 : Image with quality problems download from here to see the bytes
Image’s preview (do not download from here)
Online hex editor (online hex editor to see the binary of the image)