centricular / android_rtsp_example

Example application using RTSP on android, with a gradle build system
19 stars 9 forks source link

how to optimize latency #6

Closed octavianionel-flyability closed 1 year ago

octavianionel-flyability commented 1 year ago

How to optimize latency for the RTSP stream? I get around of 3 seconds of latency when using the camera:

playbin uri=rtsp://ipaddress

If I use gst-launch-1.0 rtspsrc location=, I get an error

MathieuDuponchelle commented 1 year ago

One way to do it without setting up the full pipeline would be:

gst-launch-1.0 uridecodebin uri=... name=d source::latency=20 d. ! queue ! videoconvert ! autovideosink

This is however not a support forum, closing :)

octavianionel-flyability commented 1 year ago

One way to do it without setting up the full pipeline would be:

gst-launch-1.0 uridecodebin uri=... name=d source::latency=20 d. ! queue ! videoconvert ! autovideosink

This is however not a support forum, closing :)

hi @MathieuDuponchelle, thanks for your fast feedback. When I plug in this I get: "Unable to build pipeline: unexpected reference "gst-launch-1" -ignoring"

octavianionel-flyability commented 1 year ago

@MathieuDuponchelle you can try with this dummy rtsp url: rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 I replaced the string inside here: data->pipeline = gst_parse_launch("playbin uri=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4", &error); you'll get the same error. Did you try it? Happy Holidays!

MathieuDuponchelle commented 1 year ago

@octavianionel-flyability it is nicer to place a minimal amount of thinking on your end before pinging innocent third parties / filing non-issues ;)