[Live-devel] How to to stream h264 encoded stream in a MP4 container with Live555

Novalis Vapuru 6.45.vapuru at gmail.com
Mon Jan 30 03:33:30 PST 2012


Well, I create  a new class which is subclass of
"OnDemandServerMediaSubsession"
 [ call it MyCustomServerMediaSubsession] which overrides the
"createNewStreamSource()" and "createNewRTPSink()".  methods.

But the original code at testOnDemandRTSPSource  for h264 is

// A H.264 video elementary stream:
  {
    char const* streamName = "h264ESVideoTest";
    char const* inputFileName = "test.264";
    ServerMediaSession* sms
      = ServerMediaSession::createNew(*env, streamName, streamName,
				      descriptionString);
    sms->addSubsession(H264VideoFileServerMediaSubsession
		       ::createNew(*env, inputFileName, reuseFirstSource));
    rtspServer->addServerMediaSession(sms);

    announceStream(rtspServer, sms, streamName, inputFileName);
  }

So should i  replace  my custom MyCustomServerMediaSubsession with
MyCustomServerMediaSubsession?
 If so how to modify this code? to use my custom mediaSession?


Best Wishes
Novalis

2012/1/30 Ross Finlayson <finlayson at live555.com>:
> So how or where should i modify the  testOnRTSPServer so that intead
> of reading from a file,
> it justs get the output of MP4 demuxer?
>
>
> You will first need to define and implement your own new subclass of
> "OnDemandServerMediaSubsession" that reimplements the two pure virtual
> functions "createNewStreamSource()" and "createNewRTPSink()".  This new
> subclass will probably be similar to the existing
> "H264VideoFileServerMediaSubsession" class (which is used for streaming from
> a H.264 Video Elementary Stream file).
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>



More information about the live-devel mailing list