
Recherche avancée
Médias (1)
-
The Slip - Artworks
26 septembre 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (105)
-
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Contribute to a better visual interface
13 avril 2011MediaSPIP is based on a system of themes and templates. Templates define the placement of information on the page, and can be adapted to a wide range of uses. Themes define the overall graphic appearance of the site.
Anyone can submit a new graphic theme or template and make it available to the MediaSPIP community. -
Encoding and processing into web-friendly formats
13 avril 2011, parMediaSPIP automatically converts uploaded files to internet-compatible formats.
Video files are encoded in MP4, Ogv and WebM (supported by HTML5) and MP4 (supported by Flash).
Audio files are encoded in MP3 and Ogg (supported by HTML5) and MP3 (supported by Flash).
Where possible, text is analyzed in order to retrieve the data needed for search engine detection, and then exported as a series of image files.
All uploaded files are stored online in their original format, so you can (...)
Sur d’autres sites (6774)
-
Is there a way to save a matplotlib animation as a video (with ffmpeg) so that the last frame is held for N seconds ?
2 décembre 2020, par janlukeI'm using FFMpegWriter to save a matplotlib animation as a video. I'd like to hold the last frame for some seconds at the end of the video.


As a workaround, one could modify the animation itself by repeating the last frame for a number of extra steps. This number of steps can be computed as a function of the desired "hold duration" and the interval/fps of the animation.


Nonetheless, I'd like to know if there's a cleaner way to do the same without artificially modifying the animation itself and using instead some extra arguments for the writer (which uses ffmpeg in my case). Unfortunately I don't know much of ffmpeg so I'd like to have some help.


Thank you.


-
How can I spawn many ffmpeg processes that takes screenshots of stream every X seconds without killing my CPU ?
2 novembre 2020, par kinxI'm spawning hundreds of ffmpeg processes that takes RTSP streams and outputs images every X seconds. I can handle up to 300 processes of this with child_process.fork and child_process.spawn.


const imageStream = (streamUrl, streamId) => {
 return new Promise((resolve, reject) => {
 let initialBuffer = true;
 let retries = 0;
 let maxRetries = 10;
 const setOptions = (streamUrl, streamId) => {
 return [
 "-rtsp_transport",
 "tcp",
 "-i",
 streamUrl,
 "-update",
 1,
 "-r",
 "1/5",
 "-f",
 "image2",
 "-progress",
 "pipe:1",
 `./public/posters/${streamId}.jpg`,
 "-y",
 ];
 };
 const initStream = (streamUrl, streamId) => {
 const command = spawn("ffmpeg", setOptions(streamUrl, streamId), {
 detached: true,
 });
 command.setMaxListeners(0);
 command.on("exit", (code, signal) => {
 if (code === 1 && initialBuffer) {
 if (retries === maxRetries) {
 command.kill("SIGINT");
 }
 retries++;
 initStream(streamUrl, streamId);
 }
 });
 command.stdout.on("data", (chunk) => {
 if (initialBuffer) {
 initialBuffer = false;
 resolve(true);
 }
 exited = true;
 command.kill("SIGINT");
 });
 process.on("SIGINT", () => {
 command.kill("SIGINT");
 command.removeAllListeners();
 process.exit();
 });
 process.on("exit", () => {
 command.kill("SIGINT");
 command.removeAllListeners();
 });
 };
 initStream(streamUrl, streamId);
 });



I'm using
progress
buffer to listen for data to tell my app that ffmpeg has connected and to start manipulating that data.

The issue is that this is just too much for me and I need to handle more. I don't really need to stream these as live video, I just need to take image captures every X seconds.


However, it seems like there's a limited amount of child_proocesses I can use, and when I do spawn more ffmpeg processes, my Ryzen 9 CPU goes up to 100% and it freezes until I can kill the terminal.


What's the best way to do this ?


-
ffmpeg how to concacenate 2 videos in alternating order every X seconds (blinking effect) [closed]
27 octobre 2020, par aj6I'd like to use ffmpeg to stitch together a video in the following manner : I'd like to take X number of frames or seconds from 2 (or more) videos, one by one, and output a new file composed of all frames of original videos, but in a new order (not concatenated one after the other, but rather by X frames or seconds).


To clarify - let's say there are 2 videos, each 1 minute long. I'd like to concatenate these 2 videos second by second (for example), using 1 second from the first video, then 1 second from the next video, with the resulting output, the 3rd file, being 2 minutes long and containing all the information from the original vids, but played back in a "blinking" manner - a second or X number of frames from each vid.


Just to be sure it's clear : Let's say I have 2 videos, 10 seconds each, I'd like them to be joined in the following manner : (1 second from vid#1), (1 second from vid#2), (1 second from vid#1), (1 second from vid#2) etc. until both files' end. (Assume the duration of both vids is same).


I understand how to do it if I need to simply concatenate files one after another, or even switch from one to the next a few times with an overlay, but I was unable to find ANYTHING about joining videos frame by frame or X number of seconds for the entire duration of the vid, only solutions for switching video overlay a couple of times, putting in time stamps by hand.


Any help is much appreciated. Thank you.