[Live-devel] Problem with H264VideoRTPSink to VLC
gaoxin
gx at hztrinet.com
Sun May 29 20:23:28 PDT 2016
Hi,
I'am a beginner to use Live555, so my problem maybe quite simple. I have
read Live555 FAQ and searched on google . Finally I have to post a message
to maillist for help.
I try to receive H.264 stream from IP camera, and send it to VLC on anther
host. VLC is open URL "rtp://@:12345".
Notice that openRTSP doing the same thing but output data into file using
H264VideoFileSink class, I replace that part of code:
if (strcmp(subsession->mediumName(), "video") == 0) {
if (strcmp(subsession->codecName(), "H264") == 0) {
// For H.264 video stream, we use a special sink that adds 'start
codes',
// and (at the start) the SPS and PPS NAL units:
//fileSink = H264VideoFileSink::createNew(*env, outFileName,
// subsession->fmtp_spropparametersets(),
// fileSinkBufferSize, oneFilePerFrame);
char const* outputAddressStr = "192.168.1.123"; // this could also be
unicast
struct in_addr outputAddress;
outputAddress.s_addr = our_inet_addr(outputAddressStr);
const Port outputPort(12345);
unsigned char const outputTTL = 255;
Groupsock outputGroupsock(*env, outputAddress, outputPort, outputTTL);
rtpSink = H264VideoRTPSink::createNew(*env, &outputGroupsock, 96);
}
.
then,
subsession->sink = rtpSink;
subsession->sink->startPlaying(*(subsession->readSource()),
subsessionAfterPlaying,
subsession);
The result is that openRTSP is running and VLC received nothing. I used
Wireshark to check, no packet sent to destination IP and port.
I also try testMP3Streamer, replace multicast address with the unicast
address aboved. VLC could play it.
Could anybody give me some sugestions?
Thanks,
Xin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20160530/2fc370e3/attachment.html>
More information about the live-devel
mailing list