phw / peek

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

ffmpeg error when trying to record on Elementary OS #861

Open leoherzog opened 3 years ago

leoherzog commented 3 years ago

Steps to reproduce the problem:

  1. Install Elementary OS 6.0 Odin
  2. Install peek from Flathub
  3. Attempt to begin a recording

Details:

Peek: 1.5.1 GTK: 3.24.23 GLib: 2.66.0 Desktop: Pantheon 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: true

Error details:

Command "ffmpeg -f x11grab -show_region 0 -framerate 10 -video_size 1303x817 -i :99.0+330,140 -filter:v scale=iw/1:-1 -codec:v libvpx-vp9 -lossless 1 -r 10 -y /home/herzog/.var/app/com.uploadedlobster.peek/cache/peek/peekNJ6870.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 @ 0x559d78af7980] Stream #0: not enough frames to estimate rate; consider increasing probesizeInput #0, x11grab, from ':99.0+330,140':  Duration: N/A, start: 1629383970.447684, bitrate: 340656 kb/s    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1303x817, 340656 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 @ 0x559d78b05b40] v1.10.0[libvpx-vp9 @ 0x559d78b05b40] 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!
hungtcs commented 3 years ago

Same problem as mine, but when I build from source code, the problem is gone. It seems that the DISPLAY environment variable is incorrect, but i didn't find the reason.

# -i :99.0+330,140
echo $DISPLAY
:0

https://github.com/phw/peek/blob/bcf48a984482730132cadda4a2ec5e5c31d7eac0/src/recording/ffmpeg-screen-recorder.vala#L19-L21

jkotra commented 3 years ago

same problem. (Flatpak / Flathub)

it-s commented 3 years ago

Same problem here. Here is debug output: `Command "ffmpeg -f x11grab -show_region 0 -framerate 10 -video_size 522x301 -i :99.0+2438,313 -filter:v scale=iw/1:-1 -codec:v libvpx-vp9 -qmin 10 -qmax 50 -crf 13 -b:v 1M -pix_fmt yuv420p -r 10 -y ~/.var/app/com.uploadedlobster.peek/cache/peek/peekD61R80.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+2438,313': Duration: N/A, start: 1629922485.041352, bitrate: 50279 kb/s Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 522x301, 50279 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[swscaler @ 0x556252522cc0] Warning: data is not aligned! This can lead to a speed loss[libvpx-vp9 @ 0x556252517a40] v1.10.0[libvpx-vp9 @ 0x556252517a40] 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!`

leoherzog commented 2 years ago

Still unable to use the Flatpak version of peek :(

leoherzog commented 2 years ago

Bump. :(