Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts on Mplayer.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/mplayer.e>
#           or at <http://angg.twu.net/e/mplayer.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######




# «.keys»			(to "keys")
# «.subtitles»			(to "subtitles")
# «.sub-fuzziness»		(to "sub-fuzziness")
# «.dvd»			(to "dvd")
# «.pipe»			(to "pipe")
# «.mplayer2»			(to "mplayer2")
# «.dvd-device»			(to "dvd-device")
# «.verbosity»			(to "verbosity")
# «.-zoom»			(to "-zoom")
# «.nvidia»			(to "nvidia")
# «.extract-part-of-mp3»	(to "extract-part-of-mp3")
# «.mplayer-from-git»		(to "mplayer-from-git")
# «.equalizer»			(to "equalizer")
# «.screenshots»		(to "screenshots")
# «.playlists»			(to "playlists")
# «.too-many-audio-packets»	(to "too-many-audio-packets")



# (find-esgrep "grep -nH -e mplayer *.e")
# (find-es "dvd" "mplayer-subtitles")
# (find-es "dvd" "mplayer-upstream")
# (find-es "dvd" "mplayer-fast-subtitles")
# (find-es "dvd" "mplayer-running")
# (find-es "dvd" "mplayer-subtitle-visibility")

AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)

# (find-es "alsa" "multiple-cards")




#####
#
# Mplayer keys
# 2012jul17
#
#####

# «keys»  (to ".keys")
# (find-es "vlc" "keys")
# (find-man "1 mplayer")
# (find-man "1 mplayer2")
# (find-man "1 mplayer" "keyboard control")

  [ and ]    Decrease/increase current playback speed by 10%.
  { and }    Halve/double current playback speed.
  BACKSPACE  Reset playback speed to normal.




#####
#
# Subtitles for several languages
# 2013feb04
#
#####

# «subtitles» (to ".subtitles")
# «sub-fuzziness» (to ".sub-fuzziness")
# (find-man "1 mplayer" "-sub-fuzziness <mode>")
  j and J    Cycle through the available subtitles.

# (find-angg ".mplayer/config")
# (find-google-links "mplayer subtitle fuzziness")
http://www.google.com/search?q=mplayer+subtitle+fuzziness

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /sda5/torrents/Wittgenstein/
mplayer -sub-fuzziness 1 /sda5/torrents/Wittgenstein/Wittgenstein.avi

;; (find-fline "/sda5/torrents/Wittgenstein/")
;; (find-fline "/sda5/torrents/Wittgenstein/Wittgenstein.srt")
;; (find-fline "/sda5/torrents/Wittgenstein/Wittgenstein_en.srt")
(code-video "wittgenstein" "/sda5/torrents/Wittgenstein/Wittgenstein.avi")
;; (find-wittgenstein)





#####
#
# Playing DVDs
# 2012sep14
#
#####

# «dvd»  (to ".dvd")
# (find-man "1 mplayer" "mplayer [dvd|dvdnav]://")
# (find-man "1 mplayer" "-dvd-device")
# (find-man "1 mplayer" "-title")
# (find-man "1 mplayer" "volume=")
# (find-man "1 mplayer" "-volume")
# (find-man "1 mplayer" "-softvol-max")
# (find-angg ".fvwm/.fvwm2rc" "style-bare")
# (find-efunction 'find-dvd-links)

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mplayer dvd:// -fs -dvd-device /sda5/DVDs/chomsky/VIDEO_TS/
mplayer dvd:// -dvd-device /sda5/DVDs/chomsky/VIDEO_TS/
mplayer dvd:// -fs -title mplayer-fullscreen -dvd-device /sda5/DVDs/chomsky/VIDEO_TS/




#####
#
# Sending commands to mplayer through a pipe
# 2013jan11
#
#####

# «pipe» (to ".pipe")
# (find-evariable-links 'ee-mplayer-options)
# (find-evardescr 'ee-mplayer-options)
# (find-evardescr 'ee-termplayer-options)
# (find-man "1 mplayer")
# (find-man "1 mplayer" "-geometry")
# (find-man "1 mplayer" "> mp_pipe")
# (find-fline "/sda5/videos/")
# (find-fline "~/.mplayer/")

# (find-man "1 mkfifo")
# (find-node "(coreutils)mkfifo invocation")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
MOVIE=/sda5/videos/Velvet_Underground_-_I_m_Sticking_With_You-H5je_eK0V1w.flv
rm -v  ~/.mplayer/mp_pipe
mkfifo ~/.mplayer/mp_pipe
killall    mplayer
killall -9 mplayer
# mplayer -geometry 500x400+512+20 $MOVIE
  mplayer -geometry 500x400+512+20 \
          -input file=$HOME/.mplayer/mp_pipe \
          $MOVIE
* (eepitch-shell2)
echo "seek 10" > ~/.mplayer/mp_pipe
echo "seek -10" > ~/.mplayer/mp_pipe

MOVIE=/sda5/videos/Punch_and_Judy_Show_at_London_Covent_Garden_May_Fayre-K6LmZ0A1s9U.flv




#####
#
# Mplayer2 (has accurate seeking)
# 2013jan11
#
#####

# «mplayer2» (to ".mplayer2")
# (find-fline "~/LOGS/2013jan10.mplayer")
# <sacarasc> MPlayer does not have accurate seeking.
# <wm4> mplayer2 does
# (...)
# <edrx> after an "apt-get install mplayer2" accurate seeking worked
#        out of the box. fantastic =) =) =)

# (find-status   "mplayer2")
# (find-vldifile "mplayer2.list")
# (find-udfile   "mplayer2/")
# http://www.mplayer2.org/
# http://www.mplayer2.org/faq/
# http://en.wikipedia.org/wiki/Mplayer#Forks

(ee-unsplit
  (ee-find-mplayer "screencast.mp4" "1:23")
  )
"mplayer screencast.mp4 -ss 1:23 -osdlevel 2"




#####
#
# DVD device URLs
# 2013feb15
#
#####

# «dvd-device» (to ".dvd-device")
# (find-man "1 mplayer" "mplayer [dvd|dvdnav]://")
# mplayer [dvd|dvdnav]://[title|[start_title]-end_title][/device] [options]

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mplayer dvd://1//dev/sr0
mplayer dvd://1//sda7/DVDs/Lear/KING_LEAR/
mplayer dvd://0//sda7/DVDs/Lear/KING_LEAR/
mplayer dvd:////sda7/DVDs/Lear/KING_LEAR/

mplayer dvd:////sda7/DVDs/Lear/KING_LEAR/ -v -vo null -ao null
mplayer dvd:////sda7/DVDs/Lear/KING_LEAR/ -v -vo null -ao null | grep subtitle



#####
#
# verbosity
# 2013may30
#
#####

# «verbosity» (to ".verbosity")
# How to make these kinds of messages do not appear?

Too many audio packets in the buffer: (4096 in 4279902 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
A:  27.4 V: ???   A-V: ???    ct:  0.000   0/  0 ??% ??% ??,?% 142 0 




#####
#
# Adding "-zoom" makes video rendering too slow
# 2013aug12
#
#####

# «-zoom» (to ".-zoom")
# (find-man "1 mplayer" "-sws <software scaler type>")
# (find-man "1 mplayer" "   -zoom")
# (find-man "1 mplayer" "frame dropping states: none / skip display")

# ee-mplayer-options
(setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2"))
(setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2" "-zoom"))
(setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2" "-zoom" "-sws" "0"))
(setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2" "-zoom" "-vo" "x11"))
(setq ee-mplayer-options '("-fs" "-title" "mplayer-fullscreen" "-osdlevel" "2" "-zoom" "-vo" "vdpau"))
;; (find-tgteens2 "1:03" "arriving home")
# (find-fline "/sda5/videos/")
# (find-video "/sda5/videos/J_S_Bach_6th_Cello_Suite_transcribed_for_viola_-_Courante-QJjOM7SpbhM.flv")

# (find-ebuffer "*Messages*")

Failed to open VDPAU backend libvdpau_nvidia.so: cannot open shared object file: No such file or directory
[vdpau] Error when calling vdp_device_create_x11: 1
[VO_XV] It seems there is no Xvideo support for your video card available.
[VO_XV] Run 'xvinfo' to verify its Xv support and read
[VO_XV] DOCS/HTML/en/video.html#xv!
[VO_XV] See 'mplayer -vo help' for other (non-xv) video out drivers.
[VO_XV] Try -vo x11.

# (find-sh "lspci")
# 00:02.0 VGA compatible controller: Intel Corporation Atom Processor D2xxx/N2xxx Integrated Graphics Controller (rev 09)
# 00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02)

# (find-other-debian-links "mplayer")
# (find-zsh "availabledebs | sort | grep mplayer")
# (find-sh "xvinfo")
# (find-man "1 xvinfo")

# (find-zsh "dmissing libvdpau_nvidia")
# (find-other-debian-links "nvidia")
# (find-zsh "availabledebs | sort | grep nvidia")
# (find-status   "nvidia-kernel-3.2.0-4-686-pae")
# (find-vldifile "nvidia-kernel-3.2.0-4-686-pae.list")
# (find-udfile   "nvidia-kernel-3.2.0-4-686-pae/")
# (find-status   "nvidia-kernel-common")
# (find-vldifile "nvidia-kernel-common.list")
# (find-udfile   "nvidia-kernel-common/")

http://askubuntu.com/questions/13487/gnome-mplayer-failed-to-open-vdpau-backend-libvdpau-nvidia-so-error

# (find-sh "mplayer -vo help")




#####
#
# The Eee 1025 and the NVDIA thing
# 2013aug19
#
#####

# «nvidia» (to ".nvidia")

Playing /sda5/videos/J_S_Bach_6th_Cello_Suite_transcribed_for_viola_-_Courante-QJjOM7SpbhM.flv.
Detected file format: FLV format (libavformat)
[flv @ 0xb5f040e0]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO:  [H264]  360x360  0bpp  25.000 fps  460.9 kbps (56.3 kbyte/s)
Clip info:
 starttime: 0
 totalduration: 129
 totaldatarate: 559
 bytelength: 9076183
 canseekontime: true
 sourcedata: B4A7DD6A8MH1376289402033840
 purl: 
 pmsg: 
Load subtitles in /sda5/videos/
NVIDIA: could not open the device file /dev/nvidiactl (No such device or address).
[vdpau] Error when calling vdp_device_create_x11: 1
[VO_XV] It seems there is no Xvideo support for your video card available.
[VO_XV] Run 'xvinfo' to verify its Xv support and read
[VO_XV] DOCS/HTML/en/video.html#xv!
[VO_XV] See 'mplayer -vo help' for other (non-xv) video out drivers.
[VO_XV] Try -vo x11.
[ass] auto-open
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Asking decoder to use 4 threads if supported.
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 104.8 kbit/7.43% (ratio: 13100->176400)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [pulse] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is 1.00:1 - prescaling to correct movie aspect.
VO: [x11] 360x360 => 360x360 Planar YV12  [fs] [zoom]
[swscaler @ 0xb5dfe560]using unscaled yuv420p -> bgra special converter





#####
#
# Extracting a part of an mp3 file
# 2013aug12
#
#####

# «extract-part-of-mp3» (to ".extract-part-of-mp3")
# (find-es "ffmpeg" "extract-part-of-mp3")
# (find-man "1 mplayer" "mplayer -ao pcm:file=%10%C:test.wav")
# (find-man "1 mplayer" "-ao <driver1")
# (find-man "1 mplayer" "-ao <driver1" "  pcm")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cp -v ~/TH/L/html5-audio.mp3     /tmp/in.mp3
mplayer -ss 30 /tmp/in.mp3
mplayer -ao pcm:file=/tmp/out.mp3 -ss 30 /tmp/in.mp3
mplayer -ao pcm:file=/tmp/out.wav -ss 30 /tmp/in.mp3
mplayer -ao pcm:file=/tmp/out.wav -ss 30 -endpos 5 /tmp/in.mp3
mplayer -ao pcm:file=/tmp/out.wav -novideo -ss 30 -endpos 5 /tmp/in.mp3

# (find-fline "/tmp/")
# (find-audio "/tmp/out.wav")




#####
#
# mplayer from git
# 2013aug19
#
#####

# «mplayer-from-git» (to ".mplayer-from-git")
# (find-angg ".emacs" "mplayer")
# http://repo.or.cz/w/mplayer.git
#    git://repo.or.cz/mplayer.git
# http://gitorious.org/vaapi/mplayer
# http://www.mplayerhq.hu/design7/dload.html (-> svn?)

# (find-fline "/etc/apt/sources.list")
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
apt-get build-dep mplayer
apt-get build-dep mplayer2

# (find-git-links "git://repo.or.cz/mplayer.git" "mplayer")
# (code-c-d "mplayer" "~/bigsrc/mplayer/")
# (find-mplayerfile "")
# (find-mplayerfile ".files")
# (find-mplayerfile ".files.chS")
# (find-mplayerfile "DOCS/man/en/options.rst")
# (find-mplayerfile "DOCS/man/en/options.rst" "--ss=<time>")
# (find-gitk "~/bigsrc/mplayer/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd      ~/bigsrc/
git clone --depth 1 git://repo.or.cz/mplayer.git
cd      ~/bigsrc/mplayer/
git pull --depth 1
git clean -dfx
git reset --hard
find * -type f                 | sort > .files
find * -type f -name '*.[chS]' | sort > .files.chS
etags $(cat .files.chS)

cd      ~/bigsrc/mplayer/
./configure --help  |& tee och
./configure  |& tee oc

# (find-fline "~/bigsrc/")
# (find-fline "~/bigsrc/mplayer/")

# (code-c-d "mplayer" "~/bigsrc/mplayer/")
# (find-mplayerfile "")
# (find-gitk "~/bigsrc/mplayer/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/bigsrc/mplayer/

# (find-sh "mplayer -h")
# (find-sh "mplayer -h" "SEE THE MAN PAGE FOR DETAILS, FURTHER")
# (find-man "1 mplayer")

# (find-es "ffmpeg" "libav-git")





#####
#
# equalizer
# 2013aug23
#
#####

# «equalizer» (to ".equalizer")
# (find-man "1 mplayer" "equalizer=")
# (find-fline "/sda5/videos/kristi/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mplayer -af equalizer=0:0:0:0:0:0:0:-10:-20:-30 \
  /sda5/videos/kristi/Greekadelia_-_____-0VV7BN0n9n8.flv




#####
#
# Screenshots
# 2013sep10
#
#####

# «screenshots» (to ".screenshots")
# (find-angg ".emacs" "mplayer-screenshots")

# (find-man "1 mplayer" "s" "Take a screenshot")
# (find-man "1 mplayer" "s" "-vf pp")
# http://lorenzod8n.wordpress.com/2007/05/23/screenshots-with-mplayer/
# (find-sh "mplayer --help")

# (find-mplayerfile ".files")
# (find-mplayerfile "libmpcodecs/vf_screenshot.c")
# (find-mplayerfile "screenshot.c")
# (find-mplayerfile "screenshot.c" "gen_fname")
# (find-mplayerfile "screenshot.c" "typedef struct screenshot_ctx")
# (find-mplayerfile "screenshot.c" "screenshot_save")
# (find-mplayerfile "screenshot.h")

# (find-sh "locate -i chomsky")
# (find-fline "/sda5/torrents/Consenso_fabricado/")

# (find-angg "CHOMSKY/")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd ~/CHOMSKY/
rm -v tve.avi
cp -lv /sda5/torrents/Consenso_fabricado/*.avi tve.avi

mplayer \
  -vf screenshot \
  -osdlevel 2 -zoom -vo x11 -sws 0 -quiet \
  -ss 40:00 \
  -geometry 400x300+520+100 tve.avi


(mss-mode 1)



#####
#
# playlists
# 2016jan09
#
#####

# «playlists» (to ".playlists")
# (find-man "1 mplayer")
# (find-man "1 mplayer" "-playlist <filename>")





#####
#
# Too many audio packets in the buffer
# 2016oct20
#
#####

# «too-many-audio-packets» (to ".too-many-audio-packets")
# (find-man "1 mplayer")
# (find-man "1 mplayer" "--msglevel=")
# Btw, how do I clean an audio file?
# And how do I remove the image?





#####
#
# identify
# 2013sep28
#
#####

# (find-man "1 mplayer" "-identify")




# (find-man "1 mplayer" "-ao <driver1")
# (find-man "1 mplayer" "-quiet")







mplayer dvd://streamnumber -v -vo null -ao null | grep "subtitle
To rip a subtitle:
Code:
mencoder dvd://streamnumber -nosound -ovc frameno -o /dev/null -slang yourlanguage -vobsubout outputfilename






# (find-man "1 mplayer" "  -sub-paths")










#  Local Variables:
#  coding:               raw-text-unix
#  modes:                (fundamental-mode emacs-lisp-mode)
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: