Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 19 Aug 2017, 20:52
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
weX and weav with scrox (weX dependency)
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 4 [56 Posts]   Goto page: Previous 1, 2, 3, 4
Author Message
fredx181


Joined: 11 Dec 2013
Posts: 2370
Location: holland

PostPosted: Tue 21 Mar 2017, 14:41    Post subject:  

The settings window of weX:



weX really deserves some promotion (works great!) and...
I'm rather exited (although off-topic, sorry) Smile that a very good quality .gif image can be created from a video with ffmpeg and function as a simple demo.
See also here (got the code for gifenc from there, see below):
http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html

Attached, gifenc.tar (remove dummy .tar and make executable) and to make a .gif from a (short) video, run e.g.:
Code:
./gifenc myvideo.mp4 mygif.gif

This will make a "looped" gif, if you want no loop (*play* it just once) change "-loop 0" to: "-loop 1" in the script.

The .gif image above is made from 87 sec duration video, gif size=1.5MB

PS: It would be nice also maybe if a screencast can be made directly into a .gif, didn't investigate if possible though.

Fred
gifenc.tar
Description  gifenc, remove dummy .tar and make executable
tar

 Download 
Filename  gifenc.tar 
Filesize  259 Bytes 
Downloaded  30 Time(s) 

_________________
Dog Linux website

Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3194
Location: New Zealand

PostPosted: Tue 21 Mar 2017, 17:18    Post subject:  

Nice! I didn't actually notice at first that the image was an animated gif.

Since weX will itself pass out the created video path/name to one of its external utilities, a slight mod to that gifenc script will allow it to immediately be used as one of the Post-Processing utilities (adding a button to the weX gui).

You just need to press the bottom Edit (list of Post-Processing Utilities) button and modify the "Processing Utilities" list to make gifenc one of its members (not the "Other Utilities" cos the path/name doesn't get passed out to these ones). The mod required is obviously just to use $1 but with its extension replaced with .gif. I haven't tried this, but I think the following will do the job:

${1%.*}.gif

That is, gifenc becomes:

Code:

#!/bin/sh

palette="/tmp/palette.png"

filters="fps=10,scale=550:-1:flags=lanczos"

ffmpeg -ss 1 -v warning -i $1 -loop 0 -vf "$filters,palettegen" -y $palette
ffmpeg -ss 1 -v warning -i $1 -i $palette -loop 0 -lavfi "$filters [x]; [x][1:v] paletteuse" -y ${1%.*}.gif


Thanks for the utility,

William

_________________
SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 2370
Location: holland

PostPosted: Tue 21 Mar 2017, 18:26    Post subject:  

Hi William,

Quote:
You just need to press the bottom Edit (list of Post-Processing Utilities) button and modify the "Processing Utilities" list to make gifenc one of its members (not the "Other Utilities" cos the path/name doesn't get passed out to these ones).


Ah, like this I think:


Getting to0 late here. Forgot the quotes, but just enjoyed uploading another animated gif Laughing
Will try further tomorrow what you suggested, reading the instructions in user_utilities text file I think I understand, where the icon goes etc...

EDIT: No, I think I have to replace one of the 7 wex_utility lines by gifenc

Fred

_________________
Dog Linux website

Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3194
Location: New Zealand

PostPosted: Tue 21 Mar 2017, 20:37    Post subject:  

fredx181 wrote:


EDIT: No, I think I have to replace one of the 7 wex_utility lines by gifenc

Fred


Yeah, "Processing Utilities" space goes from 00 up to 07 only (I didn't want to overly clutter the interface). Of course, since a utility can be a script, that script could be used to provide a submenu to further utilities...

As for 'promotion', indeed if usage was a measure then weX must be one of my least successful programs! hahaha But, yeah, that's funny for me cos its probably easily my best (even just as an audio recorder like alone the rest of it). But I really don't mind if it lies in obscurity - main reason I keep it up to date is because it does what I want it to and I'm glad I added the plugin/external-utilities options because, even for me the author it is easier to update/fix the program via these than trying to muck around modifying the already pretty huge script.

I am planning to try and make it work with busybox ash (for tinycore though) and avoid gtkdialog bashism related problems from now on) - quite a big rewrite required for that though (functions can't be exported and so on) - actually want to make the gui part language agnostic so I can more easily code that in C/gtk, or Lua, or fltk or whatever since most of the underlying real work is just shell script. Got to get away from relying on gtkdialog (which is also painful to debug) since not adopted by major distributions.

William

EDIT: Love your animated mini-tutorial gifs by the way, though I guess they will vanish one day since most people don't keep their dropbox and similar storage accounts forever... Still, its a neat idea.

_________________
SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 2370
Location: holland

PostPosted: Wed 22 Mar 2017, 15:10    Post subject:  

Hi William (and everyone), got it working now with gifenc button as one of the "Processing Utilities" in weX.
Modified the gifenc script according to your suggestions and (because I wanted to see output) made it to show progress (or possibly errors) in a xterm window.
Attached new gifenc script (remove dummy .tar and make executable)

Mini-how-to (how I did):

- Put the attached gifenc script in /usr/local/bin (or somewhere else in PATH)
- Click the Edit button on the right bottom of weX settings window (see screenshot: edit_processing-utilities.png)
- Replace pschedule with gifenc (as screenshot: edit_user_utilities.gif shows) (and save the file)
(btw, I didn't bother about a new special gif icon, so kept icon of pschedule)
- Close weX, and when running again a new button appears for gifenc, see screenshot: gifenc_5th-button.png
Clicking this button should convert the last screencast video you made to .gif format. (only suitable for very short video IMO, of course)

I should mention, when running new gifenc script from terminal, only one argument is required now, e.g.
Code:
./gifenc test.mp4

And the converted to .gif file will be named then as test.gif
(Requires to have xterm installed, btw)

EDIT: If no webcam is attached on your computer, make sure the webcam checkbox is unticked, otherwise the video creation will fail.
I noticed also that after I made the change (as above described) the webcam checkbox was ticked again (had it unticked before that, so seems to have reset to the default), so just had to untick again.

EDIT2: Just tell me, William, if something's wrong (or to better write differently) about any of the above I wrote (some is rather new to me).

EDIT3: attached gifenc-yad (remove fake .gz and make executable : chmod +x gifenc-yad)
This has more options (yad GUI), such as setting the size, start time, duration
Use like this:
Code:
./gifenc-yad test.mp4

or set it as processing_utility for weX

EDIT4: Removed for now attached gifenc-yad, still trying to improve, will upload later
May 15 2017, attached gifenc-yad again, improvement: more precise adjustment for Start and Duration (with milliseconds)

Fred
gifenc_yad.png
 Description   gifenc-yad
 Filesize   31.59 KB
 Viewed   69 Time(s)

gifenc_yad.png

gifenc-yad.gz
Description  gifenc-yad (remove fake .gz and make executable)
gz

 Download 
Filename  gifenc-yad.gz 
Filesize  1.7 KB 
Downloaded  17 Time(s) 
gifenc.tar
Description  New gifenc script (remove dummy .tar and make executable)
tar

 Download 
Filename  gifenc.tar 
Filesize  382 Bytes 
Downloaded  28 Time(s) 
edit_processing-utilities.png
 Description   
 Filesize   29.68 KB
 Viewed   220 Time(s)

edit_processing-utilities.png

edit_user_utilities.gif
 Description   
 Filesize   155.58 KB
 Viewed   220 Time(s)

edit_user_utilities.gif

gifenc_5th-button.png
 Description   
 Filesize   14.53 KB
 Viewed   220 Time(s)

gifenc_5th-button.png


_________________
Dog Linux website


Last edited by fredx181 on Mon 15 May 2017, 06:04; edited 5 times in total
Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3194
Location: New Zealand

PostPosted: Wed 22 Mar 2017, 16:58    Post subject:  

Thanks Fred,

Have put a few details plus a link to your post in the first post of this thread.

William

_________________
SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 2370
Location: holland

PostPosted: Fri 24 Mar 2017, 17:24    Post subject:  

See here, animated gif by using weX (made screencast first) and post-processed by gifenc
http://murga-linux.com/puppy/viewtopic.php?p=948974#948974
It's useful and fun Laughing

Fred

_________________
Dog Linux website

Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3194
Location: New Zealand

PostPosted: Fri 24 Mar 2017, 17:35    Post subject:  

Coincidentally, I remember that Dreamchess issue (and the ubuntu fix) since I once installed it and had to search the same. I should play chess again - just waiting on my youngest kid to stop messing up the games I tried playing against his older brother - young one is 5 now so probably ready to learn to play 'properly' now - thank goodness.

Yes, good use of animated gifs for showing things not easily explained.

William

_________________
SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
Back to top
View user's profile Send private message Visit poster's website 
fredx181


Joined: 11 Dec 2013
Posts: 2370
Location: holland

PostPosted: Sun 14 May 2017, 06:59    Post subject:  

Hi All,

See EDIT3 for extended gifenc script "gifenc-yad" here:
EDIT May 15 2017, attached new gifenc-yad (EDIT4), improvement: more precise adjustment for Start and Duration (with milliseconds)
http://murga-linux.com/puppy/viewtopic.php?p=948724#948724

Simple GUI for converting video to animated gif (has more options than 'gifenc' command line script) (depends on yad)

Fred

_________________
Dog Linux website

Back to top
View user's profile Send private message 
mcewanw

Joined: 16 Aug 2007
Posts: 3194
Location: New Zealand

PostPosted: Tue 11 Jul 2017, 04:21    Post subject:  

NOTICE OF MOVE TO GITHUB

Future development work of my projects (including dCoreDog, weX, scrox, Precord, pAVrecord, Premote, DoMyCommand, DoMyFIle, xhippo-mod and those I haven't mentioned) will be moving off the forum to a to-be-opened github account.

Don't think most if any of the Puppy-usable apps/scripts themselves are accessed thru woof-CE anyway and not used in most if any current Puppies.

William

_________________
SomeOfMyWork with links:
dCoreDog
weX, scrox, Precord, Premote, fokSyfEyeR, xhippo-mod, flite_hts_pet
Back to top
View user's profile Send private message Visit poster's website 
Pelo


Joined: 10 Sep 2011
Posts: 12122
Location: Mer méditerrannée (1 kms°)

PostPosted: Wed 16 Aug 2017, 07:01    Post subject: we can use pets, or SFS for Dogs. is that wrong ?  

If these tools are not included in woof-CE pre-builds, we can use pets, or SFS for Dogs. is that wrong ?
About pRecord, this app is very useful. About pAVrecord, i must admit that SSR simple Screen Recorder is the perfect tool.

_________________
Damned Puppy, stay plugged with Papa Evil or Very Mad !
Back to top
View user's profile Send private message Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 4 of 4 [56 Posts]   Goto page: Previous 1, 2, 3, 4
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Multimedia
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0614s ][ Queries: 14 (0.0094s) ][ GZIP on ]