Skip to content
This repository was archived by the owner on Mar 2, 2025. It is now read-only.
This repository was archived by the owner on Mar 2, 2025. It is now read-only.

GoPro stream latency on android app #283

@ghost

Description

Problem:
I made an android apk for displaying GoPro stream, but when I start it, I have 3 or 4 seconds of latencies.
But when I change the framerate using the GoPro, it seems to reload the stream and the latency go back to 1 second or less.
So I tried using Wifi command to change framerate but it doesn't work.
I suppose the problem is coming from my settings because it keeps packets it shouldn't keep.
http://10.5.5.9/gp/gpControl/setting/3/9

Details:
To receive that stream, I'm using libvlc and FFmpeg-kit :

ArrayList _Options = new ArrayList();
_Options.add("--file-caching=2000");
_Options.add("--network-caching=150");
_Options.add("--clock-jitter=0");
_Options.add("--live-caching=200");
_Options.add("--clock-synchro=0");
_Options.add("--drop-late-frames");
_Options.add("--skip-frames");
_Options.add("-vvv");
_myLibVlc = new LibVLC(findViewById(android.R.id.content).getContext(), _Options);
_myPlayer = new MediaPlayer(_myLibVlc);
_myVout = _myPlayer.getVLCVout();

private String cmd = "-an -flags low_delay -flags2 fast -fflags nobuffer -f:v mpegts -probesize 2048 -r 12 -i udp://10.5.5.100:8554 -max_delay 1000 -preset ultrafast -vcodec libx264 -tune zerolatency -f mpegts -vcodec copy udp://127.0.0.1:12345";

FFmpegKit.execute(cmd);

  • GoPro Camera(s):
    GoPro HERO 5

  • Firmware Version:
    Android 12
    libvlc : org.videolan.android:libvlc-all:3.1.12
    FFmpeg-kit : libs/ffmpeg-kit-full-4.5.1-1.aar

  • Steps to reproduce:
    Launch GoPro stream with latency and change the video mode framerate to 24 (even if it's already 24)

  • Happens every time? [Y/N]: Sometimes but not everytime

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions