
Recherche avancée
Autres articles (47)
-
Use, discuss, criticize
13 avril 2011, parTalk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
A discussion list is available for all exchanges between users. -
MediaSPIP Player : problèmes potentiels
22 février 2011, parLe lecteur ne fonctionne pas sur Internet Explorer
Sur Internet Explorer (8 et 7 au moins), le plugin utilise le lecteur Flash flowplayer pour lire vidéos et son. Si le lecteur ne semble pas fonctionner, cela peut venir de la configuration du mod_deflate d’Apache.
Si dans la configuration de ce module Apache vous avez une ligne qui ressemble à la suivante, essayez de la supprimer ou de la commenter pour voir si le lecteur fonctionne correctement : /** * GeSHi (C) 2004 - 2007 Nigel McNie, (...) -
MediaSPIP Player : les contrôles
26 mai 2010, parLes contrôles à la souris du lecteur
En plus des actions au click sur les boutons visibles de l’interface du lecteur, il est également possible d’effectuer d’autres actions grâce à la souris : Click : en cliquant sur la vidéo ou sur le logo du son, celui ci se mettra en lecture ou en pause en fonction de son état actuel ; Molette (roulement) : en plaçant la souris sur l’espace utilisé par le média (hover), la molette de la souris n’exerce plus l’effet habituel de scroll de la page, mais diminue ou (...)
Sur d’autres sites (4944)
-
Directly response video to the client for download when ffmpeg cutting the video
7 mars 2023, par web disinerI am bulding a web application using Node.js with Express framework. That simply cut the video and send to the client browser as a response for download. For cutting a video i use FFmpeg tool.
all things working fine but ffmpeg cutted video save to working directory.


Below is my code..


const child_process= require("child_process")

const cutting =async()=>{
 ffmpeg = child_process.spawn('ffmpeg', [

 "-i", /video.mp4,
 "-ss", "00:02:20",
 "-to","00:02:50",
 "-c:v", "copy", 
 "-c:a", "copy", 
 "output3.mp4"






 ])
 ffmpeg.stderr.on('data', function(data) {
 console.log('ffmpeg stderr data = '+data );
 });

}



This is image of working directory


Now i want when
**ffmpeg cutting the video it directly send chunks of video to the client for download **
without saving it in working directory or server where my code is hosted.

How can i do this ? which approch will useful for this ?
Anyone help me. much appreciated
Thanks


-
How to use ffmpeg.wasm client side
9 avril 2022, par Yordan RadevI am looking to use ffmpeg.wasm in a serverless Vue app, but have no idea how to integrate it. Ideally I want to use it to stitch together
Canvas HTMLElement
into a video output that the user can download. If anyone can make a JSFiddle, Codepen or whatever other medium demo, that would be great. Working off of this example I am not sure how to add a Canvas element as a frame to a file and then createURL for the resulting file.

-
Is it possible to use something other than a circular buffer when using ffmpeg to pass RTSP video to a WebRTC client ?
3 novembre 2024, par DocticoI have a Node application that uses ffmpeg to receive the RTSP stream of an ip camera (h264), and then pass send it using node-webrtc to a remote client. However, in my current implementation, ffmpeg only outputs 8192 byte chunks, which must be buffered in order to create the full frame that my current node-webrtc flow expects. This circular buffer results in a 1-2 second delay when the client is viewing the video. Is there any way to pass the stream through node-webrtc as the chunks come in, or at least extract complete frames so that circular buffering is not necessary ?


So far, I have tried this, which works but has a 1-2 second delay, and even higher delay with higher resolution cameras :


async startStream() {

 const rtspUrl = 'rtsp://my-rtsp-url';

 const videoSource = new wrtc.nonstandard.RTCVideoSource();
 const videoTrack = videoSource.createTrack();

 const width = 640;
 const height = 480;
 const frameSize = width * height * 1.5; // YUV420p format

 //circular buffer:
 let frameBuffer = Buffer.alloc(0);
 const frameStream = new Writable({
 write: (chunk, encoding, callback) => {
 frameBuffer = Buffer.concat([frameBuffer, chunk]);

 while (frameBuffer.length >= frameSize) {
 const frame = frameBuffer.slice(0, frameSize);
 frameBuffer = frameBuffer.slice(frameSize);

 videoSource.onFrame({
 width: width,
 height: height,
 data: new Uint8ClampedArray(frame)
 });
 }
 callback();
 }
 });

 const ffmpegProcess = ffmpeg(rtspUrl)
 .inputOptions([
 `-fflags nobuffer`,
 `-flags low_delay`,
 `-rtsp_transport tcp`,
 `-strict experimental`,
 `-analyzeduration 0`,
 `-threads 0`,
 `-hwaccel auto`
 ])
 .outputOptions([
 `-f rawvideo`,
 `-c:v rawvideo`,
 '-b:v', streamId === 1 ? '2000k' : '1000k',
 '-bf', '0',
 `-s ${width}x${height}`,
 `-pix_fmt yuv420p`,
 `-tune zerolatency`
 ])
 .on('start', (cmd) => console.log('FFmpeg started:', cmd))
 .on('error', error => {
 console.error('FFmpeg error:', error);
 this.stopStream();
 })
 .on('end', () => {
 console.log('FFmpeg stream ended');
 this.stopStream();
 })

 ffmpegProcess
 .pipe(frameStream);

 return videoTrack;
 }