ffmpeg non monotonous
时间: 2023-11-27 16:06:11 浏览: 42
"ffmpeg non-monotonous" error usually occurs when trying to concatenate two or more videos with different frame rates or time bases. It means that the timestamps of the frames in the output file are not in strictly increasing order, which can cause issues when playing or editing the video.
To fix this issue, you need to make sure that all the input videos have the same frame rate and time base. You can do this by using the "setpts" filter in ffmpeg to adjust the timestamps of the frames so that they are in increasing order.
Here is an example command:
```
ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "[0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1,setpts=PTS-STARTPTS" output.mp4
```
In this command, the "concat" filter concatenates the two input videos, and the "setpts" filter adjusts the timestamps of the frames to ensure that they are in increasing order. The "PTS-STARTPTS" option sets the starting timestamp to 0 for each input video.
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)