Tuesday, May 31, 2011

How to get EasyPhp 5.3.6.0 running

  1. Right click on EasyPHP 5.3.6.0 icon in systray and choose Configuration / Apache
  2. Now search for "deny from all", which is in a tag and comment it out (start the line with the hash-symbol #)
  3. For using mod_rewrite search for "AllowOverride None" and replace it by "AllowOverride All" 

Topfield .rec Dateien nach MPEG2/MPEG4/H.264 umwandeln oder auf DVD brennen

Im Topfield .rec Dateiformat befindet sich bei Normal-Auflösung ein MPEG2-Stream, wie er auch auf DVD's verwendet wird. Man spart sich daher eine Recodierung.

Eine Rec-Datei ist ein sogenannter TS-Container und enthält 1:1 das Signal, dass über Kabel oder Satelitt beim Recorder ankommt - dieses enthält verschiedene Informationen, unter anderem das Bild, einen oder mehrer Tonspuren (stereo, 5.1) und auch den Teletext.

Ziel ist nun, den Bild- und Audiostream zu entpacken und weiterzuverarbeiten - diesen Vorgang nennt man auch Demuxen. Das leistet das kostenlose Programm PVAStrumento (Download von Chip.de). Dieses beseitigt nebenbei gleich (Übertragungs-)Fehler und synchronisiert den Video-/Audio-Stream (bei längeren Aufnahmen werden sonst Bild und Ton oft asynchron  und laufen auseinanderlaufen)

Man öffnet PVAStrumento, wählt die .rec-Datei aus und klickt auf Demux. Dadurch wird nun jeder Stream entpackt und dort abgelegt, wo die .rec-Datei liegt.

PVAStrumento in Action...
 Typischerweise liegen nun 3 Dateien vor:
  • .mpv - Video - enthält nur den Videostream (MPEG2)
  • .mpa - Audio - enthält den Audiostream in Stereoton (MP2)
  • .ac3 - Audio - enthält den Audiostream in z.B. 5.1 Mehrkanalton
Man hat nun die Rohdaten - diese kann man bei Bedarf auch noch bearbeiten und zusammenschneiden (bewährt hat sich dabei das kostenlose Programm Cuttermaran)

Mit diesen Einzeldateien können nur wenige Programm umgehen - jedoch können viele Programm mit .mpg Dateien umgehen. Daher fügt man den Videostream mit dem gewünschten Audiostream zusammen - das nennt man Muxen oder Multiplexen. Dies geschieht am einfachsten mit dem kostenlosen Tool ImagoMPEG-Muxer (Download bei Pcwelt.de).

Öffnet man dann das Programm wählt man bei Video Source die .mpv-Datei und fügt mittels Add Audio Source die gewünschte Tonspur an, wenn noch keine vorhanden ist. Dann klickt man auf Multiplex und erhält nach kurzer Zeit eine .mpg Datei.

Diese kann nun etnweder auf DVD brennen oder in ein anderes Videoformat konvertieren.

Zum Brennen auf DVD kann man das kostenlose Programm DVDFlick (Download bei Chip.deverwenden, mit dem sich ganz einfach eine DVD erstellen lässt.

Zum Umwandeln in ein anderes Videoformat wie z.B. MPEG4 oder H.264 kann ich das kostenlose Programm MediaCoder 2011 empfehlen, dass eine sehr schnelle Videokonvertierung über Nvidia Grafikkarte mittels CUDA unterstützt (hier habe ich das Programm kurz angetestet)


Highspeed Videokonvertierung mit MediaCoder 2011

MediaCoder 2011 bietet die Möglichkeit, Videos über die Grafikkarte oder über die CPU in Highspeed umwandeln zu können und ist noch dazu Freeware.

Dazu benötigt man entweder eine Nvida Grafikkarte mit CUDA Unterstützung oder eine Intel CPU auf Sandy-Bridge-Basis.

Hat man eine Nvidia Grafikkarte eingebaut sollte man zuerst auf der Nvidia Seite nachschauen, ob diese CUDA unterstützt.
Ist dies der Fall hat man nun die Möglichkeit, H.264 auf der GPU der Grafikkarte konvertieren zu lassen. Man wählt dazu H.264, deaktiviert das AutoSelect neben Encoder und wählt dort CUDA Encoder. Als Bitrate muss man Constant Bitrate wählen, etwas anderes wird derzeit nicht unterstützt. Rechts kann man dann noch ein Profile auswählen - am schnellsten ist das Baseline-Profile. Bei Bedarf kann man auch gerätespezifisches Preset wählen, z.B. für die PlayStation Portable (PSP) , den iPod, AVCHD oder auch BluRay.


Hat man eine Intel CPU mit Sandy-Bridge-Chipsatz kann man H.264 oder MPEG2 transcodieren lassen. Das vorgehen dabei ist wie oben beschrieben, nur statt Cuda-Encoder wählt man Intel Encoder.

Eine kommerzielle Alternative ist MediaEspresso von Cyberlink - diese unterstützt zusätzlich auch noch AMD/ATI Grafikkarten mittels ATI Stream, was das Pendant zu Nvidias CUDA ist und kostet ca. 40€.


TechTalk-Genome: procedure-parameter vs. string-literal problem

We are using TechTalk Genome in our company as an object-relational mapper for C#. Last days i got the requirement to search a xml-tag in an xml-column in our Sql-server database. Unluckily there is no feature in genome to search through the column, so i got to map a RawSql-statement in the mapping file.

So i tried this:
<Member name="HasKey" signature="string" >
    <RawSql source="MyXmlColumn.exist('//Key[text()=&quot{!key-value!}&quot]')=1"/>
</Member>

This doesn't work because genome normally creates a stored procedure for this call and submit my value-string as additional parameter. But the exist() method only accepts string literals, not parameters. After some research i found out, that instead of the exclamation mark ("!") there is a secret sign, the hash-symbol ("#"), which causes Genome to add the value as literal - now the code work's well.

The solution for the parameter problem is the hash-symbol (#), here's the working code:
<Member name="HasKey" signature="string" >
    <RawSql source="MyXmlColumn.exist('//Key[text()=&quot{#key-value#}&quot]')=1"/>
</Member>

Apache-Qpid: Channel-Not-Attached Exception

We are using Apache Qpid in our company for some time but yesterday i got a strange error - no application were able to connect to the Qpid-service anymore - the log file showed me a strange error: "error Client max connection count limit exceeded: 500 connection refused"


This was the second time the error occured. First i checked the projects, if the connections would be safely closed in case of an error, but that was surely the case.
Second i checked the "channel exception: not-attached: channel 1 is not attached" - i counted the occurance of this message between my first 500 connections error message and the second and found out - this error happened exactly 500 times!

So i debugged the code in detail an realized, that the error occured exactly after using Acknowledge() of the Qpid-sender-class. So i removed the line and looked at the qpid-documentation a little bit deeper in detail. I found a good qpid-documentation created bei Red-Hat:
I realized, that the Acknowledge() method intensionally should be used to signal qpid, that a message was successfully received, but not the other way round.

Since then i fixed the line the error never happend again.