James Huang
2014-08-23 01:10:55 UTC
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 =
But I couldn't figure out how to convert it correctly.
into correct data which is good to feed into
MPEG2TransportStreamFromESSource::addNewAudioSource()?
Thank you,
seamxr.
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.InsertH264StartCodeFilter *pVdoFilter =
InsertH264StartCodeFilter::createNew(env, H264VideoRTPSource);
pTS->addNewVideoSource(pVdoFilter, 5);
pTS->addNewAudioSource(MPEG4GenericRTPSource, 4);
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 MPEG4GenericRTPSourceb=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
into correct data which is good to feed into
MPEG2TransportStreamFromESSource::addNewAudioSource()?
Thank you,
seamxr.