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 list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi All, Any help on this? Thanks, Mayank On Fri, Jan 10, 2020 at 4:30 PM Mayank Aggarwal <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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:
--Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by Mayank Aggarwal
Hello
You are decoding the media either way with decodebin , so you have to encode again with encoder for audio and video which brings to same effort For already saved mp4 file no need to decode, just demux the streams and payload them to rtp before passing to webrtcbin Use something like rtph264pay for video and appropriate rtppayloader for audio You can find the rtppayload types here https://gstreamer.freedesktop.org/documentation/rtp/index.html?gi-language=c -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |