ffmpeg capture current frame and overwrite the image output file

后端 未结 4 1543
野趣味
野趣味 2021-02-07 16:13

I am trying to extract the image file from a RTSP stream url every second (could be every 1 min also) and overwrite this image file.

my below code works but it outputs t

4条回答
  •  一整个雨季
    2021-02-07 16:55

    Grab a snapshot from an RTSP video stream every 10 seconds.

    #!/bin/bash
    #fetch-snapshots.sh
    url='rtsp://IP_ADDRESS/live.sdp'
    avconv -i $url -r 0.1 -vsync 1 -qscale 1 -f image2 images%09d.jpg
    

    -r rate set frame rate to 0.1 frames a second (this equals to 1 frame every 10 seconds). Thanks to westonruter, see https://gist.github.com/westonruter/4508842

    Furthermore have a look at FFMPEG: Extracting 20 images from a video of variable length

提交回复
热议问题