2

I'm trying to combine two live stream together similar to this

I'm following this guide here to replace the videos with a live stream (the live streams are working fine).

ffmpeg -i rtsp://source.com:554/livecastOne -vf "movie=rtsp://source.com:554/livecastTwo[inner]; [in][inner] overlay=70:70[out]" -vcodec libx264 -preset ultrafast -f flv rtmp://out.com:1935/outrtmp

However it gives me a parse error does the overlay not work with a livestream?

[movie @ 0x185baa0] [Eval @ 0x7ffdc71e6ef0] Undefined constant or missing '(' in 'livecastTwo'
[movie @ 0x185baa0] Unable to parse option value "554/livecastTwo"
[movie @ 0x185baa0] [Eval @ 0x7ffdc71e6f50] Undefined constant or missing '(' in 'livecastTwo'
[movie @ 0x185baa0] Unable to parse option value "554/livecastTwo"
[movie @ 0x185baa0] Error setting option stream_index to value 554/livecastTwo.
[Parsed_movie_0 @ 0x1804fe0] Error applying options to the filter.
3

It's better to ingest both feeds normally.

ffmpeg -i "rtsp://source.com:554/livecastOne" -i "rtsp://source.com:554/livecastTwo"
   -filter_complex "overlay=70:70"
   -vcodec libx264 -preset ultrafast -f flv rtmp://out.com:1935/outrtmp
  • Thanks for replying, It's working, somewhat. I could not get video2 to appear. I get buffer overflow warnings. – Robin Jun 29 '17 at 5:56
  • @Robin if you're getting buffer overflow messages, you should consider updating your FFmpeg installation (see superuser.com/a/741405/163809) as older versions are known to throw these kinds of errors when overlaying live streams. – arrayown Sep 18 '18 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.