HOW TO: Stream TV over LAN using secondary card + VLC. (1 Viewer)

htpcNoob

Portal Pro
January 23, 2005
52
0
For a while now, I've wanted my HTPC to stream TV to via TCP/IP. Ive finally succeded :) and here's what I used.

1) VLC 0.8.4a
2) Secondary *SOFTWARE BASED* tv tuner card (explanations why below)
3) Thats it :)

OK. Explanation for #2. I have a PVR-250 on my HTPC that I use to view and record tv. But to have it stream simultaneously over my LAN i needed a secondary card. I had a software based card (Compro Videomate Gold+) lying around so i used that as my streaming card. In fact, to stream over the LAN, it is better to use a software based card rather than a hardware encoding card.

WHAT????? you may ask. Here is a link explaining why: http://www.aardvark.co.nz/pvr/pvr7.shtml. Consider what the article says about editing the RAW video instead of an MPEG. The same logic can be applied to transcoding video for streaming. The CPU usage, believe it or not, would be about the same regardless of using an mpeg encoder card (PVR-250) or a 'dumb' card. So overall cpu usage under vlc, would be about the same. For anyone interested, here my VLC command line to start the streaming:

Code:
start /min /low "C:\Program Files\VideoLan\VLC\vlc.exe" -I rc --ttl 2 dshow:// :dshow-vdev="VideoMate TV Capture" :dshow-adev="NVIDIA(R) nForce(TM) Audio" :dshow-size="320x240" :dshow-caching=200 :dshow-chroma="NTSC_M" :dshow-fps=0.000000 :dshow-config :no-dshow-tuner :dshow-tuner-channel=3 :dshow-tuner-country=1 :dshow-tuner-input=0 :sout=#transcode{vcodec=mp4v,vb=768,scale=1,acodec=mp3,ab=128,channels=2}:standard{access=mmsh,mux=ts,url=:1234}} --sout-transcode-fps=30 --one-instance

Thats a looooong command line, well for the average windows user anyway.

Now theres an issue that I think is more personal (or maybe its VLC). The :dshow-config actually pops up 4 (thats right, FOUR) dialog box for the tv tuner's various properties. If i dont do this, VLC causes my system to BSOD :-(. On top of this, I use a remote to control my HTPC so the 4 dialogs were a real distraction. So I wrote a small program that uses windows FindWindow and SendMessage API's to actually press the OK buttons on all 4 popup dialog boxes automatically :). Luckily, I didnt have to set any options on the dialog boxes, just had to press to OK buttons.

I set the executable to run automatically before Media Portal starts when windows loads. To access my stream from another computer I use the following command using VLC:

Code:
"C:\Program Files\VideoLAN\vlc.exe" --crop-geometry 300x230+4+6 --width 450 --height 345 mmsh://192.168.1.100:1234

The crop-geotmetry is used to crop the corners of the image because of the 'noisy' areas that are present in all standard tv tuners around the corners.

Resource usage on my system:
My system is an A7N-266VM/AA mATX Mobo with 512mb or RAM, AthlonXP 1800+ processor, Radeon 9000AGP 64MB
CPU usage: between 10-18%. Occasional spike up to 23%.
Memory Usage of VLC: 25MB.
Also, from my VLC launch code above, Ive set the process priority to low using the /low parameter. That makes VLC only use cpu that is IDLE.

Other than a couple of RARE stutters, I have no problems streaming to 4 PC's simultaneously (2 wirelessB's). while running mp, listening to music, watching/recording tv using my PVR-250 or watching a dvd/divx. But YMMV depending on your system specs/windows setup/etc.

As a side note, when you configure the tuner card properties you should set the resoution of the image to reflect that of the command used in VLC. So if in VLC you encode to resolution 320x240 you should set the the tuner to output to 320x240. That way VLC wont use cpu resources 'downsizing' the image.
 

weekendowel

Portal Member
September 5, 2005
31
12
Stockholm
Home Country
Sweden Sweden
Nice!

I tried to get VLC to work this way but I didn't success the first time I tried it :)


Are you able to change channels from the remote machine or is it always the one you have on the serving machine?
 

fera

Portal Pro
October 13, 2005
71
0
That sounds interesting! Would it also work the other way around? (MP without a tv card...)
 

Users who are viewing this thread

Top Bottom