May 2009 Archives

2009-05-23 21:01:56

Concatenate PDF files

There are several ways of concatenating multiple PDF files into one single PDF file. Unfortunately, most of these ways just don't work at all, or the resulting PDF is not what you'd expect it to be.
However, there's one convenient way using ghostscript that always worked pretty well for me:

gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf *.pdf
Since this is a pretty complex command, we'll hide its complexity for future use: Put the code shown below into a newly created file /usr/local/bin/mkpdf
#!/bin/bash

[[ $# -lt 2 ]] && { echo "Usage: $0 output.pdf <inputfiles.pdf>" ; exit 1; }

OUTPUT="$1"
shift
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile="$OUTPUT" "$@"
After setting up the appropriate file permissions (chmod 755 /usr/local/bin/mkpdf), mkpdf output.pdf <inputfiles.pdf> does exactly the same as the command mentioned above.

Posted by haui | Permanent Link | Categories: linux

2009-05-15 23:04:29

yaydl 1.3

Version 1.3 of yaydl fixes the support for video.google.com and improves the sound extracting feature. Check out the changelog/README for details.



Posted by haui | Permanent Link | Categories: projects

2009-05-09 22:45:34

yaydl 1.2

This version fixes and improves the support for dailymotion.com. The default file format for videos from dm is no longer flv, but mp4 instead.
56k users, don't panic...--forceflv still works. ;-)



Posted by haui | Permanent Link | Categories: projects

2009-05-06 23:08:15

yaydl 1.1.5

As you already might have noticed, yaydl --sound fails from time to time when processing youtube videos, i.e. the resulting file isn't a valid mp3-file, but just raw data. The reason for this error lies within the file format. Earlier versions of yaydl always picked the flv version of a video, whereas newer versions always try to get the higher resolution mp4 files. Unfortunately, mplayer -dumpaudio doesn't work properly with these files. Therefore, yaydl from now on uses ffmpeg -vn -acodec libmp3lame -ab 192k for non-flv videofiles from youtube. Nevertheless, I still would prefer the usage of mplayer for this purpose, but I didn't get it work...
So, if you know how to extract the audio track from a mp4-file with mplayer, just drop me a note.



Posted by haui | Permanent Link | Categories: projects