Jump to content

What 'Expert' settings do I set to achieve quick downloads


Morgan Peline

Recommended Posts

Hi,

 

I've noticed the H.264 Quicktime clips on my website take very very long to download or play. Can someone please tell me what settings to set in the 'expert' settings in FCP to get very quick download/play times for clips on my website?

 

Thanks!

Link to comment
Share on other sites

  • Premium Member

1-2Mbps is quite high. You can do very well at under 500kbps - and many more people will get a video-on-demand sort of experience out of it. Unfortunately, Quicktime's H.264 implementation is rather elementary. It doesn't support pixel aspect ratios other than 1, more than one b-frame in a row, 8x8 DCT blocks, or several other things which can improve performance quite considerably.

 

I do it with with mencoder or ffmpeg, which give somewhat better results for the bitrate into the bargain. mencoder will give you an AVI with h.264 video and AAC audio. It can easily be repacked into a Quicktime-compatible mp4 container with mp4creator, which will also provide hinting and optimisation for streaming playback - there's even tools for inserting iTunes comments and notes.

 

Procedure turns in.avi into out.mp4 as 300kbps 592x336 h.264 with AAC audio, QT compatible sub-options and hinting for progressive download:

 

mencoder in.avi -ovc x264 -x264encopts pass=1:turbo:bitrate=300:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qco

mp=0.7:direct_pred=auto:keyint=300 -vf scale=592:336 -oac faac -faacopts br=128:mpeg=4:object=1 -channels 2 -srate 48000 -ofps 25 -aspect 1 -o out

mplayer out -dumpaudio -dumpfile out.aac

mplayer out -dumpvideo -dumpfile out.264

mp4creator -create=out.aac out.mp4

mp4creator -create=out.264 -rate=25 out.mp4

mp4creator -hint=1 out.mp4

mp4creator -hint=2 out.mp4

mp4creator -optimize out.mp4

 

mencoder, mplayer and mp4creator can all be had for free. I can write a nice script for this if anyone cares.

 

Phil

Link to comment
Share on other sites

1-2Mbps is quite high. You can do very well at under 500kbps

 

 

I've tried going as low as 500kbps, all I get is horrible blocky pictures.

 

While we're on the subject, take a look at This. It's from Bill Bennett's website. encoded h.264 at 960 x 540 and only 5.7mb. I tried to get a similar file encoded to this size and dimensions - it was unwatchably bad.

 

Maybe it's me, maybe it's Quicktime, but I'd love to figure it out.

Link to comment
Share on other sites

Guest Kyle Waszkelewicz

From what I can tell, Quicktime's h.264 encoding is far from the best around. I've always considered the apple HD trailers to be perfect examples of what h.264 can do, but I seriously doubt they used Quicktime to encode those things. I think you'd be better off using a dedicated h.264 encoder - I've been experimenting recently with x264 and a program called meGUI (both free) and have been getting MUCH better results than with Quicktime Pro or After Effects encodings.

Link to comment
Share on other sites

From what I can tell, Quicktime's h.264 encoding is far from the best around. I've always considered the apple HD trailers to be perfect examples of what h.264 can do, but I seriously doubt they used Quicktime to encode those things. I think you'd be better off using a dedicated h.264 encoder - I've been experimenting recently with x264 and a program called meGUI (both free) and have been getting MUCH better results than with Quicktime Pro or After Effects encodings.

 

You may also want to try Discreet's Cleaner or Apple's Compressor, which aren't free but which go through and remove redundant information to get the file size down. (And the file size is what causes the long download times.) I personally think Cleaner does a much better job than Compressor, but some of my co-workers disagree, so I'm sure Compressor has its advantages. :)

Link to comment
Share on other sites

  • Premium Member

Hi,

 

> x264 and a program called meGUI

 

meGUI is just a UI for mencoder, which I posted above. It is massively faster and somewhat better than Quicktime.

 

This is a zip archive containing a script to create Quicktime-compatible MP4 videos using mencoder, mplayer and mp4creator (also included). This is all free software and entirely legal. You will need to unzip the contents into a directory, then you can drag and drop files (of almost any type - suck it and see) onto encode.bat and they will be converted and copied to c:\ as out.mp4 - you can also put an "Encode me" shortcut onto your desktop and just drop files onto that.

 

At the moment it is set up to use 300kbps to encode the video, 128Kbps to encode the audio and produce 1.78:1 output files. It's fairly obvious where to change these, all in the first line of the script. 300k video is quite conservative and will produce artifacting, but it's quite watchable on most material and the files are tiny. Change to taste.

 

If you change the aspect ratio, you will have to change the output resolution after '-vf scale' as well, as one of Quicktime's greater deficiencies is that it doesn't support pixel aspect ratios other than 1. Dimensions must be a multiple of 16.

 

The script should - I've not checked - set the output videos up correctly for Quicktime's progressive download function. It certainly appears to work on the Windows version of Quicktime 7.

 

A legal note:

 

The support programs mp4creator, mencoder and mplayer are free software, which ironically makes it very difficult and complicated for me to legally distribute them. Theoretically, I should include the source code, which is difficult, becuase I don't have it, and I can't verify that any source I found would be identical to the compiled software I have. However, because nobody on this website is going to have any need for the source and would probably find it difficult to download these binaries for themselves, I'm going to include the programs anyway. If anyone at GNU has a problem with this, well, I think the freedom to share overrules the freedom to modify, when we know nobody here is going to be modifying it anyway.

 

Should you need the source to mplayer or mencoder, the best place to get it is the MPlayer site.

 

Phil

Link to comment
Share on other sites

  • Premium Member

Hi,

 

There is an OSX version of mplayer/mencoder (which are part of the same package) and I believe mp4creator, so it's possible. The batch file would need a few minor changes to make it into a shell script.

 

It's only a half hour job; unfortunately I don't have a Mac here on which to test it.

 

Phil

Link to comment
Share on other sites

Just downloaded the ffmpegx app for OSX. It's encoded a 1gb DV file down to just 23mb, at the same resolution as the original, with amazing results!

 

Thanks for the heads up on this software, Phil.

 

btw, do you know how to convert the .mp4 format to a .mov?

 

Thanks again.

Link to comment
Share on other sites

  • Premium Member

mencoder uses a lot of ffmpeg code, so you're fundamentally using the same codec.

 

As long as QT will play it, there's no need to rewrap it as a quicktime. If QT won't play it... well, that's why I recommended the mencoder/mp4creator solution, since I know that's a solution that works and at least claims to make progressive download work.

 

Quicktime is very picky.

 

Phil

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...