Sunday, September 7, 2008

Video encoding for the iPhone

Since people have asked repeatedly AND I finally got off my lazy ass I decided to give a short little tutorial on video encoding light.

I won't suffer you to learn MEncoder, even though this tool might be your last resort in case standard methods won't do. No, the software of my choice is the popular MediaCoder, which conveniently also has a special iPhone Edition. You can just get the standard version and make iPhone movies, too, but trust me when I say that you don't want to.

So, before you do anything else: 



You might also want to install the latest Firefox browser since some advanced settings (which you probably won't need) rely on the Gecko engine that comes with it.

Install and start and you will see this:

The user interface is pretty much intuitive and the part that will give you occasional problems lies withing the source files you wish to encode. But more of that later. Find some videos and drag them into the work are and you're ready to go. 

There are several possible kinds of source files which each provide you with a different problem. I'll start with some easy ones and will add others at a later time. For now, let's start with:

AVI videos with hardcoded subtitles
The avi-format is a simple container that usually contains a video and audio stream and nothing else. Subtitles are inseperable from the video stream, which is why it's called hardcoded. This is a problem if the video resolution does not match your display resolutions (480x320).
This is nearly always the case, so you have to both resize the video and crop the parts you don't want. Happily the encoding software does the resize job automatically. The job left to do is choosing the target resolution and the cropping.



You'll mostly encounter videos that are far wider than what your iphone can display (after resizing), so snipping the sides is tempting. Howeverm the problem with hardcoded subtitles is that you can't crop the sides of the video because you'll very likely eliminate some parts of the subs. In that case I usually change the target resolution to 576x320, which allows you to zoom between fullscreen and "cinematic borders" on the fly.

Press the crop button and select Manual Cropping. 


Using the left mouse button you can drag the running movie inside the frame until you are satisfied with the placement. You'll figure it out faster than I'll figure out how to explain to you how to figure it out. The border represents your ipod screen dimension, btw., so choosing a different target resolution in the main window will give you a larger window. Use the forward/backward buttons to navigate the playing movie.
Small note: This is pretty damn comfortable. You don't want to know how awkward this part can - all too often - get. 
Press done when you are done.

Beneath all those buttons you see a couple of select-boxes. You can play with them if you want or just leave them on default, wich should usually suffice. 

Press the start-button and wait for it to process your movie. After a short while it will finish (ok, it's a long while). 
Congratulations! Your first self-encoded iphone video.

In case you have several movies you wish to convert: Make sure you select all videos BEFORE you start the cropping-tool. Or else only one item in the list will get cropped as wanted.



So, that's it for today. I'll write something about the more advanced containers with multiple streams (mkv, ogm) later, although I'm sure you will figure that out by yourself.

By the way: You'll encounter numerous releases that simply won't encode like you want to. There are some workarounds for that (some involving MEncoder) but this is stuff for headaches. And some videos just won't work, no matter what you do. So don't get too worked up if that happens - it seems to be the norm. ^_^

7 comments:

Anonymous said...

Great guide :)i give the software a try, been using Super for all my videos.

Would it be possible to join the group on AniRena? i got some anime and k drama packed completely.

Btw would be possible to seed 12 kingdom 6% too XD

DirtyFinger said...

Aargh, I know super!
I never knew that you could design websites so horribly, that you need instructions on how to find the bloody download link . Took me longer than encoding itself!

And I'd be glad to welcome anyone willing to bring fansubs to the iPhone.

And what's with twelve kingdoms ? No more seeds?

Anonymous said...

LOL yes it took me 10min to find the link to download

Dunno how to join the group,my id is lonfar

Yay everyone stuck on 94.4%, guess you don't have the files anymore ;o

DirtyFinger said...

seeding twelve kingdoms right now. would be a shame to deprive anyone of this series.

I'm trying to figure out how to add new members.

G2 said...

Just wanted to say Thank You so much for the detailed instruction. It works. I got my first conversion done.

Unknown said...

This is nearlysell d3 goldalways the case, so you have to both resize the video and crop the parts you don't want. Happily the encoding software does the resize job automatically. The job left to do is choosing the target Diablo 3 goldresolution and the cropping.

zoyi330 said...

Love this specific! Sure makes biking seem exciting! :)I Nokia cases like this idea, the whole getting pregnant of creating overlooked cable connections aesthetically.