简体   繁体   English

如何在流媒体视频的 ffmpeg 上使用 filter_complex

[英]How to use filter_complex on ffmpeg with streaming videos

I have 30 video sources.我有 30 个视频源。 i want to make ffmpeg command to create 1 channel (streaming) with all channels embedded in (in bad quality)我想让 ffmpeg 命令创建 1 个频道(流媒体),所有频道都嵌入(质量差)

"[0:v][1:v]setpts=PTS-STARTPTS,overlay=20:40[1]; \
 [1][1:v]setpts=PTS-STARTPTS,overlay=(W-w)/2:(H-h)/2[v]; \
 [1:a][2:a]amerge=inputs=2[a]" \
-map "[v]" -map "[a]" -ac 2 3.mp4

i trying to find the correct command do downgrade quality, than create one streaming output.我试图找到正确的命令来降低质量,而不是创建一个流输出。 (one audio chosen) (选择了一种音频)

Scale each video to desired size with the scale filter .使用缩放过滤器将每个视频缩放到所需大小。 Arrange with the xstack filter .使用xstack 过滤器排列。

ffmpeg -i input0 -i input1 ... -i input29 -i audio -filter_complex
"[0]scale=128:-1[v0];[1]scale=128:-1[v1];...[29]scale=128:-1[v29];
[v0][v1]...[v29]xstack=inputs=30:layout=<your desired layout>[v]"
-map "[v]" -map 30:a -c:v libx264 -crf 51 -c:a aac -shortest output.mp4

-crf 51 will provide the low quality as requested. -crf 51将根据要求提供低质量。 Decrease the value if you want better quality.如果您想要更好的质量,请降低该值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM