colinkeenan / silentcast

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

Unable to successfully make gif on Ubuntu 14.04 (XFCE) #9

Closed NomNomCameron closed 7 years ago

NomNomCameron commented 9 years ago

When downloading the latest release and running it from terminal with bash silentcast I get this error in terminal:

[X11grab indev @ 0x204dca0] Unable to parse option value "-322x300" as image size
[X11grab indev @ 0x204dca0] Error setting option video_size to value -322x300.
:0.0+2242,321: Invalid argument
/home/cameron/silentcast/ffcom: line 20: kill: (4692) - No such process
silentcast: line 171:  4669 Terminated              python "$py_script_dir"/transparent_window.py \""$all_keys"\"
1
8
gif

after which I get a popup that says "cannot find mkv..."

Seth-Johnson commented 9 years ago

What Linux distribution are you running? How did you install silentcast (i.e. through the repository/AUR or download and unpack yourself)? Is that the full output?

NomNomCameron commented 9 years ago

Xubuntu 14.04, installed all dependencies through apt-get, installed yad by downloading the .deb and installing through software center and downloaded silentcast source through the latest 2.0 release on github

-> bash silentcast
/home/cameron/Downloads/silentcast-2.0
t
8
/home/cameron/silentcast
ffmpeg version 1.2.6-7:1.2.6-1~trusty1 Copyright (c) 2000-2014 the FFmpeg developers
  built on Apr 26 2014 18:52:58 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
  configuration: --arch=amd64 --disable-stripping --enable-avresample --enable-pthreads --enable-runtime-cpudetect --extra-version='7:1.2.6-1~trusty1' --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    53.  5.103 / 53.  5.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[X11grab indev @ 0x204dca0] Unable to parse option value "-322x300" as image size
[X11grab indev @ 0x204dca0] Error setting option video_size to value -322x300.
:0.0+2242,321: Invalid argument
/home/cameron/silentcast/ffcom: line 20: kill: (4692) - No such process
silentcast: line 171:  4669 Terminated              python "$py_script_dir"/transparent_window.py \""$all_keys"\"
1
8
gif
/home/cameron

That is the entire output

colinkeenan commented 9 years ago

Please provide the output to these 2 commands:

aw=$(xdotool getactivewindow)
xwininfo -id "$aw"

This will just give information about your terminal window, but I want to see why there's a dash in front of the width since that's what's causing the problem for ffmpeg.

NomNomCameron commented 9 years ago

The first command did not output anything, the second outputted the following:

xwininfo: Window id: 0x4600004 "Terminal"

  Absolute upper-left X:  791
  Absolute upper-left Y:  397
  Relative upper-left X:  1
  Relative upper-left Y:  24
  Width: 577
  Height: 409
  Depth: 32
  Visual: 0x4b
  Visual Class: TrueColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x4600003 (not installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +791+397  -2472+397  -2472-274  +791-274
  -geometry 80x24+790+373
colinkeenan commented 9 years ago

That looks normal. Now see what happens if you copy and paste all this into the terminal:

aw=$(xdotool getactivewindow)
eval $(xwininfo -id "$aw" |
      sed -n -e "s/^ \+Absolute upper-left X: \+\([0-9]\+\).*/x=\1/p" \
             -e "s/^ \+Absolute upper-left Y: \+\([0-9]\+\).*/y=\1/p" \
             -e "s/^ \+Width: \+\([0-9]\+\).*/w=\1/p" \
             -e "s/^ \+Height: \+\([0-9]\+\).*/h=\1/p" )

There won't be any output, but it will assign values to x, y, w, and h. Now tell me the output of:

echo "$w"x"$h"
NomNomCameron commented 9 years ago

577x409

colinkeenan commented 9 years ago

All of that is working then and is not the source of the mysterious dash that's messing up ffmpeg. What happens if you just leave it on fullscreen instead of switching to transparent window? Can you record the whole screen?

NomNomCameron commented 9 years ago

Yes I am able to record fullscreen no problem.

colinkeenan commented 9 years ago

Can you check the other options, and even double check the transparent window one?

colinkeenan commented 9 years ago

Please let me know if you can record windows or if it only works on fullscreen - let me know all the options that fail.

NomNomCameron commented 9 years ago

I believe I found what the problem was.

I'm running 2 monitors and was trying to record on the secondary monitor, I don't seem to have this problem on my primary monitor. I believe that was what was causing the - in the x coordinate.

colinkeenan commented 9 years ago

Oh. I don't have 2 monitors and so never tried that. When I have the opportunity to experiment with 2 monitors, I'll try to work on that. No guarantee when that will be though. What happens if you run the commands above that gave "wxh" for you terminal, when the terminal is on the 2nd monitor? If that works without giving a dash, maybe the problem is only when the terminal is on a different monitor than the one you want to record. I don't know much about working with 2 monitors.

colinkeenan commented 9 years ago

You don't have to run it from a terminal though. Even if you don't want to install it systemwide, you can either edit the .desktop file included for running from the download directory or run the install script for local installation.

NomNomCameron commented 9 years ago

I still get the dash in the coordinates when the terminal is on the other monitor. I'm glad that's what my problem is instead of Silentcast not working! It seems to work very well when I use it on my primary monitor!

colinkeenan commented 9 years ago

Great. I will update this thread and close it when I am able to work with 2 monitors and solve the problem. If you happen to decide to experiment with the scripts and solve it yourself, please let me know. The script that needs to be adjusted is called "genffcom" which generates the ffmpeg command that does the work of recording stuff.

NomNomCameron commented 9 years ago

Awesome! I will keep you posted if I make any head way on anything!

Thanks for responding back so quickly!

colinkeenan commented 9 years ago

I just noticed it was you that opened the other issue about the transparent window disappearing. I am very busy at the moment and also can't work on a 2nd monitor for a long while. When I can, I will try to iron out these bugs.

Suor commented 9 years ago

Have the same error on primary single monitor:

suor:~$ silentcast
/home/suor
i
8
/home/suor/silentcast
X Error: 9: Bad Drawable: 0x6200004
  Request Major code: 14
  Request serial number: 3
xwininfo: error: No such window with id 0x6200004.
Unity or Pantheon detected, switching indicators...
avconv version 11-6:11-1, Copyright (c) 2000-2014 the Libav developers
  built on Sep 26 2014 14:36:31 with gcc 4.9.1 (Ubuntu 4.9.1-15ubuntu1)
[x11grab @ 0x2184740] Couldn't parse video size.
:0.0+0,0: Invalid argument
/home/suor/silentcast/ffcom: line 20: kill: (2870) - No such process
1
8
gif
/home/suor
colinkeenan commented 9 years ago

@NomNomCameron, A couple of small fixes have been made by others and I've release v2.1. This won't solve multi-monitor issues. I don't see a time when I'll be able to work on multi-monitor issues. Are you working on it? If so, I've just learned that the $DISPLAY variable refers to the keyboard/mouse/monitor session. It can be :0 or :1 or on my system it shows up as :0.0. The number after the "dot" is supposed to indicate which monitor to use. Can you experiment with ffmpeg to see if using :0.1 records the 2nd monitor? (Or, :1.1 if your $DISPLAY variable is :1)