FFmpegFrameRecorder use on Android

2,304 views
Skip to first unread message

Ljupce

unread,
Dec 13, 2011, 3:33:26 AM12/13/11
to javacv
Hi,

I have some problems writing a video on android device. I'm trying to
use FFmpegFrameRecorder in the following manner:

recorder = new FFmpegFrameRecorder("/sdcard/download/test.mp4",
imageWidth, imageHeight);
recorder.setCodecID(CV_FOURCC('M','P','4','2'));
...
recorder.start();

But I have some issues with the codecs. I have a warning saying "Codec
Not found". If I skip the setCodecID() part, I have another warning
"Could not open codec".

Do you have some examples of video writing on android devices?

Thank you

Ljupce

Samuel Audet

unread,
Dec 13, 2011, 3:43:48 AM12/13/11
to jav...@googlegroups.com

Ljupce

unread,
Dec 13, 2011, 10:38:24 AM12/13/11
to javacv
Thank you,

It worked by setting the following properties:

recorder.setCodecID(CODEC_ID_MPEG4);
recorder.setFormat("mp4");
recorder.setPixelFormat(PIX_FMT_YUV420P);

Ljupce

On 13 déc, 09:43, Samuel Audet <samuel.au...@gmail.com> wrote:
> Hello,
>

> Here's a thread with the info you need:http://groups.google.com/group/javacv/browse_thread/thread/f3175b3c56...

Samuel Audet

unread,
Sep 20, 2012, 10:05:37 PM9/20/12
to jav...@googlegroups.com
On 09/20/2012 09:44 PM, Arun Goyal wrote:
> I have some issue when i run the following code nothing happens. I want
> to make a flv file with audio and video.

No error messages in the log?

Samuel Audet

unread,
Feb 17, 2013, 8:02:30 AM2/17/13
to jav...@googlegroups.com
On 02/14/2013 03:28 PM, Arun Goyal wrote:
> Thanx for your response.Everything is working fine.I just want to know how to set audio bitrate for diffrent devices.

That would be calling FFmpegFrameRecorder.setAudioBitrate() before
calling start().

Samuel

Reply all
Reply to author
Forward
0 new messages