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 > General > Newbies
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th September 2012, 20:44   #1  |  Link
kkiller23
Registered User
 
Join Date: Aug 2007
Posts: 18
Using MOD4/2 over MOD16 with x264?

I was wondering what kind of problems i could run into from using mod2 or 4 over mod16 with x264?

is mod2 and 4 still square pixels?

720/390 is closet for a bluray i'm downsizing and i really want to get it in the 720x*** range.

So would would i run into any problems using 720x390 over
720x384? besides the fact that the mod16 has a 1.5625 resize error and the mod2 has a 0%
kkiller23 is offline   Reply With Quote
Old 7th September 2012, 21:00   #2  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by kkiller23 View Post
I was wondering what kind of problems i could run into from using mod2 or 4 over mod16 with x264?
Nope

Quote:
Originally Posted by kkiller23 View Post
is mod2 and 4 still square pixels?
They have nothing to do with square or not square pixels

Quote:
Originally Posted by kkiller23 View Post
So would would i run into any problems using 720x390 over
720x384? besides the fact that the mod16 has a 1.5625 resize error and the mod2 has a 0%
By saying that you obviously keeping in mind some crappy fromt end (GUI). Throw it away, encode MOD2 (or whatever you want) with correct aspect ratio and without overcropping.
Keiyakusha is offline   Reply With Quote
Old 7th September 2012, 21:10   #3  |  Link
kkiller23
Registered User
 
Join Date: Aug 2007
Posts: 18
So it'd be okay to use mod4 or mod4 over mod16 and yes i was using a resize calculator.

What is the main difference in using mod4 or mod2 over mod16? Because when googling this it doesn't really help me as every post say something different. One says it doesn't really matter if you use don't use mod16 with x264 and others say to stick with mod16.
kkiller23 is offline   Reply With Quote
Old 7th September 2012, 21:18   #4  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by kkiller23 View Post
What is the main difference in using mod4 or mod2 over mod16? Because when googling this it doesn't really help me as every post say something different. One says it doesn't really matter if you use don't use mod16 with x264 and others say to stick with mod16.
Since x264 uses 16x16 blocks to encode the picture, when for the last block in column or row there is less pixels, lets say 8 (like in 1920x1080), it will add padding to extend it to 16px. Bit you won't see these extra pixels anyway. As you can see even blurays have that, so why you shouldn't? No reason to prefer mod16 unless you really like numbers that you can divide by 16 and can't live without them.

Last edited by Keiyakusha; 7th September 2012 at 21:21.
Keiyakusha is offline   Reply With Quote
Old 7th September 2012, 21:28   #5  |  Link
kkiller23
Registered User
 
Join Date: Aug 2007
Posts: 18
Alright, thank you for the info. I'm gonna go with 720x390 then since it doesn't really matter.
kkiller23 is offline   Reply With Quote
Old 12th September 2012, 02:35   #6  |  Link
nibus
Telewhining
 
Join Date: Mar 2010
Posts: 272
Really the only advantage of mod16 is a very slight increase in compression.

If you want perfect aspect ratios and mod16, try:

768x432 / 16:9 (Widescreen)
768x320 / 2.4:1 (Panoramic widescreen)
768x576 / 4:3

Last edited by nibus; 12th September 2012 at 02:39.
nibus is offline   Reply With Quote
Old 14th September 2012, 16:01   #7  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
Why wouldn't you just encode it to the same size as the input, calculate the SAR, and then rely on aspect ratio information in the container to take care of things?
ramicio is offline   Reply With Quote
Old 14th September 2012, 19:34   #8  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Because some players do not respect aspect ratio information from the container.

There are advantages either way.
Asmodian is offline   Reply With Quote
Old 14th September 2012, 19:42   #9  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Actually in proper h264 encode there should be ar information on stream level. anything that is not able to read that info I personally consider broken. Not sure if standard requires this or not. Fact that many people use only container ar created many problems and confusion. I wish it was never included in matroska spec, same as framerate and resolution info, that can be found in stream itself and that can vary any number of times during one stream.

Last edited by Keiyakusha; 14th September 2012 at 19:45.
Keiyakusha is offline   Reply With Quote
Old 14th September 2012, 19:43   #10  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 826
Quote:
Originally Posted by Asmodian View Post
Because some players do not respect aspect ratio information from the container.
What about AR encoded directly at the stream level? I've yet to see a device that wouldn't honour that information...
kypec is offline   Reply With Quote
Old 14th September 2012, 19:47   #11  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
So they are broken players then, and deserve no respect. I'm not sure that a raw h.264 stream contains anything but pixel aspect ratio, which isn't helpful in the big picture. A container's set aspect ratio and the pixel ratio is what determines the final product.
ramicio is offline   Reply With Quote
Old 14th September 2012, 20:25   #12  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Quote:
Originally Posted by kypec View Post
What about AR encoded directly at the stream level? I've yet to see a device that wouldn't honour that information...
I have seen this but I would call it a broken player for sure (a software player, not hardware). But if one way works fine no matter how stupid the player and another has an issue there is an advantage. Also square pixels can be nice if you want to display without resizing.

I actually use stream level aspect ratios myself (setting SAR in x264), I was just answering why some would want to encode square pixels. Remember there is no "best".
Asmodian is offline   Reply With Quote
Old 14th September 2012, 20:26   #13  |  Link
ramicio
Banned
 
Join Date: Mar 2004
Location: PA, US
Posts: 683
You are resizing the video at one stage, anyway. Since we're talking DVD video here, you would be resizing it twice. Once for encoding and another time during playback.
ramicio is offline   Reply With Quote
Old 14th September 2012, 20:57   #14  |  Link
kypec
User of free A/V tools
 
kypec's Avatar
 
Join Date: Jul 2006
Location: SK
Posts: 826
Quote:
Originally Posted by Asmodian View Post
I actually use stream level aspect ratios myself (setting SAR in x264),
I do it the same way for my encodes.

Quote:
Originally Posted by ramicio View Post
I'm not sure that a raw h.264 stream contains anything but pixel aspect ratio, which isn't helpful in the big picture. A container's set aspect ratio and the pixel ratio is what determines the final product.
When there is no AR specified at container's level then 1:1 should be assumed by default of course. In that case SAR (as specified with --sar switch in x264 parameters) is the only thing that determines final DAR so it is totally helpful also in the big picture.
kypec is offline   Reply With Quote
Old 14th September 2012, 23:44   #15  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Quote:
Originally Posted by ramicio View Post
You are resizing the video at one stage, anyway. Since we're talking DVD video here, you would be resizing it twice. Once for encoding and another time during playback.
Exactly, so if you want to watch the video at native resolution you can resize to square pixels once and not have to do any resize at playback (a DVD on my cell phone for example).

Not that this has anything to do with the OP's question.
Asmodian is offline   Reply With Quote
Reply


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 04:12.


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