mplayer-users
[Top][All Lists]
Advanced

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

Re: [MPlayer-users] RE: 2 pass with lavc, 2nd pass looks a littleworse


To: "MPlayer user's list." <mplayer-users@xxxxxxxxxxxx>
Subject: Re: [MPlayer-users] RE: 2 pass with lavc, 2nd pass looks a littleworse (only a little)
From: Tuukka Toivonen <tuukkat@xxxxxxxxxx>
Date: Thu, 14 Aug 2003 16:04:02 +0300 (EEST)
In-reply-to: <8050168.1060864007687.JavaMail.nobody@wamui02.slb.atl.earthlink.net>
References: <8050168.1060864007687.JavaMail.nobody@wamui02.slb.atl.earthlink.net>

[Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
On Thu, 14 Aug 2003 upgrdman@xxxxxxxxxxxxxx wrote:

>and yes the origion file... the vob, is like 3GB so unless u want me to
>upload it, i probably shouldnt. and i think that would violate the dmca
>anyway, and im a poor american :/ damn our laws! :)

Not at all. Under DMCA it's just fine to copy and distribute movies, as far
as I have heard. What's illegal, is ripping the movie in the first place
(circumventing CSS), even for personal viewing. Funny, isn't it?

Of course it is (and was) illegal to distribute copyrighted materials
without permission, so you should be concerned about DMCA only if watching
the movies from the original encrypted DVD.

Ok, sorry for offtopic ranting.. to make this e-mail remotely useful,
here are some encoding tips that I experimented yielded the best result
(PSNR) with three pass encoding:

- Use hqdn3d, I use hqdn3d=12:15:15, for good video source decrease the
  values. This greatly removes noise (at least when recording from TV)
- Use the following lavcopts (tested 25 fps, about 384 kbps, 320x240 size)
vcodec=mpeg4:\
vhq:\
vbitrate=$VIDEO_BR:\
trell:\
vmax_b_frames=2:\
v4mv:\
precmp=6:\
cmp=6:\
subcmp=6:\
predia=6:\
dia=6:\
vb_strategy=1:\
vlelim=-3:\
vcelim=5

Actually most of the options have almost insignificant change in to the
image quality, trell probably gives the most increase. Here's my three-pass
encoding script (the input file should be a mov (quicktime) file, recorded
e.g. with streamer, with 44100 Hz 16 bit single channel audio).

#!/bin/sh

if [ "$VIDEO_BR" = "" ]; then
        VIDEO_BR=384
fi
if [ "$AUDIO_BR" = "" ]; then
        AUDIO_BR=28
fi
export VIDEO_BR AUDIO_BR

if [ "$ENCTMP_RUN2" = "" ]; then
        export ENCTMP_RUN2="y"
        exec nice time "$0" "$@"
fi

INFILE="$1"
if [ "$INFILE" = "" ]; then
        echo "[VIDEO_BR=xxx] [AUDIO_BR=xxx] enc.sh infile [outfile]"
        exit 0
fi
if [ "$2" != "" ]; then
        OUTFILE="$2"
else
        OUTFILE="$INFILE.avi"
fi

GENOPTS="-noskip -skiplimit 0 -vop hqdn3d=12:15:15"

LAVCOPTS=-lavcopts\ \
vcodec=mpeg4:\
vhq:\
vbitrate=$VIDEO_BR:\
trell:\
vmax_b_frames=2:\
v4mv:\
precmp=6:\
cmp=6:\
subcmp=6:\
predia=6:\
dia=6:\
vb_strategy=1:\
vlelim=-3:\
vcelim=5
#lumi_mask=0.10:\
#dark_mask=0.06:\
#naq:\

LAMEOPTS=-lameopts\ \
br=$AUDIO_BR:\
aq=0:\
abr:\
mode=3

rm -f divx2pass.log psnr_*.log frameno.avi stream.dump stream.wav coding.txt
echo "$GENOPTS $LAVCOPTS $LAMEOPTS" >coding.txt

set -e -x #-v

mplayer -dumpaudio "$INFILE"
sox -x -w -s -c 1 -r 44100 -t raw stream.dump -t wav stream.wav
mencoder $GENOPTS -ovc frameno -oac mp3lame -audiofile stream.wav $LAMEOPTS 
"$INFILE" -o frameno.avi
mencoder $GENOPTS -ovc lavc -oac copy $LAVCOPTS:vpass=1:psnr "$INFILE" -o 
"$OUTFILE"
mencoder $GENOPTS -ovc lavc -oac copy $LAVCOPTS:vpass=2:psnr "$INFILE" -o 
"$OUTFILE"

_______________________________________________
RTFM!!!  http://www.MPlayerHQ.hu/DOCS
Search:  http://www.MPlayerHQ.hu/cgi-bin/htsearch
http://mplayerhq.hu/mailman/listinfo/mplayer-users


[Prev in Thread] Current Thread [Next in Thread]