百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

LiveVideo10ms

> 编程语言
开源

Android 上的实时视频解码

100 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Android 上的实时视频解码

Live Video 10ms Android

Description
Library for live video playback with ultra low latency (below 10ms) on android devices. Supports playback of .h264 encoded live video data transmitted via UDP encapsulated in RAW or RTP and simple file playback.
Latency data (see example for more information)

Device Encoder avgTotalDecodingTime
Galaxy s9+ rpi cam 8.0ms
Galaxy s9+ x264 11.5ms
Pixel 3 rpi cam 11.2ms
Pixel 3 x264 10.5ms
HTC U11 rpi cam 8.6ms
HTC U11 x264 10.1ms

Example App \

This library has been optimized for low latency and tested on a wide variety of devices, including those running FPV-VR for wifibroadcast. The example library also contains test cases that can be executed on the 'gooogle firebase test lab'. These tests include feeding the decoder with faulty NALUs, created by a lossy connection. (e.g. wifibroadcast).

The 2 most important factors for low latency are

  1. HW-accelerated decoding via the MediaCodec api
  2. Receiving,Parsing and decoding is done in cpp code (multi-threaded). This decouples it from the java runtime, which increases performance and makes latency more consistent ( garbage collection halts all java threads, for example).

However, all native code needed for creating, starting and stopping the decoding process are exposed via the JNI, so you can use the lib without writing c/c++ code. The VideoPlayer class purposely has no pause/resume functions,since this library is for live video playback. Playback works on a 'best effort' principle, e.g. as soon as a receiver is created nalus are forwarded to the LowLagDecoder, but no frames can be decoded until enough I-frame data was received. Make sure to use a low enough I-frame interval with your h264 encoder. When receiving corrupted data (e.g from a lossy connection) the decoder will still generate frames if possible.

Structure:

  • VideoCore: contains the native code and java bindings
  • Example: simple example app. Playback of different .h264 files stored in the 'assets folder' of the app. Includes test case(s) \

Setup Dependencies
There are 2 ways to use VideoCore in your Project
1 Declaring Dependency via Jitpack: jitpack.io
:heavy_plus_sign: Easy
:heavy_minus_sign: cannot browse native libraries
Gradle example:

gradle
    allprojects {
        repositories {
            jcenter()
            maven { url "https://jitpack.io" }
        }
   }
   dependencies {
        implementation 'com.github.Consti10:LiveVideo10ms:v1.1'
   }

2 Forking the repo and including sources manually:
:heavy_plus_sign: browse native libraries
:heavy_plus_sign: modify code

  • To your top level settings.gradle file, add
include ':VideoCore'
project(':VideoCore').projectDir=new File('..\\LiveVideo10ms\\VideoCore')

and modify the path according to your download file

  • To your app level gradle file add
implementation project(':VideoCore')

See FPV-VR as an example how to add dependencies.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Candroidcppdecodinglatency

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言