
Recherche avancée
Médias (3)
-
MediaSPIP Simple : futur thème graphique par défaut ?
26 septembre 2013, par
Mis à jour : Octobre 2013
Langue : français
Type : Video
-
GetID3 - Bloc informations de fichiers
9 avril 2013, par
Mis à jour : Mai 2013
Langue : français
Type : Image
-
GetID3 - Boutons supplémentaires
9 avril 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Image
Autres articles (19)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Selection of projects using MediaSPIP
2 mai 2011, parThe examples below are representative elements of MediaSPIP specific uses for specific projects.
MediaSPIP farm @ Infini
The non profit organizationInfini develops hospitality activities, internet access point, training, realizing innovative projects in the field of information and communication technologies and Communication, and hosting of websites. It plays a unique and prominent role in the Brest (France) area, at the national level, among the half-dozen such association. Its members (...)
Sur d’autres sites (4574)
-
ffmpeg : Continuous streaming plus recording at random time
21 juin 2014, par Ralf AndersonIt’s possible to stream and record the same input at the same time with ffmpeg. What I want to do though, is only start (and stop) recording at some random point later.
Is it possible to somehow tell the active ffmpeg process (which is already streaming) to also start recording ?
My first alternative was to simply start another ffmpeg process just to record, but the source input will be blocked by the first ffmpeg process streaming it and the stream will be blocked by the viewer displaying the stream on screen, so I can’t access anything to record. Can I change something so the stream/source input is not reserved for just one receiver ?In my concrete scenario, the source input is a webcam, which I want to continuously display plus be able to record at user-driven time. I stream the webcam using ffmpeg via udp to the localhost and can view it with a suitable player. I just can’t record it while also viewing and vice versa.
I also tried the "Tee Muxer", which can generate multiple outputs with the same ffmpeg instance. I streamed it to the localhost on different ports, one to view and one to record.
ffmpeg.exe -f dshow -i video="ManyCam Virtual Webcam" -map 0 -vcodec h264 -r 25 -f tee "[f=mpegts]udp://127.0.0.1:33333/|[f=mpegts]udp://127.0.0.1:33334/"
This works fine, except for the delay of about 500ms, which I only get when I stream, not when I access the Webcam directly with ffplay e.g.. I was expecting no delay at all, since it’s all local, but I suppose this comes from the encoding ? I’ve tried streaming the raw video (setting -vcodec rawvideo), but I can neither view it with ffplay nor record it. Are there some special parameters needed for rawvideo ? After all, the input for the stream is rawvideo too, according to ffmpeg.
I have not yet looked at ffserver, but I assume it would be no different to generating multiple outputs with tee muxer in my use case ?
If I somehow could be able to display/record the stream generated by
ffmpeg.exe -f dshow -i video="ManyCam Virtual Webcam" -map 0 -vcodec rawvideo -r 25 -f tee "[f=mpegts]udp://127.0.0.1:33333/|[f=mpegts]udp://127.0.0.1:33334/"
then that would already suffice. Or changing the encoding in such a way that no compression is done at all should work just as well (if that’s causing the delay).
-
The Method of Making Video Special Effect
19 janvier 2019, par szhanI’ve been trying to use javacv libraries to make video effects.
like this screenshotI’m trying to use ffmpeg’s watermarking method to cover the head. But I don’t know how to control the transparency and shape of the watermarking.
watermark = "movie=./girl.png[watermark];[in][watermark]overlay=W-w-300:10:format=rgb[out]";
FFmpegFrameFilter frameFilter = new FFmpegFrameFilter(watermark, width, height); -
How can I add a random watermark to a video during processing in Node.js and Express.js using FFmpeg ?
3 avril 2023, par Ariful islamI want to add a watermark to a video that changes randomly during processing. I am using Node.js and Express.js with FFmpeg. Currently, I am able to add a static watermark to the video using the drawtext filter. However, I want to change the watermark text randomly every few seconds.


How can I achieve this using FFmpeg in my Node.js and Express.js app ? Here's my current code :


const email = 'name@gmail.com';
app.post('/addwatermark', upload.single('video'), (req, res) => {
const fileName = path.basename(req.file.path) + '.mp4';
const outputPath = `public/reduceSize/${fileName}`;
const outputPathWithWatermark = `public/reduceSize/${fileName}-wm.mp4`;
let watermarkPosition = { x: 10, y: 650 };

// Create the directory if it doesn't exist
const outputDir = path.dirname(outputPathWithWatermark);
if (!fs.existsSync(outputDir)) {
 fs.mkdirSync(outputDir, { recursive: true });
}

// Send a comment to keep the connection alive
res.write(': ping\n\n');

// Function to randomly generate watermark position
const changeWatermarkPosition = () => {
 watermarkPosition = { x: Math.floor(Math.random() * 100), y: Math.floor(Math.random() * 100) };
};

// Change watermark position every 5 seconds 
setInterval(changeWatermarkPosition, 5000);
const watermarkStyle = `-vf drawtext=text='${email}':x=(w-text_w-10):y=(h-text_h-10):fontcolor=white:fontsize=24:shadowcolor=black:shadowx=1:shadowy=1:box=1:y=${watermarkPosition.y}:fontcolor=red:fontsize=24:shadowcolor=black:shadowx=1:shadowy=1:box=1:boxcolor=black@0.5`

ffmpeg(req.file.path)
 .addOption(watermarkStyle)
 .output(outputPathWithWatermark)
 .videoCodec('libx264')
 .audioCodec('aac')
 .size('50%')
 .on('error', (err) => {
 console.error(`FFmpeg error: ${err.message}`);
 res.status(500).json({ message: err.message });
 })
 .on('progress', (progress) => {
 // Set the watermark position every 5 seconds randomly
 changeWatermarkPosition();

 const mb = progress.targetSize / 1024;
 const data = {
 message: `Processing: ${mb.toFixed(2)} MB converted`,
 watermark: `Adding watermark to video: ${progress.framesProcessed} frames processed`
 };
 console.log(data.message);
 res.write(`data: ${JSON.stringify(data)}\n\n`);

 })
 .on('end', () => {
 console.log(`Video successfully converted to ${outputPathWithWatermark}`);
 // Remove the temporary file
 })
 .run();
 });



I want to secure my video from unauthorized person by using email in a video and the email will be move around the video randomly every 5 seconds.


I have read this (Add dynamic watermark that randomly changes position over video React/Node) document but didn't get any solution.