Friday, 23 August 2013

Rendering Performance ffmpeg of JAVACV on Android

Rendering Performance ffmpeg of JAVACV on Android

I am doing an application that creates a video using a set of photos saved
in the sd-card. The problem I am trying to fix is that the application
crashes when I create some videos. The crashes depends of the resolution
of the source picture files. For example, I can render a video using 400
images with a resolution of 320x480 but I can only do a 25-frames video
using images with a resolution of 2500x3200.
I am doing the rendering process in background using Asynctask (for
providing a feedback to the user and maintain it informed of the rendering
process). When the rendering process crashes no warnings/errors/etc are
captured in the logcat. Using the DDMS for examining the memory usage I
can not view any memory leak (I also do not recieve any memory warning on
the logcat). For this reasons I supose that it may be a problem related
with the ffmpeg libraries (but I have no idea).
I have testet different codecs defined on avcodec.java, like:
AV_CODEC_ID_MPEG1VIDEO = 1,
AV_CODEC_ID_MPEG2VIDEO = 2,
AV_CODEC_ID_H263 = 5,
AV_CODEC_ID_MJPEG = 8,
etc
Trying with lossless video codecs seems not doing effect, and I also get
some errors when I try with some codecs.
I am running my application on a Sony Ericsson Xperia Arc (1ghz cpu, 320mb
intern memory).
I do not know if my smartphone has enough power to render a long HD video,
but I see that in the market there are some app's like Droid Timelapse
that can do it.
Any suggestion would be appreciated I have no idea how can I fix that.
Thank you.

No comments:

Post a Comment