|
Lines 481-506
Link Here
|
| 481 |
local vopopts="-vop $vopopts" |
481 |
local vopopts="-vop $vopopts" |
| 482 |
fi |
482 |
fi |
| 483 |
|
483 |
|
|
|
484 |
if [ "$ppvalues" -a "${ppvalues:1:2}" != "hb" ] |
| 485 |
then |
| 486 |
local mintopts="" |
| 487 |
local xintopts="" |
| 488 |
else |
| 489 |
local mintopts=":ildct:ilme" |
| 490 |
local xintopts=":interlacing" |
| 491 |
fi |
| 492 |
|
| 484 |
# encode in two passes |
493 |
# encode in two passes |
| 485 |
for pass in 1 2 |
494 |
for pass in 1 2 |
| 486 |
do |
495 |
do |
| 487 |
if [ "$pass" = "1" ] |
496 |
if [ "$pass" = "1" ] |
| 488 |
then |
497 |
then |
| 489 |
local ofile="-o /dev/null" |
498 |
local ofile="-o /dev/null" |
|
|
499 |
local mturbo=":turbo" |
| 500 |
local xturbo=":turbo" |
| 490 |
else |
501 |
else |
| 491 |
local ofile="-o $tempdir/$name.avi" |
502 |
local ofile="-o $tempdir/$name.avi" |
|
|
503 |
if [ "$useropts_lavc" ]; then log_info "\$useropts_lavc are set to \"$useropts_lavc\""; fi |
| 504 |
if [ "$useropts_xvid" ]; then log_info "\$useropts_xvid are set to \"$useropts_xvid\""; fi |
| 505 |
if [ "$mintopts" ]; then log_info "\Encoding an interlaced stream with \"$mintopts\""; fi |
| 506 |
if [ "$xintopts" ]; then log_info "\Encoding an interlaced stream with \"$xintopts\""; fi |
| 507 |
local mturbo=":$useropts_lavc$mintopts" |
| 508 |
local xturbo=":$useropts_xvid$xintopts" |
| 492 |
fi |
509 |
fi |
| 493 |
|
510 |
|
| 494 |
# set mencoder video values |
511 |
# set mencoder video values |
| 495 |
case "$vcodec" in |
512 |
case "$vcodec" in |
| 496 |
"lavc") |
513 |
"lavc") |
| 497 |
local vopts="-ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=$br_video:vqmin=$min_q:vqmax=$max_q:vpass=$pass -sws 2" |
514 |
local vopts="-ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=$br_video:vqmin=$min_q:vqmax=$max_q:vpass=$pass$mturbo -sws 2" |
| 498 |
;; |
515 |
;; |
| 499 |
"xvid") |
516 |
"xvid") |
| 500 |
local vopts="-ovc xvid -xvidencopts bitrate=$br_video:me_quality=6:pass=$pass -sws 2" |
517 |
local vopts="-ovc xvid -xvidencopts bitrate=$br_video:me_quality=6:pass=$pass$xturbo -sws 2" |
| 501 |
;; |
|
|
| 502 |
"divx4") |
| 503 |
local vopts="-ovc divx4 -divx4opts br=$br_video:q=5:min_quant=$min_q:max_quant=$max_q:pass=$pass -sws 2" |
| 504 |
;; |
518 |
;; |
| 505 |
*) |
519 |
*) |
| 506 |
log_error "unknown video codec $vcodec" |
520 |
log_error "unknown video codec $vcodec" |