Description
Hello,
I have a problem opening an RTP stream in flutter-pi. I am using a RaspberryPI 3B+ (Buster).
My device is streaming a live camera to rtp://<host-ip>:PORT
I correctly installed GStreamer on the Raspberry Pi and used the command:
$ gst-launch-1.0 udp://<raspberryPi-IP>:PORT ! application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96 ! rtph264depay ! avdec_h264 ! autovideosink
GStreamer respond
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms: Pipeline construction is invalid, please add queues.
Additional debug info:
../libs/gst/base/gstbasesink.c(1258): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms: Pipeline construction is invalid, please add queues.
Additional debug info:
../libs/gst/base/gstbasesink.c(1258): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstKMSSink:autovideosink0-actual-sink-kms:
Not enough buffering available for the processing deadline of 0:00:00.015000000, add enough queues to buffer 0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
and that's work - camera view is showed with minimal latency but that form pipeline for URI in video-player in flutter-pi isn't correct.
So I try using as URI:
udp://<raspberryPi-IP>:PORT
or
rtp://<raspberryPi-IP>:PORT
Widget code
@override
void initState() {
super.initState();
_controller = VideoPlayerController.network("rtp://<raspberryPi-IP>:PORT");
_controller.addListener(() {
setState(() {});
});
_controller.setLooping(true);
_controller.initialize().then((_) => setState(() {}));
_controller.play();
}
but I got error:
[gstreamer video_player] Could not fetch duration. (gst_element_query_duration)
and white screen and displays nothing else. Other elements of the application (like buttons) work. Only the video-player does not show a frame from the camera.