MP4 format for mobile devices

HaLo2FrEeEk

Member
Joined
Dec 15, 2009
Messages
46
Reaction score
0
I (like SO many other people) am looking for a way to encode my videos to be playable from my Droid. I know it's possible, without a doubt, because if you visit Video Copilot on your phone, it will take you to a mobile version of that site (m.videocopilot.net) and you can click on the tutorials link and watch all the tutorials. I got kinda crafty and used a plugin for Firefox to spoof my useragent string so the site thought I was viewing on an iPhone, allowing me to visit the mobile site on my desktop. I fond out that he was simply linking to an mp4 video to play the tutorials. I downloaded that mp4 to my server and tried playing it from there (using my phone) and it worked. That tells me that not only is it possible, but it's a format thing, not a server thing.

I've tried encoding my own mp4's for this, but I've had no luck at all. I've tried using FFMPEG, Sony Vegas, and After Effects. I simply cannot figure out how the heck to get compatible mp4 videos. I suppose I could ask on the forums at videocopilot, but the admin so rarely goes on the forums I'm sure I wouldn't get an answer.

If anyone knows anything about how I might accomplish this, PLEASE tell me. It's very frustrating to not be able to get it to work when someone else obviousy did get it to work.
 
Last edited:
OP
HaLo2FrEeEk

HaLo2FrEeEk

Member
Joined
Dec 15, 2009
Messages
46
Reaction score
0
No, because I want to do this in After Effects. What's the use in downloading ANOTHER application, regardless of it this particular application works, if there's a chance I might achieve the same result in a program I already have?

I'm getting extremely frustrated with this whole thing. There's no reason it should be this complicated to get mobile-formatted video on a freaking mobile phone! Everytime I try something it takes me about 8 minutes to re-render the video out of After Effects using different settings every time, then I upload it to my server, another 5 minutes, then I try to see if it works. If it doesn't, I've wasted 15 minutes and I have to try something else.

The reason I want to do it in After Effects is so that I can just make another Render Profile and render the project twice right from after effects, instead of rendering once, opening up handbrake, setting the settings, and rendering again. This just needs to freaking work!
 

jimmiem

Member
Joined
Feb 4, 2010
Messages
108
Reaction score
0
Handbrake is a two-click solution. Just use the iPhone preset and be done with it. You're complaining about how frustrated you are because this should be easy and then when someone presents you with an easy solution you dismiss it.
 
OP
HaLo2FrEeEk

HaLo2FrEeEk

Member
Joined
Dec 15, 2009
Messages
46
Reaction score
0
I'm not the sort to do things the "easy" way. I don't want to download another piece of software. If it comes down to it, I have that backup, but I want to be able to do it from After Effects.

Eventually I want to be able to do it using FFMPEG on my server, but I need to figure out the specifications of the format. Handbrake won't help me do that, all it'll do is do the work for me. I have a lot of videos on my site and they're not all on my computer, so downloading each one of them, converting, then reuploading isn't really an option.
 
OP
HaLo2FrEeEk

HaLo2FrEeEk

Member
Joined
Dec 15, 2009
Messages
46
Reaction score
0
Also keep in mind, guys, that I'm not encoding just to play back from my phone. Most of the video I've encoded will play back from the SD card. What I'm trying to accomplish is...well, it's not streaming, but it's encoding the video so that it can be played back from my site. This seems to be impossible to accomplish, but like I said, I know it's possible.
 
OP
HaLo2FrEeEk

HaLo2FrEeEk

Member
Joined
Dec 15, 2009
Messages
46
Reaction score
0
Ok, sorry for the double post, but this is RIDICULOUS!

I downloaded Handbrake and set up a preset, called it Droid. My options:

I disabled "always use .m4v extension for .mp4"
container: MP4 file
width: 432
height: 240

Those are the only things I changed. I click "Start", a command window pops up for a fraction of a second, then closes and the program says Encoding Finished, with no output file, not even an empty one.

Yeah, real glad I went with this "1-click solution"!

It should be noted that my source file is a 1280x720 HD file. I tried another width and height (480x272) and it still didn't work, BUT, I tried another file with a different source resolution and it worked JUST PEACHY! WTF!

Another edit: I just tried with a different HD file and it didn't work, so I tried yet another (from a different source) and it worked. That's idiculous, this should work, not just on files it wants to work on.

And a final edit: I give the hell up. I finally got this stupid excuse for a program working on my files, encode a test video, upload it...and it doesn't effing play from my site!!! What the crap gives! This is the first time I've really been frustrated about something that my phone doesn't do, because there's no reason it shouldn't do it!
 
Last edited:
D

dvdcatalyst

Guest
What I'm trying to accomplish is...well, it's not streaming, but it's encoding the video so that it can be played back from my site. This seems to be impossible to accomplish, but like I said, I know it's possible.

Its possible. Check my trailer thread. the links to mp4 files are uploaded to my webserver and will play while downloading when you visit them on your Droid

http://www.droidforums.net/forum/droid-audio-video/15161-droid-optimized-movie-trailers.html

The thing you need is called Quicktime Fast Start Atom. You will need Quicktime Pro for this to be able to do it directly from After FX

An Introduction to QuickTime - Fast-Start Progressive Downloads

edit: As of version 3.85.1, DVD Catalyst 3 can enable this automatically. You just enable the "streaming option" in Global Settings > Advanced, and for everything you convert, it will be enabled by default.

edit2: ffmpeg can not enable this "atom" by itself, however, ffmpeg comes with a seperate tool in the source that does this. More info here: http://www.saiweb.co.uk/linux/ffmpeg-mp4-does-not-stream-qt-faststart
 
Last edited by a moderator:

jimmiem

Member
Joined
Feb 4, 2010
Messages
108
Reaction score
0
Handbrake, when encoding video files not from a DVD, requires you to make a folder first. It won't create the folder for you so you have to specify an already existing folder as the output location.

That's an issue that bugged me until I figured it out but once that minor nag was gone the program performed as advertised.

I could do without the sarcasm when I'm only trying to help. :mad:
 
OP
HaLo2FrEeEk

HaLo2FrEeEk

Member
Joined
Dec 15, 2009
Messages
46
Reaction score
0
Sorry for the sarcasm, but I already had set an output folder, handbrake simply wasn't outputting anything to it. When I used the different file, all I did was change the input file, I didn't change any of the other options.

And thank you very much for your post, dvdcatalyst, I will look into all that. Unfortunately, the option for updating my versio of ffmpeg is nonexistent, I'm on a shared server at a hosting company and all package upgrades go through them. I mean, sure, I guess I could download and install the package to just my account...hmmm...
 
D

dvdcatalyst

Guest
And thank you very much for your post, dvdcatalyst, I will look into all that. Unfortunately, the option for updating my versio of ffmpeg is nonexistent, I'm on a shared server at a hosting company and all package upgrades go through them. I mean, sure, I guess I could download and install the package to just my account...hmmm...

You are welcome,

The tool that is included with the ffmpeg source qtfaststart or something, sets something in the file header. If you want to spend some time on it yourself, it's basically just some hex code that is added/changed. I'm sure it's possible to add this change automatically by some addition to a file-upload PHP script. I did spend some time on just setting the hex-code myself with DVD Catalyst, but found it was easier for me to just run the created file through the qtfaststart app itself.

If you visit the last link from my previous post, you can find the commandline you need to use for it, and if you open both the source file and the faststart-enabled file in a decent hex editor and do a compare, you should be able to find the difference. Do that for a few files to make sure, then look for a php script that enables modifications to files or something like that.

Another option might be to post your question (a bit more specific than your initial thread start though) on a linux forum.
 
OP
HaLo2FrEeEk

HaLo2FrEeEk

Member
Joined
Dec 15, 2009
Messages
46
Reaction score
0
Shoot, if it's that easy I could just write a program in C# to do it for me, just load up a file and make the changes then save, hopefully it's that simple. I'm rendering the same video with the same settings from Quicktime right now, one with streaming turned on and one with it turned off.
 
D

dvdcatalyst

Guest
Shoot, if it's that easy I could just write a program in C# to do it for me, just load up a file and make the changes then save, hopefully it's that simple. I'm rendering the same video with the same settings from Quicktime right now, one with streaming turned on and one with it turned off.

It should be easy to do, however, your test method you are using right now will not help you.
Video conversion is not "binary-exact" meaning that if you convert the same file twice using the same settings, it will not be identical.

I uploaded the faststart.exe file I use for my trailers
www.tools4movies.com/faststart.zip

Create one file using your normal settings, then run the faststart app on it (commandline) to enable the atom.
 
OP
HaLo2FrEeEk

HaLo2FrEeEk

Member
Joined
Dec 15, 2009
Messages
46
Reaction score
0
Sure the movies won't be byte-perfect, but the headers should be identical if I'm using identical settings. Turns out Quicktime automatically puts the moov atom at the beginning of all of it's outputted files, streaming enabled or not. I'll take a look at the program you linked, thanks.
 
Top