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 Tue 12 Dec 2017, 18:00
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to convert WebP formatted images in Tahrpup?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1397
Location: Japan

PostPosted: Tue 05 Dec 2017, 01:34    Post subject:  How to convert WebP formatted images in Tahrpup?  

My private edition of MMview supports a couple of image formats not (yet) supported in the posted version, and one of them is WebP.

It is easy to convert a WebP image to JPEG with ffmpeg:
Code:
ffmpeg -i input.webp output.jpg

I've learned that ffmpeg is not installed in Tahrpup, so how could this be done in this and other distributions that replaced ffmpeg with avconv? I've already tried avconv, but no dice Crying or Very sad

[Edit]: Cleared Fatdog's name.

.

Last edited by MochiMoppel on Tue 05 Dec 2017, 09:23; edited 2 times in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11256
Location: Gatineau (Qc), Canada

PostPosted: Tue 05 Dec 2017, 03:01    Post subject:  

Hello MochiMoppei.

Good to see you are working on a new project! Smile

In answer to your question:

Google itself has some tools for coding and decoding webp images:
https://developers.google.com/speed/webp/download

I have assembled those tools into a pet, libwebp-0.6.1-linux-x86-32.pet, available
here for the next month: http://www43.zippyshare.com/v/jAcl4HY9/file.html

Also, some webp images may be converted with imagemagick. Please see
answer # 31 on this page:
https://unix.stackexchange.com/questions/70622/command-line-convert-webp-to-jpg

I had no problem viewing the webp original images on the Google developers' page:
https://developers.google.com/speed/webp/gallery1 in my old opera 12.16.
I could have taken a snapshot with SFR's Take-a-Shot or similar to obtain a jpg.

I have successfully used the dwebp utility (from the Google package mentioned
above) to convert image 2.webp on that page to png. This png image can then be
loaded in Puppy's mtpaint for further process.

I have used this dwebp utility on xenialPup. It appears to be "distro-agnostic", but
you and / or other Puppyists may wish to confirm that it can run on other Puppies
than the xenialPup.
.
IHTH.
dwebp-help.jpg
 Description   The 1st option below ( -pam ) can be interesting for Puppyists, because most
Puppies have the pam and pbm image processing utilities.
 Filesize   142.84 KB
 Viewed   305 Time(s)

dwebp-help.jpg


_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 8660
Location: qld

PostPosted: Tue 05 Dec 2017, 07:01    Post subject:  

@musher0, I think mochimoppel wants to use what's there already.

But I don't know what's in pups that i haven't used or built but hopefully x264 is there so it can decode a .webp file. I created a file and then took a screenshot in mplayer. Maybe VLC, Xine or MPV can do similar to this.. (my input webp file is '1.webp' and i output to zz.mkv.. use what out format your vpx can support. '1.webp' I used is available from http://www.gstatic.com/webp/gallery/1.webp).

Code:
x264 -o zz.mkv 1.webp ; mplayer -frames 1 -vo jpeg:outdir=/root 1 zz.mkv


Direct the output file wherever but _my_ mplayer defaults to '00000001.jpg'.

_________________
Puppy Linux Blog - contact me for access
Back to top
View user's profile Send private message Visit poster's website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1397
Location: Japan

PostPosted: Tue 05 Dec 2017, 07:45    Post subject:  

musher0: Thanks. I'm aware of the tools you mentioned but I doubt that they are shipped with Tahrpup. I may be wrong.
01micko: Though x264 is installed in Slacko5.6 it doesn't seem to work. I can't even call up the usage info Crying or Very sad
Code:
# /usr/bin/x264 --help
/usr/bin/x264: error while loading shared libraries: libavformat.so.54: cannot open shared object file: No such file or directory

Last edited by MochiMoppel on Tue 05 Dec 2017, 09:21; edited 1 time in total
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1645

PostPosted: Tue 05 Dec 2017, 08:02    Post subject: Re: How to convert WebP formatted images in Tahrpup/Fatdog?  

MochiMoppel wrote:
I've learned that ffmpeg is not installed in Tahrpup and Fatdog, so how could this be done in these distributions? I've already tried avconv, but not dice Crying or Very sad

Of course there is ffmpeg in Fatdog OOTB.
Tahrpup ships with avconv instead, but just checked and like you said, it can't handle webp...

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1397
Location: Japan

PostPosted: Tue 05 Dec 2017, 09:14    Post subject:  

Sorry, must have mixed it up. I'll correct my posts - of course Laughing
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11256
Location: Gatineau (Qc), Canada

PostPosted: Tue 05 Dec 2017, 12:43    Post subject:  

To 01micko, MochiMoppei and all.

I am not a diviner. Posters should state a complete question properly, with
complete background.

In any case, I do not regret spending three hours yesterday evening
doing research on a valid solution that will benefit all Puppyists.


Have a boring day giving no background to anyone, everyone.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11256
Location: Gatineau (Qc), Canada

PostPosted: Thu 07 Dec 2017, 17:54    Post subject:  

Sorry for having been a grouch the other day.

Mutatis mutandis, the following two lines will give MochiMppei what he wants in a
cinch, using Google's dwebp and netpbm's pnmtojpeg:
Code:
dwebp 2.webp -ppm -o 2.ppm
pnmtojpeg -quality=99 2.ppm > 2.jpg

BFN
TahrPup-606_has_pnmtojpeg.jpg
 Description   
 Filesize   33.29 KB
 Viewed   65 Time(s)

TahrPup-606_has_pnmtojpeg.jpg


_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)

Last edited by musher0 on Fri 08 Dec 2017, 00:15; edited 2 times in total
Back to top
View user's profile Send private message 
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1324

PostPosted: Thu 07 Dec 2017, 21:49    Post subject:  

MochiMoppel wrote:
01micko: Though x264 is installed in Slacko5.6 it doesn't seem to work. I can't even call up the usage info Crying or Very sad
Code:
# /usr/bin/x264 --help
/usr/bin/x264: error while loading shared libraries: libavformat.so.54: cannot open shared object file: No such file or directory

Interesting. I looked at mine in Slacko 5.7 and x264 --help gave the same message as you. It looks like three of the libraries (pulled from ffmpeg-2.0-i686-s14.0.pet) are .01 version too new for x264-snapshot-20120804-2245-i686.pet, and you either have to download x264-20120712-i486-1gv.txz from Salix to match ffmpeg2 or use ffmpeg-0.11.1-i686.pet to match the x264.

edit: Another option that worked for me was the x264-20131101-2245-i686_slk600.pet from Slacko 14.1 instead of Salix.
Screenshot.png
 Description   symlinking the 55s to 54 and 52 to 51 for puppy-20120804 wasn't enough
 Filesize   34.94 KB
 Viewed   139 Time(s)

Screenshot.png

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


Joined: 04 Jan 2009
Posts: 11256
Location: Gatineau (Qc), Canada

PostPosted: Fri 08 Dec 2017, 00:29    Post subject:  

Hello all.

I just added proof that tahrPup-606 has the pnmtojpeg utility in my message above:
http://murga-linux.com/puppy/viewtopic.php?p=976446&sort=lastpost#976446

Since pnmtojpeg is 13,9 Kb, and already in tahrPup, IMO it's not worth updating /
correcting the whole libav library -- if converting a webp image to jpg is the only
thing you wish to do. You embark the rather small webp package from Google (one
can even trim it further), you adapt my two-liner, and you're on your way.

But of course the Earth is round (sort of), and people are free!!!

BFN.

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1397
Location: Japan

PostPosted: Fri 08 Dec 2017, 03:38    Post subject:  

Sailor Enceladus wrote:
Another option that worked for me was the x264-20131101-2245-i686_slk600.pet from Slacko 14.1.
Yeah, the --help option works now, that's a start Laughing
Unfortunately that doesn't mean that it can convert any webp image into a mkv container. When I try 01micko's x264 command I get an empty mkv file, accompanied by a funny error message:
Code:
lavf [info]: 187x310p 0:1 @ 0/0 fps (cfr)
resize [error]: resolution 187x310 is not compliant with colorspace i420

Even if it would work I couldn't use it as a workaround for Tahrpup users: Tahrpup (I tested 6.0.5) doesn't ship with x264 ...
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0549s ][ Queries: 15 (0.0073s) ][ GZIP on ]