FFmpegFrameRecorder use on Android

2.301 lượt xem
Chuyển tới thư đầu tiên chưa đọc

Ljupce

chưa đọc,
03:33:26 13 thg 12, 201113/12/11
đến 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

chưa đọc,
03:43:48 13 thg 12, 201113/12/11
đến jav...@googlegroups.com

Ljupce

chưa đọc,
10:38:24 13 thg 12, 201113/12/11
đến 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

chưa đọc,
22:05:37 20 thg 9, 201220/9/12
đến 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

chưa đọc,
08:02:30 17 thg 2, 201317/2/13
đến 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

Trả lời tất cả
Trả lời tác giả
Chuyển tiếp
0 tin nhắn mới