Use gscam to play MP4

asked 2018-03-21 13:26:24 -0500

Apollys gravatar image

My knowledge of gstreamer pipelines is pretty much nonexistent, I haven't been able to find many resources online, all I can do is copy and paste stuff that other people say works and see if it works for me. Below is what I have accomplished so far.

I have gstreamer working with a video file:

gst-launch-1.0 filesrc location=~/jellyfish.mp4 ! decodebin name=dec ! videoconvert ! autovideosink

I also have gscam working from my camera:

export GSCAM_CONFIG="nvcamerasrc ! video/x-raw(memory:NVMM),width=1280, height=720,format=I420, framerate=30/1 ! nvvidconv ! video/x-raw, format=BGRx ! videoconvert ! ffmpegcolorspace"

rosrun gscam gscam

However, I haven't been able to get gscam to play from the video file. I tried things like this example launch file for playing videos and setting up GSCAM_CONFIG manually:

export GSCAM_CONFIG="filesrc location=~/jellyfish.mp4 ! decodebin name=dec ! videoconvert ! ffmpegcolorspace"

All my attempts have lead to the same error (after some warnings about not being able to open the camera calibration file):

[FATAL] [1521656471.465735756]: Failed to PAUSE stream, check your gstreamer configuration.
[FATAL] [1521656471.465840749]: Failed to initialize gscam stream!

I have rebooted my machine a couple times to make sure it's not a problem with the resource in use (sometimes I got this error when the camera resource was locked), and I tried making a new video file and testing on that.

Does anyone have any suggestions?

edit retag flag offensive close merge delete