Thread: Request: TCPMP
View Single Post
iliaden's Avatar
Posts: 267 | Thanked: 50 times | Joined on Feb 2008 @ Montreal, Canada
#59
@bunanson: well, analyze this logically:
1) the script (which I presume you have read) will simply output the "mplayer -noslices -framedrop /media/mmc1/Jsu.m4v", since the bitrate is 0. This narrows the problem down to MPlayer.
the fact that mplayer determined the bitrate to be 0 shows two possibilities: 1- mplayer is poorly written and 2- the file is somewhat corrupted.
Does this problem occur with every single file or just this one?

@josiahg777:
no optimization needed (based on a n8x0, OS2008, and no background, cpu-eating processes) for bitrate <650kbps (650000bps) here are my suggested values:
Code:
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
to e certain no lag occurs, the values of all the bitrates could be 50000 lower, but the values I entered seem good.
you agree?

Ilia