Take a Shot! - yet another screenshot utility...
Posted: Fri 22 Feb 2013, 17:15
Yeah, I know - there's a lot of them already and it would be complete nonsense to write another, but this one was made due to specific need - to include mouse cursor into screenshot.
I found out that ffmpeg has such ability and it's already in many Puppies, so no external tools are required.
The interface isn't beautiful, but (hopefully) intuitive in use; just keep in mind a couple of things:
- selecting region is a bit unusual: click on top-left corner of desired area and release mouse button, then click again on bottom-right corner
- cursor won't be included into screenshot (and additionally ffmpeg may behave weird in some Puppies) if you have only 16bit color depth, must be 24bit (you can change it via xorgwizard)
Requirements: Bash, Gtkdialog >= 0.8.1, ffmpeg/avconv, xwininfo, getcurpos, awk, tr, gifsicle (optional), xrectsel (optional)
I tested it in: Slacko-5.4 (Compiz) + briefly, using VBox, in Slacko-5.4.0.3 (JWM), Lupu-528 (Openbox), Precise-5.4.2 (JWM) and Akita-14 (JWM/Xorg; ffmpeg segfaults with XVesa).
TAS is currently developed on Fatdog64.
PS. I wrote this tool primarily for myself and I don't know if ffmpeg is really wise choice for such a task, but so far works nice for me.
Anyway, I can't guarantee it'll work flawlessly in all cases.
______________
tas_NLS-1.15.pet contains the following translations:
- Polish (me)
- Spanish (nilsonmorales & vicmz) [needs updating]
- French (musher0 & charlie6) [needs updating]
- Dutch (Bert) [needs updating]
- Portuguese (vicmz) [needs updating]
- Italian (vicmz) [needs updating]
- German (L18L) [needs updating]
_______________
Changelog:
Version 1.1:
1.added dedicated icon (`f00).
2. removed "Open in default image..." checkbox from the main window.
3. added a new window that pops up after taking a shot, with the following options:
- View (via defaultimageviewer - usually Viewnior)
- Edit (via defaultimageeditor - usually MTPaint)
- Continue (go back to the main window)
- Exit
4. Some minor improvements.
Version 1.2:
- i18n (gettext)
Version 1.3:
- bugfix: filename with a colon in its name won't save onto FAT partition nor this forum (thanks to don570)
Version 1.4:
- output formats: removed - TGA, PCX, PPM; added - GIF
- added options to take sequence of snapshots
- 'Add datestamp' checkbox now adds only date
- new checkbox 'Add timestamp'
- program icon changed (/usr/local/lib/X11/mini-icons/mini-camera.xpm)
- lots of minor fixes
Version 1.5:
- bugfix: problems with GIFs in Wary (thanks to Geoffrey)
Version 1.6:
- fixed GIF looping issue in older versions of ffmpeg (thanks to Geoffrey)
- added "Scale" option
- added command-line option "quick", which instantly takes a snapshot of the entire screen
- some other fixes and internal improvements
Version 1.7:
- added tooltip that clarifies 'Window' and 'Region' modes
- when "Number of frames" = 1, "Frames per seconds" gets insensitive (works only if Gtkdialog >= 0.8.3)
- support for photocamera.svg icon from Woof-CE
Version 1.8:
- Added "Toggle extra options" togglebutton, which shows/hides "Number of frames" & "Frames per second" options
- Settings are retained also if TAS window has been closed without taking a screenshot
- Some minor fixes & changes
Version 1.9:
- compatibility with avconv
Version 1.10:
- possible fix for supposed avconv/ffmpeg clash (problem reported by Relztrah)
- fixed date/time stamps not being calculated correctly if DELAY and/or Window/Region modes has been used
Version 1.11:
- disabled beep for Quickshot (it's taken immediately, so there's no point to have it)
- added checkbox "Beep on Shot" (thanks to MochiMoppel)
- can use avplay/ffplay (they support more formats than aplay) as a player for BEEPFILE - aplay as a fallback
- standard beep command as a fallback, if /usr/share/audio/beep_high.wav doesn't exist (thanks to MochiMoppel)
- the default BEEPFILE as well as DEFAULTIMAGEVIEWER and DEFAULTIMAGEEDITOR can be specified in ~/.take_a_shot.rc config file (no need to edit the code anymore)
- added checkbox "Show timer" - it displays a timer in the center of the screen if DELAY > 0
Version 1.12:
- fix for different treatment of newline by 'read' cmd in Bash-4.4 (thanks to peebee & 01micko)
- fix for newer ffmpeg that does not recognize '+nomouse' option anymore
- can make use of xrectsel, if available
- ditched xmessage; everything's done in Gtkdialog now
- minor corrections/fixes
Version 1.13:
- removed 'Add datestamp' and 'Add timestamp' checkboxes; instead a user can freely insert date's % parameters into filename
- fix: some ancient versions of ffmpeg may not support '-draw_mouse' option
- minor corrections
Version 1.14:
- fix: replace slashes to underscores in filename after evaluating date format options (thanks to MrDuckGuy)
Version 1.15:
- added 'Discard' button to the preview dialog (thanks to MochiMoppel)
- increased the size of the preview image (1/5 -> 1/3)
Have fun &
Greetings!
I found out that ffmpeg has such ability and it's already in many Puppies, so no external tools are required.
The interface isn't beautiful, but (hopefully) intuitive in use; just keep in mind a couple of things:
- selecting region is a bit unusual: click on top-left corner of desired area and release mouse button, then click again on bottom-right corner
- cursor won't be included into screenshot (and additionally ffmpeg may behave weird in some Puppies) if you have only 16bit color depth, must be 24bit (you can change it via xorgwizard)
Requirements: Bash, Gtkdialog >= 0.8.1, ffmpeg/avconv, xwininfo, getcurpos, awk, tr, gifsicle (optional), xrectsel (optional)
I tested it in: Slacko-5.4 (Compiz) + briefly, using VBox, in Slacko-5.4.0.3 (JWM), Lupu-528 (Openbox), Precise-5.4.2 (JWM) and Akita-14 (JWM/Xorg; ffmpeg segfaults with XVesa).
TAS is currently developed on Fatdog64.
PS. I wrote this tool primarily for myself and I don't know if ffmpeg is really wise choice for such a task, but so far works nice for me.
Anyway, I can't guarantee it'll work flawlessly in all cases.
______________
tas_NLS-1.15.pet contains the following translations:
- Polish (me)
- Spanish (nilsonmorales & vicmz) [needs updating]
- French (musher0 & charlie6) [needs updating]
- Dutch (Bert) [needs updating]
- Portuguese (vicmz) [needs updating]
- Italian (vicmz) [needs updating]
- German (L18L) [needs updating]
_______________
Changelog:
Version 1.1:
1.added dedicated icon (`f00).
2. removed "Open in default image..." checkbox from the main window.
3. added a new window that pops up after taking a shot, with the following options:
- View (via defaultimageviewer - usually Viewnior)
- Edit (via defaultimageeditor - usually MTPaint)
- Continue (go back to the main window)
- Exit
4. Some minor improvements.
Version 1.2:
- i18n (gettext)
Version 1.3:
- bugfix: filename with a colon in its name won't save onto FAT partition nor this forum (thanks to don570)
Version 1.4:
- output formats: removed - TGA, PCX, PPM; added - GIF
- added options to take sequence of snapshots
- 'Add datestamp' checkbox now adds only date
- new checkbox 'Add timestamp'
- program icon changed (/usr/local/lib/X11/mini-icons/mini-camera.xpm)
- lots of minor fixes
Version 1.5:
- bugfix: problems with GIFs in Wary (thanks to Geoffrey)
Version 1.6:
- fixed GIF looping issue in older versions of ffmpeg (thanks to Geoffrey)
- added "Scale" option
- added command-line option "quick", which instantly takes a snapshot of the entire screen
- some other fixes and internal improvements
Version 1.7:
- added tooltip that clarifies 'Window' and 'Region' modes
- when "Number of frames" = 1, "Frames per seconds" gets insensitive (works only if Gtkdialog >= 0.8.3)
- support for photocamera.svg icon from Woof-CE
Version 1.8:
- Added "Toggle extra options" togglebutton, which shows/hides "Number of frames" & "Frames per second" options
- Settings are retained also if TAS window has been closed without taking a screenshot
- Some minor fixes & changes
Version 1.9:
- compatibility with avconv
Version 1.10:
- possible fix for supposed avconv/ffmpeg clash (problem reported by Relztrah)
- fixed date/time stamps not being calculated correctly if DELAY and/or Window/Region modes has been used
Version 1.11:
- disabled beep for Quickshot (it's taken immediately, so there's no point to have it)
- added checkbox "Beep on Shot" (thanks to MochiMoppel)
- can use avplay/ffplay (they support more formats than aplay) as a player for BEEPFILE - aplay as a fallback
- standard beep command as a fallback, if /usr/share/audio/beep_high.wav doesn't exist (thanks to MochiMoppel)
- the default BEEPFILE as well as DEFAULTIMAGEVIEWER and DEFAULTIMAGEEDITOR can be specified in ~/.take_a_shot.rc config file (no need to edit the code anymore)
- added checkbox "Show timer" - it displays a timer in the center of the screen if DELAY > 0
Version 1.12:
- fix for different treatment of newline by 'read' cmd in Bash-4.4 (thanks to peebee & 01micko)
- fix for newer ffmpeg that does not recognize '+nomouse' option anymore
- can make use of xrectsel, if available
- ditched xmessage; everything's done in Gtkdialog now
- minor corrections/fixes
Version 1.13:
- removed 'Add datestamp' and 'Add timestamp' checkboxes; instead a user can freely insert date's % parameters into filename
- fix: some ancient versions of ffmpeg may not support '-draw_mouse' option
- minor corrections
Version 1.14:
- fix: replace slashes to underscores in filename after evaluating date format options (thanks to MrDuckGuy)
Version 1.15:
- added 'Discard' button to the preview dialog (thanks to MochiMoppel)
- increased the size of the preview image (1/5 -> 1/3)
Have fun &
Greetings!