mpromonet / v4l2rtspserver

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

Multiple HLS streams does not work (returns 405 Method Not Supported) #208

Closed tachang closed 3 years ago

tachang commented 3 years ago

HLS Server works well with one stream using command /usr/bin/v4l2rtspserver -S2 /dev/video3 but when you try to do two streams it doesn't work. My guess is that it is just a question of where it is being served?

For example this works with RTSP but not HLS:

# /usr/bin/v4l2rtspserver -S2 /dev/video3 /dev/video4
log level:500

[NOTICE] main.cpp:385
    Version: 1 live555 version:2016.01.29
[NOTICE] main.cpp:426
    Create V4L2 Source.../dev/video3
[NOTICE] src/V4l2Device.cpp:133
    driver:v4l2 loopback capabilities:85008003 mandatory:4000001
[NOTICE] src/V4l2Device.cpp:135
    /dev/video3 support output
[NOTICE] src/V4l2Device.cpp:136
    /dev/video3 support capture
[NOTICE] src/V4l2Device.cpp:138
    /dev/video3 support read/write
[NOTICE] src/V4l2Device.cpp:139
    /dev/video3 support streaming
[NOTICE] src/V4l2Device.cpp:225
    /dev/video3:H264 size:1920x1080 bufferSize:8294400
[NOTICE] src/V4l2Device.cpp:246
    fps:1/25
[NOTICE] src/V4l2Device.cpp:247
    nbBuffer:2
[NOTICE] src/V4l2MmapDevice.cpp:49
    Device /dev/video3
[NOTICE] src/V4l2MmapDevice.cpp:73
    Device /dev/video3 nb buffer:2
[NOTICE] main.cpp:449
    Create Source .../dev/video3
[NOTICE] inc/V4l2RTSPServer.h:84
    Play this stream using the URL "rtsp://192.168.0.179:8554/video3/ts"
[NOTICE] main.cpp:527
    HLS       http://192.168.0.179:8554/video3/ts.m3u8
[NOTICE] main.cpp:528
    MPEG-DASH http://192.168.0.179:8554/video3/ts.mpd
[NOTICE] inc/V4l2RTSPServer.h:84
    Play this stream using the URL "rtsp://192.168.0.179:8554/video3/unicast"
[NOTICE] main.cpp:426
    Create V4L2 Source.../dev/video4
[NOTICE] src/V4l2Device.cpp:133
    driver:v4l2 loopback capabilities:85008003 mandatory:4000001
[NOTICE] src/V4l2Device.cpp:135
    /dev/video4 support output
[NOTICE] src/V4l2Device.cpp:136
    /dev/video4 support capture
[NOTICE] src/V4l2Device.cpp:138
    /dev/video4 support read/write
[NOTICE] src/V4l2Device.cpp:139
    /dev/video4 support streaming
[NOTICE] src/V4l2Device.cpp:225
    /dev/video4:H264 size:640x480 bufferSize:1228800
[NOTICE] src/V4l2Device.cpp:246
    fps:1/25
[NOTICE] src/V4l2Device.cpp:247
    nbBuffer:2
[NOTICE] src/V4l2MmapDevice.cpp:49
    Device /dev/video4
[NOTICE] src/V4l2MmapDevice.cpp:73
    Device /dev/video4 nb buffer:2
[NOTICE] src/DeviceSource.cpp:93
    begin thread
[NOTICE] main.cpp:449
    Create Source .../dev/video4
[NOTICE] inc/V4l2RTSPServer.h:84
    Play this stream using the URL "rtsp://192.168.0.179:8554/video4/ts"
[NOTICE] main.cpp:527
    HLS       http://192.168.0.179:8554/video4/ts.m3u8
[NOTICE] main.cpp:528
    MPEG-DASH http://192.168.0.179:8554/video4/ts.mpd
[NOTICE] inc/V4l2RTSPServer.h:84
    Play this stream using the URL "rtsp://192.168.0.179:8554/video4/unicast"
[NOTICE] src/DeviceSource.cpp:93
% curl -v http://192.168.0.179:8554/video4/ts.m3u8
*   Trying 192.168.0.179:8554...
* Connected to 192.168.0.179 (192.168.0.179) port 8554 (#0)
> GET /video4/ts.m3u8 HTTP/1.1
> Host: 192.168.0.179:8554
> User-Agent: curl/7.69.1
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 405 Method Not Allowed
< Date: Sun, Oct 11 2020 16:19:00 GMT
* no chunk, no close, no size. Assume close to signal end
< 

* Closing connection 0