[MPlayer-users] mencoder tv recording

domi dombal at freemail.hu
Thu Apr 18 16:44:07 CEST 2002


Hello!

I was quite happy, when i realized, that mencoder is now
capable of recording audio as well from a v4l (tv tuner)
device.

However i'm having some difficulties: somehow audio plays
at double speed in the recordings, you know, kindof 'Alvin es a mokusok'
like sound, which is funny but not a solution in the long run :)
This happens only with mp3lame audio encoding, using -oac pcm it seems to
work fine.

I'm turning to this forum, because i'm not sure if it's my fault for using
wrong parameters or wrong mp3lame, or it's useless for me to try again and
again with different settings, because it's still not working properly with mp3lame
(?).

This is how i try (based on the FINE manual, encoding.html and co. :)

mencoder -tv on:driver=v4l:width=384:height=288:outfmt=yuy2 -ovc divx4
-vfm 1 -oac mp3lame -divx4opts br=800 -lameopts q=9 -o filename.avi

also tried cbr mp3 compression, same double speed effect with audio, video
is fine!

I attached mencoder and mplayer -v logs, maybe that explain the cause for
an expert :) Thanks for the help,

HW/SW stuff:

athlon800,gef256,sblive

debian sid
today's mplayer cvs with ffmpeg cvs compiled in
liblame-dev  3.91-0.1
liblame0     3.91-0.1
2.4.19-pre4 kernel with the supplied sblive drivers

domi
-------------- next part --------------


MPlayer CVS-020418-14:24-2.95.4 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
CPU vendor name: AuthenticAMD  max cpuid level: 1
CPU: Advanced Micro Devices Athlon K75 Pluto,Orion (Type: 6, Stepping: 1)
extended cpuid-level: 6
Compiled with RUNTIME CPU Detection - warning, it's not optimal! To get best performance, recompile mplayer from sources with --disable-runtime-cpudetection
CommandLine:Reading /home/domi/.mplayer/codecs.conf: can't open '/home/domi/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 30 audio & 80 video codecs
get_path('font/font.desc') -> '/home/domi/.mplayer/font/font.desc'
 '-v' 'menc.avi'
Linux RTC init error in ioctl (rtc_pie_on): Permission denied
Using usleep() timing
Font /home/domi/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('input.conf') -> '/home/domi/.mplayer/input.conf'
Parsing input config file /home/domi/.mplayer/input.conf
Input config file /home/domi/.mplayer/input.conf parsed : 48 binds
Playing menc.avi
Can't open IFO file: No such file or directory
File size is 3817838 bytes
Not an URL!

Cache fill:  0.00% (0 bytes)    CACHE_PRE_INIT: 0 [0] 0  pre:0  eof:0  
Detected AVI file format!
==> Found video stream: 0
list_end=0x146
======= AVI Header =======
us/frame: 40000  (fps=25.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 1252   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  384 x 288
list_end=0xD4
found 'bih', 40 bytes of 40
======= STREAM Header =======
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 250000/10000 = 25.000
Start: 0   Len: 1252
Suggested BufferSize: 36826
Quality 0
Sample size: 0
Regenerating keyframe table for DIVX 4 video
======= VIDEO Format ======
  biSize 40
  biWidth 384
  biHeight 288
  biPlanes 1
  biBitCount 24
  biCompression 2021026148='divx'
  biSizeImage 331776
===========================
==> Found audio stream: 1
list_end=0x146
found 'wf', 30 bytes of 20
======= STREAM Header =======
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 44100/1152 = 38.281
Start: 0   Len: 1916
Suggested BufferSize: 731
Quality 0
Sample size: 0
Broken chunk?  chunksize=1714  (id=JUNK)
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 1
Samplerate: 44100
avg byte/sec: 10537
Block align: 1152
bits/sample: 0
cbSize: 12
Found movie at 0x80C - 0x397B66
list_end=0x397B66
Reading INDEX block, 3168 chunks for 1252 frames
Broken chunk?  chunksize=0  (id=idx1)
Reading INDEX block, 3168 chunks for 1252 frames
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0x4D2)
Auto-selected AVI video ID = 0
Auto-selected AVI audio ID = 1
AVI: Searching for audio stream (id:1)
XXX initial  v_pts=0.000  a_pos=0 (0.000) 
AVI video length=3737830
VIDEO:  [divx]  384x288  24bpp  25.00 fps  597.1 kbps (72.9 kbyte/s)
[V] filefmt:3  fourcc:0x78766964  size:384x288  fps:25.00  ftime:=0.0400
get_path('sub/') -> '/home/domi/.mplayer/sub/'
Detected audio codec: [mp3] drv:1 (MPEG layer-2, layer-3)
Initializing audio codec...
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer
Selecting Audio Decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: srate=44100  chans=2  bps=2  sfmt=0x10  ratio: 4000->176400
CPU vendor name: AuthenticAMD  max cpuid level: 1
CPU: Advanced Micro Devices Athlon K75 Pluto,Orion (Type: 6, Stepping: 1)
extended cpuid-level: 6
mp3lib: made decode tables with MMX optimization
init layer2&3 finished, tables done
mp3lib: using 3DNow!Ex optimized decore!

MPEG 1.0, Layer III, 44100 Hz 32 kbit Single-Channel, BPF: 104
Channels: 1, copyright: No, original: Yes, CRC: No, emphasis: 0
==========================================================================
Trying to force video codec driver family 5 ...
INFO: libavcodec init OK!
Opening Video Decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec: CPU flags: mmx mmxext 3dnow
Detected video codec: [ffodivx] drv:5 prio:0 (FFmpeg MPEG-4)
==========================================================================
[PP] Sorry, postprocessing is not available
AutoQ: setting quality to 0
AO: [oss] 44100Hz Stereo Signed 16-bit (Little-Endian)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Start playing...
ao2: 44100 Hz  2 chans  Signed 16-bit (Little-Endian)
audio_setup: using '/dev/dsp' dsp device
audio_setup: sample format: Signed 16-bit (Little-Endian) (requested: Signed 16-bit (Little-Endian))
audio_setup: using 2 channels (requested: 2)
audio_setup: using 44100 Hz samplerate (requested: 44100)
audio_setup: frags:  16/16  (4096 bytes/frag)  free:  65536
VDec: vo config request - 384 x 288, Planar YV12  
[PP] Sorry, postprocessing is not available
[vo] query(Planar YV12) -> 2
vo_debug: query(Planar YV12) returned 0xC06 (i=0) 
Movie-Aspect is undefined - no prescaling applied.
video_out->init(384x288->384x288,flags=1,'MPlayer',0x32315659)
VO: [sdl] 384x288 => 384x288 Planar YV12 fs 
REQ: flags=0x406  req=0x0  
VO: Description: SDL YUV/RGB/BGR renderer (SDL v1.1.7+ only!)
VO: Author: Ryan C. Gordon <icculus at lokigames.com>, Felix Buenemann <atmosfear at users.sourceforge.net>
*** [pp] Exporting mp_image_t, 384x288x12bpp YUV planar, 165888 bytes
SDL: Using 0x32315659 (Planar YV12) image format
SDL: deactivating XScreensaver/DPMS
SDL: X11 Resolution 1024x768
Disabling DPMS
stat: 1
SDL: Using driver: x11
SDL: using hardware-surface
SDL: setting zoomed fullscreen without modeswitching
-------------- next part --------------


MEncoder CVS-020418-14:24-2.95.4 (C) 2000-2002 Arpad Gereoffy (see DOCS!)

CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
Reading /home/domi/.mplayer/codecs.conf: can't open '/home/domi/.mplayer/codecs.conf': No such file or directory
Reading /etc/mplayer/codecs.conf: 30 audio & 80 video codecs
CPU vendor name: AuthenticAMD  max cpuid level: 1
CPU: Advanced Micro Devices Athlon K75 Pluto,Orion (Type: 6, Stepping: 1)
extended cpuid-level: 6
File not found: 'frameno.avi'
Selected driver: v4l
Font /home/domi/.mplayer/font/font.desc loaded successfully! (206 chars)
Not an URL!
 name: Video 4 Linux input
 author: Alex Beregszaszi <alex at naxine.org>
 comment: under development
Video fd: 3
Selected device: BT878(Pinnacle PCTV Studio/Ra)
 Capabilites: capture tuner overlay clipping frameram scales 
 Device type: 235
 Supported sizes: 48x32 => 924x576
 Inputs: 3
  0: Television: tuner audio tv camera  (tuner:1, norm:0)
  1: Composite1: audio camera  (tuner:0, norm:0)
  2: S-Video: audio camera  (tuner:0, norm:0)
 Audio devices: 1
  0: TV: muted=no volume=65535 bass=32768 treble=32768 balance=32768 mode=mono
 channels: 1, samplerate: 44100, samplesize: 88200, format: Signed 16-bit (Little-Endian)
mbuf: size=4259840, frames=2
Requested width: 384
ioctl dsp getfmt: 0
Supported formats: 10
ioctl dsp setfmt: 0
ioctl dsp stereo: 0 (req: 0)
ioctl dsp speed: 0
ioctl dsp trigger: 0
trigger: 1
ioctl dsp trigger: 0
ioctl dsp getblocksize: 0
blocksize: 16384
Requested height: 288
Using input 'Television'
Tuner (Television) range: 0 -> 4294967295
Selected norm: pal
Tuner isn't capable to set norm!
Selected channel list: europe-east (including 133 channels)
stream_seek: WARNING! Can't seek to 0x0 !
success: format: 0  data: 0x0 - 0x0
Detected TV! ;-)
==> Found video stream: 0
Output format: Packed YUY2
Output size: 384x288
fps: 25.000000, frametime: 0.040000
==> Found audio stream: 0
  TV audio: 1 channels, 50240 bits, 44100 Hz
Picture values:
palette: 8, depth: 16, bytesperline: 768
 Depth: 16, Palette: 8 (Format: Packed YUY2)
 Brightness: 32768, Hue: 32768, Colour: 32506, Contrast: 27624
[V] filefmt:9  fourcc:0x32595559  size:384x288  fps:25.00  ftime:=0.0400
Detected audio codec: [pcm] drv:2 (Uncompressed PCM)
Initializing audio codec...
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer
Selecting Audio Decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: srate=44100  chans=1  bps=6280  sfmt=0x8  ratio: -405347296->276948000
==========================================================================
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Trying to force video codec driver family 5 ...
VDec: vo config request - 384 x 288, Packed YUY2  
Opening Video Decoder: [raw] RAW Uncompressed Video
[PP] Sorry, postprocessing is not available
vo_debug: query(Packed YUY2) returned 0x401 (i=0) 
Movie-Aspect is undefined - no prescaling applied.
video_out->init(384x288->384x288,flags=0,'MPlayer',0x32595559)
Detected video codec: [rawyuy2] drv:8 prio:0 (RAW YUY2)
REQ: flags=0x1  req=0x0  
==========================================================================
LAME version 3.91  (http://www.mp3dev.org/)
Using polyphase lowpass  filter, transition band: 15826 Hz - 16360 Hz

misc:

	scaling: 0.000000
	ch0 (left) scaling: 0.000000
	ch1 (right) scaling: 0.000000
	filter type: 0
	quantization: xr^3/4
	huffman search: best (outside loop)
	experimental X=0 Y=0 Z=0
	...

stream format:

	MPEG-1 Layer 3
	1 channel - mono
	padding: auto
	variable bitrate - VBR rh (default)
	...

psychoacoustic:

	tonality estimation limit: 8871.700195 Hz
	using short blocks: allowed
	adjust masking: 0.000000 dB
	psymodel: 1
	noise shaping: 1
	 ^ amplification: 1
	 ^ stopping: 1
	ATH: using
	 ^ type: 4
	 ^ adjust type: 3
	 ^ adapt threshold type: 2
	using temporal masking effect: yes
	...

Forcing audio preload to 0, max pts correction to 0
*** [expand] Exporting mp_image_t, 384x288x16bpp YUV packed, 221184 bytes
MP3 audio selected
Writing AVI header...
*** [divx4] Allocating mp_image_t, 384x288x16bpp YUV packed, 221184 bytes
Writing AVI index...
Fixup AVI header...

Video stream:  512.829 kbit/s  (64103 bps)  size: 3210307 bytes  50.080 secs  1252 frames

Audio stream:   84.294 kbit/s  (10536 bps)  size: 527371 bytes  50.051 secs

*** free_stream() called ***


More information about the MPlayer-users mailing list