Как работать с графикой, звуком и видео

HOWTO: Multimedia

Puppy has an excellent range of multimedia editing, conversion and viewing tools. The links are to «help» pages on each program.

Note that the links will only exist if the appropriate package is installed. Puppy is now highly customisable, with the introduction of Puppy Unleashed, and a live-CD can easily be built with packages of your choice. The main Help page is automatically edited by the Puppy Unleashed build script to only have links to help files that actually exist, but not so these HOWTO pages. I have greyed-out the packages that may not be in the 'standard' release (non-customised) of Puppy -- but, they are all installable using the PupGet package manager.

Graphics

Puppy has a very useful collection of applications and utilities for manipulating graphic images, both bitmap and vector. Note that there has been a trend away from the gif format due to a patent on the LZW compression algorithm, however that patent has expired in all (as far as I can determine) countries of the world, so I do not consider this to be an issue any more.

The following table is a summary:

xpaint
Xpaint is a bitmap (raster) picture editor and viewer. Formats that can be opened and saved are gif, ico, jpeg, png, ppm, ps, pdf, tiff, xbm, xpm and xwd
MTPaint
This is another bitmap image editor, and specialises in pixel-level editing of images, especially icons. I have found mtPaint to be an excellent general-purpose paint program.
In fact, my opinion of mtPaint keeps going up, as the author is developing it rapidly. The 0.45 version supports scaling of images, which is a serious shortcoming of Xpaint. V0.50 supports rotation by an arbitrary angle. Even cropping, that is supported in Xpaint, is much more sophisticated in mtPaint.
figurine
Figurine is a vector image editor and the native format is fig. Only fig files can be opened, however Figurine can use fig2dev to export to a variety of vector and bitmap formats. Note that Figurine does not show the option to export to svg although fig2dev supports it. I intend to modify the source code of Figurine to fix this, however for now conversion from fig to svg can be achieved by using fig2dev directly on the commandline.
dia
A very nice vector graphics editor with libraries of shapes. Can import/export bitmap, xfig and svg formats. One disadvantage is that text and shapes cannot be arbitrarily rotated, however it will be possible to perform arbitrary rotations in Figurine and import into DIA. Libraries of custom shapes can be created.
The documentation is online: http://www.gnome.org/projects/dia/docs.html.
sodipodi
A very sophisticated SVG vector editor. SVG means «Scalable Vector Graphics» and is the open source equivalent of Flash. That is, vector diagrams, animation, user interaction on web pages. SVG plugins are available for all major web browsers, the most popular is from Adobe (a free download). However, even if you are not interested in SVG as-such, Sodipodi is a great creation tool for drawings that can be exported to PNG raster or Postscript (and indirectly to PDF and other vector formats via GSview) formats.
Documentation is to be found at www.sodipodi.com and a tutorial is at http://hawthorn.csse.monash.edu.au/%7Enjh/programming/draw-packages/sodipodi/
InkLite
This is a fork of an early version of Inkscape, and is basically the same as Sodipodi, with a few tweaks and a conventional user interface. The Sodipodi documentation applies to InkLite.
inkscape
This is the big brother of InkLite. Originally it was a fork of Sodipodi, then got converted from C to C++ then later required the GTKmm and Glibmm libraries. It also has many more features. Consequently it is very big. Inkscape may not be in the 'standard' Puppy but is available as a PupGet package. Online documentation: http://www.inkscape.org/doc/index.php?css=css/base.css
impress
This is a very interesting Tcl/Tk GUI application for creating slide presentations. Not up to «Powerpoint» standard though.
Impress can rotate objects by any arbitrary angle, and is supposed to also be able to rotate text. It does this by using the pstoedit program to vectorise text, which can then be rotated. However, text rotation is a «work in progress» as it currently does not work and I have sent an email to the author, awaiting a reply.
One more thing -- the author reports that PowerPoint can export in Postscript format, which Impress can import quite well. See the Impress documentation.
imposter
This is a player for presentations created with Open Office Impress. You cannot actually create these presentations in Puppy, just play them. If Impress can import PowerPoint presentations, that would be a route to be able to play them on Puppy. Imposter is a GTK2 application, so has antialiased fonts. Home page: http://imposter.sourceforge.net/
gtksee
GTKSee is an image viewer, manager and slideshow. It displays thumbnails, like Rox, but has a lot more functionality optimised for managing images, such as showing the dimensions of images when there is mouse-over a thumbnail. The slideshow feature is very nice.
fig2dev
Converts a fig vector image to a variety of vector and bitmap formats. This version for Puppy has been compiled to support the following vector formats: cgm, pic, ps, emf, eps, pdf, and svg. Also the following bitmap formats: gif, jpeg, pcx, png, ppm, sld, tiff, xbm, xpm.
Note that both Figurine and ABS use fig2dev for exporting.
pstoedit
The Postscript and PDF viewer gsview uses pstoedit to export Postscript and PDF files to various vector formats. Supported formats are ps, ai (Adobe Illustrator), idraw, fig, xfig, tgif, tk, hpgl, pic, mma, mpost, sk (Sketch), kil (Kontour), pdf, java1, java2, dxf, rpl, rib, lwo, dxf.
gifsicle
gifsicle is a console program for constructing animated gifs. There is also a viewer -- note also, Firefox or Opera can play animated gifs. Most importantly, gifsicle can analyse frames and create an animated gif in which subsequent frames only have the changes from the previous frame, greatly reducing size.
scalerx
scalerx is a superb console program. If you have a small bitmap image and you want to make it bigger, it will have jagged edges, however scalerx analyses the image and smooths the edges. Only works with png images.
xli
This is a console application to display an image in a window or to load it onto the root window (the desktop background). Supported image types are fbm, Sun Rasterfile, CMU WM Raster, pbm, Faces Project, png, gif, jfif, jpeg, Utah RLE, Windows OS/2 RLE, Photograph on CD, X Window Dump, Targa, McIDAS, G3 FAX, PC Paintbrush, GEM, MacPaint, X Pixmap (xpm), X Bitmap (xbm).
qiv
This does the same as xli and is smaller and faster. qiv replaces xli in Puppy version 2.10 onward.
grabc
This is in the menu as «RGB screen color picker», and is a simple application that displays a crosshair that is placed as desired then a left-click samples the underlying color and displays its red-green-blue components.
netpbm
This is a package of graphic file format conversion and manipulation utilities. Puppy has a subset of the full package. Included with Puppy are: anytopnm (just a shell script that determines file type and calls one of the other conversion programs), giftopnm, jpegtopnm, pgmtopbm, pbmtext, pbmtoxbm, pngtopnm, pnmalias, pnmconvol, pnmcut, pnmnlfilt, pnmrotate, pnmscale, pnmsmooth, pnmtops, pnmtotiff, pnmtojpeg, pnmtopng, ppmdither, ppmlabel, ppmrainbow, ppmtogif, ppmtopgm, ppmtoxpm, ppmtobmp, ppmquant, pstopnm, tifftopnm, xbmtopbm, xpmtoppm, xwdtopnm.

pbm is a monochrome format, pgm is greyscale, ppm is color, and pnm format covers all three. Many applications in Puppy use these utilities and they are mighty useful in scripts also as input and outputs can be piped. Online documentation is to be found at netpbm.sourceforge.net.

Video

From version 0.9.6, Puppy is using Xine-libs, which handles a very wide range of audio and video formats.

Xine-libs
Xine-libs is the backend libraries providing support for a wide range of audio and video formats. Documentation is to be found online: xine.sourceforge.net
gxine
Gxine is a GUI frontend to Xine-libs, and can play video DVDs, various video files including Quicktime, MPG and AVI.

Playing DVDs works real nice, provided that Puppy has correctly identified your DVD drive -- you should find the link /dev/dvd pointing to the actual drive, for example /dev/hdc (or whatever).
Xdvdtool
DVD video ripper. Puppy enthusiast 'plinej' has developed this.

Gxine/Xine can have «codec» files added onto it to extend its capabilites -- see note in Audio section below.

Audio

Xine-libs and Gxine provide a generic media player, including support for a wide range of audio file formats.

wavplay
This is a console application that plays and records wav audio files.
Note, I have kept this application in Puppy although it is redundent with the advent of Gxine (see below).
Gxine
Gxine is a media player that will handle a wide range of audio file formats. Gxine can also play audio streamed from the Internet.
Will play audio CDs without requiring an internal cable connecting audio-out on CD-drive to sound card -- other CD players listed below require the cable.
ripperx
Rips songs off audio CDs and saves them as wav or mp3.

You could use ripperX as just a CD player. One great thing is the support for cddb -- if connected to the Internet, just click the «cddb» button and all the CD song titles will get downloaded.
GplayCD
Plays audio CDs. Gxine and ripperX can also play audio CDs.
XfreeCD
Plays audio CDs and supports cddb.
Note, hangs if a CD not inserted before starting this app.
Project home page: http://xfreecd.sourceforge.net/
cdplay
Console application to play audio CDs.
gcombust
Can be used to create audio CDs from wav or mp3 files.
WishCD
Can be used to create audio CDs from wav files.
Graveman
Can be used to create audio CDs
SetVol 1.1
This is a small console utility to set or get the volume.
xtmix
GUI sound mixers.
Snack audio player
This is an alternative to Gxine for playing audio files. Uses the Snack library.
XS audio recorder and editor
XS uses the Snack library, so handles a wide range of file formats. Apart from recording, or editing existing sound files, XS is useful to convert sound files from one format to another.
Sweep
Sound recorder and editor. Many features.
Online docs: http://www.metadecks.org/software/sweep/tutorials/
madplay
Console mp3 player.
Online docs: http://www.linuxmanpages.com/man1/madplay.1.php

Gxine/Xine can play streamed audio and video off the Internet, so for example, you can listen to Internet radio stations. However, mainly for legal reasons the most up-to-date RealAudio and MicrosoftMedia «codec» files are not included in Puppy, which means that some radio stations may not work. However, you can download and install them -- see the «Streaming audio and video Gxine plugin» section at the bottom of this page.

Scanning

Puppy has the SANE scanner backend, and XSane GUI frontend.

SANE and Xsane are not in the 'standard' Puppy, but they are PupGet packages and very easy to install. You need both, as SANE has all the drivers.

Printing

Puppy has the PDQ printer management system. This consists of pdq, which is a commandline program that replaces lpr, and xpdq, which is a GUI printer setup and print cache.

Printing in Puppy is based around Ghostscript, and the main applications such as Abiword, Amaya, Xpaint and Firefox, generate files in Postscript format for printing. The gs program is able to convert Postscript files to a format suited to a particular printer.

The Ghostscript package has its own set of printer drivers, however that is very limited, and Puppy uses the Gimp-Print IJS drivers, that work with Ghostscript. This adds support for over 200 printers, and over 600 either fully or partially compatible printers.

To be able to print, you must first run the Puppy Printer Wizard. This enables you to choose the correct Gimp-Print IJS driver and configure it to work in Puppy. You will find this Wizard in «Start/Setup».

Note that, unlike SANE, all the IJS drivers are already in Puppy when you first install him. Nothing else to download.


Streaming audio and video (Gxine) plugin

Gxine is setup as a plugin for Firefox/Seamonkey, so you can, for example, listen to Internet radio stations. Many will work, however in same cases you need to get later «codec» files for RealAudio and WindowsMedia, the two formats most commonly used for streaming audio. You do not need to install the RealPlayer or any other player, as codec files can be added to Gxine.

The collection of «extra codecs» available from the Mplayer site are available as a PupGet package.

Just run the PupGet package manager (see Menu → Setup → Puppy package manager) and install the package named «xine_extra_codecs».

Awhile back GuestToo contributed this to the Forum, and some may still be relevant:

i found it complained about a missing cook.so.6.0 codec so i went to
http://www.mplayerhq.hu/homepage/design7/dload.html
and downloaded the essential codecs package
i right clicked the file … set the run action to TkZip left clicked the file to unzip it
i renamed the unzipped dir to codecs and moved it to /root/.xine
i edited /root/.gxine/config
i changed:
codec.real_codecs_path:unknown
to:
codec.real_codecs_path:/root/.xine/codecs
and added the line:
codec.win32_path:/root/.xine/codecs
while i was in there, i changed:
input.mms_network_bandwidth:33.6 Kbps (Modem)
to:
input.mms_network_bandwidth:524.3 Kbps (Cable/DSL)
now more stuff works
you can see some information about plugins by typing in the Firefox url address box:
about:plugins
if found ram files have no plugin/mime set
so i told Firefox to open the file with /usr/local/bin/gxine and checked the Always Open With …
box so realplayer audio works
you can try realplayer streaming audio at the bbc, for example:
http://www.bbc.co.uk/bbc7/listenagain/
you can view realplayer movies here:
http://www.hollywood.com/
you can view quicktime movies here:
http://www.apple.com/trailers/
gxine doesn't seem to find the 'QDesign Audio v2' plugin
the codec is in the codecs dir … i think the codec.win32_path:/root/.xine/codecs line
should find it maybe it needs a plugin file somewhere …


© Copyright 2004,2005,2006 Barry Kauler

 
articles/howto-multimedia.txt · Последние изменения: 01.03.2016 в 18:18 (внешнее изменение)
 
За исключением случаев, когда указано иное, содержимое этой вики предоставляется на условиях следующей лицензии:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki