summaryrefslogtreecommitdiff
path: root/.config/mpv/script-opts/encode_webm.conf
blob: f6d661c39ffe7976a959a02e2118297e4705cf8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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:v libvpx-vp9 -crf 1 -b:v 1M -c:a libvorbis

# 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