Giter Site home page Giter Site logo

melodyproject / android-h264-stream-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bytestar/android-h264-stream-demo

0.0 1.0 0.0 1.07 MB

This is an example project to show how to streaming from android camera to VLC or gstreamer.

Java 100.00%

android-h264-stream-demo's Introduction

android-h264-stream-demo

What it does

This is an example project to show how to streaming from android camera to VLC or gstreamer.

This demo project use MediaCodec API to encode H.264 data and simply wrap with UDP packet then send these packets to VLC or gstreamer.

How does it work

The working flow as below

camera preview data(YV12) -> YUV420sp -> MediaCodec -> H.264 data -> UDP 

Media Server

By using VLC and gstreamer, we can ensure that the H.264 video streaming is working fine. You can use the following command to start a media server.

VLC

vlc -vvv udp://@:<port>

gstreamer

gst-launch udpsrc port=<port> ! video/x-h264,width=<w>,height=<h>,framerate=<framerate>/1 ! ffdec_h264 ! autovideosink

Requirement

  • Minimal API requirement: 16

License

Copyright (C) 2015 Ping-Chun Tseng <[email protected]> 
Licensed under Apache 2.0

Notes

  • In some network environment, UDP packet may be cut by MTU limitation

Future works

  • Support H.264 over RTP (RFC3984)
  • Support NV21 and YUV420p image format

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.