VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 40 of 40
  1. -vf setbar="Cheers", setcar="Cadillac" etc.
    Quote Quote  
  2. Originally Posted by lollo View Post
    or simplier:

    Code:
    ffmpeg -sar 12:11
    -sar 16:15 didn't cause ffmpeg to set any aspect ratio when I tried it (720x576 video). I think it only specifies the input SAR, although the log file says:

    Code:
    Reading option '-sar' ... matched as AVOption 'sar' with argument '16:15'.
    From the log file when using -vf setsar=sar=16/15

    Code:
    [Parsed_setsar_0 @ 0000000019936940] w:720 h:576 sar:0/1 dar:5/4 -> sar:16/15 dar:4/3
    .
    [rawvideo @ 0000000019840340] PACKET SIZE: 622080, STRIDE: 1080
    [libx264 @ 0000000000b8b340] using SAR=16/15
    From the log file when using -vf setdar=dar=4/3

    Code:
    [Parsed_setdar_0 @ 0000000019536880] w:720 h:576 dar:5/4 sar:0/1 -> dar:4/3 sar:16/15
    .
    [rawvideo @ 0000000019440240] PACKET SIZE: 622080, STRIDE: 1080
    [libx264 @ 0000000000b8b340] using SAR=16/15
    From the log file when using -aspect 4:3

    Code:
    Applying option aspect (set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)) with argument 4:3.
    .
    [rawvideo @ 0000000019670140] PACKET SIZE: 622080, STRIDE: 1080
    [libx264 @ 0000000000b8b2c0] using SAR=16/15
    In the case of ffmpeg, it obviously converts a specified DAR to a SAR for libx264.
    Last edited by hello_hello; 22nd May 2025 at 17:08.
    Quote Quote  
  3. Originally Posted by hello_hello View Post

    -sar 16:15 didn't cause ffmpeg to set any aspect ratio when I tried it. I think it only specifies the input SAR.
    Yes, use the filter -vf setsar=..... for setting the target SAR (aka PAR).
    Quote Quote  
  4. Originally Posted by Sharc View Post
    -sar 16:15 didn't cause ffmpeg to set any aspect ratio when I tried it. I think it only specifies the input SAR.
    Yes, use the filter -vf setsar=..... for setting the target SAR (aka PAR).
    Quote Quote  
  5. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by hello_hello View Post
    Code:
    Applying option aspect (set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)) with argument 4:3.
    .
    [rawvideo @ 0000000019670140] PACKET SIZE: 622080, STRIDE: 1080
    [libx264 @ 0000000000b8b2c0] using SAR=16/15
    Congratulations!

    You just discoverd that PAR=DAR/SAR (SAR here = Storage Aspect Ratio):
    DAR = 4:3
    SAR = 720:576
    PAR = DAR/SAR = 4/3 * 576/720 = 2304/2160 = 16/15
    Quote Quote  
  6. Originally Posted by lollo View Post
    Originally Posted by hello_hello View Post
    Code:
    Applying option aspect (set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)) with argument 4:3.
    .
    [rawvideo @ 0000000019670140] PACKET SIZE: 622080, STRIDE: 1080
    [libx264 @ 0000000000b8b2c0] using SAR=16/15
    Congratulations!

    You just discoverd that PAR=DAR/SAR (SAR here = Storage Aspect Ratio):
    DAR = 4:3
    SAR = 720:576
    PAR = DAR/SAR = 4/3 * 576/720 = 2304/2160 = 16/15
    Originally Posted by lollo View Post
    The DAR is respect by (almost) all devices, the PAR not.
    What I obviously discovered is specifying a SAR/PAR produces the same result as specifying the appropriate DAR.
    Quote Quote  
  7. Captures & Restoration lollo's Avatar
    Join Date
    Jul 2018
    Location
    Italy
    Search Comp PM
    Originally Posted by hello_hello View Post
    What I obviously discovered is specifying a SAR/PAR produces the same result as specifying the appropriate DAR.
    Sure.

    The difference is that we are in the contest of Analog Captures, needing cropping/masking.
    When you specify the PAR (if supported by the players) you can croop by any amount without taking care of adjusting the proportions.
    If you specify the DAR (supported by almost everything) you cannot crop by any amount without compensate to keep the right proportions.

    We talked about that many times
    Quote Quote  
  8. I was simply trying to discover why you've said specifying a DAR is supported by almost everything while specifying a SAR/PAR may not be supported, when either way ffmpeg writes the same SAR/PAR to the video stream and the same corresponding DAR to the container (I'm not sure if a DAR or SAR is written to an MP4 container, but it's the DAR for MKV).
    Quote Quote  
  9. Absolutely agree — the distinction between SAR (or PAR) and DAR becomes really important when you’re dealing with cropping or masking during post-processing. Setting the PAR means you can freely crop or mask the edges without having to manually recalculate or adjust the aspect ratio each time, since the pixel aspect ratio handles the proportional scaling for you.
    On the other hand, if you only set DAR, then any cropping you do will throw off the displayed image proportions unless you also adjust the DAR accordingly, which can get tedious and error-prone. So for workflows involving lots of trimming or masking, relying on SAR/PAR gives you a lot more flexibility and keeps your video looking correct without extra math every time you tweak the frame.
    This is especially handy when working with analog captures or non-square pixels where the storage resolution and display aspect ratio don’t match naturally. Overall, it’s a subtle but crucial point that can save a ton of headaches in video restoration and editing projects.
    Quote Quote  
  10. Member
    Join Date
    May 2005
    Location
    Australia-PAL Land
    Search Comp PM
    Originally Posted by Henry
    Setting the PAR means you can freely crop or mask the edges without having to manually recalculate or adjust the aspect ratio each time, since the pixel aspect ratio handles the proportional scaling for you.
    That's fine if you have only one contiguous clip, but if you are joining clips, then the lateral edges are going to move in and out depending on how much you took off.

    On the other hand, if you crop to 4:3 each time and export using as SAR of 1:1/square pixels, you will always have a full, correctly proportioned 4:3 screen. Handling the maths becomes easy after you've done it a few times.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!