这可能吗?这是我的单个文件解决方案。如何修改它以保存两个单独的文件?
ffmpeg \
-f avfoundation -pix_fmt uyvy422 -s 1440x900 -i 1 \
-f avfoundation -pix_fmt uyvy422 -s 1440x900 -i 2 \
-pix_fmt yuv420p -r 30 -preset ultrafast -b:v 5000k -t 15 \
-filter_complex \
"nullsrc=size=2880x900 [background]; \
[0:v] setpts=PTS-STARTPTS, scale=1440x900 [left]; \
[1:v] setpts=PTS-STARTPTS, scale=1440x900 [right]; \
[background][left] overlay=shortest=1 [background+left]; \
[background+left][right] overlay=shortest=1:x=1440 [left+right]" \
-map [left+right] out.mov
我尝试删除过滤器复合体。我尝试过添加两个输出文件。我尝试了各种映射组合。以下是我最接近它的工作。它创建了两个文件,但都只包含第二个流(-i 2)。
ffmpeg \
-f avfoundation -pix_fmt uyvy422 -s 1440x900 -i 1 \
-f avfoundation -pix_fmt uyvy422 -s 1440x900 -i 2 \
-pix_fmt yuv420p -r 30 -preset ultrafast -b:v 5000k -t 15 out1.mov \
-pix_fmt yuv420p -r 30 -preset ultrafast -b:v 5000k -t 15 out2.mov
答案 0 :(得分:1)
使用map
选项:
ffmpeg \
-f avfoundation -pix_fmt uyvy422 -s 1440x900 -i 1 \
-f avfoundation -pix_fmt uyvy422 -s 1440x900 -i 2 \
-map 0 -pix_fmt yuv420p -r 30 -preset ultrafast -b:v 5000k -t 15 out1.mov \
-map 1 -pix_fmt yuv420p -r 30 -preset ultrafast -b:v 5000k -t 15 out2.mov