Selur's Little Message Board
From 5:4 to 4:3 - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: From 5:4 to 4:3 (/thread-3252.html)

Pages: 1 2


From 5:4 to 4:3 - Bartoloni - 04.06.2023

usually i take PAL 625i AVI at 720x576  using a blackmagic intensity pro... this come from a VCR (VHS)..
Hybrid do a great job deinterlacing, removing grain on dark footages... removing black frames that come from the Intensity pro... etc etc etc... a great tool!..
to be sure to not have audio/video desync usually i'm using matroska container ( audio from PCm to aac 128 )
to make VLC and other players can play the final matroska (stretching it horizontally) from 720x576 (saved) to 768x576)  5:4 to 4:3 ?
i have to change the pixel aspect ratio ( PAR) ...
i set as input 16x15 (is this correct???) ... without any "real" resize of footage (to be sure to not add more datas to clip increasing size with interpolated datas)

i can't understand why 16X15 (i come to this choice after a day of changing any input/output PAR types) make the final output set to 4:3..
BTW... it's better to RESIZE for real the footage (from 720x576 to 768x576) ? using maybe modern algorithms (which?) or leave the output as original "dimensions"?

asking this because maybe these clip can be wrongly imported on video editing softwares (as a 720x576) ..maybe is better to store them as a real 4:3  ?


RE: From 5:4 to 4:3 - Selur - 04.06.2023

The 5:4 is the storage aspect ratio (720x576 <> 720/576 = 1.25 <> 5:4).
16:15 is a pixel aspect ratio. (Hybrid takes this from the flags of your source).
So 720x576 will be displayed with 720*(16/15)x576 = 768x576, so the display aspect ratio is 768/576 <> 1.33.. <> 4:3.

You need to read up on what pixel aspect ratio, display aspect ratio and storage aspect ratio means.
Best start with [INFO] About pixel aspect ratios,.. and the pages that are linked there.

By default, (resize disabled, input and output par unchanged) Hybrid will take the video, encode it and copy the par info from the input to the output.
If you change the input pixel aspect ratio (only do this is your input is wrongly flagged) and resize is disabled, Hybrid will encode the content and flag the output with the changed PAR.
If input and output PAR are the same, and you resize, Hybrid will calculate the width (or height, depending on what you chose to specify) without changing the PAR.
If input and output PAR differ, Hybrid will adjust the height/width to maintain the same display aspect ratio while taking the changed pixel and storage aspect ratio into account.
All the calculations are basic arithmetic, nothing fancy or complicated.
-> like I wrote, read-up on aspect ratios and make sure you keep in mind which aspect ratio you speak of.

Cu Selur

Ps.: MediaInfo also has more detailed view for the collected data, which should differentiate between the display aspect ratio the pixel aspect ratio and the (storage) resolution of the content.

PPs.: 1280x720 and 1920x1080 content normally uses a PAR of 1:1. SD content often does not. (one of the links has tons of infos about this)


RE: From 5:4 to 4:3 - humanoid86 - 05.06.2023

try it - x264 < quantizer

don't touch ProRes


RE: From 5:4 to 4:3 - Selur - 05.06.2023

@humanoid86: Wrong thread? Your answer doesn't seem to be related to the thread at all.


RE: From 5:4 to 4:3 - Bartoloni - 05.06.2023

Quote:If input and output PAR differ, Hybrid will adjust the height/width to maintain the same display aspect ratio while taking the changed pixel and storage aspect ratio into account.
Ok, but why the input resolution is 720x576 ( Hybrid detect 1:1 anspect ratio)  and if i change the input par to 16x15 , the output is again 720x576? there is a resize to the same size? i can add the PAR values on a 2nd time after rendering? (are these values just something hardcoded on the CLIP to make players able to understand what "kind" of pixels geometry is used?)

mi question is: if i leave unchanged the PAR / DAR (these will be copied from original)... that are from a VHS (recognized as 5:4) .. anyone watching the video is seeing not circles but vertical ellipses (because the original footage are for OLD CRT with rectangular pixels) .. i want to be sure that who is watching the clip can see' circles on car wheels .. maybe i need to leave PAR /DAR original and resize to 768 using modern algorith to obtain a 768x576 final video that can be played on TV - PCplayers - video editors without any horizontal strecthing issue?


RE: From 5:4 to 4:3 - humanoid86 - 05.06.2023

(05.06.2023, 10:01)Bartoloni Wrote:
Quote:If input and output PAR differ, Hybrid will adjust the height/width to maintain the same display aspect ratio while taking the changed pixel and storage aspect ratio into account.
Ok, but why the input resolution is 720x576 ( Hybrid detect 1:1 anspect ratio)  and if i change the input par to 16x15 , the output is again 720x576? there is a resize to the same size? i can add the PAR values on a 2nd time after rendering? (are these values just something hardcoded on the CLIP to make players able to understand what "kind" of pixels geometry is used?)

mi question is: if i leave unchanged the PAR / DAR (these will be copied from original)... that are from a VHS (recognized as 5:4) .. anyone watching the video is seeing not circles but vertical ellipses (because the original footage are for OLD CRT with rectangular pixels) .. i want to be sure that who is watching the clip can see' circles on car wheels .. maybe i need to leave PAR /DAR  original and resize to 768 using modern algorith to obtain a 768x576 final video that can be played on TV - PCplayers - video editors without any horizontal strecthing issue?

Idea try it - x264 < quantizer

PS
DAR/PAR is in the codec


RE: From 5:4 to 4:3 - Bartoloni - 05.06.2023

sorry i can't understand what this mean... Quantizer?  ( do you mean the constant quantizer 1-pass) ???


RE: From 5:4 to 4:3 - Selur - 06.06.2023

Quote:Ok, but why the input resolution is 720x576 ( Hybrid detect 1:1 anspect ratio) and if i change the input par to 16x15 , the output is again 720x576?
You need to differentiate between 'pixel aspect ratio' (PAR), the 'display aspect ratio' (DAR) and the 'storage aspect ratio' (SAR).
1:1 is the PAR, so is 16:15, the PAR is only signaled as a flag which tells the player how to resize upon playback.
If you change the PAR you do not change the 'storage aspect ratio'.

Quote: there is a resize to the same size?
Huh
Quote: i can add the PAR values on a 2nd time after rendering? (are these values just something hardcoded on the CLIP to make players able to understand what "kind" of pixels geometry is used?)
PAR signaling can be stored on the stream and the container level.
The container level is usually easy to change.
The stream level can only be changed on some formats using ffmpeg bitstream filters (https://ffmpeg.org/ffmpeg-bitstream-filters.html), on others a reencode is needed.

Usually the DAR is not signaled, it's calculated using PAR and SAR, which is why Hybrid only changes the PAR and the SAR.
Since DAR is calculated, you change it by changing PAR and or SAR.
Since changing the PAR does not change the SAR, it also does not change when you crop or resize (those change the SAR).
Options under 'Pixel Aspect Ratio (PAR)' change the PAR.
'Picture Crop', 'Picture Resize' and 'Letterbox' change the SAR.

Cu Selur


RE: From 5:4 to 4:3 - humanoid86 - 06.06.2023

(05.06.2023, 21:08)Bartoloni Wrote: sorry i can't understand what this mean... Quantizer?  ( do you mean the constant quantizer 1-pass) ???

oh


Hybrid is intended for advanced users.
It's not intended to be a tool used by everyone. It's not intended to please amateurs who need a wizard-like interface..
If you don't know the basics about containers, video formats, etc. Hybrid is not meant for you.

PS
this "wonderful" software is not for you
keep using the HandBrake


RE: From 5:4 to 4:3 - Bartoloni - 06.06.2023

ok, this make everything more clear, thank you