phw / peek

Simple animated GIF screen recorder with an easy to use interface
GNU General Public License v3.0
10.25k stars 319 forks source link

[BUG] Failed to initialize encoder: ABI version mismatch #748

Closed jonathanmoregard closed 2 years ago

jonathanmoregard commented 3 years ago

For some readon, peek won't record anymore, crashing as soon as the recording start. See below for more info, I put the part I think is relevant in the title.


Peek: 1.5.1 GTK: 3.24.23 GLib: 2.66.0 Desktop: X-Cinnamon 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 1303x652 -i :99.0+334,302 -filter:v scale=iw/1:-1 -codec:v libvpx-vp9 -lossless 1 -r 10 -y /home/jonathan/.var/app/com.uploadedlobster.peek/cache/peek/peekIL0X10.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 @ 0x556310b32980] Stream #0: not enough frames to estimate rate; consider increasing probesizeInput #0, x11grab, from ':99.0+334,302':  Duration: N/A, start: 1618836031.431608, bitrate: 271857 kb/s    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1303x652, 271857 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 @ 0x556310b3eac0] v1.10.0[libvpx-vp9 @ 0x556310b3eac0] 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!
SavMartin commented 3 years ago

Flatpack version its the problem, I uninstall it and install the deb version and now its works

thescouser89 commented 3 years ago

Can also confirm on Fedora 33. Flatpak peek version is having issues; the rpm one is fine.

j0yu commented 3 years ago

Same here for flatpak on CentOS 7.9: Failed to initialize encoder: ABI version mismatch

# flatpak --user run com.uploadedlobster.peek
Using screen recorder backend ffmpeg
Error: Child process exited with code 1
Recording canceled: Command "ffmpeg -f x11grab -show_region 0 -framerate 10 -video_size 1052x569 -i :99.0+1939,1099 -filter:v scale=iw/1:-1 -codec:v libvpx-vp9 -lossless 1 -r 10 -y /home/folder/.var/app/com.uploadedlobster.peek/cache/peek/peekYD1V10.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.100Input #0, x11grab, from ':99.0+1939,1099':  Duration: N/A, start: 1618998565.630612, bitrate: 191548 kb/s    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1052x569, 191548 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbcStream mapping:  Stream #0:0 -> #0:0 (rawvideo (native) -> vp9 (libvpx-vp9))Press [q] to stop, [?] for help[libvpx-vp9 @ 0x563d09194b00] v1.10.0[libvpx-vp9 @ 0x563d09194b00] 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!
Recording canceled

CentOS 7 and some distros still uses the old old glibc 2.17.

Wrong file :facepalm: I have a slight suspicion it might be because of the ffmpeg built internally but I'll need to do more investigation, starting off with checking differences between current ffmpeg flags against the official flathub/org.freedesktop.Platform.ffmpeg and then having a look to see if building/switching to use the flathub one will work still having a go at building it to see where the problem lies

j0yu commented 3 years ago

TLDR: Temp hacky fix is to revert to older 1.5.1 version (use flatpak --user instead as necessary)

# 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

Luckily, the 2nd most recent commit from flatpak remote-info --log flathub com.uploadedlobster.peek seems to work (see official Flatpak Tips and Tricks - "Downgrade") !

Looking at the history of Flathub builds (commits with :heavy_check_mark: next to them) it looks like one of the changes in this diff introduced the regression

FilBot3 commented 3 years ago

TLDR: Temp hacky fix is to revert to older 1.5.1 version (use flatpak --user instead as necessary)

# 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

Luckily, the 2nd most recent commit from flatpak remote-info --log flathub com.uploadedlobster.peek seems to work (see official Flatpak Tips and Tricks - "Downgrade") !

Looking at the history of Flathub builds (commits with heavy_check_mark next to them) it looks like one of the changes in this diff introduced the regression

Confirmed, working for me with Flatpak on Pop!_OS 21.04. I'm sure it'll work with Fedora 34 and other distros as well...when I get home.

FilBot3 commented 3 years ago

So, what is the actual issue as to why this Flatpak seems to not work but the system native package does?

TechnicalJohn commented 3 years ago

So, what is the actual issue as to why this Flatpak seems to not work but the system native package does?

As the initial error reported, we are seeing this error "Failed to initialize encoder: ABI version mismatch" from ffmpeg after installing the most recent flatpak.

Looking at the output of flatpak remote-info --log flathub com.uploadedlobster.peek the latest seems to indicate an update to GNOME 3.36.

If I downgrade to the commit just before that (Subject: Release 1.5.1 (d8493673)), and then install org.gnome.Platform/x86_64/3.34, then peek runs as expected with no errors.

orbatos commented 3 years ago

The note indicating an update to Gnome 3.36 is from 16 months ago

Commit: 4f105ad88b3d23dbada6191657b641684d0f82f429a8ae0f2ad32f3ab6e675dc
   Subject: Use GNOME runtime 3.36 (11bc4c4b)
      Date: 2020-03-13 08:08:42 +0000

Gnome 3.38 is current and upcoming releases are likely to move to 4.0, any chance of an update?

ScriptAutomate commented 3 years ago

TLDR: Temp hacky fix is to revert to older 1.5.1 version (use flatpak --user instead as necessary)

# 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

Luckily, the 2nd most recent commit from flatpak remote-info --log flathub com.uploadedlobster.peek seems to work (see official Flatpak Tips and Tricks - "Downgrade") !

Looking at the history of Flathub builds (commits with heavy_check_mark next to them) it looks like one of the changes in this diff introduced the regression

The note indicating an update to Gnome 3.36 is from 16 months ago

Commit: 4f105ad88b3d23dbada6191657b641684d0f82f429a8ae0f2ad32f3ab6e675dc
   Subject: Use GNOME runtime 3.36 (11bc4c4b)
      Date: 2020-03-13 08:08:42 +0000

Gnome 3.38 is current and upcoming releases are likely to move to 4.0, any chance of an update?

Further information on why people would be interested in a fixed version of the flatpak that can use newer version of GNOME runtime. If installing the working version, via the direct commit reference, I get the following message about how the working version of peek is using an EOL GNOME runtime:

Looking for updates…
Required runtime for com.uploadedlobster.peek/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.36) found in remote flathub
Info: org.gnome.Platform//3.36 is end-of-life, with reason:
   The GNOME 3.36 runtime is no longer supported as of February 13, 2021. Please ask your application developer to migrate to a supported platform.

GNOME 3.38 runtime is also EOL now, so latest flatpak gets same error:

Info: org.gnome.Platform//3.38 is end-of-life, with reason:
   The GNOME 3.38 runtime is no longer supported as of August 19, 2021. Please ask your application developer to migrate to a supported platform.
Applications using this runtime:
   com.uploadedlobster.peek
ScriptAutomate commented 2 years ago

As a follow-up to the above comment: I'm no longer able to do the hacky workaround. I'm on Pop!_OS, and am able to install it out-of-box (since peek is in the ubuntu repos), so I just go that route now.

phw commented 2 years ago

The runtime for the flatpak's on flatpak.uploadedlobster.com has been updated.

The flathub build should also get an update soon. Regardless, issues with the build on flathub should be best put to https://github.com/flathub/com.uploadedlobster.peek/issues

TechnicalJohn commented 2 years ago

The runtime for the flatpak's on flatpak.uploadedlobster.com has been updated.

The flathub build should also get an update soon. Regardless, issues with the build on flathub should be best put to https://github.com/flathub/com.uploadedlobster.peek/issues

Excellent, and thanks for the direction to the correct place to put this sort of issue!