[Live-devel] mpegVersion in addNewAudioSource

Ross Finlayson finlayson at live555.com
Fri Dec 16 11:55:56 PST 2011


> In the MPEG2TransportStreamFromESSource I am adding a video and audio source.
>  
> For the addNewVideoSource the comments say mpegversion = 4 for mpeg4 and 5 for h264
>  
> There is no such comment for the addNewAudioSource but examples seem to use 1.  Anyway what is the meaning and setting for this argument.

It is used to compute the value of the "stream_type" field that gets put in the PMT (Program Map Table) in the resulting Transport Stream.  This value depends upon the specific type of video or audio (i.e., upon the specific video or audio codec) that's used in the file.  

Because you're trying to store AAC audio in your Transport Stream, the "mpegVersion" field should definitely *not* be 1 or 2.  You should, instead, use a "mpegVersion" of 4 (because AAC is "MPEG-4 audio").

Our code will use this to compute a "stream_type" of 0xF, which may or may not be correct for AAC audio.  (If it's not correct, then someone please let me know, and I'll update our code accordingly.)


> I am trying to go from H264 received from RTSP earlier and the test.aac file into a transport stream.

If, instead, you were to use a MP3 file for your audio (rather than an AAC file), then you would use a "mpegVersion" of 1 or (more likely) 2, and that would probably work OK.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111216/ddc76aee/attachment.html>


More information about the live-devel mailing list