Bug 498691 - Spectacle needs 30 seconds after stopping a recording to save it (partially garbled)
Summary: Spectacle needs 30 seconds after stopping a recording to save it (partially g...
Status: RESOLVED DUPLICATE of bug 488896
Alias: None
Product: Spectacle
Classification: Applications
Component: General (show other bugs)
Version: 24.12.1
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Noah Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-15 12:32 UTC by postix
Modified: 2025-02-19 21:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description postix 2025-01-15 12:32:44 UTC
SUMMARY

When I record a rectangular region of my screen for a few seconds and click on the red dot in the traybar to stop the recording, the recording stops, but it takes another ~30 seconds until Spectacle finally writes the file and shows its window again.

Journalctl has logged the following:

While recording
> kpipewire_record_logging: Filter queue is full, dropping frame 19184
is spammed.

When clicking on the red dot, this spam stops and and after roughly 32seconds it printed:
> qt.multimedia.ffmpeg.mediadataholder: AVStream duration -9223372036854775808 is invalid. Taking it from the metadata

* When I open the webm file in VLC, it shows a duration of 19 seconds, same as KDEnlive.
* KDEenlive shows 12 seconds of actual recording and 6 seconds emptiness at the end.
* The "Filter queue is full" spam stopped immediately, when I clicked on the red dot: This was 16 seconds after starting the recording.


SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.12.9-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
pipewire: 1.2.7
wireplumber: 0.5.7
Comment 1 postix 2025-01-15 12:33:31 UTC
ffmpeg: 7.0.2
Comment 2 postix 2025-01-15 12:45:02 UTC
I also see 
> plasmashell[3239]: The cached device pixel ratio value was stale on window update.  Please file a QTBUG which explains how to reproduce.
several times, when I stop the recording. Maybe this is a way to reproduce it :)

fwiw, I have recorded the whole screen except the panel in a rect region, while konsole + journalctl -f was running maximized.
Comment 3 postix 2025-01-15 12:49:25 UTC
Maybe also of interest: 

```
systemd[2652]: Starting app-org.kde.spectacle.service - Spectacle screenshot capture utility...
spectacle[139795]: libva info: VA-API version 1.22.0
spectacle[139795]: libva info: Trying to open /usr/lib64/dri-nonfree/radeonsi_drv_video.so
spectacle[139795]: libva info: Trying to open /usr/lib64/dri-freeworld/radeonsi_drv_video.so
spectacle[139795]: libva info: Trying to open /usr/lib64/dri/radeonsi_drv_video.so
spectacle[139795]: libva info: Found init function __vaDriverInit_1_22
spectacle[139795]: libva info: va_openDriver() returns 0
spectacle[139795]: kpipewire_vaapi_logging: VAAPI: Mesa Gallium driver 24.3.3 for AMD Radeon Graphics (radeonsi, renoir, LLVM 19.1.5, DRM 3.59, 6.12.9-200.fc41.x86_64) in use for device "/dev/dri/renderD128"
systemd[2652]: Started app-org.kde.spectacle.service - Spectacle screenshot capture utility.
spectacle[139795]: kpipewire_vaapi_logging: DRM device not found
```
Comment 4 postix 2025-01-15 13:28:35 UTC
The time to save the file strongly depends on the dimension of the recent angular region recorded: a 100x200 px region is saved quasi immediately, while a full hd width, 300 px region takes a few seconds already.
Comment 5 postix 2025-01-15 13:32:38 UTC
File is saved immediately with mp4/h264, though there are also some warnings/erros in the log:

```
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] -qscale is ignored, -crf is recommended.
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] profile Main, level 6.1, 4:2:0, 8-bit
spectacle[139795]: kpipewire_dmabuf_logging: eglChooseConfig returned this many configs: 1
plasmashell[3239]: QFont::setPointSizeF: Point size <= 0 (0.000000), must be greater than 0
plasmashell[3239]: The cached device pixel ratio value was stale on window update.  Please file a QTBUG which explains how to reproduce.
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 547560 >= 547560
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 553500 >= 553500
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 570060 >= 570060
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 592560 >= 592560
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 610560 >= 610560
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 628560 >= 628560
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 648000 >= 648000
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 651060 >= 651060
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] non-strictly-monotonic PTS
plasmashell[3239]: The cached device pixel ratio value was stale on window update.  Please file a QTBUG which explains how to reproduce.
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 958590 >= 958590
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 987030 >= 987030
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1015560 >= 1015560
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1020060 >= 1020060
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1027530 >= 1027530
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [mp4 @ 0x7f08bcbbedc0] Application provided invalid, non monotonically increasing dts to muxer in stream 0: 1057590 >= 1057590
spectacle[139795]: kpipewire_record_logging: Error while writing output packet: The argument is invalid
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] frame I:5     Avg QP:19,22  size:234963
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] frame P:407   Avg QP:22,31  size:  3422
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] mb I  I16..4: 44,7%  0,0% 55,3%
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] mb P  I16..4:  0,4%  0,0%  0,7%  P16..4:  0,4%  0,1%  0,1%  0,0%  0,0%    skip:98,4%
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] coded y,uvDC,uvAC intra: 38,7% 60,5% 59,0% inter: 0,2% 0,2% 0,1%
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] i16 v,h,dc,p: 76% 23%  1%  0%
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 56% 18% 11%  3%  2%  3%  2%  3%  2%
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] i8c dc,h,v,p: 58% 21% 19%  2%
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] Weighted P-Frames: Y:0,0% UV:0,0%
spectacle[139795]: [libx264 @ 0x7f08bc0228c0] kb/s:1662,97
spectacle[139795]: [h264 @ 0x564cb62a3a80] No support for codec h264 profile 77.
spectacle[139795]: [h264 @ 0x564cb62a3a80] Failed setup for format vaapi: hwaccel initialisation returned error.
```
Comment 6 Nate Graham 2025-01-15 18:12:13 UTC
Can confirm.
Comment 7 Noah Davis 2025-01-16 20:17:49 UTC
(In reply to postix from comment #2)
> I also see 
> > plasmashell[3239]: The cached device pixel ratio value was stale on window update.  Please file a QTBUG which explains how to reproduce.
> several times, when I stop the recording. Maybe this is a way to reproduce
> it :)
> 
> fwiw, I have recorded the whole screen except the panel in a rect region,
> while konsole + journalctl -f was running maximized.

The Qt bug is unrelated and basically harmless as far as I can tell.
Comment 8 Nate Graham 2025-02-19 21:14:10 UTC
*** This bug has been marked as a duplicate of bug 488896 ***