LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-26-2004, 02:56 PM   #1
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Rep: Reputation: 0
tvtime works..but nothing else


Hello everyone.

Here is my problem;

I have a tv card installed and working using the bttv driver. I use the program 'tvtime' to watch tv and to view the input video on the tuner card.

I recently discovered nvrec and tried to use that, but failed. The problem is that 'tvtime' is the only thing that can actually use my tuner card. I've tried xawtv to no sucess too. I only get a blue screen.

Can anyone help?
 
Old 11-26-2004, 03:32 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
we can't help if you do't tell us any useful information... normally these sorts of problems come down to configuration, frequency tables etc... you've not even said in what way they don't work....
 
Old 11-26-2004, 10:41 PM   #3
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
Well actually I dont know what the problem is..
But i can tell you these:

Using scantv, i can scan channels fine. But xawtv will still not work. I even use the --all frequencies option.

what shows up in xawtv is just a blue screen. with no sound.

i even tried using mplayer to look at it and i get a green screen with 100% cpu

the output of nvrec's error is this:

Code:
joe@scarlet:~/stuff/nvrec-20030316$ ./divx4rec -o test.avi
Starting nvrec.c, version CVS-current (nvrec-CVS-current).
nvcore_parse_file(617): Error opening "/etc/nvrec.conf"
nvcore_parse_file(617): Error opening "/home/joe/.nvrec.conf"
v4l1_core_init(323): Size: 384x288 from /dev/video
v4l1_core_init(393): Set window: Invalid argument
main(70): nvrec: initialising capture device: Invalid argument
with the newest nvrec is this:

Code:
joe@scarlet:~/stuff/nvrec-20040903$ ./divx4rec -o test.avi
Starting nvrec.c, version CVS-current (nvrec-CVS-current).
nvcore_parse_file(690): Error opening "/etc/nvrec.conf"
nvcore_parse_file(690): Error opening "/home/joe/.nvrec.conf"
Segmentation fault
so can someone help me narrow down to where my error is originating from?

again.. tvtime is the only thing that seems to be able to access my tv card, since i watch tv on it fine
 
Old 11-27-2004, 03:30 PM   #4
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
What command are you using with MPlayer?
To watch:

Code:
mplayer -tv driver=v4l:norm=ntsc:channel=03:chanlist=us-cable:width=640:height=480 tv://
To record:

Code:
mencoder -oac lavc -lavcopts acodec=mp3 -ovc lavc -lavcopts vbitrate=1800 -tv driver=v4l:norm=ntsc:channel=03:chanlist=us-cable:adevice=/dev/dsp:width=640:height=480 -o my.avi tv://
Pick your own norm, channel, and chanlist.

man mplayer will give you details.
 
Old 11-27-2004, 03:39 PM   #5
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
Ok I tried using mplayer again using your mplayer arguments.

The problem is that it gives me an error that says,
Quote:
Error: Cannot set norm!
This is my exact input:

Code:
mplayer -tv driver=v4l:norm=ntsc:channel=03:chanlist=us-cable:width=640:height=480 tv://
I kept it the same as yours because everything is already set right.

Here is the output of mplayer:

Code:
Playing tv://.
TV detected! ;-)
Selected driver: v4l
 name: Video 4 Linux input
 author: Alex Beregszaszi
 comment: under development
=================================================================
 WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!
 As the V4L1 compatibility layer is broken, this may not work.
 If you encounter any problems, use driver=v4l2 instead.
 Bugreports on driver=v4l with v4l2 drivers will be ignored.
=================================================================
Selected device: BT878 video (Hauppauge (bt878))
 Capabilites: capture tuner overlay clipping scales 
 Device type: 171
 Supported sizes: 48x32 => 768x480
 Inputs: 4
  0: Television: tuner audio tv camera  (tuner:1, norm:ntsc)
  1: Composite1: audio camera  (tuner:0, norm:ntsc)
  2: S-Video: audio camera  (tuner:0, norm:ntsc)
  3: Composite3: audio camera  (tuner:0, norm:ntsc)
Using input 'Television'
ioctl get tuner failed: Invalid argument
Tuner isn't capable to set norm!
Error: Cannot set norm!


Exiting... (End of file)
I feel like im missing something very obvious.. Please ignore my newbish'ness
 
Old 11-27-2004, 03:43 PM   #6
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
Hey i was missing something very obvious!

Code:
=================================================================
 WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!
 As the V4L1 compatibility layer is broken, this may not work.
 If you encounter any problems, use driver=v4l2 instead.
 Bugreports on driver=v4l with v4l2 drivers will be ignored.
=================================================================
Well after changing the 'driver' option to v4l2..it works fine.


So now that I can use mplayer fine..what is stopping me from using 'nvrec?'

I was reading up on nvrec's mailing list and it seems i need a v4l-compat module. Where do I find this?
 
Old 11-27-2004, 03:46 PM   #7
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
Sorry, I can't help you with "nvrec". I've never used it.
 
Old 11-27-2004, 04:58 PM   #8
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
Do you happen to know how to correctly use alsa with mplayer?

I've been looking over google for a while and can't find anything useful

Using the option :alsa and the option :adevice i should be able to record from Line1 since that is where the sound from my tv card comes from.

But when i try to do adevice=hw.0,14 i get errors.

here is my input:

Code:
mencoder -oac lavc -lavcopts acodec=mp3 -ovc lavc -lavcopts vbitrate=1800 -tv driver=v4l2:norm=ntsc:channel=03:chanlist=us-cable:alsa:adevice=hw.0,14:forceaudio:width=640:height=480 -o test.avi tv://
i use 'hw.0,14' since to the best of my knowledge i use paramaters from dump-mixers

and here is my output:

Code:
MEncoder 1.0pre5-3.2.2 (C) 2000-2004 MPlayer Team

CPU: Intel Pentium 4/Xeon/Celeron Foster 2394 MHz (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Reading /home/joe/.mplayer/codecs.conf: Can't open '/home/joe/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/joe/.mplayer/mencoder: No such file or directory
Font /home/joe/.mplayer/font/font.desc loaded successfully! (206 chars)
success: format: 9  data: 0x0 - 0x0
TV detected! ;-)
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
Selected device: BT878 video (Hauppauge (bt878))
 Tuner cap:
 Tuner rxs: MONO
 Capabilites:  video capture  video overlay  VBI capture device  tuner  read/write  streaming
 supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-Nc; 4 = PAL-M; 5 = PAL-N; 6 = NTSC-JP; 7 = PAL-60;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video; 3 = Composite3;
 Current input: 0
 Current format: YUV420
v4l2: current audio mode is : MONO
Error opening audio: No such file or directory
============ Sorry, this file format is not recognized/supported =============
=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===
Cannot open demuxer.
Exiting...
here is the output of 'dump-mixers'

Code:
/dev/mixer0 = ICH (Realtek ALC650 rev 1)
  vol        ( 0) :  stereo  rec   80/80
  pcm        ( 4) :  stereo        50/50
  speaker    ( 5) :  mono          16
  line       ( 6) :  stereo  rec   67/67
  mic        ( 7) :  mono    rec*  0
  cd         ( 8) :  stereo  rec   67/67
  igain      (12) :  stereo        0/0
  line1      (14) :  stereo  rec   67/67
  dig1       (17) :  mono          0
  phin       (20) :  mono    rec   0
  phout      (21) :  mono    rec   0
  video      (22) :  stereo  rec   0/0
 
Old 11-27-2004, 06:47 PM   #9
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
Sorry I don't know. I'll try to find out.

Once you get that figured out though, you may also need to
set "line1" as a record device.

Run:

"alsamixer"

Use the arrow keys to move to "line1" .
Tap the space bar to set it as a record device.
If you want to keep this setting between boots, you may
have to go "su" and do an "alsactl store" .
(just a note here, I don't know how to toggle this back off,
but I don't think it hurts to leave it)

If you want to preview while recording, tapping "M" on "line1"
will mute it. As long as the volume is up and it is a record device,
it should still record.
You can then open the the clip with your favorite player.
 
Old 11-27-2004, 07:21 PM   #10
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
Just a guess but try:

Code:
mencoder -oac lavc -lavcopts acodec=mp3 -ovc lavc -lavcopts vbitrate=1800 -tv driver=v4l2:norm=ntsc:channel=03:chanlist=us-cable:width=640:height=480 -alsa:adevice=hw.0,14:forceaudio -o test.avi tv://
 
Old 11-27-2004, 09:40 PM   #11
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
I'm having issues with alsa it seems.
I didnt have alsa-mixer installed so I got it.

When trying to run it, i get this error:

Code:
# alsamixer 

alsamixer: function snd_ctl_open failed for default: No such file or directory
I did try to restart my alsa settings.

But seeing as it was only a mixer i did use one to set line1 as a recording device.

Now after all that I try running your command and It didnt work. there is no 'alsa' option

I tried it the other way and it still didnt work..Again here is the "new" output of mplayer:
Code:
joe@scarlet:~$ mencoder -oac lavc -lavcopts acodec=mp3 -ovc lavc -lavcopts vbitrate=1800 -tv driver=v4l2:norm=ntsc:channel=03:chanlist=us-cable:alsa:adevice=hw.0,14:forceaudio:width=640:height=480 -o test.avi tv://
MEncoder 1.0pre5-3.2.2 (C) 2000-2004 MPlayer Team

CPU: Intel Pentium 4/Xeon/Celeron Foster 2394 MHz (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

Reading /home/joe/.mplayer/codecs.conf: Can't open '/home/joe/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/joe/.mplayer/mencoder: No such file or directory
Font /home/joe/.mplayer/font/font.desc loaded successfully! (206 chars)
success: format: 9  data: 0x0 - 0x0
TV detected! ;-)
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>
 comment: first try, more to come ;-)
Selected device: BT878 video (Hauppauge (bt878))
 Tuner cap:
 Tuner rxs: MONO
 Capabilites:  video capture  video overlay  VBI capture device  tuner  read/write  streaming
 supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-Nc; 4 = PAL-M; 5 = PAL-N; 6 = NTSC-JP; 7 = PAL-60;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video; 3 = Composite3;
 Current input: 0
 Current format: YUYV
v4l2: current audio mode is : MONO
Error opening audio: No such file or directory
============ Sorry, this file format is not recognized/supported =============
=== If this file is an AVI, ASF or MPEG stream, please contact the author! ===
Cannot open demuxer.
Exiting...
 
Old 11-28-2004, 09:03 PM   #12
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
Sorry Bud, you got me on "alsa".
I use "oss emulation". (/dev/dsp)
 
Old 11-30-2004, 03:58 PM   #13
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
IT VERKS

I GOT IT TO WORK

(hurray)

SO finally I got mencoder to record it.. I even got it to use xvid and mp3lame to get the size down of video..
(10 seconds of 320x240 compressed is still 860Kb)

Turns out with alsa oss emulation, /dev/dsp is the recording device.

so here is what you type in:
Code:
 mencoder  -tv driver=v4l2:norm=ntsc:channel=03:chanlist=us-cable:adevice=/dev/dsp:immediatemode=0:width=320:height=240 -ovc xvid -xvidencopts bitrate=800 -oac mp3lame -lameopts br=96:cbr -endpos 00:00:10 -o my.avi tv://
This takes about 30%cpu on an intel 2.4ghz so if u want better quality (like recording from a vcr) you can even set it higher..just make sure you have a good enough cpu

Thanks for all your help auditek747!

Last edited by inpt; 11-30-2004 at 04:08 PM.
 
Old 11-30-2004, 04:38 PM   #14
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
you might want to use the deinterlacing filter (-vf pp=lb) to get a better image, also i'd suggest trying the higher quality vhq options with lavc over xvid, but that's more personal preference. you can also squeeze a little more quality out of the audio by using abr instead of cbr (average over constant)
 
Old 11-30-2004, 06:21 PM   #15
inpt
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware
Posts: 16

Original Poster
Rep: Reputation: 0
I agree, but when I'm recording video to put online I want to have it as small as possible.

If i'm going to be recording something that quality does matter I would use better
 
  


Reply



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
TVtime dc2447 Linux - Software 0 09-11-2005 07:36 AM
TVTime fahad Linux - Software 1 06-04-2005 12:08 AM
tvtime help jag Linux - Software 0 09-24-2004 01:46 AM
TvTime don_dimo Linux - Software 7 05-15-2004 08:04 PM
TVTime Ehuwiko Linux - Software 3 10-27-2003 08:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:06 PM.

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