~ubuntu-branches/ubuntu/vivid/mpv/vivid

« back to all changes in this revision

Viewing changes to etc/encoding-profiles.conf

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2013-12-29 20:04:26 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20131229200426-w0qsj8clnui1pxaw
Tags: 0.3.0-1
* New upstream release
  - Fix --vf=expand example in manpage (Closes: #732271)
* Add 03_waf.patch to provide uncompressed waf scripts and modules
* Switch to waf build script
* Drop libmng-dev Build-Depends (not used anymore)
* Bump Standards-Version to 3.9.5 (no changes needed)
* Enable support for dvdnav
* Install more docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# mpv configuration file
 
3
#
 
4
 
 
5
#########################
 
6
# encoding profile file #
 
7
#########################
 
8
#
 
9
# Note: by default, this file is installed to /etc/mpv/encoding-profiles.conf
 
10
# (or a different location, depending on --prefix). mpv will load it by
 
11
# default on program start. If ~/.mpv/encoding-profiles.conf exists, this file
 
12
# will be loaded instead.
 
13
#
 
14
# Then, list all profiles by
 
15
#   mpv -profile help | grep enc-
 
16
#
 
17
# The following kinds of encoding profiles exist:
 
18
#   enc-a-*:  initialize an audio codec including good defaults
 
19
#   enc-v-*:  initialize a video codec including good defaults
 
20
#   enc-f-*:  initialize a file format including good defaults, including
 
21
#             selecting and initializing a good audio and video codec
 
22
#   enc-to-*: load known good settings for a target device; this typically
 
23
#             includes selecting an enc-f-* profile, then adjusting some
 
24
#             settings like frame rate, resolution and codec parameters
 
25
#
 
26
# AFTER including a profile of these, you can of course still change
 
27
# options, or even switch to another codec.
 
28
#
 
29
# You can view the exact options a profile sets by
 
30
#   mpv -show-profile enc-to-bb-9000
 
31
#
 
32
# Examples:
 
33
#   mpv -profile enc-to-dvdpal -o outfile.mpg infile.mkv
 
34
#   mpv -profile enc-f-avi -ofps 30 -o outfile.avi infile.mkv
 
35
#   mpv -profile enc-v-mpeg4 -ovcopts-add qscale=7 -profile enc-a-mp3 -oacopts-add b=320k -o outfile.avi infile.mkv
 
36
 
 
37
################
 
38
# audio codecs #
 
39
################
 
40
[enc-a-aac]
 
41
profile-desc = "AAC (libfaac or FFmpeg)"
 
42
oac = libfdk_aac,libfaac,libvo_aacenc,aac
 
43
oacopts = b=96k
 
44
 
 
45
[enc-a-ac3]
 
46
profile-desc = "AC3 (FFmpeg)"
 
47
oac = ac3
 
48
oacopts = b=448k
 
49
 
 
50
[enc-a-mp3]
 
51
profile-desc = "MP3 (LAME)"
 
52
oac = libmp3lame
 
53
oacopts = b=128k
 
54
 
 
55
[enc-a-vorbis]
 
56
profile-desc = "Vorbis (libvorbis)"
 
57
oac = libvorbis,vorbis
 
58
oacopts = qscale=3
 
59
 
 
60
################
 
61
# video codecs #
 
62
################
 
63
[enc-v-h263]
 
64
profile-desc = "H.263 (FFmpeg)"
 
65
ovc = h263
 
66
ovcopts = qscale=4
 
67
 
 
68
[enc-v-h264]
 
69
profile-desc = "H.264 (x264)"
 
70
ovc = libx264
 
71
ovcopts = preset=medium,crf=23,threads=0
 
72
vf-add = noformat=444p,noformat=444p9,noformat=444p10,noformat=422p,noformat=422p9,noformat=422p10
 
73
 
 
74
[enc-v-mpeg2]
 
75
profile-desc = "MPEG-2 Video (FFmpeg)"
 
76
ovc = mpeg2video
 
77
ovcopts-clr = yes
 
78
 
 
79
[enc-v-mpeg4]
 
80
profile-desc = "MPEG-4 Part 2 (FFmpeg)"
 
81
ovc = mpeg4
 
82
ovcopts = qscale=4
 
83
 
 
84
[enc-v-vp8]
 
85
profile-desc = "VP8 (libvpx)"
 
86
ovc = libvpx
 
87
ovcopts = qmin=4,b=10000000k # ought to be enough for anyone; for CBR use, set b=; for VBR use, set qmin= to quality
 
88
 
 
89
###########
 
90
# formats #
 
91
###########
 
92
[enc-f-3gp]
 
93
profile-desc = "H.263 + AAC (for 3GP)"
 
94
of = 3gp
 
95
ocopyts = yes
 
96
profile = enc-v-h263
 
97
profile = enc-a-aac
 
98
ofopts-clr = yes
 
99
 
 
100
[enc-f-avi]
 
101
profile-desc = "MPEG-4 + MP3 (for AVI)"
 
102
of = avi
 
103
ocopyts = no
 
104
oautofps = yes
 
105
profile = enc-v-mpeg4
 
106
profile = enc-a-mp3
 
107
ofopts-clr = yes
 
108
 
 
109
[enc-f-mp4]
 
110
profile-desc = "H.264 + AAC (for MP4)"
 
111
of = mp4
 
112
ocopyts = yes
 
113
profile = enc-v-h264
 
114
profile = enc-a-aac
 
115
ofopts-clr = yes
 
116
 
 
117
[enc-f-webm]
 
118
profile-desc = "VP8 + Vorbis (for WebM)"
 
119
of = webm
 
120
ocopyts = yes
 
121
profile = enc-v-vp8
 
122
profile = enc-a-vorbis
 
123
ofopts-clr = yes
 
124
 
 
125
##################
 
126
# target devices #
 
127
##################
 
128
[enc-to-dvdpal]
 
129
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)"
 
130
profile = enc-v-mpeg2
 
131
profile = enc-a-ac3
 
132
of = dvd
 
133
ofopts-add = packetsize=2048,muxrate=10080000
 
134
ofps = 25
 
135
oharddup = yes
 
136
ovfirst = yes # dvdauthor needs this
 
137
srate = 48000
 
138
ovcopts-add = g=15,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008
 
139
 
 
140
[enc-to-dvdntsc]
 
141
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)"
 
142
profile = enc-v-mpeg2
 
143
profile = enc-a-ac3
 
144
of = dvd
 
145
ofopts-add = packetsize=2048,muxrate=10080000
 
146
ofps = 24000/1001
 
147
oharddup = yes
 
148
ovfirst = yes # dvdauthor needs this
 
149
srate = 48000
 
150
ovcopts-add = g=18,b=6000000,maxrate=9000000,minrate=0,bufsize=1835008
 
151
 
 
152
[enc-to-bb-9000]
 
153
profile-desc = "MP4 for Blackberry Bold 9000"
 
154
profile = enc-f-mp4
 
155
vf-add = dsize=480:360:0:2,scale=w=0:h=0,dsize=-1:-1 # native screen res, letterbox
 
156
ovcopts-add = maxrate=1500k,bufsize=1000k,rc_init_occupancy=900k,refs=1,profile=baseline
 
157
omaxfps = 30
 
158
 
 
159
[enc-to-nok-n900]
 
160
profile-desc = "MP4 for Nokia N900"
 
161
profile = enc-f-mp4
 
162
# DW = 800, DH = 480, SAR = 1
 
163
vf-add = lavfi=graph="scale=floor(min(min(800\,dar*480)\,in_w*max(1\,sar))/2+0.5)*2:floor(min(min(800/dar\,480)\,in_h*max(1/sar\,1))/2+0.5)*2,setsar=sar=1"
 
164
ovcopts-add = profile=baseline,level=30,maxrate=10000k,bufsize=10000k,rc_init_occupancy=9000k,refs=5
 
165
omaxfps = 30
 
166
 
 
167
[enc-to-nok-6300]
 
168
profile-desc = "3GP for Nokia 6300"
 
169
profile = enc-f-3gp
 
170
ofps = 25
 
171
vf-add = scale=w=176:h=144
 
172
srate = 16000
 
173
channels = 1
 
174
oacopts-add = b=32k
 
175
 
 
176
[enc-to-psp]
 
177
profile-desc = "MP4 for PlayStation Portable"
 
178
profile = enc-f-mp4
 
179
ofps = 30000/1001
 
180
vf-add = scale=w=480:h=272,dsize=480:270
 
181
srate = 48000
 
182
channels = 2
 
183
ovcopts-add = b=512k,profile=baseline
 
184
 
 
185
[enc-to-iphone-noscale]
 
186
profile-desc = "MP4 for iPhone (no scaling)"
 
187
profile = enc-f-mp4
 
188
oautofps = yes # iphone supports 30fps max
 
189
ovcopts-add = maxrate=2500k,bufsize=1000k,rc_init_occupancy=900k,level=30,profile=baseline
 
190
omaxfps = 30
 
191
 
 
192
[enc-to-iphone]
 
193
profile-desc = "MP4 for iPhone (480x320)"
 
194
profile = enc-to-iphone-noscale
 
195
vf-add = dsize=480:320:1:2,scale=w=0:h=0,dsize=-1:-1 # panscan
 
196
omaxfps = 30
 
197
 
 
198
[enc-to-iphone-4]
 
199
profile-desc = "MP4 for iPhone 4 (960x640)"
 
200
profile = enc-to-iphone-noscale
 
201
vf-add = dsize=960:480:1:2,scale=w=0:h=0,dsize=-1:-1 # panscan
 
202
omaxfps = 30
 
203
 
 
204
[enc-to-iphone-5]
 
205
profile-desc = "MP4 for iPhone 5 (1136x640)"
 
206
profile = enc-to-iphone-noscale
 
207
vf-add = dsize=1136:480:1:2,scale=w=0:h=0,dsize=-1:-1 # panscan
 
208
omaxfps = 30
 
209
 
 
210
[enc-to-hp-slate-7]
 
211
profile-desc = "MP4 for HP Slate 7 (1024x600, crazy aspect)"
 
212
profile = enc-f-mp4
 
213
omaxfps = 30
 
214
ovcopts-add = profile=high
 
215
# DW = 1024, DH = 600, DAR = 97:54 (=> SAR = 2425:2304)
 
216
vf-add = lavfi=graph="scale=floor(min(1024*min(1\,dar/(97/54))\,in_w*max(1\,sar/(2425/2304)))/2+0.5)*2:floor(min(600*min((97/54)/dar\,1)\,in_h*max((2425/2304)/sar\,1))/2+0.5)*2,setsar=sar=1"
 
217
 
 
218
[enc-to-hp-slate-7-git]
 
219
profile-desc = "MP4 for HP Slate 7 (1024x600, crazy aspect), FFmpeg-git"
 
220
profile = enc-f-mp4
 
221
omaxfps = 30
 
222
ovcopts-add = profile=high
 
223
# DW = 1024, DH = 600, DAR = 97:54 (=> SAR = 2425:2304)
 
224
vf-add = lavfi=graph="scale=floor(min(1024*min(1\,dar/(97/54))\,in_w)/2+0.5)*2:floor(min(600*min((97/54)/dar\,1)\,in_h)/2+0.5)*2,setsar=sar=sar/(2425/2304)"
 
225
 
 
226
# Advanced scaling for specific output devices - how it works:
 
227
# DW = display width (px) (1024)
 
228
# DH = display height (px) (600)
 
229
# SAR = display sample aspect ratio, i.e. DAR * DH / DW (2425:2304)
 
230
# DAR = display aspect ratio, i.e. SAR * DW / DH (97:54)
 
231
# Variant: zoomed out
 
232
# vf-add = lavfi=graph="scale=floor(min(DW*min(1\,dar/DAR)\,in_w*max(1\,sar/SAR))/2+0.5)*2:floor(min(DH*min(DAR/dar\,1)\,in_h*max(SAR/sar\,1))/2+0.5)*2,setsar=sar=1"
 
233
# Variant: zoomed in
 
234
# vf-add = lavfi=graph="scale=floor(min(DW*max(1\,dar/DAR)\,in_w*max(1\,sar/SAR))/2+0.5)*2:floor(min(DH*max(DAR/dar\,1)\,in_h*max(SAR/sar\,1))/2+0.5)*2,setsar=sar=1"
 
235
# How it works:
 
236
# 1a: DW, DH*dar/DAR - fit to display width
 
237
# 1b: DH*DAR/dar, DH - fit to display height
 
238
# 1: the min of 1a and 1b these (i.e. fit inside both width and height); for zoomed in view, use the max
 
239
# 2a: in_w, in_h*SAR/sar - fit to original width
 
240
# 2b: in_w*sar/SAR, in_h - fit to original height
 
241
# 2: the max of 2a and 2b (i.e. avoid enlarging both dimensions - let HW scaling handle this)
 
242
# output: the min of 1 and 2 (i.e. fulfill both constraints)
 
243
# setsar=sar=1 to prevent scaling on the device (skip this if the device actually wants the proper SAR to be specified for not performing needless scaling)
 
244
#
 
245
# Simplified special case for SAR == 1, DAR == DW/DH:
 
246
# Variant: zoomed out
 
247
# vf-add = lavfi=graph="scale=floor(min(min(DW\,dar*DH)\,in_w*max(1\,sar))/2+0.5)*2:floor(min(min(DW/dar\,DH)\,in_h*max(1/sar\,1))/2+0.5)*2,setsar=sar=1"
 
248
# Variant: zoomed in
 
249
# vf-add = lavfi=graph="scale=floor(min(max(DW\,dar*DH)\,in_w*max(1\,sar))/2+0.5)*2:floor(min(max(DW/dar\,DH)\,in_h*max(1/sar\,1))/2+0.5)*2,setsar=sar=1"
 
250
# setsar=sar=1 to prevent nasty almost-1 SAR to be passed to the codec due to the rounding which can fail
 
251
#
 
252
# If the device supports file SAR properly, we can make use of it to avoid
 
253
# upscaling. The setsar=sar=sar/SAR at the end serves to fake the SAR for devices that don't know their own display's SAR.
 
254
# Variant: zoomed out
 
255
# vf-add = lavfi=graph="scale=floor(min(DW*min(1\,dar/DAR)\,in_w)/2+0.5)*2:floor(min(DH*min(DAR/dar\,1)\,in_h)/2+0.5)*2,setsar=sar=sar/SAR"
 
256
# Variant: zoomed in
 
257
# vf-add = lavfi=graph="scale=floor(min(DW*max(1\,dar/DAR)\,in_w)/2+0.5)*2:floor(min(DH*max(DAR/dar\,1)\,in_h)/2+0.5)*2,setsar=sar=sar/SAR"
 
258
# Simplified special case for SAR == 1, DAR == DW/DH:
 
259
# Variant: zoomed out
 
260
# vf-add = lavfi=graph="scale=floor(min(min(DW\,dar*DH)\,in_w)/2+0.5)*2:floor(min(min(DW/dar\,DH)\,in_h)/2+0.5)*2"
 
261
# Variant: zoomed in
 
262
# vf-add = lavfi=graph="scale=floor(min(max(DW\,dar*DH)\,in_w)/2+0.5)*2:floor(min(max(DW/dar\,DH)\,in_h)/2+0.5)*2"