How to encode Bitmaps into a video using MediaCodec?

I have modified the code provided by abalta to accept bitmaps in realtime (ie you don’t already need to have the bitmaps saved to disc). It also has a performance improvement since you don’t need to write then read the bitmaps from disc. I also increased the TIMEOUT_USEC from the original example which fixed some … Read more

Is there a way to use ffmpeg to determine the encoding of a file before transcoding?

Use ffprobe Example command $ ffprobe -v error -select_streams v:0 -show_entries stream=codec_name -of default=nokey=1:noprint_wrappers=1 input.mp4 Result h264 Option descriptions -v error Omit extra information except for fatal errors. -select_streams v:0 Select only the first video stream. Otherwise the codec_name for all other streams in the file, such as audio, will be shown as well. -show_entries … Read more

Extracting frames from MP4/FLV?

The command ffmpeg -ss 00:00:25 -t 00:00:00.04 -i YOURMOVIE.MP4 -r 25.0 YOURIMAGE%4d.jpg will extract frames beginning at second 25 [-ss 00:00:25] stopping after 0.04 second [-t 00:00:00.04] reading from input file YOURMOVIE.MP4 using only 25.0 frames per second, i. e. one frame every 1/25 seconds [-r 25.0] as JPEG images with the names YOURIMAGE%04d.jpg, where … Read more