[Live-devel] Can't read from a MPEG4 unicast stream?

Dani Baeyens dbaeyens at warp.es
Fri Nov 17 02:12:41 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?
Thanks for your help,
-- 
Daniel Baeyens <dbaeyens at warp.es>
Warp Networks S.L.
http://www.warp.es  -  http://www.ebox-platform.com
http://people.warp.es/~dani/blog




More information about the live-devel mailing list