[Live-devel] mpegVersion in addNewAudioSource

Jeff Shanab jshanab at smartwire.com
Fri Dec 16 12:24:46 PST 2011


Thanks. I have been experimenting all day and comparing to reference streams and 4 seems to be the correct number in the PAT (my ts analyzer seems to call it  the program_association_table).  What I am seeing in the playing back of the file is that there is no audio in the stream, The table entry got there, so vlc shows in the codec info the correct information but there is no sound and, on inspection with a hex editor or ts stream analyzer,  no audio packets.

It also flies thru the audio file source so I must have something set up wrong or the headers do not parse correctly. I looped it for now, but I think I will try MP3 this next attempt.

For now I need to know how to get the audio muxed in, I must of missed a step.

What I really need, in the long run will be a "NULLAudioSource" created like the device source so I can put in an audio channel of low bitrate total silence. I think the ipad will not play a stream unless it has sound and I must have video only. I just do not yet know what a minimalist stream of silence looks like.

From: live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: Friday, December 16, 2011 1:56 PM
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] mpegVersion in addNewAudioSource

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/

________________________________
No virus found in this message.
Checked by AVG - www.avg.com<http://www.avg.com>
Version: 2012.0.1890 / Virus Database: 2108/4684 - Release Date: 12/16/11
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111216/259d790e/attachment-0001.html>


More information about the live-devel mailing list