diff options
Diffstat (limited to '.config/mpv/script-opts')
| -rw-r--r-- | .config/mpv/script-opts/crop.conf | 34 | ||||
| -rw-r--r-- | .config/mpv/script-opts/encode_webm.conf | 39 |
2 files changed, 73 insertions, 0 deletions
diff --git a/.config/mpv/script-opts/crop.conf b/.config/mpv/script-opts/crop.conf new file mode 100644 index 0000000..9f75cdf --- /dev/null +++ b/.config/mpv/script-opts/crop.conf @@ -0,0 +1,34 @@ +# default mode to be used if not specified in the script-message +# can be hard, soft or delogo +# in hard mode, a crop filter is applied to the video +# in soft mode, video-zoom, video-pan-x and video-pan-y are modified to simulate the cropping +# in delogo mode, the delogo filter is applied to the selected are +# hard mode interacts nicely with encode.lua, soft mode does not +mode=hard + +draw_crosshair=yes +draw_text=yes +draw_shade=yes +draw_frame=yes +frame_border_width=2 +frame_border_color=EEEEEE +# hexadecimal: 00 is opaque, FF is transparent +shade_opacity=77 +mouse_support=yes + +# movement is defined in pixels in the window +# which explains the mismatch with the text (in video space) +coarse_movement=30 +left_coarse=LEFT +right_coarse=RIGHT +up_coarse=UP +down_coarse=DOWN +fine_movement=1 +left_fine=ALT+LEFT +right_fine=ALT+RIGHT +up_fine=ALT+UP +down_fine=ALT+DOWN + +# these two options accept comma separated list of keys +accept=ENTER,MOUSE_BTN0 +cancel=ESC diff --git a/.config/mpv/script-opts/encode_webm.conf b/.config/mpv/script-opts/encode_webm.conf new file mode 100644 index 0000000..06cdc34 --- /dev/null +++ b/.config/mpv/script-opts/encode_webm.conf @@ -0,0 +1,39 @@ +# if yes, only encode the currently active tracks +# for example, mute the player / hide the subtitles if you don't want audio / subs to be part of the extract +only_active_tracks=no + +# whether to preserve some of the applied filters (crop, rotate, flip and mirror) into the extract +# this is pretty useful in combination with crop.lua +# note that you cannot copy video streams and apply filters at the same time +preserve_filters=yes + +# apply another filter after the ones from the previous option if any +# can be used to limit the resolution of the output, for example with +# append_filter=scale=2*trunc(iw/max(1\,sqrt((iw*ih)/(960*540)))/2):-2 +append_filter= + +# additional parameters passed to ffmpeg +codec=-c:a libvorbis -crf 1 -b:v 1M + +# format of the output filename +# Does basic interpolation on the following variables: $f, $x, $t, $s, $e, $d, $p, $n which respectively represent +# input filename, input extension, title, start timestamp, end timestamp, duration, profile name and an incrementing number in case of conflicts +# if the extension is not among the recognized ones, it will default to mkv +output_format=$f_$n.webm + +# the directory in which to create the extract +# empty means the same directory as the input file +# relative paths are relative to mpv's working directory, absolute ones work like you would expect +output_directory=~/vids/ + +# if yes, the ffmpeg process will run detached from mpv and we won't know if it succeeded or not +# if no, we know the result of calling ffmpeg, but we can only encode one extract at a time and mpv will block on exit +detached=yes + +# executable to run when encoding (or its full path if not in PATH) +# for example, this can be used with a wrapper script that calls ffmpeg and triggers a notification when finished +# note that the executable gets the ffmpeg arguments as-is, and is expected to call ffmpeg itself +ffmpeg_command=ffmpeg + +# if yes, print the ffmpeg call before executing it +print=yes |
