Rtsp server stream resolution

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

Rtsp server stream resolution

valerik931
This post was updated on .
How to change this value manually?
I use gstreamer in Android.
Pipeline at server side:
appsrc name=mysrc is-live=true max-bytes=0 do-timestamp=true min-latency=0 ! queue ! h264parse name=parse ! queue ! rtph264pay name=pay0 pt=96 timestamp-offset=0

Pipeline at client side:
rtspsrc location=rtsp://192.168.30.59:8554/test latency=50 ! rtpjitterbuffer latency=50 ! rtph264depay ! video/x-h264,framerate=60/1 ! h264parse ! avdec_h264 ! autovideosink

And I got stream with 1280x720 resolution, how I can manage signals to server and stream resolution?

Thank you!
Reply | Threaded
Open this post in threaded view
|

Re: Rtsp server stream resolution

Matteo Valdina
Hi,
On the server pipeline I'll add:

rtph264 config-interval=-1...

This value will embed picture format when there is a key frame.

The resution should be controlled by the appsrc. This is an encoded stream so you cannot rescale.

Best
Matteo

On Aug 7, 2017 05:57, "valerik931" <[hidden email]> wrote:
How to change this value manually?
I use gstreamer in Android.
Pipeline at server side:
appsrc name=mysrc is-live=true max-bytes=0 do-timestamp=true min-latency=0 !
queue ! h264parse name=parse ! queue ! rtph264pay name=pay0 pt=96
timestamp-offset=0
Pipeline at client side:
rtspsrc location=rtsp://192.168.30.59:8554/test latency=50 ! rtpjitterbuffer
latency=50 ! rtph264depay ! video/x-h264,framerate=60/1 ! h264parse !
avdec_h264 ! autovideosink
And I got stream with 1280x720 resolution, how I can manage signals to
server and stream resolution?

Thank you!



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Rtsp-server-stream-resolution-tp4684106.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
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: Rtsp server stream resolution

valerik931
I think you writed about rtph264pay, but setting this to -1 didn't help.

On media-configure signal invocation I changed appsrc settings to this:
GstCaps* caps = gst_caps_new_simple("video/x-h264",
                                        "stream-format",G_TYPE_STRING,"byte-stream",
                                        "width", G_TYPE_INT, videoWidth,
                                        "height", G_TYPE_INT, videoHeight,
                                        "framerate", GST_TYPE_FRACTION, 60, 1,
                                        "profile", G_TYPE_STRING, "baseline",
                                        NULL);

    g_object_set(G_OBJECT(data->appsrc),
                 "stream-type", GST_APP_STREAM_TYPE_STREAM,
                 "format", GST_FORMAT_BYTES,
                 "caps", caps,
                 NULL);

videoWidth and videoHeight are 1080 and 1920 respectively. but stream is steel 1280x720.
Reply | Threaded
Open this post in threaded view
|

Re: Rtsp server stream resolution

Matteo Valdina
Hi,
If the stream 1280x720 you need to change the source (what generate the stream for appsrc) or you need to upscale the stream.
Upscaling the stream means that you need to decode, scale and re-encode the stream. This without any quality advantages because your original stream was a 720p.

Something like this:

appsrc ! vaapih264dec ! vaapipostproc ! video/x-raw,width=1920,height=1080 ! vaapih264enc ! h264parse ! rtph264pay ...

But this is overkill ...
It is better that you investigate how to increase the quality of the source.

Best
Matteo


On Mon, Aug 7, 2017 at 11:07 AM, valerik931 <[hidden email]> wrote:
I think you writed about rtph264pay, but setting this to -1 didn't help.

On media-configure signal invocation I changed appsrc settings to this:
GstCaps* caps = gst_caps_new_simple("video/x-h264",

"stream-format",G_TYPE_STRING,"byte-stream",
                                        "width", G_TYPE_INT, videoWidth,
                                        "height", G_TYPE_INT, videoHeight,
                                        "framerate", GST_TYPE_FRACTION, 60,
1,
                                        "profile", G_TYPE_STRING,
"baseline",
                                        NULL);

    g_object_set(G_OBJECT(data->appsrc),
                 "stream-type", GST_APP_STREAM_TYPE_STREAM,
                 "format", GST_FORMAT_BYTES,
                 "caps", caps,
                 NULL);

videoWidth and videoHeight are 1080 and 1920 respectively. but stream is
steel 1280x720.




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Rtsp-server-stream-resolution-tp4684106p4684111.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



--
“There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.”
- Tony Hoare

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