colinkeenan / silentcast

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

Fullscreen mode dosen't parse custom screen resolution #1

Closed JourneymanGeek closed 9 years ago

JourneymanGeek commented 9 years ago

x11grab uses the name of the current screenmode rather than the actual resolution - I currently use a manually set xrandr resolution and its unable to parse it as the image size

To replicate: Create a new screen mode at the current resolution and refresh as per here http://superuser.com/a/809799/10165 - Note the name of the new screenmode is 1280x800_60.00 and set it as the current screen resolution. Run silentcast on full screen mode. You will get Unable to parse option value "1280x800_60.00" as image size as an error, since its looking at the mode name rather than the actual resolution. xrandr does seem to list the 'correct' values

This is what silentcast outputs when fired up in terminal

geek@phoebe ~]$ silentcast
f
8
ffmpeg version 2.1.5 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jul  8 2014 20:44:17 with gcc 4.8.3 (GCC) 20140624 (Red Hat 4.8.3-1)
  configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect
  libavutil      52. 48.101 / 52. 48.101
  libavcodec     55. 39.101 / 55. 39.101
  libavformat    55. 19.104 / 55. 19.104
  libavdevice    55.  5.100 / 55.  5.100
  libavfilter     3. 90.100 /  3. 90.100
  libavresample   1.  1.  0 /  1.  1.  0
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[X11grab indev @ 0x20eafc0] Unable to parse option value "1280x800_60.00" as image size
[X11grab indev @ 0x20eafc0] Error setting option video_size to value 1280x800_60.00.
:0.0+0,0: Invalid argument
ffcom: line 14: kill: (8943) - No such process

And this is the output of xrandr for my setup

[geek@phoebe ~]$ xrandr 
Screen 0: minimum 8 x 8, current 1280 x 800, maximum 32767 x 32767
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected primary 1280x800+0+0 (normal left inverted right x axis y axis) 697mm x 392mm
   1280x720      60.00 +  50.00    59.94  
   1920x1080     60.00    50.00    59.94  
   1920x1080i    60.00    50.00    59.94  
   1280x1024     75.02  
   1440x900      74.98    59.90  
   1280x800      59.81  
   1440x576i     50.00  
   1024x768      75.08    70.07    60.00  
   1440x480i     60.00    59.94  
   800x600       72.19    75.00    60.32    56.25  
   720x576       50.00  
   720x480       60.00    59.94  
   640x480       75.00    72.81    60.00    59.94  
   720x400       70.08  
   1280x800_60.00  59.81* 
DP1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)
[geek@phoebe ~]$ 
colinkeenan commented 9 years ago

I think I've fixed it already. You gave me plenty of information so that I didn't actually have to replicate the bug on my system. I've pushed the fix onto github so if you re-install, you should have it. It's actually only genffcom that I changed and I just added | cut -d '_' -f1 to the end of the line that determines the height in full screen mode. This doesn't hurt anything if there's no _60 at the end, but will get rid of it if there is. I've tested that it doesn't hurt anything, but not if it actually solves your problem. So, please try it and report back here.

Thank you for your detailed bug report.

JourneymanGeek commented 9 years ago

Works for me. And no problem - my setup is an edge case, and it makes sense for me to give as much information as possible.

colinkeenan commented 9 years ago

Great. I'm closing this issue now.