peek icon indicating copy to clipboard operation
peek copied to clipboard

installed peek from flatpak and unable to record gifs

Open yilkalargaw opened this issue 3 years ago • 5 comments

Peek: 1.5.1 GTK: 3.24.23 GLib: 2.66.0 Desktop: LXDE Display server: X FFmpeg version:

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (GCC)
configuration: --prefix=/app --disable-debug --disable-static --enable-gpl --enable-libvpx --enable-libx264 --enable-shared --enable-libxcb --enable-libxcb-xfixes --disable-libxcb-shape --disable-ffplay --disable-ffprobe --disable-doc --disable-everything --enable-bsf=vp9_superframe --enable-decoder=libvpx_vp9 --enable-decoder=png --enable-decoder=rawvideo --enable-encoder=apng --enable-encoder=ffvhuff --enable-encoder=gif --enable-encoder=libvpx_vp9 --enable-encoder=libx264 --enable-encoder=png --enable-demuxer=image2 --enable-demuxer=matroska --enable-muxer=apng --enable-muxer=gif --enable-muxer=image2 --enable-muxer=mp4 --enable-muxer=webm --enable-filter=crop --enable-filter=fps --enable-filter=palettegen --enable-filter=paletteuse --enable-filter=scale --enable-protocol=file --enable-indev=xcbgrab
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100

Output format: gif gifski enabled: false

Error details:

Command "ffmpeg -f x11grab -show_region 0 -framerate 10 -video_size 1102x624 -i :99.0+4,62 -filter:v scale=iw/1:-1 -codec:v libvpx-vp9 -lossless 1 -r 10 -y /home/contraland/.var/app/com.uploadedlobster.peek/cache/peek/peekW2BRF1.webm" failed with status 256 (received signal 0).

Output:
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers  built with gcc 10.2.0 (GCC)  configuration: --prefix=/app --disable-debug --disable-static --enable-gpl --enable-libvpx --enable-libx264 --enable-shared --enable-libxcb --enable-libxcb-xfixes --disable-libxcb-shape --disable-ffplay --disable-ffprobe --disable-doc --disable-everything --enable-bsf=vp9_superframe --enable-decoder=libvpx_vp9 --enable-decoder=png --enable-decoder=rawvideo --enable-encoder=apng --enable-encoder=ffvhuff --enable-encoder=gif --enable-encoder=libvpx_vp9 --enable-encoder=libx264 --enable-encoder=png --enable-demuxer=image2 --enable-demuxer=matroska --enable-muxer=apng --enable-muxer=gif --enable-muxer=image2 --enable-muxer=mp4 --enable-muxer=webm --enable-filter=crop --enable-filter=fps --enable-filter=palettegen --enable-filter=paletteuse --enable-filter=scale --enable-protocol=file --enable-indev=xcbgrab  libavutil      56. 51.100 / 56. 51.100  libavcodec     58. 91.100 / 58. 91.100  libavformat    58. 45.100 / 58. 45.100  libavdevice    58. 10.100 / 58. 10.100  libavfilter     7. 85.100 /  7. 85.100  libswscale      5.  7.100 /  5.  7.100  libswresample   3.  7.100 /  3.  7.100  libpostproc    55.  7.100 / 55.  7.100[x11grab @ 0x55768c73f980] Stream #0: not enough frames to estimate rate; consider increasing probesizeInput #0, x11grab, from ':99.0+4,62':  Duration: N/A, start: 1641943203.498010, bitrate: 220047 kb/s    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1102x624, 220047 kb/s, 10 fps, 1000k tbr, 1000k tbn, 1000k tbcStream mapping:  Stream #0:0 -> #0:0 (rawvideo (native) -> vp9 (libvpx-vp9))Press [q] to stop, [?] for help[libvpx-vp9 @ 0x55768c74e440] v1.10.0[libvpx-vp9 @ 0x55768c74e440] Failed to initialize encoder: ABI version mismatchError initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or heightConversion failed!

yilkalargaw avatar Jan 11 '22 23:01 yilkalargaw

In case it helps I am using awesome as the window manager and I have not installed apps like ffmpeg or firefox or gstreamer by natively.

yilkalargaw avatar Jan 11 '22 23:01 yilkalargaw

exact same issues here, I was about to post a new issue but saw this one first.

jennso avatar Jan 12 '22 20:01 jennso

TL;DR one quick solution is to use an old version as suggested at https://github.com/phw/peek/issues/748

# Working flathub release commit: 4f105ad88b3d23dbada6191657b641684d0f82f429a8ae0f2ad32f3ab6e675dc
COMMIT="4f105ad88b3d23dbada6191657b641684d0f82f429a8ae0f2ad32f3ab6e675dc"
flatpak update --commit="$COMMIT" com.uploadedlobster.peek
flatpak run com.uploadedlobster.peek   # Or however you normally run flatpak

@phw

I tried to debug this and hopefully the following will help you to fix the problem: If I run

flatpak run  --command=ffmpeg com.uploadedlobster.peek -c "-f x11grab -show_region 0 -framerate 10 -video_size 498x298 -i :99.0+3822,470 -filter:v scale=iw/1:-1 -codec:v libvpx-vp9 -lossless 1 -r 10 -y /home/someone/.var/app/com.uploadedlobster.peek/cache/peek/peekYNM9F1.webm"

I get the following error:

ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --prefix=/app --disable-debug --disable-static --enable-gpl --enable-libvpx --enable-libx264 --enable-shared --enable-libxcb --enable-libxcb-xfixes --disable-libxcb-shape --disable-ffplay --disable-ffprobe --disable-doc --disable-everything --enable-bsf=vp9_superframe --enable-decoder=libvpx_vp9 --enable-decoder=png --enable-decoder=rawvideo --enable-encoder=apng --enable-encoder=ffvhuff --enable-encoder=gif --enable-encoder=libvpx_vp9 --enable-encoder=libx264 --enable-encoder=png --enable-demuxer=image2 --enable-demuxer=matroska --enable-muxer=apng --enable-muxer=gif --enable-muxer=image2 --enable-muxer=mp4 --enable-muxer=webm --enable-filter=crop --enable-filter=fps --enable-filter=palettegen --enable-filter=paletteuse --enable-filter=scale --enable-protocol=file --enable-indev=xcbgrab
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, x11grab, from ':99.0+3822,470':
  Duration: N/A, start: 1642852193.080794, bitrate: 47489 kb/s
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 498x298, 47489 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> vp9 (libvpx-vp9))
Press [q] to stop, [?] for help
[libvpx-vp9 @ 0x55d681a10900] v1.10.0
[libvpx-vp9 @ 0x55d681a10900] Failed to initialize encoder: ABI version mismatch
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height

What indicates that there is a problem with the libvpx

flatpak run --command=sh com.uploadedlobster.peek -c "ldd $(which ffmpeg)"
	linux-vdso.so.1 (0x00007ffc9b0c5000)
	libavdevice.so.58 => /app/lib/libavdevice.so.58 (0x00007fcb671db000)
	libavfilter.so.7 => /app/lib/libavfilter.so.7 (0x00007fcb6719f000)
	libavformat.so.58 => /app/lib/libavformat.so.58 (0x00007fcb67114000)
	libavcodec.so.58 => /app/lib/libavcodec.so.58 (0x00007fcb6707f000)
	libswresample.so.3 => /app/lib/libswresample.so.3 (0x00007fcb6705f000)
	libswscale.so.5 => /app/lib/libswscale.so.5 (0x00007fcb66fcf000)
	libavutil.so.56 => /app/lib/libavutil.so.56 (0x00007fcb66d21000)
	libm.so.6 => /usr/lib/x86_64-linux-gnu/libm.so.6 (0x00007fcb66bc8000)
	libpthread.so.0 => /usr/lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcb66ba6000)
	libc.so.6 => /usr/lib/x86_64-linux-gnu/libc.so.6 (0x00007fcb669db000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fcb669ae000)
	libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fcb669a9000)
	libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007fcb6699d000)
	libbz2.so.1 => /usr/lib/x86_64-linux-gnu/libbz2.so.1 (0x00007fcb6698a000)
	libz.so.1 => /usr/lib/x86_64-linux-gnu/libz.so.1 (0x00007fcb66970000)
	libvpx.so.6 => /usr/lib/x86_64-linux-gnu/libvpx.so.6 (0x00007fcb6675a000)
	libx264.so.160 => /app/lib/libx264.so.160 (0x00007fcb66497000)
	libva.so.2 => /usr/lib/x86_64-linux-gnu/libva.so.2 (0x00007fcb6646a000)
	libva-drm.so.2 => /usr/lib/x86_64-linux-gnu/libva-drm.so.2 (0x00007fcb66463000)
	libva-x11.so.2 => /usr/lib/x86_64-linux-gnu/libva-x11.so.2 (0x00007fcb6645a000)
	libvdpau.so.1 => /usr/lib/x86_64-linux-gnu/libvdpau.so.1 (0x00007fcb66454000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fcb6630b000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fcb67230000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fcb66305000)
	libdl.so.2 => /usr/lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcb662fd000)
	libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007fcb662e7000)
	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fcb662d2000)
	libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fcb662c9000)

shows that ffmpeg is looking for the host system library (?) which will fail, since my host system uses a different ffmpeg version.

I tried to compile the v1.10.0 libvpx (from here https://github.com/webmproject/libvpx/archive/v1.10.0/libvpx-1.10.0.tar.gz ) version with

./configure --prefix=/usr    \
             --enable-shared  \
             --disable-static --enable-vp9

and adapted the LD_LIBRARY_PATH variable, but this did not fix the error. It is also a bit irritating, that the error in the ffmpeg output demands the v1.10.0 version, while my compiled versions are always of libvpx.so.6.4.0.

I am really not familiar with the flatpack packaging process, but in those yaml files in your build-aux directory, there are modules specified, as ffmpeg and some submodules. Maybe you can also specify there the libvpx dependency somehow?

highkite avatar Jan 22 '22 12:01 highkite

upd: For me worked removing Peek with flatpak and installing it with ppa

  • flatpak remove com.uploadedlobster.peek

  • install with ppa:

sudo add-apt-repository ppa:peek-developers/stable
sudo apt update
sudo apt install peek

Confirm this issue with

user@laptop:~$ uname -a
Linux laptop 5.4.0-107-generic #121-Ubuntu SMP Thu Mar 24 16:04:27 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
user@laptop:~$ lsb_release -a
LSB Version:	core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal
user@laptop:~$ gnome-shell --version
GNOME Shell 40.5
user@laptop:~$ 

Issue at flathub: https://github.com/flathub/com.uploadedlobster.peek/issues/34

Possible duplicates: https://github.com/phw/peek/issues/990 https://github.com/phw/peek/issues/1023 https://github.com/phw/peek/issues/999 https://github.com/phw/peek/issues/1002 https://github.com/phw/peek/issues/899 https://github.com/phw/peek/issues/847 https://github.com/phw/peek/issues/828 https://github.com/phw/peek/issues/664 https://github.com/phw/peek/issues/725 https://github.com/phw/peek/issues/820 https://github.com/phw/peek/issues/869

lgg avatar Apr 03 '22 09:04 lgg

While installing the traditional system package works, for those of us on ostree or immutable filesystems, it's not an option unless you want to modify your base system. If I modify the base system, I would just use a regular operating system like Fedora Workstation rather than Fedora Silverblue/Kinoite.

FilBot3 avatar Apr 06 '22 12:04 FilBot3