| The Following 2 Users Say Thank You to iliaden For This Useful Post: | ||
|
|
2008-06-14
, 09:16
|
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#62
|
sh: Big: unknown operand
sh: Big: unknown operand
Opening Your Big Video File.avi...
[mpeg4 @ 0x46ade4]ac-tex damaged at 6 3
[mpeg4 @ 0x46ade4]Error at MB: 105
[mpeg4 @ 0x46ade4]concealing 715 DC, 715 AC, 715 MV errors
/usr/bin/optmplayer: line 43: [23: not found
|
|
2008-06-14
, 11:00
|
|
|
Posts: 267 |
Thanked: 50 times |
Joined on Feb 2008
@ Montreal, Canada
|
#63
|
[mpeg4 @ 0x46ade4]ac-tex damaged at 6 3
[mpeg4 @ 0x46ade4]Error at MB: 105
[mpeg4 @ 0x46ade4]concealing 715 DC, 715 AC, 715 MV errors
The bitrate seems ridiculously high (1240984)
I then get an error:
It sits for a very long time at the "Opening Your Big Video File.avi..."
| The Following User Says Thank You to iliaden For This Useful Post: | ||
|
|
2008-06-15
, 00:02
|
|
Posts: 96 |
Thanked: 1 time |
Joined on Jul 2007
@ Utah
|
#64
|
|
|
2008-06-15
, 00:17
|
|
|
Posts: 267 |
Thanked: 50 times |
Joined on Feb 2008
@ Montreal, Canada
|
#65
|
|
|
2008-06-15
, 19:43
|
|
Posts: 425 |
Thanked: 132 times |
Joined on Mar 2008
@ California
|
#66
|

|
|
2008-06-15
, 21:17
|
|
|
Posts: 267 |
Thanked: 50 times |
Joined on Feb 2008
@ Montreal, Canada
|
#67
|
|
|
2008-06-15
, 21:26
|
|
Posts: 425 |
Thanked: 132 times |
Joined on Mar 2008
@ California
|
#68
|
|
|
2008-06-16
, 16:28
|
|
|
Moderator |
Posts: 7,109 |
Thanked: 8,820 times |
Joined on Oct 2007
@ Vancouver, BC, Canada
|
#69
|
|
|
2008-06-16
, 20:44
|
|
|
Posts: 267 |
Thanked: 50 times |
Joined on Feb 2008
@ Montreal, Canada
|
#70
|
Is there any way to arbitrarily resize a video, or are you forced to halve or quarter the size?
I will make sure this is added to the final release, but not until then. I think it's better to concentrate on the script itself first, and only then go for the gui. However, the method you offered has a slight problem: most people would just run their videos through a media player.
I, myself, am not quite familiar with the MPlayer package built for maemo, but I do know it has a gui. Could you point to the file to be modified in order for the gui to launch "mplayer-opt FILE" instead of "mplayer FILE". I believe this would be the most convenient for a common end user.
@josiahg777
I [just] found this [by following the provided link and by adding the "h" to http]:
And I made a few updates, and removed an impossible if situation, so this script should be version 4 (yet I don't have any hosting sites ).
Changelog: 1) added a "-o" and "--original" option: bypass the script. this could be useful to compare the modifications with the original.
2) corrected the bitrate values
3) added the "hardframedrop" for files with FPS > 25
4) corrected authors' names
5) modified echo returns
Here it is:
#! /bin/sh -f if [ $1 == "-h" -o $1 == "--help" ] then echo -e "\n \t \t Usage: mplayer-opt [FILENAME] \n" echo This script calls MPlayer with several optimizations echo -e "\t to allow smooth playback of most content" echo -e "\t both with and without optimization" echo Known Issues: This script will not work with videos echo -e "\t whose aspect ratio has not been declared" echo Authors: Josiah Gaskin, Ilia Denotkine. Version: 0.4 exit 0 fi if [ $1 == "-o" -o $1 == "--original" ] then NAME=$2 echo -n Playing video without ANY modifications... mplayer "$NAME" exit 0 fi if [ $# -eq 0 ] then echo -n Please enter the name of the file: read NAME else NAME=$1 fi echo Opening $NAME ... PARAMS=$(mplayer -nosound -vo null -really-quiet -ss 01:00:00 -identify "$NAME" | awk '/ID_VIDEO_WIDTH/ { print substr( $PARAMS, 16, length($PARAMS) ) } /ID_VIDEO_FPS/ { print substr( $PARAMS, 14, length($PARAMS) ) } /ID_VIDEO_BITRATE/ { print substr( $PARAMS, 18, length($PARAMS) ) }') BITRATE=`echo $PARAMS | cut -d " " -f 1` WIDTH=`echo $PARAMS | cut -d " " -f 2` FPS=`echo $PARAMS | cut -d " " -f 3 | cut -c-2` echo -n Video width is $WIDTH, video bitrate is $BITRATE, video fps is $FPS if [ $FPS -gt 25] then HARD="hard" else HARD="" fi if [ $FPS -lt 15 -o $BITRATE -lt 500000 ] then echo -n ... playing file with original resolution mplayer -quiet -framedrop -noslices "$NAME" exit 0 fi FAST="fast:" MAX_WIDTH=800 if [ $BITRATE -lt 650000 ] then if [ $WIDTH -gt 800 ] then FULL=1 echo -n ... reducing resolution to 1/2 of the original else mplayer -quiet -"$HARD"framedrop -noslices "$NAME" exit 0 fi else if [ $WIDTH -lt 800 ] then if [ $BITRATE -gt 65000 ] then FULL=1 echo -n ... reducing resolution to 1/2 of the original else FULL=2 echo -n ... reducing resolution to 1/4 of the original fi else if [ $WIDTH -gt `expr 4 \\* $MAX_WIDTH` -o $BITRATE -gt 3000000 ] then FULL=3 echo -n ... reducing resolution to 1/8 of the original elif [ $WIDTH -gt `expr 2 \\* $MAX_WIDTH` -o $BITRATE -gt 1024000 ] then FULL=2 echo -n ... reducing resolution to 1/4 of the original elif [ $WIDTH -gt $MAX_WIDTH -o $BITRATE -gt 650000 ] then FULL=1 echo -n ... reducing resolution to 1/2 of the original else FULL=0 FAST="" echo ... playing file with original resolution fi fi fi mplayer -quiet -noslices -"$HARD"framedrop -lavdopts "$FAST"lowres="$FULL" "$NAME"Last edited by iliaden; 2008-06-14 at 11:00.