[Live-devel] How to mux a MPEG-4 video and audio stream into a MPEG-2 TS

Lonnie Walker lonnie.walker at apogeelabs.com
Tue Jun 3 13:08:49 PDT 2008


Ross thanks for the prompt response. Yes, I verified that the
mpegversion parameter is 4 once handleNewBuffer is called. I will dig
into MPEG2TransportStreamMultiplexor.cpp more and try to diagnose the
problem further. In the meantime, do you have any other suggestions?

Thanks

Lonnie




On Tue, 2008-06-03 at 08:01 -0700, Ross Finlayson wrote: 
> >I'm trying to multiplex a raw MPEG-4 bytestream and AAC audio bytestream
> >into a MPEG-2 Transport stream. I have a test program in which I take
> >the audio and video streams and mux them together into a MPEG-2
> >Transport stream.
> >
> >My program does successfully mux the video into a MPEG-2 TS. My problem
> >is that the audio doesn't play when I play the Transport stream back
> >using VLC. The video plays back fine, but I can't hear the audio. After
> >analyzing the Transport stream I was able to verify that there are PIDs
> >for both video and audio.
> >
> >Does anyone know what steps are involved to multiplex a AAC stream into
> >a MPEG-2 Transport stream using live555?
> 
> Are you sure that - in your code - the "mpegVersion" parameter is 4 
when "MPEG2TransportStreamMultiplexor::handleNewBuffer()" gets called?
> 
> The problem may be that the current Transport Stream multiplexing 
> (i.e., construction) code - implemented by the 
> "MPEG2TransportStreamMultiplexor" class - originally assumed that the 
> constituent audio and video streams were both MPEG-1 or MPEG-2; there 
> was originally no support for MPEG-4 audio or video.
> 
> Since then, support was added for MPEG-4 audio and video.  However, 
> it's conceivable that there are still problems with this.
> 
> You may want to take a look at "MPEG2TransportStreamMultiplexor.cpp" 
> - in particular, the "if" statement that starts at line 108.  If you 
> find something that needs to be changed there, please let us know.




More information about the live-devel mailing list