<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>

CC BY-SA 4.0
2020-06-01T09:31:02.050Z
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'
Estatistics
CC BY-SA 4.0
2020-06-01T09:31:31.817Z
and how can i add -fflags +genpts?
Estatistics
CC BY-SA 4.0
2020-06-01T10:47:08.890Z
`vcodec=libx264,vb=20M,crf=14,r=32` --> none of these are filters. These all belong as `-key value` outside the filtergraph.
Gyan
CC BY-SA 4.0
2020-06-01T10:47:40.537Z
`-fflags +genpts` goes *before* each input to which you wish to apply it.
Gyan
CC BY-SA 4.0
2020-06-14T14:16:02.620Z
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`
Estatistics
CC BY-SA 4.0
2020-06-01T09:24:04.260Z
2020-06-01T09:24:04.260Z
Gyan
<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>

CC BY-SA 4.0
2020-06-01T10:36:35.083Z
2020-06-01T12:32:32.507Z
2020-06-01T12:32:32.507Z
Estatistics
<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>

<ffmpeg><video-recording><codec><compression>
Merge multiple video files using ffmpeg by adding multiple compress options
Estatistics
# 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


---

