ffmpeg – Why can’t set SDR,DAR value as desired in the video?

Display part.mp4‘s important info :

ffprobe -hide_banner  -i  part.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'part.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.27.100
  Duration: 00:02:50.04, start: 0.000000, bitrate: 1309 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 406x720, 1233 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc59.37.100 libx264
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]

I want to set the SAR as 1:1 ,DAR as 203:360.

ffmpeg -i part.mp4 -vf scale=406x720,setsar=sar=1/1,setdar=dar=406/720 -y  out.mp4 

Check the value:

ffprobe -hide_banner -i  out.mp4 
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf59.27.100
  Duration: 00:02:50.04, start: 0.000000, bitrate: 1252 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 406x720 [SAR 1:1 DAR 203:360], 1176 kb/s, SAR 9540:9541 DAR 53:94, 25 fps, 25 tbr, 12800 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc59.37.100 libx264
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 69 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]

In the line 406x720 [SAR 1:1 DAR 203:360], 1176 kb/s, SAR 9540:9541 DAR 53:94,two SAR value–1:1 and 9540:9541,two DAR value–203:360 and 9540:9541.

ffprobe -v error  -i out.mp4 -show_streams  |grep aspect_ratio
sample_aspect_ratio=9540:9541
display_aspect_ratio=53:94

Why can’t set SDR,DAR value as desired (SAR as 1:1 ,DAR as 203:360) in the video?

Read more here: Source link