Answers.Body: <p>The values in the bracket comes from the stream decoder. The values may also be stored in the MP4 container, specifically the PASP box with a different precision. If they differ, ffmpeg will print both.</p>
  <p>In this case, they differ at the 7th digit after the decimal point.</p>
  <pre><code>  2206/2207 = 0.9995468962392388
  28684/28697 = 0.9995469909746663
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-03T12:50:57.707Z
Answers.Text: That answers most of my question, the other part "would it be better to also specify the expected SAR,DAR during ffmpeg conversion" is YES, I have re-converted with two filters, scale + setdar=16/9 and now it only shows 1 pair of SAR,DAR
Answers.UserDisplayName: joedotnot
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-06-03T04:40:09.583Z
Answers.LastActivityDate: 2022-06-03T04:40:09.583Z
Answers.UserDisplayName: Gyan
Body: <p>I have a file with extension .ts, information given by ffmpeg -i MyMovieFile.ts is:</p>
  <pre><code>[mpegts @ 000001f8fc13fa80] start time for stream 0 is not set in estimate_timings_from_pts
  Input #0, mpegts, from 'MyMovieFile.ts':
    Duration: 01:49:27.52, start: 0.000000, bitrate: 4319 kb/s
    Program 1
    Stream #0:0[0x102]: Data: timed_id3 (ID3  / 0x20334449)
    Stream #0:1[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1052 [SAR 997:1024 DAR 14955:8416], 25 fps, 25 tbr, 90k tbn
    Stream #0:2[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 191 kb/s
  </code></pre>
  <p>I converted to MP4 using ffmpeg with</p>
  <pre><code>-vf scale=1280:720 ^
  -map 0:1 -map 0:2 ^
  -c:v libx264 -c:a aac ^
  </code></pre>
  <p>After conversion, VLC codec information shows:
  Video Resolution = 1280x720 (= Buffer Resolution).</p>
  <p>I am happy with this result; If I now run the converted file thru ffmpeg -i, I get</p>
  <pre><code> Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      encoder         : Lavf59.24.100
    Duration: 01:49:27.52, start: 0.000000, bitrate: 2178 kb/s
    Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 2206:2207 DAR 35296:19863], 2042 kb/s, SAR 28684:28697 DAR 458944:258273, 25 fps, 25 tbr, 12800 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
    Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  </code></pre>
  <p>My question is why am I getting two pairs of SAR/DAR</p>
  <pre><code>[SAR 2206:2207 DAR 35296:19863]  
  SAR 28684:28697 DAR 458944:258273
  </code></pre>
  <p>And would it be better to also specify the expected SAR,DAR during ffmpeg conversion?
  For example, [SAR 1:1 DAR 16:9]</p>
  
Tags: <ffmpeg><aspect>
Title: Converted TS to MP4, what is the meaning of new (and multiple SAR, DAR ) in the output video?
UserDisplayName: joedotnot
ThreadText: # Converted TS to MP4, what is the meaning of new (and multiple SAR, DAR ) in the output video?
  
  (Asked by: username_0 on 2022-06-02)
  
  I have a file with extension .ts, information given by ffmpeg -i MyMovieFile.ts is:
  
  ```
  [mpegts @ 000001f8fc13fa80] start time for stream 0 is not set in estimate_timings_from_pts
  Input #0, mpegts, from 'MyMovieFile.ts':
    Duration: 01:49:27.52, start: 0.000000, bitrate: 4319 kb/s
    Program 1
    Stream #0:0[0x102]: Data: timed_id3 (ID3  / 0x20334449)
    Stream #0:1[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1052 [SAR 997:1024 DAR 14955:8416], 25 fps, 25 tbr, 90k tbn
    Stream #0:2[0x101]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 191 kb/s
  
  ```
  
  I converted to MP4 using ffmpeg with
  
  ```
  -vf scale=1280:720 ^
  -map 0:1 -map 0:2 ^
  -c:v libx264 -c:a aac ^
  
  ```
  
  After conversion, VLC codec information shows:
  Video Resolution = 1280x720 (= Buffer Resolution).
  
  I am happy with this result; If I now run the converted file thru ffmpeg -i, I get
  
  ```
   Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      encoder         : Lavf59.24.100
    Duration: 01:49:27.52, start: 0.000000, bitrate: 2178 kb/s
    Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 2206:2207 DAR 35296:19863], 2042 kb/s, SAR 28684:28697 DAR 458944:258273, 25 fps, 25 tbr, 12800 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
    Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  
  ```
  
  My question is why am I getting two pairs of SAR/DAR
  
  ```
  [SAR 2206:2207 DAR 35296:19863]  
  SAR 28684:28697 DAR 458944:258273
  
  ```
  
  And would it be better to also specify the expected SAR,DAR during ffmpeg conversion?
  For example, [SAR 1:1 DAR 16:9]
  
  **Tags:** ffmpeg, aspect
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-06-03. Score: 0 | Accepted answer
  
  The values in the bracket comes from the stream decoder. The values may also be stored in the MP4 container, specifically the PASP box with a different precision. If they differ, ffmpeg will print both.
  
  In this case, they differ at the 7th digit after the decimal point.
  
  ```
    2206/2207 = 0.9995468962392388
  28684/28697 = 0.9995469909746663
  
  ```
  
  > **Comments:**
  > **username_0**: That answers most of my question, the other part "would it be better to also specify the expected SAR,DAR during ffmpeg conversion" is YES, I have re-converted with two filters, scale + setdar=16/9 and now it only shows 1 pair of SAR,DAR  
  
  ---
  
  