[Live-devel] Need help creating a H264 stream from a video encoder source.

Richard Legault Richard.Legault at nuvation.com
Thu Apr 11 08:30:12 PDT 2013


 

Hi,

 

Problem:

I see the NALS being sent up but to the framer from the Video Source but
the RTSP is not sending them out. Any ideas where I have gone wrong? Any
suggestions would be greatly appreciated.

 

>From the output from Wireshark. I think the problem may be the SDP
record. I see the request and response but then VLC immediately tears
down the connection after receiving the Source description. And if so
how do I handle that?

 

Here is what I have done to get this far:

 

I am using the testOnDemandRTSPServer.cpp as my template

 

I added the following to the main function.

 

  // Create VENC stream source

  {

    char const* streamName = "vencVideoTest";

    char const* inputFileName = "/data/out/VID_CH00.h264"; // NOT USED
it is here for information only

 

    ServerMediaSession* sms

      = ServerMediaSession::createNew(*env, streamName, streamName,

 
descriptionString);

    sms->addSubsession(H264VideoVencMediaSubsession

 
::createNew(*env,vencConfigSettings.chanId, reuseFirstSource));

    rtspServer->addServerMediaSession(sms);

 

    announceStream(rtspServer, sms, streamName, inputFileName);

  }

 

I've created the H264VideoVencMediaSubsession  to inherit from the
OnDemandServerMediaSubssession

H264VideoVencMediaSubsession : OnDemandServerMediaSubsession

 

 

The H264VideoVencMediaSubsession::createNewStreamSource returns a
H264VideoStreamDiscreteFramer

 

FramedSource*
H264VideoVencMediaSubsession::createNewStreamSource(unsigned
/*clientSessionId*/, unsigned& estBitrate) {

  estBitrate = 500; // kbps, estimate

  fprintf(stderr,"%s:%d %s\n",__FILE__,__LINE__,__FUNCTION__);

  fflush(stderr);

 

  // Create the video source:

  VencSource* vencSource = VencSource::createNew(envir(), fChanId);

  if (vencSource == NULL) return NULL;

  vencSource->signalVencEventStartCB(); // need to register video
encoder call back within scheduler thread

  // Create a framer for the Video Elementary Stream:

  return H264VideoStreamDiscreteFramer::createNew(envir(), vencSource);

 

}

 

The Video encoder hands VencSource VCL frames that may contain multiple
NALs so the deliverFrame strips off the start NAL frame codes finds the
end of the NAL unit and delivers one NAL unit per frame delivery. 

 

I see these NALS being sent up but the RTSP is not sending them out. Any
ideas where I have gone wrong? Any suggestions would be greatly
appreciated.

 

>From the output from Wireshark. I think the problem may be the SDP
record. I see the request and response but then VLC immediately tears
down the connection after receiving the Source description. And if so
how do I handle that?

 

 

 

 

Thanks

 

Richard Legault

Lead Design Engineer

Nuvation Research

Waterloo On Canada

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130411/1dbbe939/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 168146 bytes
Desc: image001.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130411/1dbbe939/attachment-0001.png>


More information about the live-devel mailing list