3

I have a camera feed which I am getting in RTSP for example: rtsp://172.16.1.177:8554/test

here are the stream details I got using ffmpeg -i rtsp://172.16.1.177:8554/test

Input #0, rtsp, from 'rtsp://172.16.1.177:8554/test':
  Metadata:
    title           : Session streamed with GStreamer
    comment         : rtsp-server
  Duration: N/A, start: 0.710544, bitrate: N/A
    Stream #0:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1920x1080, 15 tbr, 90k tbn, 180k tbc

Now, I am applying chromakey to the above stream which is giving me perfect output in mp4

ffmpeg -i background.jpg -i rtsp://172.16.1.177:8554/test -filter_complex "[1:v]colorkey=0x26ff0b:0.3:0.2[ckout];[0:v][ckout]overlay[out]" -map "[out]" output.mp4

After that, I've created and successfully started ffserver using the below config file

HTTPPort 8091
RTSPPort 8092
HTTPBindAddress 0.0.0.0
<Feed feed1.ffm>
    File /tmp/feed1.ffm
    FileMaxSize 2048M
    ACL allow localhost
</Feed>
<Stream live.sdp>
    Feed feed1.ffm
    Format rtp
    NoAudio
    VideoCodec libx264
    VideoFrameRate 15
    VideoBitRate 1000
    VideoSize 1920x1080
    ACL allow 172.16.1.30 172.16.0.2
</Stream>

I am trying to export output stream using below command

ffmpeg -i background.jpg -i rtsp://172.16.1.177:8554/test -filter_complex "[1:v]colorkey=0x26ff0b:0.3:0.2[ckout];[0:v][ckout]overlay[out]" -map "[out]" http://localhost:8091/feed1.ffm

which gives me below error

Input #0, image2, from 'background.jpg':
  Duration: 00:00:00.04, start: 0.000000, bitrate: 23866 kb/s
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 854x480 [SAR 72:72 DAR 427:240], 25 tbr, 25 tbn, 25 tbc
Input #1, rtsp, from 'rtsp://172.16.1.177:8554/test':
  Metadata:
    title           : Session streamed with GStreamer
    comment         : rtsp-server
  Duration: N/A, start: 0.711933, bitrate: N/A
    Stream #1:0: Video: h264 (Constrained Baseline), yuv420p(progressive), 1920x1080, 15 tbr, 90k tbn, 180k tbc
[tcp @ 0x7fdb88706680] Connection to tcp://localhost:8091 failed (Connection refused), trying next address
[tcp @ 0x7fdb88402920] Connection to tcp://localhost:8091 failed (Connection refused), trying next address
Filter overlay has an unconnected output

I don't have much experience with either ffmpeg or ffserver, so I don't exactly know why there is the issue with unconnected output

Filter overlay has an unconnected output

Mehul Panchasara
  • 288
  • 2
  • 12
  • I know this is a pretty old and cold thread but I am experiencing the same issue with ffmpeg/ffserver version 3.4.9. What version were you using? – Yllier123 Mar 04 '22 at 16:20

0 Answers0