Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
Use dynamic filter/overlay ffmpeg for RTMP LiveStream
18 décembre 2017, par NBSI have to do a livestream using ffmpeg, but I have trouble changing overlays or mute at runtime. And if it is possible to stop and re-stream to the same rtmp channel. So the stream can continue.
Once the ffmpeg command is set, it cannot be edited. In that case, overlays won't be changed or removed. Unless the ffmpeg cmd reads from a temp location/file, when to apply overlay or mute options. Is it possible to write something like that, and do we have a sample where I can start?
The powershell script comes to mind, which can read the values from temp location and ffmpeg simply reflects the value?
Any pointers would help.
-
FFmpeg converting two videos with dynamic frame rates - dup/drop frames
18 décembre 2017, par MathoI have problems with converting two videos using ffmpeg. Those videos have dynamic frame rate. I'm using this ffmpeg command:
ffmpeg -y -i /storage/emulated/0/Movies/RMR/RMR_camera_2017-10-04-20-42-56.mp4 -i /storage/emulated/0/Movies/RMR/RMR_screen_2017-10-04-20-42-56.mp4 -strict experimental -preset ultrafast -filter_complex [0]scale=iw/4:ih/4[pip];[pip]transpose=2[rotate];[1][rotate]overlay=main_w-overlay_w-30:main_h-overlay_h-10 -profile:v main -level 3.1 -ar 44100 -b:a 160k -crf 20 -s 720x1280 -vcodec h264 -vsync 2 -acodec aac -movflags +faststart /storage/emulated/0/Movies/RMR/out.mp4
I'm using -vsync to drop duplicated frames. This is not good enough, video is with freezing frames. How can I prevent freezing?
-
PHP exec waits for return key
18 décembre 2017, par ZavfelI am trying to execute ffmpeg on PHP using exec, shell_exec, command and proc_open and did not manage to get any to work.
This is my command:exec("ffmeg -I test.fvl output.mp4 2>&1", $output, $retval);
when I run this php command, the error happens when there's a duplicate output file and prompt a stderr asking if we want to overwrite it thus, waiting for a user input. Is there any way around this to ignore the stderr?
-
How to pause/resume conversion of media file using ffmpeg in android
18 décembre 2017, par venkatesh kumarI have successfully downloaded the media file from below command using ffmpeg in my application.
Now I want to pause during on progress of the download and again I resume the same after some time.below ffmpeg command used for download and files saved successfully.
ffmpeg -i http://xx.xx-xxxxx-x.amazonaws.com/audio-output-stg/GaumeeLava51/01Track11513330525752/01Track11513330525752.m3u8 /sdcard/videokit/sample.mp3
Please help me with ffmpeg command and thanks in Advance.
-
C++ OpenCV 3.4 VideoWriter and MP4 Output File Format
18 décembre 2017, par PhilBotI'm running on an ARM BeagleBone X-15 Debian machine with Linux Kernel 4.9.35-ti-r44. In my C++ ( Qt 5 ) application, I want to save my cv::Mat frames to an MP4 format video. I can do it with MJPEG but not MP4. Whenever I try to write an MP4 video, I get run time errors of the form:
OpenCV: FFMPEG: tag 0x44495658/'XVID' is not supported with codec id 13 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x00000020/' ???'
I've tried various Google answers but none have worked.
Relevant code:
cv::Size frameSize = frame.size(); qDebug() << "Initializing Video Recording to save Video file here: " << destinationFileName; std::string filename = destinationFileName.toStdString(); //int fcc = CV_FOURCC('M','J','P','G'); //int fcc = CV_FOURCC('X','2','6','4'); int fcc = CV_FOURCC('X','V','I','D'); int fps = 1; videoRecorder = new cv::VideoWriter(filename,fcc,fps,frameSize); ... videoRecorder->write(frame);
I've downloaded and built the latest OpenCV 3.4 but the problem persists. How can I write to an MP4 File with OpenCV's video writer?