Raw audio MPEG TS streaming

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Raw audio MPEG TS streaming

Charles Chen - Contractor

Hello,


How to generate mpeg TS stream (RTP payload type 33) with raw audio without using any audio encoder such as AAC? I need to feed raw PCM audio into mpegtsmux and RTP rtpmp2tpay. I am getting pipeline link error if I:


gst-launch-1.0 autoaudiosrc ! audioconvert ! capsfilter caps = "audio/x-lpcm,width=16,channels=2,rate=48000" ! filesink location = "audiofile.raw"


Looks like audio/x-lpcm is not included in the supported media type list:

https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/media-types.html


Do I have to create a new audio/x-lpcm media type? considering possible issues to link with existing elements.


Is it feasible to create my own plugin to convert audio/x-raw to audio/x-lpcm and then link to mpegtsmux?


Or should I use appsrc or appsink method to do that?


Thanks and appreciate any feedback.


Charles



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Raw audio MPEG TS streaming

Nicolas Dufresne-5


Le 1 juil. 2017 6:59 AM, "Charles Chen - Contractor" <[hidden email]> a écrit :

Hello,


How to generate mpeg TS stream (RTP payload type 33) with raw audio without using any audio encoder such as AAC? I need to feed raw PCM audio into mpegtsmux and RTP rtpmp2tpay. I am getting pipeline link error if I:


gst-launch-1.0 autoaudiosrc ! audioconvert ! capsfilter caps = "audio/x-lpcm,width=16,channels=2,rate=48000" ! filesink location = "audiofile.raw"


Looks like audio/x-lpcm is not included in the supported media type list:

https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/media-types.html


Do I have to create a new audio/x-lpcm media type? considering possible issues to link with existing elements.


Is it feasible to create my own plugin to convert audio/x-raw to audio/x-lpcm and then link to mpegtsmux?


Or should I use appsrc or appsink method to do that?


Creating an "encoder" for that would be nice, it's currently missing. It does not seem too complex either. Note that RTP can support raw pcm directly, if that's an option for you.


Thanks and appreciate any feedback.


Charles



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Raw audio MPEG TS streaming

Charles Chen - Contractor
In reply to this post by Charles Chen - Contractor

Hi Nicolas,


Thanks for the prompt reply. I am afraid we don't have option to use RTP plugin directly because we are RTSP server application based on GStreamer's RTSP server library (gst-rtsp-server). Our ultimate goal is to feed raw PCM or LPCM audio into mpegtxmux and rtpmp2tpay. Currently there is no existing plugin to connect raw PCM audio to mpegtxmux.


When you say PCM encoder what kind of plugin is the best to implement? Is there a template that we could use, or can we use appsrc appsink method to achieve this?

Thanks again,

Charles




From: Charles Chen - Contractor
Sent: Friday, June 30, 2017 2:30:17 PM
To: [hidden email]
Subject: Raw audio MPEG TS streaming
 

Hello,


How to generate mpeg TS stream (RTP payload type 33) with raw audio without using any audio encoder such as AAC? I need to feed raw PCM audio into mpegtsmux and RTP rtpmp2tpay. I am getting pipeline link error if I:


gst-launch-1.0 autoaudiosrc ! audioconvert ! capsfilter caps = "audio/x-lpcm,width=16,channels=2,rate=48000" ! filesink location = "audiofile.raw"


Looks like audio/x-lpcm is not included in the supported media type list:

https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/media-types.html


Do I have to create a new audio/x-lpcm media type? considering possible issues to link with existing elements.


Is it feasible to create my own plugin to convert audio/x-raw to audio/x-lpcm and then link to mpegtsmux?


Or should I use appsrc or appsink method to do that?


Thanks and appreciate any feedback.


Charles



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Raw audio MPEG TS streaming

Nicolas Dufresne-5


Le 2 juil. 2017 8:00 AM, "Charles Chen - Contractor" <[hidden email]> a écrit :

Hi Nicolas,


Thanks for the prompt reply. I am afraid we don't have option to use RTP plugin directly because we are RTSP server application based on GStreamer's RTSP server library (gst-rtsp-server). Our ultimate goal is to feed raw PCM or LPCM audio into mpegtxmux and rtpmp2tpay. Currently there is no existing plugin to connect raw PCM audio to mpegtxmux.


Gst-rtsp-server gives you complete control over the rtp payload format. Of course, you might have other reason to use MPEG ts over RTP.


When you say PCM encoder what kind of plugin is the best to implement? Is there a template that we could use, or can we use appsrc appsink method to achieve this?

I meant writing an element/plugin that derives from GstAudioEncoder base class. If I remember, lpcm have special ordering and some headers that need to be inserted. This could also be implement directly in mpegtsmux, considering its kind of specific.


Thanks again,

Charles




From: Charles Chen - Contractor
Sent: Friday, June 30, 2017 2:30:17 PM
To: [hidden email]
Subject: Raw audio MPEG TS streaming
 

Hello,


How to generate mpeg TS stream (RTP payload type 33) with raw audio without using any audio encoder such as AAC? I need to feed raw PCM audio into mpegtsmux and RTP rtpmp2tpay. I am getting pipeline link error if I:


gst-launch-1.0 autoaudiosrc ! audioconvert ! capsfilter caps = "audio/x-lpcm,width=16,channels=2,rate=48000" ! filesink location = "audiofile.raw"


Looks like audio/x-lpcm is not included in the supported media type list:

https://gstreamer.freedesktop.org/documentation/plugin-development/advanced/media-types.html


Do I have to create a new audio/x-lpcm media type? considering possible issues to link with existing elements.


Is it feasible to create my own plugin to convert audio/x-raw to audio/x-lpcm and then link to mpegtsmux?


Or should I use appsrc or appsink method to do that?


Thanks and appreciate any feedback.


Charles



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel