![]() |
2008-06-04
, 11:53
|
|
Posts: 267 |
Thanked: 50 times |
Joined on Feb 2008
@ Montreal, Canada
|
#51
|
![]() |
2008-06-05
, 03:42
|
Posts: 425 |
Thanked: 132 times |
Joined on Mar 2008
@ California
|
#52
|
![]() |
2008-06-05
, 14:46
|
|
Posts: 267 |
Thanked: 50 times |
Joined on Feb 2008
@ Montreal, Canada
|
#53
|
![]() |
2008-06-05
, 19:07
|
Posts: 425 |
Thanked: 132 times |
Joined on Mar 2008
@ California
|
#54
|
"/path/to/clip/movie\ number\ 1.avi" the space character is entered as "\ ". could this be the problem?
![]() |
2008-06-07
, 04:15
|
Posts: 425 |
Thanked: 132 times |
Joined on Mar 2008
@ California
|
#55
|
The Following User Says Thank You to josiahg777 For This Useful Post: | ||
![]() |
2008-06-08
, 16:56
|
|
Posts: 267 |
Thanked: 50 times |
Joined on Feb 2008
@ Montreal, Canada
|
#56
|
if [ $# -eq 0 ]; then echo -n Please enter the name of the file: read NAME else NAME=$1 fi
if [ $FPS -lt 12 -o $BITRATE -lt 750 ] then mplayer -quiet -framedrop "$NAME" exit 0 fi
if [ $BITRATE -lt 16000 ] elif [ $BITRATE -lt 128000 ]
if $FPS -gt 25 $FRAMEDROP="hardframedrop" REST OF THE CODE HERE (the optimizations you wrote, this "if" thus remains independent of the rest" else $FRAMEDROP="framedrop" REST OF THE CODE (or a simple goto would do the trick here in order not to rewrite) fi
![]() |
2008-06-08
, 17:51
|
Posts: 425 |
Thanked: 132 times |
Joined on Mar 2008
@ California
|
#57
|
I don't really think that this credit is "proper". I didn't write any code myself (since I cannot post it on some site for everyone), so it's not the best idea. you could put me under "ideas contributions". And it would look nicer if you wrote my name, not the nickname: Ilia Denotkine. guess where the nick came from
code looks good. just for me, to make sure: the file you enter would be with or without the path, and if without, is the default root, user folder or the path where you are?
next, the bitrate is in what, bytes or kilobytes per second?
and one last comment: the difference between -framedrop and -hardframedrop should be determined by the bitrate and/or fps, not the ORIGINAL resolution.
maybe it's better to write:
looks good?Code:if $FPS -gt 25 $FRAMEDROP="hardframedrop" REST OF THE CODE HERE (the optimizations you wrote, this "if" thus remains independent of the rest" else $FRAMEDROP="framedrop" REST OF THE CODE (or a simple goto would do the trick here in order not to rewrite) fi
![]() |
2008-06-09
, 02:30
|
Posts: 4,030 |
Thanked: 1,633 times |
Joined on Jul 2007
@ nd usa
|
#58
|
![]() |
2008-06-09
, 03:30
|
|
Posts: 267 |
Thanked: 50 times |
Joined on Feb 2008
@ Montreal, Canada
|
#59
|
if [ $BITRATE -lt 650000 ] then if [ $WIDTH -gt 800 ] then FULL=1 echo ...setting lowres ON, 1/2 resolution else mplayer -quiet -framedrop -noslices "$NAME" exit 0 fi else if [ $WIDTH -lt 800 ] then if [ $BITRATE -gt 65000 ] then FULL=1 echo ...setting lowres ON, 1/2 resolution elif [ $BITRATE -gt 1024000 ] then FULL=2 echo ...setting lowres ON, 1/4 resolution else echo ...playing video with original resolution mplayer -quiet -framedrop -noslices "$NAME" fi else if [ $WIDTH -gt `expr 4 \\* $MAX_WIDTH` -o $BITRATE -gt 3000000 ] then FULL=3 echo ...setting lowres ON, 1/8 resolution elif [ $WIDTH -gt `expr 2 \\* $MAX_WIDTH` -o $BITRATE -gt 1024000 ] then FULL=2 echo ... setting lowres ON, 1/4 resolution elif [ $WIDTH -gt $MAX_WIDTH -o $BITRATE -gt 650000 ] then FULL=1 echo ... setting lowres ON, 1/2 resolution else FULL=0 FAST="" echo ... setting lowres OFF fi fi fi
![]() |
2008-06-11
, 18:32
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#60
|