Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Live video streaming application on Android

I am trying to build a live video streaming application that streams live video from Android.

Using the MediaRecorder class, I am able to capture the video data in the form of 3gp, with h263 codecs.

However, when I run my application and stream media, I get a 2-3 second delay at the server side.

Why am I getting this delay? Are there any internal buffers that I need to flush? Are there other ways of streaming video apart from using MediaRecorder class?

like image 926
user664349 Avatar asked Mar 17 '11 12:03

user664349


People also ask

What is application for live streaming?

A live streaming app is a broadcasting software application that is used to capture, stream, record, and share live streaming content. The complexity and features available with live streaming apps vary from platform to platform.


1 Answers

If you're set on RTMP streaming from Android, the best solution is MediaCodec + FFmpeg + librtmp. This avoids any hacky "detect the NAL Unit within the bytestream" business but requires Android 4.3. Skate where the puck is going...

I've developed an open source SDK that demonstrates RTMP streaming with FFmpeg + librtmp as pre-built shared libraries. The SDK is focused on HLS streaming, but RTMP support is present.

If you'd like help building FFmpeg yourself for Android (with or without librtmp), check out my guide.

like image 82
dbro Avatar answered Sep 23 '22 16:09

dbro