[Live-devel] Android device don't accept my own OnDemandLiveStream

Christian Brümmer itf-freak at gmx.de
Thu May 31 08:27:08 PDT 2012


Am 28.05.2012 16:41, schrieb Christian Brümmer:
> Hi,
>
> i am coding my own OnDemandLiveStream-Server (as discussed here: 
> http://lists.live555.com/pipermail/live-devel/2012-May/015178.html) 
> using h264 encoded videoframes. I can play the videostream using VLC 
> but my Samsung Galaxy SII running ICS (Android 4.03) can't open the 
> stream.
> If i use the "mediaServer" and a  *.264 videofile my smartphone is 
> able to play the video.
> Using my own server FramedSource is being created and destroyed again 
> (as i know thats a right behavior - for configuration transfer) but 
> other functions like doGetNextFrame() never been called and the 
> smartphone canceled the connection right after the configuration 
> transmission (as you can see in the log file). Since my encoding 
> functions never been called it must be a bad rtsp-configuration. But i 
> dont know what happens behind OnDemandServerMediaSubsession (my media 
> subsession) and H264VideoFileServerMediaSubsession (mediaServer) eg. 
> what are the differences.
>
> You can see my whole code here 
> http://lists.live555.com/pipermail/live-devel/2012-May/015178.html.
> The lines
> /05-28 16:00:34.540: I/ASessionDescription(24294): a=fmtp:96 
> packetization-mode=1;profile-level-id=4D4033;sprop-parameter-sets=Z01AM5JUDAS0IAAAAwBAAAAM0eMGVA==,aO48gA==
> 05-28 16:00:34.540: I/ASessionDescription(24294): a=control:track1/
> existing only in the mediaServer-Log - this may be the problem but i 
> dont what it means!
>
> Best regards,
> Christian
>
> Android-Log for my own server:
> ####
> 05-28 15:59:09.710: I/ARTSPConnection(24294): status: RTSP/1.0 200 OK
> 05-28 15:59:09.710: W/MyHandler(24294): OPTIONS completed with result 
> 0 (Success)
> 05-28 15:59:09.715: I/ARTSPConnection(24294): status: RTSP/1.0 200 OK
> 05-28 15:59:09.715: I/MyHandler(24294): DESCRIBE completed with result 
> 0 (Success)
> 05-28 15:59:09.715: I/ASessionDescription(24294): v=0
> 05-28 15:59:09.715: I/ASessionDescription(24294): o=- 1338213491406907 
> 1 IN IP4 192.168.0.198
> 05-28 15:59:09.715: I/ASessionDescription(24294): s=Session streamed 
> by "INGAme"
> 05-28 15:59:09.715: I/ASessionDescription(24294): i=h264.3gp
> 05-28 15:59:09.715: I/ASessionDescription(24294): t=0 0
> 05-28 15:59:09.715: I/ASessionDescription(24294): a=tool:LIVE555 
> Streaming Media v2012.04.21
> 05-28 15:59:09.715: I/ASessionDescription(24294): a=type:broadcast
> 05-28 15:59:09.715: I/ASessionDescription(24294): a=control:*
> 05-28 15:59:09.715: I/ASessionDescription(24294): a=range:npt=0-
> 05-28 15:59:09.715: I/ASessionDescription(24294): 
> a=x-qt-text-nam:Session streamed by "INGAme"
> 05-28 15:59:09.715: I/ASessionDescription(24294): a=x-qt-text-inf:h264.3gp
> 05-28 15:59:09.715: I/ASessionDescription(24294): m=video 0 RTP/AVP 96
> 05-28 15:59:09.715: I/ASessionDescription(24294): c=IN IP4 0.0.0.0
> 05-28 15:59:09.715: I/ASessionDescription(24294): b=AS:480
> 05-28 15:59:09.715: I/ASessionDescription(24294): a=rtpmap:96 H264/90000
> 05-28 15:59:09.715: I/ASessionDescription(24294): a=control:track1
> 05-28 15:59:09.715: W/MyHandler(24294): mBaseURL is change to 
> rtsp://192.168.0.198/h264.3gp/ from 'content-base'
> 05-28 15:59:09.715: W/MyHandler(24294): Property 
> [net.connectivity.qosbw] NOT Found, bwQoS=2147483647
> 05-28 15:59:09.715: W/APacketSource(24294): Format:video 0 RTP/AVP 96  
> / MIME-Type:H264/90000
> *05-28 15:59:09.715: W/MyHandler(24294): Unsupported format. Ignoring 
> track #1.*
> ####
>
> Android-Log for mediaServer (working):
> ####
> 05-28 16:00:34.535: I/ARTSPConnection(24294): status: RTSP/1.0 200 OK
> 05-28 16:00:34.540: I/MyHandler(24294): DESCRIBE completed with result 
> 0 (Success)
> 05-28 16:00:34.540: I/ASessionDescription(24294): v=0
> 05-28 16:00:34.540: I/ASessionDescription(24294): o=- 1338213636753913 
> 1 IN IP4 192.168.0.198
> 05-28 16:00:34.540: I/ASessionDescription(24294): s=H.264 Video, 
> streamed by the LIVE555 Media Server
> 05-28 16:00:34.540: I/ASessionDescription(24294): i=working.264
> 05-28 16:00:34.540: I/ASessionDescription(24294): t=0 0
> 05-28 16:00:34.540: I/ASessionDescription(24294): a=tool:LIVE555 
> Streaming Media v2011.11.20
> 05-28 16:00:34.540: I/ASessionDescription(24294): a=type:broadcast
> 05-28 16:00:34.540: I/ASessionDescription(24294): a=control:*
> 05-28 16:00:34.540: I/ASessionDescription(24294): a=range:npt=0-
> 05-28 16:00:34.540: I/ASessionDescription(24294): 
> a=x-qt-text-nam:H.264 Video, streamed by the LIVE555 Media Server
> 05-28 16:00:34.540: I/ASessionDescription(24294): 
> a=x-qt-text-inf:working.264
> 05-28 16:00:34.540: I/ASessionDescription(24294): m=video 0 RTP/AVP 96
> 05-28 16:00:34.540: I/ASessionDescription(24294): c=IN IP4 0.0.0.0
> 05-28 16:00:34.540: I/ASessionDescription(24294): b=AS:500
> 05-28 16:00:34.540: I/ASessionDescription(24294): a=rtpmap:96 H264/90000
> 05-28 16:00:34.540: I/ASessionDescription(24294): a=fmtp:96 
> packetization-mode=1;profile-level-id=4D4033;sprop-parameter-sets=Z01AM5JUDAS0IAAAAwBAAAAM0eMGVA==,aO48gA==
> 05-28 16:00:34.540: I/ASessionDescription(24294): a=control:track1
> 05-28 16:00:34.540: W/MyHandler(24294): mBaseURL is change to 
> rtsp://192.168.0.198/working.264/ from 'content-base'
> 05-28 16:00:34.540: W/MyHandler(24294): Property 
> [net.connectivity.qosbw] NOT Found, bwQoS=2147483647
> 05-28 16:00:34.540: W/APacketSource(24294): Format:video 0 RTP/AVP 96  
> / MIME-Type:H264/90000
> 05-28 16:00:34.540: I/APacketSource(24294): dimensions 384x288
> *05-28 16:00:34.540: I/ARTPConnection(24294): Start:16202*
> ####
>
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel

I finally got it!

I dealed with the source code especially the parseSPropParameterSets 
function of H264VideoRTPSource.cpp. My fault was the representation of 
the sprop-string. Only the "bytestream" without the qualifier 
"sprop-parameter-sets=" is needed. I created the right substring and now 
the setSPSandPPS function is working as expected!

So what ive done:

FramedSource* 
imLiveStreamMediaSubsession::createNewStreamSource(unsigned 
clientSessionId, unsigned& estBitrate)
{
   (...)
   FramedSource* h264NALSource = imLiveStreamSource::createNew(envir(), 
param);
   H264VideoStreamFramer* framer = 
H264VideoStreamFramer::createNew(envir(), h264NALSource);
   framer->setSPSandPPS(mSPropParameterSet); *// 
**mSPropParameterSetwithout"sprop-parameter-sets="*
   return framer;
}

RTPSink* imLiveStreamMediaSubsession::createNewRTPSink(Groupsock* 
rtpGroupsock,
                                   unsigned char rtpPayloadTypeIfDynamic,
                                   FramedSource* /*inputSource*/)
{
     return H264VideoRTPSink::createNew(envir(), rtpGroupsock, 
rtpPayloadTypeIfDynamic, mSPropParameterSet);
*// **mSPropParameterSetwithout"sprop-parameter-sets="*
}

Hope that will help somebody in the future!

Thanks for reading,
best regards,
Christian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120531/e9c2ea65/attachment-0001.html>


More information about the live-devel mailing list