Skip to content

Instantly share code, notes, and snippets.

@johnrees
Created February 6, 2016 13:38
Show Gist options
  • 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