henrywoo / kazam

Kazam - Linux Desktop Screen Recorder and Broadcaster
GNU General Public License v3.0
136 stars 15 forks source link

Webcam error: transparent window appears with GStremer error #35

Open hmf opened 7 months ago

hmf commented 7 months ago

I installed the latest version in Ubuntu 22.04.03 LTS as per the pip instructions. The Webcam does not see to be working. I get:

DEBUG Preferences - Webcam changed.
DEBUG Preferences -   - CAM_0 0
DEBUG Preferences - Webcam preview position set to:
DEBUG Preferences -   2
DEBUG Preferences - Webcam resolution: 0
DEBUG Preferences - Webcam preview: True
DEBUG Preferences - Autosave picture folder set to: /home/hmf/None
DEBUG Preferences - Broadcast destination set to: 1
DEBUG Preferences - Codec selected: RAW (AVI) - 0
DEBUG Preferences - Deleting preferences window
DEBUG Main - Main toggled: MAIN_SCREENCAST
DEBUG Main - Turning ON webcam window.
DEBUG GStreamer - Webcam source: /dev/video0
DEBUG Window Webcam - Initializing Webcam window.
DEBUG GStreamer - Received an error message: ../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:video_src:
streaming stopped, reason not-negotiated (-4)
DEBUG Main - Record clicked, invoking Screencast.
DEBUG Main - Running Counter.
DEBUG GStreamer - Audio_source : None
DEBUG GStreamer - Audio2_source : None
DEBUG GStreamer - Video_source: {'x': 0, 'y': 0, 'width': 1920, 'height': 1080}
DEBUG GStreamer - Xid: None
DEBUG GStreamer - Area: None
DEBUG GStreamer - Capture Cursor: True
DEBUG GStreamer - Framerate : 24
DEBUG GStreamer - ximagesrc selected as video source.
DEBUG GStreamer - Coordinates SX: 0 SY: 0 EX: 1919 EY: 1079
DEBUG GStreamer - Testing for xid: None
DEBUG GStreamer - Codec: RAW (AVI)
DEBUG GStreamer - Filesink: /home/hmf/Videos/kazam_n0tliile.movie
DEBUG GStreamer - Link video_src -> f_video_caps: True
DEBUG GStreamer - Link f_video_caps -> q_video_src: True
DEBUG GStreamer - Link q_video_src -> video_rate True
DEBUG GStreamer - Link video_rate -> video_convert: True
DEBUG GStreamer - Linking RAW Video
DEBUG GStreamer - Link q_video_out -> mux True
DEBUG GStreamer - Link mux -> file queue: True
DEBUG GStreamer - Link final queue -> file sink: True
DEBUG Countdown - Detecting pycairo version.
DEBUG Countdown -   pycairo detected: 1.20.1
DEBUG Main - Starting counter.
DEBUG Main - Hiding main window.
DEBUG Main - Counter finished.
DEBUG Indicator - Recording started.
DEBUG GStreamer - Setting STATE_PLAYING
DEBUG Indicator - Recording stopped.
DEBUG Main - Stop request.
DEBUG GStreamer - Sending new EOS event
DEBUG Main - Recorded tmp file: /home/hmf/Videos/kazam_n0tliile.movie
DEBUG Main - Waiting for data to flush.
DEBUG GStreamer - Received EOS, setting pipeline to NULL.
DEBUG GStreamer - Emitting flush-done.
DEBUG Main - Autosaving enabled.
DEBUG Main - Quit requested.
INFO Main - Unable to delete one of the temporary files. Check your temporary directory.
DEBUG PulseAudio - Disconnecting from server.
DEBUG Kazam - Finishing ...

I get a screen cast correctly. Audio works fine. But no camera image appears. I tried the raw format but that did not help.

Any way I can diagnose the issue and correct it?

TIA

hmf commented 7 months ago

Small update. The following command works fine as discussed here:

gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert! videoscale ! video/x-raw, width=2592, height=600 ! autovideosink -v

Note that this is an internal camera. I also tried with a USB one and it did not work. here I assume the device name is incorrect, but Kazam also fails with the same error.

EDIT: might this be the issue? https://bugs.launchpad.net/ubuntu/+source/kazam/+bug/1992360

salderma commented 1 month ago

I have this issue on Ubuntu 20.04.6 LTS on a Dell Precision 5540 with a Bus 001 Device 003: ID 0c45:6723 Microdia Integrated_Webcam_HD.

I can also confirm that the gst-lauch command in the comment above works fine for me, as well as other wecam apps like Cheese, Webex in the browser, or Zoom to name a few.