将Android手机的本机流摄像头反应到RTSP [英] React Native stream camera of Android phone output to RTSP
本文介绍了将Android手机的本机流摄像头反应到RTSP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将我的Android手机摄像头流式传输到服务器,但是我的服务器仅接受RTSP.我尝试使用react-native-nodemediaclient输出RTMP效果很好,但我不想将RTMP编写为RTSP转换器,这不是最佳解决方案.所以有什么办法可以实现它,我已经搜索过Google,但是找不到答案.
I would like to stream my Android phone camera to a server, but my server only accepts RTSP. I have tried using react-native-nodemediaclient output RTMP which working well, but I don't want to write a RTMP to RTSP converter which is not optimal solution. So is there any way to implement it, I have searched Google but I cannot find the answer.
推荐答案
您可以使用以下库反应本地vlc播放器以流rtsp
You can use the following library react-native-vlc-player to stream rtsp
示例
<View style={styles.body}>
<VLCPlayer
ref={(ref) => (this.vlcPlayer = ref)}
style={{width: '100%', height: 200}}
videoAspectRatio="16:9"
source={{
uri:
'rtsp://admin:pass@IP:554/Streaming/Channels/102',
}}
/>
</View>
这篇关于将Android手机的本机流摄像头反应到RTSP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文