Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I get rstpscr connected to detect.py using Gstreamer #16

Closed
PushkarChatterji opened this issue Sep 24, 2019 · 1 comment
Closed

Comments

@PushkarChatterji
Copy link

PushkarChatterji commented Sep 24, 2019

Hi,

I am am able to connect to my wifi camera using the Gstreamer cli:

gst-launch-1.0 rtspsrc location=rtsp://admin:REDACTED@192.168.1.100/live/profile.0 ! decodebin ! autovideosink

This works just fine and is able to display the live feed from the wifi cam on the monitor connected to the Coral Dev Board via HDMI.

However, I am not able to figure out the equivalent pipeline that I should use in gstreamer.py to get detect.py to run off the wifi cam feed.

Any tips would be super helpful!

My setup:

I am using the Coral Dev Board with a monitor connected to it via HDMI and I am running commands in a 'mdt shell' terminal window on my host PC (Ubuntu 18.04) which is connected to the Coral Dev Board via USB-c.

@PushkarChatterji
Copy link
Author

Quick update:

I changed the code in gstreamer.py as under:

commented-out code is the original code

`def run_pipeline(user_function, src_size=(640,480), appsink_size=(320, 180)):
    PIPELINE = 'rtspsrc location=rtsp://admin:REDACTED@192.168.1.100/live/profile.0 ! decodebin ! {leaky_q} '
    #PIPELINE = 'v4l2src device=/dev/video1 ! {src_caps} ! {leaky_q} '
    if detectCoralDevBoard():
        #SRC_CAPS = 'video/x-raw,format=YUY2,width={width},height={height},framerate=30/1'
        SRC_CAPS = 'video/x-raw,width={width},height={height},framerate=30/1'
        PIPELINE += """ ! glupload ! tee name=t
            t. ! {leaky_q} ! glfilterbin filter=glcolorscale
               ! {dl_caps} ! videoconvert ! {sink_caps} ! {sink_element}
            t. ! {leaky_q} ! glfilterbin filter=glcolorscale
               ! rsvgoverlay name=overlay ! waylandsink
        """
  `

This seems to work for me.

I am hoping that with this we can use Gstreamer on the Coral Dev Board to connect to wifi cams as feed for inference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant