Created
March 14, 2018 13:48
-
-
Save ExploitSage/d9e5b1d7ec8a62ba9a52c2a10ccc1bfa to your computer and use it in GitHub Desktop.
Grab the current frame from an MJPG/MJPEG Stream and save as a PNG Image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NOW=$(TZ='America/Chicago' date +%Y-%m-%d_%H%M) | |
FILENAME=/path/to/directory/image_$NOW.png | |
STREAMURL=http://127.0.0.1:6000/video.mjpg | |
ffmpeg -i "$STREAMURL" -f image2 -vframes 1 "$FILENAME" | |
convert "$FILENAME" -gravity SouthEast -pointsize 22 -fill white -annotate +10+10 "$NOW" "$FILENAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment