[Live-devel] How can I stream vob files but make the output is transport stream

Jacky Ping pingge9163 at hotmail.com
Sat Oct 8 10:53:56 PDT 2005


Hi,
   I try to modify the source code and combine the testMPEG1or2ProgramToTransportStream and testMPEG2TransportStreamer together in order to stream vob files but output is transport stream.When I test mpga audio files,it works well.But when trying vob files with ac3 audio, I can only hear very noisy sound with clip and pop.My code is something like that:

#define TRANSPORT_PACKET_SIZE 188
#define TRANSPORT_PACKETS_PER_NETWORK_PACKET 7
...
  videoSink = SimpleRTPSink::createNew(*env, rtpGroupsockVideo, 33, 90000, "video", "mp2t",
        1, True, False /*no 'M' bit*/);
...

  unsigned const inputDataChunkSize
    = TRANSPORT_PACKETS_PER_NETWORK_PACKET*TRANSPORT_PACKET_SIZE;

  // Open the input file as a 'byte-stream file source':
  ByteStreamFileSource* fileSource
    = ByteStreamFileSource::createNew(*env, *curInputFileName, inputDataChunkSize);
  
 MPEG1or2Demux*mpegDemux = MPEG1or2Demux::createNew(*env, fileSource);

 MPEG1or2DemuxedElementaryStream* pesES = mpegDemux->newRawPESStream();
 
 FramedSource* tsFrames = MPEG2TransportStreamFromPESSource::createNew(*env, pesES);
 
 FramedSource* tsSource = MPEG2TransportStreamFramer::createNew(*env, tsFrames);

 videoSink ->startPlaying(*tsSource, afterPlaying, videoSink);

I notice that in MPEG1or2Demux.cpp there are two hacks:
line 504:
Boolean MPEGProgramStreamParser
::isSpecialStreamId(unsigned char stream_id) const {
  if (stream_id == RAW_PES) return True; // hack

line 580:
  if (fUsingSource->fOutput[RAW_PES].isPotentiallyReadable && stream_id!=0xBC) {
    // Hack: We've been asked to return raw PES packets, for every stream:
    stream_id = RAW_PES;
  } 
By the way, I found in a vob file there exists stream_id as 0xE0(Video mpgv),0xBD(a52),0xBF and 0xBE
Can you give me a explanation about these stream_ids,especially the last two ones?
I also hope you can give some suggestions especially how to deal with ac3.
Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20051008/9a1aaf71/attachment.html


More information about the live-devel mailing list