[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mencoder and TV



On 02 Aug 2003  jsbien@mimuw.edu.pl (Janusz S. Bień) wrote:

> On Sat, 02 Aug 2003  Christian Marillat <marillat.christian@wanadoo.fr> wrote:
> 
> > jsbien@mimuw.edu.pl (Janusz S. Bień) writes:
> 
> [...]
> 
> > >How should I set up my
> > > system for recording?
> > 
> > Install mencoder, more better than zapping+rte
> 
> Thanks for advice. I added 
> 
>         deb http://marillat.free.fr/ unstable main
> 
> to my sources.list, installed mencoder and will start experimenting.

>From the mplayer documentation:

----------------------------------------------------------------------
# There are several ways of capturing audio. You can grab the sound
  either using your soundcard via an external cable connection between
  video card and line-in, or using the built-in ADC in the bt878
  chip. In the latter case, you have to load the btaudio driver. Read
  the linux/Documentation/sound/btaudio file (in the kernel tree, not
  MPlayer's) for some instructions on using this driver.

[...]

A: TV audio encoding for Linux is currently unimplemented, we're
working on it. At the moment it works only on BSD.
---------------------------------------------------------------------

Do I understand correctly that only the first method is possible on
Debian unstable? Hence in the "-tv" parameter I have to set
"adevice". What value should I specify?

Here is the result of a semi-random adaptation of an
example from the documentation:

---------------------------------------------------------
knoppix@box:~$  mencoder -tv on:driver=v4l:width=768:height=576:adevice=/dev/dsp  -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900  -oac mp3lame -lameopts cbr:br=64   -vop pp=lb,crop=720:544:24:16 -o output.avi
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/share/locale


MEncoder 0.90rc5-3.2.3 (C) 2000-2003 Arpad Gereoffy (see DOCS)

CPU: Advanced Micro Devices Athlon TB Thunderbird (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
MMX2 supported but disabled
3DNow supported but disabled
3DNowExt supported but disabled
CPUflags: Type: 6 MMX: 1 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Reading /home/knoppix/.mplayer/mencoder_codecs.conf: can't open '/home/knoppix/.mplayer/mencoder_codecs.conf': No such file or directory
Reading /etc/mplayer/mencoder_codecs.conf: 50 audio & 136 video codecs
File not found: 'frameno.avi'
Reading config file /home/knoppix/.mplayer/mencoder: No such file or directory
success: format: 0  data: 0x0 - 0x0
TV detected! ;-)
Selected driver: v4l
 name: Video 4 Linux input
 author: Alex Beregszaszi <alex@naxine.org>
 comment: under development
Selected device: BT878(AVerMedia TVPhone 98)
 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:pal)
  1: Composite1: audio camera  (tuner:0, norm:pal)
  2: S-Video: audio camera  (tuner:0, norm:pal)
Card reports an unknown audio mode !
Trying two channel audio. Use forcechan to override.
Card reports an unknown audio mode !
Trying two channel audio. Use forcechan to override.
Card reports an unknown audio mode !
Trying two channel audio. Use forcechan to override.
Card reports an unknown audio mode !
Trying two channel audio. Use forcechan to override.
Using input 'Television'
[V] filefmt:9  fourcc:0x32315659  size:768x576  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 176400->176400 (1411.2 kbit)
Selected audio codec: [pcm] afm:pcm (Uncompressed PCM)
==========================================================================
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [pp=lb]
Opening video filter: [crop=720:544:24:16]
Crop: 720 x 544, 24 ; 16
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 768 x 576 (preferred csp: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (720x544 fourcc=58564944 [DIVX])
Selected video codec: [rawyv12] vfm:raw (RAW YV12)
==========================================================================
MP3 audio selected
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Writing AVI header...
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.
Pos:   2.8s     46f ( 0%)  16fps Trem:   0min   0mb  A-V:0.000 [1347:63]

CBR audio: 8000 bytes/sec, 209 bytes/block

Writing AVI index...
Fixing AVI header...

Video stream: 1347.332 kbit/s  (168416 bps)  size: 478303 bytes  2.840 secs  46 frames

Audio stream:   63.998 kbit/s  (7999 bps)  size: 22151 bytes  2.769 secs

---------------------------------------------------------

I was able to play back the video but with no sound. Due to some
problems with mplayer I used aviplay. Perhaps its messages contain
some useful information:

-----------------------------------------------------------------
knoppix@box:~$ aviplay output.avi 
<init> : Avifile CVS-0.7.38-030710-15:39-gcc version 3.3.1 20030626 (Debian prerelease)
<init> : Available CPU flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr syscall mmxext 3dnowext 3dnow
<init> : 995.78 MHz AMD Athlon(tm) Processor detected
<aviplay> : Debug is on 0
<reader> : checking: output.avi
<AVI reader> : MainHeader: MicroSecPerFrame=40000 MaxBytesPerSec=0
 PaddingGranularity=0 Flags=[ HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE ] TotalFrames=71
 InitialFrames=0 Streams=2 SuggestedBufferSize=0 WxH=720x544
 Scale=0 Rate=0 Start=0 Length=0
<AVI Reader> : WARNING: fccHandler differs from biCompression!
<AVI reader> : StreamHeader: Type=vids Handler=DIVX Flags=[ ]
 InitialFrames=0 Scale=10000 Rate=250000 Start=0 Length=71
 SuggestedBufferSize=84652 Quality=0 SampleSize=0 Rect l,r,t,b=0,0,0,0
<AVI reader> : StreamHeader: Type=auds Handler=0x0 Flags=[ ]
 InitialFrames=0 Scale=1 Rate=8000 Start=0 Length=22151
 SuggestedBufferSize=209 Quality=0 SampleSize=1 Rect l,r,t,b=0,0,0,0
<AVI reader> : InfoChunk Software:  MEncoder 0.90rc5-3.2.3 
<AVI reader> : Reading index from offset: 504062
<AVI reader> : Stream 0 vids : DIVX (0x58564944) 71 chunks (0.28KB)
<AVI reader> : Stream 1 auds : MPEG Layer-3 (0x55) 106 chunks (0.83KB)
<StreamCache> : Creating cache for file descriptor: 4
<reader> : Initialized audio stream (chunk tblsz: 22151, fmtsz: 28)
<audio reader> : WARNING: fixing bad WAVEFORMAT header for MP3 audio track (sz:28 != 30)
<audio reader> : MPEG1 Layer-3 44100Hz 64kbps JointStereo (1152,40,208)
<reader> : Initialized video stream (chunk tblsz: 71, fmtsz: 40)
<codec keeper> : Found 5 plugins (/usr/lib/avifile-0.7,A:23,V:25)
<codec keeper> : FFMPEG OpenDivX video decoder created
<renderer> : SDL video driver: x11
<DPMS module> : Disabling DPMS
<renderer> : created surface: 720x544 16 bits
<renderer> : No hardware YUV acceleration detected!
<renderer> : *** Using SDL software YUV emulation ***
  Usually most codecs supports RGB modes - so you may
  achieve better performance with disabled YUV flag
<renderer> : created overlay: 720x544 Planar YV12
<codec keeper> : MPEG Layer-1,2,3 audio decoder created
<aviplay> : Will try audio renderers in this order: OSS,SDL,noaudio
<audio renderer> : src fmt=0x55 2ch 44100Hz  0b   8000B/s balign=1 cbsz=12
<audio renderer> : dst fmt=0x01 2ch 44100Hz 16b 176400B/s balign=4 cbsz=0
<OSS audio renderer> : frags=8  size=4096b  buffer=32768b (4096b)
<ffodivx> : using DR1
This file was encoded with libavcodec build 4655
<aviplay> : Audio stream eof
<aviplay> : Video stream eof

[...]

<aviplay> : Audio stream eof
<aviplay> : Audio stream eof
<aviplay> : Closing clip
<StreamCache> : Destroy... (Total accesses 2074, hits 94.60%, misses 0.14%, errors 5.26%)
<DPMS module> : Enabling DPMS
<aviplay> : Played 497 video frames ( 2.012072% drop )
_________________________________________________________________

Perhaps the following fragments of "messages" log may be also
relevant:

-----------------------------------------------------------
Aug  5 07:41:35 box kernel: Linux video capture interface: v1.00
Aug  5 07:41:35 box kernel: i2c-core.o: i2c core module
Aug  5 07:41:35 box kernel: i2c-algo-bit.o: i2c bit algorithm module
Aug  5 07:41:35 box kernel: bttv: driver version 0.7.96 loaded
Aug  5 07:41:35 box kernel: bttv: using 4 buffers with 2080k (8320k total) for capture
Aug  5 07:41:35 box kernel: bttv: Host bridge is Silicon Integrated Systems [SiS] 735 Host
Aug  5 07:41:35 box kernel: bttv: Bt8xx card found (0).
Aug  5 07:41:35 box kernel: PCI: Found IRQ 5 for device 00:09.0
Aug  5 07:41:35 box kernel: PCI: Sharing IRQ 5 with 00:09.1
Aug  5 07:41:35 box kernel: bttv0: Bt878 (rev 17) at 00:09.0, irq: 5, latency: 64, mmio: 0xcddfe000
Aug  5 07:41:35 box kernel: bttv0: detected: AVerMedia TVPhone98 [card=41], PCI subsystem ID is 1461:0003
Aug  5 07:41:35 box kernel: bttv0: using: BT878(AVerMedia TVPhone 98) [card=41,autodetected]
Aug  5 07:41:35 box kernel: i2c-core.o: adapter bt848 #0 registered as adapter 0.
Aug  5 07:41:35 box kernel: bttv0: Avermedia eeprom[0x0a99]: tuner=5 radio:yes remote control:yes
Aug  5 07:41:35 box kernel: bttv0: using tuner=5
Aug  5 07:41:35 box kernel: bttv0: i2c: checking for MSP34xx @ 0x80... not found
Aug  5 07:41:35 box kernel: bttv0: i2c: checking for TDA9875 @ 0xb0... found
Aug  5 07:41:35 box kernel: i2c-core.o: driver i2c tda9875 driver registered.
Aug  5 07:41:35 box kernel: tda9875: no such chip at 0xb0 (dic=0x11 rev=0x2)
Aug  5 07:41:35 box kernel: bttv0: i2c: checking for TDA7432 @ 0x8a... not found
Aug  5 07:41:35 box kernel: tvaudio: TV audio decoder + audio/video mux driver
Aug  5 07:41:35 box kernel: tvaudio: known chips: tda9840,tda9873h,tda9874h/a,tda9850,tda9855,tea6300,tea6420,tda8425,pic16c54 (PV951)
Aug  5 07:41:35 box kernel: i2c-core.o: driver generic i2c audio driver registered.
Aug  5 07:41:35 box kernel: tvaudio: found tda9874h/a
Aug  5 07:41:35 box kernel: bttv0: i2c attach [client=tda9874h/a,ok]
Aug  5 07:41:35 box kernel: i2c-core.o: client [tda9874h/a] registered to adapter [bt848 #0](pos. 0).
Aug  5 07:41:35 box kernel: i2c-core.o: driver i2c TV tuner driver registered.
Aug  5 07:41:35 box kernel: tuner: probing bt848 #0 i2c adapter [id=0x10005]
Aug  5 07:41:35 box kernel: tuner: chip found @ 0xc2
Aug  5 07:41:35 box kernel: bttv0: i2c attach [client=Philips PAL_BG (FI1216 and compa,ok]
Aug  5 07:41:35 box kernel: i2c-core.o: client [Philips PAL_BG (FI1216 and compa] registered to adapter [bt848 #0](pos. 1).
Aug  5 07:41:35 box kernel: bttv0: registered device video0
Aug  5 07:41:35 box kernel: bttv0: registered device vbi0
Aug  5 07:41:35 box kernel: bttv0: registered device radio0
Aug  5 07:41:35 box kernel: 8139too Fast Ethernet driver 0.9.26
Aug  5 07:41:35 box kernel: PCI: Found IRQ 11 for device 00:11.0
Aug  5 07:41:35 box kernel: eth0: RealTek RTL8139 Fast Ethernet at 0xd28f9f00, 00:0a:cd:00:cc:d5, IRQ 11
Aug  5 07:41:35 box kernel: Intel 810 + AC97 Audio, version 0.21, 15:49:30 Mar 26 2003
Aug  5 07:41:35 box kernel: PCI: Found IRQ 11 for device 00:02.7
Aug  5 07:41:35 box kernel: i810: SiS 7012 found at IO 0xd800 and 0xdc00, IRQ 11
Aug  5 07:41:35 box kernel: i810_audio: Audio Controller supports 2 channels.
Aug  5 07:41:35 box kernel: ac97_codec: AC97 Audio codec, id: ALC38(Unknown)
Aug  5 07:41:35 box kernel: i810_audio: only 48Khz playback available.
Aug  5 07:41:35 box kernel: i810_audio: AC'97 codec 0 supports AMAP, total channels = 2
 -----------------------------------------------------------

Last but not least: do you think my problem is Debian specific?
Perhaps I should post my problem on Knoppix or mplayer list?

Best regards
    
Janusz
   
-- 
                     ,   
dr hab. Janusz S. Bien, prof. UW
Prof. Janusz S. Bien, Warsaw Uniwersity
jsbien@mimuw.edu.pl, jsbien@uw.edu.pl
http://www.orient.uw.edu.pl/~jsbien/
http://www.mimuw.edu.pl/~jsbien/



Reply to: