Answers.Body: <p>All filtering should be performed in the same filtergraph. Each <code>-filter_complex</code> or <code>-vf</code> defines a different filtergraph. You can use</p>
  
  <pre><code>-filter_complex "[0:v] [1:v] [2:v] [3:v] [4:v] [5:v] [6:v] [7:v] [8:v]  [9:v]  [10:v] concat=n=11:v=1,scale=1280:720,setpts=0.20*PTS [v]"
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-01T09:31:02.050Z
Answers.Text: using `ffmpeg -i GOPR0009.MP4 -i GOPR0010.MP4 \
  -filter_complex "[0:v] [1:v]  concat=n=2:v=1,vcodec=libx264,vb=20M,crf=14,r=32,scale=1280:720,setpts=0.20*PTS [v]" \
  -map "[v]"   video_output_01.avi` gave this error: No such filter: 'vcodec'
Answers.UserDisplayName: Estatistics
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-01T09:31:31.817Z
Answers.Text: and how can i add -fflags +genpts?
Answers.UserDisplayName: Estatistics
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-01T10:47:08.890Z
Answers.Text: `vcodec=libx264,vb=20M,crf=14,r=32` --> none of these are filters. These all belong as `-key value` outside the filtergraph.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-01T10:47:40.537Z
Answers.Text: `-fflags +genpts` goes *before* each input to which you wish to apply it.
Answers.UserDisplayName: Gyan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-14T14:16:02.620Z
Answers.Text: How can I transpose 180o degrees a video file while merging it? e.g. 
  
   `ffmpeg -f concat -safe 0 -i VIDEOFILES_short.txt -filter_complex  \
    "[0:1] [v0]; \
     [1:1]vflip, hflip[v1];\
     [v0][v1]concat[out]" -map "[out]" -r 32 -crf 14  -vcodec libx264  -vb 20M   video_out_FF.avi`
Answers.UserDisplayName: Estatistics
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-01T09:24:04.260Z
Answers.LastActivityDate: 2020-06-01T09:24:04.260Z
Answers.UserDisplayName: Gyan
Answers.Body: <p>Finally, 
  I used that command that resulted to compress multiple video files, while in the same time setting a range of compressing options in ffmpeg: </p>
  
  <p>VIDEOFILES.txt contains a list of the videos that are to merged in a specific way: </p>
  
  <pre><code>ffmpeg -f concat -safe 0 -i VIDEOFILES.txt -r 32 -crf 14  -vcodec libx264 -vb 20M -vf "scale=1280:720,setpts=0.20*PTS" -fflags +genpts  -an   video_output.avi
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-06-01T10:36:35.083Z
Answers.LastActivityDate: 2020-06-01T12:32:32.507Z
Answers.LastEditDate: 2020-06-01T12:32:32.507Z
Answers.UserDisplayName: Estatistics
Body: <p>I would like to merge multiple video files, performing in the same time complex compressing options. </p>
  
  <p>How can I do that? The following ffmpeg command resulting this error: </p>
  
  <pre><code> Filtergraph 'scale=1280:720,setpts=0.20*PTS' was specified through the -vf/-af/-filter option for output stream 0:0, which is fed from a complex filtergraph.
  -vf/-af/-filter and -filter_complex cannot be used together for the same stream.
  </code></pre>
  
  <p>The ffmpeg command that i used: </p>
  
  <pre><code>ffmpeg -i GOPR0003.MP4 -i GOPR0004.MP4 -i GOPR0005.MP4 -i GOPR0005.MP4 -i GOPR0006.MP4 -i GOPR0007.MP4 -i GOPR0007.MP4 -i GOPR0008.MP4 -i GOPR0009.MP4 -i GOPR0010.MP4 -i GOPR0012.MP4 -i GOPR0013.MP4 -i GOPR0015.MP4 \
     -filter_complex "[0:v] [1:v] [2:v] [3:v] [4:v] [5:v] [6:v] [7:v] [8:v]  [9:v]  [10:v] concat=n=11:v=1 [v]" \
      -r 24 -crf 18  -vcodec libx264 -vb 20M -vf "scale=1280:720,setpts=0.20*PTS"  -an   -map "[v]"   video_output_01.avi
  </code></pre>
  
Tags: <ffmpeg><video-recording><codec><compression>
Title: Merge multiple video files using ffmpeg by adding multiple compress options
UserDisplayName: Estatistics
ThreadText: # Merge multiple video files using ffmpeg by adding multiple compress options
  
  (Asked by: username_0 on 2020-06-01)
  
  I would like to merge multiple video files, performing in the same time complex compressing options.
  
  How can I do that? The following ffmpeg command resulting this error:
  
  ```
   Filtergraph 'scale=1280:720,setpts=0.20*PTS' was specified through the -vf/-af/-filter option for output stream 0:0, which is fed from a complex filtergraph.
  -vf/-af/-filter and -filter_complex cannot be used together for the same stream.
  
  ```
  
  The ffmpeg command that i used:
  
  ```
  ffmpeg -i GOPR0003.MP4 -i GOPR0004.MP4 -i GOPR0005.MP4 -i GOPR0005.MP4 -i GOPR0006.MP4 -i GOPR0007.MP4 -i GOPR0007.MP4 -i GOPR0008.MP4 -i GOPR0009.MP4 -i GOPR0010.MP4 -i GOPR0012.MP4 -i GOPR0013.MP4 -i GOPR0015.MP4 \
     -filter_complex "[0:v] [1:v] [2:v] [3:v] [4:v] [5:v] [6:v] [7:v] [8:v]  [9:v]  [10:v] concat=n=11:v=1 [v]" \
      -r 24 -crf 18  -vcodec libx264 -vb 20M -vf "scale=1280:720,setpts=0.20*PTS"  -an   -map "[v]"   video_output_01.avi
  
  ```
  
  **Tags:** ffmpeg, video-recording, codec, compression
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-06-01. Score: 0 | Accepted answer
  
  All filtering should be performed in the same filtergraph. Each `-filter_complex` or `-vf` defines a different filtergraph. You can use
  
  ```
  -filter_complex "[0:v] [1:v] [2:v] [3:v] [4:v] [5:v] [6:v] [7:v] [8:v]  [9:v]  [10:v] concat=n=11:v=1,scale=1280:720,setpts=0.20*PTS [v]"
  
  ```
  
  > **Comments:**
  > **username_0**: using `ffmpeg -i GOPR0009.MP4 -i GOPR0010.MP4 \ -filter_complex "[0:v] [1:v]  concat=n=2:v=1,vcodec=libx264,vb=20M,crf=14,r=32,scale=1280:720,setpts=0.20*PTS [v]" \ -map "[v]"   video_output_01.avi` gave this error: No such filter: 'vcodec'  
  > **username_0**: and how can i add -fflags +genpts?  
  > **username_1**: `vcodec=libx264,vb=20M,crf=14,r=32` --> none of these are filters. These all belong as `-key value` outside the filtergraph.  
  > **username_1**: `-fflags +genpts` goes *before* each input to which you wish to apply it.  
  > **username_0**: How can I transpose 180o degrees a video file while merging it? e.g.    `ffmpeg -f concat -safe 0 -i VIDEOFILES_short.txt -filter_complex  \   "[0:1] [v0]; \    [1:1]vflip, hflip[v1];\    [v0][v1]concat[out]" -map "[out]" -r 32 -crf 14  -vcodec libx264  -vb 20M   video_out_FF.avi`  
  
  ---
  
  ### Answer by username_0 on 2020-06-01. Score: 0
  
  Finally,
  I used that command that resulted to compress multiple video files, while in the same time setting a range of compressing options in ffmpeg:
  
  VIDEOFILES.txt contains a list of the videos that are to merged in a specific way:
  
  ```
  ffmpeg -f concat -safe 0 -i VIDEOFILES.txt -r 32 -crf 14  -vcodec libx264 -vb 20M -vf "scale=1280:720,setpts=0.20*PTS" -fflags +genpts  -an   video_output.avi
  
  ```
  
  
  ---
  
  