polly-ffmpeg 0.1.9 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/VERSION.yml +4 -0
- data/features/ffmpeg.feature +9 -0
- data/features/steps/ffmpeg_steps.rb +0 -0
- data/features/support/env.rb +11 -0
- data/ffmpeg.gemspec +41 -5
- data/lib/ffmpeg/file_extensions.rb +150 -0
- data/lib/ffmpeg/video_advanced_options.rb +275 -0
- data/rdoc/classes/FFMpeg.html +299 -0
- data/rdoc/classes/FFMpeg/AudioOptions.html +341 -0
- data/rdoc/classes/FFMpeg/ClassMethods.html +140 -0
- data/rdoc/classes/FFMpeg/HelperMethods.html +141 -0
- data/rdoc/classes/FFMpeg/MainOptions.html +647 -0
- data/rdoc/classes/FFMpeg/VideoOptions.html +846 -0
- data/rdoc/classes/FFMpegCommand.html +216 -0
- data/rdoc/classes/FileExtensions.html +118 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README_textile.html +153 -0
- data/rdoc/files/lib/ffmpeg/audio_options_rb.html +101 -0
- data/rdoc/files/lib/ffmpeg/class_methods_rb.html +101 -0
- data/rdoc/files/lib/ffmpeg/ffmpeg_command_rb.html +101 -0
- data/rdoc/files/lib/ffmpeg/file_extensions_rb.html +101 -0
- data/rdoc/files/lib/ffmpeg/helper_methods_rb.html +101 -0
- data/rdoc/files/lib/ffmpeg/main_options_rb.html +101 -0
- data/rdoc/files/lib/ffmpeg/video_options_rb.html +101 -0
- data/rdoc/files/lib/ffmpeg_rb.html +114 -0
- data/rdoc/fr_class_index.html +34 -0
- data/rdoc/fr_file_index.html +35 -0
- data/rdoc/fr_method_index.html +85 -0
- data/rdoc/index.html +24 -0
- data/rdoc/rdoc-style.css +208 -0
- data/spec/video_advanced_options_spec.rb +349 -0
- metadata +39 -3
data/rdoc/index.html
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
5
|
+
|
6
|
+
<!--
|
7
|
+
|
8
|
+
ffmpeg
|
9
|
+
|
10
|
+
-->
|
11
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
12
|
+
<head>
|
13
|
+
<title>ffmpeg</title>
|
14
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
15
|
+
</head>
|
16
|
+
<frameset rows="20%, 80%">
|
17
|
+
<frameset cols="25%,35%,45%">
|
18
|
+
<frame src="fr_file_index.html" title="Files" name="Files" />
|
19
|
+
<frame src="fr_class_index.html" name="Classes" />
|
20
|
+
<frame src="fr_method_index.html" name="Methods" />
|
21
|
+
</frameset>
|
22
|
+
<frame src="files/README_textile.html" name="docwin" />
|
23
|
+
</frameset>
|
24
|
+
</html>
|
data/rdoc/rdoc-style.css
ADDED
@@ -0,0 +1,208 @@
|
|
1
|
+
|
2
|
+
body {
|
3
|
+
font-family: Verdana,Arial,Helvetica,sans-serif;
|
4
|
+
font-size: 90%;
|
5
|
+
margin: 0;
|
6
|
+
margin-left: 40px;
|
7
|
+
padding: 0;
|
8
|
+
background: white;
|
9
|
+
}
|
10
|
+
|
11
|
+
h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
|
12
|
+
h1 { font-size: 150%; }
|
13
|
+
h2,h3,h4 { margin-top: 1em; }
|
14
|
+
|
15
|
+
a { background: #eef; color: #039; text-decoration: none; }
|
16
|
+
a:hover { background: #039; color: #eef; }
|
17
|
+
|
18
|
+
/* Override the base stylesheet's Anchor inside a table cell */
|
19
|
+
td > a {
|
20
|
+
background: transparent;
|
21
|
+
color: #039;
|
22
|
+
text-decoration: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
/* and inside a section title */
|
26
|
+
.section-title > a {
|
27
|
+
background: transparent;
|
28
|
+
color: #eee;
|
29
|
+
text-decoration: none;
|
30
|
+
}
|
31
|
+
|
32
|
+
/* === Structural elements =================================== */
|
33
|
+
|
34
|
+
div#index {
|
35
|
+
margin: 0;
|
36
|
+
margin-left: -40px;
|
37
|
+
padding: 0;
|
38
|
+
font-size: 90%;
|
39
|
+
}
|
40
|
+
|
41
|
+
|
42
|
+
div#index a {
|
43
|
+
margin-left: 0.7em;
|
44
|
+
}
|
45
|
+
|
46
|
+
div#index .section-bar {
|
47
|
+
margin-left: 0px;
|
48
|
+
padding-left: 0.7em;
|
49
|
+
background: #ccc;
|
50
|
+
font-size: small;
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
div#classHeader, div#fileHeader {
|
55
|
+
width: auto;
|
56
|
+
color: white;
|
57
|
+
padding: 0.5em 1.5em 0.5em 1.5em;
|
58
|
+
margin: 0;
|
59
|
+
margin-left: -40px;
|
60
|
+
border-bottom: 3px solid #006;
|
61
|
+
}
|
62
|
+
|
63
|
+
div#classHeader a, div#fileHeader a {
|
64
|
+
background: inherit;
|
65
|
+
color: white;
|
66
|
+
}
|
67
|
+
|
68
|
+
div#classHeader td, div#fileHeader td {
|
69
|
+
background: inherit;
|
70
|
+
color: white;
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
div#fileHeader {
|
75
|
+
background: #057;
|
76
|
+
}
|
77
|
+
|
78
|
+
div#classHeader {
|
79
|
+
background: #048;
|
80
|
+
}
|
81
|
+
|
82
|
+
|
83
|
+
.class-name-in-header {
|
84
|
+
font-size: 180%;
|
85
|
+
font-weight: bold;
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
div#bodyContent {
|
90
|
+
padding: 0 1.5em 0 1.5em;
|
91
|
+
}
|
92
|
+
|
93
|
+
div#description {
|
94
|
+
padding: 0.5em 1.5em;
|
95
|
+
background: #efefef;
|
96
|
+
border: 1px dotted #999;
|
97
|
+
}
|
98
|
+
|
99
|
+
div#description h1,h2,h3,h4,h5,h6 {
|
100
|
+
color: #125;;
|
101
|
+
background: transparent;
|
102
|
+
}
|
103
|
+
|
104
|
+
div#validator-badges {
|
105
|
+
text-align: center;
|
106
|
+
}
|
107
|
+
div#validator-badges img { border: 0; }
|
108
|
+
|
109
|
+
div#copyright {
|
110
|
+
color: #333;
|
111
|
+
background: #efefef;
|
112
|
+
font: 0.75em sans-serif;
|
113
|
+
margin-top: 5em;
|
114
|
+
margin-bottom: 0;
|
115
|
+
padding: 0.5em 2em;
|
116
|
+
}
|
117
|
+
|
118
|
+
|
119
|
+
/* === Classes =================================== */
|
120
|
+
|
121
|
+
table.header-table {
|
122
|
+
color: white;
|
123
|
+
font-size: small;
|
124
|
+
}
|
125
|
+
|
126
|
+
.type-note {
|
127
|
+
font-size: small;
|
128
|
+
color: #DEDEDE;
|
129
|
+
}
|
130
|
+
|
131
|
+
.xxsection-bar {
|
132
|
+
background: #eee;
|
133
|
+
color: #333;
|
134
|
+
padding: 3px;
|
135
|
+
}
|
136
|
+
|
137
|
+
.section-bar {
|
138
|
+
color: #333;
|
139
|
+
border-bottom: 1px solid #999;
|
140
|
+
margin-left: -20px;
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
.section-title {
|
145
|
+
background: #79a;
|
146
|
+
color: #eee;
|
147
|
+
padding: 3px;
|
148
|
+
margin-top: 2em;
|
149
|
+
margin-left: -30px;
|
150
|
+
border: 1px solid #999;
|
151
|
+
}
|
152
|
+
|
153
|
+
.top-aligned-row { vertical-align: top }
|
154
|
+
.bottom-aligned-row { vertical-align: bottom }
|
155
|
+
|
156
|
+
/* --- Context section classes ----------------------- */
|
157
|
+
|
158
|
+
.context-row { }
|
159
|
+
.context-item-name { font-family: monospace; font-weight: bold; color: black; }
|
160
|
+
.context-item-value { font-size: small; color: #448; }
|
161
|
+
.context-item-desc { color: #333; padding-left: 2em; }
|
162
|
+
|
163
|
+
/* --- Method classes -------------------------- */
|
164
|
+
.method-detail {
|
165
|
+
background: #efefef;
|
166
|
+
padding: 0;
|
167
|
+
margin-top: 0.5em;
|
168
|
+
margin-bottom: 1em;
|
169
|
+
border: 1px dotted #ccc;
|
170
|
+
}
|
171
|
+
.method-heading {
|
172
|
+
color: black;
|
173
|
+
background: #ccc;
|
174
|
+
border-bottom: 1px solid #666;
|
175
|
+
padding: 0.2em 0.5em 0 0.5em;
|
176
|
+
}
|
177
|
+
.method-signature { color: black; background: inherit; }
|
178
|
+
.method-name { font-weight: bold; }
|
179
|
+
.method-args { font-style: italic; }
|
180
|
+
.method-description { padding: 0 0.5em 0 0.5em; }
|
181
|
+
|
182
|
+
/* --- Source code sections -------------------- */
|
183
|
+
|
184
|
+
a.source-toggle { font-size: 90%; }
|
185
|
+
div.method-source-code {
|
186
|
+
background: #262626;
|
187
|
+
color: #ffdead;
|
188
|
+
margin: 1em;
|
189
|
+
padding: 0.5em;
|
190
|
+
border: 1px dashed #999;
|
191
|
+
overflow: hidden;
|
192
|
+
}
|
193
|
+
|
194
|
+
div.method-source-code pre { color: #ffdead; overflow: hidden; }
|
195
|
+
|
196
|
+
/* --- Ruby keyword styles --------------------- */
|
197
|
+
|
198
|
+
.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
|
199
|
+
|
200
|
+
.ruby-constant { color: #7fffd4; background: transparent; }
|
201
|
+
.ruby-keyword { color: #00ffff; background: transparent; }
|
202
|
+
.ruby-ivar { color: #eedd82; background: transparent; }
|
203
|
+
.ruby-operator { color: #00ffee; background: transparent; }
|
204
|
+
.ruby-identifier { color: #ffdead; background: transparent; }
|
205
|
+
.ruby-node { color: #ffa07a; background: transparent; }
|
206
|
+
.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
|
207
|
+
.ruby-regexp { color: #ffa07a; background: transparent; }
|
208
|
+
.ruby-value { color: #7fffd4; background: transparent; }
|
@@ -0,0 +1,349 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/spec_helper'
|
2
|
+
|
3
|
+
describe "FFMpeg Video Advanced Options" do
|
4
|
+
before(:each) do
|
5
|
+
@from_file, @to_file = "~/Desktop/test.avi", "~/Desktop/test2.avi"
|
6
|
+
FFMpegCommand.clear
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should set the pixel format" do
|
10
|
+
convert @from_file, :to => @to_file do
|
11
|
+
pixel_format 'list'
|
12
|
+
end
|
13
|
+
|
14
|
+
FFMpegCommand.command("ffmpeg").should match(/-pix_fmt list/)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should set the SwScaler flags" do
|
18
|
+
convert @from_file, :to => @to_file do
|
19
|
+
swscaler_flags 'flag'
|
20
|
+
end
|
21
|
+
|
22
|
+
FFMpegCommand.command("ffmpeg").should match(/-sws_flags flag/)
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should set the group of pictures size" do
|
26
|
+
convert @from_file, :to => @to_file do
|
27
|
+
group_of_pictures_size 200
|
28
|
+
end
|
29
|
+
|
30
|
+
FFMpegCommand.command("ffmpeg").should match(/-g 200/)
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should set to use only intra frames" do
|
34
|
+
convert @from_file, :to => @to_file do
|
35
|
+
use_only_intra_frames
|
36
|
+
end
|
37
|
+
|
38
|
+
FFMpegCommand.command("ffmpeg").should match(/-intra/)
|
39
|
+
end
|
40
|
+
|
41
|
+
it "should set the discard threshold" do
|
42
|
+
convert @from_file, :to => @to_file do
|
43
|
+
video_discard_threshold 20
|
44
|
+
end
|
45
|
+
|
46
|
+
FFMpegCommand.command("ffmpeg").should match(/-vdt 20/)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "should set to use a fixed video quantizer scale" do
|
50
|
+
convert @from_file, :to => @to_file do
|
51
|
+
video_quantizer_scale 10
|
52
|
+
end
|
53
|
+
|
54
|
+
FFMpegCommand.command("ffmpeg").should match(/-qscale 10/)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "should set the minimum video quantizer scale" do
|
58
|
+
convert @from_file, :to => @to_file do
|
59
|
+
video_minimum_quantizer_scale 10
|
60
|
+
end
|
61
|
+
|
62
|
+
FFMpegCommand.command("ffmpeg").should match(/-qmin 10/)
|
63
|
+
end
|
64
|
+
|
65
|
+
it "should set the maximum video quantizer scale" do
|
66
|
+
convert @from_file, :to => @to_file do
|
67
|
+
video_maximum_quantizer_scale 10
|
68
|
+
end
|
69
|
+
|
70
|
+
FFMpegCommand.command("ffmpeg").should match(/-qmax 10/)
|
71
|
+
end
|
72
|
+
|
73
|
+
it "should set the maximum video quantizer difference" do
|
74
|
+
convert @from_file, :to => @to_file do
|
75
|
+
video_maximum_quantizer_difference 10
|
76
|
+
end
|
77
|
+
|
78
|
+
FFMpegCommand.command("ffmpeg").should match(/-qdiff 10/)
|
79
|
+
end
|
80
|
+
|
81
|
+
it "should set the video quantizer scale blur" do
|
82
|
+
convert @from_file, :to => @to_file do
|
83
|
+
video_quantizer_scale_blur 0.6
|
84
|
+
end
|
85
|
+
|
86
|
+
FFMpegCommand.command("ffmpeg").should match(/-qblur 0.6/)
|
87
|
+
end
|
88
|
+
|
89
|
+
it "should set the video quantizer scale compression" do
|
90
|
+
convert @from_file, :to => @to_file do
|
91
|
+
video_quantizer_scale_compression 0.7
|
92
|
+
end
|
93
|
+
|
94
|
+
FFMpegCommand.command("ffmpeg").should match(/-qcomp 0.7/)
|
95
|
+
end
|
96
|
+
|
97
|
+
it "should set the minimum video lagrange factor" do
|
98
|
+
convert @from_file, :to => @to_file do
|
99
|
+
video_minimum_lagrange_factor 10
|
100
|
+
end
|
101
|
+
|
102
|
+
FFMpegCommand.command("ffmpeg").should match(/-lmin 10/)
|
103
|
+
end
|
104
|
+
|
105
|
+
it "should set the maximum video lagrange factor" do
|
106
|
+
convert @from_file, :to => @to_file do
|
107
|
+
video_maximum_lagrange_factor 10
|
108
|
+
end
|
109
|
+
|
110
|
+
FFMpegCommand.command("ffmpeg").should match(/-lmax 10/)
|
111
|
+
end
|
112
|
+
|
113
|
+
it "should set the minimum video macroblock quantizer scale" do
|
114
|
+
convert @from_file, :to => @to_file do
|
115
|
+
video_minimum_macroblock_scale 10
|
116
|
+
end
|
117
|
+
|
118
|
+
FFMpegCommand.command("ffmpeg").should match(/-mblmin 10/)
|
119
|
+
end
|
120
|
+
|
121
|
+
it "should set the maximum video macroblock quantizer scale" do
|
122
|
+
convert @from_file, :to => @to_file do
|
123
|
+
video_maximum_macroblock_scale 10
|
124
|
+
end
|
125
|
+
|
126
|
+
FFMpegCommand.command("ffmpeg").should match(/-mblmax 10/)
|
127
|
+
end
|
128
|
+
|
129
|
+
it "should set the initial complexity for single pass encoding" do
|
130
|
+
convert @from_file, :to => @to_file do
|
131
|
+
initial_complexity 5
|
132
|
+
end
|
133
|
+
|
134
|
+
FFMpegCommand.command("ffmpeg").should match(/-rc_init_cplx 5/)
|
135
|
+
end
|
136
|
+
|
137
|
+
it "should set the qp factor between P-frames and B-frames" do
|
138
|
+
convert @from_file, :to => @to_file do
|
139
|
+
b_frame_factor 10
|
140
|
+
end
|
141
|
+
|
142
|
+
FFMpegCommand.command("ffmpeg").should match(/-b_qfactor 10/)
|
143
|
+
end
|
144
|
+
|
145
|
+
it "should set the qp factor between P-frames and I-frames" do
|
146
|
+
convert @from_file, :to => @to_file do
|
147
|
+
i_frame_factor 10
|
148
|
+
end
|
149
|
+
|
150
|
+
FFMpegCommand.command("ffmpeg").should match(/-i_qfactor 10/)
|
151
|
+
end
|
152
|
+
|
153
|
+
it "should set the qp offset between P-frames and B-frames" do
|
154
|
+
convert @from_file, :to => @to_file do
|
155
|
+
b_frame_offset 10
|
156
|
+
end
|
157
|
+
|
158
|
+
FFMpegCommand.command("ffmpeg").should match(/-b_qoffset 10/)
|
159
|
+
end
|
160
|
+
|
161
|
+
it "should set the qp offset between P-frames and I-frames" do
|
162
|
+
convert @from_file, :to => @to_file do
|
163
|
+
i_frame_offset 10
|
164
|
+
end
|
165
|
+
|
166
|
+
FFMpegCommand.command("ffmpeg").should match(/-i_qoffset 10/)
|
167
|
+
end
|
168
|
+
|
169
|
+
|
170
|
+
it "should set the rate control equation" do
|
171
|
+
convert @from_file, :to => @to_file do
|
172
|
+
rate_control_equation "tex^qComp"
|
173
|
+
end
|
174
|
+
|
175
|
+
FFMpegCommand.command("ffmpeg").should match(/-rc_eq string/)
|
176
|
+
end
|
177
|
+
|
178
|
+
it "should set the rate control override" do
|
179
|
+
convert @from_file, :to => @to_file do
|
180
|
+
rate_control_override 10
|
181
|
+
end
|
182
|
+
|
183
|
+
FFMpegCommand.command("ffmpeg").should match(/-rc_override 10/)
|
184
|
+
end
|
185
|
+
|
186
|
+
it "should set the motion estimation method" do
|
187
|
+
convert @from_file, :to => @to_file do
|
188
|
+
motion_estimation_method "hex"
|
189
|
+
end
|
190
|
+
|
191
|
+
FFMpegCommand.command("ffmpeg").should match(/-me_method hex/)
|
192
|
+
end
|
193
|
+
|
194
|
+
it "should set the DCT algorithm" do
|
195
|
+
convert @from_file, :to => @to_file do
|
196
|
+
dct_algorithm 5
|
197
|
+
end
|
198
|
+
|
199
|
+
FFMpegCommand.command("ffmpeg").should match(/-dct_algo 5/)
|
200
|
+
end
|
201
|
+
|
202
|
+
it "should set the IDCT algorithm" do
|
203
|
+
convert @from_file, :to => @to_file do
|
204
|
+
idct_algorithm 8
|
205
|
+
end
|
206
|
+
|
207
|
+
FFMpegCommand.command("ffmpeg").should match(/-idct_algo 8/)
|
208
|
+
end
|
209
|
+
|
210
|
+
it "should set error resilience" do
|
211
|
+
convert @from_file, :to => @to_file do
|
212
|
+
error_resilience 2
|
213
|
+
end
|
214
|
+
|
215
|
+
FFMpegCommand.command("ffmpeg").should match(/-er 2/)
|
216
|
+
end
|
217
|
+
|
218
|
+
it "should set error concealment" do
|
219
|
+
convert @from_file, :to => @to_file do
|
220
|
+
error_concealment 1
|
221
|
+
end
|
222
|
+
|
223
|
+
FFMpegCommand.command("ffmpeg").should match(/-ec 1/)
|
224
|
+
end
|
225
|
+
|
226
|
+
it "should set to use B-frames" do
|
227
|
+
convert @from_file, :to => @to_file do
|
228
|
+
b_frames 15
|
229
|
+
end
|
230
|
+
|
231
|
+
FFMpegCommand.command("ffmpeg").should match(/-bf 15/)
|
232
|
+
end
|
233
|
+
|
234
|
+
it "should set macroblock decision mode" do
|
235
|
+
convert @from_file, :to => @to_file do
|
236
|
+
macroblock_decision_mode 1
|
237
|
+
end
|
238
|
+
|
239
|
+
FFMpegCommand.command("ffmpeg").should match(/-mbd 1/)
|
240
|
+
end
|
241
|
+
|
242
|
+
it "should use four motion vector by macroblock" do
|
243
|
+
convert @from_file, :to => @to_file do
|
244
|
+
use_four_motion_vector
|
245
|
+
end
|
246
|
+
|
247
|
+
FFMpegCommand.command("ffmpeg").should match(/-4mv/)
|
248
|
+
end
|
249
|
+
|
250
|
+
it "should set to use data partitioning" do
|
251
|
+
convert @from_file, :to => @to_file do
|
252
|
+
use_data_partitioning
|
253
|
+
end
|
254
|
+
|
255
|
+
FFMpegCommand.command("ffmpeg").should match(/-part/)
|
256
|
+
end
|
257
|
+
|
258
|
+
# `-bug param'
|
259
|
+
# Work around encoder bugs that are not auto-detected.
|
260
|
+
|
261
|
+
it "should set how strictly to follow standards" do
|
262
|
+
convert @from_file, :to => @to_file do
|
263
|
+
strictness 3
|
264
|
+
end
|
265
|
+
|
266
|
+
FFMpegCommand.command("ffmpeg").should match(/-strict 3/)
|
267
|
+
end
|
268
|
+
|
269
|
+
it "should enable advanced intra coding" do
|
270
|
+
convert @from_file, :to => @to_file do
|
271
|
+
enable_advanced_intra_coding
|
272
|
+
end
|
273
|
+
|
274
|
+
FFMpegCommand.command("ffmpeg").should match(/-aic/)
|
275
|
+
end
|
276
|
+
|
277
|
+
it "should enable unlimited motion vector" do
|
278
|
+
convert @from_file, :to => @to_file do
|
279
|
+
enable_unlimited_motion_vector
|
280
|
+
end
|
281
|
+
|
282
|
+
FFMpegCommand.command("ffmpeg").should match(/-umv/)
|
283
|
+
end
|
284
|
+
|
285
|
+
it "should deinterlace pictures" do
|
286
|
+
convert @from_file, :to => @to_file do
|
287
|
+
deinterlace
|
288
|
+
end
|
289
|
+
|
290
|
+
FFMpegCommand.command("ffmpeg").should match(/-deinterlace/)
|
291
|
+
end
|
292
|
+
|
293
|
+
it "should force interlacing support in encoder" do
|
294
|
+
convert @from_file, :to => @to_file do
|
295
|
+
interlacing_support
|
296
|
+
end
|
297
|
+
|
298
|
+
FFMpegCommand.command("ffmpeg").should match(/-ilme/)
|
299
|
+
end
|
300
|
+
|
301
|
+
it "should calculate PSNR of compressed frames" do
|
302
|
+
convert @from_file, :to => @to_file do
|
303
|
+
calculate_psnr
|
304
|
+
end
|
305
|
+
|
306
|
+
FFMpegCommand.command("ffmpeg").should match(/-psnr/)
|
307
|
+
end
|
308
|
+
|
309
|
+
it "should dump video coding statistic to log file" do
|
310
|
+
convert @from_file, :to => @to_file do
|
311
|
+
dump_video_statistics
|
312
|
+
end
|
313
|
+
|
314
|
+
FFMpegCommand.command("ffmpeg").should match(/-vstats/)
|
315
|
+
end
|
316
|
+
|
317
|
+
it "should dump video statistics to named file" do
|
318
|
+
convert @from_file, :to => @to_file do
|
319
|
+
dump_video_statistics "video_stats.log"
|
320
|
+
end
|
321
|
+
|
322
|
+
FFMpegCommand.command("ffmpeg").should match(/-vstats_file video_stats.log/)
|
323
|
+
end
|
324
|
+
|
325
|
+
# `-top n'
|
326
|
+
# top=1/bottom=0/auto=-1 field first
|
327
|
+
|
328
|
+
# `-dc precision'
|
329
|
+
# Intra_dc_precision.
|
330
|
+
|
331
|
+
# `-vtag fourcc/tag'
|
332
|
+
# Force video tag/fourcc.
|
333
|
+
|
334
|
+
it "should show QP histogram" do
|
335
|
+
convert @from_file, :to => @to_file do
|
336
|
+
show_qp_histogram
|
337
|
+
end
|
338
|
+
|
339
|
+
FFMpegCommand.command("ffmpeg").should match(/-qphist/)
|
340
|
+
end
|
341
|
+
|
342
|
+
it "should set the video bitstream filter" do
|
343
|
+
convert @from_file, :to => @to_file do
|
344
|
+
video_bitstream_filter "dump_extra"
|
345
|
+
end
|
346
|
+
|
347
|
+
FFMpegCommand.command("ffmpeg").should match(/-vbsf dump_extra/)
|
348
|
+
end
|
349
|
+
end
|