Skip to content

Instantly share code, notes, and snippets.

@leoherzog
Created June 9, 2015 15:53
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 leoherzog/1341f5be341c0875a45b to your computer and use it in GitHub Desktop.
Save leoherzog/1341f5be341c0875a45b to your computer and use it in GitHub Desktop.
FFmpeg Directory Streamer v0.0.1
#!/bin/sh
ls | sort -R | tail -1 | while read file; do
ffmpeg -re -i $file -vcodec libx264 -preset veryfast -maxrate 3000k \
-bufsize 6000k -pix_fmt yuv420p -g 50 -ac 2 \
-ar 44100 -f flv rtmp://a.rtmp.youtube.com/live2/xd1936.sgqg-43s7-36h5-fttg
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment