嗨,我试图得到一个或多个png作为一个覆盖在左下角的视频,但我不知道如何实现它。
exec_static /usr/bin/ffmpeg -i "rtmp://urltortmp“-f image2 -i 1.png -filter_complex "overlay=10:main_h-overlay_h-10”-c:v libx264 -c:a aac -b:v 1920k -b:a 64k -vf (ow/a/2)*2“-tune zerolatency -preset超高速-crf 23 -f flv rtmp://localhost:1935/live/std 2>>/var/log/nginx/ffmpeg-std.log;
输出错误如何映射?有一个或更多的..。想要像幻灯片一样
Input #0, flv, from 'rtmp://urlrtmp':
Metadata:
|RtmpSampleAccess: true
displayWidth : 2304
displayHeight : 1296
Duration: 00:00:00.00, start: 138709.448000, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 2304x1296, 13 fps, 12 tbr, 1k tbn
Stream #0:1: Audio: aac (LC), 16000 Hz, mono, fltp
Input #1, image2, from '1.png':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #1:0: Video: png, rgb24(pc), 300x45 [SAR 2800:2800 DAR 20:3], 25 fps, 25 tbr, 25 tbn, 25 tbc
Filtergraph 'scale=1280:trunc(ow/a/2)*2' 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.
// Anders
tested to use filter complex 发布于 2022-11-09 13:03:29
通过创建png的mp4文件并添加-stream_loop -1来解决这个问题
exec_static /usr/bin/ffmpeg -threads 1 -i "rtmp://urltortmp" -stream_loop -1 -i slider.m
p4 -filter_complex "[0:v][1:v] overlay=20:main_h-overlay_h-80" -c:v h264 -c:a aac -b:v 1920k -b:a 64k -tune zerolatency -preset ultrafast -f flv rtmp://localhost:1935/live/std 2>>/var/log/nginx/ffmpeg-std.log;https://stackoverflow.com/questions/74349142
复制相似问题