VLC media player 1.1.5

I have compiled the latest VLC multimedia player, version 1.1.5, for Wary 5.0. Yep, this guy plays all the formats, including WebM.

VLC with Qt4 GUI
The full VLC package with GUI needs the Qt4 package (17MB):
http://distro.ibiblio.org/pub/linux/distributions/quirky/pet_packages-wary5/qt4-4.5.3-w5.pet

There is another dependency (35KB):
http://distro.ibiblio.org/pub/linux/distributions/quirky/pet_packages-wary5/xcb-util-0.3.4-w5.pet

After installing the above two dependencies, here is the full VLC package (2.9MB):
http://distro.ibiblio.org/pub/linux/distributions/quirky/pet_packages-wary5/vlc-1.1.5-w5.pet

VLC no-GUI
I have also created a no-GUI PET, that is intended to be used with the 'vlc-gtk' GUI created by sc0ttman. This does not of course need Qt4, but it does need the xcb-util package.

After installing xcb-util, install vlc_nogui (1.7MB):
http://distro.ibiblio.org/pub/linux/distributions/quirky/pet_packages-wary5/vlc_nogui-1.1.5-w5.pet

vlc-gtk
Sc0ttman's latest is version 2.2, to be found here (55KB):
http://murga-linux.com/puppy/viewtopic.php?t=54753

This is a very small GUI frontend using gtkdialog. It seems to be designed for older versions of VLC, and I had to hack the /usr/bin/vlc-gtk script a bit to get it to work (see 'BK'):

#!/bin/sh 

#110108 BK: mods to work in wary 5.0, vlc 1.1.5.

# enable joypad rom browsing
[ -e `which rejoystickcc` ] && /usr/bin/rejoystickcc --load --profile vlc

# make gtkdialog work if not found (requires gtkdialog3)
[ ! -e gtkdialog ] && ln -sv /usr/sbin/gtkdialog3 /usr/sbin/gtkdialog

## CONFIG

#make some shortcuts. Most for easy typing, but also for flexibility
export WORKDIR=$HOME/.vlc-gtk/tmp
export CONFIG=$HOME/.vlc-gtk/vlc-gtkrc
export FAVES=$HOME/.vlc-gtk/vlc-gtk-faves
# set the default gui vars and actions
export VERSION='2.2'
export FAVE_ITEMS=''
export TAB="0"
export PLAYNOW=false
export vlcgtkwid=''
vlcgtkwid=`xdotool search --name "vlc-gtk"` # create the xdotool window id for vlc-gtk, enables restore ater playback

#check if config exists
if [ ! -f "$CONFIG" ]; then #no config - set default values
mkdir -p $WORKDIR 2> /dev/null
# gui options
FILE="Choose a file"
DIR="Choose a dir"
PLAYLIST_DIR="Choose a dir"
STREAM="http://"
SAVE_STREAM=false
# general options
SHUFFLE=false
LOOP=false
PLAY_STOP="false"
# video options
FULL=true
OVERLAY=true
CROP="None"
ASPECT="Default"
VOUT="Default"
ON_TOP=false
# subtitle options
AUTO_SUBS=true
NO_AUTO_SUBS=false
SUBS="Choose a subtitles file [optional]"
SUBS_DELAY="0"
# audio options
AUDIO=true
DOLBY="Auto"
VOL="3"
# osd options
OSD=true
OSD_FONT="Choose a truetype font file [optional]"
OSD_FONT_SIZE="Default"
OSD_POS="Top-Right"
OSD_FX="Default"
else
. $CONFIG #read config file
fi

## COMMAND LINE

# overwrite config file here, with any command line options given
while [ "$#" != "0" ]; do # get all options ($# means all options)
I=1
while [ $I -le `echo $# | wc -c` ]; do
case $1 in
# files
--open) FILE="$2";;
--dir) DIR="$2";;
--url) STREAM="$2";;
--fave) SAVE_STREAM="true";;
--play) PLAYNOW="true";;
# subs
--subs) SUBS="$2"; AUTO_SUBS=false; NO_AUTO_SUBS=true;;
--subs-delay) SUBS_DELAY="$2";;
# playback
--random) SHUFFLE="true";;
--loop) LOOP="true";;
--play-stop) PLAY_STOP="true";;
# video
--on-top) ON_TOP="true";;
--fullscreen) FULL="true";;
--no-overlay) OVERLAY="false";;
--aspect) ASPECT="$2";;
--crop) CROP="$2";;
--vout) VOUT="$2";;
--window) FULL="false";;
# osd
--no-osd) OSD="false";;
--osd-size) OSD_FONT_SIZE="$2";;
# audio
--audio) AUDIO="true";;
--vol) VOL="$2";;
--dolby) DOLBY="$2";;
--mute) AUDIO="false";;
# other
--tab) TAB="$2";;
--debug) DEBUG="yes";;
--version)echo "vlc-gtk version $VERSION"; exit;;
--help)
echo '
Usage: vlc-gtk [OPTION]

Options:

--open "file" Set a file to play
--play Start file playback immediately
--dir "dir" Set a directory to play
--url "url" Choose the URL/stream to play
--fave Save stream to favourites
--subs "file" Choose the subtitles file to load
--subs-delay <integer> The number of milliseconds to delay (disabled for now)
--random Shuffle files during playback
--loop Loop through all files repeatedly
--play-stop Stop playback after each file completes
--audio Enable audio playback
--vol <integer> Set the volume level (0...1024)
--dolby <integer> Enable dolby surround (0=AUTO,1=ON,2=OFF)
--mute Disable audio playback
--fullscreen Load the video file in fullscreen
--no-overlay Disable overlay video output
--on-top Show the video window above all other apps
--crop <string> Crop video image (16:10, 16:9, 1:1, 221:100, 4:3, 5:4)
--aspect <string> Set the video aspect ratio (16:10, 16:9, 1:1, 221:100, 4:3, 5:4)
--vout Video output (xvideo,x11,SDL)
--window Load the video file in window
--no-osd Disable the on screen display
--osd-size <string> OSD font size (Default, Smaller, Small, Large, Larger)
--tab Choose the tab to show at startup (0,1,2,3)
--debug View all commands sent to vlc in a popup window
--version Show the version number of this app
--help Show this help message

Examples:

vlc-gtk --open "/film.avi" --subs "/subs.srt" --fullscreen --play
vlc-gtk --fullscreen --dir "/root/tv-series/" --random
'; exit;;
esac
shift
I=$[$I+1]
done
done

## FUNCTIONS

set -a #export all functions

# get the DVD device
get_dvd () {
DVD_DEV="sr0"
if [ -f "/etc/dvddevice" ];then
while read line
do
DVD_DEV=$line
done </etc/dvddevice
fi
# set a default, if a value was not returned
if [ ! -z "$DVD_DEV" ];then
DVD_DEV="sr0"
fi
echo "The DVD device being used is /dev/$DVD_DEV"
}

# get the CD device
get_cd () {
CD_DEV="sr0"
if [ -f "/etc/cdromdevice" ];then
while read line
do
CD_DEV=$line
done </etc/cdromdevice
fi
# set a default, if a value was not returned
if [ ! -z "$CD_DEV" ];then
CD_DEV="sr0"
fi
echo "The CD device being used is /dev/$CD_DEV"
}

write_config () {
#write all variable values to config file
echo '#vlc-gtk config file' > $CONFIG
# gui options
echo '#gui options' >> $CONFIG
echo FILE="\"$FILE\"" >> $CONFIG
echo DIR="\"$DIR\"" >> $CONFIG
echo PLAYLIST_DIR="\"$PLAYLIST_DIR\"" >> $CONFIG
echo STREAM="\"$STREAM\"" >> $CONFIG
echo SAVE_STREAM=$SAVE_STREAM >> $CONFIG
# general options
echo '#general options' >> $CONFIG
echo SHUFFLE=$SHUFFLE >> $CONFIG
echo LOOP=$LOOP >> $CONFIG
echo PLAY_STOP=$PLAY_STOP >> $CONFIG
# video options
echo '#video options' >> $CONFIG
echo FULL=$FULL >> $CONFIG
echo CROP=$CROP >> $CONFIG
echo ASPECT=$ASPECT >> $CONFIG
echo VOUT=$VOUT >> $CONFIG
echo OVERLAY=$OVERLAY >> $CONFIG
echo ON_TOP=$ON_TOP >> $CONFIG
# subtitle settings
echo '#subtitle options' >> $CONFIG
echo NO_AUTO_SUBS=$NO_AUTO_SUBS >> $CONFIG
echo AUTO_SUBS=$AUTO_SUBS >> $CONFIG
echo SUBS="\"$SUBS\"" >> $CONFIG
echo SUBS_DELAY=$SUBS_DELAY >> $CONFIG
# audio setings
echo '#audio options' >> $CONFIG
echo AUDIO=$AUDIO >> $CONFIG
echo DOLBY=$DOLBY >> $CONFIG
echo VOL=$VOL >> $CONFIG
# osd settings
echo '#OSD options' >> $CONFIG
echo OSD=$OSD >> $CONFIG
echo OSD_FONT="\"$OSD_FONT\"" >> $CONFIG
echo OSD_FONT_SIZE=$OSD_FONT_SIZE >> $CONFIG
echo OSD_POS=$OSD_POS >> $CONFIG
echo OSD_FX=$OSD_FX >> $CONFIG
}

write_fave () {
#write all variable values to config file
if [ "$STREAM" != "http://" ];then
echo "\"$STREAM\"" >> $FAVES
echo "favourite $STREAM added to $HOME/.vlc-gtk/$FAVES"
fi
}

delete_fave () {
sed -i "\|$FAVE_LIST| d" $FAVES # remove the line matching the current fave in the list
Xdialog --center --msgbox "Favourite deleted" 5 30
}

write_playlist () {
# create the file
rm "$PLAYLIST_DIR/$PLAYLIST"
if [ "$AUDIOPL" = false ];then
# add all video files
find "$DIR" -iname "*.asf" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.avi" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.divx" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.flv" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.mov" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.mp4" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.mpg" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.mpeg" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.vob" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.wmv" -print >> "$PLAYLIST_DIR/$PLAYLIST"
echo "video playlist created"
fi
if [ "$VIDEOPL" = false ];then
# add all audio files
find "$DIR" -iname "*.mp3" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.ogg" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.wma" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.m4a" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.flac" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.mp2" -print >> "$PLAYLIST_DIR/$PLAYLIST"
find "$DIR" -iname "*.wav" -print >> "$PLAYLIST_DIR/$PLAYLIST"
echo "audio playlist created"
fi
}

save_playlist () {
# if the dir being used to make a playlist exists
if [ -d "$PLAYLIST_DIR" ];then
if [ -d "$DIR" ];then
# write files to the playlist (found at $PLAYLIST_DIR/$PLAYLIST)
write_playlist
# if the playlist file created above exists
if [ -f "$PLAYLIST_DIR/$PLAYLIST" ];then
# count files added to playlist
PL_TOTAL=`grep -cve '^\s*$' "$PLAYLIST_DIR/$PLAYLIST"`
# if total is more than zero
if [ "$PL_TOTAL" -gt 0 ];then
# ask user to play immediately or not
Xdialog --center --yesno "Playlist created - $PL_TOTAL items added. Play now?" 5 55
# yes the answer (aka exit code)
EXIT_CODE=$?;
# if the answer was yes (yes=0)
if [ "$EXIT_CODE" = "0" ];then
# kill vlc, save settings, then reload vlc with new playlist
killall vlc; execute; $CL vlc $C "$PLAYLIST_DIR/$PLAYLIST" &
vlc-gtk-btns &
# reset exit code
EXIT_CODE="done"
fi
else # if playlist is empty, tell the user
Xdialog --center --msgbox "Playlist is empty, not saved." 5 35
rm "$PLAYLIST_DIR/$PLAYLIST"
fi
else # if playlist file does not exist
Xdialog --center --msgbox "Playlist file not found" 5 30
fi
else # a directory does not exist
Xdialog --center --msgbox "Playback directory not found" 5 35
fi
else # playlist cant be saved, dir $PLAYLIST_DIR does not exist
Xdialog --center --msgbox "Playlist directory not found" 5 35
fi
}

# this function is executed when the user click the 'Play file' button
play_file () {
if [ -e "$FILE" ];then # if the file exists
XPID=''
killall vlc # kill vlc
#Xdialog --center --msgbox "${CL} vlc ${C} ${FILE}" 0 0 #BK TEST
execute
$CL vlc $C "$FILE" & # run vlc
vlc-gtk-btns &
else # if file does not exist
Xdialog --center --msgbox "File does not exist" 5 30
fi
}

play_dir () {
if [ -e "$DIR" ];then
XPID=''
killall vlc # kill old vlc windows
execute # save settings before playback
$CL vlc $C "$DIR" & # run vlc
vlc-gtk-btns &
else # dir does not exist
Xdialog --center --msgbox "Playback directory not found" 5 35
fi
}

play_url () {
if [ "$STREAM" != "http://" ]; then
XPID=''
killall vlc
execute
$CL vlc $C "$STREAM" &
vlc-gtk-btns &
else
Xdialog --center --msgbox "Please choose a URL" 5 30
fi
}

play_fave () {
if [ "$FAVE_LIST" != "" ]; then
XPID=''
killall vlc
execute
$CL vlc $C "$FAVE_LIST" &
vlc-gtk-btns &
fi
}

execute (){ #this function is key - save the new settings to the config file, and builds the command needed for vlc
export GTK2_RC_FILES="$HOME/.gtkrc-2.0" #reset gtk-theme
write_config #keep settings for next startup

# set the saved settings - append $C, which contains all options saved
# $C is added to all vlc commands, so these options are global

# reset the command
C="-I dummy" #BK

## general options

# set random playback
if [ "$SHUFFLE" = true ];then
C="$C --random"
else
C="$C"
fi

# set looped playback
if [ "$LOOP" = true ];then
C="$C --loop"
else
C="$C"
fi

# set play and stop
if [ "$PLAY_STOP" = true ];then
C="$C --play-and-stop"
else
C="$C"
fi

## video options

# set fullscreen
if [ "$FULL" = true ];then
C="-I dummy --fullscreen" #BK
else
C="-I dummy" #BK
fi

# set cropped image
if [ "$CROP" = "16:10" ];then
C="$C --crop 16:10"
elif [ "$CROP" = "16:9" ];then
C="$C --crop 16:9"
elif [ "$CROP" = "1:1" ];then
C="$C --crop 1:1"
elif [ "$CROP" = "221:100" ];then
C="$C --crop 221:100"
elif [ "$CROP" = "4:3" ];then
C="$C --crop 4:3"
elif [ "$CROP" = "5:4" ];then
C="$C --crop 5:4"
elif [ "$CROP" = "Auto" ];then
C="$C --auto-crop"
else
C="$C"
fi

# set aspect ratio
if [ "$ASPECT" = "16:10" ];then
C="$C --aspect-ratio 16:10"
elif [ "$ASPECT" = "16:9" ];then
C="$C --aspect-ratio 16:9"
elif [ "$ASPECT" = "1:1" ];then
C="$C --aspect-ratio 1:1"
elif [ "$ASPECT" = "221:100" ];then
C="$C --aspect-ratio 221:100"
elif [ "$ASPECT" = "4:3" ];then
C="$C --aspect-ratio 4:3"
elif [ "$ASPECT" = "5:4" ];then
C="$C --aspect-ratio 5:4"
else
C="$C"
fi

# set video output module
if [ "$VOUT" = "X11" ];then
C="$C --vout x11"
elif [ "$VOUT" = "SDL" ];then
C="$C --vout sdl"
elif [ "$VOUT" = "SVGAlib" ];then
C="$C --vout svgalib"
else
C="$C"
fi

# set always on top or not
if [ "$ON_TOP" = true ];then
C="$C --video-on-top"
else
C="$C --no-video-on-top"
fi

# set overlay or not
if [ "$OVERLAY" = true ];then
C="$C --overlay"
else
C="$C --no-overlay"
fi

## audio options

# set audio options
if [ "$AUDIO" = false ];then
C="$C --no-audio"
else
C="$C"
fi

# set dolby or not
if [ "$DOLBY" = "Auto" ];then
C="$C --force-dolby-surround Auto"
elif [ "$DOLBY" = "On" ];then
C="$C --force-dolby-surround On"
else
C="$C --force-dolby-surround Off"
fi

# set volume level, append the value given with two zeros
if [ "$VOL" = "Off" ];then
C="$C --vol 000"
elif [ "$VOL" != "3" ];then
C="$C --vol $VOL"00
else
C="$C"
fi

## subtitle options

# set AUTO subtitles
if [ "$AUTO_SUBS" = true ];then
C="$C --sub-autodetect-file"
else
C="$C --no-sub-autodetect-file"
fi

# set subtitles, if they exist
if [ -e "$SUBS" ] && [ "$AUTO_SUBS" = false ];then
# create a link without spaces
ln -s -f "$SUBS" "/tmp/vlc-subs.srt"
# add tmp sub file to command
C="$C --sub-file /tmp/vlc-subs.srt"
else
C="$C"
fi

# # set sub delay
# if [ "$SUBS_DELAY" != "0" ];then
# C="$C --???"
# else
# C="$C"
# fi

# set on screen display or not
if [ "$OSD" = false ];then
C="$C --no-osd"
else
C="$C"
fi

## osd options

# set on screen display font
if [ -e "$OSD_FONT" ];then
# create a link without spaces
ln -s -f "$OSD_FONT" "/tmp/vlc-font.ttf"
# add tmp sub file to command
C="$C --freetype-font /tmp/vlc-font.ttf"
else
C="$C"
fi

# set on screen display font
if [ "$OSD_FONT_SIZE" = "Tiny" ];then
C="$C --freetype-rel-fontsize 32"
elif [ "$OSD_FONT_SIZE" = "Smaller" ];then
C="$C --freetype-rel-fontsize 24"
elif [ "$OSD_FONT_SIZE" = "Small" ];then
C="$C --freetype-rel-fontsize 16"
elif [ "$OSD_FONT_SIZE" = "Normal" ];then
C="$C --freetype-rel-fontsize 12"
elif [ "$OSD_FONT_SIZE" = "Large" ];then
C="$C --freetype-rel-fontsize 10"
elif [ "$OSD_FONT_SIZE" = "Larger" ];then
C="$C --freetype-rel-fontsize 8"
elif [ "$OSD_FONT_SIZE" = "Huge" ];then
C="$C --freetype-rel-fontsize 6"
else
C="$C"
fi

# set on screen display position
if [ "$OSD_POS" = "Left" ];then
C="$C --osdmenu-position 1"
elif [ "$OSD_POS" = "Right" ];then
C="$C --osdmenu-position 2"
elif [ "$OSD_POS" = "Top" ];then
C="$C --osdmenu-position 4"
elif [ "$OSD_POS" = "Bottom" ];then
C="$C --osdmenu-position 8"
elif [ "$OSD_POS" = "Top-Left" ];then
C="$C --osdmenu-position 5"
elif [ "$OSD_POS" = "Top-Right" ];then
C="$C --osdmenu-position 6"
elif [ "$OSD_POS" = "Bottom-Left" ];then
C="$C --osdmenu-position 9"
elif [ "$OSD_POS" = "Bottom-Right" ];then
C="$C --osdmenu-position 10"
elif [ "$OSD_POS" = "Center" ];then
C="$C --osdmenu-position 0"
else
C="$C"
fi

# set on screen display effects
if [ "$OSD_FX" = "Background" ];then
C="$C --freetype-effect 1"
elif [ "$OSD_FX" = "Outline" ];then
C="$C --freetype-effect 2"
elif [ "$OSD_FX" = "Fat-Outline" ];then
C="$C --freetype-effect 3"
else
C="$C"
fi

}
## end of functions


## OTHER SETTINGS

## get the devices before GUI loads up
get_dvd
get_cd

## set debug or not
if [ "$DEBUG" = "yes" ];then
CL='xmessage'
else
#CL='rxvt -e'
CL='' #BK
fi

# run file before GUI if PLAYNOW = true
if [ "$PLAYNOW" = true ];then
play_file
fi

## BUILD GUI

# get all values stored in favourites, and put them into a combobox
while read line
do
FAVE_ITEMS=`echo "$FAVE_ITEMS<item>$line</item>"`
done <$FAVES

# CROP combobox
CROP_ARRAY=(None 16:10 16:9 1:1 221:100 4:3 5:4)
CROP_ITEMS="<item>$CROP</item>" #stored value should be first in list
for i in "${CROP_ARRAY[@]}"
do
if [ $i != "$CROP" ];then
CROP_ITEMS=`echo "$CROP_ITEMS<item>$i</item>"`
fi
done

# ASPECT combobox
ASPECT_ARRAY=(Default 16:10 16:9 1:1 221:100 4:3 5:4)
ASPECT_ITEMS="<item>$ASPECT</item>" #stored value should be first in list
for i in "${ASPECT_ARRAY[@]}"
do
if [ $i != "$ASPECT" ];then
ASPECT_ITEMS=`echo "$ASPECT_ITEMS<item>$i</item>"`
fi
done

# VIDEO OUT combobox
VOUT_ARRAY=(Default X11 SDL SVGAlib)
VOUT_ITEMS="<item>$VOUT</item>" #stored value should be first in list
for i in "${VOUT_ARRAY[@]}"
do
if [ $i != "$VOUT" ];then
VOUT_ITEMS=`echo "$VOUT_ITEMS<item>$i</item>"`
fi
done

# VOL combobox
VOL_ARRAY=(Off 1 2 3 4 5 6 7 8 9 10)
VOL_ITEMS="<item>$VOL</item>" #stored value should be first in list
for i in "${VOL_ARRAY[@]}"
do
if [ $i != "$VOL" ];then
VOL_ITEMS=`echo "$VOL_ITEMS<item>$i</item>"`
fi
done

# DOLBY combobox
DOLBY_ARRAY=(Auto On Off)
DOLBY_ITEMS="<item>$DOLBY</item>" #stored value should be first in list
for i in "${DOLBY_ARRAY[@]}"
do
if [ $i != "$DOLBY" ];then
DOLBY_ITEMS=`echo "$DOLBY_ITEMS<item>$i</item>"`
fi
done

# OSD_FONT_SIZE combobox
OSD_FONT_SIZE_ARRAY=("Default" "Tiny" "Smaller" "Small" "Normal" "Large" "Larger" "Huge")
OSD_FONT_SIZE_ITEMS="<item>$OSD_FONT_SIZE</item>" #stored value should be first in list
for i in "${OSD_FONT_SIZE_ARRAY[@]}"
do
if [ $i != "$OSD_FONT_SIZE" ];then
OSD_FONT_SIZE_ITEMS=`echo "$OSD_FONT_SIZE_ITEMS<item>$i</item>"`
fi
done

# OSD_FX combobox
OSD_FX_ARRAY=("Default" "Background" "Outline" "Fat-Outline")
OSD_FX_ITEMS="<item>$OSD_FX</item>" #stored value should be first in list
for i in "${OSD_FX_ARRAY[@]}"
do
if [ $i != "$OSD_FX" ];then
OSD_FX_ITEMS=`echo "$OSD_FX_ITEMS<item>$i</item>"`
fi
done

# OSD_POS combobox
OSD_POS_ARRAY=("Center" "Top" "Bottom" "Left" "Right" "Top-Left" "Top-Right" "Bottom-Left" "Bottom-Right")
OSD_POS_ITEMS="<item>$OSD_POS</item>" #stored value should be first in list
for i in "${OSD_POS_ARRAY[@]}"
do
if [ $i != "$OSD_POS" ];then
OSD_POS_ITEMS=`echo "$OSD_POS_ITEMS<item>$i</item>"`
fi
done

## end build gui items


# OUTPUT GUI

export VLCGTK='
<window title="vlc-gtk '$VERSION'" resizable="false">

<vbox>

<button visible="false" use-stock="true" label="gtk-open">
<action type="fileselect">FILE</action>
</button>

<hbox>
<text><label>VideoLAN Player</label></text>
</hbox>

<notebook labels="File/DVD/CD|Playlists|Streams|Controls" enable-popup="true" page="'$TAB'">

<frame>
<text><label>Choose a file or playlist</label></text>
<hbox>
<button relief="2" tooltip-text="Choose a file or playlist to play">
<input file icon="gtk-open"></input>
<action type="fileselect">FILE</action>
</button>
<entry>
<variable>FILE</variable>
<input>echo '$FILE'</input>
<action type="enable">enable:FILE_BTN</action>
</entry>
<button relief="1" tooltip-text="Play the selected file or playlist (.m3u)">
<label>Play file </label>
<input file stock="gtk-media-play"></input>
<action>play_file &</action>'
# add disabled if needed
[ ! -e "$FILE" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'
<variable>FILE_BTN</variable>
</button>
</hbox>

<vbox>
<text height-request="15"><label>""</label></text>
<text><label>Play disc from drive</label></text>
<text height-request="15"><label>""</label></text>
</vbox>
<hbox>
<button relief="1" width-request="135">
<label>Play DVD</label>
<input file stock="gtk-media-play"></input>
<action>killall vlc; get_dvd; execute; $CL vlc $C --dvd /dev/$DVD_DEV dvd:// &</action>
</button>
<button relief="1" width-request="135">
<label>Play VCD</label>
<input file stock="gtk-media-play"></input>
<action>killall vlc; get_cd; execute; $CL vlc $C --vcd /dev/$CD_DEV vcd:// &</action>
</button>
<button relief="1" width-request="135">
<label>Play Audio CD</label>
<input file stock="gtk-media-play"></input>
<action>if [ -e /usr/local/bin/pcd ];then pcd & else killall vlc; get_cd; execute; $CL vlc $C --cd-audio /dev/$CD_DEV cdda:// & fi</action>
</button>
<text width-request="30"><label>""</label></text>
</hbox>

</frame>

<frame>

<text><label>Choose a directory</label></text>
<hbox>
<button relief="2" tooltip-text="Choose a directory to play all files inside it">
<input file icon="gtk-open"></input>
<action type="fileselect">DIR</action>
</button>
<entry accept="directory">
<variable>DIR</variable>
<action type="enable">enable:PLAYLIST_BTN</action>
<action type="enable">enable:PLAYLIST_DIR_BTN</action>
<action type="enable">enable:PLAYLIST_DIR</action>
<input>echo '$DIR'</input>
</entry>
<button relief="1" tooltip-text="Play all files in this directory">'
# add disabled if needed
[ ! -d "$DIR" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<label>Play dir </label>
<input file stock="gtk-media-play"></input>
<action>play_dir &</action>
<variable>PLAYLIST_BTN</variable>
</button>
</hbox>

<vbox>
<text height-request="15"><label>""</label></text>
<text><label>Save as playlist:</label></text>
</vbox>
<hbox>
<button relief="2" tooltip-text="Choose the folder where you will save your playlist">
<variable>PLAYLIST_DIR_BTN</variable>
<input file icon="gtk-open"></input>
<action type="enable">enable:PLAYLIST_DIR</action>
<action type="fileselect">PLAYLIST_DIR</action>'
# add disabled if needed
[ ! -d "$DIR" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'
</button>
<entry accept="directory" tooltip-text="This is the folder where you will save your playlist">
<action type="enable">enable:PLAYLIST</action>
<variable>PLAYLIST_DIR</variable>'
# add disabled if needed
[ ! -d "$DIR" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<input>echo '$PLAYLIST_DIR'</input>
</entry>
<text><label>/</label></text>
<entry tooltip-text="This is the filename of your new playlist, m3u file extension is best">
<variable>PLAYLIST</variable>
<action type="enable">enable:SAVE_PLAYLIST</action>
<action type="enable">enable:AUDIOPL</action>
<action type="enable">enable:VIDEOPL</action>'
# add disabled if needed
[ ! -d "$DIR" ] || [ ! -d "$PLAYLIST_DIR" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<input>echo type filename</input>
</entry>
<button relief="2" tooltip-text="Click here to save the playlist. You can then play the playlist with the Play File button.">
<variable>SAVE_PLAYLIST</variable>
<input file stock="gtk-save"></input>
<action>save_playlist &</action>'
# add disabled if needed
[ ! -d "$DIR" ] || [ ! -d "$PLAYLIST_DIR" ] || [ ! "$PLAYLIST" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'</button>
</hbox>

<hbox>
<checkbox tooltip-text="Include ONLY audio files in the playlist">
<label>Audio only</label>
<variable>AUDIOPL</variable>'
# add disabled if needed
[ ! -d "$DIR" ] || [ ! -d "$PLAYLIST_DIR" ] || [ ! "$PLAYLIST" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<action>if true disable:VIDEOPL</action>
<action>if false enable:VIDEOPL</action>
<default>false</default>
</checkbox>
<checkbox tooltip-text=" Include ONLY video files in the playlist">
<label>Video only</label>
<variable>VIDEOPL</variable>'
# add disabled if needed
[ ! -d "$DIR" ] || [ ! -d "$PLAYLIST_DIR" ] || [ ! "$PLAYLIST" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<action>if true disable:AUDIOPL</action>
<action>if false enable:AUDIOPL</action>
<default>false</default>
</checkbox>
</hbox>
</frame>

<frame>

<text><label>Enter an online media stream:</label></text>
<hbox>
<text><label>URL: </label></text>
<entry>
<variable>STREAM</variable>
<input>echo '$STREAM'</input>
<action type="enable">enable:SAVE_STREAM</action>
<action type="enable">enable:STREAM_BTN</action>
</entry>
<button relief="1" tooltip-text="Play the chosen URL">
<variable>STREAM_BTN</variable>
<label>Play URL</label>
<input file stock="gtk-media-play"></input>
<action>play_url &</action>
<action>if [ $SAVE_STREAM = true ];then write_fave; fi &</action>'
# add disabled if needed
[ "$STREAM" = "http://" -o "$STREAM" = "" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'</button>
</hbox>
<hbox>
<checkbox tooltip-text="Save this stream as a favourite">
<label>Add to favourites (tick before playing)</label>
<variable>SAVE_STREAM</variable>'
# add disabled if needed
[ "$STREAM" = "http://" -o "$STREAM" = "" ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<default>"'$SAVE_STREAM'"</default>
</checkbox>
</hbox>

<vbox>
<text height-request=""><label>""</label></text>
<text><label>Manage Favourites: </label></text>
</vbox>
<hbox>
<combobox tooltip-text="Choose your favourite internet media stream." width-request="400">
<variable>FAVE_LIST</variable>
'$FAVE_ITEMS'
</combobox>
<button relief="2" tooltip-text="Play selected favourite now">
<input file stock="gtk-media-play"></input>
<action>play_fave &</action>
</button>
<button relief="2" tooltip-text="Delete selected favourite from the list">
<input file stock="gtk-delete"></input>
<action>if [ "$FAVE_LIST" != "" ]; then delete_fave; fi</action>
<action>vlc-gtk --tab 2 &</action>
<action type="exit">EXIT_NOW</action>
</button>
</hbox>
</frame>

<frame>

<hbox>
<edit indent="20" editable="false">
<variable>EDITOR</variable>
<width>350</width><height>150</height>
<default>" vlc-gtk '$VERSION' by sc0ttman
thanks to zigbert, trio, technosaurus and dejan555

Video Controls:

space Play/Pause
ctrl+left Skip backward (medium)
ctrl+right Skip forward (medium)
t Show Position
n Next Item
p Previous Item
s Stop

f / double-click Toggle Fullscreen
a Aspect Ratio
c Crop
k Toggle Subtitles

m Mute
ctrl+up Volume up
ctrl+down Volume down

+ Play faster
- Play Slower
shift+left Skip backward (small)
shift +right Skip forward (small)

ctrl+h Decrease audio delay -50ms
ctrl+j Increase audio delay +50ms
ctrl+k Decrease subtitle delay -50ms
ctrl+l Increase subtitle delay +50ms

ctrl+q Quit

Music Controls (type into VLC console)

pause Pause playback
next Play next item
prev Play previous item
stop Stop playback
volup Volume up
voldown Volume down
help More options

Type the following in the terminal for the GUI options:

vlc-gtk --help
"</default>
</edit>
</hbox>
</frame>
</notebook>

<notebook labels="General Settings|Audio|Video|Subtitles|OSD" enable-popup="true" page="4" tab-pos="2">

<frame>
<hbox>
<vbox>
<button relief="1" tooltip-text="Select your default DVD and CD device" width-request="100">
<label>Devices</label>
<input file stock="gtk-cdrom"></input>
<action>cdburner-wizard</action>
</button>
<button relief="1" tooltip-text="Eject your default CD or DVD device" width-request="100">
<label>Eject</label>
<input file stock="gtk-cdrom"></input>
<action>eject -T</action>
</button>
</vbox>
<vbox width-request="370">
<hbox>
<text><label>General playback settings:</label></text>
</hbox>
<text height-request="10"><label>""</label></text>
<hbox>
<checkbox tooltip-text="Randomise the order of playback">
<label>Shuffle</label>
<variable>SHUFFLE</variable>
<default>"'$SHUFFLE'"</default>
</checkbox>
<checkbox tooltip-text="Loop through all files repeatedly">
<label>Loop</label>
<variable>LOOP</variable>
<default>"'$LOOP'"</default>
</checkbox>
<checkbox tooltip-text="Stop playback after each file is done playing.">
<label>Play and Stop</label>
<variable>PLAY_STOP</variable>
<default>"'$PLAY_STOP'"</default>
</checkbox>
</hbox>
</vbox>
</hbox>
</frame>

<frame>
<vbox>
<hbox>
<checkbox tooltip-text="Enable audio during playback">
<label>Enable audio</label>
<variable>AUDIO</variable>
<default>"'$AUDIO'"</default>
<action>if true enable: VOL</action>
<action>if true enable: DOLBY</action>
<action>if false disable: VOL</action>
<action>if false disable: DOLBY</action>
</checkbox>
<text width-request="170"><label>""</label></text>
<text><label>Volume level:</label></text>
<combobox tooltip-text="Volume level. Change during playback with ctrl+up and ctrl+down." width-request="100">'
# add disabled if needed
[ "$AUDIO" = false ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<variable>VOL</variable>
'$VOL_ITEMS'
</combobox>
</hbox>
<hbox>
<text><label>Dolby Surround Sound:</label></text>
<combobox tooltip-text="Enable Dolby Surround Sound to be enabled during playback" width-request="100">'
# add disabled if needed
[ "$AUDIO" = false ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<variable>DOLBY</variable>
'$DOLBY_ITEMS'
</combobox>
</hbox>
</vbox>
</frame>

<frame>
<hbox>
<vbox>
<hbox>
<checkbox tooltip-text="Enable fullscreen display for videos">
<label>Fullscreen</label>
<variable>FULL</variable>
<default>"'$FULL'"</default>
</checkbox>
<checkbox tooltip-text="Show the video window in top of all other applications">
<label>On top</label>
<variable>ON_TOP</variable>
<default>"'$ON_TOP'"</default>
</checkbox>
<checkbox tooltip-text="Enable overlay video output during playback">
<label>Overlay</label>
<variable>OVERLAY</variable>
<default>"'$OVERLAY'"</default>
</checkbox>
<text><label>Output:</label></text>
<combobox tooltip-text="Choose which module is used to display video">
<variable>VOUT</variable>
'$VOUT_ITEMS'
</combobox>
</hbox>
<hbox>
<text><label>Crop:</label></text>
<combobox tooltip-text="Choose how the video image is cropped.">
<variable>CROP</variable>
'$CROP_ITEMS'
</combobox>
<text><label>Aspect:</label></text>
<combobox tooltip-text="Choose how the video image is stretched.">
<variable>ASPECT</variable>
'$ASPECT_ITEMS'
</combobox>
</hbox>
</vbox>
</hbox>
</frame>

<frame>
<vbox>
<hbox>
<radiobutton tooltip-text="Tick this box to try to find any available subtitles automatically">
<label>Auto detect</label>
<variable>AUTO_SUBS</variable>
<default>"'$AUTO_SUBS'"</default>
<action>if true disable: SUBS</action>
<action>if false enable: SUBS</action>
</radiobutton>
<radiobutton tooltip-text="Tick this box to try to use a chosen subtitles file">
<label>Use file</label>
<variable>NO_AUTO_SUBS</variable>
<default>"'$NO_AUTO_SUBS'"</default>
<action>if true enable: SUBS</action>
<action>if false disable: SUBS</action>
<action>if true enable: SUBS_BTN</action>
<action>if false disable: SUBS_BTN</action>
</radiobutton>
<text width-request="140"><label>""</label></text>
<text><label>Delay (ms)</label></text>
<entry width-request="80" tooltip-text="the number of milliseconds to delay the subtitles. Enter a negative number to make subtitles appear earlier.">
<input>echo '$SUBS_DELAY'</input>
<variable>SUBS_DELAY</variable>
<visible>disabled</visible>
</entry>
</hbox>
<hbox>
<text><label>Subtitle file:</label></text>
<entry tooltip-text="Choose a subtitles file">'
# add disabled if needed
[ "$AUTO_SUBS" = true ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<variable>SUBS</variable>
<input>echo '$SUBS'</input>
</entry>
<button relief="2" tooltip-text="Click here to choose a subtitle file">'
# add disabled if needed
[ "$AUTO_SUBS" = true ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<input file icon="gtk-open"></input>
<action type="fileselect">SUBS</action>
<variable>SUBS_BTN</variable>
</button>
</hbox>
</vbox>
</frame>

<frame>
<vbox>
<hbox>
<checkbox tooltip-text="Enable the on-screen display during video playback">
<label>Enabled</label>
<variable>OSD</variable>
<default>"'$OSD'"</default>
<action>if true enable: OSD_FONT</action>
<action>if true enable: OSD_FONT_BTN</action>
<action>if true enable: OSD_FONT_SIZE</action>
<action>if true enable: OSD_POS</action>
<action>if true enable: OSD_FX</action>
<action>if false disable: OSD_FONT</action>
<action>if false disable: OSD_FONT_BTN</action>
<action>if false disable: OSD_FONT_SIZE</action>
<action>if false disable: OSD_POS</action>
<action>if false disable: OSD_FX</action>
</checkbox>
<text width-request="5"><label>""</label></text>
<text><label>Font:</label></text>
<entry tooltip-text="Choose a truetype font file (.ttf)" width-request="165">
<variable>OSD_FONT</variable>
<input>echo '$OSD_FONT'</input>'
# add disabled if needed
[ "$OSD" = false ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'</entry>
<button relief="2" tooltip-text="Click here to choose a truetype font file for the OSD">
<variable>OSD_FONT_BTN</variable>
<input file icon="gtk-open"></input>
<action type="fileselect">OSD_FONT</action>'
# add disabled if needed
[ "$OSD" = false ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'</button>
</hbox>
<hbox>
<text><label>Size:</label></text>
<combobox tooltip-text="Choose the size of your OSD fonts" width-request="100">'
# add disabled if needed
[ "$OSD" = false ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<variable>OSD_FONT_SIZE</variable>
'$OSD_FONT_SIZE_ITEMS'
</combobox>
<text><label>Style:</label></text>
<combobox tooltip-text="Choose an effect for your OSD fonts" width-request="110">'
# add disabled if needed
[ "$OSD" = false ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<variable>OSD_FX</variable>
'$OSD_FX_ITEMS'
</combobox>
<text><label>Position:</label></text>
<combobox tooltip-text="Where you want the OSD to be displayed" width-request="120">'
# add disabled if needed
[ "$OSD" = false ] && VLCGTK=${VLCGTK}'<visible>disabled</visible>'
# continue GUI
VLCGTK=${VLCGTK}'<variable>OSD_POS</variable>
'$OSD_POS_ITEMS'
</combobox>
</hbox>
</vbox>
</frame>

</notebook>

<hbox>
<button relief="2" use-stock="true" label="gtk-save" tooltip-text="Save your VLC player settings">
<action>execute; Xdialog --center --msgbox "Settings saved" 5 30;</action>
</button>
<button relief="2" tooltip-text="Stop all playback windows">
<input file icon="gtk-stop"></input>
<label>Stop Playback</label>
<action>killall vlc</action>
<action>killall xdotool</action>
<action>killall vlc-gtk-btns</action>
</button>
<button relief="2" use-stock="true" label="gtk-quit" tooltip-text="Stop all playback windows and exit this frontend">
<action>killall "vlc"</action>
<action>[ -e /usr/bin/rejoystickcc ] && exec /usr/bin/rejoystickcc --load --profile None &</action>
<action type="exit">EXIT_NOW</action>
</button>
</hbox>

</vbox>

</window>'

gtkdialog --program=VLCGTK --center &
unset VLCGTK
exit 0


However, the on-screen controls do not work. I will need to ask scottman about that.

Note also, I was unable to compile the Mozilla plugin, which is a shame.

Another note, if the 'zzx_upgrade_73_to_75_nokms' PET is installed, this VLC package may not work, as it is compiled with 'xcb' version 1.0 and the upgrade has a later version of xcb. I don't know, haven't tested it yet, but if it proves to be the case, I will recompile another VLC for use with the upgrade.


Posted on 8 Jan 2011, 15:26


Comments:

Posted on 8 Jan 2011, 15:43 by ttuuxxx
VLC
Hi Barry, man we think alike, I've been compiling a static VLC all day now, lol Just about finished, Well I'll let you know how it goes, The version I'm building has 17 extra deps compared to yours. More features/formats etc.
ttuuxxx


Posted on 8 Jan 2011, 19:18 by Iguleder
Woof Squashfs fixes
Barry, there are two problems with Squashfs that arise with kernel 2.6.36+ and Squashfs 4.1:
- A line needs to be added for Squashfs 4.1:
[ $SUB_KERNELVER -ge 36 ] && MKSQUASHFS='mksquashfs4.1'

However, in my case I compiled squashfs-tools with lzo as the default compressor and that's what mksquashfs does. If you want to give the user choice, that's more complicated.
- Squashfs has dependencies; in my 2.6.36.2 it depends on lzo_decompress.ko. After some debugging work I found out why my spup won't boot. I added lzo_decompress.ko to NEEDEDINITRDMODS, but if you have LZMA compression in Squashfs, you'll need more modules.


Posted on 8 Jan 2011, 22:32 by ttuuxxx
qt4
Hi Barry the reason why the latest scribus isn't compiling with your Qt is because your using qt4.5 the error 'UniqueConnection' is not a member of 'Qt' is because UniqueConnection wasn't introduced until 4.6. But with my static qt 4.6 it compiles fine, but too large because of the static libs, Oh what compile commands do you use to compile qt? your qt packages are much smaller than my qt.
ttuuxxx



Posted on 8 Jan 2011, 22:49 by BarryK
Re Qt
ttuuxxx,
I didn't compile Qt myself, it was compiled in T2.

This is the most recent:
http://www.t2-project.org/packages/qt4.html

...qt4.conf has the configure options.



Posted on 9 Jan 2011, 8:16 by BarryK
Re Qt
Hmm, I just looked at my Qt4 PET, it is a lot bigger than it needs to be. There is a lot of stuff in it that could be moved to qt4_DEV. Will do that next.

ttuuxxx,
I did compile Qt4 myself awhile back, and I recall enabling static libraries, it was enormous. Ah yes, I made some notes at the time -- it was Qt 4.5.1, and the configure:

# ./configure -prefix /opt/qt4 -qt-sql-sqlite -system-sqlite -no-opengl -no-3dnow -no-sse -no-sse2



Posted on 9 Jan 2011, 8:13 by technosaurus
vlc-gtk
the failures may just be differences in the title/window id possibly changing
the vlc-gtk gui uses xdotool in the background to send events to the vlc window(s)