pikvm / ustreamer

µStreamer - Lightweight and fast MJPEG-HTTP streamer
https://pikvm.org
GNU General Public License v3.0
1.73k stars 238 forks source link

Adding h264 sink causing issues (hanging on exit, no signal on regular stream) #154

Closed cp2004 closed 8 months ago

cp2004 commented 2 years ago

Thanks for creating ustreamer! It is working very well for me to stream regular mjpg video to OctoPrint at the moment.

I'm trying to setup webrtc streaming for the efficient bandwidth usage that comes with it, but hitting a few issues. I've tried to follow the new h264 guide and everything is built and setup correctly.

When I run this command:

./ustreamer -m MJPEG -d /dev/video0 

Everything is absolutely beautiful and I can access the stream for mjpg perfectly. Way better than mjpg-streamer works, it was very easy to install as well.

When trying to add the h264 sink options as described:

./ustreamer -m MJPEG -d /dev/video0 --h264-sink=demo::ustreamer::h264 --h264-sink-mode=660

Results in some errors:

-- INFO  [33623.629      main] -- Using internal blank placeholder
-- INFO  [33623.629      main] -- Using H264-sink: demo::ustreamer::h264
-- INFO  [33623.630      main] -- Listening HTTP on [127.0.0.1]:8080
-- INFO  [33623.631    stream] -- Using V4L2 device: /dev/video0
-- INFO  [33623.631    stream] -- Using desired FPS: 0
-- INFO  [33623.631      http] -- Starting HTTP eventloop ...
-- INFO  [33623.631    stream] -- H264: Initializing encoder ...
-- INFO  [33623.659    stream] -- H264: Configuring encoder: DMA=0 ...
================================================================================
-- INFO  [33624.372    stream] -- Device fd=10 opened
-- INFO  [33624.372    stream] -- Using input channel: 0
-- INFO  [33624.395    stream] -- Using resolution: 640x480
-- INFO  [33624.396    stream] -- Using format: MJPEG
-- INFO  [33624.419    stream] -- Using HW FPS: 0 -> 30 (coerced)
-- ERROR [33624.419    stream] -- Device doesn't support setting of HW encoding quality parameters
-- INFO  [33624.419    stream] -- Using IO method: MMAP
-- INFO  [33624.423    stream] -- Requested 5 device buffers, got 5
-- INFO  [33624.437    stream] -- Capturing started
-- INFO  [33624.437    stream] -- Switching to HW encoder: the input is (M)JPEG ...
-- INFO  [33624.437    stream] -- Using JPEG quality: encoder default
-- INFO  [33624.437    stream] -- Creating pool JPEG with 1 workers ...
-- INFO  [33624.438    stream] -- Capturing ...
-- ERROR [33625.439    stream] -- Mainloop select() error: Inappropriate ioctl for device
-- INFO  [33625.439    stream] -- Destroying workers pool JPEG ...
-- INFO  [33625.442    stream] -- Capturing stopped
-- INFO  [33625.444    stream] -- Device fd=10 closed
================================================================================
-- INFO  [33625.477    stream] -- Device fd=10 opened
-- INFO  [33625.477    stream] -- Using input channel: 0
-- INFO  [33626.239    stream] -- Using resolution: 640x480
-- INFO  [33626.240    stream] -- Using format: MJPEG
-- INFO  [33626.271    stream] -- Using HW FPS: 0 -> 30 (coerced)
-- ERROR [33626.271    stream] -- Device doesn't support setting of HW encoding quality parameters
-- INFO  [33626.271    stream] -- Using IO method: MMAP
-- INFO  [33626.275    stream] -- Requested 5 device buffers, got 5
-- INFO  [33626.288    stream] -- Capturing started
-- INFO  [33626.288    stream] -- Switching to HW encoder: the input is (M)JPEG ...
-- INFO  [33626.288    stream] -- Using JPEG quality: encoder default
-- INFO  [33626.288    stream] -- Creating pool JPEG with 1 workers ...
-- INFO  [33626.288    stream] -- Capturing ...
-- ERROR [33626.849    stream] -- Can't decompress JPEG: Huffman table 0x00 was not defined

[..... many more ......]

-- ERROR [33630.897    stream] -- Can't decompress JPEG: Huffman table 0x00 was not defined
^C-- INFO  [33630.954      main] -- ===== Stopping by SIGINT =====
-- INFO  [33630.954      http] -- HTTP eventloop stopped
-- ERROR [33630.961    stream] -- Can't decompress JPEG: Huffman table 0x00 was not defined
-- INFO  [33630.961    stream] -- Destroying workers pool JPEG ...
-- INFO  [33630.964    stream] -- Capturing stopped
-- INFO  [33630.966    stream] -- Device fd=10 closed
-- INFO  [33630.966    stream] -- H264: Destroying encoder ...
-- INFO  [33630.971      main] -- Bye-bye

Despite the errors about 'Can't decompress JPEG', it does exit cleanly when I ask it to. I can also successfully still see the mjpg stream under /stream in this situation. So it seems like this is possibly closest to working?

The errors with `--debug` options enabled ``` - DEBUG [36288.286 stream] -- Waiting for worker ... -- VERB [36288.286 jw-0] -- Compressed new JPEG: size=9841, time=0.000, worker=jw-0, buffer=0 -- DEBUG [36288.286 jw-0] -- Worker jw-0 waiting for a new job ... -- DEBUG [36288.286 stream] -- Releasing device buffer=0 ... -- DEBUG [36288.286 stream] -- Exposed ALIVE video frame -- PERF [36288.286 stream] -- ##### Encoded frame exposed; worker=jw-0 -- DEBUG [36288.286 stream] -- Calling select() on video device ... -- DEBUG [36288.295 http] -- HTTP: Updating exposed frame (online=1) ... -- VERB [36288.295 http] -- HTTP: Exposed frame: online=1, exp_time=0.000000 -- DEBUG [36288.347 stream] -- Device select() --> 1 -- DEBUG [36288.347 stream] -- Frame is ready -- DEBUG [36288.347 stream] -- Grabbing device buffer ... -- DEBUG [36288.347 stream] -- Grabbed new frame: buffer=1, bytesused=9466 -- VERB [36288.347 stream] -- Correcting pool's JPEG approx_job_time: 0.000 -> 0.000 (last_job_time=0.002) -- VERB [36288.347 stream] -- Fluency: delay=0.000, grab_after=36288.347 -- DEBUG [36288.347 stream] -- Assigned new frame in buffer=1 to worker=jw-0 -- DEBUG [36288.347 stream] -- H264: Input frame is JPEG; decoding ... -- VERB [36288.348 jw-0] -- Compressing JPEG using HW (just copying): worker=jw-0, buffer=1 -- VERB [36288.348 jw-0] -- Compressed new JPEG: size=9886, time=0.000, worker=jw-0, buffer=1 -- DEBUG [36288.348 jw-0] -- Worker jw-0 waiting for a new job ... -- ERROR [36288.348 stream] -- Can't decompress JPEG: Huffman table 0x00 was not defined -------------------------------------------------------------------------------- ```

I tried removing the format MJPEG option - previously ustreamer would default to YUVY, but my camera supports mjpg directly so this uses way less CPU for regular mjpg streaming. But this did not work either:

pi@octopi:~/webrtc/ustreamer $ ./ustreamer -d /dev/video0 --h264-sink=demo::ustreamer::h264 --h264-sink-mode=660
-- INFO  [33637.178      main] -- Using internal blank placeholder
-- INFO  [33637.179      main] -- Using H264-sink: demo::ustreamer::h264
-- INFO  [33637.180      main] -- Listening HTTP on [127.0.0.1]:8080
-- INFO  [33637.180    stream] -- Using V4L2 device: /dev/video0
-- INFO  [33637.180    stream] -- Using desired FPS: 0
-- INFO  [33637.180      http] -- Starting HTTP eventloop ...
-- INFO  [33637.180    stream] -- H264: Initializing encoder ...
-- INFO  [33637.209    stream] -- H264: Configuring encoder: DMA=0 ...
================================================================================
-- INFO  [33637.922    stream] -- Device fd=10 opened
-- INFO  [33637.923    stream] -- Using input channel: 0
-- INFO  [33637.948    stream] -- Using resolution: 640x480
-- INFO  [33637.948    stream] -- Using format: YUYV
-- INFO  [33637.972    stream] -- Using HW FPS: 0 -> 30 (coerced)
-- INFO  [33637.972    stream] -- Using IO method: MMAP
-- INFO  [33637.979    stream] -- Requested 5 device buffers, got 5
-- INFO  [33637.996    stream] -- Capturing started
-- INFO  [33637.996    stream] -- Using JPEG quality: 80%
-- INFO  [33637.996    stream] -- Creating pool JPEG with 4 workers ...
-- INFO  [33637.997    stream] -- Capturing ...
-- ERROR [33638.999    stream] -- Mainloop select() error: Success
-- INFO  [33638.999    stream] -- Destroying workers pool JPEG ...
-- INFO  [33639.002    stream] -- Capturing stopped
-- INFO  [33639.006    stream] -- Device fd=10 closed
================================================================================
-- INFO  [33639.037    stream] -- Device fd=10 opened
-- INFO  [33639.037    stream] -- Using input channel: 0
-- INFO  [33639.602    stream] -- Using resolution: 640x480
-- INFO  [33639.602    stream] -- Using format: YUYV
-- INFO  [33639.626    stream] -- Using HW FPS: 0 -> 30 (coerced)
-- INFO  [33639.626    stream] -- Using IO method: MMAP
-- INFO  [33639.633    stream] -- Requested 5 device buffers, got 5
-- INFO  [33639.650    stream] -- Capturing started
-- INFO  [33639.650    stream] -- Using JPEG quality: 80%
-- INFO  [33639.650    stream] -- Creating pool JPEG with 4 workers ...
-- INFO  [33639.651    stream] -- Capturing ...
-- INFO  [33640.007    stream] -- H264: Configuring encoder: DMA=1 ...
-- INFO  [33643.110      http] -- HTTP: Registered client: [::ffff:192.168.1.215]:59102, id=c35d5509d26e0379; clients now: 1
^C-- INFO  [33646.250      main] -- ===== Stopping by SIGINT =====
-- INFO  [33646.250      http] -- HTTP eventloop stopped

And it hangs here, it will not exit cleanly here. When I access /stream, I just get the blank 'NO SIGNAL' image. Trying to use Janus, it doesn't seem to think that anything has been received. I have to kill the process with kill -9 PID to be able to use the camera again.

In case it is helpful, I ran the same with --debug

`./ustreamer -d /dev/video0 --h264-sink=demo::ustreamer::h264 --h264-sink-mode=660 --debug` ``` -- INFO [34436.909 main] -- Using internal blank placeholder -- INFO [34436.909 main] -- Using H264-sink: demo::ustreamer::h264 -- DEBUG [34436.910 main] -- Installing SIGINT handler ... -- DEBUG [34436.910 main] -- Installing SIGTERM handler ... -- DEBUG [34436.910 main] -- Ignoring SIGPIPE ... -- DEBUG [34436.910 main] -- Binding HTTP to [127.0.0.1]:8080 ... -- INFO [34436.911 main] -- Listening HTTP on [127.0.0.1]:8080 -- INFO [34436.911 stream] -- Using V4L2 device: /dev/video0 -- INFO [34436.912 stream] -- Using desired FPS: 0 -- INFO [34436.912 http] -- Starting HTTP eventloop ... -- INFO [34436.912 stream] -- H264: Initializing encoder ... -- DEBUG [34436.912 stream] -- _stream_init_loop: stream->run->stop=0 -- DEBUG [34436.912 stream] -- H264: Input frame is JPEG; decoding ... -- DEBUG [34436.928 http] -- HTTP: Updating exposed frame (online=0) ... -- VERB [34436.928 http] -- HTTP: Exposed frame: online=0, exp_time=0.000000 -- VERB [34436.940 stream] -- H264: JPEG decoded; time=0.028 -- INFO [34436.941 stream] -- H264: Configuring encoder: DMA=0 ... -- DEBUG [34436.941 stream] -- H264: Encoder state: ~~~ NOT READY ~~~ -- DEBUG [34436.941 stream] -- H264: Encoder device fd=9 opened -- DEBUG [34436.941 stream] -- H264: Configuring option BITRATE ... -- DEBUG [34436.941 stream] -- H264: Configuring option H264_I_PERIOD ... -- DEBUG [34436.941 stream] -- H264: Configuring option H264_PROFILE ... -- DEBUG [34436.941 stream] -- H264: Configuring option H264_LEVEL ... -- DEBUG [34436.941 stream] -- H264: Configuring option REPEAT_SEQ_HEADER ... -- DEBUG [34436.941 stream] -- H264: Configuring option H264_MIN_QP ... -- DEBUG [34436.941 stream] -- H264: Configuring option H264_MAX_QP ... -- DEBUG [34436.941 stream] -- H264: Configuring INPUT format ... -- DEBUG [34436.941 stream] -- H264: Configuring OUTPUT format ... -- DEBUG [34436.942 stream] -- H264: Configuring INPUT FPS ... -- DEBUG [34436.942 stream] -- H264: Initializing INPUT buffers ... -- DEBUG [34436.942 stream] -- H264: Requesting 1 INPUT buffers ... -- DEBUG [34436.948 stream] -- H264: Got 1 INPUT buffers -- DEBUG [34436.948 stream] -- H264: Querying INPUT buffer=0 ... -- DEBUG [34436.948 stream] -- H264: Mapping INPUT buffer=0 ... -- DEBUG [34436.948 stream] -- H264: Queuing INPUT buffer=0 ... -- DEBUG [34436.948 stream] -- H264: Initializing OUTPUT buffers ... -- DEBUG [34436.948 stream] -- H264: Requesting 1 OUTPUT buffers ... -- DEBUG [34436.949 stream] -- H264: Got 1 OUTPUT buffers -- DEBUG [34436.949 stream] -- H264: Querying OUTPUT buffer=0 ... -- DEBUG [34436.949 stream] -- H264: Mapping OUTPUT buffer=0 ... -- DEBUG [34436.949 stream] -- H264: Queuing OUTPUT buffer=0 ... -- DEBUG [34436.949 stream] -- H264: Starting INPUT ... -- DEBUG [34436.955 stream] -- H264: Starting OUTPUT ... -- DEBUG [34436.956 stream] -- H264: Encoder state: *** READY *** -- DEBUG [34436.956 stream] -- H264: Compressing new frame; force_key=1 ... -- DEBUG [34436.956 stream] -- H264: Forcing keyframe ... -- DEBUG [34436.957 stream] -- H264: Grabbing INPUT buffer ... -- DEBUG [34436.957 stream] -- H264: Grabbed INPUT buffer=0 -- DEBUG [34436.960 stream] -- H264: Sending (releasing) INPUT buffer ... -- DEBUG [34436.960 stream] -- H264: Polling encoder ... -- DEBUG [34436.962 stream] -- H264: Fetching OUTPUT buffer ... -- DEBUG [34436.962 stream] -- H264: Need to retry OUTPUT buffer due timestamp mismatch -- DEBUG [34436.962 stream] -- H264: Releasing OUTPUT buffer=0 ... -- DEBUG [34436.962 stream] -- H264: Polling encoder ... -- DEBUG [34436.966 stream] -- H264: Fetching OUTPUT buffer ... -- DEBUG [34436.966 stream] -- H264: Releasing OUTPUT buffer=0 ... -- VERB [34436.967 stream] -- H264: Compressed new frame: size=6169, time=0.026, force_key=1 -- VERB [34436.967 stream] -- H264-sink: >>>>> Exposing new frame ... -- VERB [34436.967 stream] -- H264-sink: Exposed new frame; full exposition time = 0.000 ================================================================================ -- INFO [34437.650 stream] -- Device fd=10 opened -- DEBUG [34437.650 stream] -- Querying device capabilities ... -- INFO [34437.650 stream] -- Using input channel: 0 -- DEBUG [34437.650 stream] -- Using TV standard: DEFAULT -- DEBUG [34437.650 stream] -- Probing device format=YUYV, stride=1280, resolution=640x480 ... -- INFO [34437.675 stream] -- Using resolution: 640x480 -- INFO [34437.675 stream] -- Using format: YUYV -- DEBUG [34437.675 stream] -- Querying HW FPS ... -- INFO [34437.699 stream] -- Using HW FPS: 0 -> 30 (coerced) -- INFO [34437.699 stream] -- Using IO method: MMAP -- DEBUG [34437.699 stream] -- Requesting 5 device buffers for MMAP ... -- INFO [34437.706 stream] -- Requested 5 device buffers, got 5 -- DEBUG [34437.706 stream] -- Allocating device buffers ... -- DEBUG [34437.706 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=0 ... -- DEBUG [34437.706 stream] -- Mapping device buffer=0 ... -- DEBUG [34437.707 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=1 ... -- DEBUG [34437.707 stream] -- Mapping device buffer=1 ... -- DEBUG [34437.708 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=2 ... -- DEBUG [34437.708 stream] -- Mapping device buffer=2 ... -- DEBUG [34437.709 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=3 ... -- DEBUG [34437.709 stream] -- Mapping device buffer=3 ... -- DEBUG [34437.710 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=4 ... -- DEBUG [34437.710 stream] -- Mapping device buffer=4 ... -- DEBUG [34437.711 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=0 ... -- DEBUG [34437.711 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=1 ... -- DEBUG [34437.711 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=2 ... -- DEBUG [34437.711 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=3 ... -- DEBUG [34437.711 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=4 ... -- DEBUG [34437.711 stream] -- Device fd=10 initialized -- DEBUG [34437.711 stream] -- Exporting device buffer=0 to DMA ... -- DEBUG [34437.711 stream] -- Exporting device buffer=1 to DMA ... -- DEBUG [34437.712 stream] -- Exporting device buffer=2 to DMA ... -- DEBUG [34437.712 stream] -- Exporting device buffer=3 to DMA ... -- DEBUG [34437.712 stream] -- Exporting device buffer=4 to DMA ... -- DEBUG [34437.712 stream] -- Starting device capturing ... -- INFO [34437.723 stream] -- Capturing started -- INFO [34437.723 stream] -- Using JPEG quality: 80% -- INFO [34437.723 stream] -- Creating pool JPEG with 4 workers ... -- DEBUG [34437.723 jw-0] -- Hello! I am a worker jw-0 ^_^ -- DEBUG [34437.723 jw-0] -- Worker jw-0 waiting for a new job ... -- DEBUG [34437.724 jw-1] -- Hello! I am a worker jw-1 ^_^ -- DEBUG [34437.724 jw-1] -- Worker jw-1 waiting for a new job ... -- INFO [34437.724 stream] -- Capturing ... -------------------------------------------------------------------------------- -- DEBUG [34437.726 stream] -- Waiting for worker ... -- DEBUG [34437.726 stream] -- Calling select() on video device ... -- DEBUG [34437.726 jw-2] -- Hello! I am a worker jw-2 ^_^ -- DEBUG [34437.726 jw-2] -- Worker jw-2 waiting for a new job ... -- DEBUG [34437.726 jw-3] -- Hello! I am a worker jw-3 ^_^ -- DEBUG [34437.726 jw-3] -- Worker jw-3 waiting for a new job ... -- DEBUG [34437.938 http] -- HTTP: Repeating exposed ... -- DEBUG [34438.727 stream] -- Device select() --> 0 -- ERROR [34438.727 stream] -- Mainloop select() error: Success -- INFO [34438.727 stream] -- Destroying workers pool JPEG ... -- DEBUG [34438.727 jw-0] -- Bye-bye (worker jw-0) -- DEBUG [34438.727 jw-1] -- Bye-bye (worker jw-1) -- DEBUG [34438.728 jw-2] -- Bye-bye (worker jw-2) -- DEBUG [34438.728 jw-3] -- Bye-bye (worker jw-3) -- DEBUG [34438.728 stream] -- Stopping device capturing ... -- INFO [34438.731 stream] -- Capturing stopped -- DEBUG [34438.731 stream] -- Releasing device buffers ... -- DEBUG [34438.732 stream] -- Closing device ... -- INFO [34438.734 stream] -- Device fd=10 closed -- DEBUG [34438.734 stream] -- _stream_init_loop: stream->run->stop=0 -- DEBUG [34438.734 stream] -- H264: Input frame is JPEG; decoding ... -- DEBUG [34438.737 http] -- HTTP: Updating exposed frame (online=0) ... -- VERB [34438.737 http] -- HTTP: Exposed frame: online=0, exp_time=0.000000 -- VERB [34438.757 stream] -- H264: JPEG decoded; time=0.023 -- DEBUG [34438.757 stream] -- H264: Compressing new frame; force_key=0 ... -- DEBUG [34438.757 stream] -- H264: Grabbing INPUT buffer ... -- DEBUG [34438.757 stream] -- H264: Grabbed INPUT buffer=0 -- DEBUG [34438.758 stream] -- H264: Sending (releasing) INPUT buffer ... -- DEBUG [34438.758 stream] -- H264: Polling encoder ... -- DEBUG [34438.763 stream] -- H264: Fetching OUTPUT buffer ... -- DEBUG [34438.764 stream] -- H264: Releasing OUTPUT buffer=0 ... -- VERB [34438.764 stream] -- H264: Compressed new frame: size=307, time=0.007, force_key=0 -- VERB [34438.764 stream] -- H264-sink: >>>>> Exposing new frame ... -- VERB [34438.764 stream] -- H264-sink: Exposed new frame; full exposition time = 0.000 ================================================================================ -- INFO [34438.766 stream] -- Device fd=10 opened -- DEBUG [34438.766 stream] -- Querying device capabilities ... -- INFO [34438.766 stream] -- Using input channel: 0 -- DEBUG [34438.766 stream] -- Using TV standard: DEFAULT -- DEBUG [34438.766 stream] -- Probing device format=YUYV, stride=1280, resolution=640x480 ... -- INFO [34439.323 stream] -- Using resolution: 640x480 -- INFO [34439.323 stream] -- Using format: YUYV -- DEBUG [34439.324 stream] -- Querying HW FPS ... -- INFO [34439.355 stream] -- Using HW FPS: 0 -> 30 (coerced) -- INFO [34439.355 stream] -- Using IO method: MMAP -- DEBUG [34439.355 stream] -- Requesting 5 device buffers for MMAP ... -- INFO [34439.362 stream] -- Requested 5 device buffers, got 5 -- DEBUG [34439.362 stream] -- Allocating device buffers ... -- DEBUG [34439.362 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=0 ... -- DEBUG [34439.363 stream] -- Mapping device buffer=0 ... -- DEBUG [34439.363 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=1 ... -- DEBUG [34439.364 stream] -- Mapping device buffer=1 ... -- DEBUG [34439.364 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=2 ... -- DEBUG [34439.365 stream] -- Mapping device buffer=2 ... -- DEBUG [34439.365 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=3 ... -- DEBUG [34439.366 stream] -- Mapping device buffer=3 ... -- DEBUG [34439.366 stream] -- Calling ioctl(VIDIOC_QUERYBUF) for device buffer=4 ... -- DEBUG [34439.366 stream] -- Mapping device buffer=4 ... -- DEBUG [34439.367 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=0 ... -- DEBUG [34439.367 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=1 ... -- DEBUG [34439.368 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=2 ... -- DEBUG [34439.368 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=3 ... -- DEBUG [34439.368 stream] -- Calling ioctl(VIDIOC_QBUF) for buffer=4 ... -- DEBUG [34439.368 stream] -- Device fd=10 initialized -- DEBUG [34439.368 stream] -- Exporting device buffer=0 to DMA ... -- DEBUG [34439.368 stream] -- Exporting device buffer=1 to DMA ... -- DEBUG [34439.368 stream] -- Exporting device buffer=2 to DMA ... -- DEBUG [34439.368 stream] -- Exporting device buffer=3 to DMA ... -- DEBUG [34439.368 stream] -- Exporting device buffer=4 to DMA ... -- DEBUG [34439.368 stream] -- Starting device capturing ... -- INFO [34439.379 stream] -- Capturing started -- INFO [34439.379 stream] -- Using JPEG quality: 80% -- INFO [34439.379 stream] -- Creating pool JPEG with 4 workers ... -- DEBUG [34439.379 jw-0] -- Hello! I am a worker jw-0 ^_^ -- DEBUG [34439.379 jw-0] -- Worker jw-0 waiting for a new job ... -- DEBUG [34439.379 jw-1] -- Hello! I am a worker jw-1 ^_^ -- DEBUG [34439.379 jw-1] -- Worker jw-1 waiting for a new job ... -- DEBUG [34439.379 jw-2] -- Hello! I am a worker jw-2 ^_^ -- DEBUG [34439.379 jw-2] -- Worker jw-2 waiting for a new job ... -- DEBUG [34439.380 jw-3] -- Hello! I am a worker jw-3 ^_^ -- DEBUG [34439.380 jw-3] -- Worker jw-3 waiting for a new job ... -- INFO [34439.380 stream] -- Capturing ... -------------------------------------------------------------------------------- -- DEBUG [34439.381 stream] -- Waiting for worker ... -- DEBUG [34439.381 stream] -- Calling select() on video device ... -- DEBUG [34439.736 stream] -- Device select() --> 1 -- DEBUG [34439.736 stream] -- Frame is ready -- DEBUG [34439.736 stream] -- Grabbing device buffer ... -- DEBUG [34439.736 stream] -- Grabbed new frame: buffer=0, bytesused=614400 -- PERF [34439.736 stream] -- A new second has come; captured_fps=0 -- VERB [34439.736 stream] -- Correcting pool's JPEG approx_job_time: 0.000 -> 0.000 (last_job_time=0.000) -- VERB [34439.736 stream] -- Fluency: delay=0.000, grab_after=34439.736 -- DEBUG [34439.736 stream] -- Assigned new frame in buffer=0 to worker=jw-0 -- VERB [34439.736 jw-0] -- Compressing JPEG using CPU: worker=jw-0, buffer=0 -- INFO [34439.737 stream] -- H264: Configuring encoder: DMA=1 ... -- DEBUG [34439.737 stream] -- H264: Stopping OUTPUT ... -- DEBUG [34439.737 stream] -- H264: Stopping INPUT ... -- DEBUG [34439.740 stream] -- H264: Encoder state: ~~~ NOT READY ~~~ -- DEBUG [34439.740 stream] -- H264: Encoder device fd=9 opened -- DEBUG [34439.740 stream] -- H264: Configuring option BITRATE ... -- DEBUG [34439.740 stream] -- H264: Configuring option H264_I_PERIOD ... -- DEBUG [34439.740 stream] -- H264: Configuring option H264_PROFILE ... -- DEBUG [34439.740 stream] -- H264: Configuring option H264_LEVEL ... -- DEBUG [34439.741 stream] -- H264: Configuring option REPEAT_SEQ_HEADER ... -- DEBUG [34439.741 stream] -- H264: Configuring option H264_MIN_QP ... -- DEBUG [34439.741 stream] -- H264: Configuring option H264_MAX_QP ... -- DEBUG [34439.741 stream] -- H264: Configuring INPUT format ... -- DEBUG [34439.741 stream] -- H264: Configuring OUTPUT format ... -- DEBUG [34439.741 stream] -- H264: Configuring INPUT FPS ... -- DEBUG [34439.741 stream] -- H264: Initializing INPUT-DMA buffers ... -- DEBUG [34439.741 stream] -- H264: Requesting 1 INPUT-DMA buffers ... -- DEBUG [34439.744 http] -- HTTP: Repeating exposed ... -- DEBUG [34439.745 stream] -- H264: Got 1 INPUT-DMA buffers -- DEBUG [34439.745 stream] -- H264: Initializing OUTPUT buffers ... -- DEBUG [34439.745 stream] -- H264: Requesting 1 OUTPUT buffers ... -- DEBUG [34439.745 stream] -- H264: Got 1 OUTPUT buffers -- DEBUG [34439.746 stream] -- H264: Querying OUTPUT buffer=0 ... -- DEBUG [34439.746 stream] -- H264: Mapping OUTPUT buffer=0 ... -- DEBUG [34439.746 stream] -- H264: Queuing OUTPUT buffer=0 ... -- DEBUG [34439.746 stream] -- H264: Starting INPUT ... -- DEBUG [34439.752 stream] -- H264: Starting OUTPUT ... -- DEBUG [34439.753 stream] -- H264: Encoder state: *** READY *** -- DEBUG [34439.753 stream] -- H264: Compressing new frame; force_key=1 ... -- DEBUG [34439.753 stream] -- H264: Forcing keyframe ... -- DEBUG [34439.753 stream] -- H264: Using INPUT-DMA buffer=0 -- DEBUG [34439.753 stream] -- H264: Sending INPUT-DMA buffer ... -- DEBUG [34439.760 stream] -- H264: Polling encoder ... -- VERB [34439.786 jw-0] -- Compressed new JPEG: size=7948, time=0.049, worker=jw-0, buffer=0 -- DEBUG [34439.786 jw-0] -- Worker jw-0 waiting for a new job ... -- DEBUG [34440.755 http] -- HTTP: Repeating exposed ... -- DEBUG [34440.761 stream] -- H264: Polling encoder ... -- DEBUG [34441.763 stream] -- H264: Polling encoder ... -- DEBUG [34441.763 http] -- HTTP: Repeating exposed ... -- DEBUG [34442.764 stream] -- H264: Polling encoder ... -- DEBUG [34442.768 http] -- HTTP: Repeating exposed ... -- DEBUG [34443.765 stream] -- H264: Polling encoder ... -- DEBUG [34443.778 http] -- HTTP: Repeating exposed ... -- DEBUG [34444.766 stream] -- H264: Polling encoder ... -- DEBUG [34444.785 http] -- HTTP: Repeating exposed ... -- DEBUG [34445.768 stream] -- H264: Polling encoder ... -- DEBUG [34445.794 http] -- HTTP: Repeating exposed ... -- DEBUG [34446.769 stream] -- H264: Polling encoder ... -- DEBUG [34446.814 http] -- HTTP: Repeating exposed ... -- INFO [34446.903 http] -- HTTP: Registered client: [::ffff:192.168.1.215]:59104, id=78dd0d868ba1ef38; clients now: 1 -- DEBUG [34447.770 stream] -- H264: Polling encoder ... -- DEBUG [34447.825 http] -- HTTP: Repeating exposed ... -- DEBUG [34448.771 stream] -- H264: Polling encoder ... -- DEBUG [34448.834 http] -- HTTP: Repeating exposed ... -- DEBUG [34449.773 stream] -- H264: Polling encoder ... -- DEBUG [34449.843 http] -- HTTP: Repeating exposed ... -- DEBUG [34450.774 stream] -- H264: Polling encoder ... -- DEBUG [34450.849 http] -- HTTP: Repeating exposed ... -- DEBUG [34451.775 stream] -- H264: Polling encoder ... -- DEBUG [34451.854 http] -- HTTP: Repeating exposed ... -- DEBUG [34452.776 stream] -- H264: Polling encoder ... -- DEBUG [34452.865 http] -- HTTP: Repeating exposed ... -- DEBUG [34453.778 stream] -- H264: Polling encoder ... -- DEBUG [34453.874 http] -- HTTP: Repeating exposed ... -- DEBUG [34454.780 stream] -- H264: Polling encoder ... -- DEBUG [34454.894 http] -- HTTP: Repeating exposed ... -- DEBUG [34455.781 stream] -- H264: Polling encoder ... -- DEBUG [34455.905 http] -- HTTP: Repeating exposed ... -- DEBUG [34456.783 stream] -- H264: Polling encoder ... -- DEBUG [34456.914 http] -- HTTP: Repeating exposed ... -- DEBUG [34457.785 stream] -- H264: Polling encoder ... -- DEBUG [34457.923 http] -- HTTP: Repeating exposed ... -- DEBUG [34458.786 stream] -- H264: Polling encoder ... -- DEBUG [34458.929 http] -- HTTP: Repeating exposed ... -- DEBUG [34459.787 stream] -- H264: Polling encoder ... -- DEBUG [34459.938 http] -- HTTP: Repeating exposed ... -- DEBUG [34460.788 stream] -- H264: Polling encoder ... -- DEBUG [34460.945 http] -- HTTP: Repeating exposed ... -- DEBUG [34461.789 stream] -- H264: Polling encoder ... -- DEBUG [34461.955 http] -- HTTP: Repeating exposed ... -- DEBUG [34462.790 stream] -- H264: Polling encoder ... -- DEBUG [34462.975 http] -- HTTP: Repeating exposed ... -- DEBUG [34463.792 stream] -- H264: Polling encoder ... -- DEBUG [34463.986 http] -- HTTP: Repeating exposed ... -- DEBUG [34464.793 stream] -- H264: Polling encoder ... -- DEBUG [34464.995 http] -- HTTP: Repeating exposed ... -- DEBUG [34465.794 stream] -- H264: Polling encoder ... ^C-- INFO [34465.908 main] -- ===== Stopping by SIGINT ===== -- INFO [34465.908 http] -- HTTP eventloop stopped -- DEBUG [34466.795 stream] -- H264: Polling encoder ... -- DEBUG [34467.796 stream] -- H264: Polling encoder ... -- DEBUG [34468.797 stream] -- H264: Polling encoder ... -- DEBUG [34469.799 stream] -- H264: Polling encoder ... -- DEBUG [34470.800 stream] -- H264: Polling encoder ... -- DEBUG [34471.801 stream] -- H264: Polling encoder ... ```

My system:

Let me know what you think, if you want me to run anything else or answer any questions I will do what I can.

mdevaev commented 2 years ago

Hello. Sorry for the long answer, I'll try to figure it out, this is an unusual case.

aguinaldoabbj commented 2 years ago

Thanks for creating ustreamer! It is working very well for me to stream regular mjpg video to OctoPrint at the moment.

I'm trying to setup webrtc streaming for the efficient bandwidth usage that comes with it, but hitting a few issues. I've tried to follow the new h264 guide and everything is built and setup correctly.

When I run this command:

./ustreamer -m MJPEG -d /dev/video0 

Everything is absolutely beautiful and I can access the stream for mjpg perfectly. Way better than mjpg-streamer works, it was very easy to install as well.

When trying to add the h264 sink options as described:

./ustreamer -m MJPEG -d /dev/video0 --h264-sink=demo::ustreamer::h264 --h264-sink-mode=660

Results in some errors:

-- INFO  [33623.629      main] -- Using internal blank placeholder
-- INFO  [33623.629      main] -- Using H264-sink: demo::ustreamer::h264
-- INFO  [33623.630      main] -- Listening HTTP on [127.0.0.1]:8080
-- INFO  [33623.631    stream] -- Using V4L2 device: /dev/video0
-- INFO  [33623.631    stream] -- Using desired FPS: 0
-- INFO  [33623.631      http] -- Starting HTTP eventloop ...
-- INFO  [33623.631    stream] -- H264: Initializing encoder ...
-- INFO  [33623.659    stream] -- H264: Configuring encoder: DMA=0 ...
================================================================================
-- INFO  [33624.372    stream] -- Device fd=10 opened
-- INFO  [33624.372    stream] -- Using input channel: 0
-- INFO  [33624.395    stream] -- Using resolution: 640x480
-- INFO  [33624.396    stream] -- Using format: MJPEG
-- INFO  [33624.419    stream] -- Using HW FPS: 0 -> 30 (coerced)
-- ERROR [33624.419    stream] -- Device doesn't support setting of HW encoding quality parameters
-- INFO  [33624.419    stream] -- Using IO method: MMAP
-- INFO  [33624.423    stream] -- Requested 5 device buffers, got 5
-- INFO  [33624.437    stream] -- Capturing started
-- INFO  [33624.437    stream] -- Switching to HW encoder: the input is (M)JPEG ...
-- INFO  [33624.437    stream] -- Using JPEG quality: encoder default
-- INFO  [33624.437    stream] -- Creating pool JPEG with 1 workers ...
-- INFO  [33624.438    stream] -- Capturing ...
-- ERROR [33625.439    stream] -- Mainloop select() error: Inappropriate ioctl for device
-- INFO  [33625.439    stream] -- Destroying workers pool JPEG ...
-- INFO  [33625.442    stream] -- Capturing stopped
-- INFO  [33625.444    stream] -- Device fd=10 closed
================================================================================
-- INFO  [33625.477    stream] -- Device fd=10 opened
-- INFO  [33625.477    stream] -- Using input channel: 0
-- INFO  [33626.239    stream] -- Using resolution: 640x480
-- INFO  [33626.240    stream] -- Using format: MJPEG
-- INFO  [33626.271    stream] -- Using HW FPS: 0 -> 30 (coerced)
-- ERROR [33626.271    stream] -- Device doesn't support setting of HW encoding quality parameters
-- INFO  [33626.271    stream] -- Using IO method: MMAP
-- INFO  [33626.275    stream] -- Requested 5 device buffers, got 5
-- INFO  [33626.288    stream] -- Capturing started
-- INFO  [33626.288    stream] -- Switching to HW encoder: the input is (M)JPEG ...
-- INFO  [33626.288    stream] -- Using JPEG quality: encoder default
-- INFO  [33626.288    stream] -- Creating pool JPEG with 1 workers ...
-- INFO  [33626.288    stream] -- Capturing ...
-- ERROR [33626.849    stream] -- Can't decompress JPEG: Huffman table 0x00 was not defined

[..... many more ......]

-- ERROR [33630.897    stream] -- Can't decompress JPEG: Huffman table 0x00 was not defined
^C-- INFO  [33630.954      main] -- ===== Stopping by SIGINT =====
-- INFO  [33630.954      http] -- HTTP eventloop stopped
-- ERROR [33630.961    stream] -- Can't decompress JPEG: Huffman table 0x00 was not defined
-- INFO  [33630.961    stream] -- Destroying workers pool JPEG ...
-- INFO  [33630.964    stream] -- Capturing stopped
-- INFO  [33630.966    stream] -- Device fd=10 closed
-- INFO  [33630.966    stream] -- H264: Destroying encoder ...
-- INFO  [33630.971      main] -- Bye-bye

Despite the errors about 'Can't decompress JPEG', it does exit cleanly when I ask it to. I can also successfully still see the mjpg stream under /stream in this situation. So it seems like this is possibly closest to working?

The errors with --debug options enabled I tried removing the format MJPEG option - previously ustreamer would default to YUVY, but my camera supports mjpg directly so this uses way less CPU for regular mjpg streaming. But this did not work either:

pi@octopi:~/webrtc/ustreamer $ ./ustreamer -d /dev/video0 --h264-sink=demo::ustreamer::h264 --h264-sink-mode=660
-- INFO  [33637.178      main] -- Using internal blank placeholder
-- INFO  [33637.179      main] -- Using H264-sink: demo::ustreamer::h264
-- INFO  [33637.180      main] -- Listening HTTP on [127.0.0.1]:8080
-- INFO  [33637.180    stream] -- Using V4L2 device: /dev/video0
-- INFO  [33637.180    stream] -- Using desired FPS: 0
-- INFO  [33637.180      http] -- Starting HTTP eventloop ...
-- INFO  [33637.180    stream] -- H264: Initializing encoder ...
-- INFO  [33637.209    stream] -- H264: Configuring encoder: DMA=0 ...
================================================================================
-- INFO  [33637.922    stream] -- Device fd=10 opened
-- INFO  [33637.923    stream] -- Using input channel: 0
-- INFO  [33637.948    stream] -- Using resolution: 640x480
-- INFO  [33637.948    stream] -- Using format: YUYV
-- INFO  [33637.972    stream] -- Using HW FPS: 0 -> 30 (coerced)
-- INFO  [33637.972    stream] -- Using IO method: MMAP
-- INFO  [33637.979    stream] -- Requested 5 device buffers, got 5
-- INFO  [33637.996    stream] -- Capturing started
-- INFO  [33637.996    stream] -- Using JPEG quality: 80%
-- INFO  [33637.996    stream] -- Creating pool JPEG with 4 workers ...
-- INFO  [33637.997    stream] -- Capturing ...
-- ERROR [33638.999    stream] -- Mainloop select() error: Success
-- INFO  [33638.999    stream] -- Destroying workers pool JPEG ...
-- INFO  [33639.002    stream] -- Capturing stopped
-- INFO  [33639.006    stream] -- Device fd=10 closed
================================================================================
-- INFO  [33639.037    stream] -- Device fd=10 opened
-- INFO  [33639.037    stream] -- Using input channel: 0
-- INFO  [33639.602    stream] -- Using resolution: 640x480
-- INFO  [33639.602    stream] -- Using format: YUYV
-- INFO  [33639.626    stream] -- Using HW FPS: 0 -> 30 (coerced)
-- INFO  [33639.626    stream] -- Using IO method: MMAP
-- INFO  [33639.633    stream] -- Requested 5 device buffers, got 5
-- INFO  [33639.650    stream] -- Capturing started
-- INFO  [33639.650    stream] -- Using JPEG quality: 80%
-- INFO  [33639.650    stream] -- Creating pool JPEG with 4 workers ...
-- INFO  [33639.651    stream] -- Capturing ...
-- INFO  [33640.007    stream] -- H264: Configuring encoder: DMA=1 ...
-- INFO  [33643.110      http] -- HTTP: Registered client: [::ffff:192.168.1.215]:59102, id=c35d5509d26e0379; clients now: 1
^C-- INFO  [33646.250      main] -- ===== Stopping by SIGINT =====
-- INFO  [33646.250      http] -- HTTP eventloop stopped

And it hangs here, it will not exit cleanly here. When I access /stream, I just get the blank 'NO SIGNAL' image. Trying to use Janus, it doesn't seem to think that anything has been received. I have to kill the process with kill -9 PID to be able to use the camera again.

In case it is helpful, I ran the same with --debug

./ustreamer -d /dev/video0 --h264-sink=demo::ustreamer::h264 --h264-sink-mode=660 --debug My system:

  • Raspberry Pi 4B 2GB
  • Raspberry Pi OS (Latest, April 4th download). Built with OctoPi's scripts for installing OctoPrint & stuff.

    • Linux octopi 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l GNU/Linux
  • Followed the guide to install Janus as well, and Janus appears to run OK.
  • Camera: Logitech C270

    • v4l2-ctl --list-formats-ext

      ioctl: VIDIOC_ENUM_FMT
      Type: Video Capture
      
             Size: Discrete 640x480
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 160x120
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 176x144
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 320x176
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 320x240
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 352x288
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 432x240
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 544x288
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 640x360
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 752x416
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 800x448
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 800x600
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 864x480
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 960x544
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 960x720
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 1024x576
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 1184x656
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 1280x720
                     Interval: Discrete 0.133s (7.500 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 1280x960
                     Interval: Discrete 0.133s (7.500 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 640x480
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 160x120
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 176x144
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 320x176
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 320x240
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 352x288
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 432x240
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 544x288
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 640x360
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 752x416
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 800x448
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 800x600
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 864x480
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 960x544
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 960x720
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 1024x576
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 1184x656
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 1280x720
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)
             Size: Discrete 1280x960
                     Interval: Discrete 0.033s (30.000 fps)
                     Interval: Discrete 0.040s (25.000 fps)
                     Interval: Discrete 0.050s (20.000 fps)
                     Interval: Discrete 0.067s (15.000 fps)
                     Interval: Discrete 0.100s (10.000 fps)
                     Interval: Discrete 0.200s (5.000 fps)

Let me know what you think, if you want me to run anything else or answer any questions I will do what I can.

Hi @cp2004 , sorry to hijack this issue. Could you please share how you managed to replace mjpg-streamer with ustreamer in Octoprint as you mentioned? I'm using the dockerized version of octoprint.

cp2004 commented 2 years ago

Hi @cp2004 , sorry to hijack this issue.

You are correct, this is not the right place to discuss random user questions.

If you need support with OctoPrint, I suggest you seek it on the community forums or Discord server, the official support channels.

aguinaldoabbj commented 2 years ago

Hi @cp2004 , sorry to hijack this issue.

You are correct, this is not the right place to discuss random user questions.

If you need support with OctoPrint, I suggest you seek it on the community forums or Discord server, the official support channels.

How polite and helpful of you!

mdevaev commented 9 months ago

I've never been able to reproduce it, and there have been no new messages, so I'm closing it. Let me know if you still have this problem reproducing. Wrong window

mdevaev commented 8 months ago

I've reworked sinks logic so it should be fixed.