]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Merge branch 'multimedia'
authorSimon Ruderich <simon@ruderich.org>
Sat, 2 Jun 2018 11:48:15 +0000 (13:48 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sat, 2 Jun 2018 11:48:15 +0000 (13:48 +0200)
multimedia/.gitignore [new file with mode: 0644]
multimedia/Makefile [new file with mode: 0644]
multimedia/handbrake/preferences [new file with mode: 0644]
multimedia/handbrake/presets [new file with mode: 0644]
multimedia/mplayer/config [new file with mode: 0644]
multimedia/mplayer/input.conf [new file with mode: 0644]
multimedia/mplayer2/config [new file with mode: 0644]
multimedia/mplayer2/input.conf [new symlink]
multimedia/mpv/input.conf [new file with mode: 0644]
multimedia/mpv/mpv.conf [new file with mode: 0644]
multimedia/setup.sh [new file with mode: 0755]

diff --git a/multimedia/.gitignore b/multimedia/.gitignore
new file mode 100644 (file)
index 0000000..989cf00
--- /dev/null
@@ -0,0 +1,4 @@
+/handbrake/Activity.log.*
+/handbrake/EncodeLogs/
+/handbrake/ghb.pid.*
+/handbrake/queue.*
diff --git a/multimedia/Makefile b/multimedia/Makefile
new file mode 100644 (file)
index 0000000..23d5991
--- /dev/null
@@ -0,0 +1,4 @@
+all:
+       @./setup.sh
+
+.PHONY: all
diff --git a/multimedia/handbrake/preferences b/multimedia/handbrake/preferences
new file mode 100644 (file)
index 0000000..a6f0952
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+       <key>Preferences</key>
+       <dict>
+               <key>AddCC</key>
+               <false />
+               <key>AutoScan</key>
+               <false />
+               <key>EncodeLogLocation</key>
+               <false />
+               <key>HideAdvancedVideoSettings</key>
+               <true />
+               <key>LogLongevity</key>
+               <string>week</string>
+               <key>LoggingLevel</key>
+               <string>1</string>
+               <key>MinTitleDuration</key>
+               <integer>10</integer>
+               <key>PreferredLanguage</key>
+               <string>und</string>
+               <key>RemoveFinishedJobs</key>
+               <false />
+               <key>SrtDir</key>
+               <string>.</string>
+               <key>UseM4v</key>
+               <true />
+               <key>VideoQualityGranularity</key>
+               <string>1</string>
+               <key>WhenComplete</key>
+               <string>nothing</string>
+               <key>allow_tweaks</key>
+               <false />
+               <key>auto_name</key>
+               <true />
+               <key>auto_name_template</key>
+               <string>{source}</string>
+               <key>check_updates</key>
+               <string>weekly</string>
+               <key>hbfd</key>
+               <false />
+               <key>hbfd_feature</key>
+               <false />
+               <key>last_update_check</key>
+               <integer>0</integer>
+               <key>live_duration</key>
+               <integer>15</integer>
+               <key>preview_count</key>
+               <real>20</real>
+               <key>preview_fullscreen</key>
+               <false />
+               <key>preview_show_crop</key>
+               <true />
+               <key>preview_x</key>
+               <integer>0</integer>
+               <key>preview_y</key>
+               <integer>0</integer>
+               <key>reduce_hd_preview</key>
+               <true />
+               <key>show_presets</key>
+               <true />
+               <key>update_skip_version</key>
+               <integer>0</integer>
+               <key>use_dvdnav</key>
+               <true />
+               <key>version</key>
+               <string>0.1</string>
+               <key>window_height</key>
+               <integer>1080</integer>
+               <key>window_width</key>
+               <integer>1920</integer>
+       </dict>
+</dict>
+</plist>
diff --git a/multimedia/handbrake/presets b/multimedia/handbrake/presets
new file mode 100644 (file)
index 0000000..64fc244
--- /dev/null
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<array>
+       <dict>
+               <key>AudioAllowAACPass</key>
+               <false />
+               <key>AudioAllowAC3Pass</key>
+               <false />
+               <key>AudioAllowDTSHDPass</key>
+               <false />
+               <key>AudioAllowDTSPass</key>
+               <false />
+               <key>AudioAllowMP3Pass</key>
+               <false />
+               <key>AudioEncoderFallback</key>
+               <string>Vorbis</string>
+               <key>AudioLanguageList</key>
+               <array>
+                       <string>und</string>
+               </array>
+               <key>AudioList</key>
+               <array>
+                       <dict>
+                               <key>AudioBitrate</key>
+                               <string>160</string>
+                               <key>AudioEncoder</key>
+                               <string>Vorbis</string>
+                               <key>AudioMixdown</key>
+                               <string>7.1 Channels</string>
+                               <key>AudioSamplerate</key>
+                               <string>source</string>
+                               <key>AudioTrack</key>
+                               <integer>1</integer>
+                               <key>AudioTrackDRCSlider</key>
+                               <real>0</real>
+                               <key>AudioTrackGainSlider</key>
+                               <real>0</real>
+                               <key>AudioTrackQuality</key>
+                               <real>5</real>
+                               <key>AudioTrackQualityEnable</key>
+                               <true />
+                       </dict>
+               </array>
+               <key>AudioSecondaryEncoderMode</key>
+               <true />
+               <key>AudioTrackSelectionBehavior</key>
+               <string>all</string>
+               <key>ChapterMarkers</key>
+               <true />
+               <key>Default</key>
+               <true />
+               <key>FileFormat</key>
+               <string>Matroska (avformat)</string>
+               <key>Folder</key>
+               <false />
+               <key>Mp4HttpOptimize</key>
+               <false />
+               <key>Mp4LargeFile</key>
+               <false />
+               <key>Mp4iPodCompatible</key>
+               <false />
+               <key>PictureAutoCrop</key>
+               <true />
+               <key>PictureBottomCrop</key>
+               <real>0</real>
+               <key>PictureDeblock</key>
+               <integer>0</integer>
+               <key>PictureDecomb</key>
+               <integer>0</integer>
+               <key>PictureDecombCustom</key>
+               <string></string>
+               <key>PictureDecombDeinterlace</key>
+               <true />
+               <key>PictureDeinterlace</key>
+               <integer>0</integer>
+               <key>PictureDeinterlaceCustom</key>
+               <string></string>
+               <key>PictureDenoiseCustom</key>
+               <string></string>
+               <key>PictureDenoiseFilter</key>
+               <string>off</string>
+               <key>PictureDenoisePreset</key>
+               <string>medium</string>
+               <key>PictureDenoiseTune</key>
+               <string>none</string>
+               <key>PictureDetelecine</key>
+               <integer>0</integer>
+               <key>PictureDetelecineCustom</key>
+               <string></string>
+               <key>PictureKeepRatio</key>
+               <true />
+               <key>PictureLeftCrop</key>
+               <real>0</real>
+               <key>PictureLooseCrop</key>
+               <false />
+               <key>PictureModulus</key>
+               <string>2</string>
+               <key>PicturePAR</key>
+               <string>2</string>
+               <key>PicturePARHeight</key>
+               <real>720</real>
+               <key>PicturePARWidth</key>
+               <real>853</real>
+               <key>PictureRightCrop</key>
+               <real>0</real>
+               <key>PictureTopCrop</key>
+               <real>0</real>
+               <key>PresetBuildNumber</key>
+               <integer>2015050800</integer>
+               <key>PresetDescription</key>
+               <string>Simon&apos;s settings.</string>
+               <key>PresetName</key>
+               <string>Simon</string>
+               <key>SubtitleAddCC</key>
+               <true />
+               <key>SubtitleAddForeignAudioSearch</key>
+               <false />
+               <key>SubtitleAddForeignAudioSubtitle</key>
+               <false />
+               <key>SubtitleLanguageList</key>
+               <array>
+                       <string>und</string>
+               </array>
+               <key>SubtitleTrackSelectionBehavior</key>
+               <string>all</string>
+               <key>Type</key>
+               <integer>1</integer>
+               <key>UsesPictureFilters</key>
+               <integer>1</integer>
+               <key>UsesPictureSettings</key>
+               <integer>2</integer>
+               <key>VideoAvgBitrate</key>
+               <real>2500</real>
+               <key>VideoEncoder</key>
+               <string>H.264 (x264)</string>
+               <key>VideoFramerate</key>
+               <string>source</string>
+               <key>VideoFramerateMode</key>
+               <string>cfr</string>
+               <key>VideoGrayScale</key>
+               <false />
+               <key>VideoLevel</key>
+               <string>auto</string>
+               <key>VideoOptionExtra</key>
+               <string></string>
+               <key>VideoPreset</key>
+               <string>placebo</string>
+               <key>VideoProfile</key>
+               <string>auto</string>
+               <key>VideoQualitySlider</key>
+               <integer>20</integer>
+               <key>VideoQualityType</key>
+               <integer>2</integer>
+               <key>VideoTune</key>
+               <string>film</string>
+               <key>VideoTurboTwoPass</key>
+               <false />
+               <key>VideoTwoPass</key>
+               <false />
+               <key>x264Option</key>
+               <string>ref=16:bframes=16:b-adapt=2:direct=auto:deblock=-1,-1:analyse=all:me=tesa:merange=24:subme=11:trellis=2:fast-pskip=0:psy-rd=1.00,0.15:rc-lookahead=60</string>
+               <key>x264UseAdvancedOptions</key>
+               <false />
+       </dict>
+</array>
+</plist>
diff --git a/multimedia/mplayer/config b/multimedia/mplayer/config
new file mode 100644 (file)
index 0000000..f538186
--- /dev/null
@@ -0,0 +1,46 @@
+# MPlayer configuration file.
+#
+# Important notes:
+# - Don't set the cache in here. It applies to all protocols and causes
+#   problems for DVDs (in /dev/dvd and stored on hard disk). Use the -cache
+#   command line option where necessary.
+
+# Copyright (C) 2011-2012  Simon Ruderich
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# Use xv (preferred, hardware accelerated) or x11 as video driver.
+vo=xv,x11
+# Use ALSA as audio driver.
+ao=alsa
+
+# Fullscreen playback.
+fs=yes
+# Enable software scaling, necessary for video drivers which don't support
+# hardware scaling like x11.
+zoom=yes
+
+# Prefer English and German audio and subtitles.
+alang=en,de
+slang=en,de
+
+# Disable LIRC as I don't use it. Prevents a warning on startup.
+nolirc=yes
+
+# Disable the mouse, no need for it. Prevents accidental skipping with the
+# touchpad (scroll wheel) for example.
+nomouseinput=yes
+
+# vim: ft=mplayerconf
diff --git a/multimedia/mplayer/input.conf b/multimedia/mplayer/input.conf
new file mode 100644 (file)
index 0000000..8faedec
--- /dev/null
@@ -0,0 +1,22 @@
+# MPlayer mapping file.
+
+# Copyright (C) 2013  Simon Ruderich
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# Loop the current file (is reset when the next file is played). Toggling
+# doesn't work directly, instead press l again to set the loop count to 1 and
+# then skip the file.
+l loop 1
diff --git a/multimedia/mplayer2/config b/multimedia/mplayer2/config
new file mode 100644 (file)
index 0000000..3459e3b
--- /dev/null
@@ -0,0 +1,38 @@
+# MPlayer2 (mplayer fork) configuration file.
+
+# Copyright (C) 2011-2013  Simon Ruderich
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# Use xv (preferred, hardware accelerated) or x11 as video driver.
+vo=xv,x11
+# Use ALSA as audio driver.
+ao=alsa
+
+# Use PCM to control volume. mplayer2 uses Master by default.
+mixer-channel=PCM
+
+# Prefer English and German audio and subtitles.
+alang=en,de
+slang=en,de
+
+# Disable LIRC as I don't use it. Prevents a warning on startup.
+nolirc=yes
+
+# Disable the mouse, no need for it. Prevents accidental skipping with the
+# touchpad (scroll wheel) for example.
+nomouseinput=yes
+
+# vim: ft=mplayerconf
diff --git a/multimedia/mplayer2/input.conf b/multimedia/mplayer2/input.conf
new file mode 120000 (symlink)
index 0000000..f7c802a
--- /dev/null
@@ -0,0 +1 @@
+../mplayer/input.conf
\ No newline at end of file
diff --git a/multimedia/mpv/input.conf b/multimedia/mpv/input.conf
new file mode 100644 (file)
index 0000000..bf52fc2
--- /dev/null
@@ -0,0 +1,50 @@
+# Mpv input binding file.
+
+# Copyright (C) 2014  Simon Ruderich
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# First restore many useful mappings which were dropped in 0.5.0.
+o     osd                       # cycle through OSD modes
+RIGHT seek  10
+LEFT  seek -10
+PGUP  seek  600
+PGDWN seek -600
++     add audio-delay  0.100    # change audio/video sync
+-     add audio-delay -0.100
+(     add balance -0.1          # change audio balance
+)     add balance  0.1
+
+# "Legacy bindings (may or may not be removed in the future)". Bind them here
+# so they won't get removed.
+! add chapter -1                # skip to previous chapter
+@ add chapter  1                #         next
+
+# Fix ENTER to quit mpv when playing the last file, changed in 0.7.0. Thanks
+# to rossy in #mpv on Freenode (2014-12-07 06:14 CET) for the suggestion how
+# to restore the old behavior.
+ENTER playlist_next force
+
+
+# Unbind keys I sometimes hit accidentally and don't need.
+_ ignore # was cycle video
+[ ignore # was scale playback speed
+] ignore # dito
+{ ignore # dito
+} ignore # dito
+
+# Short seeks.
+Shift+RIGHT seek  5 - exact
+Shift+LEFT  seek -5 - exact
diff --git a/multimedia/mpv/mpv.conf b/multimedia/mpv/mpv.conf
new file mode 100644 (file)
index 0000000..19eeaa3
--- /dev/null
@@ -0,0 +1,64 @@
+# Mpv (mplayer2 fork) configuration file.
+
+# Copyright (C) 2011-2015  Simon Ruderich
+#
+# This file is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this file.  If not, see <http://www.gnu.org/licenses/>.
+
+
+# Use ALSA as audio driver, use PCM for volume control.
+ao=alsa:mixer-name=PCM
+# Use the audio driver volume control if possible.
+softvol=no
+
+# Fullscreen playback.
+fs=yes
+
+# Prefer English and German audio and subtitles.
+alang=jpn,en,eng,de,ger
+slang=en,eng,de,ger
+
+# When playing MKV files try to always display the subtitle at the exact seek
+# position by seeking a little further when looking for it. Otherwise only the
+# next subtitle will be displayed. Thanks to lachs0r in #mpv on Freenode
+# (2015-03-10 02:16 CET).
+demuxer-mkv-subtitle-preroll=yes
+
+# But don't display subtitles by default. Thanks to wm4 in #mpv-player on
+# Freenode (2013-10-09 23:42 CEST) for this idea.
+sub-visibility=no
+
+# Reduce subtitle size (default is 45).
+sub-text-font-size=33
+# Increase bottom margin for subtitles (default is 10). Makes them more
+# pleasant to read for me.
+sub-text-margin-y=30
+
+# Disable the mouse as I don't use it.
+input-cursor=no
+
+# Always hide the cursor when playing a movie in fullscreen movie.
+cursor-autohide=always
+cursor-autohide-fs-only
+
+# Disable "on screen controller". I use the keyboard only.
+osc=no
+
+# Display position/length and cache in the progress overlay ("P" binding).
+# Thanks to wm4 in $mpv-player on Freenode (2014-08-18 01:24 CEST).
+osd-status-msg="${time-pos} / ${length} (${percent-pos}%)${?cache: Cache: ${cache}%}"
+
+# Don't display attached pictures in sound files.
+audio-display=no
+
+# vim: ft=mplayerconf
diff --git a/multimedia/setup.sh b/multimedia/setup.sh
new file mode 100755 (executable)
index 0000000..dd6e929
--- /dev/null
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+# Setup script for multimedia configuration files.
+
+# Copyright (C) 2011-2014  Simon Ruderich
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+set -eu
+
+. ../lib.sh
+
+
+# MPlayer and MPlayer2 use the same configuration directory.
+if installed mplayer; then
+    cleanup() {
+        if test -h ~/.mplayer; then
+            # Setup already done.
+            return
+        fi
+        # Try to remove a default config file from ~/.mplayer. Necessary
+        # because it's also created by mplayer --help.
+        if test -f ~/.mplayer/config; then
+            sha=`shasum ~/.mplayer/config | awk '{print $1}'`
+            if test x"$sha" = x60f98ca2f1f3f81ce3ea2aa3e0e85e8c57e7db40; then
+                rm ~/.mplayer/config
+            else
+                echo '~/.mplayer/config: found modifications, aborting' >&2
+                exit 1
+            fi
+        fi
+        rmdir ~/.mplayer 2>/dev/null || true
+    }
+
+    if mplayer --help | grep MPlayer2 >/dev/null; then
+        cleanup
+        link mplayer2 ~/.mplayer
+    else
+        cleanup
+        link mplayer ~/.mplayer
+    fi
+fi
+# Another MPlayer fork, but developed separately with a different config
+# directory.
+if installed mpv; then
+    link mpv ~/.config/mpv
+fi
+
+if installed handbrake; then
+    link handbrake ~/.config/ghb
+fi