aboutsummaryrefslogtreecommitdiffhomepage
path: root/etc/encoding-example-profiles.conf
blob: c2a07af2e8378663fa65f9f14f01c81c7944f562 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
#
# mpv configuration file
#

#########################
# encoding profile file #
#########################
#
# Usage of this file: copy/symlink it to a fixed location, and add
#   include = /path/to/this/encoding-example-profiles.conf
# to your ~/.mpv/config
#
# Then, list all profiles by
#   mpv -profile help | grep enc-
#
# The following kinds of encoding profiles exist:
#   enc-a-*:  initialize an audio codec including good defaults
#   enc-v-*:  initialize a video codec including good defaults
#   enc-f-*:  initialize a file format including good defaults, including
#             selecting and initializing a good audio and video codec
#   enc-to-*: load known good settings for a target device; this typically
#             includes selecting an enc-f-* profile, then adjusting some
#             settings like frame rate, resolution and codec parameters
#
# AFTER including a profile of these, you can of course still change
# options, or even switch to another codec.
#
# You can view the exact options a profile sets by
#   mpv -show-profile enc-to-bb-9000
#
# Examples:
#   mpv -profile enc-to-dvdpal -o outfile.mpg infile.mkv
#   mpv -profile enc-f-avi -ofps 30 -o outfile.avi infile.mkv
#   mpv -profile enc-v-mpeg4 -ovcopts-add qscale=7 -profile enc-a-mp3 -oacopts-add b=320k -o outfile.avi infile.mkv

################
# audio codecs #
################
[enc-a-aac]
profile-desc = "AAC (libfaac or FFmpeg)"
oac = libfdk_aac,libfaac,libvo_aacenc,aac
oacopts = b=96k

[enc-a-ac3]
profile-desc = "AC3 (FFmpeg)"
oac = ac3
oacopts = b=448k

[enc-a-mp3]
profile-desc = "MP3 (LAME)"
oac = libmp3lame
oacopts = b=128k

[enc-a-vorbis]
profile-desc = "Vorbis (libvorbis)"
oac = libvorbis
oacopts = qscale=3

################
# video codecs #
################
[enc-v-h263]
profile-desc = "H.263 (FFmpeg)"
ovc = h263
ovcopts = qscale=4

[enc-v-h264]
profile-desc = "H.264 (x264)"
ovc = libx264
ovcopts = preset=medium,crf=23,threads=0

[enc-v-mpeg2]
profile-desc = "MPEG-2 Video (FFmpeg)"
ovc = mpeg2video
ovcopts-clr = yes

[enc-v-mpeg4]
profile-desc = "MPEG-4 Part 2 (FFmpeg)"
ovc = mpeg4
ovcopts = qscale=4

[enc-v-vp8]
profile-desc = "VP8 (libvpx)"
ovc = libvpx
ovcopts = qmin=4,b=10000000k # ought to be enough for anyone; for CBR use, set b=; for VBR use, set qmin= to quality

###########
# formats #
###########
[enc-f-3gp]
profile-desc = "H.263 + AAC (for 3GP)"
of = 3gp
ocopyts = yes
profile = enc-v-h263
profile = enc-a-aac
ofopts-clr = yes

[enc-f-avi]
profile-desc = "MPEG-4 + MP3 (for AVI)"
of = avi
ocopyts = no
oautofps = yes
profile = enc-v-mpeg4
profile = enc-a-mp3
ofopts-clr = yes

[enc-f-mp4]
profile-desc = "H.264 + AAC (for MP4)"
of = mp4
ocopyts = yes
profile = enc-v-h264
profile = enc-a-aac
ofopts-clr = yes

[enc-f-webm]
profile-desc = "VP8 + Vorbis (for WebM)"
of = webm
ocopyts = yes
profile = enc-v-vp8
profile = enc-a-vorbis
ofopts-clr = yes

##################
# target devices #
##################
[enc-to-dvdpal]
profile-desc = "DVD-Video PAL, use dvdauthor -v pal -a ac3+en (MUST be used with 4:3 or 16:9 aspect, and 720x576, 704x576, 352x576 or 352x288 resolution)"
profile = enc-v-mpeg2
profile = enc-a-ac3
of = dvd
ofopts-add = packetsize=2048,muxrate=10080000
ofps = 25
oharddup = yes
ovfirst = yes # dvdauthor needs this
srate = 48000
ovcopts-add = g=15,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008

[enc-to-dvdntsc]
profile-desc = "DVD-Video NTSC, use dvdauthor -v ntsc -a ac3+en (MUST be used with 4:3 or 16:9 aspect, and 720x480, 704x480, 352x480 or 352x240 resolution)"
profile = enc-v-mpeg2
profile = enc-a-ac3
of = dvd
ofopts-add = packetsize=2048,muxrate=10080000
ofps = 24000/1001
oharddup = yes
ovfirst = yes # dvdauthor needs this
srate = 48000
ovcopts-add = g=18,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008

[enc-to-bb-9000]
profile-desc = "MP4 for Blackberry Bold 9000"
profile = enc-f-mp4
vf-add = dsize=480:360:0:2,scale=w=0:h=0,dsize=-1:-1 # native screen res, letterbox
ovcopts-add = maxrate=1500k,bufsize=1000k,rc_init_occupancy=900k,refs=1,profile=baseline

[enc-to-nok-6300]
profile-desc = "3GP for Nokia 6300"
profile = enc-f-3gp
ofps = 25
vf-add = scale=w=176:h=144
srate = 16000
channels = 1
oacopts-add = b=32k

[enc-to-psp]
profile-desc = "MP4 for PlayStation Portable"
profile = enc-f-mp4
ofps = 30000/1001
vf-add = scale=w=480:h=272,dsize=480:270
srate = 48000
channels = 2
ovcopts-add = b=512k,profile=baseline

[enc-to-iphone-noscale]
profile-desc = "MP4 for iPhone (no scaling)"
profile = enc-f-mp4
oautofps = yes # iphone supports 30fps max
ovcopts-add = maxrate=2500k,bufsize=1000k,rc_init_occupancy=900k,level=30,profile=baseline

[enc-to-iphone]
profile-desc = "MP4 for iPhone (480x320)"
profile = enc-to-iphone
vf-add = dsize=480:320:1:2,scale=w=0:h=0,dsize=-1:-1 # panscan

[enc-to-iphone-4]
profile-desc = "MP4 for iPhone 4 (960x640)"
profile = enc-to-iphone
vf-add = dsize=960:480:1:2,scale=w=0:h=0,dsize=-1:-1 # panscan

[enc-to-iphone-5]
profile-desc = "MP4 for iPhone 5 (1136x640)"
profile = enc-to-iphone
vf-add = dsize=1136:480:1:2,scale=w=0:h=0,dsize=-1:-1 # panscan