fyhertz / libstreaming

A solution for streaming H.264, H.263, AMR, AAC using RTP on Android
Apache License 2.0
3.49k stars 1.08k forks source link

Glitches while streaming video from a Surface #255

Closed omerjerk closed 7 years ago

omerjerk commented 7 years ago

Hi,

I'm trying to stream Android display using RTSP with this library. I modified it to take input from a Surface instead of the Camera. I am successfully able to achieve this much so far. However, the rendered video has lots of glitches.

Anyone has any idea what could be going wrong or any tips on how could I debug? I have a feeling that SPS and PPS are wrong. But I'm not too sure how to debug that. @fyhertz

-Umair

sbaar commented 7 years ago

Try uncommenting out these two lines. https://github.com/fyhertz/libstreaming/blob/master/src/net/majorkernelpanic/streaming/gl/TextureManager.java#L113

If that doesn't work, please post a screenshot.

omerjerk commented 7 years ago

Hi @sbaar

I instead moved to a different approach altogether. I am sending the raw h264 data directly to the web browser and inside browser, using BroadwayJS to decode the stream and render it. :)