Need help to construct a pipeline

Olivier Crête olivier.crete at collabora.com
Mon Jan 13 22:51:56 UTC 2020


Hi,
Make sure you encore you H.264 in your file as baseline profile (this is all that's supported for WebRTC), also you want to put the audio as opus.. Then you want to use qtdemux directly instead of decodebin, because you don't want to decode and re-encode. If you can't control the codecs of the pre-recorded file, you'll probably have to trancode everything..
Olivier
On Mon, 2020-01-13 at 16:01 -0500, Mayank Aggarwal wrote:
> Hi All,
> Any help on this?
> 
> Thanks,
> Mayank
> 
> On Fri, Jan 10, 2020 at 4:30 PM Mayank Aggarwal <maggarwal.securustech at gmail.com> wrote:
> > Hi Gstreamer experts,
> > I am a beginner with gstreamer so bear with me.
> > 
> > I have a working pipeline where audio and video from a test source is sent to the webrtcbin element used to send out offer. Pipeline is as follows:
> > 
> > PIPELINE_DESC = '''
> > webrtcbin name=sendrecv stun-server=stun://stun.l.google.com:19302
> >  audiotestsrc is-live=true wave=red-noise ! audioconvert ! audioresample ! queue ! opusenc ! rtpopuspay !
> >  queue ! application/x-rtp,media=audio,encoding-name=OPUS,payload=96 ! sendrecv.
> >  videotestsrc is-live=true pattern=ball ! video/x-raw,width=320,height=240 ! videoconvert ! queue ! x264enc ! rtph264pay !
> >  queue ! application/x-rtp,media=video,encoding-name=H264,payload=97 ! sendrecv.
> > '''
> > However doing this consumes a lot of CPU/Memory as gstreamer has to encode audio/video. Hence I was to use a pre-recorded file to lower the resource usage.
> > 
> > 
> > I want to use a sample file (sample.mp4) to send audio and video to the webRTCbin element. The mp4 file has H264 video and AAC audio. I have tried a lot of combinations of elements but it is not working. Could you please help me correct my pipeline? 
> > 
> > PIPELINE_DESC = '''
> > webrtcbin name=sendrecv stun-server=stun://stun.l.google.com:19302
> >  filesrc location=sample.mp4 ! decodebin ! audioconvert ! sendrecv.
> >  filesrc location=sample.mp4 ! decodebin ! videoconvert ! sendrecv.
> > '''
> > 
> > Many thanks in advance.
> > 
> > Thanks,
> > Mayank
> > 
> 
> _______________________________________________gstreamer-devel mailing listgstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-- 
Olivier Crête
olivier.crete at collabora.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200113/bf85a700/attachment-0001.htm>


More information about the gstreamer-devel mailing list