Page 1 of 1

TAG -- Take a Gif

Posted: Wed Sep 28, 2022 2:41 pm
by mikeslr

I'm not sure that fredx181's application can easily be found. You can find out about it and download an earlier version from here, https://oldforum.puppylinux.com/viewtop ... 5#p1056555

tkagif-2.0.pet
(70.21 KiB) Downloaded 121 times

----------------------------------------------------------------------------------------------
EDIT by fredx181: New tkagif package v2.1 with small improvement, see info: viewtopic.php?p=141670#p141670

tkagif-2.1.pet
31-01-2025 new tkagif v2.1
(72.99 KiB) Downloaded 11 times

@ Moderators. Don't hesitate to transfer author-status of this thread to fredx181 if he wants it.


Re: TAG -- Take a Gif

Posted: Wed Sep 28, 2022 3:08 pm
by fredx181
mikeslr wrote:

@ Moderators. Don't hesitate to transfer author-status of this thread to fredx181 if he wants it.

Fine as it is now IMO, thanks for the pointer about TAG Mike !


Re: TAG -- Take a Gif

Posted: Fri Nov 11, 2022 7:42 pm
by AntonioPt

hi there @fredx181

Didn't run your app yet but since your app comes from TAS you will need to update this :) in order to be able to run in Wary and Racy because bash version will creat an issue
if i found some else more i will let you know but for now this is it :)

Best regards Antonio if you got a lang pack i can do the translation of the Portuguese and Brazilian lang :)

Code: Select all

export GUI_DLG='
<window title="'${PROG_NAME}'-'${PROG_VERSION}'" resizable="false" image-name="'${ICON}'" window-position="1">
    <vbox>
        <frame '${DLG_TITLE}'>
            <pixmap><input file stock="'${DLG_ICON}'"></input></pixmap>
            <vbox spacing="1">
        '` while (($#)) ; do
             echo "${1//\"/_}" | while IFS="" read -r LINE ; do
               echo '<text><label>"'${LINE//\\/_}'"</label></text>'
             done
             shift
           done `'
            </vbox>
        </frame>
        '` if [ "$DLG_BTN" = "OK"   ] ; then echo "<hbox><button ok><action>EXIT:OK</action></button></hbox>" ; fi `'
        '` if [ "$DLG_BTN" = "CONT" ] ; then echo
        '<hbox>
            <checkbox>
                <default>false</default>
                <variable>WARN_CHECKBOX</variable>
                <label>"'$(gettext "Don't show this warning again")'"</label>
            </checkbox>
            <text space-expand="true" space-fill="true" visible="false"><label>" "</label></text>
            <button>
                <label>"'$(gettext "Continue")'"</label>
                <input file stock="gtk-redo"></input>
                <action>EXIT:CONTINUE</action>
            </button>
        </hbox>'
        fi`'
    </vbox>
    <action signal="hide">exit:abort</action>
</window>'

${GTKDIALOG} -pc GUI_DLG
}

Re: TAG -- Take a Gif

Posted: Fri Nov 11, 2022 11:38 pm
by AntonioPt

After fixing some issue i found in TAS

Now i got a difrent one GIF animation claims that file dosen't exist
There it goes a print with terminal error

takagif.png
takagif.png (62.82 KiB) Viewed 2284 times

Best Regards


Re: TAG -- Take a Gif

Posted: Sat Nov 12, 2022 2:38 am
by Sofiya
mikeslr wrote: Wed Sep 28, 2022 2:41 pm

In this regard, Tas suits me quite well.


Re: TAG -- Take a Gif

Posted: Sat Nov 12, 2022 9:16 am
by fredx181
AntonioPt wrote:

....
Now i got a difrent one GIF animation claims that file dosen't exist
There it goes a print with terminal error

Not sure what causes it, could be that your ffmpeg version is too old.
Also note that this is not expected to work on a very old Puppy version.


Re: TAG -- Take a Gif

Posted: Sat Nov 12, 2022 10:02 pm
by AntonioPt
fredx181 wrote: Sat Nov 12, 2022 9:16 am
AntonioPt wrote:

....
Now i got a difrent one GIF animation claims that file dosen't exist
There it goes a print with terminal error

Not sure what causes it, could be that your ffmpeg version is too old.
Also note that this is not expected to work on a very old Puppy version.

From what i could see and tell its that he makes mkv then delete it before making GIF but let me see if i can see a solution but yes you may be right all so


Re: TAG -- Take a Gif

Posted: Sun Nov 13, 2022 3:28 pm
by AntonioPt

hi @fredx181

i was testing this peace of your code and at the end the file ${WORKDIR}/tmp-tkagif.mkv as well folder is deleted and has you can see i exit before i tell to delete,...
im guessing this is my be the issue

Code: Select all

$FFMPEG -y -t "$SETDUR" -f x11grab ${DRAW_MOUSE_OPT} -s "${WIDTH}"x"${HEIGHT}" -r 5 -show_region 1 -i ${DISPLAY}${OFFSET}${POINTER} -c:v libx264 -crf 30 -preset veryfast -pix_fmt yuv420p -vf "$SCALE_CMD" "${WORKDIR}/tmp-tkagif.mkv" > /dev/null 2>&1 < /dev/null & FFPID=$!
# cheking if ffmpeg is still running
while ps aux | grep -i '[f]fmpeg' ; do
	echo "ffmpeg still running"
done

echo " not running lets move to next task"
exit

Re: TAG -- Take a Gif

Posted: Sun Nov 13, 2022 4:22 pm
by fredx181

I'm guessing that the commands (to create .gif) just before removing tmp-tkagif.mkv fail because of too old ffmpeg (but to be honest, didn't test on Wary or Racy, which I think you use)

Code: Select all

  func_dlg INFO_NOOK "$(gettext 'Please wait, processing the GIF file...')" & DLGPID=$!

palette="/tmp/palette.png"
filters="fps=30,scale=-1:-1:flags=lanczos" 
$FFMPEG -i "${WORKDIR}/tmp-tkagif.mkv" -loop 0 -vf "$filters,palettegen" -y $palette
$FFMPEG -i "${WORKDIR}/tmp-tkagif.mkv" -i $palette -loop 0 -lavfi "$filters [x]; [x][1:v] paletteuse" -y "${SAVENAME}"
rm -f "${WORKDIR}/tmp-tkagif.mkv"

I'd say better try the program on a newer Puppy (e.g. Bionic, has newer ffmpeg) and probably you'll see that it works OK.

EDIT: Well, don't know, looking at your screenshot it seems indeed that tmp-tkagif.mkv isn't found, so the error may occur in an earlier stage already.
Btw, the script to run is '/usr/local/takeagif/AppRun', you should not run '/usr/local/takeagif/usr/bin/tkagif'


Re: TAG -- Take a Gif

Posted: Sun Nov 13, 2022 4:49 pm
by AntonioPt

Hi @fredx181
Thxx any way and yes in new puppys works like a sharm :) i was just trying to make it universal thats all :)


Re: TAG -- Take a Gif

Posted: Sun Nov 13, 2022 5:23 pm
by Sofiya
fredx181 wrote: Wed Sep 28, 2022 3:08 pm

I'm testing on Vanilla Dpup says the file no longer exists


Re: TAG -- Take a Gif

Posted: Sun Nov 13, 2022 6:17 pm
by fredx181

@Sofiya Had to install ffmpeg and libimlib2 and it works OK for me on Vanilla-Dpup.


Re: TAG -- Take a Gif

Posted: Sun Nov 13, 2022 6:26 pm
by Sofiya

I admit my cant, for some reason I did not have libimlib2 installed :D
repackage package add dependencies and language translation
tkagif-2.0|tkagif|2.0|||216K||tkagif-2.0.pet|+ffmpeg +libimlib2|tkagif-portable||trusty||
I like it because here you can choose the quality of the gif
Thanks for the correction! @fredx181


Re: TAG -- Take a Gif

Posted: Sun Dec 11, 2022 10:04 am
by Sofiya

:thumbup:
Language-Russian


Re: TAG -- Take a Gif

Posted: Mon Dec 19, 2022 5:00 pm
by wizard

Using Fossapup64 9.5 which has TKAGIF 2.0.

When I click the Take A Gif! button, my screen dims, and it creates a dim gif. Is there a way to control brightness?

Thanks
wizard

dim-gif1.gif
dim-gif1.gif (58.15 KiB) Viewed 2078 times

Re: TAG -- Take a Gif

Posted: Mon Dec 19, 2022 5:05 pm
by Jasper

I have just seen this and checked it out myself on the same build fossapup64-95 and I experience the same issue myself.

Never used the application before.


Re: TAG -- Take a Gif

Posted: Mon Dec 19, 2022 5:34 pm
by fredx181
wizard wrote:

When I click the Take A Gif! button, my screen dims, and it creates a dim gif. Is there a way to control brightness?

Mmm... yes, has to do with the compositor (picom) enabled by default in Fossapup, stopping it before creating .gif will fix it, don't know a better fix, sorry.

Stop picom
Stop picom
Screenshot(2).gif (144.37 KiB) Viewed 2069 times

Re: TAG -- Take a Gif

Posted: Mon Dec 19, 2022 6:11 pm
by wizard

@fredx181

The fact you know how to fix it is enough

Thanks
wizard


New Take a Gif v2.1

Posted: Fri Jan 31, 2025 1:36 pm
by fredx181
wizard wrote: Mon Dec 19, 2022 5:00 pm

Using Fossapup64 9.5 which has TKAGIF 2.0.

When I click the Take A Gif! button, my screen dims, and it creates a dim gif. Is there a way to control brightness?

Thanks
wizard
dim-gif1.gif

New tkagif package v2.1 attached at first post
Added "Show region" checkbox , the fact that it was enabled by default gave the unwanted dark effect when compositing enabled.
Btw, that's on FossaPup, on BookwormPup64 there's no problem even when compositor is active, don't know why (so actually this v2.1 has no real purpose for BookWormPup).

Inconvenience when un-selected may be that the region mark isn't displaying during the gif creation.

2025-01-31_14-16-06.png
2025-01-31_14-16-06.png (100.35 KiB) Viewed 215 times