Skip to content

Instantly share code, notes, and snippets.

@johnrees
Created February 6, 2016 13:38
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save johnrees/b116e426bc73040876c0 to your computer and use it in GitHub Desktop.
Save johnrees/b116e426bc73040876c0 to your computer and use it in GitHub Desktop.
streaming desktop to rtmp using ffmpeg
$ git clone https://github.com/iizukanao/node-rtsp-rtmp-server
$ coffee -c .
$ node server.js
$ ffmpeg -f avfoundation -i "0" -vcodec libx264 -tune zerolatency -s 320x480 -vf crop=320:480:0:0 -f flv rtmp://0.0.0.0/live/desktop
# stream on ios device
$ git clone https://github.com/iMoreApps/ffmpeg-avplayer-for-ios-tvos
$ open AVPlayerDemo.xcodeproj (change rtmp stream to rtmp://<LOCAL_IP>/live/desktop, build and run)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment