Discussion:
How to wrap a AAC-HBR RTP source into Transport stream correctly
James Huang
2014-08-23 01:10:55 UTC
Permalink
Hi,

I'm working on wrapping two RTP stream source (H264 and AAC-HBR ) into a
MPEG Transport stream and then forward it to another 3rd party server. The
source and the target are both 3rd party so I don't have control of their
expectation of input and output format.

The video is working after study the mail list. But I'm not able to find a
correct way to convert and feed a correct source into the method
MPEG2TransportStreamFromESSource::addNewAudioSource().

My code pieces looks like:

MPEG2TransportStreamFromESSource *pTS =
MPEG2TransportStreamFromESSource::createNew(env);
InsertH264StartCodeFilter *pVdoFilter =
InsertH264StartCodeFilter::createNew(env, H264VideoRTPSource);
pTS->addNewVideoSource(pVdoFilter, 5);
pTS->addNewAudioSource(MPEG4GenericRTPSource, 4);
MPEG4GenericRTPSource seems not proper source for addNewAudioSource here.
But I couldn't figure out how to convert it correctly.
m=audio 0 RTP/AVP 97
b=AS:1000
a=rtpmap:97 MPEG4-GENERIC/48000/2
a=fmtp:97
streamtype=5;profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=1190
a=control:track2
Would you provide some hint how can I convert the MPEG4GenericRTPSource
into correct data which is good to feed into
MPEG2TransportStreamFromESSource::addNewAudioSource()?

Thank you,
seamxr.
Ross Finlayson
2014-08-24 20:59:15 UTC
Permalink
pTS->addNewAudioSource(MPEG4GenericRTPSource, 4);
Yes, that's what you should be doing. Unfortunately I don't know why it's not working for you...


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

Loading...