[Live-devel] Mpeg4 Video + AMR Audio ???

Ross Finlayson finlayson at live.com
Thu May 26 03:10:19 PDT 2005


>How can I do this?
>Just use ¡§testOnDemandRTSPServer¡¨ program and stream 2 file (xxx.m4v & 
>xxx.arm)?

Yes.  To stream two (or more) media within a single RTSP stream, just add 
two (or more) "ServerMediaSubsession" objects to the same 
"ServerMediaSession" - e.g. (using code taken from 
"testOnDemandRTSPServer.cpp".

     char const* streamName = "mpeg4PlusAMRTest";
     ServerMediaSession* sms
       = ServerMediaSession::createNew(*env, streamName, streamName,
                                       descriptionString);
     char const* inputFileName1 = "test.m4v";
     sms->addSubsession(MPEG4VideoFileServerMediaSubsession
                        ::createNew(*env, inputFileName1, reuseFirstSource));
     char const* inputFileName1 = "test.amr";
     sms->addSubsession(AMRAudioFileServerMediaSubsession
                        ::createNew(*env, inputFileName2, reuseFirstSource));
     rtspServer->addServerMediaSession(sms);

>Finally, open 2 QT Player one for video the other for audio?

No, just one QuickTime Player (to play both audio and video).


	Ross Finlayson
	LIVE.COM
	<http://www.live.com/>




More information about the live-devel mailing list