[FFmpeg-user] mix 2 synchronized live streams and image

Madovsky infos at madovsky.org
Sat Nov 16 23:15:39 CET 2013


Hi,

I'm trying to mix 2 live streams iwht A/v
but sometimes one with only audio or one with only video
I include also a fixed image on the stream
so I use

/usr/bin/sudo /usr/local/bin/ffmpeg -re -i "rtmp://localhost/stream1 live=1 buffer=0 flashver=11,9,0,0"  -re -i "rtmp://localhost/stream1 live=1 buffer=0 flashver=11,9,0,0" -loop 1 -i /images/test.png" -map 0:0 -map 0:1 -map 1:0 -map 1:1 -filter_complex "[0:v]setpts=PTS-STARTPTS[left]; [1:v]setpts=PTS-STARTPTS[right];[left]pad=(iw*2)+42:ih+210:20:105:#000000[base];[base][right]overlay=(w+22):105,fade=in:0:200:alpha=0,drawtext=fontsize=10:fontcolor=#D8D8D8:fontfile=/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf:text='hello':x=((main_w-640)/2)+10:y=((main_h-240)/2)+228,drawtext=fontsize=10:fontcolor=#D8D8D8:fontfile=/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf:text='hello ':x=(w/2)+10:y=((main_h-240)/2)+228[cams];[cams][2:v]overlay=0:main_h-20;[0:a]asetpts=PTS-STARTPTS[ar];[1:a]asetpts=PTS-STARTPTS[al];[al][ar]amix" -vsync 1 -async 1 -r 24 -threads 4 -tune zerolatency -acodec ac3 -ar 32000 -ab 96k -movflags frag_keyframe+empty_moov -y /home/mix.avi

it runs when A/V is on both streams, but when no audio is on a stream,
ffmpeg stops and say

Stream map '0:1' matches no streams.

How to force ffmpeg to start and add empty frames in case of broken audio or video stream ?
I'm using the last git

Thanks


More information about the ffmpeg-user mailing list