My goal is to enable file conversion of videos into a format that is playable via the iPhone. As of right now, here are the iPhone specs for video playback:
* Video
o H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per second
+ Low-Complexity H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo in .m4v, .mp4, and .mov format
o H.264 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second
+ Baseline Profile up to Level 3.0 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
o MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second
+ Simple Profile with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats
* Audio
o AAC, Protected AAC, MP3, MP3 VBR, Audible (formats 2, 3, and 4), Apple Lossless, AIFF, and WAV
Why is that relevant? The challenge in the current fileframework implementation is that the videos will use the mimetype video/mp4 with a file extension of .mp4, .mp4v, .mpg4, or .m4v. If you have an existing .mp4 file that is uploaded, it may not play back on the iPhone because of the requirement for baseline profile or low complexity profile. So at that point you would have to do a conversion, but you may be converting FROM video/mp4 TO video/mp4, just using different ffmpeg options to downgrade the uploaded video to the correct profile.
Here are all of the profiles if you are interested:
http://en.wikipedia.org/wiki/H.264#Profiles
I'm not sure about the exact solution, but I imagine it would be to create a new handler for iPhone, with a MIME type of video/mp4 and converters specified as all of the other mimetypes into this format. You could then use the FFMPEG recipies to convert any uploaded videos to work properly on an iPhone. You might even be able to do it with the existing Quicktime handler if you added a few converters to it.
Here's a link to an ffmpeg recipe to convert videos for iPhone playback:
http://www.dudek.org/blog/82
I hope the above makes some sense.
As an aside - the existing mimetype for video/mp4 should be modified to allow for the extensions mp4, mp4v, mpg4, and m4v. I added this manually as a custom mimetype but it would be easier if it was in core fileframework.
Comments
Comment #1
miglius commentedI'm definitely interested in supporting mobile devices, iPhone would be a good start.
Implementing conversion of the videos to the format supported by the iPhone should not be hard. Other problem is to change the theme layer to ensure that a correct preview handler is loaded when accessing from the mobile device instead of the flash player.
Comment #2
rjbrown99 commentedThere are a few modules to help with this.
One interesting module that can help is Mobile Theme.
http://drupal.org/project/mobile_theme
The module uses browsecap to identify the device connecting to Drupal and returns a different theme in the event it is a mobile device. This could be combined with a theme that rendered a safe version of the content for mobile devices. The trouble is that each device seems to support different characteristics (some have Flash, some do not. some support Javascript/AJAX, some do not, etc.)
Another possibility is the Switch Theme module, which also uses browsecap.
http://drupal.org/project/switchtheme
And how to use it to switch themes based on the browser:
http://drupal.org/node/264001
I might make a go of this after I finish docx, xlsx, pptx support.
Comment #3
justin.hopkins commentedThis is a great idea, truly. I don't use videos on my site personally, but this type of functionality would be a boon to the Drupal powered internet.
Comment #4
truyenle commented+subscribe
Comment #5
gobinathmClosing the issue. It was inactive for a long time & it's related to a Drupal Version which is not supported anymore