Video duration equals system uptime on non-first cheese execution
I am on Arch Linux x86_64, Gnome 3.36.3, Cheese 3.34.0 (and confirmed compiling today's Cheese code) and gst-plugins-base-libs 1.16.2.
The first time I open Cheese after booting my system, it works fine. Then if I close it and re-open I can see the following issue:
Before starting to record a video, the duration is shown correctly as "00:00:00". When I start recording a video the time changes to the system uptime, then Cheese shortly hangs (few seconds) and then and goes on counting from the system uptime. The resulting mp4 video has that many minutes of fixed image and then the proper video. E.g. if my laptop is up since 1 hour and 24 min, the saved video will be 1 hour and 24 minutes + the real duration long.
In the meanwhile, in the terminal I can read:
$ cheese
Gdk-WARNING: Native Windows taller than 65535 pixels are not supported
GStreamer-CRITICAL: gst_caps_append: assertion 'IS_WRITABLE (caps1)' failed
GStreamer-CRITICAL: gst_caps_append: assertion 'IS_WRITABLE (caps1)' failed
GStreamer-CRITICAL: gst_caps_append: assertion 'IS_WRITABLE (caps1)' failed
GStreamer-CRITICAL: gst_caps_append: assertion 'IS_WRITABLE (caps1)' failed
GStreamer-CRITICAL: gst_caps_append: assertion 'IS_WRITABLE (caps1)' failed
Often, an additional message appears:
cheese-WARNING: Can't record audio fast enough: ../gst-plugins-base/gst-libs/gst/audio/gstaudiobasesrc.c(841): gst_audio_base_src_create (): /GstCameraBin:camerabin/GstAutoAudioSrc:audiosrc/GstPulseSrc:audiosrc-actual-src-puls:
Dropped 23814 samples. This is most likely because downstream can't keep up and is consuming samples too slowly.
And rarely, also this message:
cheese-WARNING: Internal GStreamer error: code not implemented. Please file a bug at http://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer.: ../gst-plugins-base/gst-libs/gst/video/gstvideofilter.c(292): gst_video_filter_transform (): /GstCameraBin:camerabin/GstEncodeBin:video-encodebin/GstVideoConvert:videoconvert1:
invalid video buffer received
The incorrect duration time is provided by GStreamer videobin-filesink videosink as queried in cheese_camera_get_recorded_time
function from libcheese/cheese-camera.c
.
In my experience, when this happens is very likely that the user closes Cheese thinking it hanged, and this causes the generation of a broken video file cascading to #18 (closed) and #69 (closed).
Maybe could be related to https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/565
I installed the development code of gstreamer (gstreamer-git-1.17.1.r13.g57d29e7fc-1 from AUR here) and gst-plugins-base (gst-plugins-base-git-1.17.1.r15.g648acbe72-1 from AUR here) and I can confirm that this bug happens also in this case.