Failure in minimal demo with rtmpsink, nginx-rtmp-plugin and rtmpsrc
F32
feng32 at 163.com
Thu May 28 05:42:18 UTC 2020
Hi,
I'm working on Ubuntu 20.04, shipped with:
- gstreamer 1.16.2
- ffmpeg 4.2.2
- nginx 1.17.10
- libnginx-mod-rtmp 1.17.10
(all from Ubuntu official repo)
The nginx configuration is:
> rtmp {
> server {
> listen 1935;
> application tv {
> live on;
> }
> }
> }
so that it acts as a media server.
With this command, I can push a test video stream to nginx:
> gst-launch-1.0 videotestsrc ! x264enc ! flvmux ! rtmpsink location='rtmp://127.0.0.1/tv live=1'
I can open the video stream with ffmpeg:
> ffplay rtmp://127.0.0.1/tv
However when I tried several gstreamer commands, all of them failed:
> $ gst-launch-1.0 playbin uri=rtmp://127.0.0.1/tv
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /GstURIDecodeBin:uridecodebin0: Could not parse RTMP URI
> Additional debug info:
> gsturidecodebin.c(1413): gen_source_element (): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0:
> No element accepted URI 'rtmp://127.0.0.1/tv'
> Setting pipeline to NULL ...
> Freeing pipeline ...
> $ gst-launch-1.0 rtmpsrc location='rtmp://127.0.0.1/tv live=1' ! decodebin ! autovideosink
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /GstPipeline:pipeline0/GstRTMPSrc:rtmpsrc0: Could not open resource for reading.
> Additional debug info:
> gstrtmpsrc.c(626): gst_rtmp_src_start (): /GstPipeline:pipeline0/GstRTMPSrc:rtmpsrc0:
> No filename given
> Setting pipeline to NULL ...
> Freeing pipeline ...
> $ gst-launch-1.0 rtmpsrc location='rtmp://127.0.0.1/tv live=1' ! flvdemux ! decodebin ! autovideosink
> Setting pipeline to PAUSED ...
> ERROR: Pipeline doesn't want to pause.
> ERROR: from element /GstPipeline:pipeline0/GstRTMPSrc:rtmpsrc0: Could not open resource for reading.
> Additional debug info:
> gstrtmpsrc.c(626): gst_rtmp_src_start (): /GstPipeline:pipeline0/GstRTMPSrc:rtmpsrc0:
> No filename given
> Setting pipeline to NULL ...
> Freeing pipeline ...
I also tried encoding with avenc_flv, but there's no difference.
I'd like to know what is the cause of the failure, and what is the correct way of playing rtmp stream with gstreamer.
Regards
Windy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200528/7943a73f/attachment.htm>
More information about the gstreamer-devel
mailing list