Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd December 2008, 14:17   #1  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,539
x264 [warning]: width or height not divisible by 16

I just got this message in my x264 log again:

"x264 [warning]: width or height not divisible by 16 (1080x818), compression will suffer."

I've seen it before, but I'd like to know what it means exactly, 'compression will suffer.' Using CRF, will just the final filesize suffer? Or the quality too? Also, 1080 isn't cleanly divisible by 16, either, of course (1088 is; I guess that's the reason for the whole 8-lines overscan business?).

In my case, am I better off padding the source? Like:

video=AddBorders(video, 0, 7, 0, 7)

To pad the source to 832. Will that make the endresult more efficient?

Thanks
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 2nd December 2008, 14:19   #2  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,281
Discussed before. A few times IIRC.

Use search.
Audionut is offline   Reply With Quote
Old 2nd December 2008, 14:21   #3  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,251
Video compression uses blocks of 16x16. If the resolution isn't mod16, it will be padded (internally) to the next mod16 resolution and cropped back at playback time.
Hence you pay bits for parts of the image you'll never see. So in CRF mode you have to expect a bigger file, in 2-Pass mode you have to expect worse quality at a given bitrate.
However with x264 the cost for none-mod16 is pretty low. Wouldn't worry too much!

Also: Padding yourself is a bad idea, especially adding black border. x264 will pad it internally in a more "smart" way to keep the additional bit cost small.
Cropping down your source video to the next mod16 resolution would be a good idea though...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 2nd December 2008 at 14:25.
LoRd_MuldeR is offline   Reply With Quote
Old 2nd December 2008, 14:28   #4  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,539
Quote:
Originally Posted by LoRd_MuldeR View Post
Video compression uses blocks of 16x16. If the resolution isn't mod16, it will be padded (internally) to the next mod16 resolution and cropped back at playback time.
Hence you pay bits for parts of the image you'll never see. So in CRF mode you have to expect a bigger file, in 2-Pass mode you have to expect worse quality at a given bitrate.
However with x264 the cost for none-mod16 is pretty low. Wouldn't worry too much!

Also: Padding yourself is a bad idea, especially adding black border. x264 will pad it internally in a more "smart" way to keep the additional bit cost small.
Cropping down your source video to the next mod16 resolution would be a good idea though...
Okay, clear and useful answer. Thanks.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 5th September 2009, 07:55   #5  |  Link
nakTT
Registered User
 
Join Date: Dec 2008
Posts: 416
Quote:
Originally Posted by LoRd_MuldeR View Post
Video compression uses blocks of 16x16. If the resolution isn't mod16, it will be padded (internally) to the next mod16 resolution and cropped back at playback time.
Hence you pay bits for parts of the image you'll never see. So in CRF mode you have to expect a bigger file, in 2-Pass mode you have to expect worse quality at a given bitrate.
However with x264 the cost for none-mod16 is pretty low. Wouldn't worry too much!

Also: Padding yourself is a bad idea, especially adding black border. x264 will pad it internally in a more "smart" way to keep the additional bit cost small.
Cropping down your source video to the next mod16 resolution would be a good idea though...
Anyone know by how much low? Is it < 5%? Or is it < 3%? Or any other figure.

nakTT is offline   Reply With Quote
Old 5th September 2009, 08:20   #6  |  Link
J_Darnley
Registered User
 
J_Darnley's Avatar
 
Join Date: May 2006
Posts: 957
The loss won't be greater than the %age of pixels added. In the OP's example, I would expect the extra pixels to cost him less than than the 2.5% of the picture area they comprise. This is because the padding is just the last row and column duplicated which makes it (somewhat) easy to compress.

The only way to see the cost is to test by over-cropping to a multiple of 16 because there is no way to disable the padding.
__________________
x264 log explained || x264 deblocking how-to
preset -> tune -> user set options -> fast first pass -> profile -> level
Doom10 - Of course it's better, it's one more.

Last edited by J_Darnley; 5th September 2009 at 08:22.
J_Darnley is offline   Reply With Quote
Old 5th September 2009, 08:21   #7  |  Link
nakTT
Registered User
 
Join Date: Dec 2008
Posts: 416
Quote:
Originally Posted by J_Darnley View Post
The loss won't be greater than the %age of pixels added. In the OP's example, I would expect the extra pixels to cost him less than than the 2.5% of the picture area they comprise. This is because the padding is just the last row and column duplicated which makes it (somewhat) easy to compress.
I see, thanks mate.

nakTT is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.