Archives Posts
August 12th, 2008 by Blu:RayNe
I hate all those low quality videos from YouTube. You know there is that trick to concenate &fmt=18 to YouTube-URLs to have it access the new servers with higher quality videos and better bandwidth performance, but still that does not makes me happy.
Having FLV is ok for me, although I dislike non-standard container formats. But the point is copying those FLVs for friends often ends up by them complaining not beeing able to play the files on their Windows or Mac. The same problem persists on the iPod or my mobile phone that just understands 3GP in the moment.
So i end up having to convert the files… or transcoding them.
Conversion vs. Transcoding
Converting usally means decoding the video to a full video-picture – probably with or without any post-processing– and loosing the visual information that was artifically added again by encoding. Also, most of the bitstream-information on the decoded stream is also lost, because you only see a the picture and not what abstract data is behind.
That is the place where transcoding comes into play: It transcodes the data be going deep into the input stream directly translating it the the output stream. The “visual step“ between encoding and deocoding is skipped, because not necessary. In the end we have not only faster conversion process, but have also retained all possible quality.
Ok, if input and output en/decoding algorithms differ too much or you wanna resize the video you still have to convert the videos. Point is that the algorithms used in input and output stream have to be similar to each other (beeing often MPEG4 on nowadays video material).
I discovered vixy (which is based on ffmpeg) und does a nice job on transcoding. On windows and Mac you have a GUI limited to YouTube. The Online-Converter itself seems to be always overloaded. So, time to compile our FLV 2 MPEG4 Tool ourselves (for Ubuntu/Debian):
$ apt-get install apt-get install libavcodec-dev libavformat-dev libavutil-dev ffmpeg subversion
$ apt-get build-dep ffmpeg
$ mkdir flv2mpeg4
$ cd flv2mpeg4
$ svn co https://vixynet.svn.sourceforge.net/svnroot/vixynet/trunk/flv2mpeg4/ .
$ cd src
$ gcc -O3 -o flv2mpeg4 avformat_writer.c dcprediction.c flv2mpeg4.c fetch.c flvdecoder.c m4vencode.c mp3header.c -lavformat -lavcodec -lavutil -I/usr/include/ffmpeg -L/usr/lib
$ cp flv2mpeg4 /usr/bin
A last word to YouTube. I don’t suggest uploading to it in no way!
- They manipulate view counters on videos with strong political content (e.g. 200 views and 300 comments?)
- Everything you upload, belongs to them! Read the terms!
- Quality still sucks (it’s for the american market; but we have broadband here in germany!)
- Servers are often damn slow, espacially at 23:00 CEST+1 when all americans go on the site
Archives Posts
Juli 16th, 2008 by Blu:RayNe
Und das sag ich immer wieder, da es anscheinend noch unzählige Leute in der Druck/IT-Branche gibt, die eigentlich hier nichts zu suchen hätten. Ich erhalte immer noch viel zu Mails ohne Subject und ohne eindeutigen Bodytext, der mir beschreiben würde, um was es eigentlich geht. Manchmal fehlt sogar die Ansprache, oder Footer mit Firmenadresse.
Selbst ist man damit oft zu Rücksprachen gezwungen, die oft lange überflüssige Telefongespräche nach sich ziehen. Aber besser wenn der Kunde von selbst anruft, da gibt es noch andere Möglichkeiten…
–„Neee.. ich habe Ihre E-Mail nicht gesehen.. ich glaube ich hab da nichts bekommen… moment… ich guck mal… ah.. hier.. Spam.. naja.. die Mail is ja auch Spam…“
– „Wie! Spam?! Meine Mail ist doch keine Spam… !“ (sichtlich verblüfft)
– „Kein Subject, kein Inhalt und nur eine PDF als Anhang wäre unter meiner Sichtweise auch Spam… und schließlich ist die Absenderadresse fälschbar. Oder was würde sie unter Sichtweise des Anti-Spam-Programms sagen?“
Und dann gab es gestern noch die Frage an mich: „Warum hast du die UPS-Mail nicht bearbeitet, die ich dir weitergeleitet habe?“. Und ich sagte nur „UPS-Mails haben keine .EXE-Änhange und kommen nicht von tfds.vddseew@hotmail.com“ *seufz*
Hierbei handelte es sich wieder einmal um Vorgesetzte…
Archives Posts
Juli 4th, 2007 by Blu:RayNe
Ok, here some often needed debian repositiories for your /etc/apt/sources.list. This article will get updated when needed.
# Unoffical packages that harm debian licenses
deb http://ftp.debian-unofficial.org/debian etch main contrib non-free restricted
# Distribution Mirror server from 1&1
deb http://update.rootmaster.info/debian stable main contrib non-free
deb http://update.rootmaster.info/debian-non-US stable/non-US main contrib non-free
# Distribution Mirror server from Strato
deb http://ftp.serverkompetenz.de/debian/ etch main contrib non-free
# Offical Debian
deb http://http.us.debian.org/debian stable main contrib non-free
# Debian security updates
deb http://security.debian.org/debian-security stable/updates main contrib non-free
# Up-to-date Apache, PHP and MySQL
# deb http://dotdeb.netmirror.org/ stable all
# deb-src http://dotdeb.netmirror.org/ stable all
deb http://packages.dotdeb.org etch all
# mplayer, ffmpeg and so on…
deb http://www.debian-multimedia.org etch main
# Mono
deb http://www.mindtouch.com/apt/ sarge main contrib non-free#
# Updates for viruses & spam filters
deb http://volatile.debian.net/debian-volatile sarge/volatile main contrib
deb http://people.debian.org/~dexter php5.1 sarge
deb-src http://people.debian.org/~dexter php5.1 sarge
deb http://www.os-works.com/debian testing main
# Backports - if you really need them!
# deb http://www.backports.org/debian/ sarge-backports main contrib non-free
Archives Posts
Mai 29th, 2007 by Blu:RayNe
Ok, i guess you love that cheap servers only with FTP and HTTP, and minimal PHP4-Timeout and lame CGI and no real possibility but to do a good backup job. Well, Perl was once a dominant language and can do much for you.
The benefits of following backup solutions are as follows:
- Backup is done via calling an URL
- that invokes the mysqldump utility to backup your database to a local director, that is preferable outside the webroot
- the data is then gzipped
- old backups are automatically deleted
- and then backed up via FTP to another server
- and while a second server gets the backup it is more secure than having all on a single server
Put this in you cgi-bin folder and remotely call it via CURL or test it via the browser. Don’t forget tot set chmod 755 for the files! If you backup to a directory in the webroot don’t forget to protect that directory by e.g. setting a up an .htacess-file!
#!/usr/bin/perl -w
use CGI;
use POSIX qw(strftime);
use Time::Local;
$query = new CGI();
$file = $query->param(‘file’);
$filename = $query->param(‘filename’);
print "Content-Type: text/plain\n\n";
# print "Content-type: application/octet-stream\n";
# print "Content-Disposition: attachment; filename=".$filename."\n";
# print "Pragma: no-cache\n";
# print "bash ".$file;
sub backupMysql
{
my ($host) = $_[0];
my ($username) = $_[1];
my ($password) = $_[2];
my ($database) = $_[3];
my ($title) = $_[4];
$time = time;
$filename = $title."-".$database."-".strftime("%Y%m%d-%H%S", localtime($time));
print "Backup of \"".$title."\" (".$database.")…";
system "mysqldump -e –add-drop-table –add-locks –allow-keywords -h".$host." -u".$username." -p".$password." ".$database." > ../../backup/".$filename.".sql";
# print "GZip ".$filename."…\n";
system "gzip ../../backup/".$filename.".sql";
# print "Unlink ".$filename.".sql…\n";
unlink "../../backup/".$filename.".sql";
print "done.\n";
}
# Delete previous backups
if (-d "../backup/") {
$where = "../backup/";
while (defined($next = <$where/*.sql.gz>)) {
unlink($next);
}
}
backupMysql("<em>host</em>", "<em>username</em>", "<em>password</em>", "<em>database</em>", "<em>mybackupname</em>");
Optional .htaccess-File:
<Files ~ ".*(sql|gz|tar)">
Deny from all
</Files>
Then call the URL by cronjob:
#!/bin/sh
remoteAddress="<em>ftp://user@yourftp.com</em> -p <em>password</em>"
localAddress="<em>/home/Backup/mybackupname</em>"
timeThreshold=15
mirrordirOptions="-v –keep-files –no-chown –no-chmod –num-backups 30 –mtime-threshold $timeThreshold "
echo "Backup to $localAddress — `date +"%a, %C.%B %Y"`"
echo -n "[`date +%H:%M:%S`] Killing runnung instances of mirrordir…"
/usr/bin/killall -9 mirrordir &2>1 > /dev/null
echo "done."
mkdir -p $localAddress/htdocs > /dev/null
echo "[`date +%H:%M:%S`] Backup of relevant databases…"
curl http://www.yourdomain.com/cgi-bin/backup/mysql.cgi
echo "done."
echo -n "[`date +%H:%M:%S`] Backup of remote FTP…"
/usr/bin/mirrordir $mirrordirOptions $remoteAddress $localAddress/htdocs
echo "done."
echo "[`date +%H:%M:%S`] Finished."
If you don’t have mirrordir or curl install it via aptitude install mirrordir curl on your debian box.
Archives Posts
Mai 20th, 2007 by Blu:RayNe
Debian or other Linux-Distributions do not include Java by default, so you first have to install the JVM. This is done in Debian by downloading the JVM binary distriubtion from sun and then building a DEB-Package with the tools form java-package that you install by dpkg -i.
But let’s do that step-by-step:
Installing JAVA on your Debian box
- You’ll need the JavaVM, so get it at http://java.sun.com/ and search for the latest version. The filename should be something like jdk-1_5_0-linux-i586.bin.
- If not yet done, install the tools from java-package as root-user:
apt-get install java-package
- Then build a DEB-Package from the downloaded file. This can and should be done only as standard user (no root!)
fakeroot make-jpkg <java-binary-package-name>.bin
- If everything goes fine, you should see something like
The Debian package has been created in the currentdirectory. You can install the package as root (e.g.dpkg -i sun-j2sdk1.5_1.5.0+update00_i386.deb).
-
Then just install the package by ther given command:
dpkg -i <created-package-name>.deb
- Check if it works by typing java -version. Following should be seen as standard and root user:
java version "1.5.0"Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
Installing Apache FOP on your Debian box
- Check if Java is installed and running.
- Get the latest binary from http://xmlgraphics.apache.org/fop/ . The file should be named something like fop-0.93-bin-jdk1.4.tar.gz.
- Extract the contents of the archive by tar -zxvf <fop-tarball>. This should results in a directory called fop-0.93.
- Move the directory to /usr/local/lib
mv fop-0.93 /usr/local/lib
- Make a symlink for the directory without the version number
ln -s /usr/local/lib/fop-0.93 /usr/local/lib/fop
- Make a symlink for the command line wrapper script in your /usr/bin
ln -s /usr/local/lib/fop/fop /usr/bin/fop
-
Edit /usr/bin/fop and put following at the beginning of the file (and below the header comment section!):
export FOP_HOME=/usr/local/lib/fop
- Test the installation not only by typing fop -v, but instead by converting a fo file. This is necessary, because the command line wrapper is still very experimental:
<?xml version="1.0" encoding="ISO-8859-1"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="A4">
<fo:region-body /><
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4">
<fo:flow flow-name="xsl-region-body">
<fo:block>Hello World!</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
More help
You can get in-depth installation guides and instructions here:
Archives Posts
Mai 15th, 2007 by Blu:RayNe
Und hier wieder ein lustiger Witz für alle Linux- und Unix-Nutzer (inkl. Mac OSX):
- „Du Markus, nur dass du bescheid weißt ab 20:00 sind die Postfächer vom Exchange-Server abgeschaltet?“
- „Hä?! Wieso das?! Server-Update?“
- „Nein, der Exchange-Server muss defragmentieren.“
Archives Posts
Mai 10th, 2007 by Blu:RayNe
Nach dieser News auf heise.de musste einfach gehandelt werden:
| Betreff |
[LinuxTag 2007] Mit Schäuble auf dem Programm gehe ich nicht hin! |
| To |
orga@linuxtag.org |
| CC |
schwobe@linuxtag.org |
| CC |
projects@linuxtag.org |
Hallo lieber Organisatoren und sonstige Beteiligte,
eigentlich hätte ich mich schon auf die Veranstaltung sehr gefreut, jedoch musste ich erahren dass Bundesinnenminister Schäuble die Schirmherrschaft an sich gerissen hat. Dieser Mensch verkörpert für mich alles was Linux nicht ist, und er ist ein eindeutiger Grund warum ich eben meine Bahntickets storniert habe.
Linux verkörpert für mich Kooperation, gegenseitige Hilfe und Freiheit. Dieser Mensch – nein ich hätte ich noch andere Worte für Ihn – ist das genaue Gegenteil von allem was Linux bedeutet. Unter Ihm sehe ich jemanden, der von Technik weniger Ahnung hat als mein Hund, jemanden der am liebsten seine eigene Privatarmee hätte und versucht mit seiner Politik das Volk zu kriminalisieren und der Mündigkeit zu berauben. Ich finde diese Aussagen kaum übertrieben, eher aber eine mögliche Zukunftsvision, wenn diese Mensch noch länger an der Macht bleibt.
Es ist eine Schande, dass gerade Ihr ihm ein öffentliches Sprachrohr für seine Politik gebt, und es zulässt dass er viele durch seine falschen Ansichten beeinflußt. Normalerweise haben Vertreter der Konzepte von OSS nicht viele Möglichkeiten über die Miss-Stände oder der Dissinformation über die Sicherheits-Politk entgegenzuwirken – und ihr gebt diesen Menschen gerade am LinuxTag ein Sprachrohr?! Bitte!
Andere sehen es genau so wie ich, und ich werde mit mein bestes tun, die News über seine Herrschaft am LinuxTag weiter zu verbreiten.
Deswegen ladet diesen Menschen bitte einfach aus! Wir brauchen Ihn nicht, und sicherlich wär mir ein oder mehrere Euro nicht zu Schade um die Veranstaltung mitzufinanzieren. Ich bin mir sicher es geht auch ohne diesen Unfried Schäuble!
MfG
.mg
Und es geht weiter – hier ein Interview mit dem Bundesdatenschutzbeauftragten, dem anscheinend auch nur noch Sarkasmus in Anbetracht der Ohnmacht gegenüber der freiwilligen Selbstzensur der Gesellschaft übrig bleibt.
Mein Tipp: einfach mal auf volksverdummende Populärmedien wie Rotations-Radiostationen und Privatfernsehen verzichten. Damit kann man sehr schön sehen, wie sich die Gesellschaft verändert.
Im Moment würde ich jedenfalls lieber in einem sauerstoff-leeren Raum ersticken, statt hier weiter auf Erden zu sein. Nein, Vampire und andere Unsterbliche gab es wirklich – sie haben sich nur wegen Frust an der Gesellschaft selbst umgebracht </Sarkasmus>
Archives Posts
April 25th, 2007 by Blu:RayNe
screen -ls - List running screens
screen -r - List and reattach existing session
screen - Simply starte new screen
Ctrl-a " - Bring up list of active sessions
Ctrl-a c - Create new screen
Ctrl-a n - Next Screen
Ctrl-a S - Split screen
Ctrl-a Tab - Switch to split area (and choose or create new window)
Ctrl-a k - Kill window
Ctrl-a : - Open Command line (use resize 18 to set row hieght to 18)
Ctrl-a ] - Empty buffer
Archives Posts
Januar 17th, 2007 by Blu:RayNe
You know the annoyence when SSH again and again asks you to enter the password?
Well, SSH does not allow caching of passwords. Caching would be nonsense since all the security of SSH would then be gone. But you can use RSA to create a private/public pair of keys and send the remote host the public key of your server.
First, we create the key pair:
ssh-keygen -t rsa
The last step of the key creation is the passphrase. Since the purpose of this is to not enter a password, hence being able to create batch jobs, just hit “Enter” twice, leaving them blank.
Then we’ll have to copy the public key to the remote host:
- First create directory for SSH if not existent
ssh root@example.com "mkdir .ssh; chmod 600 .ssh"
-
Then we have to copy the public key of our machine to the remote server
scp ~/.ssh/id_rsa.pub root@example.com:~/.ssh/authorized_keys2
(Ensure authorized_keys2 does not exist on remote host!)