无法更改gstreamer中的输出格式 [英] cannot change output format in gstreamer

查看:352
本文介绍了无法更改gstreamer中的输出格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的相机支持每秒30和25帧的1080和720p视频.我可以在ARM板上使用以下gstreamer命令使网络摄像头流式传输

I am using a camera which supports 1080 and 720p videos at both 30 and 25 frames per second. I can get the webcam to stream with the following gstreamer command on my ARM board

gst-launch-1.0 -v v4l2src device=/dev/video0 ! "video/x-raw, width=1920, 
height=1080, format=(string)YUY2, framerate=30/1" ! xvimagesink sync=false -e 

但是,我发现我无法更改任何这些参数.例如,如果将framerate更改为25/1,则会收到错误:

However, I find that I cannot change any of these parameters. For example, if I change the framerate to 25/1, I get the error:

error: streaming task paused, reason not-negotiated (-4)

我想知道这可能是硬件问题,还是我使用gstreamer的方式不正确,并且有更好的方法可以做到这一点.

I wonder if this may be a hardware issue or am I using gstreamer incorrectly and there might be a better way to do this.

推荐答案

要了解详细信息,您可以查看调试日志,GST_DEBUG = 3,v4l *:6应该为您提供了一些信息.

To know details you can look at the debug logs, GST_DEBUG=3,v4l*:6 should give you quite some information.

但总而言之,问题在于您的相机驱动程序不希望为GStreamer提供带有这些上限的内容,例如25fps,而不是30fps.如果您更改了其他内容,则接收器可能不接受这些上限也可能是一个问题,您可能需要在xvimagesink前面放置一个视频转换和视频缩放比例,以防止这种情况发生.

But in summary, the problem is that your camera driver does not want to provide GStreamer something with those caps and e.g. 25fps instead of 30fps. If you change other things, it might also be a problem with the sink not accepting those caps btw, you might want to put a videoconvert and videoscale in front of xvimagesink to prevent that.

这篇关于无法更改gstreamer中的输出格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆