Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

CherryTV

I have had a Bt878-based TV tuner for quite a while.

I have not made good use of it, though.

While it works great both in Lin­ux and Win­dows, I have some hard­ware is­sues... my on­ly PC that can take a PCI card is my file serv­er. Which is tucked away in a cor­ner, and lacks any kind of mon­i­tor (or mouse. or key­board­).

So, watch­ing TV there was not pos­si­ble. The ob­vi­ous so­lu­tion is a stream­ing video feed that could be ac­cessed ev­ery­where at home us­ing my wire­less net­work.

But... what could I use?

I de­cid­ed that the sim­plest stream­ing serv­er that could be ac­cessed from win­dows and lin­ux was VLC.

It is a bit tricky to get the right in­can­ta­tion, but here it is:

vlc -v --color v4l:/dev/video --sout \
'#transcode{vcodec=DIV3,vb=256,scale=1,acodec=mp3,\
ab=32,channels=2}:std{access=mmsh,mux=asfh,dst=:9998}'

Then you can ac­cess it from win­dows us­ing mm­s://192.168.1.2 and from Lin­ux us­ing mmsh://192.168.1.2 (if any­one knows why I have to use dif­fer­ent URL­s, I'd like to know).

It does­n't work from mplay­er, which is my de­fault video ap­p, but well.. it work­s.

Then there is a snag... how can you change chan­nel­s? Well, you can't, it seem­s.

So, I wrote a throw­away Cher­ryPy app in an hour or so, and I called it Cher­ryTV.

Here it is:

http://static.flickr.com/47/145091820_2454e4883f_m.jpg http://static.flickr.com/48/145104266_a964136b5e_m.jpg

How does it work (cur­rent­ly nerd­s-on­ly)?

  • You use xawtv to build a list of your TV sta­­tions us­ing the chan­nel ed­i­­tor.

  • Copy your .x­awtv file as xawtv in Cher­ryTV´s fold­er (one ex­am­­ple in­­­clud­ed)

  • Have v4lctl handy, and make sure it works like this:

    v4lctl setstation someStationName
  • Start Cher­ryTV

  • Start vlc stream­ing as men­­tioned above (change IP as need­ed)

  • Change stream URLs in cher­ryTV.py

  • Start cher­ryTV.py

  • Point your favourite brows­er to http://what­ev­er:8080

  • Choose whether your em­bed­d­ed video play­er works or not, and whether you use mm­s:// or mmsh:// URLs

  • Open your ex­ter­­nal view­er if need­ed.

  • Watch TV and be hap­py.

I know it's quite sim­ple to make this an ac­tu­al­ly us­able ap­p, which it cur­rent­ly is­n't, but it is good enough for me.

So, if any­one likes it the way it is, or in­tends to im­prove it... it's a measly 100 lines of python and it's here :-)

enrique / 2006-07-08 03:08:

che, que bueno esto!
Utilisima???? LOL.


Contents © 2000-2023 Roberto Alsina