LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 04-16-2006, 05:12 PM   #1
mashed
LQ Newbie
 
Registered: Mar 2006
Location: Finland
Distribution: Fedora Core 5
Posts: 28

Rep: Reputation: 15
Can't capture sound with Mencoder


I can't capture sound from tv card with mencoder. Picture comes in fine, and I can hear the sound during capture. Sound is in line-in.

I have used this command:

mencoder -tv driver=v4l2:width=720:height=576 -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=3000 -oac mp3lame -lameopts cbr:br=224 -vf scale=640:480 -o output.avi tv://

_____________________________________________________________________
This is the console output:

MEncoder dev-Fedora-GS-CVS-060406-15:20-4.1.0 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Duron Morgan,Camaro (Family: 6, Stepping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 9 data: 0x0 - 0x0
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: LifeView FlyVIDEO3000
Tuner cap: STEREO LANG1 LANG2
Tuner rxs: MONO STEREO LANG1 LANG2
Capabilites: video capture video overlay VBI capture device tuner read/write streaming
supported norms: 0 = PAL; 1 = PAL-BG; 2 = PAL-I; 3 = PAL-DK; 4 = NTSC; 5 = SECAM; 6 = PAL-M; 7 = PAL-Nc; 8 = PAL-60;
inputs: 0 = Television; 1 = TV (mono only); 2 = Composite1; 3 = Composite2; 4 = S-Video;
Current input: 0
Current format: BGR24
v4l2: current audio mode is : STEREO
Audio block size too low, setting to 16384!
[V] filefmt:9 fourcc:0x32315659 size:720x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=640 h=480]
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
videocodec: libavcodec (640x480 fourcc=3267706d [mpg2])
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
==========================================================================
MP3 audio selected
Forcing audio preload to 0, max pts correction to 0
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Writing header...1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

1 duplicate frame(s)!
Pos: 9.6s 238f ( 0%) 9.69fps Trem: 0min 0mb A-V:0.000 [3079:223]
Flushing video frames


CBR audio: 28000 bytes/sec, 731 bytes/block
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 3079.444 kbit/s (384930 B/s) size: 3679935 bytes 9.560 secs 238 frames

Audio stream: 224.000 kbit/s (27999 B/s) size: 266971 bytes 9.535 secs
v4l2: 591 frames successfully processed, 23 frames dropped.
[niemi@localhost ~]$ mencoder -tv driver=v4l2:width=720:height=576 -ovc lavc -lavcopts vcodec=mpeg2video:vbitrate=3000 -oac mp3lame -lameopts cbr:br=224 -vf scale=640:480 -o output.avi tv://
MEncoder dev-Fedora-GS-CVS-060406-15:20-4.1.0 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Duron Morgan,Camaro (Family: 6, Stepping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 9 data: 0x0 - 0x0
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: LifeView FlyVIDEO3000
Tuner cap: STEREO LANG1 LANG2
Tuner rxs: MONO STEREO LANG1 LANG2
Capabilites: video capture video overlay VBI capture device tuner read/write streaming
supported norms: 0 = PAL; 1 = PAL-BG; 2 = PAL-I; 3 = PAL-DK; 4 = NTSC; 5 = SECAM; 6 = PAL-M; 7 = PAL-Nc; 8 = PAL-60;
inputs: 0 = Television; 1 = TV (mono only); 2 = Composite1; 3 = Composite2; 4 = S-Video;
Current input: 0
Current format: BGR24
v4l2: current audio mode is : STEREO
Audio block size too low, setting to 16384!
[V] filefmt:9 fourcc:0x32315659 size:720x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, s16le, 1411.2 kbit/100.00% (ratio: 176400->176400)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [scale w=640 h=480]
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.

SwScaler: BICUBIC scaler, from Planar YV12 to Planar YV12 using MMX2
videocodec: libavcodec (640x480 fourcc=3267706d [mpg2])
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
==========================================================================
MP3 audio selected
Forcing audio preload to 0, max pts correction to 0
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Writing header...1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

1 duplicate frame(s)!
Pos: 0.2s 3f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos: 24.8s 619f ( 0%) 24.46fps Trem: 0min 0mb A-V:0.000 [3018:223]
Flushing video frames


CBR audio: 28000 bytes/sec, 731 bytes/block
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 3018.064 kbit/s (377258 B/s) size: 9371090 bytes 24.840 secs 619 frames

Audio stream: 224.000 kbit/s (27999 B/s) size: 694857 bytes 24.816 secs
v4l2: 632 frames successfully processed, 0 frames dropped.
 
Old 04-16-2006, 06:33 PM   #2
Tormented
Member
 
Registered: Feb 2003
Location: ???
Distribution: Mandriva 2006
Posts: 92

Rep: Reputation: 15
You didn't supply the necessary -tv options to tell mencoder where to get the sound from.

These are the options I use with mencoder to record 48000hz stereo audio from the first soundcard using alsa:

Code:
-tv driver=v4l2:norm=ntsc:device=/dev/video0:input=0:width=720:height=480:audiorate=48000:alsa:adevice=hw.0:amode=1:chanlist=us-cable
 
Old 04-17-2006, 12:49 PM   #3
mashed
LQ Newbie
 
Registered: Mar 2006
Location: Finland
Distribution: Fedora Core 5
Posts: 28

Original Poster
Rep: Reputation: 15
I still won't have sound

Now I use command

mencoder -tv driver=v4l2:norm=pal:device=/dev/video0:input=0:width=720:height=576:audiorate=48000:alsa:adevice=hw.0:amode=1 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 -oac lavc -lavcopts acodec=mp2:abitrate=224 -vf scale=640:480 -o output.avi tv://

I have alsa mixer witch uses ensonic PCI soundcard.

How is it possible, that mencoder can't capture sound even though I hear it, I have set the recording device to be the same as the playback device.
 
Old 04-17-2006, 06:43 PM   #4
Tormented
Member
 
Registered: Feb 2003
Location: ???
Distribution: Mandriva 2006
Posts: 92

Rep: Reputation: 15
You might not have capture enabled for the line-in input in the mixer. Start alsamixer, then press f4 to show all the recordable inputs. There should be a red word "CAPTUR" under line-in if it's enabled for recording. If you don't see it there, select the line-in and press spacebar to enable it.
 
Old 04-18-2006, 05:24 AM   #5
mashed
LQ Newbie
 
Registered: Mar 2006
Location: Finland
Distribution: Fedora Core 5
Posts: 28

Original Poster
Rep: Reputation: 15
Under line is red word capture, how ever, line volume controls work only on "playback" and "all" mode (on "record" mode I can set up only the "capture" volume).

Still now sound when recording video.

The strange thing is, that I do get sound from microphone when I am using skype (when capture is set on microphone). But I can't capture sound when recording video (I have also tried ffmpeg and mp1e, both can capture video, but neither can capture the sound.)
 
  


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
Fine tunning mencoder video capture bruno buys Linux - Software 7 08-05-2005 08:13 AM
TV Capture GUI program or mencoder/transcode scripts? furfurdemon666 Linux - General 3 05-08-2005 09:50 PM
mencoder: dvd rip to avi, no sound J_Szucs Linux - Software 0 04-08-2004 08:21 AM
mencoder wont encode the sound bignester Linux - Software 4 01-15-2004 09:22 PM
TV-Capture mencoder SchwipSchwap Linux - Newbie 0 04-16-2003 03:57 PM

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

All times are GMT -5. The time now is 09:02 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