Anamorphic question
Anamorphic question
This may be a stupid question and I'll apologize in advance if it is. I have read the anamorphic section of the wiki and I searched through previous posts.
For 4:3 and hard letterboxed DVD's, is there any harm in encoding with the anamorphic setting on? Or is it better to turn it off and set the horizontal output resolution to 720 so it matches the source (with keep aspect ratio on)? I'll be viewing the content through XBMC with software upscaling on a 1080p television. Thanks.
For 4:3 and hard letterboxed DVD's, is there any harm in encoding with the anamorphic setting on? Or is it better to turn it off and set the horizontal output resolution to 720 so it matches the source (with keep aspect ratio on)? I'll be viewing the content through XBMC with software upscaling on a 1080p television. Thanks.
Re: Anamorphic question
If you turn anamorphic off, your width will be scaled to 640 (-crop). Handbrake won't let you put it back to 720. Why? I suppose because to keep correct aspect the height would need to be artificially up-scaled to match, and thats not cool in the Handbrake philosophy.
So, personally, I'd leave anamorphic on to not lose any information. XBMC doesn't have a problem with this.
--sdm.
So, personally, I'd leave anamorphic on to not lose any information. XBMC doesn't have a problem with this.
--sdm.
Re: Anamorphic question
With the current release and an NTSC source, Handbrake actually does the opposite. Anamorphic on will scale 4:3 material to 640x, so for 4:3 letterboxed material I'd switch anamorphic off.
Re: Anamorphic question
Darn. I was kinda hoping to find a condensed question that expanded to a full size question.
Re: Anamorphic question
well with anamorphic on, 4:3 ntsc content with storage size 720x480 will be displayed at 640x480 (and for OP, xbmc will scale to 1440x1080).TedJ wrote:With the current release and an NTSC source, Handbrake actually does the opposite. Anamorphic on will scale 4:3 material to 640x, so for 4:3 letterboxed material I'd switch anamorphic off.
with anamorphic off, 4:3 ntsc content will be actually scaled from 720x480 to 640x480 (and for OP, xbmc will scale to 1440x1080)
so you are left with 720 -> 1440, or 720 -> 640 -> 1440.
I stand by my original comment. Leave anamorphic on so you are not losing information .
what do you think TedJ
--sdm.
Re: Anamorphic question
Ah, I hadn't taken upscaling into consideration... I stand corrected.
Re: Anamorphic question
And hopefully jbrjake will someday accept my word that most players react to a PASP < 1 by scaling up vertically rather than scaling down horizontally. Maybe.
Rodney
Rodney
Re: Anamorphic question
It's been on my todo list for ages, and I tried to check it in literally just this afternoon, but Ritsuka wouldn't let me:
Here's a patch:IRC wrote:[18:09] *** jbrjake is thinking about checking some stuff in.... --stop-at frame, the libhb part of the no-drc patch, height-stretched 4x3 anamorphic for mp4, and the change for cadence flags in decmpeg2.c so they don't get thrown off by multiple instances from live preview.
[19:52] [ritsuka] yay for more possible screwed up subitlte tracks for 4:3 anamorphic files
[19:53] [jbrjake] ?
[19:56] [ritsuka] QuickTime with the clean aperture mode would still resize to 640x480&
[19:58] [jbrjake] so you're saying you don't want me to make that change? it's cool with me, i never watch videos in actual size windows anyway.
[20:00] [ritsuka] well it may add a possible weird effect if you add subtitles to 4:3 movies, IMHO it's better to leave things as they are now
[20:25] [jbrjake] okay, that's what i'll tell rhester the next time he complains ;p
Code: Select all
Index: libhb/muxmp4.c
===================================================================
--- libhb/muxmp4.c (revision 2097)
+++ libhb/muxmp4.c (working copy)
@@ -194,7 +194,14 @@
MP4AddPixelAspectRatio(m->file, mux_data->track, (uint32_t)width, (uint32_t)height);
- MP4SetTrackFloatProperty(m->file, mux_data->track, "tkhd.width", job->width * (width / height));
+ if( ( width / height ) < 1 )
+ {
+ MP4SetTrackFloatProperty( m->file, mux_data->track, "tkhd.height", job->height / width * height );
+ }
+ else
+ {
+ MP4SetTrackFloatProperty (m->file, mux_data->track, "tkhd.width", job->width * ( width / height ) );
+ }
}
/* add the audio tracks */
Index: libhb/work.c
===================================================================
--- libhb/work.c (revision 2097)
+++ libhb/work.c (working copy)
@@ -209,8 +209,17 @@
title->width, title->height, job->width, job->height,
job->crop[0], job->crop[1], job->crop[2], job->crop[3] );
hb_log( " + pixel aspect ratio: %i / %i", job->anamorphic.par_width, job->anamorphic.par_height );
- hb_log( " + display dimensions: %.0f * %i",
- (float)( job->width * job->anamorphic.par_width / job->anamorphic.par_height ), job->height );
+
+ if( ( job->anamorphic.par_width / job->anamorphic.par_height < 1 ) )
+ {
+ hb_log( " + display dimensions: %i * %.2f",
+ job->width, (float)job->height / (float)job->anamorphic.par_width * (float)job->anamorphic.par_height );
+ }
+ else
+ {
+ hb_log( " + display dimensions: %.2f * %i",
+ (float)( job->width * job->anamorphic.par_width / job->anamorphic.par_height ), job->height );
+ }
}
else
{
Re: Anamorphic question
Hrm...I hadn't considered that. I guess it's all a question of whether QuickTime scales before or after adding subtitles (I'd surely think before, otherwise the subtitles would distort...but again, only on a vertical resize).
OK...I just checked. ritsuka is mistaken. 720x480 NTSC D1 4:3 source, loose anamorphic, in QuickTime 7.5.5:
Format: H.264, 720 x 540, Millions
Normal Size: 720 x 540 pixels
Current Size: 720 x 540 pixels
Now will it screw up subs? Good question. But as long as you indicate the ratio as 0.75 in PASP and set the visual height (trak.tkhd.height) to 540, you're set on Apple gear.
Rodney
OK...I just checked. ritsuka is mistaken. 720x480 NTSC D1 4:3 source, loose anamorphic, in QuickTime 7.5.5:
Format: H.264, 720 x 540, Millions
Normal Size: 720 x 540 pixels
Current Size: 720 x 540 pixels
Now will it screw up subs? Good question. But as long as you indicate the ratio as 0.75 in PASP and set the visual height (trak.tkhd.height) to 540, you're set on Apple gear.
Rodney
Re: Anamorphic question
Enable the clean aperture mode in the property window and see what happens
Re: Anamorphic question
The exact thing that happens when you strip the PASP atom.
Why?
http://www.interactivetvweb.org/tutoria ... _ui_design
Clean Aperture, in Apple parlance, is hardcoded to a 640x480 bounding box for NTSC content.
QuickTime is behaving as documented, and PASP is being honored properly (or, in this case, outright ignored .
I still fail to see the conflict when QuickTime does scale *up* as expected with a 3:4 PASP in Classic mode.
Rodney
Why?
http://www.interactivetvweb.org/tutoria ... _ui_design
Clean Aperture, in Apple parlance, is hardcoded to a 640x480 bounding box for NTSC content.
QuickTime is behaving as documented, and PASP is being honored properly (or, in this case, outright ignored .
I still fail to see the conflict when QuickTime does scale *up* as expected with a 3:4 PASP in Classic mode.
Rodney
Re: Anamorphic question
The problem is that a subtitle track has a fixed size, so if you add one and them quicktime scales the movies differently, you'll have a subtitle track truncated or too small.
And no, clean aperture in quicktime is not hardcoded to anything, it just doesn't change the height, only the width.
And no, clean aperture in quicktime is not hardcoded to anything, it just doesn't change the height, only the width.
Re: Anamorphic question
If the comment about clean aperture is true, then PAL 4:3 strict anamorphic content should require different scaling rules. I will test and see.
Rodney
Rodney
Re: Anamorphic question
PAL D1 4:3
Source: 720x576 (actual pixels)
QT Classic: 768x576 (PASP applied)
QT Clean: 768x576 (PASP applied)
Was this as expected? If so, why is clean altering the visual size of PASP < 1 but not PASP >= 1?
Rodney
Source: 720x576 (actual pixels)
QT Classic: 768x576 (PASP applied)
QT Clean: 768x576 (PASP applied)
Was this as expected? If so, why is clean altering the visual size of PASP < 1 but not PASP >= 1?
Rodney