我需要在所有输出流的nginx.conf中添加水印。这是我从ffmpeg的文档中找到的,但它不起作用。
exec ffmpeg -i rtmp://localhost/$app/$name -i /mnt/pictures/flowtech.png -filter_complex "overlay=10:10,split=5[out1][out2][out3][out4][out5]"
-map '[out1]' -map 0:a -c:v libx264 -c:a aac -ac 1 -strict -2 -b:v 256k -b:a 32k -vf "scale=480:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://localhost/hlsall/$name_low
-map '[out2]' -map 0:a -c:v libx264 -c:a aac -ac 1 -strict -2 -b:v 768k -b:a 96k -vf "scale=720:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://localhost/hlsall/$name_mid
-map '[out3]' -map 0:a -c:v libx264 -c:a aac -ac 1 -strict -2 -b:v 1024k -b:a 128k -vf "scale=960:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://localhost/hlsall/$name_high
-map '[out4]' -map 0:a -c:v libx264 -c:a aac -ac 1 -strict -2 -b:v 1920k -b:a 128k -vf "scale=1280:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://localhost/hlsall/$name_hd720
-map '[out5]' -map 0:a -c copy -f flv rtmp://localhost/hlsall/$name_src 1>>/tmp/rtmp_log;
答案 0 :(得分:0)
这是有效的: ffmpeg -i rtmp:// localhost / app / tria_cam2 -i /mnt/pictures/flowtech.png -filter_complex" overlay = 10:10,split = 2 [out1] [out2]" -map' [out1]' -map 0:a -s 640x480 -c:v libx264 -c:aac -ac 1 -strict -2 -b:v 256k -b:32k -tune zerolatency -preset veryfast -crf 23 -f flv rtmp:/ / localhost / hlsall / tria_cam6 -map' [out2]' -map 0:a -s 1280x720 -c:v libx264 -c:aac -ac 1 -strict -2 -b:v 768k -b:96k -tune zerolatency -preset veryfast -crf 23 -f flv rtmp:/ /本地主机/ hlsall / tria_cam5