Skip to content

Instantly share code, notes, and snippets.

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 philipz/7ff5563a6a8d2786e0cd59ec03c5f2ee to your computer and use it in GitHub Desktop.
Save philipz/7ff5563a6a8d2786e0cd59ec03c5f2ee to your computer and use it in GitHub Desktop.
Live streaming from a GoPro Hero3 camera to RTMP server using FFmpeg
Basic Requirements:
Computer with wired and wireless connection
FFmpeg installation: http://www.ffmpeg.org/
GoPro Hero 3+: http://gopro.com/
RTMP server e.g. FMS (http://www.adobe.com/products/adobe-media-server-family.html) or CDN ingest point
Overview:
GoPro Hero3 cameras produce HLS streams which are consumed by control apps and their removeable monitor.
It's simple to take this stream and rebroadcast over RTMP by following the instructions below.
Hopefully there are also a lot more interesting use cases for this, but this should provide a starting
point.
Instructions:
1. Turn on WiFi on GoPro.
2. Connect to GoPro from computer over WiFi.
3. Determine IP address of GoPro camera by finding the default gateway for your wireless connection -
this is usually 10.5.5.9 but may differ. Guide for Windows / Mac here:
http://www.noip.com/support/knowledgebase/finding-your-default-gateway/. This can be achieved in a
similar way on Linux using the command ifconfig on the command line.
4. Browse to the IP address of the camera on port 8080 to ensure you can connect to it and it is
capable of streaming video over WiFi. You can do this by putting http://[IP]:8080 in a browser window,
where [IP] is the IP of the GoPro camera identified in step 3. You should see a directory listing if
connected successfully.
5. Once confirmed, in the command below replace [IP] for the IP address as above, and replace [RTMP]
with the URL to the entry point for your FMS server/CDN e.g. rtmp://myserver.com/stream/stream_name.
If authentication is required, apply it as username:password@ after the protocol,
e.g. rtmp://username:password@myserver.com/stream/stream_name.
ffmpeg -re -i http://[IP]:8080/live/amba.m3u8 -c copy -c:a aac -strict experimental -b:a 96k -ac 2
-ar 44100 -f flv "[RTMP] live=1"
6. Execute the command and verify playback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment