From: Simon Ruderich Date: Sat, 2 Jun 2018 11:48:15 +0000 (+0200) Subject: Merge branch 'multimedia' X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=0b96090f82bd835ed3707be7f7a32cc497272458;hp=00b4c91969f0ee1fd7ea4e87a0b0e1ab9407c87c Merge branch 'multimedia' --- diff --git a/multimedia/.gitignore b/multimedia/.gitignore new file mode 100644 index 0000000..989cf00 --- /dev/null +++ b/multimedia/.gitignore @@ -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 index 0000000..23d5991 --- /dev/null +++ b/multimedia/Makefile @@ -0,0 +1,4 @@ +all: + @./setup.sh + +.PHONY: all diff --git a/multimedia/handbrake/preferences b/multimedia/handbrake/preferences new file mode 100644 index 0000000..a6f0952 --- /dev/null +++ b/multimedia/handbrake/preferences @@ -0,0 +1,75 @@ + + + + + Preferences + + AddCC + + AutoScan + + EncodeLogLocation + + HideAdvancedVideoSettings + + LogLongevity + week + LoggingLevel + 1 + MinTitleDuration + 10 + PreferredLanguage + und + RemoveFinishedJobs + + SrtDir + . + UseM4v + + VideoQualityGranularity + 1 + WhenComplete + nothing + allow_tweaks + + auto_name + + auto_name_template + {source} + check_updates + weekly + hbfd + + hbfd_feature + + last_update_check + 0 + live_duration + 15 + preview_count + 20 + preview_fullscreen + + preview_show_crop + + preview_x + 0 + preview_y + 0 + reduce_hd_preview + + show_presets + + update_skip_version + 0 + use_dvdnav + + version + 0.1 + window_height + 1080 + window_width + 1920 + + + diff --git a/multimedia/handbrake/presets b/multimedia/handbrake/presets new file mode 100644 index 0000000..64fc244 --- /dev/null +++ b/multimedia/handbrake/presets @@ -0,0 +1,167 @@ + + + + + + AudioAllowAACPass + + AudioAllowAC3Pass + + AudioAllowDTSHDPass + + AudioAllowDTSPass + + AudioAllowMP3Pass + + AudioEncoderFallback + Vorbis + AudioLanguageList + + und + + AudioList + + + AudioBitrate + 160 + AudioEncoder + Vorbis + AudioMixdown + 7.1 Channels + AudioSamplerate + source + AudioTrack + 1 + AudioTrackDRCSlider + 0 + AudioTrackGainSlider + 0 + AudioTrackQuality + 5 + AudioTrackQualityEnable + + + + AudioSecondaryEncoderMode + + AudioTrackSelectionBehavior + all + ChapterMarkers + + Default + + FileFormat + Matroska (avformat) + Folder + + Mp4HttpOptimize + + Mp4LargeFile + + Mp4iPodCompatible + + PictureAutoCrop + + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDecomb + 0 + PictureDecombCustom + + PictureDecombDeinterlace + + PictureDeinterlace + 0 + PictureDeinterlaceCustom + + PictureDenoiseCustom + + PictureDenoiseFilter + off + PictureDenoisePreset + medium + PictureDenoiseTune + none + PictureDetelecine + 0 + PictureDetelecineCustom + + PictureKeepRatio + + PictureLeftCrop + 0 + PictureLooseCrop + + PictureModulus + 2 + PicturePAR + 2 + PicturePARHeight + 720 + PicturePARWidth + 853 + PictureRightCrop + 0 + PictureTopCrop + 0 + PresetBuildNumber + 2015050800 + PresetDescription + Simon's settings. + PresetName + Simon + SubtitleAddCC + + SubtitleAddForeignAudioSearch + + SubtitleAddForeignAudioSubtitle + + SubtitleLanguageList + + und + + SubtitleTrackSelectionBehavior + all + Type + 1 + UsesPictureFilters + 1 + UsesPictureSettings + 2 + VideoAvgBitrate + 2500 + VideoEncoder + H.264 (x264) + VideoFramerate + source + VideoFramerateMode + cfr + VideoGrayScale + + VideoLevel + auto + VideoOptionExtra + + VideoPreset + placebo + VideoProfile + auto + VideoQualitySlider + 20 + VideoQualityType + 2 + VideoTune + film + VideoTurboTwoPass + + VideoTwoPass + + x264Option + 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 + x264UseAdvancedOptions + + + + diff --git a/multimedia/mplayer/config b/multimedia/mplayer/config new file mode 100644 index 0000000..f538186 --- /dev/null +++ b/multimedia/mplayer/config @@ -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 . + + +# 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 index 0000000..8faedec --- /dev/null +++ b/multimedia/mplayer/input.conf @@ -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 . + + +# 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 index 0000000..3459e3b --- /dev/null +++ b/multimedia/mplayer2/config @@ -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 . + + +# 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 index 0000000..f7c802a --- /dev/null +++ b/multimedia/mplayer2/input.conf @@ -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 index 0000000..bf52fc2 --- /dev/null +++ b/multimedia/mpv/input.conf @@ -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 . + + +# 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 index 0000000..19eeaa3 --- /dev/null +++ b/multimedia/mpv/mpv.conf @@ -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 . + + +# 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 index 0000000..dd6e929 --- /dev/null +++ b/multimedia/setup.sh @@ -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 . + + +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