v4l2onvif icon indicating copy to clipboard operation
v4l2onvif copied to clipboard

getting it working

Open GeniusOnline opened this issue 3 years ago • 3 comments

so since you updated the rtsp server the make worked. (thanks btw)

i now tried running /dev/video90 (v4l2loopback) the ip of the device according to onvifdm was 127.0.1.1 which is also pretty strange. adding -h doesn't say how to set the ip. pi down below :)

pi@raspberrypi:~ $ onvif-server.exe -i /dev/video90
Http:8080 rtsp:8554
Published URL:http://127.0.1.1:8080/onvif/device_service

[NOTICE] /home/pi/v4l2onvif/v4l2rtspserver/src/V4l2RTSPServer.cpp:37
        Create V4L2 Source.../dev/video90
[NOTICE] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:133
        driver:v4l2 loopback capabilities:85208003 mandatory:4000001
[NOTICE] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:135
        /dev/video90 support output
[NOTICE] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:136
        /dev/video90 support capture
[NOTICE] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:138
        /dev/video90 support read/write
[NOTICE] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:139
        /dev/video90 support streaming
[ERROR] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:207
        /dev/video90: Cannot set format:H264 Invalid argument
[ERROR] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:207
        /dev/video90: Cannot set format:MJPG Invalid argument
[ERROR] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:207
        /dev/video90: Cannot set format:JPEG Invalid argument
[ERROR] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:212
        /dev/video90: Cannot set pixelformat to: format is:YU12call soap_wsdd_Hello

[ERROR] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2Device.cpp:83
        Cannot init device:/dev/video90
[NOTICE] /home/pi/v4l2onvif/v4l2rtspserver/v4l2wrapper/src/V4l2MmapDevice.cpp:141
VIDIOC_STREAMOFF: Bad file descriptor
VIDIOC_REQBUFS: Bad file descriptor
        Device /dev/video90Fails to create Source for device:/dev/video90
wsdd_event_Hello        id=urn:uuid:f13bc114-60fa-447b-873e-7b22a2d2910a EndpointReference=urn:uuid:adade82b-242a-4a4b-b2ab-1e224430e0f9 Types="http://www.onvif.org/ver10/network/wsdl":NetworkVideoTransmitter Scopes=onvif://www.onvif.org/name/raspberrypi onvif://www.onvif.org/location/somewhere onvif://www.onvif.org/Profile/Streaming onvif://www.onvif.org/Profile/G onvif://www.onvif.org/Profile/S  XAddrs=http://127.0.1.1:8080/onvif/device_service
^C
pi@raspberrypi:~ $

GeniusOnline avatar Jan 08 '22 21:01 GeniusOnline

Hi,

The ip comes from gethostbyname(gethostname)), I guess your /etc/hosts contains "127.0.1.1 raspberrypi". From the log we see also that v4l2 device cannot be initialized, if the v4l2loopback doesnot have source, it will not work.

Best Regards, Michel.

mpromonet avatar Jan 09 '22 09:01 mpromonet

what do you mean with source? i am running a gstreamer script to it if that is what you mean.

GeniusOnline avatar Jan 09 '22 14:01 GeniusOnline

Hi,

I means that rtsp streamer need a supported format to work, it can capture H264, JPEG, H265, VP8, VP9 and maybe YUYV, but not YU12.

Best Regards, Michel.

mpromonet avatar Jan 09 '22 17:01 mpromonet