Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
FFMEG multiple frames extraction
28 janvier 2017, par Yevgeni BurshteinI need a command (if there is any) that will allow me to extract frames at different time offsets. Currently I'm able to extract them one by one using ss command.
Example of current command:
C:\ffmpeg\bin\ffmpeg.exe -i %1 -ss %2 -vframes 1 -s %3x%4 -f image2 %5 -hide_banner -loglevel panic
This works very slowly on large number of time offsets.
-
FFMPEG, Netbeans and C++ [duplicate]
28 janvier 2017, par MurtadhaThis question already has an answer here:
- Netbeans and MinGW-w64 3 answers
I used to work on C++ project on Netbeans and I would like to use ffmpeg libraries / include files all the stuff inside my program. I don't know how to install ffmpeg in there and integrate it with Netbeans have installed also the latest mingw? I have surfed the net for such a topic then I have found one but to be honest I understand a very little.
System info:
Windows 8 64bit
Netbeans 7.3 32.b
mingw 32bit
opencv 4.4 32.bit -
Create time lapse video from other video
27 janvier 2017, par OrlandoUsing avconv (or even ffmpeg, so I can use as a reference), how can I create a time lapse video by taking only anchor/reference frames from another video? Most information I find is on how to create a time lapse video by combining images, and I'd like to do it by extracting frames from a video. Say, if a video is 30 seconds long at 30 FPS, I'd like to take 60 out of those 900 frames (900/60 = every 15 seconds) to produce a 2 second video.
-
How to cut and concatenate the file so it is not off-beat when the file I got the bpm from is being muxed ?
27 janvier 2017, par P. DeeI am cutting files with ffmpeg based on the bpm I found in a music file. So let's assume, the file's bpm = 120. That means, there are 2 bps and 1 beat every 500ms.
So I cut a video file with multiples of 500ms length, ie 500ms, 1500ms, 3000ms etc. length. But cutting it using
ffmpeg -ss start -i fileorig.mp4 -t duration part_number.mp4
and finally creating a
mylist.txt
withfile 'part_1.mp4' file 'part_2.mp4' ...
and adding them via
ffmpeg -f concat -i mylist.txt -c copy output.mp4
and replacing the audio track with the music file, makes the video be off-beat after some time.
How to cut and concatenate the file so it is not off-beat when the file I got the bpm from is being muxed?
-
FCNTL File IO errors using FFmpeg on iOS
27 janvier 2017, par ebeis051I have an application that leverages FFmpeg libraries to play video (modeled after FFplay). It works on every platform except iOS, where I experience a strange file IO issue that I cannot figure out.
I am able to stream two videos successfully, but on the third stream attempt the calls to
av_read_frame()
fail and the AVIOContext shows error9
,E_BADF
. To investigate, I added some logging messages to try to see where the error originated and I found that the error was coming from theread()
call inside thefile_read()
function in libavformat/file.c.I then looked into how the video files were being opened and I found that on the third run, the
open()
call (insideavpriv_open()
in libavutil/file_open.c) was returning0
as the file descriptor, whereas the first two were returning more normal positive values. After a few successful attempts to read from0
, the read calls proceeded to fail indefinitely withE_BADF
.The
0
file descriptor is usually reserved forstdin
, and I am confident my application is not closingstdin
at any point. Havingopen()
return0
as the file descriptor isn't inherently wrong, but in this case it eventually results in a read failure every time. I am able to work around this by artificially using up0
in the table by opening something but not operating on it, and then restarting the open process to get back to a positive value. When I do this, my videos are able to play again. My only theory to explain this behaviour is that something somewhere is repeatedly closing the0
file descriptor underneath my feet, which causes the read attempts to start failing.I can't say for sure yet if this is a problem in FFmpeg or possibly the operating system, but I am unable to reproduce this issue in a simple program that doesn't use FFmpeg, nor does it occur on any other platform as I mentioned above. I have also tried many different versions of the FFmpeg source running on iOS versions 9 and 10 and they all demonstrate the issue. I realize iOS is not a high runner platform for FFmpeg use, but I am wondering if anyone has attempted to build and use FFmpeg for iOS and recognizes any of these issues. Any pointers in the right direction would be greatly appreciated.