Re: Verständnisfrage crop / scale - mencoder

Al Bogner <suse-multimedia-Wco+c2LKsy1DayIqkcHqbfyE8WyFmGdT@public.gmane.org>
Newsgroups gmane.linux.suse.multimedia.german
Message-ID <[email protected]>
Am Donnerstag, 4. Februar 2010 23:29:50 schrieb David Haller:

Hallo David,

> Am Don, 04 Feb 2010, Al Bogner schrieb:
> >Am Mittwoch, 3. Februar 2010 23:06:59 schrieb David Haller:
> >>  -vf crop=656:544:24:16,dsize=4/3,scale=768:576 -sws 9
> >
> >Habe gerade das mit DVB-Stream probiert und es bleiben die schwarzen
> > Balken:
> >
> >mencoder -ovc x264 -x264encopts qp=26:threads=auto:pass=1 \
> >    -vf yadif=0,softskip,harddup \
> >    -vf crop=688:560:16:12,dsize=4/3,scale=704:576 -sws 9 \
> 
>                                             ^^^^^^^
> 
> Das ist kein 4:3, und wenn du das nicht auf nem Monitor abspielst, der
> die Balken abschneidet (Overscan), dann gibt's halt Balken. Deswegen
> die 768x576 von mir (das ist 4:3 bei 576 Zeilen).

Ich verstehe das noch nicht ganz,

Ich verwende das am Ende zitierte Script, das ich im Netz gefunden habe um die 
Ränder zu berechnen. (Achtung kann umbrochen sein!) Meistens passen die Werte 
auch. Somit sollte da _kein_ schwarzer Balken mehr sichtbar sein, oder?

-vf crop=688:560:16:12

Wenn ich nun _danach_ ein scale="704:576" mache, dann sollte doch nur Bild 
hochskaliert werden, oder? Warum sehe ich also Balken? Ich verstehe nicht was 
das mit Overscan zu tun haben soll.

BTW was ist der Unterschied zwischen dsize=4/3 und -aspect 4/3 ?

Al


CROP="1"
TOTAL_LOOPS="10"
NICE_PRI="10"
SOURCE="$1"


######### CROP Settings #############
if [ "$CROP" == "1" ]; then
  echo "Please wait.  It make take a couple minutes to detect crop 
parameters."
  A=0
  while [ "$A" -lt "$TOTAL_LOOPS" ] ; do
    A="$(( $A + 1 ))"
    SKIP_SECS="$(( 35 * $A ))"
  
    nice -n $NICE_PRI nohup mplayer "$SOURCE" $CHAPTER -ss $SKIP_SECS \
     -identify -frames 20 -vo md5sum -ao null -nocache -speed 100 -noframedrop 
\
     -vf ${VF_OPTS}cropdetect=20:16 2>&1 > mplayer.log < /dev/null

# echo DEBUG ; cat mplayer.log
  
    CROP[$A]=`awk -F 'crop=' '/crop/ {print $2}' < mplayer.log\
     | awk -F ')' '{print $1}' | tail -n 1`

    SOURCE_AUDIORATE=`awk -F '=' '/ID_AUDIO_BITRATE/ {print $2}'<mplayer.log`

    SOURCE_LENGTH=`awk -F '=' '/ID_LENGTH/ {print $2}'<mplayer.log`
  done
  rm md5sums mplayer.log 


  B=0
  while [ "$B" -lt "$TOTAL_LOOPS" ] ; do
    B="$(( $B + 1 ))"
  
    C=0
    while [ "$C" -lt "$TOTAL_LOOPS" ] ; do
      C="$(( $C + 1 ))"
  
      if [ "${CROP[$B]}" == "${CROP[$C]}" ] ; then
        COUNT_CROP[$B]="$(( ${COUNT_CROP[$B]} + 1 ))"
      fi
    done  
  done
  
  HIGHEST_COUNT=0
  
  D=0
  while [ "$D" -lt "$TOTAL_LOOPS" ] ; do
     D="$(( $D + 1 ))"
  
       if [ "${COUNT_CROP[$D]}" -gt "$HIGHEST_COUNT" ] ; then
         HIGHEST_COUNT="${COUNT_CROP[$D]}"
         GREATEST="$D"
       fi
  done
  
  CROP="crop=${CROP[$GREATEST]}"
  
  echo -e "\n\nCrop Setting is: $CROP ... \n\n" 

else
  nice -n $NICE_PRI nohup mplayer "$SOURCE" $CHAPTER \
   -identify -frames 0 -vo md5sum -ao null -nocache \
   2>&1 > mplayer.log < /dev/null

  SOURCE_AUDIORATE=`awk -F '=' '/ID_AUDIO_BITRATE/ {print $2}'<mplayer.log`

  SOURCE_LENGTH=`awk -F '=' '/ID_LENGTH/ {print $2}'<mplayer.log`

  rm md5sums mplayer.log 
fi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.