[Live-devel] RTP Elementary Stream to RTP Transport Stream

William Chung-How wills_71 at yahoo.com
Thu Jul 26 08:29:32 PDT 2007


Hi

I'm trying to receive an RTP Elementary Stream and encapsulate that into a RTP Transport Stream on another multicast address and port number.

I used the testMPEG1or2VideoReceiver as a starting point and have 2 problems.

========================
If I change the input source from a file to a RTP ES, by using MPEG1or2VideoRTPSource and then use SimpleRTPSink to transmit out, I get the error
 BasicTaskScheduler::SingleStep(): select() fails: Bad file descriptor

=========================
I am not able to encapsulate an ES that is read from a file  into an RTP Transport Stream. I changed the sink to a FileSink and when playing back the file, the video jumps several frames on VLC. I have tried this with different ES sources and get the same result. Any ideas what steps is missing?

I modified the testMPEG1or2VideoReceiver function play as shown below

void play() {
  // Open the input file as a 'byte-stream file source':
  ByteStreamFileSource* fileSource
    = ByteStreamFileSource::createNew(*env, inputFileName);
  if (fileSource == NULL) {
    *env << "Unable to open file \"" << inputFileName
     << "\" as a byte-stream file source\n";
    exit(1);
  }
  
  FramedSource* videoES;
  // The input source is assumed to already be a Video Elementary Stream:
  videoES = fileSource;
  // Insert MPEG1or2VideoStreamFramer
  MPEG1or2VideoStreamFramer* framer = MPEG1or2VideoStreamFramer::createNew(*env, videoES,
                          False, 5.0);

  // Add ES to TS
  MPEG2TransportStreamFromESSource * pESSource =
        MPEG2TransportStreamFromESSource::createNew(*env);
  
  pESSource->addNewVideoSource(framer, 2);
   MPEG2TransportStreamFramer * tsVideoSource = MPEG2TransportStreamFramer::createNew(*env, pESSource);
  
  // Finally, start playing:
  *env << "Beginning to read from file...\n";
  videoSink->startPlaying(*tsVideoSource, afterPlaying, NULL);
}

Thanks for your help

William

       
---------------------------------
 Yahoo! Answers - Get better answers from someone who knows. Tryit now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070726/b2155e73/attachment.html 


More information about the live-devel mailing list