Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
#######
#
# E-scripts on mplayer and its descendants (like mpv).
#
# 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.
# An introduction to eev can be found here:
#
#   (find-eev-quick-intro)
#   http://angg.twu.net/eev-intros/find-eev-quick-intro.html
#
# 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")
# «.mpv»			(to "mpv")
# «.mpv-audio»			(to "mpv-audio")
# «.mpv-osd»			(to "mpv-osd")
# «.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")
# «.geometry»			(to "geometry")
# «.mpv-geometry»		(to "mpv-geometry")
# «.playlists»			(to "playlists")
# «.too-many-audio-packets»	(to "too-many-audio-packets")
# «.novideo»			(to "novideo")
# «.mpv.el»			(to "mpv.el")
# «.mpv-build»			(to "mpv-build")
# «.loop»			(to "loop")
# «.sub-font-size»		(to "sub-font-size")
# «.sub-file»			(to "sub-file")
# «.bestvideo-height-bestaudio»	(to "bestvideo-height-bestaudio")
# «.mpv-json-ipc»		(to "mpv-json-ipc")
# «.mpv-ytdl-ytsearch3»		(to "mpv-ytdl-ytsearch3")



# (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")
# (find-man "1 mpv")
# (find-man "1 mpv" "Keyboard Control")
# (find-man "1 mpv" "--play-dir")

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

  j and J    Cycle through the available subtitles.
  O          Toggle OSD states between normal and playback time/duration.



#####
#
# 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"

(find-mplayer "~/eev-videos/three-keys-1-pt.mp4")
(ee-find-mplayer "~/eev-videos/three-keys-1-pt.mp4" "1:34")
(ee-unsplit (ee-find-mplayer "~/eev-videos/three-keys-1-pt.mp4" "1:34"))

# (find-efunction 'ee-find-mplayer)
# (find-efunction 'ee-find-mplayer)
# ;; ,@(if pos `("-ss" ,(ee-secs-to-mm:ss pos)))
# ,@(if pos `("--start" ,(ee-secs-to-mm:ss pos)))

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mplayer ~/eev-videos/three-keys-1-pt.mp4
mplayer ~/eev-videos/three-keys-1-pt.mp4 -ss 1:34
mplayer ~/eev-videos/three-keys-1-pt.mp4 --start 1:34

mplayer ~/eev-videos/three-keys-1-pt.mp4 --start 1:34 -fs -title mplayer-fullscreen -zoom -vo x11 -sws 0 -osdlevel 2 -quiet




#####
#
# mpv
# 2019aug10
#
#####

# «mpv» (to ".mpv")
# https://en.wikipedia.org/wiki/Mpv_(media_player)
# https://github.com/mpv-player/mpv/blob/master/DOCS/mplayer-changes.rst
# https://itsfoss.com/mpv-video-player/

# (find-status   "mpv")
# (find-vldifile "mpv.list")
# (find-udfile   "mpv/")
# (find-udfile "mpv/examples/lua/")
# (find-man "1 mpv")
# (find-man "1 mpv" "Keyboard Control")
# (find-man "1 mpv" "--start=<relative time>")
# (find-man "1 mpv" "f" "Toggle fullscreen (see also --fs).")



* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mplayer ~/eev-videos/three-keys-1-pt.mp4 --start 1:34
mplayer ~/eev-videos/three-keys-1-pt.mp4 --fs --start 1:34
mplayer ~/eev-videos/three-keys-1-pt.mp4 --osd-level=0 --fs --start 1:34
mplayer ~/eev-videos/three-keys-1-pt.mp4 --osd-level=1 --fs --start 1:34
mplayer ~/eev-videos/three-keys-1-pt.mp4 --osd-level=2 --fs --start 1:34
mplayer ~/eev-videos/three-keys-1-pt.mp4 --osd-level=3 --fs --start 1:34

mplayer ~/eev-videos/three-keys-1-pt.mp4 --osd-level=2 --fs --start 1:34

;; mpv
(defvar ee-mpv-video-options '("--fs" "--osd-level=2"))
(defun ee-mpv-video-options () ee-mpv-video-options)
(defun ee-find-mpv-video (fname &optional pos &rest rest)
  `("mpv"
    ,fname
    ,@(if pos `("--start" ,(ee-secs-to-mm:ss pos)))
    ,@(ee-mpv-video-options)
    ))

(find-mplayer "~/eev-videos/three-keys-1-pt.mp4")
(find-mplayer "~/eev-videos/three-keys-1-pt.mp4" "1:34")
(ee-find-mplayer "~/eev-videos/three-keys-1-pt.mp4")

# (find-eevfile "eev-audiovideo.el" "Support for mpv")
(find-mplayer "~/eev-videos/three-keys-2-video.webm" "1:34")




#####
#
# Using mpv to play audio in an xterm, without images or guis
# 2019aug11
#
#####

# «mpv-audio» (to ".mpv-audio")
# (find-eev "eev-audiovideo.el" "find-mpv-audio")
# (find-man "1 mpv" "--audio-display=<no|attachment>")
# (find-man "1 mpv" "\nPSEUDO GUI MODE")
# (find-man "1 mpv" "\nTERMINAL STATUS LINE")
# (find-man "1 mpv" "--vid=<ID|auto|no>")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "/sda1/home/torrents/Bach - Brandenburg Concertos - I Musici/CD1/")
DIR="/sda1/home/torrents/Bach - Brandenburg Concertos - I Musici/CD1/"
FNAME="$DIR/01 J. S. Bach - I Musici - Brandenburg Concerto No. 1 in F (BWV 1046) (Allegro).m4a"
echo $FNAME
mpv $FNAME
mpv --vid=no $FNAME

xterm -geometry +200+100 -e   mpv --vid=no              $FNAME
xterm -geometry +200+100 -e   mpv --vid=no --start=1:00 $FNAME
xterm -geometry +200+100 -e   mpv --vid=no --start=60   $FNAME
xterm -geometry +200+100 -e   mpv --vid=no --start 60.5 $FNAME

FNAME=$HOME/eev-videos/three-keys-2-video.webm
FNAME=$HOME/eev-videos/three-keys-2-audio.wav
FNAME=$HOME/eev-videos/three-keys-1-pt-audio.wav
FNAME=$HOME/eev-videos/three-keys-1-pt.mp4
xterm -geometry +200+100 -e   mpv --vid=no              $FNAME






#####
#
# mpv OSD mode options
# 2019aug11
#
#####

# «mpv-osd» (to ".mpv-osd")
# (find-man "1 mpv" "etc/input.conf")
# (find-man "1 mpv" "\n   OSD")
# (find-man "1 mpv" "--osd-level=<0-3>")
# (find-udfile "mpv/input.conf.gz")
# (find-udfile "mpv/input.conf.gz" "cycle through OSD mode")
# (find-udfile "mpv/mplayer-input.conf")
# (find-udfile "mpv/mplayer-input.conf" "o osd")
# (find-udfile "mpv/mpv.conf.gz")
# (find-udfile "mpv/restore-old-bindings.conf")




#####
#
# 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")
# «geometry»    (to ".geometry")
# (find-angg ".emacs" "mplayer-screenshots")

# (find-man "1 mpv" "s" "Take a screenshot")
# (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)



#####
#
# mpv-geometry
# 2022may14
#
#####

# «mpv-geometry»  (to ".mpv-geometry")

;; (find-eev "eev-audiovideo.el" "find-mpv-video")
(setq ee-mpv-video-options '("--fs" "--osd-level=2"))
(setq ee-mpv-video-options '("--osd-level=2" "--geometry=640x400+520+300"))
(find-eevnavvideo "0:00")

# (find-1stclassvideo-links "eev2021")
# (find-subed-mpv-links)
# (find-es "x" "geometry")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
rm -Rfv /tmp/subed-test/
mkdir   /tmp/subed-test/
cd      /tmp/subed-test/
cp -v $S/http/anggtwu.net/eev-videos/emacsconf2021.mp4 a.mp4
cp -v $S/http/anggtwu.net/eev-videos/emacsconf2021.vtt a.vtt
cd      /tmp/subed-test/

mpv --geometry=640x400+520+300 /tmp/subed-test/a.mp4
mpv --geometry=640x400-0+0 /tmp/subed-test/a.mp4
mpv --geometry=320x200-0+0 /tmp/subed-test/a.mp4




#####
#
# 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?




#####
#
# --novideo
# 2018abr11
#
#####

# «novideo» (to ".novideo")
# (find-man "1 mplayer")
# (find-man "1 mplayer" "--novideo")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-fline "/home/music/Lorde - Pure Heroine (320)/Pure Heroine @ 320/")
cd "/home/music/Lorde - Pure Heroine (320)/Pure Heroine @ 320/"
mplayer           "01 Tennis Court.mp3"
mplayer --novideo "01 Tennis Court.mp3"




#####
#
# mpv.el
# 2021may06
#
#####

# «mpv.el»  (to ".mpv.el")
# (find-es "emacs" "subed")
# https://github.com/kljohann/mpv.el
# (find-git-links "https://github.com/kljohann/mpv.el" "mpvel")
# (code-c-d "mpvel" "~/usrc/mpv.el/")
# (find-mpvelfile "")
# (find-fline "~/usrc/mpv.el/mpv.el")
# (load       "~/usrc/mpv.el/mpv.el")

# (find-evardescr 'mpv-default-options)

# (find-audiovideo-intro "4.3. A demo")

(mpv-play "~/eev-videos/Punch_and_Judy_Mark_Poulton-K6LmZ0A1s9U.mp4")
(mpv-seek 33)

# (find-efunction 'mpv-play)
# (find-efunction 'mpv-start)




#####
#
# mpv-build
# 2021oct24
#
#####

# «mpv-build»  (to ".mpv-build")
<grym> ,mpv-build is helper scripts for building mpv with all the
       goodies; https://github.com/mpv-player/mpv-build



#####
#
# loop
# 2022mar07
#
#####

# «loop»  (to ".loop")
# (find-man "1 mpv")
# (find-man "1 mpv" "Set/clear A-B loop points. See ab-loop command for details.")
# (find-1stclassvideo-links "2022findeevangg")
# (find-1stclassvideoindex  "2022findeevangg")
# (find-2022findeevanggvideo "15:14" "and we can run this eepitch-maxima (again)")
# (find-2022findeevanggvideo "15:25")



#####
#
# sub-font-size
# 2022aug17
#
#####

# «sub-font-size»  (to ".sub-font-size")
# (find-man "1 mpv")
# (find-man "1 mpv" "--sub-font-size=<size>")
# (find-evardescr 'ee-mpv-video-options)
# (find-evariable 'ee-mpv-video-options)
# (find-fline "/sda5/videos/Math/" "Why_is_calculus_so_..._EASY-kuOxDh3egN0.webm")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
FNAME=/sda5/videos/Math/Why_is_calculus_so_..._EASY-kuOxDh3egN0.webm
pla () { mpv --fs --osd-level=2 $* $FNAME }
pla --sub-font-size=40
pla --video-margin-ratio-bottom=0.1 --sub-font-size=40
pla --video-margin-ratio-bottom=0.1 --sub-font-size=30
pla --video-margin-ratio-bottom=0.15 --sub-font-size=35




#####
#
# --sub-file
# 2022dec28
#
#####

# «sub-file»  (to ".sub-file")
# https://lists.gnu.org/archive/html/help-gnu-emacs/2022-12/msg00706.html YKhan
# (find-man "1 mpv" "--sub-files=")

 (eepitch-shell)
 (eepitch-kill)
 (eepitch-shell)
mpv --sub-file=http://angg.twu.net/eev-videos/emacsconf2021.vtt \
    http://angg.twu.net/eev-videos/emacsconf2021.mp4



#####
#
# bestvideo-height-bestaudio
# 2022dec29
#
#####

# «bestvideo-height-bestaudio»  (to ".bestvideo-height-bestaudio")
# https://lists.gnu.org/archive/html/help-gnu-emacs/2022-12/msg00741.html EBerg

Hi Yuri, Emanuel, and all,

These tests work:

 (eepitch-shell)
 (eepitch-kill)
 (eepitch-shell)

  mpv --sub-file=http://angg.twu.net/eev-videos/emacsconf2021.vtt \
      http://angg.twu.net/eev-videos/emacsconf2021.mp4

  dl-video () {
      local urls=${1:-$(<$DL_FILE)}
      yt-dlp $dlp_opts -f 'bestvideo' ${=urls}
  }
  dl-720 () {
      local urls=${1:-$(<$DL_FILE)}
      yt-dlp $dlp_opts -f 'bestvideo[height=720]+bestaudio' ${=urls}
  }

  rm -Rv /tmp/dl-test/
  mkdir  /tmp/dl-test/
  cd     /tmp/dl-test/
  dl-video 'http://www.youtube.com/watch?v=vs3-HGB6iEw'
  # dl-720 'http://www.youtube.com/watch?v=vs3-HGB6iEw'

I commented out the one with "dl-720" because it produces a file with
the same name as the one with "dl-video" - this one:

  How to Read a Greek Play [vs3-HGB6iEw].webm

Emanuel, do you have tricks to convert a youtube URL to the filename
of the saved file, or to make yt-dlp save the name in a place that is
easy to retrieve?

  Cheers,
    Eduardo Ochs
    http://angg.twu.net/eepitch.html
    http://angg.twu.net/eev-videos.html




#####
#
# JSON IPC
# 2023apr13
#
#####

# «mpv-json-ipc»  (to ".mpv-json-ipc")
# https://github.com/mpv-player/mpv/blob/master/DOCS/man/ipc.rst



#####
#
# mpv-ytdl-ytsearch3
# 2023oct29
#
#####

# «mpv-ytdl-ytsearch3»  (to ".mpv-ytdl-ytsearch3")
# (find-fline "~/LOGS/2023oct28.emacs" "mpv ytdl://ytsearch3:")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mpv ytdl://ytsearch3:" hitler monads "





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

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






# (find-man "mpv")



# (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")


https://dataswamp.org/~incal/conf/mpv/mpv.conf
https://github.com/Palakis/obs-websocket/


https://www.reddit.com/r/emacs/comments/efsg0t/how_i_enqueue_online_videos_in_mpv_with_emacs/
https://www.reddit.com/r/planetemacs/comments/n57u7r/emp_emacs_mpv_integration/


https://lists.gnu.org/archive/html/help-gnu-emacs/2021-08/msg00591.html ytdl / mpv

https://dataswamp.org/~incal/#mpv

https://news.ycombinator.com/item?id=29183696 ASCII Video Player (pessimistress.github.io)
https://news.ycombinator.com/item?id=32137275 Mpv – A free, open source, and cross-platform media player (mpv.io)




#  Local Variables:
#  coding:               utf-8-unix
#  modes:                (fundamental-mode emacs-lisp-mode)
#  End: