[Live-devel] Can't read from a MPEG4 unicast stream?
Ross Finlayson
finlayson at live555.com
Fri Nov 17 02:25:31 PST 2006
>Hi,
>
> This is my first contact with the library and the mpeg4 world. I'm
>trying to fetch a mpeg4 RTP unicast video stream from a sony snc-rz25p
>IP network camera. My RTCP instance keeps the connection alive (so I
>have some working code snips :) ), but i'm trying to dump the stream to
>a file, and I always get a 0 byte file.
>
> RTP Payload type is 96. I'm using a MPEG4VideoStreamFramer as source
>(getting the stream from a MPEG4ESVideoRTPSource) and a FileSink to
>write it to disk...
>
>My affected code is:
>
>struct in_addr serverAddress;
>serverAddress.s_addr = our_inet_addr ("192.168.2.10");
>Groupsock rtpGroupsockVideo (*env, serverAddress, 50000, 255);
>
>videoSource = MPEG4ESVideoRTPSource::createNew (*env,
> &rtpGroupsockVideo,
> 96,
> 0);
>videoFramedSource = MPEG4VideoStreamFramer::createNew (*env,
> videoSource);
>
>fileSink = FileSink::createNew(*env, outputFilename);
>fileSink->startPlaying (*videoFramedSource, afterPlaying, NULL);
>
>env->taskScheduler().doEventLoop();
>
>The afterPlaying function is just empty.
>
>What I am doing wrong?
I'm not sure, but try replacing "192.168.2.10" with "0.0.0.0".
(See <http://www.live555.com/liveMedia/faq.html#unicast>)
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20061117/b15680ec/attachment.html
More information about the live-devel
mailing list