From: JT on
On 19/01/10 17:25, houghi wrote:
> David Bolt wrote:
>
>> It picked the bttv module. Failed dismally with MythTV and kdetv but
>> works just fine with tvtime
>>
> I tried MythTV once and found it way to complex for what I needed, so I
> wrote my own script. Strangely when I want feed from /dev/video0
> directly I have a LOT of latency between video and sound. When I first
> record it to a file and then start playing that file after 5 seconds, I
> have no issues.
>
> I have not looked into it too much as to why. The only disadvantage I
> have is when changing channels I get a 5 second delay.
>
> The script also deletes the file once I close mplayer. The script:
>
> #v+
> #!/bin/bash
> #set -x
> mencoder -really-quiet \
> -tv driver=xv \
> -ovc lavc \
> -oac mp3lame \
> -sws 1 \
> -o file.avi \
> /dev/video0 &
> sleep 4
> gmplayer file.avi
> killall mencoder
> rm file.avi
> #v-
>
> Ideally I woud just do `mplayer /dev/video0` and be done with it.
>
> Changing channels I do by having a pulldown from XFCE that basically
> runs the command: `ivtv-tune --device=/dev/video0 -teurope-west -f 245.25`
> The last will be different as well as the icon and the name.
>
> The frequency I am able to look up at my cable operator (Telenet :
> http://zenders.be/ What is on I can see on http://www.tv.be/
>
> I have not yet found a site where I could just grab the information that
> I could use to see what is playing with xml feed or something similar.
> Some are available, but often not the chanels I like.
>
> houghi
>
Dear houghi,

I'm reading your posts with interest, at least most of the times ;-). So
let me jump in here. I was just fiddling around with the same issue here
and I might have (or not, just try and reproduce and let us know please)
a solution to the sound delay problem.

I also have a video capture card (hwinfo reports: Model: "Hauppauge
computer works WinTV PVR 350", guess linux is right again ... ) which
gives a huge (>5-10 sec's) delay in sound when using mplayer
/dev/video0. My (possible) solution: using gmplayer gives you the option
to right-click in the video window and select 'Preferences' from the
pulldown. When selecting the 'Audio' tab and subsequently the driver
'v4l2' the time-delay almost disappears on my system. This small unsync
will be easily adjustable by the 'Audio delay' slider below the list of
available drivers.

My guess is that a similar approach would work for 'smplayer' and maybe
even for vlc. Will try that later.

Thanks for your hint in using the 'mplayer /dev/video0' trick. I thought
it was not possible to play tv with this card at all without mythtv,
which I agree is a far too heavy app to just follow some tv-show
online. Now I just will have to find a list of freq's/channels for the
Dutch region I'm in.

--
Kind regards, JT

From: JT on
On 19/01/10 22:07, houghi wrote:
> JT wrote:
>
>> I also have a video capture card (hwinfo reports: Model: "Hauppauge
>> computer works WinTV PVR 350", guess linux is right again ... ) which
>> gives a huge (>5-10 sec's) delay in sound when using mplayer
>> /dev/video0.
>>
> I have the identical card.
>
>
>> My (possible) solution: using gmplayer gives you the option
>> to right-click in the video window and select 'Preferences' from the
>> pulldown. When selecting the 'Audio' tab and subsequently the driver
>> 'v4l2' the time-delay almost disappears on my system. This small unsync
>> will be easily adjustable by the 'Audio delay' slider below the list of
>> available drivers.
>>
> I tried that in the past from the command line and no succes. I tried it
> now and got a lot of errors and still no good sound. I now have selected
> alsa and that works.
>
Strange, but most likely to do with sound setup - and the related
localizations of settings. No big deal I guess, as long as one of the
options gives results.

>
>> Thanks for your hint in using the 'mplayer /dev/video0' trick. I thought
>> it was not possible to play tv with this card at all without mythtv,
>> which I agree is a far too heavy app to just follow some tv-show
>> online. Now I just will have to find a list of freq's/channels for the
>> Dutch region I'm in.
>>
> Look at the website of your cable provider. Or look at the teletext page
> on the mosaic of your cable provider (if available) or call them. Unless
> you have UPC, because they won't know how to pick up the phone. :-D
>
It's Ziggo here, never called them. Website gave me a table on which I
built a script that sets the frequency depending on cmdline input and
calls ivtv-tune with that freq. Will use that in the menus.
> With XFCE it is then pretty easy to make a menu with all the icons and
> channes and just connect it to the ivtv-tune script
> http://houghi.org/Fun/tv_001.jpg
>
> Background is just a distraction. Sorry. ;-)
>
No problem, matter of taste ... ;-)

> MPlayer should be pretty obvious.
> Launcher is the configuration of the launcher. There you see the name,
> the icon and the program that it should run.
>
> So when I click on the TV, the menu with all the tv stations opens. I
> can go down to e.g. BBC 2 and click on that. That will run the shown
> ivtv-tune and thus changes to that channel.
>
> The one at the end called TV starts `gmplayer /dev/video0`. So really
> no need for overkill like MythTV.
>
> houghi
>
I love those simple solutions. Will have to 'translate' into gnome menus
but knowing gnome, that won't be a (large) problem. Got it running for
the 3 Dutch networks already.

The only thing remaining is that I got a band of 'flickering' on the top
of the tv-output. About 10-20% of the height just gets dark every 5-10
sec's..... Will have to dive into the ivtv settings I guess.

Thanks again for providing me with a possibility to use the darn card at
last ! Got it for a year or so now , never been able to use kdetv/kwintv
etc. for the obvious reasons and threw mythtv out after 1 try .... well
..... also for obvious reasons...

--
Kind regards, JT

From: JT on
On 19/01/10 22:07, houghi wrote:
> JT wrote:
>
>> I also have a video capture card (hwinfo reports: Model: "Hauppauge
>> computer works WinTV PVR 350", guess linux is right again ... ) which
>> gives a huge (>5-10 sec's) delay in sound when using mplayer
>> /dev/video0.
>>
> I have the identical card.
>
>
>> My (possible) solution: using gmplayer gives you the option
>> to right-click in the video window and select 'Preferences' from the
>> pulldown. When selecting the 'Audio' tab and subsequently the driver
>> 'v4l2' the time-delay almost disappears on my system. This small unsync
>> will be easily adjustable by the 'Audio delay' slider below the list of
>> available drivers.
>>
> I tried that in the past from the command line and no succes. I tried it
> now and got a lot of errors and still no good sound. I now have selected
> alsa and that works.
>
>
>> Thanks for your hint in using the 'mplayer /dev/video0' trick. I thought
>> it was not possible to play tv with this card at all without mythtv,
>> which I agree is a far too heavy app to just follow some tv-show
>> online. Now I just will have to find a list of freq's/channels for the
>> Dutch region I'm in.
>>
> Look at the website of your cable provider. Or look at the teletext page
> on the mosaic of your cable provider (if available) or call them. Unless
> you have UPC, because they won't know how to pick up the phone. :-D
>
> With XFCE it is then pretty easy to make a menu with all the icons and
> channes and just connect it to the ivtv-tune script
> http://houghi.org/Fun/tv_001.jpg
>
> Background is just a distraction. Sorry. ;-)
> MPlayer should be pretty obvious.
> Launcher is the configuration of the launcher. There you see the name,
> the icon and the program that it should run.
>
> So when I click on the TV, the menu with all the tv stations opens. I
> can go down to e.g. BBC 2 and click on that. That will run the shown
> ivtv-tune and thus changes to that channel.
>
> The one at the end called TV starts `gmplayer /dev/video0`. So really
> no need for overkill like MythTV.
>
> houghi
>
For what it's worth: vlc works fine now too. Was very sloppy with sound
(hickups in sound as well as video output). When using: 'vlc --codec
invmem /dev/video0' -> no more problems...

In case you might wanna use vlc, this helps hopefully.

--
Kind regards, JT

From: JT on
On 20/01/10 08:52, houghi wrote:
> JT wrote:
>
>> I love those simple solutions. Will have to 'translate' into gnome menus
>> but knowing gnome, that won't be a (large) problem. Got it running for
>> the 3 Dutch networks already.
>>
> I also made a 'remote control'
> http://houghi.org/script/00_personal_scripts/tv/tv
> Explanation of one alinea (the rest are the same)
> 1) set chan vt4
> 2) set image [image create photo -file /home/houghi/bin/tv/$chan.pnm]
> 3) button .$chan -bd 0 -image $image -command {exec ivtv-tune \
> --device=/dev/video0 -teurope-west -f 245.25}
> 4) place .$chan -x 1 -y 1 -width 20 -height 20
>
> 1) Like "chan=vt4" with bash
> 2) Set the parameter image to /home/houghi/bin/tv/vt4.pnm
> 3) Decide that the button when pressed does the ivtv-tune command
> 4) Say where the button is.
>
> So all that you need to do is see that the name of the channel and the
> name of the image are the same, except it has pnm added.
> Images here: http://houghi.org/script/00_personal_scripts/tv/
>
Great minds think alike (always wanted to say that once :) ) ....
Similar setup here ;-)
>
>> The only thing remaining is that I got a band of 'flickering' on the top
>> of the tv-output. About 10-20% of the height just gets dark every 5-10
>> sec's..... Will have to dive into the ivtv settings I guess.
>>
> Is this outside the actual tv stuff or inside where there are images
> shown. If outside, you can look at mplayer options to crop the image.
>
The 'flickering' image was solved by using vlc instead of mplayer. Also
vlc does not have a lipsync issue.
>
> houghi
>


--
Kind regards, JT

From: JT on
On 20/01/10 15:38, houghi wrote:
> JT wrote:
>
>>> So all that you need to do is see that the name of the channel and the
>>> name of the image are the same, except it has pnm added.
>>> Images here: http://houghi.org/script/00_personal_scripts/tv/
>>>
>>>
>> Great minds think alike (always wanted to say that once :) ) ....
>> Similar setup here ;-)
>>
> So you have a CLI or a GUI solution? The script I had was GUI.
>
> houghi
>
CLI here. two scripts and some supporting files.
tv-start: basically starts vlc /dev/video0 (with some codec stuff etc).
tv-zender: sets the tv to one of the channels in the channel list.

tv-start also sets the channel to the last visited channel from a
previous session
wmctrl to set the vlc window title to the name of the channel /
frequency etc.

Might even call it a gui, because I also made some entries in the gnome
menu (for the start and one for each channel, with some fancy channel
logos for easy recognition). But that is stretching the term GUI I guess.

--

Kind regards, JT