Opened 19 years ago

Last modified 13 years ago

#158 new defect

Mencoder records two-channel audio from mono TV tuner

Reported by: sakari.ailus@… Owned by: reynaldo@…
Priority: normal Component: af
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Setting amode on tv or mode on lameopts doesn't help.

---
11:43:29 masiina sakke tmpmain/mencoder tv:// -srate 44100 -lameopts
vbr=0:br=48:aq=9:mode=3 -ovc lavc -oac mp3lame -o baz.avi -lavcopts
vqscale=10:vcodec=mpeg4 -tv
amode=0:width=768:adevice=/dev/dsp2:device=/dev/video0:height=576:driver=v4l2
-passlogfile /tmp/mrec-tmp-24136
MEncoder dev-CVS-041206-11:30-3.3.4 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
This codecs.conf is too old and incompatible with this MPlayer release! at line 6
File not found: 'frameno.avi'
Failed to open frameno.avi

success: format: 9 data: 0x0 - 0x0
TV detected! ;-)
Selected driver: v4l2

name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@…>
comment: first try, more to come ;-)

Selected device: BT878 video (Pinnacle PCTV Stud

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;
Current input: 0
Current format: YUV420

v4l2: current audio mode is : MONO
audio block size too low, setting to 8192!
[V] filefmt:9 fourcc:0x32315659 size:768x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44101 Hz, 1 ch, 16 bit (0x10), ratio: 88202->88202 (705.6 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 768 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (768x576 fourcc=58564944 [DIVX])
Using constant qscale = 10.000000 (VBR)
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
MP3 audio selected
Building audio filter chain for 44101Hz/1ch/16bit -> 44100Hz/1ch/16bit...
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.
Forcing audio preload to 0, max pts correction to 0
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.
v4l2: select failed: Interrupted system calln 0mb A-V:0.000 [675:47]

not enough audio samples!
Pos: 3.2s 78f ( 0%) 22fps Trem: 0min 0mb A-V:0.000 [673:47]
Flushing video frames

CBR audio: 6000 bytes/sec, 157 bytes/block

Writing AVI index...
Fixing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.

Video stream: 673.560 kbit/s (84194 bps) size: 266056 bytes 3.160 secs 78
frames

Audio stream: 48.000 kbit/s (5999 bps) size: 18808 bytes 3.135 secs
v4l2: 86 frames successfully processed, 0 frames dropped.
11:44:34 masiina sakke tmpmain/mplayer -identify -frames 0 baz.avi
MPlayer dev-CVS-041206-11:30-3.3.4 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.

This codecs.conf is too old and incompatible with this MPlayer release! at line 6
Playing baz.avi.
Cache fill: 0.00% (0 bytes) AVI file format detected.
ID_VIDEO_ID=0
ID_AUDIO_ID=1
VIDEO: [DIVX] 768x576 24bpp 25.000 fps 673.6 kbps (82.2 kbyte/s)
Clip info:

Software: MEncoder dev-CVS-041206-11:30-3.3.4

==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 6000->176400 (48.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
ID_FILENAME=baz.avi
ID_VIDEO_FORMAT=DIVX
ID_VIDEO_BITRATE=673552
ID_VIDEO_WIDTH=768
ID_VIDEO_HEIGHT=576
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_CODEC=mp3
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=48000
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=3
vo: X11 running at 1440x1080 with depth 16 and 16 bpp (":0.0" => local display)
Opening video filter: [pp=de/tn:1:2:3/vb/dr/al/lb/hb]
==========================================================================
Trying to force video codec driver family ffmpeg...
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
[PP] Using external postprocessing filter, max q = 6.
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
[pl_volume] Software volume control in use.
AO: [plugin] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Starting playback...

Exiting... (End of file)
---

Change History (8)

comment:1 by reimar, 19 years ago

I guess you have to add -channels 1 to the mencoder commandline...

comment:2 by sakari.ailus@…, 19 years ago

That's the number of playback channels. The issue is that one input channel is
encoded as two channels.

comment:3 by reimar, 19 years ago

(In reply to comment #2)

That's the number of playback channels. The issue is that one input channel is
encoded as two channels.

Did you try it? Did you see that I told you to add it to the _mencoder_ command
line?

comment:4 by reimar, 19 years ago

I can't test it myself, so please tell me if -channels 1 on the mencoder
commandline fixes it. If not, please post a new log with -channels -1.

comment:5 by sakari.ailus@…, 19 years ago

Sorry, I've been a bit busy lately. :)

I tested it with 1.0pre5 and latest CVS version. "-channels 1" doesn't seem to
help, ID_AUDIO_NCH is still 2.

---
12:41:44 masiina sakke home/guru/temp/mplayer-cvsmain/mencoder tv:// -srate
44100 -lameopts vbr=0:br=48:aq=9:mode=3 -ovc lavc -oac mp3lame -o /tmp/baz.avi
-lavcopts vqscale=10:vcodec=mpeg4 -tv
amode=0:width=768:adevice=/dev/dsp2:device=/dev/video0:height=576:driver=v4l2
-channels 1 -passlogfile /tmp/mrec-tmp-24136
MEncoder dev-CVS-041212-12:34-3.4.2 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
This codecs.conf is too old and incompatible with this MPlayer release! at line 6
File not found: 'frameno.avi'
Failed to open frameno.avi

success: format: 9 data: 0x0 - 0x0
TV detected! ;-)
Selected driver: v4l2

name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@…>
comment: first try, more to come ;-)

Selected device: BT878 video (Pinnacle PCTV Stud

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;
Current input: 0
Current format: YUV420

v4l2: current audio mode is : MONO
audio block size too low, setting to 8192!
[V] filefmt:9 fourcc:0x32315659 size:768x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44101 Hz, 1 ch, 16 bit (0x10), ratio: 88202->88202 (705.6 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 768 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (768x576 fourcc=58564944 [DIVX])
Using constant qscale = 10.000000 (VBR)
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
MP3 audio selected
Building audio filter chain for 44101Hz/1ch/16bit -> 44100Hz/1ch/16bit...
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.
Forcing audio preload to 0, max pts correction to 0
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.
Pos: 4.0s 98f ( 0%) 23fps Trem: 0min 0mb A-V:0.000 [488:48]
not enough audio samples!
v4l2: select failed: Interrupted system call
Pos: 4.0s 99f ( 0%) 23fps Trem: 0min 0mb A-V:0.000 [485:47]
Flushing video frames

CBR audio: 6000 bytes/sec, 157 bytes/block

Writing AVI index...
Fixing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.

Video stream: 485.160 kbit/s (60645 bps) size: 242580 bytes 4.000 secs 99
frames

Audio stream: 47.999 kbit/s (5999 bps) size: 23823 bytes 3.971 secs
v4l2: 107 frames successfully processed, 0 frames dropped.
12:42:10 masiina sakke home/guru/temp/mplayer-cvsmplayer -identify -frames 0
/tmp/baz.avi
MPlayer 1.0pre5-3.4.2 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred 2012 MHz (Family: 6,
Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
Reading config file /etc/mplayer/mplayer.conf
Reading config file /home/sakke/.mplayer/config
Reading /home/sakke/.mplayer/codecs.conf: This codecs.conf is too old and
incompatible with this MPlayer release! at line 6
Reading /etc/mplayer/codecs.conf: Can't open '/etc/mplayer/codecs.conf': No such
file or directory
Using built-in default codecs.conf.
Font /home/sakke/.mplayer/font/font.desc loaded successfully! (206 chars)
Using Linux hardware RTC timing (1024Hz).
Input config file /home/sakke/.mplayer/input.conf parsed: 50 binds

Playing /tmp/baz.avi.
Cache fill: 0.00% (0 bytes) AVI file format detected.
VIDEO: [DIVX] 768x576 24bpp 25.000 fps 485.2 kbps (59.2 kbyte/s)
Clip info:

Software: MEncoder dev-CVS-041212-12:34-3.4.2

==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
MP3lib: init layer2&3 finished, tables done
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 6000->176400 (48.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
ID_FILENAME=/tmp/baz.avi
ID_VIDEO_FORMAT=DIVX
ID_VIDEO_BITRATE=485160
ID_VIDEO_WIDTH=768
ID_VIDEO_HEIGHT=576
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_CODEC=mp3
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=48000
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=4
vo: X11 running at 1440x1080 with depth 16 and 16 bpp (":0.0" => local display)
Disabling DPMS
Opening video filter: [pp=de/tn:1:2:3/vb/dr/al/lb/hb]
==========================================================================
Trying to force video codec driver family ffmpeg...
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
[PP] Using external postprocessing filter, max q = 6.
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
[pl_volume] Software volume control in use.
AO: [plugin] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Starting playback...

Exiting... (End of file)
---

comment:6 by reimar, 19 years ago

Just saw something else: try adding forcechan=1 to the -tv option, maybe your tv
card claims that it outputs 2 channels.

comment:7 by sakari.ailus@…, 19 years ago

It doesn't (at least mencoder doesn't think so), nor forcechan=1 helps.

---
18:27:54 masiina sakke tmpmencoder tv:// -srate 44100 -lameopts
vbr=0:br=48:aq=9:mode=3 -ovc lavc -oac mp3lame -o /tmp/baz.avi -lavcopts
vqscale=10:vcodec=mpeg4 -tv
forcechan=1:amode=0:width=768:adevice=/dev/dsp2:device=/dev/video0:height=576:driver=v4l2
MEncoder 1.0pre6-3.4.2 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
File not found: 'frameno.avi'
Failed to open frameno.avi

success: format: 9 data: 0x0 - 0x0
TV detected! ;-)
Selected driver: v4l2

name: Video 4 Linux 2 input
author: Martin Olschewski <olschewski@…>
comment: first try, more to come ;-)

Selected device: BT878 video (Pinnacle PCTV Stud

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;
Current input: 0
Current format: RGB565

v4l2: current audio mode is : MONO
audio block size too low, setting to 8192!
[V] filefmt:9 fourcc:0x32315659 size:768x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 1 ch, 16 bit (0x10), ratio: 88200->88200 (705.6 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1 (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 768 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (768x576 fourcc=58564944 [DIVX])
Using constant qscale = 10.000000 (VBR)
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
MP3 audio selected
Building audio filter chain for 44100Hz/1ch/16bit -> 44100Hz/1ch/16bit...
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.
Forcing audio preload to 0, max pts correction to 0
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.
v4l2: select failed: Interrupted system calln 0mb A-V:0.000 [618:47]

not enough audio samples!
Pos: 3.0s 74f ( 0%) 23fps Trem: 0min 0mb A-V:0.000 [614:48]
Flushing video frames

CBR audio: 6000 bytes/sec, 157 bytes/block

Writing AVI index...
Fixing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp
header.

Video stream: 614.536 kbit/s (76817 bps) size: 230451 bytes 3.000 secs 74
frames

Audio stream: 48.001 kbit/s (6000 bps) size: 17868 bytes 2.978 secs
v4l2: 82 frames successfully processed, 0 frames dropped.
18:28:32 masiina sakke tmpmplayer -identify -frames 0 baz.avi
MPlayer 1.0pre6-3.4.2 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.

Playing baz.avi.
Cache fill: 0.00% (0 bytes) AVI file format detected.
ID_VIDEO_ID=0
ID_AUDIO_ID=1
VIDEO: [DIVX] 768x576 24bpp 25.000 fps 614.5 kbps (75.0 kbyte/s)
Clip info:

Software: MEncoder 1.0pre6-3.4.2

==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 6000->176400 (48.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
ID_FILENAME=baz.avi
ID_VIDEO_FORMAT=DIVX
ID_VIDEO_BITRATE=614536
ID_VIDEO_WIDTH=768
ID_VIDEO_HEIGHT=576
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_CODEC=mp3
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=48000
ID_AUDIO_RATE=44100
ID_AUDIO_NCH=2
ID_LENGTH=3
vo: X11 running at 1440x1080 with depth 16 and 16 bpp (":0.0" => local display)
Opening video filter: [pp=de/tn:1:2:3/vb/dr/al/lb/hb]
==========================================================================
Trying to force video codec driver family ffmpeg...
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
[PP] Using external postprocessing filter, max q = 6.
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
[pl_volume] Software volume control in use.
AO: [plugin] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Starting playback...

Exiting... (End of file)
---

comment:8 by compn, 13 years ago

Owner: changed from alex@… to reynaldo@…
Note: See TracTickets for help on using tickets.