Unable to get RSTP streaming working imx8mp

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to get RSTP streaming working imx8mp

Jump to solution
903 Views
intosite
Contributor II

Using the imx8mp evkit with IMX-OS08A20 accessory card. Bitbake imx-image-full and got the camera working with-in the gopoint demos.

Am trying to stream the camera over rtsp and view the stream from PC VLC over the network.

On the server imx ran:

 

gst-variable-rtsp-server -p 9001 -u "v4l2src device=/dev/video2 ! video/x-raw,width=640,height=480 ! v4l2h264enc ! rtph264pay name=pay0 pt=96"

Shows:
Pipeline set to: ( v4l2src device=/dev/video2 ! video/x-raw,width=640,height=480 ! v4l2h264enc ! rtph264pay name=pay0 pt=96 )...
Stream ready at rtsp://127.0.0.1:9001/stream

 

 

Then I tried to retrieve the stream from another device over the network, it does not work, but on the server side i see a new line everytime i tried to connect from the client

 

====== V4L2ENC: 1.24.7 build on Oct 23 2024 09:43:13. ======

====== V4L2ENC: 1.24.7 build on Oct 23 2024 09:43:13. ======

====== V4L2ENC: 1.24.7 build on Oct 23 2024 09:43:13. ======

 

 

So I tried to load the stream from the imx system itself with:

 

GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:9001/stream ! queue ! rtph264depay ! v4l2h264dec ! autovideosink
and 
GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsp://192.168.100.219:9001/stream ! queue ! rtph264depay ! v4l2h264dec ! autovideosink

 

I see the same response as above on the server side.

Client side logs :

 

root@imx8mpevk:~# GST_DEBUG=3 gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:9001/stream ! queue ! rtph264depay ! v4l2h264dec ! autovideosink
Setting pipeline to PAUSED ...

====== V4L2DEC: 1.24.7 build on Oct 23 2024 09:43:13. ======
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Pipeline is PREROLLED ...
Prerolled, waiting for progress to finish...
Progress: (connect) Connecting to rtsp://127.0.0.1:9001/stream
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
0:00:00.198607035  1940 0xffffa0000d20 WARN                 rtspsrc gstrtspsrc.c:7097:gst_rtspsrc_send:<rtspsrc0> error: Unhandled error
0:00:00.198669410  1940 0xffffa0000d20 WARN                 rtspsrc gstrtspsrc.c:7097:gst_rtspsrc_send:<rtspsrc0> error: Service Unavailable (503)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Unhandled error
Additional debug info:
/usr/src/debug/gstreamer1.0-plugins-good/1.24.7.imx/gst/rtsp/gstrtspsrc.c(7097): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Service Unavailable (503)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
0:00:00.199138163  1940 0xffffa0000d20 WARN                 rtspsrc gstrtspsrc.c:8584:gst_rtspsrc_open:<rtspsrc0> can't get sdp
0:00:00.199200289  1940 0xffffa0000d20 WARN                 rtspsrc gstrtspsrc.c:6515:gst_rtspsrc_loop:<rtspsrc0> we are not connected

 

 

Not sure what is happening and how to proceed. Any advice greatly appreciated.

Labels (1)
0 Kudos
Reply
1 Solution
860 Views
intosite
Contributor II
Managed to fix this, using v4l2src device=/dev/video3 instead.

View solution in original post

0 Kudos
Reply
2 Replies
888 Views
joanxie
NXP TechSupport
NXP TechSupport

what bsp version do you test? let me reproduce this

0 Kudos
Reply
861 Views
intosite
Contributor II
Managed to fix this, using v4l2src device=/dev/video3 instead.
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2051466%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EUnable%20to%20get%20RSTP%20streaming%20working%20imx8mp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2051466%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EUsing%20the%20imx8mp%20evkit%20with%20IMX-OS08A20%20accessory%20card.%20Bitbake%20imx-image-full%20and%20got%20the%20camera%20working%20with-in%20the%20gopoint%20demos.%3C%2FP%3E%3CP%3EAm%20trying%20to%20stream%20the%20camera%20over%20rtsp%20and%20view%20the%20stream%20from%20PC%20VLC%20over%20the%20network.%3C%2FP%3E%3CP%3EOn%20the%20server%20imx%20ran%3A%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Egst-variable-rtsp-server%20-p%209001%20-u%20%22v4l2src%20device%3D%2Fdev%2Fvideo2%20!%20video%2Fx-raw%2Cwidth%3D640%2Cheight%3D480%20!%20v4l2h264enc%20!%20rtph264pay%20name%3Dpay0%20pt%3D96%22%0A%0AShows%3A%0APipeline%20set%20to%3A%20(%20v4l2src%20device%3D%2Fdev%2Fvideo2%20!%20video%2Fx-raw%2Cwidth%3D640%2Cheight%3D480%20!%20v4l2h264enc%20!%20rtph264pay%20name%3Dpay0%20pt%3D96%20)...%0AStream%20ready%20at%20rtsp%3A%2F%2F127.0.0.1%3A9001%2Fstream%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3EThen%20I%20tried%20to%20retrieve%20the%20stream%20from%20another%20device%20over%20the%20network%2C%20it%20does%20not%20work%2C%20but%20on%20the%20server%20side%20i%20see%20a%20new%20line%20everytime%20i%20tried%20to%20connect%20from%20the%20client%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3D%3D%3D%3D%3D%3D%20V4L2ENC%3A%201.24.7%20build%20on%20Oct%2023%202024%2009%3A43%3A13.%20%3D%3D%3D%3D%3D%3D%0A%0A%3D%3D%3D%3D%3D%3D%20V4L2ENC%3A%201.24.7%20build%20on%20Oct%2023%202024%2009%3A43%3A13.%20%3D%3D%3D%3D%3D%3D%0A%0A%3D%3D%3D%3D%3D%3D%20V4L2ENC%3A%201.24.7%20build%20on%20Oct%2023%202024%2009%3A43%3A13.%20%3D%3D%3D%3D%3D%3D%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3ESo%20I%20tried%20to%20load%20the%20stream%20from%20the%20imx%20system%20itself%20with%3A%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3EGST_DEBUG%3D3%20gst-launch-1.0%20rtspsrc%20location%3Drtsp%3A%2F%2F127.0.0.1%3A9001%2Fstream%20!%20queue%20!%20rtph264depay%20!%20v4l2h264dec%20!%20autovideosink%0Aand%20%0AGST_DEBUG%3D3%20gst-launch-1.0%20rtspsrc%20location%3Drtsp%3A%2F%2F192.168.100.219%3A9001%2Fstream%20!%20queue%20!%20rtph264depay%20!%20v4l2h264dec%20!%20autovideosink%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CP%3EI%20see%20the%20same%20response%20as%20above%20on%20the%20server%20side.%3C%2FP%3E%3CP%3EClient%20side%20logs%20%3A%3C%2FP%3E%3CBR%20%2F%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Eroot%40imx8mpevk%3A~%23%20GST_DEBUG%3D3%20gst-launch-1.0%20rtspsrc%20location%3Drtsp%3A%2F%2F127.0.0.1%3A9001%2Fstream%20!%20queue%20!%20rtph264depay%20!%20v4l2h264dec%20!%20autovideosink%0ASetting%20pipeline%20to%20PAUSED%20...%0A%0A%3D%3D%3D%3D%3D%3D%20V4L2DEC%3A%201.24.7%20build%20on%20Oct%2023%202024%2009%3A43%3A13.%20%3D%3D%3D%3D%3D%3D%0APipeline%20is%20live%20and%20does%20not%20need%20PREROLL%20...%0AProgress%3A%20(open)%20Opening%20Stream%0APipeline%20is%20PREROLLED%20...%0APrerolled%2C%20waiting%20for%20progress%20to%20finish...%0AProgress%3A%20(connect)%20Connecting%20to%20rtsp%3A%2F%2F127.0.0.1%3A9001%2Fstream%0AProgress%3A%20(open)%20Retrieving%20server%20options%0AProgress%3A%20(open)%20Retrieving%20media%20info%0A0%3A00%3A00.198607035%20%201940%200xffffa0000d20%20WARN%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20rtspsrc%20gstrtspsrc.c%3A7097%3Agst_rtspsrc_send%3A%3CRTSPSRC0%3E%20error%3A%20Unhandled%20error%0A0%3A00%3A00.198669410%20%201940%200xffffa0000d20%20WARN%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20rtspsrc%20gstrtspsrc.c%3A7097%3Agst_rtspsrc_send%3A%3CRTSPSRC0%3E%20error%3A%20Service%20Unavailable%20(503)%0AERROR%3A%20from%20element%20%2FGstPipeline%3Apipeline0%2FGstRTSPSrc%3Artspsrc0%3A%20Unhandled%20error%0AAdditional%20debug%20info%3A%0A%2Fusr%2Fsrc%2Fdebug%2Fgstreamer1.0-plugins-good%2F1.24.7.imx%2Fgst%2Frtsp%2Fgstrtspsrc.c(7097)%3A%20gst_rtspsrc_send%20()%3A%20%2FGstPipeline%3Apipeline0%2FGstRTSPSrc%3Artspsrc0%3A%0AService%20Unavailable%20(503)%0AERROR%3A%20pipeline%20doesn't%20want%20to%20preroll.%0ASetting%20pipeline%20to%20NULL%20...%0A0%3A00%3A00.199138163%20%201940%200xffffa0000d20%20WARN%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20rtspsrc%20gstrtspsrc.c%3A8584%3Agst_rtspsrc_open%3A%3CRTSPSRC0%3E%20can't%20get%20sdp%0A0%3A00%3A00.199200289%20%201940%200xffffa0000d20%20WARN%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20rtspsrc%20gstrtspsrc.c%3A6515%3Agst_rtspsrc_loop%3A%3CRTSPSRC0%3E%20we%20are%20not%20connected%3C%2FRTSPSRC0%3E%3C%2FRTSPSRC0%3E%3C%2FRTSPSRC0%3E%3C%2FRTSPSRC0%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CP%3ENot%20sure%20what%20is%20happening%20and%20how%20to%20proceed.%20Any%20advice%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2051466%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EYocto%20Project%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2056674%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Unable%20to%20get%20RSTP%20streaming%20working%20imx8mp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2056674%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EManaged%20to%20fix%20this%2C%20using%20v4l2src%20device%3D%2Fdev%2Fvideo3%20instead.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2052438%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Unable%20to%20get%20RSTP%20streaming%20working%20imx8mp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2052438%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Ewhat%20bsp%20version%20do%20you%20test%3F%20let%20me%20reproduce%20this%3C%2FP%3E%3C%2FLINGO-BODY%3E