Wölfischhttps://woelfisch.de/blog/2011-04-19T06:47:00+00:00Jörg's BlogStereo to 2.1 "upmix" on Linux - part 52011-04-19T06:47:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/stereo-to-21-upmix-on-linux-part-5<p>But I want a software mixer. Pulseaudio to the rescue! Apart from the fact that the documentation of remap-sink leaves a bit to desire, this is fairly easy. First, our <kbd>~/.asoundrc</kbd> reduces to</p><p><blockquote><pre><br/>pcm.!default {<br/> type pulse<br/> hint.description "ALSA Pulse output"<br/>}</pre></blockquote></p><p>ctl.!default {<br/> type pulse<br/>}</p><p>pcm.ac3 {<br/> type rate<br/> slave {<br/> pcm {<br/> type a52<br/> format s16<br/> channels 6<br/> bitrate 448<br/> }<br/> rate 48000<br/> }<br/> hint {<br/> description "AC3 output"<br/> }<br/>}<br/></p><p>Next, we copy /etc/pulse/default.pa to ~/.pulse/ and add the following to the <kbd>.fail</kbd> section:</p><p><blockquote><pre><br/>load-module module-alsa-sink sink_name=Surround5.1 device=ac3 rate=48000 channels=6 mmap=0 channel_map=front-left,front-right,rear-left,rear-right,center,lfe<br/>load-module module-remap-sink sink_name=Stereo2.1 master=Surround5.1 channels=3 channel_map=front-left,front-right,lfe master_channel_map=front-left,front-right,lfe remix=0<br/></pre></blockquote></p><p>Surprisingly, the remap-sink module automatically seems to do the right thing to the mono channels (i.e., sum of left and right)</p><p>Not directly related to the upmix task, but useful as we're going to disable auto detection:</p><p><blockquote><pre><br/>load-module module-alsa-sink sink_name=Headphones device=hw:0,0 rate=48000 channels=2 mmap=0<br/>load-module module-alsa-source device=hw:0,0<br/></pre></blockquote></p><p>Also, I'd like to have Stereo2.1 being my default like:</p><p><blockquote><pre><br/>set-default-sink Stereo2.1<br/></pre></blockquote></p><p>Hmm, while we're at it, 4.1 upmix may be nice as well:</p><p><blockquote><pre><br/>load-module module-remap-sink sink_name=Stereo4.1 master=Surround5.1 channels=5 channel_map=front-left,front-right,lfe,front-left,front-right master_channel_map=front-left,front-right,lfe,rear-left,rear-right remix=0<br/></pre></blockquote></p><p>Talking about disabling auto detection, comment out module-udev-detect:</p><p><blockquote><pre><br/># load-module module-udev-detect<br/></pre></blockquote></p><p>We may also want to avoid unnecessary conversion from 48k to 44k1 and back to 48k, thus edit <kbd>/etc/pulse/daemon.conf</kbd> (or better copy it to <kbd>~/.pulse/</kbd> and edit it there) to set</p><p><blockquote><pre><br/>default-sample-rate = 48000<br/></pre></blockquote></p><p>And you know what I should have googled for to directly find the solution as outlined in this part of my little serial?</p><p><blockquote><pre><br/>pulseaudio ac3<br/></pre></blockquote></p>Stereo to 2.1 "upmix" on Linux - part 42011-04-18T16:33:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/stereo-to-21-upmix-on-linux-part-4<p>I cannot find any other tool that encodes AC3 to IEC958 than vlc and mplayer. Both are not suitable for the task for different reasons. One idea would be to modify the alsaplay (aplay) ALSA example application to do the encoding. But while researching the topic I asked myself: why couldn't just ALSA do it by itself? It's just wrapping AC3 into a bit stream, and the mplayer code for it looks fairly simple. Let's see how ALSA plugins are working anyway... So I downloaded the alsa-plugins source code and... WAIT, WHAT IS THAT?! There is a directory "a52". It contains exactly the module I was looking for. It does not encode an AC3 stream to an IEC958 transport stream, it creates the whole transport-encoded AC3 data from PCM data and writes it to the SPDIF device of the sound card. That's even more I asked for!</p><p>So I compiled it and added the following to <kbd>~/.asoundrc</kbd>:</p><p><blockquote><pre><br/> pcm.ac3 {<br/> type a52;<br/>}<br/></pre></blockquote></p><p>and changed the slave PCM of stereo21 to:</p><p><blockquote><pre><br/> slave {<br/> pcm "ac3" # was iec958mux<br/> channels 6<br/> }<br/></pre></blockquote></p><p>And... It did not work. Not out of the box.</p><p>Long story short and a debugging session later: current GIT versions of libav / ffmpeg have changed the default codec for AC3 encoding to floating point format, but the ALSA a52 plugin supports only the signed integer format. You need to get the current source code from GIT for alsa-plugins for a working a52 plugin. </p><p>Very sweet, that works, without any race conditions, yet one drawback: the ALSA "dmix" software mixer works only on hardware devices. Of course you cannot dmix an AC3 stream, thus only one application at a time will be able to play sound on this device. How annoying. Especially when knotify starts a kdeinit4 process that keeps blocking the sound interface.</p>Stereo to 2.1 "upmix" on Linux - part 32011-04-18T07:06:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/stereo-to-21-upmix-on-linux-part-3<p>The upmix pipe is nice, but quite complex and limited to applications which have piped output. Maybe we can get the latency down and probably can get sox out of the mix... ALSA can remix channels with the "route" plugin, and it can output to a pipe. Let's put the following in the <kbd>~/.asoundrc</kbd>:</p><p><blockquote><pre><br/>pcm.stereo21 {<br/> type route<br/> slave {<br/> pcm "iec958mux"<br/> channels 6<br/> }</pre></blockquote></p><p> ttable.0.0 1; # front left<br/> ttable.1.1 1; # front right</p><p> ttable.0.2 0; # rear left<br/> ttable.1.3 0; # rear right</p><p> ttable.0.4 0; # center left (muted)<br/> ttable.1.4 0; # center right (muted)</p><p> ttable.0.5 0.5; # sub left<br/> ttable.1.5 0.5; # sub right</p><p> hint {<br/> description "Stereo to 2.1"<br/> }</p><p>}</p><p>pcm.iec958mux {<br/> type file<br/> slave.pcm null<br/> file "|/usr/local/bin/play-5.1"<br/> format wav<br/>}<br/> </p><p>This is exactly the "sox" part of the pipe, and every audio player that can output to an ALSA "PCM" device can use it:</p><p><blockquote><pre><br/>aplay -Dstereo21 test-stereo-48k.wav<br/></pre></blockquote></p><p>The stereo21 PCM performs the upmix and sends the resulting stream to the iec958mux PCM, which will pipe it to <kbd>/usr/local/bin/play-5.1</kbd></p><p>And here comes the surprisingly tricky part. In a first iteration it looked like this:</p><p><blockquote><pre><br/>aften -v 0 - - | \<br/>mplayer -rawaudio format=0x2000 -demuxer rawaudio -ao alsa:device=iec958 -ac hwac3 -really-quiet -<br/></pre></blockquote></p><p>We're using <kbd>aften</kbd> because of lower latency and that I couldn't find a way to tell ffmpeg to STFU — it keeps printing stuff to console whatever I do. As you can imagine, this only almost works. Mplayer complains about underruns. As "aften" is just a converter without being able to output to ALSA, it leaves us no choice than abusing vlc for the task:</p><p><blockquote><pre><br/>aften -v 0 - - | vlc -I dummy stream:///dev/stdin<br/></pre></blockquote></p><p>But this results in a hanging vlc because it does not catch end of file of the pipe (it blocks SIGPIPE). We need to kill it explicitly. With SIGKILL. As vlc also blocks SIGCHLD, it is not enough to kill the script. Since the "dummy" interface of vlc isn't capable of writing the PID (only the interactive interfaces are), we need to write a wrapper <kbd>vlc-pipe</kbd>:</p><p><blockquote><pre><br/>#!/bin/sh<br/>echo $$ >$1<br/>exec vlc -I dummy stream:///dev/stdin<br/></pre></blockquote></p><p>The argument of the script is the file name to write the PID of vlc to. With some additional armor around it, our play-5.1 script looks like this:</p><p><blockquote><pre><br/>#!/bin/sh</pre></blockquote></p><p>WAITTIME=0.5<br/>PIDDIR="$HOME/.cache/play-5.1"<br/>LOCKFILE="$PIDDIR/lock"<br/>PLAYERPID="$PIDDIR/player"</p><p>[ -e "$PIDDIR" ] || mkdir "$PIDDIR"<br/>while [ -e "$LOCKFILE" ] ; do sleep $WAITTIME ; done<br/>echo $$ >"$LOCKFILE"</p><p>(aften -v 0 - - ; sleep $WAITTIME ; kill -9 $(cat "$PLAYERPID")) | \<br/>vlc-pipe "$PLAYERPID"</p><p>sleep $WAITTIME<br/>rm "$LOCKFILE" "$PLAYERPID"<br/></p><p>We assume a maximum latency of half a second, which is indeed enough. Extremely ugly, but at first, it seems to work reliably. Thus, let's see what happens if we make it the default PCM. And of course add the automatic rate conversion to 48 kHz sampling rate. Just add the following few lines to <kbd>~/.asoundrc</kbd></p><p><blockquote><pre><br/>pcm.!default {<br/> type plug;<br/> slave {<br/> pcm stereo21;<br/> rate 48000;<br/> }<br/>}<br/></pre></blockquote></p><p>Yes! That works! Until you start firefox and play flash animations.</p><p>We end up with hanging instances vlc again, because opposed to vlc the play-5.1 script does catch signals, and if a process closes the ALSA device before the half-second sleep is over, we'll have a hanging vlc again, and stale lock files on top of it. Ugh. Okay, we might be able to catch most races eventually, but I'd very much prefer to avoid using vlc altogether.</p>Stereo to 2.1 "upmix" on Linux - part 22011-04-17T21:50:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/stereo-to-21-upmix-on-linux-part-2<p>How to construct a 2.1 signal from a stereo signal? We are going to encode it as AC3 ("Dolby Digital"), with the original stereo channels left and right mapped to front left and right, center and rear channels being muted, and bass getting the sum of half of the level of left and right channel. Strictly speaking, we should run the the bass signal through a low pass, but it is not necessary for my speaker system, as the active bass box has a built in low pass with an adjustable cutoff frequency.</p><p>As a first attempt, let us just create such a signal. We're going to do this the Unix way: with pipes. Since sox has some issues with WAV streams on non-seekable input such as pipes, and it does not come with ffmpeg bindings on openSUSE for legal reasons, let's first create a PCM stream from anything with ffmpeg:<br/><blockquote><pre><br/>ffmpeg -i - -ar 48k -f s16le - <br/></pre></blockquote><br/>It'll take anything from stdin and convert it to an 48 KHz sampling rate 16 bit signed little endian integer PCM stream. Thinking about it, it probably should only take the first two channels from the input, but let's ignore that for now. Now pipe that to sox to create a six channel WAV stream according to above mapping:<br/><blockquote><pre><br/>ffmpeg -i - -ar 48k -f s16le - | \<br/>sox -t s16 -L -c 2 -r 48k - -t wav - remix 1 2 0 1,2 0 0<br/></pre></blockquote><br/>If you are wondering about the channel order for surround sound in WAV files (and thus expected by the AC3 encoder): it is front left, front right, front center, lfe (bass), rear left, rear right <a href="http://msdn.microsoft.com/en-us/windows/hardware/gg463006.aspx">as defined by Microsoft</a>. The channel order for AC3 is even weirder (<a href="http://www.atsc.org/cms/standards/a_52-2010.pdf">ATSC A/52 standard, section 5.4.2.3, table 5.8</a>), fortunately the encoder is taking care of this.</p><p>Talking about encoding, we need to convert it to AC3 with ffmpeg next:<br/><blockquote><pre><br/>ffmpeg -i - -ar 48k -f s16le - | \<br/>sox -t s16 -L -c 2 -r 48k - -t wav - remix 1 2 0 1,2 0 0 | \<br/>ffmpeg -i - -ab 192k -ac 6 -f ac3 -<br/></pre></blockquote><br/>Now we just need something to actually write the stream to the audio device. Mplayer can do this for us, however don't ask how long it took me to find all the options:<br/><blockquote><pre><br/>ffmpeg -i - -ar 48k -f s16le - | \<br/>sox -t s16 -L -c 2 -r 48k - -t wav - remix 1 2 0 1,2 0 0 | \<br/>ffmpeg -i - -ab 192k -ac 6 -f ac3 - | \<br/>mplayer -rawaudio format=0x2000 -demuxer rawaudio -ao alsa:device=iec958 -ac hwac3 -really-quiet -<br/></pre></blockquote><br/>Let's try that and 'cat' an MP3 file to this pipe... Yes, we have sound! A quick test with Daft Punk — Tron Legacy Soundtrack: oomph oomph!!</p><p>The latency is even bearable.<br/><br/>Unfortunately, using the pipe as the output to VLC results in mplayer complaining about underruns frequently. Also, other applications don't even allow piping their audio output. But the approach is still good to play single files and experiment a bit without having to confuse the whole audio setup of the system.</p>Stereo to 2.1 "upmix" on Linux - part 12011-04-17T13:42:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/stereo-to-21-upmix-on-linux-part-1<p>I recently upgraded my set of speakers after my old Braun boxes finally reached their end of life. The "surrounds" of the speakers were degraded too far after almost 30 years. Given that the speaker system was from Braun's budget series of speakers (still relatively expensive at the time) it does not make sense to refurbish it. So I replaced the front speakers with a set of <a href="http://www.nubert.de/">Nubert</a> nuJubilee 35 (comparable to nuLine 32) speakers. If you are a fan of the 70th classic music sound like me: give Nubert speaker systems a try. At least the nuLine series is quite close to the sound of medium to large Brauns, though slightly more modern (i.e., more bass.)</p><p>The center, rear and bass speakers were from a Teufel Magnum E system, which barely worked well enough with the Braun speakers, but does not fit to the new speakers. The center was always far too small, so I replaced it with a nuLine WS-12. Could have a bit more bass, however as I can only mount the center hanging on a shelf and everything larger would be too heavy, this has to do. And it sounds great when watching movies! Alas, the sound of the bass box doesn't fit anymore, and the rears were also too limited, thus I ended up with two new rear speakers (nuLine DS-22) and a bass box (nuJubilee 35), completing the upgrade.</p><p>The new system sounds exactly the way I want it to sound. Probably way too dry for other people, but perfect for me. The only thing that buggers me is the AV receiver: With stereo signals, I can either have stereo output, but that won't feed the bass. Or I can have a Dolby ProLogic II upmix which does weird things. Luckily, the receiver can be configured to NOT send a sum signal to the center speaker in that mode, but it still has some phase shift and delay on the rears. This is usually okay for pop music, but I do not want to hear the trombone from almost-rear right when listening to an opera... I cannot get any analog line out signal from a digital source, either. Said opera recording, even though a digital production, was mastered with vinyl records in mind, so it doesn't have any frequencies low enough for the bass box to be needed, but I do have some recordings that would benefit from a 2.1 "upmix". Or even 4.1 with just the unmodified stereo signal sent to the rears.</p><p>Since I'm playing all recordings I own from a openSUSE 11.4 system via TOSLINK / SPDIF / IEC958, how about creating the upmix on the machine, encode it as AC3 and use SPDIF pass-through to send it to the AV receiver? Sounds simple, it even is, but information about how to do it is hard to find, unless you know that instead of googling for "alsa ac3", which gives you tons of information on how to split up a 5.1 signal to analog output, you have to google for... Nope, won't tell you yet. ;-)</p>Vacation video (pt 2)2009-05-18T18:58:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/vacation-video-pt-2<p><div style="width: 30em"><em>I am constantly amazed at how easy it is to accomplish things in Linux once someone works out the process. DVD Authoring is a good example of this.<br/><div style="text-align: right">— Chris Stoddard, <a href="http://linuxgazette.net/issue83/stoddard.html">Linux Gazette #83</a></div></em></div></p><p>I beg to differ. But once you understand how it works, it is not hard to automate most of the annoying time consuming steps.</p><p>So I have this DVD Video compliant MPEG stream, but I'd like to have some menu. First of all, forget all the graphical frontends to dvdauthor. "Q" DVD Author sure looks nice and you can easily create rather complex menu structures, but it crashes often and there is no manual (just a bunch of more or less helpful tutorials.) It didn't fit my requirements, at least I wasn't able to define different pictures for highlighted and selected menu entries. You can define differently coloured borders or semi-transparent masks to overlay a picture, but I wanted to have a white icon turning yellow on highlight and grey on select.</p><p><img height="48" src="http://img.woelfisch.de/lj-dvdmenu-play-w.png" width="60"/> <img height="48" src="http://img.woelfisch.de/lj-dvdmenu-play-y.png" width="60"/> <img height="48" src="http://img.woelfisch.de/lj-dvdmenu-play-g.png" width="60"/> </p><p>I've also tried kdvdauth, gdvdauthor, and several more that were not able to properly design a menu the way I wanted it to behave. Okay, let's dig up one of the numerous tutorials from the lazyweb and do it manually.</p><p>Unfortunately, most of the tutorials don't explain why something is done a certain way. The first thing you need to know is that DVD menus are just regular MPEG audio/video tracks with subtitles, glued together with a rather simple scripting engine during authoring. That means that you just need to convert your background image to a video, encode audio, create two subtitle tracks containing the button overlays (one for highlighted buttons, one for selected, or clicked, buttons), and multiplex everything. Very simple, but with some limitations: the video has to be shorter than 30 seconds, it must have an audio substream (can be silence, though) and the button layer graphics can only have four colours at a time, including the background colour, as they are implemented as subtitle graphics.</p><p>Did I mention that it is crucial to understand that highlighting/selectable elements, also called buttons, are in fact subtitles? Okay, so here's the config file for spumux, a subtitle generator and mulitplexer:</p><p><pre><br><subpictures><br/><stream><br/><spu force="yes"<br/> start="00:00:00.00"<br/> select="mask-selected.png"<br/> highlight="mask-highlighted.png"<br/> autooutline="infer"<br/> autoorder="rows"/><br/></stream><br/></subpictures><br/></br></pre></p><p>Our mask layer images are <kbd>mask-selected.png</kbd> and <kbd>mask-highlighted.png</kbd>. These contain all the buttons, spumux will automatically try to detect their position and geometry and enumerate them. You tell <kbd>dvdauthor</kbd> what these do later.</p><p>Now comes the part that needs more thought. I have a video with 34 chapters and up to six chapters per menu. This results in 6 chapter menus, not counting the main menu. The chapter menus look like this:</p><p><img height="144" src="http://img.woelfisch.de/lj-dvdmenu-scenes1.png" style="border: 1px solid" width="180"> <img height="144" src="http://img.woelfisch.de/lj-dvdmenu-scenes2.png" style="border: 1px solid" width="180"> <img height="144" src="http://img.woelfisch.de/lj-dvdmenu-scenes6.png" style="border: 1px solid" width="180"/></img></img></p><p>It's a major PITA to align all the icons for each slide just by calculating their position, thus I did it with The Gimp and multiple layers:</p><p><table><tr><td><img height="144" src="http://img.woelfisch.de/lj-dvdmenu-background.png" style="border: 1px solid" width="180"/> <br/>Background</td><br><td><img height="144" src="http://img.woelfisch.de/lj-dvdmenu-deselected.png" style="border: 1px solid" width="180"/> <br/>Deselected</td><br><td><img height="144" src="http://img.woelfisch.de/lj-dvdmenu-highlighted.png" style="border: 1px solid" width="180"/> <br/>Highlighted</td><br><td><img height="144" src="http://img.woelfisch.de/lj-dvdmenu-selected.png" style="border: 1px solid" width="180"/> <br/>Selected</td></br></br></br></tr></table></p><p>The additional <em>Deselected</em> layer makes it easy to just replace the background image by keeping the graphical elements intact.</p><p>However, exporting single layers and converting them to two bit colour depth is more work than anticipated: every other layer except the one to be exported needs to be removed, otherwise The Gimp creates a palette from the colour information of all the layers... Uargh. And besides, what for do I have a computer? But as I already have layers, and the menu generator of Premiere Elements does something quite cool with Photoshop layers, why not re-implement that?</p><p>I was too lazy to read into The Gimp's scripting engine, and ImageMagick currently recognizes only two layers of an XCF file, so I downloaded and compiled <a href="http://henning.makholm.net/software">XCFTools</a> (thank you Wikipedia for the link!) which unfortunately isn't available from the openSUSE build service (yet). The tools do not require The Gimp's libraries and can convert from xcf to png or pnm.</p><p>With that in mind, I wrote the following script to convert an XCF file to DVD menu:</p><p><pre><br>#!/bin/sh<br/>menu="$1"</br></pre></p><p># Extract background and normal overlay<br/>xcf2png -o "$menu/background.png" "graphics/$menu.xcf" Background Deselected </p><p># Extract and convert highlight overlay<br/>xcf2pnm -a /dev/null "graphics/$menu.xcf" Highlighted | \<br/> convert pnm:- -fuzz 10% -transparent black -colors 2 "$menu/mask-highlighted.png"</p><p># Exctract and convert select overlay<br/>xcf2pnm -a /dev/null "graphics/$menu.xcf" Selected | \<br/> convert pnm:- -fuzz 10% -transparent black -colors 2 "$menu/mask-selected.png"</p><p># Convert the background to an MPEG2 video<br/>png2yuv -n 25 -I p -f 25 -j "$menu/background.png" | \<br/> mpeg2enc -F 3 -n n -f 8 -a 2 -o "$menu.m2v"</p><p># Adjust config file for subtitle / button layer<br/>sed "s:mask:$menu/mask:g" spumux.xml >"$menu/spumux.xml"</p><p># multiplex everything to a DVD stream<br/>mplex -f 8 -o /dev/stdout "$menu.m2v" silence.mp2 | \<br/> spumux -v 2 "$menu/spumux.xml" > "$menu/menu.mpg"</p><p># remove temporary video (you may want to remove the PNGs as well)<br/>rm "$menu.m2v"</p><p>The file <kbd>silence.mp2</kbd> is an MPEG1 L2 audio stream with... silence, of course. Replace with something else if you want audio for your menu, it just has to be MP2 or AC3 encoded. For <kbd>spumux.xml</kbd>, see above. The script takes one argument, the name of the menu. If you run it as "<kbd>./create-menu.sh myMenu</kbd>", it expects the gimp file at <kbd>graphics/myMenu.xcf</kbd> and will write the stream to <kbd>myMenu/menu.mpg</kbd>.</p><p>With The Gimp and a few lines of bash script it really becomes easy to design and author menus for video DVDs. But don't ask how long it took to actually research everything.</p><p>Finally, create a configuration file for dvdauthor (see one of those other tutorials for how to do it) and author the DVD.</p>Vacation video done, at last (pt 1)2009-05-16T22:49:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/vacation-video-done-at-last-pt-1<p>In case you wondered why I didn't update my LJ for several weeks (and rarely said something on Twitter, either): I was busy editing last year's vacation video. I won't link it here, it is mostly personal stuff and the quality of the footage is rather poor, but it was a nice exercise to learn editing. As <a href="http://www.kdenlive.org">Kdenlive</a> still isn't suitable for such a large project (but progressing quite well currently,) I had to resort to a non-free editing solution. <a href="http://www.adobe.com/products/premiereel/">Adobe Premiere Elements</a> did the job amazingly well, at least I didn't miss any feature of the professional version. Granted, as a 32 bit application it runs out of memory quite often with such a comparatively large project, but I've seen much worse behaviour of much more expensive software. The movie had <s>more than 700</s> 774 clips on the time line in the end, and runs for 94 minutes.</p><p><img height="272" src="http://img.woelfisch.de/prel-screenshot.jpg" with="340"/></p><p>The built-in DVD menu generator is not so useful: You can only slightly modify the pre-defined templates, unless you peek around a bit in the file system and discover that those are actually multi-layered Photoshop project files. I purchased the bundle with Photoshop Elements, thus I was able to modify a template a bit more, however opposed to Premiere Elements, Photoshop Elements is lacking some crucial features like guard lines (you can see but not create or move them) and some effects aren't directly accessible (you can "copy" them from some existing project, though.) I ended up installing The Gimp on the Vista system for the other graphics needed.</p><p>PRE's built-in export modules for DVDs and H.264 are broken. This is one frame from the DVD <br/>generated by PRE:</p><p><img height="255" src="http://img.woelfisch.de/rt-dvd-artifact.jpg" width="340"/></p><p>The (animated) caption is wrong, here's a close-up:</p><p><img height="122" src="http://img.woelfisch.de/caption-artifact.jpg" width="240"/></p><p>The vertical black line next to the blue box is in any export via the "distribute" menu. A DV video export does not have this artifact:</p><p><img height="122" src="http://img.woelfisch.de/caption-dv.jpg" width="240"/></p><p>What now? Well, reboot to my usual openSUSE Linux desktop, grab some multimedia conversion tools from <a href="http://packman.links2linux.de">Packman</a> and convert the DV file with ffmpeg. Et voila:</p><p><img height="122" src="http://img.woelfisch.de/caption-fixed.jpg" width="240"/></p><p>Unfortunately, FFmpeg is currently <em>a bit</em> too restrictive regarding DV AVI files generated by Windows. I get literally thousands of messages like <em>AC EOB marker is absent pos=64</em>. This is being tracked as <a href="https://roundup.ffmpeg.org/roundup/ffmpeg/issue1060">issue 1060</a> by the FFmpeg issue tracker, but not resolved yet. Don't think that MPlayer's mencoder would do any better: it relies on FFmpeg for reading DV files. Additionally, it crashes before it could finish conversion. What now? Extracting video and audio with <em>tcdecode</em> from the <a href="http://www.transcoding.org/">transcode</a> package does work, but I wasn't able to multiplex the streams again, as the current version of ffmpeg seems to ignore <kbd>-itsoffset</kbd> and transcode insists on re-encoding the whole video...</p><p>A colleague mentioned <a href="http://fixounet.free.fr/avidemux/">Avidemux</a> a while ago, and indeed: it is able to rebuild the stream without re-encoding its content. It also is able to encode to other formats, so I had some well encoded MP4 files very quickly. And it can even create MPEG2 streams suitable for DVD authoring! Or so I thought. Well, the lavc encoder sure has excellent compression, and it looked very well on the computer screen. However, my DVD player didn't like the stream at all. Apparently, it swapped the half-pictures, despite using the correct options. Mplayer and vlc don't care about it (in fact, they don't even recognize that something is wrong), so I had to rebuild the track again with FFmpeg after I was done with the menus and mastered the first DVD. Ugh. Hint: use single pass encoding to check whether it works at all, and afterwards recreate the stream with two-pass encoding. But don't fix the chapter entry points before you've created the final stream, as the start of the GOPs will change and FFmpeg cannot place GOP starts at pre-defined times.</p><p><em>To be continued...</em></p>About eating your own dog food2009-04-16T11:39:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/about-eating-your-own-dog-food<p>I've successfully updated my machine located at the data centre from openSUSE 11.0 to 11.1 via a remote SSH connection and "<kbd>zypper dup</kbd>" yesterday. Contrary to my previous experiences with online upgrades, only minor obstacles were encountered:<br/><ul><li>Jabberd, the only package from OBS, got rebuilt between downloading the meta data and the package itself</li><br/><li>Zypper somehow got confused by blank characters in repo locations midway through the update (simply restarting zypper helped)</li><br/><li>I had to copy back my manually edited postfix configuration as it was replaced by the generic one from the RPM</li><br/><li>Tomcat6 startup scripts missing JAVA_HOME</li></ul><br/>Just two hours of work (mainly observing zypper working and checking functionality), no serious breakage, no trip to the data centre, no manual update of half of the packages. I'm truly impressed.</p>Even More Google Earth Fun...2006-06-12T23:38:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/even-more-google-earth-fun<p><a href="http://earth.google.com/download-earth.html">YAY! At last!</a></p><p>Well, the Linux version is a bit unstable, quite slow without 3D acceleration and butt-ugly, but hey: it exists and it works.</p>SUSE Linux 10.0 Beta 3 on PPC2005-08-28T10:28:00+00:00o'wolfhttps://woelfisch.de/blog/author/owolfhttps://woelfisch.de/blog/suse-linux-100-beta-3-on-ppc<p>Usually, I don't post job related stuff here, but to be honest: running Linux on my Apple Titanium PowerBook (in short: TiBook) is just too cool :-)</p><p>Yesterday I gave it a try, I installed <a href="http://www.opensuse.org/index.php/PowerPC_Documentation">SUSE Linux 10.3 Beta 3</a> on the TiBook. Granted, it still has some minor issues, but those are just minor annoyances.</p><p>On the positive side (coming from SLES9 on ppc):</p><p><ul><br/><li>Suspend to RAM and Suspend to disk work. The latter unfortunately not via <kbd>pbbuttonsd (#113633)</kbd>, but an <kbd>echo disk >/sys/power/state</kbd> does what you'd expect from it. Now, if only OpenFirmware would start faster...</li><br/><li>As I just mentioned <kbd>pbuttonsd</kbd>: yes, the special keys to adjust volume and display brightness, the eject key and the power button do work as well. I haven't tried switching video output, but I'm afraid that won't work with the current Radeon driver anyway.</li><br/><li>OpenOffice.org 1.9 (2.0 pre-release). It even seems to work.</li><br/><li>A working keymap on the text console. Well, PC-style, but at least it has a pipe symbol.</li><br/><li>While the KDE desktop probably isn't as cool as the MacOS Tiger desktop, the whole system has a much more, well, fluent feeling to it. And chances are that it does not only feel but that it actually <em>is</em> faster than MacOS. ;-)</li><br/><li>Most stuff simply works without any manual intervention.</li><br/></ul></p><p>Issues encountered, most of them just of minor importance:</p><p><ul><br/><li><kbd>pbbuttonsd</kbd> switches the meaning of the function key: you need to press <kbd>fn</kbd> to get to the special keys instead of F1..F12, which is the other way around I'm used to from MacOS. Well, it can be changed easily in <kbd>/etc/pbbuttonsd.conf</kbd> if you don't like it.</li><br/><li>How do I get to a context menu in KDE with a one-button mouse?</li><br/><li>Sound does not start up on boot automatically (will be fixed in Beta 4)</li><br/><li>Sound presets are weird. It took me quite some time to figure that I either have to mute the <kbd>DRC</kbd> functionality or pull up <kbd>DRC Range</kbd> to get some noticable volume. Whatever <kbd>DRC<kbd> is supposed to mean. (#113630)</kbd></kbd></li><br/><li>KDE complains about <kbd>powersaved</kbd> not running, even though it is. Maybe because <kbd>pbbuttonsd</kbd> is using it already? (#113632)</li><br/><li>The <kbd>ide_cd</kbd> driver does not get loaded automatically, rendering the DVD writer unaccessible until I load the driver manually. Huh? (#113628)</li><br/><li>The <kbd>airport</kbd> WLAN card driver still lacks the hooks needed for <kbd>wpa_supplicant</kbd>. (#113631)</li><br/><li>The <kbd>airport</kbd> driver does not get found automatically by YaST (will be fixed in Beta 4.)</li><br/><li>Had to rename <kbd>ifcfg-wlan0</kbd> to <kbd>ifcfg-wlan-id-$MAC</kbd> for the WLAN interface to get started on boot.</li><br/><li>YaST cannot partition a disk with a Mac disklabel; it does not know about yaboot, either. Luckily, <a href="http://www.opensuse.org/index.php/PPC:POWER_team">The Olafs</a> have provided <a href="http://www.opensuse.org/index.php/PPC:Installation_issue">instructions on how to do it manually.</a></li><br/></ul></p>