[MPlayer-users] invalid VBR header. help, please

Mauro Condarelli mc5686 at mclink.it
Sun Mar 13 13:12:20 CET 2005


I'm quite new to mencoder and I managed to make my first full-size 
capture from tv.
This is the script I use to capture:
================================
if [ -n "$2" ]
then
  fn=$2
  v4lctl setstation $2
else
  fn=Video;
fi
fn=$fn-`date '+%F(%H.%M)'`.avi
amixer set Line 90% mute cap
mencoder tv:// \
-tv driver=v4l2:device=/dev/video0:width=768:height=576:alsa \
-ovc lavc -lavcopts 
vcodec=mpeg4:vbitrate=2200:vratetol=32000:mbd=2:psnr:aspect=4/3 \
-oac mp3lame -lameopts abr:br=128 \
-vf crop=720:544:24:16,denoise3d,pp=lb \
-sws 6 -of avi -o $fn -endpos $1
amixer set Line 0% mute nocap
================================

Quality is great (filesize is huge, but that was expected :) ), but I 
have a few, not really blocking questions already:

How can I record directly from bt878 audio?
someone suggested using the btaudio kernel module, but that does not 
look right, since that's an oss module, while I use (to be precise: 
"debian sarge uses") alsa and I know the bt87x module is loaded. I can 
also set for recording using "alsamixer -c1", but I have been unable to 
divine what to pass to the "-tv ...:alsa:device=" parameter. The fine 
manual says to look at the "-ao alsa" option, but I found that slightly 
cryptic :-(.  If it is of any use: my /proc/asound/devices contains:
================================
  0: [0- 0]: ctl
 20: [0- 4]: digital audio playback
 27: [0- 3]: digital audio capture
 26: [0- 2]: digital audio capture
 25: [0- 1]: digital audio capture
 16: [0- 0]: digital audio playback
 24: [0- 0]: digital audio capture
 33:       : timer
 32: [1- 0]: ctl
 57: [1- 1]: digital audio capture
 56: [1- 0]: digital audio capture
================================

Where is the format of the .mplayer/config file detailed? I tried to use 
it to hold some static info (norm, channels, ...) but it complains, so I 
must have done something wrong and so I resorted using "v4lctl 
setstation ...".

REAL PROBLEM STARTS HERE

I tried to remove the embedded commercials using avidemux.
So far so good.
I followed instructions (recompute vbr and enable "smart copy") and I 
ended up with no errors and a file with the right video, but a huge 
(>>10s!!)  audio/video desynchronization.
I then opened the same (original) .avi with virtualDub and it 
immediately complained:
================================
VBR audio stream detected.
VirtualDub has detected an improper VBR audio encoding in the source AVI 
file and will rewrite the audio header with standard CBR values during 
processing for better compatibility. This may introduce up to 12848 ms 
of skew from the video source. If this is unacceptable, decompress the 
*entire* audio stream to an uncompressed WAV file and recompress with a 
consant bitrate encoder. (bitrate: 130.4 +- 14.6 kbps)
================================
End results (after commercial removal) are almost as bad as avidemux ones.
What should I do?
I understand I have better to leave VBR alone when encoding (shouldn't 
the manual warn against using VBR?), but how can I salvage this recording?

TiA
Mauro




More information about the MPlayer-users mailing list