element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • More
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • More
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • More
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • More
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Single-Board Computers
  • Products
  • Dev Tools
  • Single-Board Computers
  • More
  • Cancel
Single-Board Computers
Forum Gstreamer and Maaxboard mini
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Single-Board Computers requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 3 replies
  • Answers 1 answer
  • Subscribers 27 subscribers
  • Views 550 views
  • Users 0 members are here
  • imx8
  • csi
  • h264
  • maaxboard_mini
Related

Gstreamer and Maaxboard mini

mmoreno-rfcode
mmoreno-rfcode over 1 year ago

Regarding the commands found in this document:

 

https://www.embeddedartists.com/wp-content/uploads/2018/04/Using_Cameras_on_iMX_Developers_Kit.pdf

 

I'm using the MaaXBoard_Mini-LinuxShipmentImage-Debian-V1.0.2r05.img on SD card.  When I list the device using v4l2-ctl, I get:

 

root@maaxboard-mini:~# v4l2-ctl --list-devices

i.MX6S_CSI (platform:32e20000.csi1_bridge):

        /dev/video0

 

I can use the snapshot.jpeg command as is and it produces a still image on the SD card.

 

root@maaxboard-mini:~# gst-launch-1.0 v4l2src device="/dev/video0" num-buffers=1 ! capsfilter caps="video/x-raw, width=640, height=480, framerate=30/1" ! videoconvert ! jpegenc ! filesink location=snapshot.jpeg

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

Got EOS from element "pipeline0".

Execution ended after 0:00:00.843193485

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

Setting pipeline to NULL ...

Freeing pipeline ...

 

However, when using the autovideosink command, I get a black window pop up on the wayland desktop (thru my DSI display):

 

root@maaxboard-mini:~# gst-launch-1.0 v4l2src device=/dev/video0 ! capsfilter caps="video/x-raw, width=640, height=480, framerate=30/1" ! queue ! autovideosink

Setting pipeline to PAUSED ...

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

 

and the command just hangs there with no images coming through on the black box window.

 

A couple of questions here:

 

1. Why is the v4l2 subsystem showing the CSI camera as "i.MX6S_CSI".  I would have expected it to say something about imx8.

2. Other than the QT based "Camera" application, is there an out of the box method for streaming and recording video from the Maaxboard-mini CSI interface?

3. Using the QT based Camera app, I can record video, but it is storing the file as a .yuv format.  Is this just a set of uncompressed images?  I need a method of hardware assisted h264 encoding.

 

Thanks,

Marco

  • Reply
  • Cancel
  • Cancel
Parents
  • jafoste4
    0 jafoste4 over 1 year ago

    Hi Marco,

     

    1. The naming convention was from a prior board based on i.mx6

     

    2. I followed up with my colleague on this, he said Gstreamer is supported. He pointed me to a Yocto User Guide in which we demonstrate the on the MaaXBoard Mini. I am working on getting it uploaed to the E14 website. In the mean time you can get it from here - https://avtinc.sharepoint.com/:b:/t/ET-Downloads/ERZJnKXWo_JApw-rPjvdUMUBYTAPxq60VNDzmNUxDEmilg?e=Avdv2c

    Check out section 3.7.4

     

    3.We reccomend using gstreamer and not the QT application for hardware h.264 video encoding.

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • mmoreno-rfcode
    0 mmoreno-rfcode over 1 year ago in reply to jafoste4

    Hi Joshua,

     

    Thanks for the doc, I can record to an mp4 file now and it plays correctly on the PC.  Ideally, I need to be live streaming.  I have gotten other sources to create a pipeline to the RTSP server example test-lauch (from gst-rtsp-server repo).  I'm having trouble getting streaming working for the v4l2src on the maaxboard-mini.  I have built the gst-build repo and am able to use the testvideosrc like:

     

    test-launch "( videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 )"

     

    which works fine and I can use VLC to stream the test pattern from the maaxboard-mini.

     

    So I was trying to adapt the pipeline from the doc:

     

    [gst-master] root@maaxboard-mini:~/GIT/gst-build# ./build2/subprojects/gst-rtsp-server/examples/test-launch "( v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,framerate=30/1,width=640,height=480 ! videoconvert ! x264enc ! rtph264pay name=pay0 pt=96 )"

    stream ready at rtsp://127.0.0.1:8554/test

    x264 [error]: baseline profile doesn't support 4:2:2

    0:00:18.601608323  9024 0xaaaaf5751850 ERROR             rtspclient rtsp-client.c:2021:handle_play_request: client 0xaaaaf58082b0: path /stream=0

    0:00:18.601692700  9024 0xaaaaf5751850 ERROR             rtspclient rtsp-client.c:2152:handle_play_request: client 0xaaaaf58082b0: media not found

    0:00:18.605116150  9024 0xaaaaf5751850 ERROR             rtspclient rtsp-client.c:1398:handle_teardown_request: client 0xaaaaf58082b0: path /stream=0

    0:00:18.605159401  9024 0xaaaaf5751850 ERROR             rtspclient rtsp-client.c:1475:handle_teardown_request: client 0xaaaaf58082b0: no media for uri

     

    I found this link with advice:

     

    GStreamer-devel - x264 [error]: baseline profile doesn't support 4:2:2

     

    But trying the colorspace conversion does not work, but gives no usable error message:

     

    [gst-master] root@maaxboard-mini:~/GIT/gst-build# ./build2/subprojects/gst-rtsp-server/examples/test-launch "( v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,framerate=30/1,width=640,height=480 ! videoconvert ! video/x-raw,format=I420 ! x264enc ! rtph264pay name=pay0 pt=96 )"

    stream ready at rtsp://127.0.0.1:8554/test

    0:00:16.448182644  9205 0xaaab0c356850 ERROR             rtspclient rtsp-client.c:2021:handle_play_request: client 0xaaab0c40d2b0: path /stream=0

    0:00:16.448294022  9205 0xaaab0c356850 ERROR             rtspclient rtsp-client.c:2152:handle_play_request: client 0xaaab0c40d2b0: media not found

    0:00:16.451593219  9205 0xaaab0c356850 ERROR             rtspclient rtsp-client.c:1398:handle_teardown_request: client 0xaaab0c40d2b0: path /stream=0

    0:00:16.451638720  9205 0xaaab0c356850 ERROR             rtspclient rtsp-client.c:1475:handle_teardown_request: client 0xaaab0c40d2b0: no media for uri

     

    And also trying the main profile did not work:

     

    [gst-master] root@maaxboard-mini:~/GIT/gst-build# ./build2/subprojects/gst-rtsp-server/examples/test-launch "( v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,framerate=30/1,width=640,height=480 ! videoconvert ! x264enc ! video/x-h264,profile=main ! rtph264pay name=pay0 pt=96 )"

    stream ready at rtsp://127.0.0.1:8554/test

    0:00:57.353750056  9309 0xaaaabb393850 ERROR             rtspclient rtsp-client.c:2021:handle_play_request: client 0xaaaabb44a2b0: path /stream=0

    0:00:57.353855184  9309 0xaaaabb393850 ERROR             rtspclient rtsp-client.c:2152:handle_play_request: client 0xaaaabb44a2b0: media not found

    0:00:57.357236008  9309 0xaaaabb393850 ERROR             rtspclient rtsp-client.c:1398:handle_teardown_request: client 0xaaaabb44a2b0: path /stream=0

    0:00:57.357280259  9309 0xaaaabb393850 ERROR             rtspclient rtsp-client.c:1475:handle_teardown_request: client 0xaaaabb44a2b0: no media for uri

     

    Can your team give any guidance for using the maaxboard-mini with the Gstreamer RTSP server?  I'm running up against a deadline which we need to demo very soon.

     

    Thanks,

    Marco

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
Reply
  • mmoreno-rfcode
    0 mmoreno-rfcode over 1 year ago in reply to jafoste4

    Hi Joshua,

     

    Thanks for the doc, I can record to an mp4 file now and it plays correctly on the PC.  Ideally, I need to be live streaming.  I have gotten other sources to create a pipeline to the RTSP server example test-lauch (from gst-rtsp-server repo).  I'm having trouble getting streaming working for the v4l2src on the maaxboard-mini.  I have built the gst-build repo and am able to use the testvideosrc like:

     

    test-launch "( videotestsrc ! x264enc ! rtph264pay name=pay0 pt=96 )"

     

    which works fine and I can use VLC to stream the test pattern from the maaxboard-mini.

     

    So I was trying to adapt the pipeline from the doc:

     

    [gst-master] root@maaxboard-mini:~/GIT/gst-build# ./build2/subprojects/gst-rtsp-server/examples/test-launch "( v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,framerate=30/1,width=640,height=480 ! videoconvert ! x264enc ! rtph264pay name=pay0 pt=96 )"

    stream ready at rtsp://127.0.0.1:8554/test

    x264 [error]: baseline profile doesn't support 4:2:2

    0:00:18.601608323  9024 0xaaaaf5751850 ERROR             rtspclient rtsp-client.c:2021:handle_play_request: client 0xaaaaf58082b0: path /stream=0

    0:00:18.601692700  9024 0xaaaaf5751850 ERROR             rtspclient rtsp-client.c:2152:handle_play_request: client 0xaaaaf58082b0: media not found

    0:00:18.605116150  9024 0xaaaaf5751850 ERROR             rtspclient rtsp-client.c:1398:handle_teardown_request: client 0xaaaaf58082b0: path /stream=0

    0:00:18.605159401  9024 0xaaaaf5751850 ERROR             rtspclient rtsp-client.c:1475:handle_teardown_request: client 0xaaaaf58082b0: no media for uri

     

    I found this link with advice:

     

    GStreamer-devel - x264 [error]: baseline profile doesn't support 4:2:2

     

    But trying the colorspace conversion does not work, but gives no usable error message:

     

    [gst-master] root@maaxboard-mini:~/GIT/gst-build# ./build2/subprojects/gst-rtsp-server/examples/test-launch "( v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,framerate=30/1,width=640,height=480 ! videoconvert ! video/x-raw,format=I420 ! x264enc ! rtph264pay name=pay0 pt=96 )"

    stream ready at rtsp://127.0.0.1:8554/test

    0:00:16.448182644  9205 0xaaab0c356850 ERROR             rtspclient rtsp-client.c:2021:handle_play_request: client 0xaaab0c40d2b0: path /stream=0

    0:00:16.448294022  9205 0xaaab0c356850 ERROR             rtspclient rtsp-client.c:2152:handle_play_request: client 0xaaab0c40d2b0: media not found

    0:00:16.451593219  9205 0xaaab0c356850 ERROR             rtspclient rtsp-client.c:1398:handle_teardown_request: client 0xaaab0c40d2b0: path /stream=0

    0:00:16.451638720  9205 0xaaab0c356850 ERROR             rtspclient rtsp-client.c:1475:handle_teardown_request: client 0xaaab0c40d2b0: no media for uri

     

    And also trying the main profile did not work:

     

    [gst-master] root@maaxboard-mini:~/GIT/gst-build# ./build2/subprojects/gst-rtsp-server/examples/test-launch "( v4l2src device=/dev/video0 ! video/x-raw,format=YUY2,framerate=30/1,width=640,height=480 ! videoconvert ! x264enc ! video/x-h264,profile=main ! rtph264pay name=pay0 pt=96 )"

    stream ready at rtsp://127.0.0.1:8554/test

    0:00:57.353750056  9309 0xaaaabb393850 ERROR             rtspclient rtsp-client.c:2021:handle_play_request: client 0xaaaabb44a2b0: path /stream=0

    0:00:57.353855184  9309 0xaaaabb393850 ERROR             rtspclient rtsp-client.c:2152:handle_play_request: client 0xaaaabb44a2b0: media not found

    0:00:57.357236008  9309 0xaaaabb393850 ERROR             rtspclient rtsp-client.c:1398:handle_teardown_request: client 0xaaaabb44a2b0: path /stream=0

    0:00:57.357280259  9309 0xaaaabb393850 ERROR             rtspclient rtsp-client.c:1475:handle_teardown_request: client 0xaaaabb44a2b0: no media for uri

     

    Can your team give any guidance for using the maaxboard-mini with the Gstreamer RTSP server?  I'm running up against a deadline which we need to demo very soon.

     

    Thanks,

    Marco

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
Children
No Data
Element14

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2022 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube