Homebrew Re-encode video to meet WiiMC or Mplayer CE capabilities

icyrainz

Well-Known Member
OP
Newcomer
Joined
Jan 6, 2010
Messages
89
Trophies
0
XP
38
Country
United States
Hi,

I have some great videos that I really want it to work on WiiMC or Mplayer CE but when opening, the framerate is choppy and sluggish or even not playable. I would be patient enough to re-encode them to another codec or bitrate to fit the capabilities of WiiMC or Mplayer CE but I don't really know which bit rate or codec to choose. Any advise woule be grateful !
yaywii.gif
 

icyrainz

Well-Known Member
OP
Newcomer
Joined
Jan 6, 2010
Messages
89
Trophies
0
XP
38
Country
United States
Thanks ! Some of them are in mkv format
frown.gif
. So the resolution should be 640x480 ? no more higher ?
 

Tantric

Well-Known Member
Member
Joined
Feb 8, 2007
Messages
249
Trophies
1
XP
876
Country
Canada
You may be able to play something over 640x480, but it's not going to look any better. So yes, if you're re-encoding don't go over 640x480.
 

boondoklife

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
187
Trophies
0
Location
Jah's Pocket
Website
boondoklife.blogspot.com
XP
120
Country
United States
Not sure if any of ya use Linux but here is script I wrote to convert my videos.
It is a nautilus script so just right click the files you want to convert and run with it.

#!/bin/bash
#
#
# Requires: zenity, mencoder, dvdauthor, awk, dvd+rw-mediainfo, growisofs
#
#
IFS=$'\n'
TEMP_DIR='converted'

if [ "$1" == "" ]; then
zenity --error --text="No files were specified"
exit
fi

zenity --question --text='Are the files intelaced?' --cancel-label='Yes' --ok-label='No'
if [ $? -eq 1 ]; then
DEINTERLACE=1
fi

for FILE in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
do
FOLDER="${FILE%/*}"'/'
FFILE="${FILE##*/}"

mkdir "$FOLDER$TEMP_DIR"

#zenity --info --text='nice -n 19 mencoder '"$OPTION_DEINTERLACE"' '"$FILE"' -ovc x264 -x264encopts pass=1:turbo=1:nr=500:Psnr -oac mp3lame -lameopts cbr:br=128 -ofps 30000/1001 -o /dev/null'

if [ $DEINTERLACE -eq 1 ]; then
nice -n 19 mencoder "$FILE" -ovc x264 -x264encopts pass=1:turbo=1:nr=500:Psnr -vf pp=md -oac mp3lame -lameopts cbr:br=128 -ofps 30000/1001 -o /dev/null 2>&1 | awk -vRS="\r" '$1 ~ /Pos/ {gsub(/Pos:/," ");gsub(/%\)/," ");gsub(/ \(/," ");print $3"\n#Position :\\t"$1"\\nFrame :\\t"$2"\\nPercentage :\\t"$3"%\\nFrame Rate :\\t"$4"\\nTime Remaining :\\t"$6; fflush();}' | nice -n 19 zenity --progress --auto-kill --auto-close --title="Converting ${FILE##*/} (Pass 1 of 2)" --width=450

nice -n 19 mencoder "$FILE" -ovc x264 -x264encopts pass=2:nr=500:Psnr:bitrate=900 -vf pp=md -oac mp3lame -lameopts cbr:br=128 -ofps 30000/1001 -o "$foLDER$TEMP_DIR/${FFILE%.*}.avi" 2>&1 | awk -vRS="\r" '$1 ~ /Pos/ {gsub(/Pos:/," ");gsub(/%\)/," ");gsub(/ \(/," ");print $3"\n#Position :\\t"$1"\\nFrame :\\t"$2"\\nPercentage :\\t"$3"%\\nFrame Rate :\\t"$4"\\nTime Remaining :\\t"$6; fflush();}' | nice -n 19 zenity --progress --auto-kill --auto-close --title="Converting ${FFILE} (Pass 2 of 2)" --width=450
else
nice -n 19 mencoder "$FILE" -ovc x264 -x264encopts pass=1:turbo=1:nr=500:Psnr -oac mp3lame -lameopts cbr:br=128 -ofps 30000/1001 -o /dev/null 2>&1 | awk -vRS="\r" '$1 ~ /Pos/ {gsub(/Pos:/," ");gsub(/%\)/," ");gsub(/ \(/," ");print $3"\n#Position :\\t"$1"\\nFrame :\\t"$2"\\nPercentage :\\t"$3"%\\nFrame Rate :\\t"$4"\\nTime Remaining :\\t"$6; fflush();}' | nice -n 19 zenity --progress --auto-kill --auto-close --title="Converting ${FILE##*/} (Pass 1 of 2)" --width=450

nice -n 19 mencoder "$FILE" -ovc x264 -x264encopts pass=2:nr=500:Psnr:bitrate=900 -oac mp3lame -lameopts cbr:br=128 -ofps 30000/1001 -o "$foLDER$TEMP_DIR/${FFILE%.*}.avi" 2>&1 | awk -vRS="\r" '$1 ~ /Pos/ {gsub(/Pos:/," ");gsub(/%\)/," ");gsub(/ \(/," ");print $3"\n#Position :\\t"$1"\\nFrame :\\t"$2"\\nPercentage :\\t"$3"%\\nFrame Rate :\\t"$4"\\nTime Remaining :\\t"$6; fflush();}' | nice -n 19 zenity --progress --auto-kill --auto-close --title="Converting ${FFILE} (Pass 2 of 2)" --width=450
fi

rm divx2pass.log divx2pass.log.mbtree
done
 

icyrainz

Well-Known Member
OP
Newcomer
Joined
Jan 6, 2010
Messages
89
Trophies
0
XP
38
Country
United States
Wow, that is very nice of you. I tried to find a good converter in Ubuntu but haven't found any that is as good as AVS Video Converter in Windows. Thanks pretty much !
 

boondoklife

Well-Known Member
Member
Joined
Sep 12, 2009
Messages
187
Trophies
0
Location
Jah's Pocket
Website
boondoklife.blogspot.com
XP
120
Country
United States
icyrainz said:
Wow, that is very nice of you. I tried to find a good converter in Ubuntu but haven't found any that is as good as AVS Video Converter in Windows. Thanks pretty much !

Yea, I havent used windows in a looooooong time, but the software I used was virtual dub. I have wrote a few scripts like that to make life easier.

mp3 Normalizer
#!/bin/bash
#
#
# Requires: zenity, mp3gain
#
#

TEMP_DIR='/tmp'

cd "$@"

#zenity --info --text="$@"
#zenity --info --text="`pwd`"


if [ "$1" == "" ]; then
zenity --error --text="No files were specified"
exit
fi

FIND=`find . -name *.mp3 -type f`

IFS=$'\n'

for FILE in $FIND
do
#zenity --info --text="$FILE"
mp3gain -r -k $FILE

done
zenity --info --title='MP3 Normalization' text='Done!'

DVD Author, converts a video into dvd format and then burns it
#!/bin/bash
#
#
# Requires: zenity, mencoder, dvdauthor, awk, dvd+rw-mediainfo, growisofs
#
#
IFS=$'\n'
TEMP_DIR='/tmp'

#zenity --info --text="$@"
#zenity --info --text=`pwd`

if [ "$1" == "" ]; then
zenity --error --text="No files were specified"
exit
fi

for FILE in $@
do
MPEG="${FILE##*/}"
MPEG="$TEMP_DIR"'/'"${MPEG%.*}.mpg"
#zenity --info --text="$MPEG"

nice -n 19 mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd -vf scale=720:480,harddup -srate 48000 -af lavcresample=48000 -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:asp
ct=16/9:acodec=ac3:abitrate=192 -ofps 30000/1001 -o "$MPEG" "$FILE" 2>&1 | awk -vRS="\r" '$1 ~ /Pos/ {gsub(/Pos:/," ");gsub(/%\)/," ");gsub(/ \(/," ");print $3"\n#Position :\\t"$1"\\nFrame :\\t"$2"\\nPercentage :\\t"$3"%\\nFrame Rate :\\t"$4"\\nTime Remaining :\\t"$6; fflush();}' | nice -n 19 zenity --progress --auto-kill --auto-close --title="Converting ${FILE##*/}" --width=450


#Create an xml file for dvdauthor
echo '








' > "$TEMP_DIR"'/dvdauthor.xml'



#Create dvd file structure
nice -n 19 dvdauthor -x "$TEMP_DIR"'/dvdauthor.xml' 2>&1 | nice -n 19 awk '{ print $1; fflush() }'| nice -n 19 zenity --progress --pulsate --auto-close --text="Creating dvd file structure" --title="Creating ${FILE##*/}" --width=450

ANOTHER_DISC=1

while [ $ANOTHER_DISC -eq 1 ]
do

ANOTHER_DISC=0

#Get DVD Location
dvd+rw-mediainfo /dev/dvd
if [ $? -eq 0 ]
then
dev=/dev/dvd
else
dev=/dev/dvd1
fi

DISC_CHECK=$(dvd+rw-mediainfo /dev/dvd | grep -o 'no media mounted')
if [ "$DISC_CHECK" = 'no media mounted' ]
then
DISC_CHECK=0
else
DISC_CHECK=$(dvd+rw-mediainfo /dev/dvd | grep -o ' Disc status: blank')
if [ "$DISC_CHECK" = ' Disc status: blank' ]
then
DISC_CHECK=1
else
DISC_CHECK=0
fi

fi

while [ $DISC_CHECK -eq 0 ]
do

eject "$dev"
zenity --info --title="Ready to burn DVD" --text="Please make sure there is a blank DVD in the drive."

DISC_CHECK=$(dvd+rw-mediainfo /dev/dvd | grep -o 'no media mounted')
if [ "$DISC_CHECK" = 'no media mounted' ]
then
DISC_CHECK=0
else
DISC_CHECK=$(dvd+rw-mediainfo /dev/dvd | grep -o ' Disc status: blank')
if [ "$DISC_CHECK" = ' Disc status: blank' ]
then
DISC_CHECK=1
else
DISC_CHECK=0
fi
fi

done

#Burn DVD
growisofs -dvd-compat -Z "$dev" -dvd-video "$TEMP_DIR"'/DVD' 2>&1 | awk '{ print $1; fflush() }' | zenity --progress --auto-close --text "Burning DVD" --title="Burning ${FILE##*/}" --width=450
eject "$dev"
zenity --question --text="Do you want to burn another copy of ${FILE##*/}" --ok-label="Yes" --cancel-label="No" --title="Burning ${FILE##*/}" --width=450
if [ $? == 0 ]; then
ANOTHER_DISC=1
fi
done

#cleanup
rm "$TEMP_DIR"'/dvdauthor.xml' & rm "$MPEG" & rm -r "$TEMP_DIR"'/DVD'
done

TV Episode renamer (uses imdb to rename tv episodes)
The episodes name must be in this format (Episode.avi), where Episode is the episode number
#!/bin/bash
#
#
# Requires: wget, zenity, cat, grep, sed,
#
#

IFS=$'\n'
SHOW_NAME=""
SEASON=""

#zenity --info --text="$NAUTILUS_SCRIPT_SELECTED_URIS"
#zenity --info --text=`pwd`

if [ "$NAUTILUS_SCRIPT_SELECTED_URIS" == "" ]; then
zenity --error --text="No files were specified"
exit
fi

while [ "$SHOW_NAME" == "" ]
do
SHOW_NAME=$(zenity --entry --text="What is the name of the show" --entry-text="Show Name")
done

while [ "$SEASON" == "" -o "$(echo $SEASON | tr -d [:digit:])" != "" ]
do
SEASON=$(zenity --entry --text="What season is this,\nplease enter only a numeric value" --entry-text="1")
done

WGET_AGENT='Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040613 Firefox/0.8.0+'
IMDB_FIND='http://www.google.com/search?hl=en&source=hp&btnI=I%27m+Feeling+Lucky&q=site%3Aimdb.com+'

wget "${IMDB_FIND}${SHOW_NAME// /+}" -O /tmp/imdb_tv_get -U "$WGET_AGENT"

#firefox "${IMDB_FIND}${SHOW_NAME// /+}"

FULL_EPISODES_LINK=$(cat /tmp/imdb_tv_get | grep -ihoe 'rg/video/episodelist/title/[0-9a-zA-z].*/episodes')

wget "http://www.imdb.com/$FULL_EPISODES_LINK" -O /tmp/imdb_tv_get -U "$WGET_AGENT"

echo "http://www.imdb.com/$FULL_EPISODES_LINK"

cat /tmp/imdb_tv_get | grep -ihoe 'Season [0-9].*\, Episode [0-9].*' > /tmp/imdb_filtered

sed -i 's///g' /tmp/imdb_filtered
sed -i 's///g' /tmp/imdb_filtered
sed -i "s/\&\#x27\;//g" /tmp/imdb_filtered
sed -i "s/\&\#x26\;/\&/g" /tmp/imdb_filtered
sed -i "s/\&\#x2C\;/\,/g" /tmp/imdb_filtered

for FILE in $NAUTILUS_SCRIPT_SELECTED_URIS
do

SMB_CHECK=$(expr match "$FILE" 'smb://')
if [ $SMB_CHECK -gt 0 ]
then
TEMP_FILE=${FILE#smb://}
SERVER=${TEMP_FILE%%/*}
SHARE=${TEMP_FILE#$SERVER/}
SHARE=${SHARE%%/*}
FOLDER=${TEMP_FILE#$SERVER/}
FOLDER=${FOLDER#$SHARE/}
FOLDER=${FOLDER%/*}
FFILE=${TEMP_FILE##*/}
if [ "$FFILE" == "$FOLDER" ]
then
PWD='/home/boondoklife/.gvfs/'"$SHARE"' on '"$SERVER"'/'
else
PWD='/home/boondoklife/.gvfs/'"$SHARE"' on '"$SERVER"'/'"$FOLDER"'/'
fi
FILE="$FFILE"
fi

FILE_CHECK=$(expr match "$FILE" 'file://')
if [ $FILE_CHECK -gt 0 ]
then
PWD=${FILE#file://}
PWD=${PWD%/*}'/'
FILE=${FILE##*/}
fi

PWD=${PWD//%20/ }

EPISODE_NUM=${FILE#0}
EPISODE_NUM=${EPISODE_NUM%.avi}
NAME_STRING=`cat /tmp/imdb_filtered | grep -i "$SEASON, episode $EPISODE_NUM:"`
NAME=$(echo $NAME_STRING | sed 's/season [0-9]*\,//i' | sed 's/episode//i' | sed 's/: / - /' | sed 's/^[ \t]*//g' | sed 's/?//g')
if [ $EPISODE_NUM -lt 10 ]
then
NAME='0'"$NAME"
fi
if [ "$NAME" != "" ]; then
#zenity --info --text="mv '$PWD$FILE' '$PWD$NAME.avi'"
zenity --question --text="Rename episode \"$EPISODE_NUM\" to \"$NAME\"?" --ok-label="Yes" --cancel-label="No"
if [ $? == 0 ]; then
mv "$PWD$FILE" "$PWD$NAME.avi"

fi
else
zenity --info --text="There is currently is not a title for episode $FILE"
fi
done
 

MFDC12

Well-Known Member
Member
Joined
Oct 12, 2007
Messages
820
Trophies
1
Age
32
XP
911
Country
United States
mousex said:
A little question: Who puts DivX video into .mkv containers and who does use DivX at all? Don't they have their own .divx container? Is it better than Xvid or h264?

for standard definition sources xvid will look better for live action, h264 will look better for cartoons usually (im not saying that xvid wont either, but from my experience h264 looks smoother, and can have great quality for them at half the size. needless to say i always use xvid anyways). almost any standard definition content will look fine with xvid if you 2pass it, and assume you ARE NOT re-encoding (re-encoding will ALWAYS have less quality, no matter what people say. you are converting lossy to lossy, which will always result in quality loss.). higher res/def videos imo is where xvid starts to fail.

that doesnt really answer your question though. just saying some things ive noticed with my messes with codecs/encoding over six years.

divx was the source of xvid, so in "essence" we still use divx
tongue.gif
.
but honestly, xvid > divx.
 

raulpica

With your drill, thrust to the sky!
Former Staff
Joined
Oct 23, 2007
Messages
11,056
Trophies
0
Location
PowerLevel: 9001
XP
5,716
Country
Italy
mousex said:
Try 720p MKVs with H264/x264 and you'll see why I recommended 640x480.
You can't really watch them. That's why I recommended 640x480 (or 640x360 for 16:9). You won't get any better picture with higher resolutions on the Wii. My old Xbox also plays self encoded 720p content in Xvid but it has component cable with 720p and 1080i modes so you see the difference, the Wii has not.
Yeah, tried that
tongue.gif
I was just hinting that it's worth a shot trying a file before sitting down on your computer encoding things all over for hours
wink.gif


I know, in fact, I use my PC for HD movies, usually (I'm a 1080p freak, myself
blush.gif
)

QUOTE(mousex @ May 26 2010, 05:43 PM) A little question: Who puts DivX video into .mkv containers and who does use DivX at all? Don't they have their own .divx container? Is it better than Xvid or h264?
Dunno, some anime group thought it was a good thing to do
unsure.gif
And I haven't seen a single .divx container in my entire life
tongue.gif

As MFDC12 stated, xvid's a lot better than DivX. But h264 is actually better for HD vids
smile.gif
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/vKQN3UiNNHY?si=fP6ZlFe-DhQf9SW7