After recording (more than 5 sec) peek creates 0 byte gif.
Ubuntu 17.04. Installed from daily build ppa.
Can you start Peek from command line and post the entire output here?
It is reproducible when I use a app launcher like Kupfer during recording.If I save it before it finish rendering most times I get a 0-byte gif. But there is no way no know as rendering doesn't show any progress. (webm is fine though)
(peek:4878): GLib-GIO-CRITICAL **: g_file_new_for_path: assertion 'path != NULL' failed
(peek:4878): GLib-GIO-CRITICAL **: g_file_get_path: assertion 'G_IS_FILE (file)' failed
convert-im6.q16: missing an image filename `Optimize' @ error/convert.c/ConvertImageCommand/3255.
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[x11grab @ 0x80262760] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':0+73,109':
Duration: N/A, start: 1487909210.900420, bitrate: N/A
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1188x624, 12 fps, 1000k tbr, 1000k tbn, 1000k tbc
No pixel format specified, bgr0 for H.264 encoding chosen.
Use -pix_fmt yuv420p for compatibility with outdated media players.
[libx264rgb @ 0x8026ad40] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64 SlowShuffle
[libx264rgb @ 0x8026ad40] profile High 4:4:4 Predictive, level 2.1, 4:4:4 8-bit
Output #0, avi, to '/tmp/peekHKPRVY.avi':
Metadata:
ISFT : Lavf57.56.101
Stream #0:0: Video: h264 (libx264rgb) (H264 / 0x34363248), bgr0, 594x312, q=-1--1, 12 fps, 12 tbn, 12 tbc
Metadata:
encoder : Lavc57.64.101 libx264rgb
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264rgb))
Press [q] to stop, [?] for help
Past duration 0.606987 too large 467kB time=00:00:03.58 bitrate=1068.1kbits/s speed=0.976x
Past duration 0.856224 too large
Past duration 0.757011 too large 686kB time=00:00:05.83 bitrate= 964.0kbits/s speed=0.998x
Past duration 0.639381 too large
Past duration 0.873650 too large
Past duration 0.767296 too large 867kB time=00:00:06.91 bitrate=1027.4kbits/s speed=0.999x
Past duration 0.969414 too large 944kB time=00:00:07.41 bitrate=1042.1kbits/s speed=0.992x
Past duration 0.999413 too large 1065kB time=00:00:11.16 bitrate= 780.9kbits/s speed= 1x
Past duration 0.984886 too large 1072kB time=00:00:11.75 bitrate= 747.4kbits/s speed= 1x
Past duration 0.953453 too large
Past duration 0.706902 too large
Past duration 0.992531 too large
Past duration 0.797188 too large 1206kB time=00:00:15.08 bitrate= 655.2kbits/s speed= 1x
Past duration 0.634377 too large
frame= 188 fps= 12 q=-1.0 Lsize= 1246kB time=00:00:15.75 bitrate= 648.0kbits/s speed=1.01x
video:1236kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.815629%
[libx264rgb @ 0x8026ad40] frame I:1 Avg QP:20.00 size:177793
[libx264rgb @ 0x8026ad40] frame P:187 Avg QP:12.58 size: 5817
[libx264rgb @ 0x8026ad40] mb I I16..4: 100.0% 0.0% 0.0%
[libx264rgb @ 0x8026ad40] mb P I16..4: 2.1% 0.0% 0.0% P16..4: 17.4% 0.0% 0.0% 0.0% 0.0% skip:80.5%
[libx264rgb @ 0x8026ad40] coded y,u,v intra: 34.7% 36.1% 35.7% inter: 6.9% 6.9% 6.9%
[libx264rgb @ 0x8026ad40] i16 v,h,dc,p: 65% 29% 4% 2%
[libx264rgb @ 0x8026ad40] kb/s:642.81
Ok, that at east shows the video was recorded and the problem is after that.
From the look of it it seems to be the issue I thought I fixed. Just to be sure you are using the latest daily: Do you have the "output format" option in the preferences (where you can select between GIF an WebM)? Can you post the output of dpkg -s peek?

Package: peek
Status: install ok installed
Priority: optional
Section: video
Installed-Size: 386
Maintainer: Philipp Wolfer ph.wolfer@gmail.com
Architecture: i386
Version: 0.9.1-0+git301~ppa7~ubuntu17.04.1
Depends: dconf-gsettings-backend | gsettings-backend, libc6 (>= 2.4), libcairo2 (>= 1.10.0), libglib2.0-0 (>= 2.41.4), libgtk-3-0 (>= 3.14), libkeybinder-3.0-0 (>= 0.3.0), ffmpeg | libav-tools, imagemagick
Description: create animated GIF screencasts
Peek creates animated GIF screencasts using ffmpeg and imagemagick. It was
built for the specific use case of recording screen areas, e.g., for easily
showing UI features of your own apps or for showing a bug in bug reports. It is
not a general purpose screencast app with extended features and it never
will be.
Ok, looking good. Maybe there is still some timing issue with saving. In theory it should wait until rendering finishes before doing the actual saving. I will try to reproduce.
I have a suspicion, you are using libav-tools, right? I had some trouble determining the exit status of libav-tools, I think this breaks. I will try to reproduce, but it will take some time as I don't have access to my machine with libav-tools right now.
libav-tools started depending on ffmpeg. It uses ffmpeg for conversion. But regardless, the situation is same with or without avconv.
However webm works out of the box.
I have added some debug output to track this down, as I can neither reproduce it nor do I have a good idea what this could be. Can you install the latest from the daily build PPA and run Peek from command line with
G_MESSAGES_DEBUG=all peek
Then try to reproduce the issue and give me the complete output of that.
I also tried reproducing it. There is one way I can get a 0 byte file, that is starting and stopping quickly again (as the recording process needs a short time to actually capture a first frame, but we are talking a fraction of a second here). Have to think what I do about this, but for you this is happening when recording more than 5 seconds, so clearly a different issue.
Tried again, looked at the code. I absolutely cannot reproduce this here, tested on Ubuntu 16.04 and my Arch Linux box. Given that Ubuntu 17.04 is not even released yet it maybe is just a glitch there.
Definitely not a blocker. I leave this open, but I really need more info to fix this.
Yeah, though if it's a glitch there ideally we'd want to find out what the glitch is so they can fix it!
Can repro (at least used to be able to, not anymore). I feel like it's more of a problem when the gif's resolutions are big, though.
Hi folks,
I was having the same problem with an older version (sorry no sure witch one), so I've installed the latest one through the ppa, and the error differ a little bit but seems to be related.
~ 禄 peek -v
Peek 1.0.1
~ 禄 dpkg -s peek
Package: peek
Status: install ok installed
Priority: optional
Section: video
Installed-Size: 487
Maintainer: Philipp Wolfer <[email protected]>
Architecture: amd64
Version: 1.0.1-0~ppa11~ubuntu16.04.1
Depends: dconf-gsettings-backend | gsettings-backend, libc6 (>= 2.4), libcairo2 (>= 1.10.0), libglib2.0-0 (>= 2.41.4), libgtk-3-0 (>= 3.16.2), libkeybinder-3.0-0 (>= 0.3.0), ffmpeg | libav-tools, imagemagick
Recommends: gstreamer1.0-plugins-good, gstreamer1.0-plugins-bad
Description: Simple animated GIF screen recorder with an easy to use interface
Peek creates animated GIF screencasts using FFmpeg and ImageMagick. It was
built for the specific use case of recording screen areas, e.g., for easily
showing UI features of your own apps or for showing a bug in bug reports. It is
not a general purpose screencast app with extended features and it never
will be.
.
It also requires a window manager with compositing enabled.
Homepage: https://github.com/phw/peek
~ 禄 peek
Using screen recorder backend ffmpeg
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
WARNING: library configuration mismatch
avcodec configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, x11grab, from ':0+958,361':
Duration: N/A, start: 1497348472.344557, bitrate: N/A
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 807x597, 10 fps, 10 tbr, 1000k tbn, 10 tbc
Output #0, rawvideo, to '/home/nbo/.cache/peek/peekF8WR1Y.pam':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: pam, rgb24, 806x596, q=2-31, 200 kb/s, 10 fps, 10 tbn, 10 tbc
Metadata:
encoder : Lavc56.60.100 pam
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> pam (native))
Press [q] to stop, [?] for help
frame= 1245 fps= 10 q=-0.0 Lsize= 1752229kB time=00:02:04.50 bitrate=115295.3kbits/s
video:1752229kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Error: Child process killed by signal 9
File save error: Error when getting information for file '/home/nbo/.cache/peek/peek1HMQ1Y.gif': No such file or directory
Temp file delete error: Error removing file: No such file or directory
I can confirm it's only happening with large GIFs - it's working fine with short one. It should not be related to space on disk:
~ 禄 df -h
Filesystem Size Used Avail Use% Mounted on
[...]
/dev/mapper/ubuntu--vg-root 213G 177G 25G 88% /
[...]
Any advices ?
Just some additional tests (660x444 size, Framerate 10), terminal capture with peek output:
frame= 1007 fps= 10 q=-0.0 Lsize= 845116kB time=00:01:40.70 bitrate=68750.6kbits/s
video:845116kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
frame= 2009 fps= 10 q=-0.0 Lsize= 1686036kB time=00:03:20.90 bitrate=68750.6kbits/s
video:1686036kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Error: Child process killed by signal 9
File save error: Error when getting information for file '/home/nbo/.cache/peek/peekF03K1Y.gif': No such file or directory
Temp file delete error: Error removing file: No such file or directory
frame= 1502 fps= 10 q=-0.0 Lsize= 1260540kB time=00:02:30.20 bitrate=68750.6kbits/s
video:1260540kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
Error: Child process killed by signal 9
File save error: Error when getting information for file '/home/nbo/.cache/peek/peekE2Q90Y.gif': No such file or directory
Temp file delete error: Error removing file: No such file or directory
frame= 1208 fps= 10 q=-0.0 Lsize= 1013803kB time=00:02:00.80 bitrate=68750.6kbits/s
video:1013803kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31961 nbo 20 0 6473440 3.082g 828 D 97.7 41.1 0:27.77 convert
I have moved to Arch Linux since my last comment, and am having the same issue. After the frame count exceeds a certain amount (seems like ~1200), convert hangs up my pc and runs very slowly, sometimes never even finishes. I usually have to kill it by hand.
How was this bug? I have version 17.04 of Ubuntu, version 1.0.3 of Peek and I have the same problem.
@xerada Please see https://github.com/phw/peek/issues/112 for discussion and workaround
I am closing this, as the original issue probably was fixed by previous patches and all follow up comments sound like duplicates or variations of #112