Posts: 84
Threads: 6
Joined: Feb 2021
I read this to understand how the resizing settings with Hybrid work, still have some questions:
https://forum.selur.net/showthread.php?t...ht=picture
https://forum.selur.net/showthread.php?tid=1300
My video file VHS PAL capture to lossless HuffYUV with VirtualDub, 720x576 25i, DAR 4:3, PAR is not set in the header, but I assume it is 1150/1053 as it is from an analog content.
But in this case the calculated DAR would be 1.365, not exactly 1.33333 to reflect 4:3 ratio. This might be the case why cropping from 720 to 704 is recommended. It would be 704x576 with PAR = 1150/1053 resulting in 1.33, what is a correct 4:3 ratio.
But for the MPEG-4 based content PAR has to be 12:11, for 720x576 would result in 1.364, it is also not the 4:3.
It means 720x576 has to be cut to 704?
I am planning to cut some pixels on the bottom, on the sides to remove an overscan noise, but this should not affect the question about 704 or 720 frame size?
Upscaling to 1280x720 in Hybrid.
The PAR has to be 1:1 of converted file.
After opening video file, making all X264, Filtering settings, the default crop/resize parameters are:
· Crop/Resize>Base: Input Resolution 720x576, Output Resolution 1280x720
· Crop/Resize>Base> LetterBox – checked (Width 1280, Height 720) grayed out, cannot be changed
· Crop/Resize>Base>Picture Resize> Auto adjust – height to Mode 8, Target Resolution 904x720 (720 is grayed out)
· Crop/Resize>Base>Pixel Aspect Ratio (PAR):
· Input PAR 1:1
· Force Input PAR type – unchecked
· Output PAR 1:1 grayed out
· Convert Output to PAR (checked, grayed out), Square Pixel (1:1)
Looking in to Vapoursynth code, left and right 188 pixel borders added, it means 904 + 2x 188 = 1280, it is correct value.
Since the video file’s PAR is not 1:1, it has to be changed to:
· Crop/Resize>Base>Pixel Aspect Ratio (PAR)> Input PAR set to 12:11
· Crop/Resize>Base>Picture Resize changes to 984x720, it 1.3666 ratio, not the 4:3
Vapoursynth code now shows 148 borders added, 984 + 2x 148 = 1280, looks like correct.
Do I have to crop frame to 704x576 to get the accurate 4:3 ratio, or 720x576 is the correct value?
Is Input PAR correct 12:11?
Is my workflow correct?
Another thing to ask.
I was trying to upscale to 1920x1080 following?
https://forum.selur.net/showthread.php?tid=1300
The Picture Resize, Target Resolution does not allow to change values to above 984x720.
What do I do wrong?
Posts: 10.552
Threads: 57
Joined: May 2017
Quote:My video file VHS PAL capture to lossless HuffYUV with VirtualDub, 720x576 25i, DAR 4:3, PAR is not set in the header, but I assume it is 1150/1053 as it is from an analog content.
If there's a DAR, there is also a PAR.
Hybrid uses the PAR since it does not change through cropping.
If Hybrid without cropping and resizing properly shows your content without distortions, it will not distort the image unless:
a. you overwrite the Input PAR
b. your disable 'Auto adjust'
so any setting otherwise used will will not distort the image.
Quote:It means 720x576 has to be cut to 704?
I would not crop to 704 if that removes active image content.
Quote:Do I have to crop frame to 704x576 to get the accurate 4:3 ratio, or 720x576 is the correct value
If the image isn't distorted I would not crop active content.
Quote:Is Input PAR correct 12:11?
Why should it?
Assuming your VHS capture wasn't a capture or a mp4 which uses that PAR and you now try to somehow rescue that content ?
There is no way to say that PAR x:y is correct without looking at the content and even then you need something that allows you to properly see distortions,...
(a circle, square or similar)
Quote:Is my workflow correct?
the steps you listed look fine, assuming you enabled Blu-ray compatibility in x264 otherwise:
Crop/Resize>Base> LetterBox – checked (Width 1280, Height 720) grayed out, cannot be changed
would not happen automatically.
Quote:I was trying to upscale to 1920x1080 following?
Only difference between resizing to 1920x1080 than to 1280x720 would be:
a. a different resize width (height would be auto adjusted)
b. different letterboxing.
Quote:The Picture Resize, Target Resolution does not allow to change values to above 984x720.
What do I do wrong?
you probably should also enable: "Crop/Resize->Misc->On Source Change->Maximize letterboxing"
By default Hybrid assumes that if you upscale to be Blu-Ray compatible you want to minimize the letterboxing, thus 1280x720 is the correct solution and 904x720 would be the max resolution which:
a. fits into the letterbox
b. properly displays your content
If you enable "Maximize letterboxing" Hybrid knows you want to go for the maximum available size and thus will aim for 1920x1080 and you are able to use higher resolutions.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 84
Threads: 6
Joined: Feb 2021
OK, I was wrong, there is no DAR data in the file’s header.
When imported file in to Tmpgnenc Authoring Works, clip properties shows Display 4:3, 720x576.
Hybrid in Video properties shows:
· Resolution 720x576
· PAR 1
· Stretch ?
I am not trying to rescue that content. My capture is from VHS tape using Diamond VC500 capture device and following Lordsmurf’s guidance on Digitalfaq.
I was thinking about PAR 12:11 since 720x576 to get in to DAR requires PAR’s 12:11 coefficient: (720x576) * 12/11 = 1.36 that is approx. = 4:3 the display ratio.
I thought there cannot be another PAR value, sine I know the 720x576 and 4:3. PAR should follow that ratio SAR * PAR = DAR ?
If I open file with Hybrid by default Input PAR is set to 1:1.
Using preview the circle in the video has correct shape, but the Input DAR 1:1 definitely is not correct.
But Target Resolution is correct:
· Crop/Resize>Base>Picture Resize>Target Resolution 904x720 is correct, following 720:576 ratio 1.25.
Playing encoded with Hybrid video a circle is squeezed from sides, the actual frame dimensions on PC screen are with 1.25 ratio. Indicates that was used wrong Input PAR 1:1.
(Encoding same file with Authoring Works, resulting file plays on PC with correct DAR, frame dimensions, circle has correct shape. Authoring Works uses 720x576 and Display 4:3. Not asking about PAR.)
Changing Input PAR to 12:11.
· Crop/Resize>Base>Picture Resize>Target Resolution changes to 984x720.
Using preview the circle in the video has correct shape.
Playing encoded video a circle has correct shape, frame dimensions measured on PC screen as ~1.333 ratio.
But Target Resolution 984x720 has slightly different ratio of 1.3666, not the same as 4:3. It is difficult to measure on the screen a circle shape object to understand if it is distorted.
Does it mean that correct PAR is 12:11 and Input PAR has to be manual changed from default 1:1 to 12:11 ?
Posts: 10.552
Threads: 57
Joined: May 2017
Quote:I thought there cannot be another PAR value, sine I know the 720x576 and 4:3. PAR should follow that ratio SAR * PAR = DAR ?
you might want to read http://web.archive.org/web/2011122800541...onversion/
Quote:If I open file with Hybrid by default Input PAR is set to 1:1.
Using preview the circle in the video has correct shape, but the Input DAR 1:1 definitely is not correct.
If the Vapoursynth Preview shows the circle correctly the values Hybrid uses are correct.
And a PAR of 1 would mean that the DAR is the same as the SAR (=sample aspect ration = 720/576).
Do not use the normal Preview for this!
Quote:Does it mean that correct PAR is 12:11 and Input PAR has to be manual changed from default 1:1 to 12:11 ?
I doubt that 12:11 is correct more likely 1150:1053 (ITU-R 601 - common for analog content).
see: https://forum.selur.net/showthread.php?tid=597 and read the linked sites.
Quote:Playing encoded video a circle has correct shape, frame dimensions measured on PC screen as ~1.333 ratio.
But Target Resolution 984x720 has slightly different ratio of 1.3666, not the same as 4:3. It is difficult to measure on the screen a circle shape object to understand if it is distorted.
Problem is: There is tons of content that does not abide to any standards and processing often also messes with the par.
Also on old analog content the PAR does not refer to the active pixels, but the pixels you have after the overscan of the TV was applied.
So inside the overscan you can have active pixels,...
Now you got to choose: either keep the active pixels (this is what I usually prefer) or crop the content.
Then there is the problem with digitalizing content, if capture at a different resolution than the active pixels you change the content.
-> I would not care that much to be too accurate and always prefer to:
a. keep the proportions correct
b. keep all the active pixels I can get
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 84
Threads: 6
Joined: Feb 2021
Resizing/Upscaling is the final thing I need to learn before I start converting my library.
Thanks, I read your recommended readings per provided links.
OK, agree an analog capture has PAR 1150:1053 (ITU-R 601), very similar to 12:11.
I am not cropping, keeping 720x576.
If I keep Input PAR as default 1:1, Target Resolution 904x720, now I am using correct Vapoursynth (not a normal) Preview, I see squeezed circle from the sides, frame on PC screen measures with 1.25 proportions, same playing encoded video with HW media player (Blu Ray player in the media player mode) on TV screen.
If I set Input PAR 1150:1053, Target Resolution 984x720, using Vapoursynth Preview I see the correct shape of circle, frame on PC screen measures with 1.333 (4:3) proportions.
Encoded file plays with HW media player on TV screen (as well on PC screen) with correct frame 1.333 dimensions, correct circle shape.
Re. you wrote:
“If the Vapoursynth Preview shows the circle correctly the values Hybrid uses are correct.”
The Vapoursynth Preview shows squeezed circle using default Input PAR 1:1.
It means that 1150:1053 values have to be entered in to Input PAR and override default value of 1:1, correct?
One thing to clarify:
My video file is 720x576, DAR 4:3, Hybrid Video properties show PAR 1, as you explained:
“And a PAR of 1 would mean that the DAR is the same as the SAR (=sample aspect ration = 720/576).”
How this can be DAR = SAR. DAR is 4:3 = 1.333, SAR 720/576 = 1.25, they are not the same?
P.S. I found this info:
The un-encoded AVI capture video file does not have display aspect ratio (DAR) information embedded in its data. Nor does un-encoded video have a pixel-shape aspect ratio (PAR). And always plays at its physical frame size.
Might be that explains why Hybrid uses Input PAR 1:1 for this video, and in order to have correct Target Resolution, Input PAR has to be set manually to PAR 1150:1053.
Posts: 10.552
Threads: 57
Joined: May 2017
Quote:It means that 1150:1053 values have to be entered in to Input PAR and override default value of 1:1, correct?
If that PAR fixes the perspective: yes
Quote:One thing to clarify:
My video file is 720x576, DAR 4:3, Hybrid Video properties show PAR 1, as you explained:
“And a PAR of 1 would mean that the DAR is the same as the SAR (=sample aspect ration = 720/576).”
How this can be DAR = SAR. DAR is 4:3 = 1.333, SAR 720/576 = 1.25, they are not the same?
That was under the assumption that the Vapoursynth preview is shown correctly, which we now know that it wasn't.
Hybrid takes the PAR from the source. If there are no flags, the default flag for PAR is 1:1, so Hybrid assumes that.
(Since PAR defaults to 1:1 you get that DAR = SAR.)
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 84
Threads: 6
Joined: Feb 2021
Now is clear.
For my VHS video achieve I have done two sets of captures, one with VC500 and one with Canopus ADV100.
Now I switched to checking the Canopus generated DV avi file, from same VHS tapes. This one has the PAR data in the header, Hybrid shows PAR = 1.067.
Opening file in Hybrid sets automatically Input PAR 16:15, Target Resolution 960:720, what is the exact 4:3 Display Ratio, 1.333
For video captured with VC500 device, where is no PAR data in the header, would it make sense to set Input PAR 16:15, instead of 1150:1053 as I was going, since it is more close to 1.333 ratio, vs 1.366 using 1150:1053 and this is what Canopus has inserted?
One more:
If use/check Force Input PAR type, changing value to “ITU-601” (that should be the correct PAR for an analog capture as you said), Input PAR stays same as default 1:1, Target Resolution stays the same as well 904x720. Using Vapoursynth Preview, I see squeezed circle.
Why entering Forcing Input PAR to ITU-601 does not change PAR and Target resolution values, looks like it does not go in to effect?
Posts: 10.552
Threads: 57
Joined: May 2017
Quote:For video captured with VC500 device, where is no PAR data in the header, would it make sense to set Input PAR 16:15, instead of 1150:1053 as I was going, since it is more close to 1.333 ratio, vs 1.366 using 1150:1053 and this is what Canopus has inserted?
Whether it makes more sense or not depends on whether it causes distortions or not.
Quote:One more:
If use/check Force Input PAR type, changing value to “ITU-601” (that should be the correct PAR for an analog capture as you said), Input PAR stays same as default 1:1, Target Resolution stays the same as well 904x720. Using Vapoursynth Preview, I see squeezed circle.
Why entering Forcing Input PAR to ITU-601 does not change PAR and Target resolution values, looks like it does not go in to effect?
PAR 1:1 does not change in any of the par type, what 'Force input PAR type' does is to change the interpretation of the found information.
see: https://forum.selur.net/showthread.php?tid=597
It does not miraculously know whether your source is 4:3 or 16:9.
He's an example on what it does:
Assuming your source if flagged as '12/11' which would normally mean MPEG-4 (PAR type) for PAL 4:3 content.
If you now set it to 'ITU-601' instead of '12/11' input PAR would be changed to '1150/1053'.
Cu Selur
Ps.: The PAR info Hybrid shows its what it can gather through mediainfo&ffmpeg if both of those tools find no par info 1:1 is assumed.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 84
Threads: 6
Joined: Feb 2021
Next step to crop 12 pixels on the bottom and 4 on the sides to remove an overscan noise, not for changing/correcting size, just to remove noise.
Or this is not good idea, since as you said you would prefer to not crop, keep active pixels, not to remove active image content (well, that content is a noise)?
I read that is better to do masking edges, not cropping, but I think this is what Hybrid does, crops noise on the edges and adds borders = same effect.
Can I just simply use an automated cropping method.
Is this correct workflow?
· Setting manually Input PAR 16:15
· Crop/Resize>Base>Picture Resize>Target Resolution changes from 904x720 to 904x680.
That is strange, it should change 904 values instead to keep max High?
· Manually increasing 904 to max allowed 960, to have 720 back. Now Target Resolution 960x720.
· Crop/Resize>Base>Enabling/check Picture Crop. Setting Left/Right 4 pixels, Bottom 12 pixels. >Target Resolution changes from 960x720 to 952x704.
· Manually increasing 952 to max allowed 968, to have 720 back. Now Target Resolution 968x720.
Vapoursynth code now shows 156 borders added left/right, 968 + 2x 156 = 1280, letterboxing 968x720 to 1280x720, looks correct.
I would think it is a god thing to keep max High = 720, keeping max resolution?
But why needed to do/adjust this manually, every time changing PAR, Cropping values?
Posts: 10.552
Threads: 57
Joined: May 2017
Quote:Or this is not good idea, since as you said you would prefer to not crop, keep active pixels, not to remove active image content (well, that content is a noise)?
if it's just noise I would cut it
Quote:I read that is better to do masking edges, not cropping, but I think this is what Hybrid does, crops noise on the edges and adds borders = same effect.
No clue what 'masking edges' means. You the black bars cropped your be added back through the letterboxing.
Quote:Is this correct workflow?
How should I know if it's the correct work flow if you do not describe in detail what you want to do with those steps.
Quote:That is strange, it should change 904 values instead to keep max High?
This probaly does not happen since you first changed the par and then cropped.
Quote:I would think it is a god thing to keep max High = 720, keeping max resolution?
Yes, I would use the whole height otherwise you would have black borders at the top and bottom too,...
Quote:But why needed to do/adjust this manually, every time changing PAR, Cropping values?
What makes you thing this should not need adjustment if you change the PAR or the cropping values?!?
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
|