Converting Files under Linux
Convert Images
Convert between Windows/Mac and Linux text files
Convert text files between different character encodings
Convert PS and EPS Files
There is normally more than one way to convert files. Just try out which tool produces the best results in your case.
- Convert PS to EPS
ps2eps file.ps
Convert GRIB into NETCDF files
- Use NCL to convert. First load ncl module
module load ncl
Convert PDF Files
- Use
pdftops
to convert PDF to PS
pdftops file.pdf
Note: pdf2ps
does also convert PDF to PS, but normally the result is worse.
- Open the PDF File with an application and save it in a different format. Programs that can open PDF files:
abiword
oowriter
Manipulating PDF Files
- Use
pdfedit
to edit PDF Files
pdfedit file.pdf
- Rotating PDF file
pdf90 file.pdf
Convert Matlab EPS Files
Convert tar files into zip files
Convert MS Excel and MS Word files
- Alternatively open the file with LibreOffice.
Create a Movie out of Images
Programs
Create animated gif with convert
mencoder takes jpg or png files as imput.
Note: mencoder needs png with 8bit color depth, use option
-depth 8
Create movies with mencoder (see also
man mencoder
)
- Create AVI movie file with MPEG4 codec (fps = frames per second):
mencoder mf://*.jpg -mf fps=5 -ovc lavc -o output_mpeg4.avi
mencoder mf://*.png -mf fps=5 -ovc lavc -o output_mpeg4.avi
- Create AVI file with XVID codec
mencoder mf://*.png -mf fps=5 -ovc xvid -xvidencopts fixed_quant=4 -o output_xvid.avi
- Create AVI file with X264 codec (use 2 pass mode: pass=1 will analyze the frames, pass=2 will create the movie)
mencoder mf://*.png -mf fps=5 -o /dev/null -ovc x264 -x264encopts pass=1:turbo:bitrate=1600:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300
mencoder mf://*.png -mf fps=5 -o output_x264.avi -ovc x264 -x264encopts pass=2:turbo:bitrate=1600:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300
- X264 and XVID codecs create smaller and qualitative better files than MPEG4 codec, where has X264 creates smaller files than XVID.
- Note: For
mencoder
the file should not be too large. 1000x1000 is still fine
Convert Movie/Animation Files
Convert Audio Files
- Convert WAV to OGG. Set quality between -1 (very low) and 10 (very high) with option
-q
:
oggenc -q 8 file.wav
Extract Audio from a Video File