views:

184

answers:

2

I have an iPhone application that uses small MPEG movies showing hand signs in the Dutch Sign Language. I get the movies from the Gebarencentrum, with their permission. But they are all in the old MPEG-1 format, and the iPhone won't play that. The allowed me to convert a couple of hunderd of the movies in batch and put them on my own website, but they won't let me do that with all 6000 movies. So I need to convert the movie from MPEG-1 to MP4 after getting it from their server to my iPhone. I have searched for libraries like ffmpeg, but none if it is already ported to Mono. Maybe I do not have to port ffmpeg to .NET/Mono since I can P/Invoke to the ffmpeg library. But can I install ffmpeg on my iPhone and if so, how?

I'm open to any ideas.

Thanks,

Richard

+2  A: 

Compile ffmpeg as a library in XCode and then link it to your program: http://wiki.monotouch.net/HowTo/Interop/Consuming%5F3rd%5FParty%5FObjC%5FLibraries

Since applications can only statically link on the iPhone, instead of using P/Invoke over a shared library name, like this:

[DllImport ("ffmpeg.so")] extern static int ffmpeg_init ();

You need to use the __Internal target:

[DllImport ("__Internal")] extern static int ffmpeg_init ();

miguel.de.icaza
Thanks Miguel, I'm still working on this, every now and then, and I find it really hard. I found another article on the same wiki that explains it a bit more: http://wiki.monotouch.net/HowTo/Interop/Interopping_with_Open_Source_Text-to-Speech_%28TTS%29_C_libraries__for_iPhone.
Richard
A: 

isnt using ffmpeg to convert mpeg-1 to a playable very mp4(v) slowww on the iPhone? or is this a good way forward?

Tony Tromp
Hi Toni, it probably was'nt the brightest idea, but I had no choice, given the constraints from the owner of the videos. The project is off now, since they completely withdraw their permission to use the videos.
Richard