I am trying to use ffmpeg for windows to convert thousands of images and sounds to a single video file.
ffmpeg -i apples.jpg -i oranges.jpg -i orangessound.wav -i bananas.jpg -vcodec mpeg4 test.avi
My delphi program generates the command line as a string, and I use shellexecute to call it.
But is it true that a command line cannot be longer than 8191 characters? If so, can ffmpeg read the parameters from a file instead?
It is not possible in this case to rename the pictures with consecutive numbers
You might want to consider using the open source libavcodec library in your own code instead. It is the same library that ffmpeg uses internally (there is a separate library called libav, which is an off-shoot of the original ffmpeg libavcodec library). Then you can do whatever you want with the files. You can look at the ffmpeg source code to see how it interprets the parameters you want to use, then adapt that logic to your own code.
ffmpeg does not support taking the entire command from file. you need to modify the code for your custom use.
it can take encoding parameter using "-fpre" option.
Related
I had successfully build ffmpeg into xcode but I didn't get idea , how to execute command into project.I research hard on it and fined how to play video using encoding and decoding,but did not get idea how to run command.
You cannot run ffmpeg command directly via code, instead you should leverage the c code to do encoding decoding which can be achieved by using objective c wrappers. FFmpegWrapper gives you a lightweight wrapper class for media conversion.
Does anyone know if it is possible to convert a sound file in the Documents directory from within an app? I have a recorded sound file that will be available in iTunes File Sharing that I need to convert. Is afconvert available from within iOS?
Thanks
I'm not sure from what format to what format you want to convert to, but converting audio during runtime is not as simple as the command-line afconvert tool.
Check out Apple's sample projects iPhoneACFileConvertTest or ConvertFile. I think these would be good starting points if you want to convert audio in your app.
For what it's worth, afconvert is just a handy command-line interface to the features of the ExtAudioFile API which you can find in -- Using this API you can convert from any supported file format/audio format combination TO any supported file format/audio format combination.
How can I use Matroska container to save H264 video? I have been looking for examples but I have found none. Maybe I am searching with wrong parameters. Can anyone point me in right direction? I have looked at Matroska source but it seems overkill to study the whole source code to accomplish this. There should be a practical way to do it.
Working with DirectShow you could use the Matroska Muxer filter
or you could dump to an avi then use ffmpeg to copy the stream(s) to an mkv
ffmpeg -i <input_file> -vcodec copy -acodec copy output.mkv
I need to extract only the i-frames from an MPEG encoded video file(it may be a .avi file or .mp4 file). Is it possible to atleast identify the i-frames.
It looks like this ffmpeg enhancement can accomplish this for you using the select filter to filter all I-Frames. You may need to build ffmpeg from source to get this capability I'm not sure. Here is an Ubuntu guide with the details, and here is where you can get the nightly Windows binary version.
EDIT: OpenCV relies on ffmpeg API's to capture video from a file. However, the functionality you want is a bit specific, so you are going to need to write your own custom filtering module with ffmpeg's libavfilter. Here is one of their how to guides on using libavfilter. In particular, as I mentioned above, you will probably want to use the select filter provided by libavfilter. This will filter all I-frames from the stream for you to process.
Hope that helps!
I'm looking for an image resizer / thumbnailer that is lightweight and efficient. Something that does a good job with all image types, but most importantly jpeg and png.
I've looked into ImageMagick and GraphicsMagick, but they are too heavy. This is something I want to distribute with my app, so the smaller the better. I don't need all the functionality of *Magick, just simple resizing.
I've found the FreeImage library which people seem to like as a light library. Does anyone know if there's a simple command-line utility that wraps FreeImage?
Thanks!
Although ImageMagick is pretty big (36.2MB), you only need the convert.exe or mogrify.exe binary, depending on whether you want to create a new image (convert), or overwrite the existing one (mogrify).
Download the no-installer version of ImageMagick (currently ImageMagick-6.8.6-8-Q16-x86-windows.zip), then extract the binary you need.
I took mogrify.exe - a total of 5.66MB; not bad!
Have a look at the netpbm toolkit, the toolkit is just a bunch of small single purpose command line programs that you wire together using pipes. You might be able to find what you need in there.
On linux/OSX can use sips
sips -Z 640 *.jpg
i have bulk image contain in a directory name with test And i want to re-size all of them single command line
cd /test/
find . -name "*.jpg" -exec convert -quality 75 {} /var/www/html/converted/{} \;
/var/www/html/converted/ this used for where converted image will save .