venkatesh18srec / spydroid-ipcamera

Automatically exported from code.google.com/p/spydroid-ipcamera
GNU General Public License v3.0
0 stars 0 forks source link

Cannot open H264 stream in Wowza #81

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

I am trying to re-stream video from my android phone (Samsung Galaxy S2, 
Android 4.0) with Wowza.

My configuration is quite straightforward  and follows this guide:
http://www.wowza.com/forums/content.php?39-How-to-re-stream-video-from-an-IP-cam
era-(RTSP-RTP-re-streaming)

Please find my Application.xml and spydroid.stream file attached.
Once I enable streaming in Wowza stream manager, I see the following log:

INFO server comment - 
RTPMediaCaster.Reconnector[641287650:live/_definst_:spydroid.stream]: start: 23
INFO server comment - RTPSessionTracker.add[rtsp://192.168.1.3:8086]: 1
INFO server comment - 
RTPSessionDescriptionDataProviderBasicRTSPWorker.buildSDPData: 
sessionId:1185d20035702ca sessionTimeout:0
INFO server comment - 
RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/_definst_]: RTSP/RTP 
re-streaming. Success, received SDP data.
INFO stream create - -
WARN server comment - MediaReaderFLV.open: Metadata appears to be bad: 
INFO stream publish spydroid.stream -
INFO server comment - 
RTPMediaCaster.Reconnector[641287650:live/_definst_:spydroid.stream]: done: 23

If I specify the stream with mp4 prefix: mp4:spydroid.stream,
I get the following log

INFO server comment - RTPSessionTracker.add[rtsp://192.168.1.3:8086]: 1
INFO server comment - 
RTPSessionDescriptionDataProviderBasicRTSPWorker.buildSDPData: 
sessionId:1185d20035702ca sessionTimeout:0
INFO server comment - 
RTPSessionDescriptionDataProviderBasic.getStreamInfo[live/_definst_]: RTSP/RTP 
re-streaming. Success, received SDP data.
INFO stream create - -
WARN server comment spydroid.stream MediaReaderH264.open[2]: 
java.lang.Exception: QTUtils.parseQTMediaContainer: File is missing 'moov' atom.
INFO stream publish spydroid.stream -
INFO server comment - 
RTPMediaCaster.Reconnector[672624358:live/_definst_:spydroid.stream]: done: 2

I am using H.264 encoding in spydroid.settings.

Any suggestions how I can correctly open spydroid RTSP stream in Wowza?

p.s.The same video stream works in VLC. 

Thanks,
Andrei

Original issue reported on code.google.com by dotne...@gmail.com on 2 Jan 2013 at 2:48

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I looked into the source of H264Packetizer

        // This will skip the MPEG4 header if this step fails we can't stream anything :(
        try {
            byte buffer[] = new byte[4];
            // Skip all atoms preceding mdat atom
            while (true) {
                while (is.read() != 'm');
                is.read(buffer,0,3);
                if (buffer[0] == 'd' && buffer[1] == 'a' && buffer[2] == 't') break;
            }

I am wondering, why 'moov' atom is not handled here?
Definitely Wowza is expecting it.

Original comment by dotne...@gmail.com on 2 Jan 2013 at 10:05

GoogleCodeExporter commented 8 years ago
You need to change your wowza configuration since your android does not use 
rtcp.

use rtptimecode or systemclock instead of senderreport!

<AVSyncMethod>rtptimecode</AVSyncMethod>

Original comment by xianzhan...@gmail.com on 4 Jan 2013 at 6:26

GoogleCodeExporter commented 8 years ago
Whoa xianzhang looks like you got it all figured out for the wowza stuff.
It would be nice to have a clean wiki page about how to use wowza with Spydroid 
?? 
Would you mind explaining here how you configure wowza precisely. I could then 
add a wiki page !

Original comment by FyHertz on 15 Jan 2013 at 10:50

GoogleCodeExporter commented 8 years ago
Thanks @xianzhang, that solved the issue.
I try to work out another scenario:

I implement RTSP announce on the device. Send it to Wowza. And start 
CameraStreamer to stream the video.
RTSP Announce works (Wowza returns OK), but Wowza doesn't pick the actual 
stream.

Here is a detailed log:
http://www.wowza.com/forums/showthread.php?23267-Direct-communication-with-RTSP-
server/page2

Do you have any idea what extra step might be required on the android side to 
start stream? Should I actually send RTSP PLAY request?

Appreciate your help!

Original comment by dotne...@gmail.com on 6 Feb 2013 at 11:18