-
-
Save laurieainley/7663756 to your computer and use it in GitHub Desktop.
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:[email protected]/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. |
Hello, thanks for great tutorial!
I just have one question. If you are connected to gopro wifi, how can one access the rtmp on non-local server or resolve the DNS?
I get HTTP error 404 Not Found
http://10.5.5.9:8080/live/amba.m3u8: Server returned 404 not found
Please help me with this error.
@sanat94
Check the following:
- are you connected directly to the Hero3's access point ?
- did your pc get an ip addres in the range 10.5.5.x ?
(check this on windows in the terminal by typing 'ipconfig' or on linux 'ip addr' or on mac 'ifconfig') - if you didn't you might have to manually supply an ip address (find howto's on the internet)
- if you did, try 'ping 10.5.5.9' or do a full network scan (nmap, netscanner, netdiscover) to find out if the Hero3 might be at a different ip address.
- make sure your pc doesn't have the same ip address as the Hero3
- make sure the main Cherokee page @ http://10.5.5.9:8080 is working...
Hello,
I got a bit confused about the RTMP part, can't we just open the video flux in VLC ?
I'm a newbie so please excuse me...
Thanks you
@WHYDLM This gist was written with rebroadcasting the feed as a live stream for distribution to a wider audience in mind - if you want to just monitor the output locally, then I believe you can just connect to it by its IP in VLC e.g. http://10.5.5.9:8080/live/amba.m3u8. Apologies I can't remember precisely, this was written 6 years ago.
@laurieainley Hey thanks you very much, that's working !
Latency is high but for my use is ok.
Thanks you very much again !
@WHYDLM no problem, happy to hear this is still useful after so long! Are you using this with a GoPro Hero 3?
Worked for me on GoPro Hero 3, thank you! Just using the following command
ffplay -i http://10.5.5.9:8080/live/amba.m3u8
Check this article I think it will helps you about how to live streaming Via GoPro - https://www.yatko.com/live-streaming/gopro-live-streaming