Answers.Body: <p><code>-map 0:0</code> leads to inclusion of one stream, <code>-filter_complex &quot;setpts=PTS-STARTPTS&quot;</code> leads to another. The filter_complex does NOT operate upon the initially mapped stream. Mapped video streams are operated upon by <code>-vf</code> or <code>-filter:v</code>.</p>
  <p>See <a href="http://www.ffmpeg.org/ffmpeg.html#Stream-selection" rel="nofollow noreferrer">http://www.ffmpeg.org/ffmpeg.html#Stream-selection</a><br />
  especially 4.1.2, 4.1.3 and the last set of examples.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-29T17:22:08.463Z
Answers.Text: Thanks for the quick reply! How can I solve my problem? I need only 1 video stream on output  using "-filter_complex "setpts=PTS-STARTPTS" " (to sync the frames btw input and ouput files)
Answers.UserDisplayName: buddhabas
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-29T17:24:25.777Z
Answers.Text: Change `-filter_complex` to `-vf`
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-29T17:27:09.010Z
Answers.Text: Thanks, another solution is remove "-map 0:0"
Answers.UserDisplayName: buddhabas
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-29T17:16:25.117Z
Answers.LastActivityDate: 2023-11-29T17:16:25.117Z
Answers.UserDisplayName: Gyan
Body: <p>I'm on ffmpeg 6.</p>
  <p>Take a video then:</p>
  <p><code>ffmpeg -hide_banner -ss 00:01:09 -t 20s -i &quot;video.mkv&quot; -map 0:0 -c:v libx265 -crf 25 -filter_complex &quot;setpts=PTS-STARTPTS&quot; &quot;output_reference.mkv&quot;</code></p>
  <p>then:</p>
  <p><code>ffmpeg -hide_banner -i &quot;output_reference.mkv&quot; -map 0:0 -c:v libx265 -preset medium -crf 25 -filter_complex &quot;setpts=PTS-STARTPTS&quot; &quot;output_test_01.mkv&quot;</code></p>
  <p>Why <strong>output_test_01.mkv</strong> has 2 video stream inside?
  Thanks!</p>
  
Tags: <ffmpeg>
Title: ffmpeg: why 2 video stream?
UserDisplayName: buddhabas
ThreadText: # ffmpeg: why 2 video stream?
  
  (Asked by: username_0 on 2023-11-29)
  
  I'm on ffmpeg 6.
  
  Take a video then:
  
  `ffmpeg -hide_banner -ss 00:01:09 -t 20s -i "video.mkv" -map 0:0 -c:v libx265 -crf 25 -filter_complex "setpts=PTS-STARTPTS" "output_reference.mkv"`
  
  then:
  
  `ffmpeg -hide_banner -i "output_reference.mkv" -map 0:0 -c:v libx265 -preset medium -crf 25 -filter_complex "setpts=PTS-STARTPTS" "output_test_01.mkv"`
  
  Why **output\_test\_01.mkv** has 2 video stream inside?
  Thanks!
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-11-29. Score: 1
  
  `-map 0:0` leads to inclusion of one stream, `-filter_complex "setpts=PTS-STARTPTS"` leads to another. The filter\_complex does NOT operate upon the initially mapped stream. Mapped video streams are operated upon by `-vf` or `-filter:v`.
  
  See <http://www.ffmpeg.org/ffmpeg.html#Stream-selection>  
  especially 4.1.2, 4.1.3 and the last set of examples.
  
  > **Comments:**
  > **username_0**: Thanks for the quick reply! How can I solve my problem? I need only 1 video stream on output  using "-filter_complex "setpts=PTS-STARTPTS" " (to sync the frames btw input and ouput files)  
  > **username_1**: Change `-filter_complex` to `-vf`  
  > **username_0**: Thanks, another solution is remove "-map 0:0"  
  
  ---
  
  