Page 2 of 2
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Feb 13, 2024 2:38 am
by AntonioPt
Hello Everyone,
I manager to shrink a bit more tas code and update as well still one issue i saw i didnt fix it since need to wait for more days without reboot OS
Hope it helps anyone
Code: Select all
Add it : To shrink GTK code
############################################################
# Functions to avoid Repeating GTK some code over and over #
############################################################
BTN_LAB_INP () { echo '<button><label>"'$1'"</label><input file stock="gtk-'$2'"></input><action>'$3'</action></button>' ; }
export -f BTN_LAB_INP
CHECKBOX_00 () { echo '<checkbox><label>"'$1'"</label><variable>'$2'</variable><default>'$3'</default></checkbox>' ; }
export -f CHECKBOX_00
RADIOBTN_00 () { echo '<radiobutton><label>"'$1'"</label><variable>'$2'</variable><default>'$3'</default></radiobutton>' ; }
export -f RADIOBTN_00
PIXMAP_00 () { echo '<pixmap><input file>'$1'</input><width>'$2'</width> <height>'$3'</height></pixmap>' ; }
export -f PIXMAP_00
-------------------------------------------------------
Removed :
if [ "$FFMPEG" = "ffmpeg" ] && [ "$FORMAT" = "GIF" ] ; then
Add it :
if [ "$( echo $FFMPEG | grep "ffmpeg")" ] && [ "$FORMAT" = "GIF" ] ; then
-------------------------------------------------------
Removed :
if [ ! "`which ffmpeg 2>/dev/null`" ] && [ ! "`which avconv 2>/dev/null`" ] ; then
func_dlg ERROR "$(gettext "Please install 'ffmpeg' or 'avconv' first!")"
exit 1
fi
Add it :
export FFMPEG="`which ffmpeg avconv | head -1`"
[ -z "$FFMPEG" ] && func_dlg ERROR "$(gettext "Please install 'ffmpeg' or 'avconv' first!")" && exit 1
-------------------------------------------------------
Removed :
[ "`which avconv 2>/dev/null`" ] && FFMPEG=avconv || FFMPEG=ffmpeg
-------------------------------------------------------
Removed :
if [ "$FFMPEG" = "ffmpeg" ] ; then
Add it :
if [ "$( echo $FFMPEG | grep "ffmpeg")" ] ; then
-------------------------------------------------------
Removed :
if [ "$PLAYER" = "aplay" ] ; then
$PLAYER "${BEEPFILE}" >/dev/null 2>&1
else
$PLAYER -vn -nodisp -autoexit "${BEEPFILE}" >/dev/null 2>&1
fi
Add it :
[ "$( echo $PLAYER | grep "aplay")" ] && opt='' || opt=" -vn -nodisp -autoexit "
$PLAYER "$opt" "${BEEPFILE}" >/dev/null 2>&1
-------------------------------------------------------
Removed :
PLAYER=aplay
for i in avplay ffplay; do
which $i >/dev/null 2>&1 && { PLAYER=$i; break; }
done
Add it :
export PLAYER="`which avplay ffplay aplay | head -1`"
[ -z $PLAYER ] && echo "No audio player install so..."
Remove fake gz
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Feb 13, 2024 7:06 am
by Jasper
@AntonioPt
Thanks for the update ![Thumbup :thumbup:](./images/smilies/thumbup.gif)
Remove the .gz extension and then right click on the file to script and set the Permissions to be Executable.
Overwrite the existing file in
/usr/bin
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Feb 13, 2024 7:47 am
by MochiMoppel
AntonioPt wrote: ↑Tue Feb 13, 2024 2:38 am
I manager to shrink a bit more tas code <snip>
Code: Select all
Removed :
if [ "$FFMPEG" = "ffmpeg" ] && [ "$FORMAT" = "GIF" ] ; then
Add it :
if [ "$( echo $FFMPEG | grep "ffmpeg")" ] && [ "$FORMAT" = "GIF" ] ; then
Looks like you increased the code
It's also less efficient and may even produce different results.
Not really my business, but I suggest that you do not post your altered and unofficial tas version. May cause confusion. Instead let @JakeSFR decide on which changes to make - if any. I'm sure he will include your suggestions in the next official release if he finds them useful.
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Feb 13, 2024 11:47 am
by AntonioPt
Hi @MochiMoppel
1 of all thankyou for your feedback,... 2 i just wanna share the change i did and wanna know what @JakeSFR think about it and if is usefull then do what ever if not just let me know i would love to know what i did or didnt not wrong
thats all and my gold is to help not to creat issues,...
im guessing you didnt notice i all so change this peace of the code so the output will be difrent all so ![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
$FFMPEG == /ffmpeg_path/ffmpeg or avconv_path/avconv and so
if [ "$FFMPEG" = "ffmpeg" ] && [ "$FORMAT" = "GIF" ] ; then will no work thats why
![Thumbup2 :thumbup2:](./images/smilies/thumbup2.gif)
Code: Select all
export FFMPEG="`which ffmpeg avconv | head -1`"
[ -z "$FFMPEG" ] && func_dlg ERROR "$(gettext "Please install 'ffmpeg' or 'avconv' first!")" && exit 1
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Feb 13, 2024 11:54 am
by AntonioPt
Hi @Jasper ,
Glad to know its working on your machine just keep in mind like @MochiMoppel said it aint official yet ![Smile :)](./images/smilies/icon_e_smile.gif)
P.S. gonna add some extra gettex that i didnt add it while i was making changings that for you may not be an issue but for me or any none English person will be ![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Jasper wrote: ↑Tue Feb 13, 2024 7:06 am
@AntonioPt
Thanks for the update ![Thumbup :thumbup:](./images/smilies/thumbup.gif)
Remove the .gz extension and then right click on the file to script and set the Permissions to be Executable.
Overwrite the existing file in
/usr/bin
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Feb 13, 2024 1:24 pm
by AntonioPt
hey all, just update in to my scrit this small code to add gettext in order to be translated better and i all so add <text use-markup=\"true\"> too
Add
Code: Select all
# define audio player
export PLAYER="`which avplay ffplay aplay | head -1`"
[ -z $PLAYER ] && func_dlg INFO "$(gettext "avplay, ffplay or aplay are not install so no sound will be played.")" \
"" \
"$(gettext "Press <b>ok</b> to continue.")"
@Jasper add it to your script
made all so a new po file since there is more text that need to be translated for who ever wants to do so
Re: Take a Shot! - yet another screenshot utility...
Posted: Mon Mar 25, 2024 3:12 pm
by Jasper
@JakeSFR
I am using JammyPup64 and TAS 1.17.
I recently compiled and updated OpenSSL (Library: 3.0.13 LTS 30 Jan 2024) and encountered a problem when using the application:
![Image](https://i.ibb.co/pP7pvN2/Screenshot.png)
The original build works fine:
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
Re: Take a Shot! - yet another screenshot utility...
Posted: Mon Mar 25, 2024 3:18 pm
by fredx181
Jasper wrote: ↑Mon Mar 25, 2024 3:12 pm
@JakeSFR
I am using JammyPup64 and TAS 1.17.
I recently compiled and updated OpenSSL (Library: 3.0.13 LTS 30 Jan 2024) and encountered a problem when using the application:
.....
The original build works fine:
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
I'd say that's more like a ffmpeg problem than a TAS problem (TAS depends on a working ffmpeg).
Probably ffmpeg on itself won't work? (as it doesn't play well with the newer OpenSSL)
Re: Take a Shot! - yet another screenshot utility...
Posted: Mon Mar 25, 2024 3:42 pm
by Jasper
@fredx181
Thanks for the reply.
This is the FFMpeg on JammyPup64
![Image](https://i.ibb.co/7gQ12Zx/Screenshot-1.png)
I have compiled up to date builds of FFMpeg and know that I end up with a larger application when I incorporate SSL/GnuTLS.
The only change I made to my config for OpenSSL was to include:
no-deprecated
Apart from that it remains the same and passes all tests.
Re: Take a Shot! - yet another screenshot utility...
Posted: Mon Mar 25, 2024 3:48 pm
by fredx181
@Jasper So to be clear, you're saying that ffmpeg works OK ? (with the new openssl installed). Did you do something with ffmpeg to test ?
edit: btw, I don't see --enable-openssl in your screenshot.
Re: Take a Shot! - yet another screenshot utility...
Posted: Mon Mar 25, 2024 4:25 pm
by Jasper
@fredx181
The FFMpeg build is the default one included in the OS.
I have made builds for Fossapup64-95 from 5.1.x up to 6.1.1
![Image](https://i.ibb.co/rMkCQGv/Screenshot.png)
and never encounter an issue flagging FFMpeg using TAS.
Re: Take a Shot! - yet another screenshot utility...
Posted: Mon Mar 25, 2024 4:37 pm
by Jasper
FFMpeg works fine
![Image](https://i.ibb.co/WPhVhQq/Screenshot-1.png)
Re: Take a Shot! - yet another screenshot utility...
Posted: Mon Mar 25, 2024 4:42 pm
by fredx181
Jasper wrote: ↑Mon Mar 25, 2024 4:37 pm
FFMpeg works fine
...
Ok, then... mystery for me why TAS throws that error (undefined_symbol ...) about ffmpeg and openssl ![Question :?:](./images/smilies/icon_question.gif)
edit: well, now I see you cheated
that's ffplay you tested, not ffmpeg ...
Re: Take a Shot! - yet another screenshot utility...
Posted: Mon Mar 25, 2024 5:31 pm
by Jasper
@fredx181
Sorry, just converted the audio track from m4a to Opus and then played back the track.
Should have used that screenshot. Too much info to display fully on a laptop.
![Image](https://i.ibb.co/ThSnrV7/ffmpeg-convert.png)
Regardless, it does work.
@user1234 checked the OpenSSL build and it gave errors.
Flagged this up, simply as I was unsure why there was a call to OpenSSL.
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 3:02 pm
by JakeSFR
@AntonioPt: Thanks, I appreciate your input, but I took a peek at your changes and I fail to see what actual problem(s) (to the end-user) do they solve, nor what new features they introduce.
There's a lot of formatting and cosmetic changes, though.
When/if I decide to add new features to TAS, then maybe I'll think about some cosmetic changes as well.
___________
ffmpeg: symbol lookup error: /lib/x86_64-linux-gnu/librabbitmq.so.4: undefined symbol: SSL_CTX_use_RSAPrivateKey, version OPENSSL_3.0.0
@Jasper: The message clearly shows that there is a mismatch between FFMPEG and the new OpenSSL lib (via librabbitmq?).
There's literally nothing I can do about it on TAS level.
But I'm puzzled that FFMPEG works otherwise for you. Does this command also work (use your screen resolution)?
Code: Select all
ffmpeg -y -f x11grab -s 1600x900 -r 25 -i :0 -vframes 1 -pix_fmt rgb24 out.png
Greetings!
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 3:09 pm
by Jasper
@JakeSFR
Thanks for the feedback!
Just to clarify, I am using the default OpenSSL and FFMpeg included within the OS.
![Image](https://i.ibb.co/k99m3Nf/Screenshot.png)
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 3:15 pm
by Jasper
Changed the resolution to 1600x900 and this has introduced some tearing as you can see in the screenshot.
Still complains that the output is not able to be captured ![Embarrassed :oops:](./images/smilies/icon_redface.gif)
![Image](https://i.ibb.co/SJ8DktH/Screenshot-1.png)
![Image](https://i.ibb.co/9spRJYr/Screenshot-2.png)
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 3:23 pm
by Jasper
Changed the resolution to match my display output 1366x768
![Image](https://i.ibb.co/6DJDFVx/Screenshot-3.png)
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 3:47 pm
by JakeSFR
Jasper wrote: ↑Tue Mar 26, 2024 3:09 pm
Just to clarify, I am using the default OpenSSL and FFMpeg included within the OS.
Changed the resolution to match my display output 1366x768
Ok, everything seems to work just fine. And yet TAS still shows that error?
Greetings!
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 3:52 pm
by Jasper
@JakeSFR
The error only appeared when I upgraded OpenSSL.
I thought I would share this with you as a potential issue.
I am unsure as to why, my only guess is that I choose to remove deprecated code when compiling OpenSSL.
The only new variable I included in the compiling was to add the variable:
no-deprecated
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 3:57 pm
by JakeSFR
Oh, ok, now I understand.
Well, with that new OpenSSL you would most likely also have to rebuilt FFMPEG against it (and possibly that other library).
Greetings!
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 4:48 pm
by Jasper
@JakeSFR
For my sanity's sake, I recompiled OpenSSL using this:
Code: Select all
./config --prefix=/usr --openssldir=/usr/ssl
This is the basic setting for Ubuntu based Puppies eg FossaPup/JammyPup.
Just as before, run the tests to ensure everything is okay.
![Image](https://i.ibb.co/WptvsDC/test-openssl.png)
Just tried out your application and it works perfectly ![Thumbup :thumbup:](./images/smilies/thumbup.gif)
![Image](https://i.ibb.co/pz8KPs1/Screenshot.png)
So, OpenSSL must require the older "deprecated" code to be included.
Hope this all makes sense?
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 5:13 pm
by JakeSFR
Yep, apparently FFMPEG in JammyPup64 makes use of OpenSSL's deprecated stuff.
In Fatdog's build we also don't use no-deprecated
option.
Greetings!
Re: Take a Shot! - yet another screenshot utility...
Posted: Tue Mar 26, 2024 6:06 pm
by AntonioPt
hello @JakeSFR , you are wellcome glad i could help some how ![Smile :)](./images/smilies/icon_e_smile.gif)