Thread: Request: TCPMP
View Single Post
iliaden's Avatar
Posts: 267 | Thanked: 50 times | Joined on Feb 2008 @ Montreal, Canada
#56
hi,

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:
 if [ $# -eq 0 ];
then
    echo -n Please enter the name of the file: 
    read NAME
else
    NAME=$1
fi
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?

Code:
if [ $FPS -lt 12 -o $BITRATE -lt 750 ]
then
    mplayer -quiet -framedrop "$NAME"
    exit 0
fi
not "mplayer -quiet -framedrop -noslices "$NAME""

next, the bitrate is in what, bytes or kilobytes per second?
Code:
if [ $BITRATE -lt 16000 ]
elif [ $BITRATE -lt 128000 ]
128mbps or 128kbps. one seems to be INCREDIBLY large, the other one extremely low. could you clarify this please?

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:
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
looks good?