views:

958

answers:

3

Hi All,

I want to play the flv files in Android. So what I thought is to convert the flv file to mp4 or 3gp(for which there is a decoder in Android). OpenCore can be used to convert. I have looked into opencore code, there is a class in opencore "/android/external/opencore/fileformats/mp4/composer" to create the mp4 file. It has apis like

AddTrack 
AddSampleToTrack

I should give the input as frames, but in Flv I will get the Sorenson Video and Mp3 audio frame(after doing some trivial string operations to remove the headers). Can I use these directly as input to above apis or is there any good way to convert flv to mp4? And also I have looked into "/android/external/opencore/nodes/pvmp4ffcomposernode" but it reads from ports not able to know how to send input to this class.

Let me know your thoughts.

+1  A: 

I have solved using ffmpeg. I have ported ffmpeg and libfaac to Android. It works great.

Vinay
Is it available as application? That will be great to watch downloaded flv on Android
Alexander Kosenkov
A: 

Can you explain how you solved it using ffmpeg ? Do you have an email that I can contact you with ?

I have ported the ffmpeg to android. Android gives interfaces
Vinay
launch ffmpegffmpeg -i video.flv -acodec libfaac video.mp4I have also ported the libfaac to android and compiled the ffmpeg with enable faac flag. That solved it!
Vinay
Oh I thought you have got streaming to work..
A: 

Hi Vinay,

will u please let me know how to port ffmpeg in android.

thanks in advance.

ganekanti