Skip to content

Instantly share code, notes, and snippets.

@g0053
Forked from max-mapper/index.sh
Created March 16, 2020 23:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g0053/65b54e84f7cee992c4c416bbcf4c58db to your computer and use it in GitHub Desktop.
Save g0053/65b54e84f7cee992c4c416bbcf4c58db to your computer and use it in GitHub Desktop.
ffmpeg timelapse and rtsp streaming
# rename jpegs to be datetime based
jhead -n%Y%m%d-%H%M%S **/**.jpg
# timelapse from jpegs. r = fps
ffmpeg -r 15 -pattern_type glob -i '*.jpg' -s hd720 -vcodec libx264 -crf 25 OUTPUT.MP4
# rtsp stream to youtube
ffmpeg -f lavfi -i anullsrc -rtsp_transport tcp -i rtsp://<source> -tune zerolatency -vcodec copy -b 12000000 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/<key>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment