merge rtmp video. Stream specifier ':v' in

2019-08-17 12:56发布

I follow the page Create a mosaic out of several input videos to merge videos. When I use http://*.flv video as input, it works fine.

But when I use rtmp://** as video input. Such as:

    ffmpeg-i rtmp://10.240.209.94:9999/live1 -i rtmp://10.240.209.94:9999/live1 -i rtmp://10.240.209.94:9999/live1 -i rtmp://10.240.209.94:9999/live1
-filter_complex "
    nullsrc=size=640x480 [base];
    [0:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft];
    [1:v] setpts=PTS-STARTPTS, scale=320x240 [upperright];
    [2:v] setpts=PTS-STARTPTS, scale=320x240 [lowerleft];
    [3:v] setpts=PTS-STARTPTS, scale=320x240 [lowerright];
    [base][upperleft] overlay=shortest=1 [tmp1];
    [tmp1][upperright] overlay=shortest=1:x=320 [tmp2];
    [tmp2][lowerleft] overlay=shortest=1:y=240 [tmp3];
    [tmp3][lowerright] overlay=shortest=1:x=320:y=240
"
-f flv rtmp://10.240.209.94:9999/live2

It tells me:

Stream specifier ':v' in filtergraph description  nullsrc=size=640x480 [base];[0:v] setpts=PTS-STARTPTS, scale=320x240 [upperleft];[1:v] setpts=PTS-STARTPTS, scale=320x240 [upperright];[2:v] setpts=PTS-STARTPTS, scale=320x240 [lowerleft];[3:v] setpts=PTS-STARTPTS, scale=320x240 [lowerright];[base][upperleft] overlay=shortest=1 [tmp1];[tmp1][upperright] overlay=shortest=1:x=320 [tmp2];[tmp2][lowerleft] overlay=shortest=1:y=240 [tmp3];[tmp3][lowerright] overlay=shortest=1:x=320:y=240 matches no streams.

Is that a bug? but I use the newest ffmepg. bug

标签: ffmpeg
1条回答
你好瞎i
2楼-- · 2019-08-17 13:23

You're reading the same network input 4 times. At the time the filtering starts, ffmpeg hasn't detected a video stream in at least one of the inputs.

I'm assuming that you ultimately wish to use four different inputs. If so, add -analyzeduration 20M -probesize 10M before each input. Increase the values till the error disappears.

查看更多
登录 后发表回答