centricular / gstcefsrc

A simple gstreamer wrapper around Chromium Embedded Framework
84 stars 45 forks source link

PROBLEM RTSP PIPELINE #3

Closed GhizlaneBd closed 4 years ago

GhizlaneBd commented 4 years ago

Hi Mathieu,

I'm Ghizlane, and I just discovered the module gstcef that you come to write and published in open source under github.

It's really great because it's a project that will help me a lot to get the audio but also the video I want to send to an RTSP server.

In rtsp the audio and the video are not muxed but a SDP declares the audio and video flows in a first exchanges (always in RTSP).

Then each one is retransmitted separately by RTP.

Starting from the pipeline that you propose for the test, I tried several variants and now I have the following pipeline:

gst-launch-1.0 cefsrc url="file:///......" ! queue max-size-buffers = 500 ! cefdemux name=d d.video ! video/x-raw,format=BGRA,framerate=30/1 ! videoconvert ! videorate max-rate = 2500 ! videoscale ! x264enc bitrate = 2500 tune = zerolatency speed-preset = superfast key-int-max = 60 ! rtspclientsink debug=1 latency=0 stream-name=”......” location=rtsp://...... d.audio ! audio/x-raw channels = 1, rate = 48000 ! queue max-size-buffers = 500 ! audioconvert ! audiorate! voaacenc bitrate = 96000 ! rtspclientsink debug=1 latency=0 stream-name=”.......” location=rtsp://.......

You will recognize the beginning; but the end has been cut in half for each Audio and Video stream. Indeed, I use your cefdemux module because I have to convert video to H264 and audio to AAC-LC separately.

For each stream, it performs a RTSP request separately but I do not think this way is the most ideal.

According to you, do you think it is possible to recover the A / V streams once converted to the rtspclientsink module in order to make only one rtsp request?

Thank you very much for your return.

Best regards Ghizlane

MathieuDuponchelle commented 4 years ago

Hey @ghizlane-code!

When pasting gst-launch command lines, it's better practice to format them in a code block and add line breaks for better readability.

This looks more like a gstreamer support question than a cefsrc one, but if I understand what you need correctly, you should either write an application and request two pads from your rtspclientsink, or alternatively from the command line name your client sink (rtspclientsink name=sink) then connect both streams to the named element (... ! sink. ... ! sink.).

An example for this syntax is the textoverlay example @ https://gstreamer.freedesktop.org/documentation/tools/gst-launch.html?gi-language=c#video