LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-17-2005, 04:14 PM   #1
huepfendes_schaf
LQ Newbie
 
Registered: Dec 2005
Location: Luxembourg
Distribution: Fedora Core 5
Posts: 23

Rep: Reputation: 15
tv card: bad quality in TVTime


Hi
I have a Pinnacle pctv usb2 tv card. I have installed the v4l2 driver with the em2820 module from (linuxtv.org). I have to use sox(sox -t ossdsp -r 48000 -b -c 2 /dev/dsp2 -t ossdsp /dev/dsp) to make the sound work.
Now the card works, but the quality of most senders is very bad. I use tvtime. In windows the quality is good.

In some senders, the sound is so bad that I can't understand anything.(even if I use finetune), but the pictures are ok.

With other senders I can receive a good sound quality with finetune, but with this adjustement, the pictures are bad and when I adjust that the pictures are good, the sound is bad. So I can choose between a good sound or good pictures, but both together doesn't work.

Some rare senders work perfectly.
 
Old 12-17-2005, 07:29 PM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Please describe these "senders". If they are media players, you can try using MPlayer or Xine. Really USB has high latency for multimedia transfer, so I suggest using Firewire.

Try using a DV camcorder that has analog to digital pass-thru if you want high quality. If you can use a PCI card, I suggest any card based on Philips SAA713x chip. Conexant based video captures cards decodes poor video quality or grainy video.
 
Old 12-18-2005, 04:09 AM   #3
laurentwahl
Member
 
Registered: Nov 2004
Distribution: Fedora Core 4
Posts: 141

Rep: Reputation: 15
I have the same problem as you, huepfendes_schaf.

This pinnacle tv-card annoyes me so much, it took me such a long time to make it work and the quality is awful. I would be glad if somebody could help.

Last edited by laurentwahl; 12-18-2005 at 04:22 AM.
 
Old 12-18-2005, 04:16 AM   #4
huepfendes_schaf
LQ Newbie
 
Registered: Dec 2005
Location: Luxembourg
Distribution: Fedora Core 5
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Electro
Please describe these "senders".
The senders where the sound doesn't work at all have the band UHF, like for example DSF:
<station name="dsf" active="1" position="95" band="UHF" channel="U24" finetune="-3"/>

A sender where the adjustement of best audio and best video aren't together is e.g. RTL:
<station name="RTL" active="1" position="6" band="VHF E2-E12" channel="E6" finetune="16" norm="PAL" audio="bg"/>

I live in Switzerland.


Quote:
Originally Posted by Electro
If they are media players, you can try using MPlayer or Xine.
In mplayer I don't receive any sound, even with sox. I used the command:
mplayer -tv driver=v4l2:amode=0:input=0:norm=PALutfmt=yuy2:forceaudio:immediatemode=0 tv://

In xine I didn't succeed to make the tv work. Perhaps somebody can give me some advice, because I didn't find a good howto an google.


Quote:
Originally Posted by Electro
Really USB has high latency for multimedia transfer, so I suggest using Firewire.
Try using a DV camcorder that has analog to digital pass-thru if you want high quality. If you can use a PCI card, I suggest any card based on Philips SAA713x chip. Conexant based video captures cards decodes poor video quality or grainy video.
I have no firewire an no DV camcoder, an don't want to buy anything of this stuff, because in windows it works, so there must be a way to make it work in Linux.
 
Old 12-18-2005, 02:27 PM   #5
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Try the following command. I added a video filter so mplayer will not convert back to yv12 and lose video quality and you can get some acceleration from the video card. The command may work with audio sync lagging behind the vidoe or may not work. Play around with command. You do need xawtv and its utilities.
v4lctl setattr mute 0 ; mplayer -tv driver=v4l2:amode=0:input=0:norm=PAL:outfmt=yuy2:forceaudio:immediatemode=0 -audiofile /dev/dsp2 -audio-cache 8192 -channels 1 -rawaudio on:channels=1:rate=48000 -vf scale=-1,-1:yuy2 -ao oss:dsp-device=/dev/dsp -vo xv tv:// && v4lctl setattr mute 1

Another way is to use mencoder and pipe it to mplayer. There will be some video lag time if you compare what is recieved by a regular TV.

The TV viewing programs in Linux was written for a PCI card that has a loop cable going towards a sound card. This is the reason why I suggest a PCI video capture in the first place. You want to stick with a USB video capture device. That is fine, but you are on your own. If you know how to program, you can make a TV viewing program that works with these types of devices.
 
Old 12-18-2005, 03:00 PM   #6
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
The senders where the sound doesn't work at all have the band UHF, like for example DSF:
<station name="dsf" active="1" position="95" band="UHF" channel="U24" finetune="-3"/>

A sender where the adjustement of best audio and best video aren't together is e.g. RTL:
<station name="RTL" active="1" position="6" band="VHF E2-E12" channel="E6" finetune="16" norm="PAL" audio="bg"/>

I live in Switzerland.
They are not called senders. All you are doing is changing channel E6 frequency about 16 steps higher. The steps is designated by the tuner in hardware or by module (driver). For the audio informaiton, they come in as different stations for each channel (I think). The program sox is not able to change to different audio stations. It is up to the TV viewing program to do this or use xawtv utilities. A USB devices depends on software more than PCI cards, so that is one reason why I suggest getting a PCI card.

I live in the US where we use NTSC and there are no audio stations that is carry along the TV channels. The audio is carried on a FM signal at a fixed frequency. The TV channels are very accurate sending at a certain RF, so fine tunning is not needed.

You can try using MythTV if mplayer does not work.
 
Old 12-19-2005, 10:00 AM   #7
huepfendes_schaf
LQ Newbie
 
Registered: Dec 2005
Location: Luxembourg
Distribution: Fedora Core 5
Posts: 23

Original Poster
Rep: Reputation: 15
With the command: "v4lctl setattr mute 0" and with sox I receive sound in mplayer.
But I receive some errors with your mplayer command.
The option "-audiofile /dev/dsp2" provides:
Quote:
audio block size too low, setting to 8192!
v4l2: ioctl query control failed: Invalid argument
Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/win32/avisynth.dll, /usr/local/lib/win32/avisynth.dll
and the option "-audio-cache":
Quote:
Unknown option on the command line: audio-cache
and the option "-rawaudio on" gives:
Quote:
Video: no video
And "-vf scale=-1,-1":
Quote:
Option vf: -1 doesn't exist.
and: "-vf yuy2":
Quote:
The h option must be an integer: yuy2
Option vf: Error while parsing scale parameter h (yuy2)
And finally with the persisting options:
"mplayer -tv driver=v4l2:amode=0:input=0:norm=PAL:outfmt=yuy2:forceaudio:immediatemode=0 -channels 1 -rawaudio channels=1:rate=48000 -vf scale=-1 -ao oss:dsp-device=/dev/dsp tv://"
I receive the pictures with the sound. But I don't yet see the advantages of this complicated command, compared to the command:
"mplayer -tv driver=v4l2:amode=0:input=0:norm=PAL:outfmt=yuy2:forceaudio:immediatemode=0 tv://"
I think that the first command has more channels, but I didn't have yet the time to compare the quality. But I saw already that the quality of some channels is still bad, but I think that other channels are better.

Sorry for my english. Now I know that the channels are not senders :-)

Last edited by huepfendes_schaf; 12-19-2005 at 02:12 PM.
 
Old 12-19-2005, 11:45 AM   #8
huepfendes_schaf
LQ Newbie
 
Registered: Dec 2005
Location: Luxembourg
Distribution: Fedora Core 5
Posts: 23

Original Poster
Rep: Reputation: 15
the channels, where I didn't understand anything in tvtime, are as bad in mplayer.

in mplayer I receive often the message:
Quote:
too bad - dropping audio frame !
and I receive often the message
Quote:
video buffer full - dropping frame
When one of these messages comes once, it keeps coming continuously till I quit the program.
 
Old 12-19-2005, 10:53 PM   #9
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I did say you have to play around the settings. Did you ever check man mplayer.

The following command does two things. One it previews the video in a window and it plays the audio stream with out the need for sox. I changed it and add a few things like using larger cache to compensate for high latency that USB has.
mplayer -tv driver=v4l2:amode=0:input=0:norm=PALutfmt=yuy2:forceaudio:immediatemode=0 -channels 1 -rawaudio channels=1:rate=48000 -vf scale=-1:-1,yuy2 -audiofile-cache 8192 -cache 32768 -cache-min 25 -ao oss:dsp-device=/dev/dsp tv://

You do need a lot of memory to do the command above. I think it may be better to change outfmt to some RGB color space. I suggest doing mplayer -tv outfmt=help to get a list of supported colorspace for your video capture device.

I still recommend that you get a PCI video capture card so you do not have any future problems.
 
Old 12-20-2005, 01:49 PM   #10
huepfendes_schaf
LQ Newbie
 
Registered: Dec 2005
Location: Luxembourg
Distribution: Fedora Core 5
Posts: 23

Original Poster
Rep: Reputation: 15
I have only a laptop,so I can't buy a pci card.

I read the man of player but I am quite a newbie in linux, so I don't understand everything and there is not written everything. For example you said to use -ao dsp-device=/dev/dsp. In the man is nothing written of this suboption:
Quote:
-ao <driver1[:suboption1[=value]:...],driver2,...[,]> Specify a priority list of audio output drivers to be used.

If the list has a trailing ’,’ MPlayer will fall back on drivers not contained in the list. Suboptions are optional and can mostly be omitted.
NOTE: See -ao help for a list of compiled-in audio output drivers.

EXAMPLE:
-ao alsa,oss,
Try the ALSA driver, then the OSS driver, then others.
-ao alsa:mmap:noblock:device=hw=0.3
Sets noblock-mode, mmap-mode and the device-name as first card, fourth device.

Available audio output drivers are:

alsa
ALSA 0.9/1.x audio output driver
mmap
Sets experimental mmap-mode (does not work for more than 2 channels).
noblock
Sets noblock-mode.
device=<device>
Sets the device name. Replace any ’,’ with ’.’ and any':’ with ’=’ in the ALSA device name. Make sure you do not set this when you want hwac3 output via S/PDIF, unless you really know how to set it correctly.

alsa5
ALSA 0.5 audio output driver

oss
OSS audio output driver
dsp-device
Sets the audio-output device (default: /dev/dsp).

and so on...
So now I don't know how the right command is, because with the command you proposed I receive:
Quote:
[AO OSS] audio_setup: Can't open audio device dsp-device=/dev/dsp: No such file or directory
Could not open/initialize audio device -> no sound.
Audio: no sound
Without the dev-device= command, I can hear my microphone. So could you please give me some advice, or where can I see a manual of all the suboptions, because I couldn't find one.

Thanks for your help electro
 
Old 12-20-2005, 03:46 PM   #11
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Quote:
I have only a laptop,so I can't buy a pci card.
You should of said this before.

I did not include -ao dsp-device=/dev/dsp. I included -ao oss:dsp-device=/dev/dsp. Not all distributions set /dev/dsp to /dev/dsp0 by a symbolic link. Also if you get device busy for /dev/dsp0. You will have to close the program(s) that is using it and then run it again. Laptop sound can only handle one PCM (audio) at a time. To ge around this issue is to use artsd or alsa dmix library.

If you have a desktop computer and it has an open PCI slot, use a MPEG-1/MPEG-2 PVR or bt878 based video capture card. Then use Video Lan Client to broadcast the video to your notebook computer. I suggest a PVR card because you can setup a web server and write a perl script to change the TV channels or switch to other inputs.

Have you looked in using PCMCIA.

Sorry about the simile in the mplayer syntax. Below is with out the simile enabled.
mplayer -tv driver=v4l2:amode=0:input=0:norm=PAL:outfmt=yuy2:forceaudio:immediatemode=0 -channels 1 -rawaudio channels=1:rate=48000 -vf scale=-1:-1,yuy2 -audiofile-cache 8192 -cache 32768 -cache-min 25 -ao oss:dsp-device=/dev/dsp tv://
 
Old 12-21-2005, 12:37 AM   #12
gradedcheese
Member
 
Registered: Nov 2003
Posts: 59

Rep: Reputation: 15
huepfendes_schaf -- slightly off-topic but did you try the composite video input on this card? I am looking for a way to get composite video on my laptop so I am wondering if that part of this card works well. I posted a question about it here:

http://www.linuxquestions.org/questi...d.php?t=395117
 
Old 12-21-2005, 07:31 AM   #13
huepfendes_schaf
LQ Newbie
 
Registered: Dec 2005
Location: Luxembourg
Distribution: Fedora Core 5
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Electro
I did not include -ao dsp-device=/dev/dsp. I included -ao oss:dsp-device=/dev/dsp. Not all distributions set /dev/dsp to /dev/dsp0 by a symbolic link. Also if you get device busy for /dev/dsp0. You will have to close the program(s) that is using it and then run it again. Laptop sound can only handle one PCM (audio) at a time. To ge around this issue is to use artsd or alsa dmix library.
Yes I made it like you said too, in the post I only forgot to mention it, because I receive almost the same error if I add "oss" or not. With "-ao oss:dsp-device=/dev/dsp" I receive:
"[AO OSS] audio_setup: Can't open audio device dsp-device=/dev/dsp: No such file or directory
Could not open/initialize audio device -> no sound.
Audio: no sound"

It was clear to me, that I only can run one programm which uses oss. This is not the Problem

Many thanks Electro


To gradedcheese:
The composite audio works with tvtime and sox perfectly. I couldn't test the video yet, but this week-end, when I go home from school, I will test it. then I tell you if it works. But I am pretty sure that it works.

Last edited by huepfendes_schaf; 12-21-2005 at 07:32 AM.
 
Old 12-23-2005, 07:03 AM   #14
huepfendes_schaf
LQ Newbie
 
Registered: Dec 2005
Location: Luxembourg
Distribution: Fedora Core 5
Posts: 23

Original Poster
Rep: Reputation: 15
I succeeded now to make the sound work without sox. I only have to use the option "alsa:adevice=hw.2" (because it's the /dev/dsp2)
Quote:
v4lctl setattr mute 0
mplayer -tv driver=v4l2:amode=0:input=0:norm=PAL:alsa:adevice=hw.2:outfmt=yuy2:forceaudio:immediatemode=0 -channels 1 -rawaudio channels=1:rate=48000 -vf scale=-1:-1,yuy2 -audiofile-cache 8192 -cache 32768 -cache-min 25 -ao oss tv://
But in the channels where the sound didn't work with sox, it still don't work. How can I finetune a channel in mplayer? I haven't found such a function in mplayer? Any advice?
 
Old 12-23-2005, 05:15 PM   #15
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You might want to use freq for each channel. You can not change channels if you use this setting. To get around this issue, you can try making a perl or python script that closes and opens up mplayer for every channel. The hard part is finding the channel's frequency.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cd ripping: why is quality bad? fatblueduck Linux - Software 2 09-30-2005 01:16 AM
A hint of lag, and quality of videos are bad. D4ve G Linux - Newbie 16 07-19-2005 05:41 PM
Bad sound quality in Linux astrosapiens Linux - Hardware 4 04-06-2005 02:59 PM
vlc - bad sound quality bobbens Linux - Software 2 02-08-2005 03:22 PM
Extremly bad sound quality on americas army. DesyphER Linux - Games 0 01-18-2005 02:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration