linux - Gstreamer-无法枚举视频格式和设备错误的 ioctl 不适当

标签 linux gstreamer ioctl v4l2 gumstix

我需要使用 gstreamer 流式传输视频。正确给出 media-ctl 命令后当我给出此命令 LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so mplayer tv://-tv driver=v4l2:device=/dev/video6 -vo png -fps 1 时,它成功捕获帧,但只是 Gstreamer 出现问题。

Gstreamer 管道:

root@overo:~# LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so gst-launch-0.10 -v v4l2src device=/dev/video6 queue-size=8 ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=720,height=480 ! ffmpegcolorspace ! tcpserversink host=192.168.1.104 port=5000
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to enumerate possible video formats device '/dev/video6' can work with
Additional debug info:
/home/siguser/yocto-28-11/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/gst-plugins-good/0.10.31-r8/gst-plugins-good-0.10.31/sys/v4l2/gstv4l2object.c(1122): gst_v4l2_object_fill_format_list (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Failed to get number 0 in pixelformat enumeration for /dev/video6. (25 - Inappropriate ioctl for device)
Setting pipeline to NULL ...
Freeing pipeline ...

更改分辨率后,我得到同样的错误:

root@overo:~# LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so gst-launch-0.10 v4l2src --gst-debug=0 device=/dev/video6 ! video/x-raw-yuv,width=640,height=480,framerate=\(fraction\)2/1 ! ffmpegcolorspace ! smokeenc keyframe=8 qmax=40 ! udpsink host=192.168.1.104 port=5000
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to enumerate possible video formats device '/dev/video6' can work with
Additional debug info:
/home/siguser/yocto-28-11/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/gst-plugins-good/0.10.31-r8/gst-plugins-good-0.10.31/sys/v4l2/gstv4l2object.c(1122): gst_v4l2_object_fill_format_list (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Failed to get number 0 in pixelformat enumeration for /dev/video6. (25 - Inappropriate ioctl for device)
Setting pipeline to NULL ...
Freeing pipeline ...

root@overo:~# LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so v4l2-ctl -d 6 --list-formats

ioctl: VIDIOC_ENUM_FMT
Index       : 0
Type        : Video Capture
Pixel Format: 'RGB3' (emulated)
Name        : RGB3

Index       : 1
Type        : Video Capture
Pixel Format: 'BGR3' (emulated)
Name        : BGR3

Index       : 2
Type        : Video Capture
Pixel Format: 'YU12' (emulated)
Name        : YU12

Index       : 3
Type        : Video Capture
Pixel Format: 'YV12' (emulated)
Name        : YV12

我正在尝试让 caspa 相机在 3.5.7 Linux 内核上与 yocto 1.4.2 (dylan) 一起工作。

最佳答案

如果您还 LD_PRELOAD gst 的兼容库会怎样?

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so gst-launch-0.10 v4l2src ...

还可以考虑使用 gstreamer-1.0。

关于linux - Gstreamer-无法枚举视频格式和设备错误的 ioctl 不适当,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20693155/

相关文章:

linux - OpenSuse 上的 Subversion

c++ - 如何将 gst-rtsp-server 与自己的管道一起使用?

linux - 识别c中的虚拟网络接口(interface)

c - 如何以零纳秒实现每秒的计时器释放?

java - 如何使用java、Linux检查是否安装了特定软件

linux - cron 作业用于在 linux 中运行 hadoop 程序

linux - 在来自两个不同进程的相同文件描述符上调用 ioctl

ffmpeg - 使用 FFMPEG 更改容器会产生 NAL 单元错误

c++ - 如何从 qml webgl 获取麦克风到 c++?

python - 在 Ubuntu VM 上创建 TUN 设备似乎不起作用