colinkeenan / silentcast

Create silent mkv screencast and animated gif.
GNU General Public License v3.0
512 stars 22 forks source link

fscanf: No such file or directory #51

Closed themightyoarfish closed 6 years ago

themightyoarfish commented 6 years ago

Running silentcast on Ubuntu 16.04 yields screenshot from 2017-10-23 10-16-41

The error comes from this piece:

  if (!presets_file) {
    //can't open presets file so show error and use defaults
    char message[PATH_MAX + 100] = { 0 };
    strcpy (message, "<");
    strcat (message, filename);
    strcat (message, "> Using default list of sizes for middle-click drag");
    show_perror (widget, message);
    for (i = 0; i < PRESET_N; i++) presets[i] = preset_defaults[i]; 
    previous[0] = 0; previous[1] = 0;  
  } else { 
    //succesfully opened presets file so read it
    for (i = 0; i < PRESET_N + 2; i++) { //preset file also has previous rectangle geometry
      int ret = fscanf (presets_file, "%lf", &read_preset);
      if (ret == 1){
        if (i < PRESET_N) presets[i] = read_preset; //reading preset
        else previous [i - PRESET_N] = read_preset; //reading previous rectangle geometry
      } else if (errno != 0) {
        show_perror (widget, "fscanf");  // <<<<< HERE BE DRAGONS
        break;
      } else if (ret == EOF) {
        break;
      }
    }

So apparently it's an issue with some presets_file.

The program works (more or less smoothly) regardless, but the message is at least confusing.

colinkeenan commented 6 years ago

When I test silentcast with no presets_file, it works fine. I can't think of any reason it would be different on Ubuntu 16.04.

Did it do this on the very first run? Or, did it run once, and then give this error the 2nd time?

What do you get from ls ~/.config/silentcast*?

themightyoarfish commented 6 years ago

@colinkeenan I have a .config/silentcast_presets file, but nothing else. I would need to debug the code myself to figure out what's wrong, maybe I'll try when I need something to procrastinate.

I'm positive this did not happen on the first run.

colinkeenan commented 6 years ago

Try deleting .config/silentcast_presets. This would be the same as the first run.

I'm wondering if it has something to do with your home directory name or encoding that's being detected correctly when I test for the existence of the file, but not correctly in fscanf.

What is your home directory?

themightyoarfish commented 6 years ago

Deleting the presets file did the trick, it now seems to work as before, also fixing some other quirks the tool had developed.

themightyoarfish commented 6 years ago

After the third restart of the program, the problem re-appears. Very strange.

colinkeenan commented 6 years ago

Silentcast writes something to silentcast_presets on every exit. Since the 2nd run worked, it seems that the problem occurs when writing to an already existing file. Somehow, that changes what? the encoding of the filename or something? The file is being detected which is why Silentcast tries to fscanf it, but fscanf doesn't detect it. I will look closer at what encoding fscanf expects, or see if there is a gnu version of it.

colinkeenan commented 6 years ago

Looking at my code, the file has already been opened before giving it to fscanf, with presets_file = g_fopen (glib_encoded_filename, "r");. It doesn't make any sense that this would fail since the g_fopen succeeded. Looking at my code for writing the file, I actually use g_file_set_contents instead of fscanf. I will rewrite the code for getting the contents to use the corresponding g_file_get_contents instead of fscanf and see if that fixes it. I'll do that later today.

colinkeenan commented 6 years ago

Ok. I have pushed new code to the next branch replacing fscanf in that part of the code with g_file_get_contents. I also discovered and fixed an issue with increasing the size of the rectangle using the scroll wheel.

So, git checkout next, make, and sudo ./install. Also, don't forget to remove ~/.config/silencast_presets.

Try it at least 3 times and report results. Also report if you notice any new issue. If all is good, wait another day and try again.

If still good, close this issue and I'll merge it with master and release.

colinkeenan commented 6 years ago

@themightyoarfish, Will you be testing the new code I pushed to next?

themightyoarfish commented 6 years ago

I'll try to remember it tomorrow.

themightyoarfish commented 6 years ago

Results

The issue with the error message has disappeared, however, I have a new problem (I've had this since I used it a few days ago, but not initially. Maybe it relates to me switching different Desktop environments? This would probably warrant a new issue.

In both the below cases I just wiggle the mouse a bit.

First try

Gif output: anim

Console output:

silentcast 
ffmpeg started on 2017-10-27 at 14:59:51
Report written to "ffcom.log"
ffmpeg started on 2017-10-27 at 14:59:51
Report written to "ffcom.log"
ffmpeg version 2.8.11-0ubuntu0.16.04.1ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers Copyright (c) 2000-2017 the FFmpeg developers

  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  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
  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
  libavutil      54. 31.100 / 54. 31.100
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavcodec     56. 60.100 / 56. 60.100
  libavdevice    56.  4.100 / 56.  4.100
  libavformat    56. 40.101 / 56. 40.101
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
  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+3939,465':
Input #0, x11grab, from ':0+3939,465':
  Duration:   Duration: N/A, start: N/A, start: 1509109192.1308441509109192.131002, bitrate: , bitrate: N/A
N/A    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 427x240
, 8 fps,     Stream #0:08 tbr, : Video: rawvideo (BGR[0] / 0x524742), bgr0, 427x2401000k tbn, 8 tbc, 8 fps, 
8 tbr, 1000k tbn, 8 tbc
Output #0, matroska, to 'temp.mkv':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), rgb24, 427x240, q=2-31, 200 kb/s, 8 fps, 1k tbn, 8 tbc
    Metadata:
      encoder         : Lavc56.60.100 ffvhuff
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
Output #0, matroska, to 'temp.mkv':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), rgb24, 427x240, q=2-31, 200 kb/s, 8 fps, 1k tbn, 8 tbc
    Metadata:
      encoder         : Lavc56.60.100 ffvhuff
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
frame=    7 fps=0.0 q=-0.0 size=     636kB time=00:00:00.75 bitrate=6947.6kbits/frame=    7 fps=0.0 q=-0.0 size=     636kB time=00:00:00.75 bitrate=6947.6kbits/frame=   11 fps= 10 q=-0.0 size=    1059kB time=00:00:01.25 bitrate=6943.5kbits/frame=   12 fps= 10 q=-0.0 size=    1165kB time=00:00:01.37 bitrate=6942.5kbits/frame=   16 fps=9.4 q=-0.0 size=    1588kB time=00:00:01.87 bitrate=6939.9kbits/frame=   16 fps=9.4 q=-0.0 size=    1588kB time=00:00:01.87 bitrate=6939.9kbits/frame=   20 fps=9.0 q=-0.0 size=    2012kB time=00:00:02.37 bitrate=6939.3kbits/frame=   21 fps=9.0 q=-0.0 size=    2117kB time=00:00:02.50 bitrate=6938.5kbits/frame=   24 fps=8.8 q=-0.0 size=    2435kB time=00:00:02.87 bitrate=6938.0kbits/frame=   25 fps=8.8 q=-0.0 size=    2541kB time=00:00:03.00 bitrate=6938.2kbits/frame=   29 fps=8.7 q=-0.0 size=    2964kB time=00:00:03.50 bitrate=6937.8kbits/frame=   29 fps=8.6 q=-0.0 size=    2964kB time=00:00:03.50 bitrate=6938.0kbits/ffmpeg started on 2017-10-27 at 14:59:55
Report written to "ffcom.log"
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
  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, matroska,webm, from 'temp.mkv':
  Metadata:
    ENCODER         : Lavf56.40.101
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), bgr0, 427x240, SAR 1:1 DAR 427:240, 8 fps, 8 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc56.60.100 ffvhuff
Output #0, image2, to 'ew-%03d.png':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: png, rgb24, 427x240 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 8 fps, 8 tbn, 8 tbc (default)
    Metadata:
      encoder         : Lavc56.60.100 png
Stream mapping:
  Stream #0:0 -> #0:0 (ffvhuff (native) -> png (native))
Press [q] to stop, [?] for help
[matroska,webm @ 0x10797a0] Invalid EBML number size tag 0x01 at pos 976628 (0xee6f4)
[matroska,webm @ 0x10797a0] Read error at pos. 1084929 (0x108e01)
[matroska,webm @ 0x10797a0] Read error at pos. 1193249 (0x123521)
frame=   32 fps=8.3 q=-0.0 Lsize=    3392kB time=00:00:04.00 bitrate=6947.8kbits/s    
frame=   32 fps=8.3 q=-0.0 Lsize=    3392kB time=00:00:04.00 bitrate=6947.8kbits/s    
video:3390kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: video:3390kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.064984%
0.062793%
Exiting normally, received signal 15.
Exiting normally, received signal 15.
frame=   32 fps=0.0 q=-0.0 Lsize=N/A time=00:00:04.00 bitrate=N/A dup=3 drop=0    
video:978kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

(nautilus:1406): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:1406): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:1406): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(nautilus:1406): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(nautilus:1406): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

ffmpeg discovers some errors.

Second try

Gif output: anim

Console output:

ffmpeg started on 2017-10-27 at 15:02:57
Report written to "ffcom.log"
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
  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
ffmpeg started on 2017-10-27 at 15:02:57
Report written to "ffcom.log"
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
  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+4082,397':
  Duration: N/A, start: 1509109378.088493, bitrate: N/A
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 427x240, 8 fps, 8 tbr, 1000k tbn, 8 tbc
Output #0, matroska, to 'temp.mkv':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), rgb24, 427x240, q=2-31, 200 kb/s, 8 fps, 1k tbn, 8 tbc
    Metadata:
      encoder         : Lavc56.60.100 ffvhuff
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
Input #0, x11grab, from ':0+4082,397':
  Duration: N/A, start: 1509109378.126393, bitrate: N/A
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 427x240, 8 fps, 8 tbr, 1000k tbn, 8 tbc
Output #0, matroska, to 'temp.mkv':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), rgb24, 427x240, q=2-31, 200 kb/s, 8 fps, 1k tbn, 8 tbc
    Metadata:
      encoder         : Lavc56.60.100 ffvhuff
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
frame=   27 fps=8.3 q=-0.0 Lsize=    2911kB time=00:00:03.37 bitrate=7066.4kbits/s    
video:2909kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.065958%
Exiting normally, received signal 15.
ffmpeg started on 2017-10-27 at 15:03:01
Report written to "ffcom.log"
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
  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, matroska,webm, from 'temp.mkv':
  Metadata:
    ENCODER         : Lavf56.40.101
  Duration: 00:00:03.38, start: 0.000000, bitrate: 7066 kb/s
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), bgr0, 427x240, SAR 1:1 DAR 427:240, 8 fps, 8 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc56.60.100 ffvhuff
      DURATION        : 00:00:03.375000000
Output #0, image2, to 'ew-%03d.png':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: png, rgb24, 427x240 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 8 fps, 8 tbn, 8 tbc (default)
    Metadata:
      DURATION        : 00:00:03.375000000
      encoder         : Lavc56.60.100 png
Stream mapping:
  Stream #0:0 -> #0:0 (ffvhuff (native) -> png (native))
Press [q] to stop, [?] for help
[matroska,webm @ 0x1e297a0] Invalid EBML number size tag 0x01 at pos 331680 (0x50fa0)
frame=   28 fps=8.3 q=-0.0 Lsize=    3023kB time=00:00:03.50 bitrate=7076.7kbits/s    
video:3022kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.064899%
Exiting normally, received signal 15.
frame=   28 fps=0.0 q=-0.0 Lsize=N/A time=00:00:03.50 bitrate=N/A dup=1 drop=0    
video:685kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

(nautilus:1597): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:1597): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:1597): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(nautilus:1597): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(nautilus:1597): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

Basically the same phenomenon.

colinkeenan commented 6 years ago

I don't have any ideas how to fix this. Since the problem is in the recording, it must be an issue with ffmpeg. I'm curious: is it possible for you to update ffmpeg? Yours reports

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

But mine shows

ffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 7.2.0 (GCC)

Could you make sure only one instance of ffmpeg is running?

I'd also like to know what version of imagemagick you have. I have 6.9.9.20. I think some other issues people have are caused by old versions of imagemagick.

Also, what desktop are you using? What GPU? If a discrete GPU, can you switch to one on the CPU?

colinkeenan commented 6 years ago

I've released v3.07 with the fixes I have for the originally reported issue. I think you should open a new issue, and copy your 2nd try above. Also put the ffcom.log contents in the issue description.

Did you verify that temp.mkv shows the same issue as anim.gif? If temp.mkv is OK, the problem isn't with ffmpeg, it's with SC_temptoanim.c.

If temp.mkv is OK, see what happens if you delete the directory silentcast that contains temp.mkv etc. before running Silentcast.