views:

4718

answers:

8

I have a Android app. It recieves videos in .flv format which is unplayable by the Android phone. I was wondering how to convert the file to MP4. I could use FFMPEG, but I do not know how I would get it onto the phone, and how it would work on multiple phones if it was compiled for a single one.

+3  A: 

MP4 encoding is very, very processing intensive. You'll be better off writing an FLV to raw converter and converting it on the fly while playing it.

Adam Davis
How to convert raw to mp4, I have searched for the format of mp4 didn't get.
Vinay
Why would he go to a raw format when he wants MP4 for Android?
JasonMichael
@JasonMichael - if you read his question carefully you find that the *reason* he wants to convert to MP4 is so he can play the video on the Android. In other words his *real* problem is "How do I play an FLV video on Android." My answer points out that converting from FLV to MP4 just to feed it to an MP4 viewer requires *three* conversions, all of which must be done in real time on a mobile device. It's not reasonable, and likely not possible except for extraordinarily low quality, low framerate video. *It would be easier to writ an FLV viewer (raw converter) and view the content directly.*
Adam Davis
+2  A: 

Doing video conversion on a phone is likely to be ineffective. The device has hardware acceleration for playback, so transcoding it from a software decoded format and then encoding it (which takes more horsepower than decoding) it in software will be markedly slower, and consume a lot of power.

You really need to convert these server side if that is necessary. There is a chance the FLV is an h.264 stream, in which case you may be able to transmux it and hand it to the system APIs, but that would be a ton of work.

Louis Gerbarg
Do you know anything that may help to implement it on server side? Open source libs, docs, etc? I'm asking about it here http://stackoverflow.com/questions/796872/flv-stream-decoding-3gp-encoding
Pavel Feldman
A: 

download this version of ffmpeg for windows ( http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/mingw32/static/ffmpeg-r18709-swscale-r29241-mingw32-static.tar.bz2 )

and follow www. linuxquestions .org/questions/showthread.php?p=3359781#post3359781 (compilation not needed if you use download win version)

+1  A: 

Check this tool which name is GomEncoder, If converting speed and locking computer is important specification for you. It is not free but you can use it 30 day free trial with small up right watermark. This is best converter that i know for pc's.

ps: anyway android phone is phone which is not powerful desktop or laptop, i think that possible to converting process at best phone battery can finished and we can't watch converted movie or etc. :)

javaloper
A: 

To put videos on smart phone, you only need the following 2 steps:

Step 1: Convert video to Android phone supported video The video you have saved whether it is downloaded from internet or somewhere else, may be in different formats such as flv or avi etc. But your Android phone may only supports playing MP4 video or WMV video, therefore you need to convert video to Android phone video first. This Wondershare Video Converter is such kind of tool which can convert videos to almost all kinds of videos for Android phone whether you are T-mobile myTouch 3G, HTC, Motorola or some other Android phone users.

Step 2: Transfer converted video to your smart phone After conversion, you can connect your phone with PC, and transfer the converted video to your phone.

A: 

Hi there, As I know, Moyea Video Converter, a professional and powerful video conversion program, could help you to convert versatile video files to T-mobile G1 for playback. This software could easily help convert videos from Youtube.com, Vimeo.com, CBS. com and etc to T-mobile G1 or other mobile. Of course, uploading G1 videos to some video-sharing website online is also a great fun.

Aside of its excellent conversion feature, this software allows users to enhance the videos before transmitting to G1 or video-sharing online. For example, “aged film” special effect may be a vogue choice for some movies.

Available for PC, Moyea Video Converter occupies less HDD space owing to the built-in green Codec environment. Its advanced multi-thread decoding/encoding technology simplifies the conversion process, and further save users’ time and energy.

All in all, Moyea Video Converter is the best choice for you to convert videos to G1 or whatever video websites you desire.

Hopefully this post works for you,

http://www.my-video-converter.com/video_converter/

A: 

I would also recommend to do this serverside. However, if you are inclined to do it on the phone, the linux version of an ffmpeg executable with a simple java ffmpeg wrapper might do.

Try this perhaps, http://ivolo.mit.edu/post/Metamorph-Convert-Audio-Video-to-Any-Format-on-Windows-Linux-and-Mac.aspx

Ilya
+1  A: 

The slickest way of doing this is to mimic the functionality found in Air Video Server, basically upload your file to a server and mark it for transcoding when the stream is requested by the device, once converrted or played in it's entireity the file will then always be available in the correct format. You may also mark and queue files for idle time conversion.

I wrote a server in Java (hosted on Ubuntu) that does precisely this for the iPad.

Alan Simes