i.MX 8 - RTSP Streaming Support

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX 8 - RTSP Streaming Support

i.MX 8 - RTSP Streaming Support

Recently I published this i.MX Dev Blog post about the Gateworks plugin gst-variable-rtsp-server support for i.MX 6.

Now, you can check how to use it on i.MX 8 SoCs as well.

1. Preparing the image

In order to use gst-variable-rtsp-server plugin, prepare your machine and distro:


Add the following line to conf/local.conf:

IMAGE_INSTALL_append += "gstreamer1.0-rtsp-server gst-variable-rtsp-server"

Download the attached patch and apply it by doing:

$ cd <yocto_path>/sources/meta-fsl-bsp-release/
$ git am ~/Download/0001-Add-RTSP-support-for-i.MX-8-L4.14.78_ga1.0.0-or-olde.patch

Note: This patch is not necessary for L4.14.98_ga2.0.0 BSP!

Then, build the image with bitbake and deploy it to the SD card.

2. Video Test Source Example

Server

$ gst-variable-rtsp-server -p 9001 -u "videotestsrc ! v4l2h264enc ! rtph264pay name=pay0 pt=96"

Client


2. Camera Example

Server

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

Client


In order to use VLC or other application as the client, just enter the URL as shown in the image below:vlc_rtsp_example.png

附件
评论
IMAGE_INSTALL_append += "gstreamer1.0-rtsp-server gst-variable-rtsp-server"

Correct me if I am wrong but one will also require adding gstreamer1.0-plugins-good and gstreamer1.0-plugins-bad plugins as you are using v4l2h264enc in your example.

So the above line should be changed to 

IMAGE_INSTALL_append += "gstreamer1.0-rtsp-server gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gst-variable-rtsp-server"

 

%3CLINGO-SUB%20id%3D%22lingo-sub-1121720%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX%208%20-%20RTSP%20%E6%B5%81%E5%AA%92%E4%BD%93%E6%94%AF%E6%8C%81%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1121720%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3Dutf-8%22%20%2F%26gt%3B%0A%3CP%3E%E6%9C%80%E8%BF%91%E6%88%91%E5%9C%A8%20%3CA%20href%3D%22https%3A%2F%2Fimxdev.gitlab.io%2Ftutorial%2FGatework_RTSP_variable_is_supported_by_Yocto_Community_now%2F%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ei.MX%20%E5%BC%80%E5%8F%91%E8%80%85%E5%8D%9A%E5%AE%A2%3C%2FA%3E%E4%B8%8A%E5%8F%91%E5%B8%83%E4%BA%86%E4%B8%80%E7%AF%87%E5%85%B3%E4%BA%8E%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FGateworks%2Fgst-gateworks-apps%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EGateworks%20%E6%8F%92%E4%BB%B6%3C%2FA%3E%20%3CSTRONG%3Egst-variable-rtsp-server%3C%2FSTRONG%3E%20%E5%AF%B9%20i.MX%206%20%E6%94%AF%E6%8C%81%E7%9A%84%E6%96%87%E7%AB%A0%E3%80%82%3C%2FP%3E%3CP%3E%E7%8E%B0%E5%9C%A8%EF%BC%8C%E6%82%A8%E4%B9%9F%E5%8F%AF%E4%BB%A5%E4%BA%86%E8%A7%A3%E5%A6%82%E4%BD%95%E5%9C%A8%20i.MX%208%20SoCs%20%E4%B8%8A%E4%BD%BF%E7%94%A8%E8%AF%A5%E6%8F%92%E4%BB%B6%E3%80%82%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20bold%3B%22%3E%3CSTRONG%3E1.%20%E5%87%86%E5%A4%87%E5%9B%BE%E5%83%8F%E3%80%82%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%E4%B8%BA%E4%BA%86%E4%BD%BF%E7%94%A8%20%3CSTRONG%3Egst-variable-rtsp-server%3C%2FSTRONG%3E%20%E6%8F%92%E4%BB%B6%EF%BC%8C%E8%AF%B7%E5%87%86%E5%A4%87%E5%A5%BD%E6%82%A8%E7%9A%84%E6%9C%BA%E5%99%A8%E5%92%8C%E5%8F%91%E8%A1%8C%E7%89%88%EF%BC%9A%3C%2FP%3E%3CPRE%20style%3D%22color%3A%20%23000000%3B%20background-color%3A%20%23f9f9f9%3B%20border%3A%201px%20dashed%20%232f6fab%3B%20font-size%3A%2012.7px%3B%20padding%3A%201em%3B%22%3E%3CCODE%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%20font-size%3A%2012.7px%3B%22%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%E5%B0%86%E4%BB%A5%E4%B8%8B%E8%A1%8C%E6%B7%BB%E5%8A%A0%E5%88%B0%20%3CEM%3Econf%2Flocal.conf%EF%BC%9A%3C%2FEM%3E%3C%2FP%3E%3CPRE%20style%3D%22color%3A%20%23000000%3B%20background-color%3A%20%23f9f9f9%3B%20border%3A%201px%20dashed%20%232f6fab%3B%20font-size%3A%2012.7px%3B%20padding%3A%201em%3B%22%3E%3CCODE%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%20font-size%3A%2012.7px%3B%22%3EIMAGE_INSTALL_append%20%2B%3D%20%22%3CSPAN%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23f6f6f6%3B%22%3Egstreamer1.0-rtsp-server%20gst-variable-rtsp-server%3C%2FSPAN%3E%22%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20style%3D%22border%3A%200px%3B%22%3E%E4%B8%8B%E8%BD%BD%E9%99%84%E5%B8%A6%E7%9A%84%E8%A1%A5%E4%B8%81%E5%B9%B6%E9%80%9A%E8%BF%87%E4%BB%A5%E4%B8%8B%E6%96%B9%E5%BC%8F%E5%BA%94%E7%94%A8%EF%BC%9A%3C%2FP%3E%3CPRE%20style%3D%22color%3A%20%23000000%3B%20background-color%3A%20%23f9f9f9%3B%20border%3A%201px%20dashed%20%232f6fab%3B%20font-size%3A%2012.7px%3B%20padding%3A%201em%3B%22%3E%3CSPAN%20style%3D%22color%3A%20%233d3d3d%3B%22%3E%24%20cd%20%3CYOCTO_PATH%3E%2Fsources%2Fmeta-fsl-bsp-release%2F%3C%2FYOCTO_PATH%3E%3C%2FSPAN%3E%0A%3CSPAN%20style%3D%22color%3A%20%233d3d3d%3B%22%3E%24%20git%20am%20~%2FDownload%2F0001-Add-RTSP-support-for-i.MX-8-L4.14.78_ga1.0.0-or-olde.patch%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%20style%3D%22border%3A%200px%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22border%3A%200px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20bold%3B%20font-size%3A%2012px%3B%22%3E%3CEM%3E%3CSTRONG%3E%E6%B3%A8%E6%84%8F%EF%BC%9A%E5%AF%B9%E4%BA%8E%20L4.14.98_ga2.0.0%20BSP%EF%BC%8C%E6%AD%A4%E8%A1%A5%E4%B8%81%E4%B8%8D%E6%98%AF%E5%BF%85%E9%9C%80%E7%9A%84%EF%BC%81%3C%2FSTRONG%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%E7%84%B6%E5%90%8E%EF%BC%8C%E4%BD%BF%E7%94%A8%3CEM%3Ebitbake%3C%2FEM%3E%E6%9E%84%E5%BB%BA%E9%95%9C%E5%83%8F%E5%B9%B6%E5%B0%86%E5%85%B6%E9%83%A8%E7%BD%B2%E5%88%B0SD%E5%8D%A1%E3%80%82%3C%2FP%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20bold%3B%22%3E%3CSTRONG%3E2.%20%E8%A7%86%E9%A2%91%E6%B5%8B%E8%AF%95%E6%BA%90%E7%A4%BA%E4%BE%8B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3CEM%3E%E6%9C%8D%E5%8A%A1%E5%99%A8%3C%2FEM%3E%3C%2FP%3E%3CPRE%20style%3D%22color%3A%20%23000000%3B%20background-color%3A%20%23f9f9f9%3B%20border%3A%201px%20dashed%20%232f6fab%3B%20font-size%3A%2012.7px%3B%20padding%3A%201em%3B%22%3E%24%20gst-variable-rtsp-server%20-p%209001%20-u%20%22videotestsrc%20!%20v4l2h264enc%20!%20rtph264pay%20name%3Dpay0%20pt%3D96%22%3CCODE%20translate%3D%22no%22%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3CEM%3E%E5%AE%A2%E6%88%B7%3C%2FEM%3E%3C%2FP%3E%3CPRE%20style%3D%22color%3A%20%23000000%3B%20background-color%3A%20%23f9f9f9%3B%20border%3A%201px%20dashed%20%232f6fab%3B%20font-size%3A%2012.7px%3B%20padding%3A%201em%3B%22%3E%3CCODE%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%20font-size%3A%2012.7px%3B%22%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20style%3D%22color%3A%20%233d3d3d%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3CSPAN%20style%3D%22border%3A%200px%3B%20font-weight%3A%20bold%3B%22%3E%3CSTRONG%3E2.%20%E8%A7%86%E9%A2%91%E6%B5%8B%E8%AF%95%E6%BA%90%E7%A4%BA%E4%BE%8B%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3CEM%3E%E6%9C%8D%E5%8A%A1%E5%99%A8%3C%2FEM%3E%3C%2FP%3E%3CPRE%20style%3D%22color%3A%20%23000000%3B%20background-color%3A%20%23f9f9f9%3B%20border%3A%201px%20dashed%20%232f6fab%3B%20font-size%3A%2012.7px%3B%20padding%3A%201em%3B%22%3E%24%20gst-variable-rtsp-server%20-p%209001%20-u%20%22v4l2src%20device%3D%2Fdev%2Fvideo0%20!%20video%2Fx-raw%2Cwidth%3D640%2Cheight%3D480%20!%20v4l2h264enc%20!%20rtph264pay%20name%3Dpay0%20pt%3D96%22%3CCODE%20translate%3D%22no%22%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20style%3D%22color%3A%20%2351626f%3B%20background-color%3A%20%23ffffff%3B%20border%3A%200px%3B%22%3E%3CEM%3E%E5%AE%A2%E6%88%B7%3C%2FEM%3E%3C%2FP%3E%3CPRE%20style%3D%22color%3A%20%23000000%3B%20background-color%3A%20%23f9f9f9%3B%20border%3A%201px%20dashed%20%232f6fab%3B%20font-size%3A%2012.7px%3B%20padding%3A%201em%3B%22%3E%3CCODE%20style%3D%22border%3A%200px%3B%20font-weight%3A%20inherit%3B%20font-size%3A%2012.7px%3B%22%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%20style%3D%22color%3A%20%233d3d3d%3B%22%3E%3C%2FP%3E%3CP%20style%3D%22color%3A%20%233d3d3d%3B%22%3E%E8%8B%A5%E8%A6%81%E4%BD%BF%E7%94%A8%20VLC%20%E6%88%96%E5%85%B6%E4%BB%96%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%E4%BD%9C%E4%B8%BA%3CEM%3E%E5%AE%A2%E6%88%B7%E7%AB%AF%3C%2FEM%3E%EF%BC%8C%E5%8F%AA%E9%9C%80%E8%BE%93%E5%85%A5%E5%A6%82%E4%B8%8B%E6%96%B9%E5%9B%BE%E7%89%87%E6%89%80%E7%A4%BA%E7%9A%84%20URL%EF%BC%9A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22vlc_rtsp_example.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22vlc_rtsp_example.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F108137i3067952120097F7A%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22vlc_rtsp_example.png%22%20alt%3D%22vlc_rtsp_example.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1121720%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX%208%20%E7%B3%BB%E5%88%97%20%7C%20i.MX%208QuadMax%20(8QM)%20%7C%208QuadPlus%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX%208M%20%7C%20i.MX%208M%20Mini%20%7C%20i.MX%208M%20Nano%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E5%A4%9A%E5%AA%92%E4%BD%93%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1940930%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%85%B3%E4%BA%8E%EF%BC%9Ai.MX%208%20-%20RTSP%20%E6%B5%81%E5%AA%92%E4%BD%93%E6%94%AF%E6%8C%81%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1940930%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CPRE%20translate%3D%22no%22%3EIMAGE_INSTALL_append%20%2B%3D%20%22%3CSPAN%3Egstreamer1.0-rtsp-server%20gst-variable-rtsp-server%3C%2FSPAN%3E%22%3C%2FPRE%3E%3CP%3E%E5%A6%82%E6%9E%9C%E6%88%91%E8%AF%B4%E9%94%99%E4%BA%86%E8%AF%B7%E7%BA%A0%E6%AD%A3%E6%88%91%EF%BC%8C%E8%BF%99%E9%87%8C%E5%8F%AF%E8%83%BD%E8%BF%98%E9%9C%80%E8%A6%81%E6%B7%BB%E5%8A%A0%20%3CSTRONG%3Egstreamer1.0-plugins-good%3C%2FSTRONG%3E%20%E5%92%8C%20%3CSTRONG%3Egstreamer1.0-plugins-bad%20%3C%2FSTRONG%3E%E6%8F%92%E4%BB%B6%E3%80%82%E5%9B%A0%E4%B8%BA%E4%BD%A0%E5%9C%A8%E7%A4%BA%E4%BE%8B%E4%B8%AD%E4%BD%BF%E7%94%A8%E4%BA%86%20%3CSTRONG%3Ev4l2h264enc%3C%2FSTRONG%3E%E3%80%82%3C%2FP%3E%3CP%3E%E5%9B%A0%E6%AD%A4%EF%BC%8C%E4%B8%8A%E8%BF%B0%E8%A1%8C%E5%BA%94%E6%9B%B4%E6%94%B9%E4%B8%BA%EF%BC%9A%3C%2FP%3E%3CPRE%20translate%3D%22no%22%3EIMAGE_INSTALL_append%20%2B%3D%20%22%3CSPAN%3Egstreamer1.0-rtsp-server%20gstreamer1.0-plugins-good%20gstreamer1.0-plugins-bad%20gst-variable-rtsp-server%3C%2FSPAN%3E%22%3C%2FPRE%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
无评分
版本历史
最后更新:
‎09-10-2020 02:52 AM