2011-08-31

Enabling serial console on Linux Slackware

I'm doing this frequently enough to warrant a post.
  1. Make sure you use a kernel with console enabled

  2. Confirm that your serial tty's are detected with dmesg | grep tty:
    [    0.000000] console [tty0] enabled
    [ 1.323949] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    [ 1.568561] serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
    [ 1.592267] 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    [ 1.614293] 00:10: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A

  3. Edit /etc/securetty and uncomment the lines matching the ttyS you got from dmesg. Else you won't be able to logon as root.

  4. Edit your /etc/inittab and uncomment the lines:
    s1:12345:respawn:/sbin/agetty -L ttyS0 9600 vt100
    s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100
    While you're at it, you probably want to change the 9600 vt100 to 115200 linux, if you use putty in serial mode to connect for instance.

  5. If you want the boot messages on serial as well (recommended!), make sure you append a console= line to your kernel. For instance, if using LILO and for 115200 bauds, you would add a line:
    append = "console=ttyS0,115200"

2011-08-03

Extracting a single DTS/AC3 channel from an MKV file as a PCM WAV

Well, since audio and video software editors are still not there yet, a quick recepy.

Say you have a H264/DTS MKV video file and you want to extract the center channel, as WAV, for easy editing.
  1. Download tsMuxeR and extract the audio stream as a .dts (eg. "multichannel.dts"), using the GUI
  2. Download eac3to and run the following command to convert to a multichannel PCM WAV: eac3to.exe multichannel.dts multichannel.wav
  3. Download wavosaur and open the multichannel WAV. Then kill the channels you don't need, edit the file, etc.
None of the programs above use an installer - they can be extracted and run directly.