
Recherche avancée
Médias (1)
-
Bug de détection d’ogg
22 mars 2013, par
Mis à jour : Avril 2013
Langue : français
Type : Video
Autres articles (106)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Websites made with MediaSPIP
2 mai 2011, parThis page lists some websites based on MediaSPIP.
-
Creating farms of unique websites
13 avril 2011, parMediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)
Sur d’autres sites (13726)
-
flient-ffmpeg getting error as "ffmpeg exited with code 1 : pipe:0 : Invalid data found when processing input"
6 avril 2023, par Abhishek RawalI am trying to create API where i need to get uploaded video and create thumbnail from that video. But conditions are :


- 

- Video should not store on local disk
- Once thumbnail is create it should not store on local disk, instead it should directly uploaded to AWS s3 bucket.






Following is the code i am trying with :




const ffmpeg = require('fluent-ffmpeg');
const stream = require('stream');

router.post('/thumbnail', upload.any(), (req, res) => {
 const videoBuffer = req.files[0].buffer;
 
 let readableVideoBuffer = new stream.PassThrough();
 readableVideoBuffer.write(videoBuffer);
 readableVideoBuffer.end()
 
 let bufferStream = new stream.PassThrough();
 
 ffmpeg(readableVideoBuffer)
 .on('filenames', function(filenames) {
 console.log('Will generate ' + filenames.join(', '))
 })
 .on('end', function() {
 console.log('Screenshots taken');
 })
 .on('error', (err) => {
 console.log(err);
 })
 .screenshots({
 count: 4,
 size: '100x100',
 timestamps: ['00:00:01.000'],
 })
 .writeToStream(bufferStream, { end: true }); /* while using this statement i am getting error */
 
 const buffers = [];
 bufferStream.on('data', function (buf) {
 buffers.push(buf);
 });
 bufferStream.on('end', function () {
 const outputBuffer = Buffer.concat(buffers);
 // use s3 bucket code here
 console.log('outputBuffer===========>', outputBuffer)
 });
})







so while calling this API my app is crashing and i am getting error as :




Error : ffmpeg exited with code 1 : pipe:0 : Invalid data found when
processing input




Blockquote


If i am not using this statement :




.writeToStream(bufferStream, end : true ) ;




then able to save file but in local disk, which is not required in my case.


Please help me to understand what is wrong in this code, how i can resolve it.
Any type of help is appreciated.


-
Is it possible on FFMPEG to pass RAW frames from RTSP to pipe AND write video file segments by time to disk ?
27 mars 2023, par Roberto AlcantaraI'm trying to receive RTSP frames to be processed by OpenCV, via ffmpeg using python. This is ok.


However I also need to write this video to disk one video each minute. This last part is the problem.


This is ok and works, but only write to a single file 'OUTPUT.TS' :


command = ['C:/ffmpeg/bin/ffmpeg.exe',
 '-rtsp_transport', 'tcp', # Force TCP (for testing)
 '-max_delay', '30000000', # 30 seconds (sometimes needed because the stream is from the web).
 '-i', STREAM_ADDRESS,
 '-f', 'rawvideo', # Video format is raw video
 '-pix_fmt', 'bgr24', # bgr24 pixel format matches OpenCV default pixels format.
 '-an', 'pipe:',
 '-vcodec', 'copy', '-y', 'OUTPUT.TS']

ffmpeg_process = subprocess.Popen(command, stdout=subprocess.PIPE)



but since I'm using -f RAW I can't add something like


'-f segment -segment_time 1800 -strftime 1 "%Y-%m-%d_%H-%M-%S.ts'



I tried to use some ffmpeg combinations but without success.


There are any way to do this on FFMPEG without start/stop the ffmpeg process ?


-
Streaming video with FFmpeg through pipe causes partial file offset error and moov atom not found
12 mars 2023, par MoeI'm trying to stream a video from firebase cloud storage through ffmpeg then to the HTML video player, using a very basic example with the range header worked fine and was exactly what I was trying to do, but now when I'm trying to pipe the stream from firebase then through ffmpeg then to the browser it works fine for just first couple of requests (First 10 seconds) but after that It faced these issues :


- 

- Unable to get the actual time of the video on the browser (Constantly changing as if it doesn't know metadata)
- On the server it fails to continue streaming to the request with the following :






[NULL @ 000001d8c239e140] Invalid NAL unit size (110356 > 45446).
[NULL @ 000001d8c239e140] missing picture in access unit with size 45450
pipe:0: corrupt input packet in stream 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 000001d8c238c7c0] stream 0, offset 0x103fcf: partial file



and then this error as well :


[mov,mp4,m4a,3gp,3g2,mj2 @ 000001dc9590c7c0] moov atom not found
pipe:0: Invalid data found when processing input



Using nodejs and running Ffmpeg V 5.0.1 on serverless env :


const filePath = `sample.mp4` || req.query.path;

 // Create a read stream from the video file
 const videoFile = bucket.file(filePath);

 const range = req.headers.range;

 if(!range){
 return res.status(500).json({mes: 'Not Found'});
 }

 // Get the file size for the 'Content-Length' header
 const [metadata] = await videoFile.getMetadata();
 const videoSize = metadata.size;

 const CHUNK_SIZE = 1000000; // 1MB

 const start = Number(range.replace(/\D/g, ""));
 const end = Math.min(start + CHUNK_SIZE, videoSize - 1);
 
 // Create headers
 const contentLength = end - start + 1;
 const headers = {
 "Content-Range": `bytes ${start}-${end}/${videoSize}`,
 "Accept-Ranges": "bytes",
 "Content-Length": contentLength,
 "Content-Type": "video/mp4",
 // 'Transfer-Encoding': 'chunked'
 };
 
 // HTTP Status 206 for Partial Content
 res.writeHead(206, headers);
 
 // create video read stream for this particular chunk
 const inputStream = videoFile.createReadStream({ start, end });

 const ffmpeg = spawn(pathToFfmpeg, [
 // '-re', '-y', 
 '-f', 'mp4', 
 '-i', 'pipe:0', // read input from standard input (pipe)
 '-c:v', 'copy', // copy video codec
 '-c:a', 'copy', // copy audio codec
 '-map_metadata', '0',
 `-movflags`, `frag_keyframe+empty_moov+faststart+default_base_moof`,
 '-f', 'mp4', // output format
 'pipe:1',
 // write output to standard output (pipe)
 ], {
 stdio: ['pipe', 'pipe', 'inherit']
 });

 inputStream.pipe(ffmpeg.stdin);

 ffmpeg.stdout.pipe(res);
 



Note that this version is trimmed I do have a lot of log code and error handling of course, and basically again what's happening is that for the first request it is working fine but then if the player requests a part like minute 5 for example it gives the errors I mentioned above :


What I have tried :


- 

- At first I tried adjusting the ffmpeg parameters with the following to try and fix the moov atom error but it still presisted :




-map_metadata', '0',
 `-movflags`, `frag_keyframe+empty_moov+faststart+default_base_moof`



- 

- I have also tried to stream to file then through pipe but that also gave the same errors.




Finally after googling for about day and a half trying out tens of solutions nothing worked, now I'm stuck at this error where I'm not able to process a specific fragment of a video through ffmpeg, is that even possible or am I doing something wrong ?


Why am I even streaming through ffmpeg ?


I am indeed of course going to add filters to the video and a dynamic watermark text for every request that's why I need to use ffmpeg through stream not directly through a file as the video filters will change on demand according to every user