Category Archives: nerd

Streaming Live TV to Android through http

I use a dvb device to record HDTV on my linux box, and want to stream the video to my new droid bionic. I found a decent solution using vlc. I mostly use this for football when I’m out of town.

 

vlc command

Took me a while to work this out:
cvlc -vvv dvb:// --dvb-frequency=FREQ --dvb-modulation=256 --sout '#transcode{soverlay,ab=42,samplerate=44100,channels=1,acodec=mp4a,vcodec=h264,width=640,height=352,vfilter="canvas{width=640,height=352,aspect=16:9}",fps=29.97,vb=400,venc=x264{vbv-bufsize=500,partitions=all,level=12,no-cabac,subme=7,threads=4,ref=2,mixed-refs=1,bframes=0,min-keyint=1,keyint=50,trellis=2,direct=auto,qcomp=0.0,qpmax=51}}: standard{access=http,mux=ts,dst=IP:PORT}'

where:
FREQ is the channel frequency (2nd column in your dvbscan file)
IP is the IP address to bind to
PORT is the port (I use 8080)

You can see if its running properly with:

vlc http://IP:PORT

on another machine.

 

Playing on android

I evaluated two apps to play http streams: Daroon Player and MoboPlayer. I couldn’t get MoboPlayer to work for more than a split second.

I use Daroon Player. It is free and in the Market. when you open it, hit the streams->menu->add. Give it a name and enter

http://IP:PORT

You can tell daroon player to use the hardware decoding on your phone to save batter/CPU.
Go to menu->settings->Decoding Mode and change http to Hardware Decoding.
The above encoding works on the hardware decoder on my droid bionic. I’ve heard it has a TI decoding chip (vs other ones on, say, the iphone) so you may need to change things.

There are still some issues I have to work out:

  • I couldn’t get audio to work using the software decoder in the Daroon Player. I really didn’t mind since I prefer the hardware decoder, but may be an issue for other phones.

 

Script

I use the following script to parse my channels file from DVB scan, and startup the server.


#!/bin/bash

SCANFILE=~/.mplayer/channels.conf
WIDTH=640
HEIGHT=352
ASPECT=16:9
VB=400

if [ $1 ] ; then
FREQ=`grep ^$1: $SCANFILE | awk 'BEGIN { FS = ":" } ; { print $2 }'`;
if [ $FREQ ] ; then
OP="#transcode{soverlay,ab=42,samplerate=44100,channels=1,acodec=mp4a,vcodec=h264,width=$WIDTH,height=$HEIGHT,vfilter=\"canvas{width=$WIDTH,height=$HEIGHT,aspect=$ASPECT}\",fps=29.97,vb=$VB,venc=x264{vbv-bufsize=500,partitions=all,level=12,no-cabac,subme=7,threads=4,ref=2,mixed-refs=1,bframes=0,min-keyint=1,keyint=50,trellis=2,direct=auto,qcomp=0.0,qpmax=51}}:standard{access=http,mux=ts,dst=192.168.1.102:8080}"
CMD="cvlc -vvv dvb:// --dvb-frequency=$FREQ --dvb-modulation=256 --sout "$OP
echo $CMD
$CMD >& /dev/null
else
echo "COULD NOT FIND CHANNEL $1!!!!"
exit 1
fi
else
echo "Usage: $0 [channel]"
fi

Iphone Restore from Recovery Mode

I woke up with my iphone telling me to plug it into itunes. I did, and it started to update and restore the software, which failed.

Afterwards, the phone still didn’t boot past the “plug into itunes” screen, but itunes wouldn’t recognize it to try to restore again.

After a lot of digging, I found how to force the phone into “Recovery Mode” again: as you turn it on, hold the top and home buttons. After the connect to itunes screen appears, release the top button but keep holding the home button. This will make re-register itself as an apple recovery mode device.

After that, the restore still failed, so I shift-clicked restore and selected a fresh .ipsw I downloaded online. That also failed with error code 1015. I did it one more time from apple, and it worked, but then it consistently booted into recovery mode.

This guide: http://www.ihackintosh.com/2009/07/irecovery-iphone-recovery-mode-loop-restart/ sorted that out. Nice usb utility too.

I moved to wordpress

This is for 2 reasons:
1) I can easily make posts with pictures from my phone
2) Its easier to look at posts from my phone

Since I want to use this mostly for recipes, this makes sense.

Pidgin spellcheck problem in Kubuntu 9.04

I ran into a weird spellcheck problem with pidgin in kubuntu 9.04. Pidgin uses the gtkspell library, but it kept telling me every word was spelled wrong. If I ran it with
LANG=en_US pidgin

Everything worked fine. I didn't find much on the net, but installing aspell seems to have fixed the problem… somewhere o.O.

Widescreen DVD creation in Linux

I recently wanted to make some widescreen dvds to pass on to my parents. I remember trying this before, but having nothing but headaches. Fortunately, software updates have made dvd authoring pretty easy. Here is how I did it in linux using only command line utilities.

I wanted to make a disk that just had the movie (no menu's, etc), and have it play in a regular ntsc dvd player.

read more

pdflatex and errors with IEEE PDF eXpress

I've been preparing a paper for publication in CVPR, and ran into some problems getting my pdf to pass the IEEE checks. Specifically, in PDF eXpress I got the following errors:
Document contains Link annotation(s) (98x on pages 1-8)
Font Helvetica is not embedded

The fixes on the IEEE website aren't very helpful if you are using pdflatex (they all reference editing the pdf in acrobat pro).

read more

MPI Error Fix

I've been doing a lot of MPI development recently, and had a few MPI programs that crashed. After this happened, I kept receiving the following error on when using mpi-lam:

The selected RPI failed to initialize during MPI_INIT.

read more