deepch / RTSPtoWebRTC

RTSP to WebRTC use Pion WebRTC
MIT License
1.56k stars 415 forks source link

VP8 support #89

Open ladiandrasi opened 3 years ago

ladiandrasi commented 3 years ago

There are certain devices (some low-mid tier Android devices) that do not support H264. Would it somehow be possible to fallback to VP8 in that case?

deepch commented 3 years ago

really ? not support H264 I am the first to hear about this

ladiandrasi commented 3 years ago

Hey @deepch ,

I can maybe give a bit more info about my use case. I have an RTSP stream that I want to stream via WebRTC for a mobile app. I'm using React Native for building the app and for WebRTC I use the following library: react-native-webrtc

I used this project & example to adapt my codebase. Everything works fine on iOS, but on Android I'm only getting sound no video. After further looking into the issues, it seems that certain Android devices do not have support for H264. In my case I'm using a Huawei P20 Lite. I am pretty sure this is due to the device not supporting the codec (at least not hardware decoding). For certain device I would like to fallback to VP8. I was wondering if that is possible to do somehow?

ladiandrasi commented 3 years ago

As can be seen in the native android webrtc library there are certain checks if the device supports various codecs. I'm guessing this fails for H264 when the device does not support it.

deepch commented 3 years ago

yes, in theory, it is possible, but this is a heavy load on the processor there seems to be a lot of topics on the internet on how to make P20 work with h264, but I did not really understand how effective it is,

ladiandrasi commented 3 years ago

I'm aware of the load that would put on the processor. I tried a couple of workarounds that were mentioned in some articles, but to no success unfortunately. Any idea what it would imply to implement VP8 transcoding?

xiaolei0125 commented 3 years ago

I have the same problem, I test many android devices, faild to use webrtc since lack of H264 support, hope to implement VP8 transocding. Why WebRTC only support H264 in Chrome but not in native application with some devices