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. |
28th March 2015, 14:04 | #1 | Link |
Registered User
Join Date: Dec 2003
Posts: 485
|
Does ffpmegsource2 change aspect?
I have some footage in MP4 format. Footage details comes from mediainfo.
The source footage is: - Size: 720x480 - Display Aspect: 16:9 - Pixel aspect: 1.185 - Display aspect: 1.777 I create a basic AVISynth script: ffmpegsource2("source.m4v", vtrack = -1) QTGMC() In VirtualDub Save AVI as Lagarith codec with fast recompress. No other changes. Output is: - Size: 720x480 - Display Aspect: 3:2 - Pixel aspect: 1.000 - Display aspect: 1.500 Any idea why the aspect change happens? I personally did not set any resizing settings during the conversion. Thanks. JR |
28th March 2015, 14:09 | #2 | Link |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
As you can see, the video resolution remains exactly the same: 720x480. So nothing has been resized. Or in other words: The actual video data has not changed.
Only the "Pixel aspect" ratio, which is a meta-information, has changed from 1.185 (aka "Anamorphic Video") to 1.0 (aka "Square Pixels"). That's why the "Display aspect" ratio is now computed to a different value too! Avisynth delivers "raw" video data to the application. I don't think Avisynth internally carries meta-information, such as "Pixel aspect" ratio, for the clip. Nor does it deliver any such an information to the application. (Also note that applications, especially video players, generally assume a "Pixel aspect" ratio of 1:1, if no explicit Pixel aspect" ratio information is available) [EDIT] Also keep in mind that the AVI format has no proper way for signaling "Pixel aspect" on the container level anyway! Some video formats have their own way, but I have no idea if that applies to Lagarith (probably not).
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 28th March 2015 at 14:20. |
28th March 2015, 15:11 | #3 | Link | |
Registered User
Join Date: Dec 2003
Posts: 485
|
Quote:
Thanks. JR |
|
28th March 2015, 15:26 | #5 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Is AVI final output or intermediate lossless ?
MeGUI allows MeGUI_darX, MeGUI_darY in Avisynth script if feeding in intermediate.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
28th March 2015, 16:06 | #6 | Link | |
Registered User
Join Date: Dec 2003
Posts: 485
|
Quote:
Also is MeGUI better to use than pumping the AVISynth scripts thru VirtualDub? Thanks. JR |
|
28th March 2015, 16:22 | #7 | Link | |||
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Just resize your 720x480 video to 848x480 and it will display at ~16:9 (assuming an "pixel aspect" ration of 1:1). Quote:
VirtualDub is primarily a video editor. You can use it for editing, but you shouldn't use for the final encoding. VirtualDub only supports VFW Codecs, which isn't the best idea for encoding H.264 and the like. MeGUI (or a similar encoder front-end) is good for encoding, but has limited video editing capabilities... Quote:
The PAR ("pixel aspect" ratio) is just a meta-information, which can be signaled to the playback software in one way or another; and which might be respected by your individual video player, or not. Resizing the video so that it will be displayed correctly with a PAR of 1:1 is one option. And maybe the most reliable one - as you don't need to rely on the player to properly apply the PAR. Nonetheless, if you want to avoid resizing the video, then you can simply specify the proper PAR when doing the final encode! The x264 encoder, for example, has the "--sar" option for that purpose!
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 28th March 2015 at 16:33. |
|||
28th March 2015, 16:36 | #8 | Link | |
Registered User
Join Date: Dec 2003
Posts: 485
|
Quote:
I thought when you had a 16:9 DVD source that was 720x480 the correct square pixel frame size was 853x480 or 864x480? Is what I have read in the past off? Thanks. JR |
|
28th March 2015, 16:43 | #9 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 28th March 2015 at 16:46. |
|
28th March 2015, 17:12 | #10 | Link | |
Registered User
Join Date: Jul 2010
Location: Germany
Posts: 357
|
Quote:
|
|
30th March 2015, 05:15 | #12 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,823
|
http://avisynth.nl/index.php/Resize
AVISynth resizing filter comparison I mostly use Spline36Resize myself. ie Spline36Resize(854, 480) I'm a bit OCD when it comes to aspect ratio, and I don't think I've ever encoded a DVD where I didn't want to crop at least a couple of pixels of crud from the sides or a few pixels top and bottom etc, and if the picture is very close to 16:9 I prefer to resize to exactly 16:9 given I have a 16:9 TV so I adjust the cropping as required and do just that (admittedly technically it's probably better not to resize the height but in reality the whole thing is invariably going to be upscaled on playback anyway, assuming you're using a 1080p or 720p TV). Something like: Crop(4, 2, -2, -2) Spline36Resize(832, 468) Quote:
And for x264 encoding, MeGUI means you don't need to user VirtualDub's "external encoders" feature. Last edited by hello_hello; 30th March 2015 at 05:18. |
|
30th March 2015, 08:16 | #13 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
Quote:
|
|
30th March 2015, 10:51 | #14 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,823
|
Quote:
720x576 (no Avisynth resizing): 1024x576: 960x540 (my usual PAL DVD encoding resolution): I know technically not resizing the height is better but it's a PAL DVD, which isn't exactly packed full of high definition goodness, and for NTSC there's even less (and given much of the time I'd be applying some sort of filtering such as noise removal anyway) what did first resizing to 960x540 do in this case that's so detrimental it shows I definitely shouldn't resize that way? |
|
30th March 2015, 17:15 | #15 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,493
|
I never promised it would be noticeably better
But it's certainly going to be mathematically better. Imagine trying the same thing with interleaved black/white rows of pixels. Mathematically you're still doing the same thing to any other picture, even if you can't necessarily see it. |
31st March 2015, 03:45 | #17 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,823
|
No, but you said it's "definitely" better not to resize the height which to me implies it's "noticeably" better not to.
You could probably say the same thing regarding x264 encodes using the PNSR or SSIM tunings. Quote:
Quite often a 960x540 resized DVD looks a little sharper running fullscreen on my TV than an equivalent anamorphic encode, because Spline36 Resize tends to sharpen a little, although admittedly the same applies to a 1024x576 encode. I realise that. I admitted "technically" no height resizing is better but I went on to say I often resize the height a little, obviously because in practice it doesn't make a noticeable difference to quality. |
|
1st April 2015, 00:41 | #18 | Link |
Registered User
Join Date: Dec 2003
Posts: 485
|
Without getting into the badness of deinterlacing in the first place, Is it technically bad to be deinterlacing footage that the aspect ratio is not what it should be? Also is it better to resize (to 1:1) and then deinterlace or deinterlace and then resize?
Thanks. JR Last edited by jriker1; 1st April 2015 at 00:46. |
1st April 2015, 02:02 | #19 | Link | |
Registered User
Join Date: Jul 2010
Location: Germany
Posts: 357
|
Quote:
Whatever you do, don't change the number of lines with a resizer before deinterlacing. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|