Linux notes | my old linux notes | HTPC notes | smovs.dk | nk-h.dk | Write a comment
My personal notes collected while messing with Ubuntu 6.06 (server) on my Mini-itx M10000 Nehemiah based server (with the OS running of a 2GB CF card, and a Hauppauge PVR-350 for experimental reasons), Ubuntu 7.04 on my IBM ThinkPad T23 and Ubuntu 7.10 on my T40p.
All entries here:
2008-12-15 03:49:41
Turn the display off (and on) remotely
2008-10-01 01:47:53
WD My Book Studio Edition 1TB
2008-07-25 17:37:13
Newcs cardserver
2008-07-19 18:12:09
Batch rename
2008-07-04 20:29:31
ThinkLight Gmail checker bash script
2008-06-28 23:54:42
Pinnacle DVB-T nano stick (PCTV 73e)
2008-06-21 19:21:20
Play video as ASCII in the console with VLC and mplayer
2008-04-30 19:35:23
Quite random short notes
2008-04-27 22:03:04
Drawing graphs with PHP
2008-04-20 19:01:48
Eggdrop IRC bot
2007-12-30 23:40:13
Apple Bluetooth Keyboard in Ubuntu
2007-12-30 23:28:50
Schedule a recording from the Hauppauge PVR-350
2007-12-30 23:23:50
Network streaming from a Hauppauge PVR-350
2007-12-30 23:09:12
System backup
2007-12-30 23:05:01
Apache2 - Restart
2007-12-30 23:03:41
Apache2 - Reverse Proxy
2007-12-30 22:03:39
Select input on Hauppauge PVR-350
2007-12-30 22:03:39
Capture pictures / screen shots from Hauppauge PVR-350
2007-12-30 21:36:13
Video playback through the tv-out on Hauppauge PVR-150

Network streaming from a Hauppauge PVR-350
Install IVTV - Ubuntu 6.06 IVTV Installation (andre Ubuntu guides)

Install VLC player:
sudo apt-get install VLC

Bitrate and resolution can be set with the following command:
ivtvctl --set-codec-params=bitrate_mode=1,bitrate=1000000,bitrate_peak=2500000,framerate=1,stream_type=2 --set-format=width=352,height=576

To record, use this command:
cat /dev/video0 > /mnt/hdd160/data/web/test.mpg

Use VLC to stream to a local ip (in this example 192.168.1.4), this gives a reasonable quality and my VIA C3 cpu can cope with the transcoding:
vlc -vvv --color pvr:/dev/video0:norm=pal:size=352x576:frequency=687250:bitrate=2000000:maxbitrate=2500000 --cr-average 1000 --sout '#transcode{vcodec=mp4v,vb=2024,scale=1}:duplicate{dst=std{access=rtp,mux=ts,dst=192.168.1.4:8080}}'

To receive the video stream (in windows or in the gui VLC player in linux) select: Open Network stream - UDP/RTR - Port 8080

To change the channel (connect to the server from a second SSH connection):
ivtv-tune -f687.25 -d/dev/video0 (where 687.25 is the frequency)

I've made a little script that can start the streaming and change channels (use one SSH connection to start the stream with the script and another one to change channels with the script). The script is in Danish, and the channels in it are from TDC Kabel-tv / YouSee in Roskilde, but I assume that it's still possible to get the idea of what's happening :) It's pretty simple.
The script can be found here: Channel changing script
Download the script and rename it with the command mv, and place it in /bin/bash then finally make it executable with the command chmod

2007-12-30 23:23:50