Home

Wiki (private)

 Kornel 

 Blog Kornela 

Linux

Drugs

Berlin

Outside

Free Time

Contact

Impressum


TV-Capture with mplayer (mencoder)
Captures from svideo input to wmv-Format with a bitrate of 2400.
   /usr/local/bin/mencoder -tv driver=v4l2:input=2:width=768:height=576 \
      -ovc lavc -lavcopts vcodec=wmv2:vbitrate=2400                     \
      -oac mp3lame -lameopts cbr:br=160 -vf crop=720:544:24:16,pp=lb    \
      -o <filename> tv:// 
        
After capturing you could recode it with Avidemux to xvid.

Hints:
  • If using a bttv-based card, add "options bttv gbuffers=32 vcr_hack=1" to the module options (ubuntu for example /etc/modprobe.d/options)
  • If you want the sound not from the tuner but from another source, try for example "adevice=/dev/dsp:forceaudio:" as additional tv-options
  • If your processor cannot encode and play the above, try smaller values: "width=480:height=360 , :vbitrate=1600 , lameopts cbr:br=128 crop=440:344"

Repair avi with broken index
   mencoder -ovc copy -oac copy <input-file> -o <output-file>
        

Play DvD-Files from Disc
$DVDROOT is the directory where the AUTO_TS and VIDEO_TS directories are located.
   mplayer -vo xv -ao alsa -nocache -autosync 30 -framedrop \
      -osdlevel 0 -vf pp=ci -dvd-device $DVDROOT dvd://
        
Okay, not mplayer, but if you want it watched with xine, do this:
   xine dvd:/path/to/dvd/root/like/above/
        
By the way: If you want to burn these Files to a DVD, the Filenames has to be All Upper Case for mkisofs to work (with the -dvd-video - option):
   mkisofs -o /tmp/image.raw -dvd-video $DVDROOT
        
   cdrecord.prodvd  -v  dev=0,1,0 -useinfo driveropts=burnfree \
      -pad -dao /tmp/image.raw
        
(substitute dev=0,1,0 for your correct one)

or
   growisofs  -Z /dev/dvd-recorder -V BIRTHDAY -dvd-video $DVDROOT
        

ALSA and the second soundcard
You use ALSA and want to access the second sound card in mplayer and xine.

The Name of the second card in alsa is "hw:1"
In Xine this goes straight, just go to settings, tab "audio" and then put hw:1 in the field device_alsa_default_device() (and perhaps front below).

For mplayer, this does not work, because mplayer uses a colon as argument seperator.
So, for mplayer, substitute the colon : by a equal sign =
   mplayer -ao alsa:device=hw=1
        
(yeah, that sucks even more)