mpromonet / v4l2rtspserver

RTSP Server for V4L2 device capture supporting HEVC/H264/JPEG/VP8/VP9
The Unlicense
1.82k stars 423 forks source link

v4l2 un support raw video format #262

Closed dcboy closed 2 years ago

dcboy commented 2 years ago

Describe the bug

rk3288:/data/local/tmp # ./v4l2rtspserver /dev/video0
log level:500

[NOTICE] /Users/dcboy/D/github/v4l2rtspserver/main.cpp:294
    Version: 0.2.4-8-g79a13bd-dirty live555 version:2021.12.18
[NOTICE] /Users/dcboy/D/github/v4l2rtspserver/src/V4l2RTSPServer.cpp:37
    Create V4L2 Source.../dev/video0
[NOTICE] /Users/dcboy/D/github/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:133
    driver:uvcvideo capabilities:84200001 mandatory:4000001
[NOTICE] /Users/dcboy/D/github/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:136
    /dev/video0 support capture
[NOTICE] /Users/dcboy/D/github/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:139
    /dev/video0 support streaming
[ERROR] /Users/dcboy/D/github/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:212
    /dev/video0: Cannot set pixelformat to:H264 format is:YUYV
[ERROR] /Users/dcboy/D/github/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:212
    /dev/video0: Cannot set pixelformat to:MJPG format is:YUYV
[ERROR] /Users/dcboy/D/github/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:212
    /dev/video0: Cannot set pixelformat to:JPEG format is:YUYV
[ERROR] /Users/dcboy/D/github/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:83
    Cannot init device:/dev/video0
[NOTICE] /Users/dcboy/D/github/v4l2rtspserver/v4l2wrapper/src/V4l2MmapDevice.cpp:141
VIDIOC_STREAMOFF: Bad file descriptor
VIDIOC_REQBUFS: Bad file descriptor

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

mpromonet commented 2 years ago

Hi,

You may try '-fYUYV'

Best Regards, Michel

dcboy commented 2 years ago

Thx that ok, that h264 encoder is using hardware?

mpromonet commented 2 years ago

Hi,

This program does not encode, it streams over RTSP v4L2 capture frames with supported format (H264, H265, VP8, VP9, JPEG, YUYV is a quick try).

Best Regards, Michel.