[MPlayer-users] Strange problem with self-recorded AVI file.
Rainer Hantsch
office at hantsch.co.at
Wed Mar 30 08:28:08 CEST 2005
Hello!
I am recording a TV series with mencoder and I am using the same script since
a very long time (and it actually works).
Now I see that the last recording has no index (or a broken one).
Playing it with xine results in endless waiting (because xine searches the
whole file for an index or silently rebuilds one), while mplayer plays it from
beginning.
With option "-idx" I am also able to position again in the file, but I see
developing the new picture from multiple tiles when I jump to some location.
Other files with good index do not have this phenomen.
The file is only ~800MB in size and there is plenty of disk space, so it
cannot have been caused by a hard abort because of a full disk, which would
explain the result.
I remember that this is a typical effect whenever(!) I am forced to rebuild
the index.
My questions:
-------------
.) How is it possible that mencoder repeatedly produces working files over
a long period of time and then records a broken index file?
.) As you can see in my recording script (-> Attachment, Filename ".vr"),
I record with a key interval of 25, so I get one keyframe per second.
It appears to me that building a new index results in a different
keyframe interval, because I cannot position such excactly any more.
· Is this possibly the reason?
· Is mencoder able to find out the right key-interval value by itself?
· Is it possible to force a keyinterval of 25 for repairing the index?
My current situation is that the file is actually lost, when the
original index is damaged. It is pherhaps possible to play it, but
not every player accepts it (i.e. a DVD-Player) or needs a long time to
start playing (xine), and I also cannot cut out commercials without
damaging the file completly.
Well, my player is not very new, but it still should work:
MPlayer 0.90pre8-2.95.3 (C) 2000-2002 Arpad Gereoffy (see DOCS)
If someone could help, please?
mfg
Ing. Rainer Hantsch
-------------- next part --------------
#!/bin/sh
function SET_SIZE () {
palw=$1
palh=`expr $palw "*" 3 "/" 4`
width=$palw
height=`expr $palh - 8`
}
function RECORD_VRC () {
echo "RECORDING VIDEO"
echo
mencoder -tv on:input=$vinput:driver=v4l:device=/dev/video0:fps=25:\
width=$palw:height=$palh:forceaudio=1:audiorate=48000:amode=0:\
forcechan=1:adevice=/dev/dsp \
-oac mp3lame -lameopts cbr:br=128:mode=0:aq=6 \
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=650:keyint=25 \
-vop crop=$width:$height,pp=md,denoise3d=8:6:6 \
-endpos $dauer \
-o "$workfile"
}
function RECORD_TV () {
# Das ist meine neue Original-Aufnahmeroutine.
echo "RECORDING TV"
echo
mencoder -tv on:input=$vinput:driver=v4l:device=/dev/video0:fps=25:\
width=$palw:height=$palh:forceaudio=1:audiorate=48000:amode=0:\
forcechan=1:adevice=/dev/dsp \
-oac mp3lame -lameopts cbr:br=128:mode=0:aq=6 \
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1950:keyint=25 \
-vop crop=$width:$height,pp=md,denoise3d=8:6:6 \
-sws 2 \
-endpos $dauer \
-o "$workfile"
}
echo "##########################################################################"
echo "## TV-RECORDER ###########################################################"
echo "##########################################################################"
echo
if [ "$1" == "" ] ; then
echo "Richtiger Aufruf: $0 \"Sendername\" \"Aufnahmedauer\" \"Filmname (optionell)\""
echo "VCR als Sender = Videorecorder."
exit 0
fi
station=$1
dauer=$2
name=$3
# Out-Filename generieren ...
outfile=""
if [ "$name" != "" ] ; then
outfile="$name"
fi
outfile="zz_`date +%Y-%m-%d_[%a]_%H:%M`-$outfile-$station.avi"
#outfile=`echo $outfile | sed s/:/./g`
workfile=$outfile.recording
# Bildformat auswählen / berechnen von Clipping
# 1/2 PAL = 352 breit
# PAL = 720 breit Es geht aber nur max. 688 px (muß durch 16 teilbar sein)
# Sender auswählen
# Werte für Video und Audio einstellen
if [ "$station" != "VRC" ] ; then
SET_SIZE 720
# Einstellungen für TV-Aufzeichnung
v4lctl setstation "$station" # Sender auswählen
v4lctl color "55%" # Farbsättigung einstellen war 60%
v4lctl bright "45%" # Helligkeit
vinput=0 # Video-Input = TV
audlevel="30%"
# Audio einstellen
echo "########## Audio-Volume = $audlevel #############"
amixer -c 0 sset Line,0 $audlevel,$audlevel unmute capture
echo
RECORD_TV
else
SET_SIZE 688
# Einstellungen für Aufnehmen von Composite Video
v4lctl color "40%" # Farbsättigung einstellen war 30%
v4lctl bright "50%" # Helligkeit
vinput=1 # Video-Input = Composite Video Eingang
audlevel="25%" # Lautstärke
# Audio einstellen
echo "########## Audio-Volume = $audlevel #############"
amixer -c 0 sset Line,0 $audlevel,$audlevel unmute capture
echo
RECORD_VRC
fi
# Umbenennen auf endgültigen Dateinamen.
mv "$workfile" "$outfile"
#-eof-
More information about the MPlayer-users
mailing list