I know this isn't quite a programming question but it's very closely related to iPhone/iPad development.
What's a good software (preferably with a GUI) for converting videos to iPhone/iPad compatible mp4s? My videos are mostly mpg, avi, mov.
Handbrake will do a great job, its free, its open source, and it is on Windows, Linux, and Macintosh.
I know it takes file inputs from any source on Windows (I'm not sure on Mac, but I'm pretty sure its the same on Mac).
Handbrake is my favorite tool for this job. Free and Multiplatform.
Integrates with all of the appropriate preset for iPhone / iPod / iPhone 4
Just for note: I use ffmpeg library to convert all my media. Yes, it doesn't have UI but it supports probably almost all the video/audio formats you need + it's very easy to use it with scripts when you want to convert a big amount of media.
Related
We are working on a prototyp application using unity3d. Your goal is to create a fluid and fun to use cross platform app.
The problem we facing right now is streaming (h.264 - mp4) video content over the web. This will be a major feature of our app.
I have already tried MovieTextures and the www class but it seems the files must be in ogg format which we can not provide. On the other hand handheld.playfullscreenmovie seems to be an android and ios only feature which uses the build in video player. This would be great if it would be supported on other platforms (e.g. Win8-Phone) as well.
Is there another cross platform option to stream (h.264 - mp4) video content over the web and display in full screen or as gui object? Or are there any plans to support something like this in the near future? Or is there a stable plugin for such a task?
Thanks
As of Unity 5 Handheld.PlayFullScreenMovie supports Windows Phone and Windows Store as per http://docs.unity3d.com/ScriptReference/Handheld.PlayFullScreenMovie.html
On Windows Phone 8, Handheld.PlayFullScreenMovie internally uses Microsoft Media Foundation for movie playback. On this platform, calling Handheld.PlayFullScreenMovie with full or minimal control mode is not supported.
On Windows Store Apps and Windows Phone 8.1, Handheld.PlayFullScreenMovie internally uses XAML MediaElement control.
On Windows Phone and Windows Store Apps, there generally isn't movie resolution or bitrate limit, however, higher resolution or bitrate movies will consume more memory for decoding. Weaker devices will also start skipping frames much sooner at extremely high resolutions. For example, Nokia Lumia 620 can only play videos smoothly up to 1920x1080. For these platforms, you can find list of supported formats here: Supported audio and video formats on Windows Store
mp4 is not a streamable container. If you read the ISO specification, you will see that MP4 can not be streamed. This is because the MOOV atom can not be written until all frames are know and accounted for. This 100% incompatible for live video. There are supersets of MP4 used in DASH that make this possible. Essentially, they create a little mp4 (called a fragment) file every couple seconds. Alternatively you can use a container designed for streaming such as FLV or TS.
You will probably need to step outside the unity sdk a bit to enable this.
I'm writing an Chrome Packaged App that needs to be able to play a lot of local video files. I can use the tag to play files encoded in h.264 and mp3, but not much else. I'll require playback of at least DivX videos and AC3 audio. Is there any way to do this using the HTML5 platform or otherwise using some kind of plugin?
There are alternatives, but in my opinion the final solution is not going to be very good.
1 - You can try to use a plug-in, for example:
VLC Plug-in - sorry, I have not enough reputation to post more than 2 links :(
Divx Web Player - sorry, I have not enough reputation to post more than 2 links :(
But then you need to rely on the user installing the plug-in. For VLC, the plug-in is not compatible with the latest versions of Mac OS X.
2 - Encode to H.264 or VP8 from a server with an ffmpeg or using a cloud video provider.
3 - Encode from the client side using JavaScript! There is a port of the ffmpeg on javascript (http://bgrins.github.io/videoconverter.js/). I didn't try this method with large files.
4 - Encode from the client side using a Native Client component (https://developers.google.com/native-client/dev/). But seems a daunting task to me.
If you are going to go with the first option, assure that your audience is going to install/configure your player and that their OS are supported.
VLC ported to NaCL would be a great first step.
According to a poster on https://forum.videolan.org/viewtopic.php?f=5&t=107178, libVLC has been ported to NaCL, but I am not familiar with VLC internals so I could not say how far this gets you in terms of being able to decode different streams.
I'm building an iPhone app for a mobile film festival.
The app will make it possible for the users to watch the submitted short films over wi-fi, 3g, and edge (really?)
The movies will have a duration between 30sec to 2minutes max. (ste
Would you recommend using .3gp format above .mp4 ? Any reason/advantage to prefer one format?
I will manually re-encode all the videos for the iphone app.
thanks
Louis
mp4 with the H.264 codec is very well supported at a hardware level
Sounds like a cool app. iOS devices prefer h.264 video. For video to play in an iOS app on 3g, you need to encode them for Apple's HTTP Live Streaming. That's their version of adaptive bit rate encoding. Every Mac shipped with Leopard or Snow Leopard includes a segmenter with their other utilities, but it can only handle one file at a time. There's a help article on Apple's video utilities here:
http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/UsingHTTPLiveStreaming/UsingHTTPLiveStreaming.html
Encoding.com can also do the video encoding and segmenting for you. (Disclaimer: I work there. :) You can check out how to get this up and running using Amazon and Encoding.com on the site and if you'd like to talk to someone about it you can just schedule a free consultation with us. We're here to help.
mp4 (i think the extension has to be *.m4v if you want it to use with itunes) with h.264 as codec
reasons: standard iphone format, better quality, better compression
My app takes time-lapse photos, and also records audio to go with it. The problem is, I have absolutely no idea how to go about turning it into a .mov/.mpeg file (I am new to this type of iPhone development). I have heard some things about FFMPEG, but apparently the license doesn't cover the public distribution of iPhone apps. Anyone have any suggestions?
you can use Theora aka VP3. it is free to use in any application and has a pretty decent quality/bitrate ratio
I do not know whether the necessary parts of FFmpeg to do this is GPL or not, but there are parts of FFmpeg that are LGPL-licensed.
They have a legal page that covers this in detail, so FFmpeg might be worth a closer look.
FFmpeg itself can be used in iphone apps distributed on the appstore. See wunderradio as an example: http://www.wunderradio.com/code.html
BUT... I am experimenting with it right now and I am kinda disappointed with the quality of the result. (not to mention that encoding is sloooow on the iphone) It seems to me that without the x264 library it is impossible to create mpeg-4 videos with decent quality. And x264 is GPL licensed, so if you use it, you must disclose the full source of your project. (Or did anyone figure out how to select some usable codec from the LGPL-d FFmpeg?)
What I don't understand is that the appstore has now a lot of video editing apps. How do they work? I made a pretty thorough search, and couldn't find any mpeg-4 codec with a permissive enough license. Do they violate GPL? Do they use private API? I really don't believe that they built a homebrew mpeg4 encoder.
Does anyone know if there is a free/cheap MIDI player/synthesizer library that I can incorporate into my iPhone application?
As I understand it the iPhone doesn't have native support for MIDI playback.
To work around this limitation I've created a bank of .caf sound samples that I playback myself but I'd really like to improve the implementation and use MIDI if possible.
Any advice would be greatly appreciated.
Since 10 october of 2011, that is since iOS5, Apple has started delivering basic API for midi files playback. The API is called MusicPlayer along with MusicSequence Check this out :
https://developer.apple.com/library/ios/#documentation/AudioToolbox/Reference/MusicPlayerServices_Reference/Reference/reference.html#//apple_ref/doc/uid/TP40009301-CH1-SW1
By setting up an appropriate Audio Unit Processing Graph you can output the sound you like.
Look at TiMidity++; it looks like something that should be portable to the iPhone platform.
TiMidity++ is a software synthesizer. It can play MIDI files by converting
them into PCM waveform data; give it a
MIDI data along with digital
instrument data files, then it
synthesizes them in real-time, and
plays. It can not only play sounds,
but also can save the generated
waveforms into hard disks as various
audio file formats. TiMidity++ is a
free software, distributed under the
terms of GNU general public license.
Many people have ported TiMidity++ into various platforms; FreeBSD,
NetBSD, many Linux distributions,
Windows (and/or Cygwin environment),
and Mac OS are known to have their own
versions.
There is a commercial library available from Crimson Technology
Crimson Technology Library
I have never used it so I can't vouch for it's quality.
This is a library I've used for MIDI synthesis in Android:
https://code.google.com/p/android-midi-lib/
Although it can't be used for iOS, I think you(and anyone who's interested) can still take a look at the implementation of the MIDI file format(i.e. how bytes are written to a .mid file) and possibly implement a MIDI library yourself.