Created
May 26, 2014 06:54
-
-
Save kythin/e72180fe3054bddd89bf to your computer and use it in GitHub Desktop.
Revisions
-
kythin created this gist
May 26, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ #!/bin/bash ## # RTMP to JPEG timelapse script # github.com/kythin # # Simple script to take an RTMP streaming url and save a jpeg every 10 seconds. # # Requires 'ffmpeg' and 'rtmpdump' # apt-get install ffmpeg rtmpdump # ## STREAM='STREAM ID HERE' RTMPURL='RTMP URL GOES HERE' OUTDIR='~/caps' TIME=$(date +"%Y%m%d_%H%M%S") mkdir -p $OUTDIR rtmpdump -v -r $RTMPURL -y $STREAM -o $OUTDIR/1.flv -B 1 ffmpeg -i $OUTDIR/1.flv -ss 00:00:01 -an -r 1 -vframes 1 -s 800x600 -y $OUTDIR/$TIME.jpg echo "Waiting until next run..." sleep 10 ./cap.sh exit;