Fedora Linux Support Community & Resources Center
  #1  
Old 20th April 2009, 10:14 AM
kamber.nebojsa Offline
Registered User
 
Join Date: Mar 2009
Posts: 3
MEncoder not recording TV audio

After 6days of Googling, I'm left more confused than I ever was..
I just started using Fedora as my first Linux, and till now I've managed to cope with all the 'bumps in the newbie road', but this one I just can't figure out..
All the explanations I've found keep using terms I'm not familiar with (PCM, /dev/dsp, ALSA, OSS, PulseAudio etc..)
I'd be happy to provide any info needed, and I'm not slacking off, I'm just at the end of my road

OK, this is my case:
  • I have a Leadtek Winfast TV2000 XP RM TV-card
  • I have onboard audio
  • My TV-card is hooked via cable to my mainboard to 'CD IN'
  • I can't capture audio using mencoder (it records silence, all audio frames dropped)

and this is the info I've gathered so far:
lspci -v:
Code:
01:08.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
	Subsystem: LeadTek Research Inc. Device 6609
	Flags: bus master, medium devsel, latency 16, IRQ 16
	Memory at fdaff000 (32-bit, prefetchable) [size=4K]
	Capabilities: [44] Vital Product Data <?>
	Capabilities: [4c] Power Management version 2
	Kernel driver in use: bttv
	Kernel modules: bttv

01:08.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
	Subsystem: LeadTek Research Inc. Device 6609
	Flags: bus master, medium devsel, latency 64, IRQ 16
	Memory at fdafe000 (32-bit, prefetchable) [size=4K]
	Capabilities: [44] Vital Product Data <?>
	Capabilities: [4c] Power Management version 2
	Kernel driver in use: Bt87x
lsmod:
Code:
fuse                   49436  4 
snd_bt87x              15880  1 
sco                    12932  2 
bridge                 43796  0 
stp                     6148  1 bridge
bnep                   14848  2 
l2cap                  21504  3 bnep
bluetooth              48608  5 sco,bnep,l2cap
sunrpc                156052  3 
ip6t_REJECT             7296  2 
nf_conntrack_ipv6      15864  2 
ip6table_filter         6400  1 
ip6_tables             14736  1 ip6table_filter
ipv6                  230516  22 ip6t_REJECT,nf_conntrack_ipv6
dm_multipath           17164  0 
uinput                 10624  0 
ppdev                  10500  0 
snd_hda_intel         354068  3 
snd_seq_dummy           6660  0 
snd_seq_oss            30364  0 
snd_seq_midi_event      9600  1 snd_seq_oss
tuner_simple           15120  1 
snd_seq                48576  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device         10124  3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            42496  0 
snd_mixer_oss          16896  2 snd_pcm_oss
snd_pcm                65924  3 snd_bt87x,snd_hda_intel,snd_pcm_oss
tuner_types            17408  1 tuner_simple
tuner                  24776  0 
snd_timer              22024  2 snd_seq,snd_pcm
nvidia               7219344  36 
snd_page_alloc         11016  3 snd_bt87x,snd_hda_intel,snd_pcm
bttv                  150868  0 
videodev               32000  2 tuner,bttv
snd_hwdep              10500  1 snd_hda_intel
snd                    50616  17 snd_bt87x,snd_hda_intel,snd_seq_dummy,snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_hwdep
floppy                 51988  0 
v4l1_compat            15876  1 videodev
ir_common              38532  1 bttv
pcspkr                  6272  0 
k8temp                  7936  0 
hwmon                   6300  1 k8temp
compat_ioctl32          5120  1 bttv
i2c_algo_bit            8836  1 bttv
soundcore               9416  2 snd
v4l2_common            12800  2 tuner,bttv
videobuf_dma_sg        13828  1 bttv
pata_amd               13316  0 
forcedeth              51728  0 
videobuf_core          18052  2 bttv,videobuf_dma_sg
btcx_risc               7560  1 bttv
martian_dev            25108  0 
tveeprom               14596  1 bttv
parport_pc             25620  0 
parport                31956  2 ppdev,parport_pc
i2c_nforce2            10372  0 
i2c_core               21396  8 tuner_simple,tuner,nvidia,bttv,i2c_algo_bit,v4l2_common,tveeprom,i2c_nforce2
ata_generic             8452  0 
pata_acpi               7680  0 
sata_nv                23944  3
A couple of commands I can't remember exactly (I've been Googling for days now and it's all mixed up):
something like /proc/sound/cards:
= recognises Brooktree sound device at position [1]
something like /proc/sound/devices:
= recognises Brooktree capture at position [1-0] and [1-1] (one is digital and one is analog)

The thing that confuses me most is that while PLAYING tv (eg in TVTim, KDETV, MPlayer etc) I do get sound, even though I cant cotrol volume via those applications (only via volume control->CD or via aumix->CD)
and while recording, i do HEAR sound, but it doesnt get recorded..

PS things I've tried and failed:
  • setting up MythTV
  • setting up XawTv
  • setting up XdTv
  • setting up GV4L
Reply With Quote
  #2  
Old 20th April 2009, 11:09 AM
weitjong Online
Registered User
 
Join Date: Oct 2006
Location: Singapore, 新加坡
Posts: 943
When recording you are NOT supposed to hear the sound. Did you accidentally override the default value of the immediatemode to 1 in the command line when you invoke mencoder? For recording, the value should be 0 which is the default for mencoder.

You did not post the actual command you use. So, this is really a long shot.
__________________
YaoWT - Leave no window unbroken ♪ (^。^) 
Reply With Quote
  #3  
Old 20th April 2009, 01:00 PM
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
Have a look at Shadow7's posts here
http://www.linuxquestions.org/questi...-audio-685591/

He gets it mostly working in the end with some audio sync issues
Reply With Quote
  #4  
Old 21st April 2009, 10:03 AM
kamber.nebojsa Offline
Registered User
 
Join Date: Mar 2009
Posts: 3
Quote:
Originally Posted by sideways View Post
Have a look at Shadow7's posts here
http://www.linuxquestions.org/questi...-audio-685591/
I've tried a couple of instructions from that post (sox, arecord, ffmpeg..), but none of them successfully (I don't know if I messed up somewhere, but I ended up recording ten tracks of silence)..

This is the command line taken from the shell script I use to record:
Code:
sudo nice -n -20 /usr/bin/mencoder tv:// -tv driver=v4l2:device=/dev/video:input=0:freq=$FREQ:width=768:height=576:fps=25:norm=0 -vf crop=744:552,pp=lb,scale=496:368 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$VBRATE:mbd=1 -oac mp3lame -lameopts cbr:mode=3:br=$ABRATE:aq=2 -ffourcc DIVX -o "${OUTDIR}/${TITLE}.avi"
I suppose I need to set the parameter "adevice" (Ive read that somewhere) so that it captures from my motherboard CDIN, but I don't know how to do that.. Any ideas?

And this is the exact output of the commands I mentioned:
cat /proc/asound/cards:
Code:
0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfe028000 irq 22
1 [Bt878          ]: Bt87x - Brooktree Bt878
                      Brooktree Bt878 at 0xfd9fe000, irq 16
cat /proc/asound/devices:
Code:
 2:        : timer
  3:        : sequencer
  4: [ 0- 1]: digital audio playback
  5: [ 0- 0]: digital audio playback
  6: [ 0- 0]: digital audio capture
  7: [ 0- 0]: hardware dependent
  8: [ 0]   : control
  9: [ 1- 1]: digital audio capture
 10: [ 1- 0]: digital audio capture
 11: [ 1]   : control
Hope it gives you a clue, somehow..
Reply With Quote
  #5  
Old 21st April 2009, 01:45 PM
sej7278 Offline
Registered User
 
Join Date: Sep 2004
Posts: 2,008
i've got the exact same card and exact same problem - i hear sound when i'm trying to record and the sound doesn't get recorded (using transcode/mencoder/ffmpeg).

i was starting to think it was some weird bug with my motherboard's audio connectors!

Last edited by sej7278; 21st April 2009 at 02:08 PM.
Reply With Quote
  #6  
Old 21st April 2009, 09:43 PM
pwalden Offline
Registered User
 
Join Date: Aug 2005
Location: Washington (the state), USA
Posts: 327
Could it be that the audio is coming in through a separate channel? You need something that re-integrates the video and audio channels into a movie stream. I do not think mencoder can do that.
Reply With Quote
  #7  
Old 21st April 2009, 10:46 PM
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 5,630
Have you set the CD device to record in your sound mixer? I had to do that, since like you I have the TV tuner hooked up to the CD in jack. The default record device was Line In, so changing that fixed it for me. I use this command to capture TV+audio:
Code:
mencoder -tv driver=v4l2:alsa:amode=1:adevice=hw.0,0:normid=1:input=0 tv:// -ovc lavc -oac pcm -o tv.avi
Reply With Quote
  #8  
Old 22nd April 2009, 02:17 PM
kamber.nebojsa Offline
Registered User
 
Join Date: Mar 2009
Posts: 3
Thank you, RupertPupkin! Your advice worked!
I can finnaly capture audio without booting WinXP !!!
Reply With Quote
  #9  
Old 22nd April 2009, 03:17 PM
sideways Offline
Retired User
 
Join Date: Oct 2004
Location: London, UK
Posts: 4,999
nice one, I've recompiled mencoder with mp3lame support so that command (without the video) will enable me to record some old cassettes to mp3 from a walkman via line in

(I wonder if Dolby 'B' makes it worth using a bit rate higher than 128kbs )
Reply With Quote
  #10  
Old 22nd April 2009, 04:09 PM
sej7278 Offline
Registered User
 
Join Date: Sep 2004
Posts: 2,008
i seem to have fixed the problem by going to volume control and enabling the "input source" option.

in the options tab which now appears set input source to line;

in the recording tab set the recording device to capture;

in the playback tab mute line-in (otherwise i hear what i'm recording)

strange that mencoder hasn't been compiled with mp3lame support, it used to have it.....

i now use this to capture 4:3 pal tv:

Code:
 mencoder tv:// -tv driver=v4l2:input=1:width=720:height=576:fps=25:buffersize=128 -oac pcm -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=2200:vratetol=32000:mbd=2:psnr:aspect=4/3 -vf pp=lb -sws 6 -o mencoder43.avi
EDIT: just rebuilt the rpmfusion mplayer srpm and mencoder has mp3lame support, so don't know why the one fetched through yum doesn't......

Last edited by sej7278; 22nd April 2009 at 05:00 PM.
Reply With Quote
Reply

Tags
audio, mencoder, recording

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mencoder, audio/video out of sync c0ldshadow Using Fedora 1 31st January 2009 11:05 PM
Mencoder unsyncs audio daviddoria Using Fedora 0 10th January 2009 03:13 PM
mencoder not encoding audio from Video Camera DVD techmum Using Fedora 0 10th May 2007 03:00 AM
Mencoder: Noisy Audio Output rcmpcbf Using Fedora 2 29th December 2006 12:59 PM
convert real audio files (.rm) in mp3 with mencoder tintamar Using Fedora 0 24th July 2006 02:18 PM


Current GMT-time: 08:17 (Sunday, 31-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat