-
-
Save lkysow/4002781c32ed2ac15d59 to your computer and use it in GitHub Desktop.
Quick and dirty script to chunk an RTSP stream for our hackathon project
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
while true; | |
do | |
rm out.mp4 | |
date=$(date +%s) | |
ffmpeg -i rtsp://192.168.5.151:8086 -strict experimental -vf "transpose=1" -r 15 -t 10 out.mp4; | |
sleep 5; | |
ffmpeg -i out.mp4 -deinterlace -an -ss 0 -t 00:00:01 -r 1 -y -vcodec mjpeg -f mjpeg out-thumbnail.jpg 2>&1 | |
mv out.mp4 ~/Pictures/videos/VID_$date.mp4 | |
mv out-thumbnail.jpg ~/Pictures/videos/VID_$date.mp4-thumbnail.jpg | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment