Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
How to decode the video stream of an mp4 file and save the decoded images to local directory in NodeJs
8 août 2018, par Rohit VermaHow to decode the video stream of an mp4 file and save the decoded images to local directory in NodeJs. I have tried ffmpeg and fluent ffmpeg but didn't get clear idea how to use,As I was getting error while using fluent ffmpeg
Code snippet:
const ffmpeg = require('fluent-ffmpeg') const probe = require('ffmpeg-probe') const info = await probe('input.mp4')
and in case of ffmpeg I have tried this,
var ffmpeg = require('ffmpeg'); try { var process = new ffmpeg("VID_20160805_121411556.mp4"); process.then(function (video) { // Callback mode video.fnExtractFrameToJPG('C:/Users/PcName/Documents', { frame_rate : 1, number : 5, file_name : 'my_frame_%t_%s' }, function (error, files) { if (!error) console.log('Frames: ' + files); }); }, function (err) { console.log('Error: ' + err); }); } catch (e) { console.log(e.code); console.log(e.msg); }
Nothing is working and I didn't get any clue how to do so.
-
How do I download the past x minutes of an ongoing livestream with FFMPEG and Youtube-dl
8 août 2018, par Arno van der WeijdenI'm trying to download the last 2 minutes of a livestream upon a certain trigger. However this trigger triggers just after the thing I want to record.
I tried the following but that doesn't seem to work. I can only download what is currently streaming or will stream in the near future.
ffmpeg -i (output of youtube-dl -g youtube-live-stream-url) -c:v copy -c:a aac -ss -00:02:00 -strict experimental -t 00:02:00 last2minutes.mp4
Does anyone have an idea how I could set a negative start time?
-
Issues with fluent-ffmpeg plugin in angular-cli project
8 août 2018, par EscoI'have installed 'fluent-ffmpeg' plugin in my project and I'm including it in the following way in my component.ts file
declare var require; var ffmpeg = require('fluent-ffmpeg');
I'm getting the following issues while building using ng serve
ERROR in ./node_modules/fluent-ffmpeg/index.js Module not found: Error: Can't resolve './lib-cov/fluent-ffmpeg' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg' ERROR in ./node_modules/fluent-ffmpeg/lib/ffprobe.js Module not found: Error: Can't resolve 'child_process' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/utils.js Module not found: Error: Can't resolve 'child_process' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/processor.js Module not found: Error: Can't resolve 'child_process' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/recipes.js Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/capabilities.js Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/processor.js Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/isexe/windows.js Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/isexe' ERROR in ./node_modules/isexe/mode.js Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/isexe' ERROR in ./node_modules/isexe/index.js Module not found: Error: Can't resolve 'fs' in '/home/projects/angular/demo/node_modules/isexe' ERROR in ./node_modules/fluent-ffmpeg/lib/utils.js Module not found: Error: Can't resolve 'os' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/fluent-ffmpeg.js Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/processor.js Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/recipes.js Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/capabilities.js Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ERROR in ./node_modules/fluent-ffmpeg/lib/options/misc.js Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib/options' ERROR in ./node_modules/which/which.js Module not found: Error: Can't resolve 'path' in '/home/projects/angular/demo/node_modules/which' ERROR in ./node_modules/fluent-ffmpeg/lib/recipes.js Module not found: Error: Can't resolve 'stream' in '/home/projects/angular/demo/node_modules/fluent-ffmpeg/lib' ℹ 「wdm」: Failed to compile.
Can somebody help me in resolving this?
-
FFMPEG video encoding time increases over time
8 août 2018, par NStofI am creating a fairly basic DVR in C# using the FFMPEG wrapper in Accord.net. Essentially it works by getting the raw frames from the on-board frame grabber, displays the frame on screen and places it in a buffer. In a Separate thread in 20 second intervals, the frames are taken from the buffer and using Accord.Video.FFMPEG.VideoFileWriter.WriteVideoFrame(Bitmap bmp) the frame is encoded and saved to disk. Video is saved in two minute file chunks.
This works happily for about 24-30 hours, however after that it looks like the average time it takes to encode/save each frame increases to the point where it gets new frames faster than they can be saved. This causes buffer to grow and ends in tears.What I would like to know is why does the time it takes to complete the WriteVideoFrame(Bitmap bmp) function increase over time.
What I think I know so far: I do not know if this problem is caused by something in FFMPEG or in the Accord.net wrapper. I am reasonably sure it is not caused by hardware. Neither CPU usage nor HDD are working particularly hard. In fact, when I monitor the CPU usage, it does not work any harder or less hard when the encoding time increases. When I stop recording (close and dispose all Accord.net objects) and start again, it does not reset the encoding speed. Only when I close the software and start it again does it fix the problem. Any thoughts and help with this will be greatly appreciated. If more information is required, please let me know.
-
How to make robotic voice use ffmpeg
8 août 2018, par Cuong PhamI can easily create it by using Vocoder option of Audacity software follow the video: https://www.youtube.com/watch?v=dXNrWrxIaRE&t=151s , but I want to make robotic voice from audio file by ffmpeg , Ffmpeg is realy big library so it's hard for me. please help me!