user6873: I have a composition of 1500 x 643. I need this format for a moviebanner in a website. My assets are in 4K, very good quality.
I can render it as an AVI, best quality. Then it's almost 4 GB for 30 seconds.
When I choose H264, it has problems with framerate and the size (it resizes, ...). What do I have to choose as render settings to have a good quality movie (+30mb? instead of 4Gb), for web with my custom size?
I use After Effects CS5.
EDIT: After changing the settings to an odd resolution, I can export as H.264.. 
But I don't like the quality. The size is 3.3Mb, it could be a little bit more.
How can I get better quality for this export?
My screens:





The results can you find here: https://wetransfer.com/downloads/a15013dad2f4bc5c0b4ce0aa92cb821c20170508063926/347bd4

user6273: Are you using the inbuilt After Effects render queue? It's a bit easier to use custom settings when you use the Adobe Media Encoder instead. AME comes with After Effects and is installed automatically when you install AE. Simply open the composition you want to export in After Effects and select Composition → Add to Adobe Media Encoder Queue. This will open AME and add the current state of your composition to the render queue (this might take some time). Once you see the item in the render queue, press the highlighted format designation to open the Export Settings dialogue. 


In the Export Settings, you can change the format (codec/container) as well as the other export parameters. Make sure to set the dimensions (Width/Height) to whatever you need them to be. To bring down the size, the most important option is the bitrate setting (Target / Maximum Bitrate for H.264).
Read this for an explanation of bitrate and it's relation to the resolution of your video and this for the math you need to figure out the appopriate bitrate dependent of your desired output size. Since you mentioned you need the video for your website, you might also be interested in my post here regarding recommended encoding settings for web video. 

user1950: You won't be able to render it to h.264 because of the odd number of pixels in the vertical resolution (odd as in not even, not odd as in unusual).
You simply can't encode h.264 video with odd numbers as either one of the frame dimensions, that's just part of the codec. This is true for quite a few codecs (any that use macroblocks).
I actually can't think of a codec where I'd be confident that you can encode. Maybe uncompressed, something like v210, or Apple Animation. Certainly nothing that you could deliver over the internet.
You need to lose or gain one row of pixels, because it will make your encoding waaaay simpler.

6873: <p>I have a composition of 1500 x 643. I need this format for a moviebanner in a website. My assets are in 4K, very good quality.</p>

<p>I can render it as an AVI, best quality. Then it's almost 4 GB for 30 seconds.</p>

<p>When I choose H264, it has problems with framerate and the size (it resizes, ...). What do I have to choose as render settings to have a good quality movie (+30mb? instead of 4Gb), for web with my custom size?</p>

<p>I use After Effects CS5.</p>

<p>EDIT: After changing the settings to an odd resolution, I can export as H.264.. 
But I don't like the quality. The size is 3.3Mb, it could be a little bit more.
How can I get better quality for this export?</p>

<p>My screens:
<a href="https://i.stack.imgur.com/nWHUL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nWHUL.png" alt="No Adobe Media Encoder Queue"></a>
<a href="https://i.stack.imgur.com/dhegd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dhegd.png" alt="Composition settings"></a>
<a href="https://i.stack.imgur.com/BGzrU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BGzrU.png" alt="Export settings"></a>
<a href="https://i.stack.imgur.com/bkvZc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bkvZc.png" alt="Export settings 2"></a>
<a href="https://i.stack.imgur.com/7He34.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7He34.png" alt="Bitrate"></a></p>

<p>The results can you find here: <a href="https://wetransfer.com/downloads/a15013dad2f4bc5c0b4ce0aa92cb821c20170508063926/347bd4" rel="nofollow noreferrer">https://wetransfer.com/downloads/a15013dad2f4bc5c0b4ce0aa92cb821c20170508063926/347bd4</a></p>
 6273: <p>Are you using the inbuilt After Effects render queue? It's a bit easier to use custom settings when you use the Adobe Media Encoder instead. AME comes with After Effects and is installed automatically when you install AE. Simply open the composition you want to export in After Effects and select <em>Composition</em> → <em>Add to Adobe Media Encoder Queue</em>. This will open AME and add the current state of your composition to the render queue (this might take some time). Once you see the item in the render queue, press the highlighted format designation to open the Export Settings dialogue. </p>

<p><a href="https://i.stack.imgur.com/e6NGz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e6NGz.png" alt="AME render queue"></a></p>

<p><a href="https://i.stack.imgur.com/gDGWj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gDGWj.png" alt="AME export settings"></a></p>

<p>In the Export Settings, you can change the format (codec/container) as well as the other export parameters. Make sure to set the dimensions (Width/Height) to whatever you need them to be. To bring down the size, the most important option is the bitrate setting (<em>Target</em> / <em>Maximum Bitrate</em> for H.264).</p>

<p>Read <a href="https://video.stackexchange.com/questions/16051/rendered-two-videos-from-adobe-premiere-with-the-same-settings-but-different-res/16056#16056">this</a> for an explanation of bitrate and it's relation to the resolution of your video and <a href="https://video.stackexchange.com/questions/18621/how-to-export-maximum-quality-in-minimum-size/18623#18623">this</a> for the math you need to figure out the appopriate bitrate dependent of your desired output size. Since you mentioned you need the video for your website, you might also be interested in <a href="https://video.stackexchange.com/questions/14728/encode-settings-for-html5-background-video/14730#14730">my post here</a> regarding recommended encoding settings for web video. </p>
 1950: <p>You won't be able to render it to h.264 because of the odd number of pixels in the vertical resolution (odd as in not even, not odd as in unusual).</p>

<p>You simply can't encode h.264 video with odd numbers as either one of the frame dimensions, that's just part of the codec. This is true for quite a few codecs (any that use macroblocks).</p>

<p>I actually can't think of a codec where I'd be confident that you can encode. Maybe uncompressed, something like v210, or Apple Animation. Certainly nothing that you could deliver over the internet.</p>

<p>You need to lose or gain one row of pixels, because it will make your encoding waaaay simpler.</p>
