GoPro Live Streaming


  • administrators

    Live Streaming with your GoPro

    How to stream live from GoPro HERO and other GoPro models

    You'll need a GoPro HERO camera and a MAC or PC for transcoding the live stream with both wired and wireless connections (read below why)

    For sending a live video stream from your GoPro HERO to Facebook Live, YouTube Live or any other media server, you will need internet connection. Since your computer's Wi-Fi will be used for connecting to your GoPro camera, a second (most likely) wired Ethernet connection is required that will provide the internet access. Note: this is only needed if you are using the GoPro's live video stream, meant for the GoPro App video preview. GoPro HERO3 - HERO4+ cameras produce HLS streams which are used by control apps and monitors. It's possible to take this stream and rebroadcast over RTMP. This is a low-quality stream that can be easily accessed via WiFi, when the camera is in App & RC mode. There are better methods for obtaining a HD livestream using a HDMI cable and an external device with http://cameleon.live.

    GoPro Live Stream with VLC (VideoLAN)

    Get HLS stream from your GoPro, please view images below and follow these quick steps:

    • On your GoPro camera enable Wi-Fi for GoPro App (Not for Remote Control)
    • Connect to your GoPro's Wi-Fi network with your computer (Note: your internet connection will probably stop)
    • Open System Preferences > Network > Advanced... and select the TCP/IP tab. Take note of the "Router:" IP address, more than likely 10.5.5.9
    • Open your browser and access the above-mentioned IP address on port 8080 e.g. http://10.5.5.9:8080

    Test: if you did everything as demoed trough the screenshots above AND you're connected to your GoPro's Wi-Fi, this link should work: http://10.5.5.9:8080

    • Download VLC from videolan.org - 2.2.4 Weatherwax (Intel 64bit) earlier/later versions should also work
    • Run VLC from command line, example with parameters:

    GoPro HERO4 and GoPro HERO4 Session

    vlc udp://@:8554 --sout="#transcode{vcodec=h264}:rtp{dst=127.0.0.1,port=4444,sdp=rtsp://0.0.0.0:8080/live.sdp}" --verbose=3 --logmode=text --file-logging
    
    • Accessing the GoPro live stream is also available from within the VLC app by going to File > Open Network... and entering 'udp://@:8554' into the URL field (no logs on screen)

    GoPro HERO3 and GoPro HERO3+

    vlc http://10.5.5.9:8080/live/amba.m3u8 --sout="#transcode{vcodec=h264}:rtp{dst=127.0.0.1,port=4444,sdp=rtsp://0.0.0.0:8080/live.sdp}" --verbose=3 --logmode=text --file-logging
    
    • replace the IP address of your GoPro camera

    Error: Running VLC from the terminal gives error: -bash: vlc: command not found (read section below)

    VLC terminal error: -bash: vlc: command not found

    You can run VLC on Mac OS X using terminal (/Applications/Utilities/Terminal) with the following command:

    /Applications/VLC.app/Contents/MacOS/VLC http://10.5.5.9:8080/live/amba.m3u8 --sout="#transcode{vcodec=h264}:rtp{dst=127.0.0.1,port=4444,sdp=rtsp://0.0.0.0:8080/live.sdp}" --verbose=3 --logmode=text --file-logging
    

    You can also set an alias to just vlc with the following command:

    alias vlc='/Applications/VLC.app/Contents/MacOS/VLC'
    
    • this can be helpful to add this command to your shell setup file (this option can also be activated from the "VLC" menu).


    Note:

    Switching VLC from HTTP streaming to RTP/RTSP streaming

    • Open VLC > Preferences..., select Input / Codecs tab and check the box next to "Use RTP over RTSP (TCP)". Save.

    GoPro live stream won't play?

    Let's try something else, Download FFmpeg (here) or follow instructions for Installing FFmpeg for macOS / Windows (read section below)

    Install FFmpeg for macOS

    • The easiest way to install FFmpeg on macOS (Mac OS X ) is using Homebrew and Xcode Command Line Tools. Install Xcode from the Mac App Store (update to the latest version if necessary). Xcode may prompt you to install command line developer tools or you can install it by typing the following command into the terminal:
    xcode-select --install
    
    • Installing Homebrew is quite simple as well, type the following command into the terminal:
    /usr/bin/ruby -e "$(curl -fsSL >>https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    * after successful installation you should execute: '$ brew doctor' -to check if your Homebrew >>installation was successful

    • Install FFmpeg - install by typing the following command into the terminal:
    brew install ffmpeg --with-ffplay
    

    GoPro Live Stream with FFmpeg

    • Connect to your GoPro via Wi-Fi
    • Run FFmpeg from command line, with parameters:
    ffplay -an -fflags nobuffer -f:v mpegts -probesize 8192 rtp://10.5.5.9:8554
    
    • Still no luck? Make sure your Mac is connected to your GoPro's Wi-Fi network (check your Mac's Wi-Fi connection, it should be connected to your GoPro and not your router/internet). Try (re)starting GoPro real-time A/V stream using LTP by sending this command via your browser:
    http://10.5.5.9/gp/gpControl/execute?p1=gpStream&c1=restart
    

    Note: GoPro live stream will stop unless a "keep alive packet" is maintained (power-saving), run a script e.g.: hero4-udp-keep-alive-send.py in parallel with FFplay to keep the camera live
    Test: GoPro live stream should appear in your FFplay media player. Remove the '-an' flag to receive audio from your GoPro

    Go Live

    • Open your Live Streaming App and paste the RTSP path by following the instructions below. Pro builds of Cameleon Live should detect GoPro HERO cameras automatically, there is no need for the above nor pasting the RTSP path(s).

    GoPro Live Streaming to YouTube

    ffmpeg -thread_queue_size 512 -f:v mpegts -probesize 8192 -i rtp://10.5.5.9:8554 -c:v libx264 -b:v 1M -vf scale=-1:720 -r 25 -c:a aac -ar 44100 -b:a 128k -tune zerolatency -preset ultrafast -flags +global_header -f flv rtmp://a.rtmp.youtube.com/live2/XXXX-XXXX-XXXX-XXXX"
    
    • -thread_queue_size 512: (optional) somewhat optimizes CPU
    • -probesize 8192: probing size to lower latency, necessary
    • -c:v libx264: video encoding codec
    • -b:v 1M: video bandwidth (1 megabit)
    • -vf scale=-1:720: video scaling filter for 720p video height
    • -r 25: framerate
    • -c:a aac -ar 44100 -b:a 128k: audio codec, sample rate, bandwidth
    • -tune zerolatency: (optional) useful for LIVE
    • -preset ultrafast: (optional) slightly lower quality, less CPU
    • -flags +global_header: for FLV output, mandatory
    • -f flv: FLV format, mandatory for YouTube LIVE
    • "rtmp://a.rtmp.youtube.com/live2/: YouTube LIVE Encoder Server URL
    • XXXX-XXXX-XXXX-XXXX": YouTube LIVE Encoder Stream name/key
    • "rtmp://a.rtmp.youtube.com/live2/XXXX-XXXX-XXXX-XXXX": YouTube streaming URL (YouTube Live Dashboard)

    Error: YouTube Streaming API error: User is not enabled for live streaming (click to fix)


Log in to reply
 

Looks like your connection to H7 was lost, please wait while we try to reconnect.