[Libav-user] help with raw fifo as movie src & overlay

gstream at ccc2.com gstream at ccc2.com
Mon Feb 13 11:31:04 CET 2012


Hi All,

I am hoping you can help with getting the libavfilter movie and overlay
working correctly.

My objective is to get two RTSP camera feeds to go side by side in sync.

I started with the below that works to transmit the final image but due to
the loading times of each overlay the streams are out of sync.

ffmpeg  -loop_input -i 800x600.jpg -an -s 1288x360 -vf
'movie=rtsp\\://192.168.20.112\\:551/channel1,scale=640:352[wm];
 movie=rtsp\\://192.168.20.111\\:551/channel1,scale=640:352[wm2];
[in][wm] overlay=2:4[in+wm];
[in+wm][wm2] overlay=646:4 [out]'
-s 1288x360 -vcodec rawvideo /home/fifo/mpegpipe99.yuv

so firstly, is there a way I can add a video buffer to the first overlay
so it syncs with the second?

If not, can I use rawvideo from upstream ffmpeg's. I am assuming that by
having upstream decoders the sink going into the overlay's will be the
same.

I have tried several ways to get the rawvideo to load but an diff error
returns every time. The below....

ffmpeg  -loop_input -i 1280x720.jpg -an -s 1288x360 -vf
'movie=/home/fifo/mpegpipe1.yuv,buffer=640:352:yuv420p:1:25:1:1 [wm];
 movie=/home/fifo/mpegpipe2.yuv,buffer=640:354:yuv420p:1:25:1:1 [wm2];
[in][wm] overlay=2:4[in+wm]; [in+wm][wm2]  overlay=646:4 [out]'  -vcodec
rawvideo /home/zorobigz_2/fifo/mpegpipe99.yuv -s 1280x360

generates the following error.....

[movie @ 0x1ab6b00] seek_point:0 format_name:(null)
file_name:/home/fifo/mpegpipe1.yuv stream_index:0
[buffer @ 0x1ab6a80] w:640 h:352 pixfmt:yuv420p tb:1/25 sar:1/1 sws_param:
Too many inputs specified for the "buffer" filter.

this does seem to be the right number of params as per the doc's.

your help would be very much appreciated.
thx
Art





More information about the Libav-user mailing list