Answers.Body: <p>As explained in the <a href="https://ffmpeg.org/ffmpeg-formats.html#concat-1" rel="nofollow noreferrer">documentation</a>, the <code>inpoint</code> directive works best with intra frame codecs, because for non-intra frame ones you will usually get extra packets before the actual In point and the decoded content will most likely contain frames before In point too.</p>
  <p>And it's the same problem for <code>outpoint</code> directive.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-12T14:02:50.590Z
Answers.Text: Okay so to make it work with the Videos I have I should use ffmpeg to re-render them using a intra-frame codec? Right?
Answers.UserDisplayName: Snickbrack
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-12T14:11:36.500Z
Answers.Text: @Snickbrack Yes. For example : `ffmpeg -i input -c:v libx264 -g 1 output`
Answers.UserDisplayName: Alain1A45
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-12T13:14:35.250Z
Answers.LastActivityDate: 2024-02-12T13:23:30.300Z
Answers.LastEditDate: 2024-02-12T13:23:30.300Z
Answers.UserDisplayName: Alain1A45
Body: <p>I am using this Video-List:</p>
  <pre><code>file 'C:\Users\X\Documents\test\input.mp4'
  inpoint 00:00:02.7650000
  outpoint 00:00:04.7650000
  </code></pre>
  <p>and the following Command:</p>
  <pre><code>ffmpeg -y -safe 0 -f concat -i output.txt -map 0:v -map 0:a -c:a copy -c:v copy output.mp4
  </code></pre>
  <p>which should result in a Video with 2 Seconds in Length. But if I do a check with ffprobe I get this:</p>
  <pre><code>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      encoder         : Lavf60.16.100
    Duration: 00:00:04.85, start: 0.000000, bitrate: 394 kb/s
    Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 382 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
    Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  </code></pre>
  <p>Whats the cause of this?</p>
  
Tags: <ffmpeg><mp4><ffprobe>
Title: Concatenated Video created with FFMPEG is longer than expected
UserDisplayName: Snickbrack
ThreadText: # Concatenated Video created with FFMPEG is longer than expected
  
  (Asked by: username_0 on 2024-02-12)
  
  I am using this Video-List:
  
  ```
  file 'C:\Users\X\Documents\test\input.mp4'
  inpoint 00:00:02.7650000
  outpoint 00:00:04.7650000
  
  ```
  
  and the following Command:
  
  ```
  ffmpeg -y -safe 0 -f concat -i output.txt -map 0:v -map 0:a -c:a copy -c:v copy output.mp4
  
  ```
  
  which should result in a Video with 2 Seconds in Length. But if I do a check with ffprobe I get this:
  
  ```
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      encoder         : Lavf60.16.100
    Duration: 00:00:04.85, start: 0.000000, bitrate: 394 kb/s
    Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 382 kb/s, 30 fps, 30 tbr, 15360 tbn (default)
      Metadata:
        handler_name    : VideoHandler
        vendor_id       : [0][0][0][0]
    Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 2 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
        vendor_id       : [0][0][0][0]
  
  ```
  
  Whats the cause of this?
  
  **Tags:** ffmpeg, mp4, ffprobe
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-02-12. Score: 0
  
  As explained in the [documentation](https://ffmpeg.org/ffmpeg-formats.html#concat-1), the `inpoint` directive works best with intra frame codecs, because for non-intra frame ones you will usually get extra packets before the actual In point and the decoded content will most likely contain frames before In point too.
  
  And it's the same problem for `outpoint` directive.
  
  > **Comments:**
  > **username_0**: Okay so to make it work with the Videos I have I should use ffmpeg to re-render them using a intra-frame codec? Right?  
  > **username_1**: @username_0 Yes. For example : `ffmpeg -i input -c:v libx264 -g 1 output`  
  
  ---
  
  