开发者

Android stream to Wowza

开发者 https://www.devze.com 2023-04-05 17:26 出处:网络
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.

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-para开发者_开发技巧meter-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.


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 ...

0

精彩评论

暂无评论...
验证码 换一张
取 消