0

I want to stream webcam video to dashboard in Grafana. I run an ffmpeg command:

/usr/bin/ffmpeg -rtsp_transport tcp -i "rtsp://user:password@IP_camera:554/RVi/1/2" -an -filter:v "crop=192:108:100:100" -c:v libvpx -threads 4 -r 10 http://localhost:5070/feed_webm.ffm

In ffserver.conf:

HTTPPort 5070
HTTPBindAddress 0.0.0.0
CustomLog /var/log/ffserver-access.log

<Feed feed_webm.ffm>
   File /tmp/feed_webm.ffm
   FileMaxSize 200M
   ACL allow 127.0.0.1
</Feed>

<Stream test.webm>
   Feed feed_webm.ffm
   Format webm

   NoAudio

   VideoCodec libvpx
   VideoSize 704x576
   VideoFrameRate 8

   AVOptionVideo flags +global_header
   AVOptionVideo qmin 1
   AVOptionVideo qmax 31

   PreRoll 15
   StartSendOnKey
   VideoBitRate 400
</Stream>

<Stream index.html>
    Format status
</Stream>

After that, the stream is visible on the dashboard without сrop.

If I run an ffmpeg command with save at PC, video is recorded and played with crop:

/usr/bin/ffmpeg -rtsp_transport tcp -i "rtsp://user:password@IP_camera:554/RVi/1/2" -an -filter:v "crop=192:108:100:100" -c:v libvpx -threads 4 -r 10 path_to_save/feed.webm

0 Answers0