Android 串流至 Wowza

发布于 2024-12-05 02:40:04 字数 1665 浏览 5 评论 0原文

我对 Android 流媒体到 wowza 感到非常困惑。 我正在使用rtmp跨平台做视频会议,但是Android不吃RTMP。因此我需要寻找另一种方法来做到这一点。

在上游我发现了一个新的开源应用程序,名为spydroid-ipcamera。

它使用rtp,向计算机发送udp数据包,并使用以下sdp在vlc中打开它,

v=0
s=Unnamed
m=video 5006 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=420016;sprop-parameter-sets=Z0IAFukBQHsg,aM4BDyA=;

但它无法工作。然后我按照 wowza 教程进行流式传输,然后在 VLC 中再次播放。那行得通! 我在 http://code.google.com/p 中写的/spydroid-ipcamera/issues/detail?id=2

但是,当我想在数据包中添加音频时,它无法工作。 我更改为 中的代码http://code.google.com/p/spydroid-ipcamera/source/browse/trunk/src/net/mkp/spydroid/CameraStreamer.java

    mr.setAudioSource(MediaRecorder.AudioSource.MIC);
    mr.setVideoSource(MediaRecorder.VideoSource.CAMERA);
    mr.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    mr.setVideoFrameRate(20);
    mr.setVideoSize(640, 480);
    mr.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
    mr.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
    mr.setPreviewDisplay(holder.getSurface());

然后我认为问题应该出在sdp上,但我不知道如何解决sdp上的问题。 我正在使用 Mp4 流式传输 H.264/AAC

其次我不明白 sdp。那么我如何使用这个应用程序制作视频会议上游部分。

Android ----(UDP Port:5006)----> PC (SDP file) and then Wowza read the SDP file ------> VLC

我认为这样系统就无法处理超过 1 个客户端。 sdp 只能容纳 1 个端口,有什么想法吗?或者实际上它不起作用?

另外,Wowza 需要在流式传输之前设置流式传输,所以这是否意味着我不应该遵循这种方式来执行此操作?

抱歉我的英语很差,希望大家理解。

I feel very confused about Android streaming to wowza.
I am doing a video conference using rtmp cross-platform, but Android doesn't eat RTMP. Therefore I need to find another way to do it.

Upstreaming I found a new open-source app called spydroid-ipcamera.

It is using rtp, sending udp packets to computer, and opens it in vlc using the following sdp

v=0
s=Unnamed
m=video 5006 RTP/AVP 96
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=420016;sprop-parameter-sets=Z0IAFukBQHsg,aM4BDyA=;

But it can't work. Then I follow wowza tutorial and stream to it and then play again in VLC. That works!
I wrote it in http://code.google.com/p/spydroid-ipcamera/issues/detail?id=2

However when I want to add audio in the packet, it fails to work.
I change to code in http://code.google.com/p/spydroid-ipcamera/source/browse/trunk/src/net/mkp/spydroid/CameraStreamer.java

    mr.setAudioSource(MediaRecorder.AudioSource.MIC);
    mr.setVideoSource(MediaRecorder.VideoSource.CAMERA);
    mr.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
    mr.setVideoFrameRate(20);
    mr.setVideoSize(640, 480);
    mr.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
    mr.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
    mr.setPreviewDisplay(holder.getSurface());

Then I thought that the problem should be in sdp, but I don't know how to due with sdp.
I am streaming H.264/AAC with Mp4

Second I don't understand sdp. So how can I make video conference upstreaming part using this apps.

Android ----(UDP Port:5006)----> PC (SDP file) and then Wowza read the SDP file ------> VLC

I think in this way the system cannot handle more than 1 client. sdp can only hold 1 port, any idea or actually it wont' work?

Also Wowza need to set the stream before we stream it, so does it mean that I should not follow this way to do it?

Sorry my English is poor, I hope you guys understand.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

长亭外,古道边 2024-12-12 02:40:04

pydroid 代码中的更改不足以让您更改 AMRPacktsizer 的代码以以 AAC 形式传输数据包,具体如何我不知道,但我确定这会发生变化不够...

the changes in spydroid code can't be suffisant you most to change the code of AMRPacktsizer to stream a packet in AAC form how exactly i dont know but im sure that this changes not suffisant ...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文