stlondemand-rvideo 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. data/CHANGELOG +70 -0
  2. data/ENV +100 -0
  3. data/ENV2 +129 -0
  4. data/LICENSE +20 -0
  5. data/Manifest +72 -0
  6. data/README +106 -0
  7. data/RULES +11 -0
  8. data/Rakefile +63 -0
  9. data/config/boot.rb +25 -0
  10. data/lib/rvideo.rb +49 -0
  11. data/lib/rvideo/command_executor.rb +91 -0
  12. data/lib/rvideo/errors.rb +24 -0
  13. data/lib/rvideo/float.rb +7 -0
  14. data/lib/rvideo/frame_capturer.rb +139 -0
  15. data/lib/rvideo/inspector.rb +519 -0
  16. data/lib/rvideo/reporter.rb +176 -0
  17. data/lib/rvideo/reporter/views/index.html.erb +27 -0
  18. data/lib/rvideo/reporter/views/report.css +27 -0
  19. data/lib/rvideo/reporter/views/report.html.erb +81 -0
  20. data/lib/rvideo/reporter/views/report.js +9 -0
  21. data/lib/rvideo/string.rb +5 -0
  22. data/lib/rvideo/tools/abstract_tool.rb +459 -0
  23. data/lib/rvideo/tools/ffmpeg.rb +314 -0
  24. data/lib/rvideo/tools/ffmpeg2theora.rb +72 -0
  25. data/lib/rvideo/tools/flvtool2.rb +50 -0
  26. data/lib/rvideo/tools/handbrakecli.rb +61 -0
  27. data/lib/rvideo/tools/lame.rb +58 -0
  28. data/lib/rvideo/tools/mencoder.rb +126 -0
  29. data/lib/rvideo/tools/mp4box.rb +21 -0
  30. data/lib/rvideo/tools/mp4creator.rb +35 -0
  31. data/lib/rvideo/tools/mplayer.rb +31 -0
  32. data/lib/rvideo/tools/qtfaststart.rb +37 -0
  33. data/lib/rvideo/tools/segmenter.rb +29 -0
  34. data/lib/rvideo/tools/yamdi.rb +44 -0
  35. data/lib/rvideo/transcoder.rb +170 -0
  36. data/lib/rvideo/version.rb +9 -0
  37. data/scripts/txt2html +67 -0
  38. data/spec/files/boat.avi +0 -0
  39. data/spec/files/kites.mp4 +0 -0
  40. data/spec/fixtures/ffmpeg_builds.yml +28 -0
  41. data/spec/fixtures/ffmpeg_results.yml +608 -0
  42. data/spec/fixtures/files.yml +398 -0
  43. data/spec/fixtures/recipes.yml +58 -0
  44. data/spec/integrations/formats_spec.rb +315 -0
  45. data/spec/integrations/frame_capturer_spec.rb +26 -0
  46. data/spec/integrations/inspection_spec.rb +125 -0
  47. data/spec/integrations/recipes_spec.rb +0 -0
  48. data/spec/integrations/rvideo_spec.rb +17 -0
  49. data/spec/integrations/transcoder_integration_spec.rb +29 -0
  50. data/spec/integrations/transcoding_spec.rb +9 -0
  51. data/spec/spec.opts +1 -0
  52. data/spec/spec_helper.rb +16 -0
  53. data/spec/support.rb +36 -0
  54. data/spec/units/abstract_tool_spec.rb +111 -0
  55. data/spec/units/command_executor_spec.rb +106 -0
  56. data/spec/units/ffmpeg_spec.rb +385 -0
  57. data/spec/units/flvtool2_spec.rb +323 -0
  58. data/spec/units/frame_capturer_spec.rb +71 -0
  59. data/spec/units/inspector_spec.rb +59 -0
  60. data/spec/units/mencoder_spec.rb +4994 -0
  61. data/spec/units/mp4box_spec.rb +34 -0
  62. data/spec/units/mp4creator_spec.rb +34 -0
  63. data/spec/units/mplayer_spec.rb +34 -0
  64. data/spec/units/qtfaststart_spec.rb +35 -0
  65. data/spec/units/string_spec.rb +8 -0
  66. data/spec/units/transcoder_spec.rb +154 -0
  67. data/stlondemand-rvideo.gemspec +36 -0
  68. data/tasks/deployment.rake +5 -0
  69. data/tasks/testing.rake +27 -0
  70. data/tasks/transcoding.rake +40 -0
  71. data/tasks/website.rake +8 -0
  72. data/test_progress_reporting.rb +14 -0
  73. metadata +187 -0
@@ -0,0 +1,9 @@
1
+ module RVideo #:nodoc:
2
+ module VERSION #:nodoc:
3
+ MAJOR = 0
4
+ MINOR = 9
5
+ TINY = 6
6
+
7
+ STRING = [MAJOR, MINOR, TINY].join('.')
8
+ end
9
+ end
@@ -0,0 +1,67 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'redcloth'
5
+ require 'syntax/convertors/html'
6
+ require 'erb'
7
+ require File.dirname(__FILE__) + '/../lib/rvideo/version.rb'
8
+
9
+ version = Rvideo::VERSION::STRING
10
+ download = 'http://rubyforge.org/projects/rvideo'
11
+
12
+ class Fixnum
13
+ def ordinal
14
+ # teens
15
+ return 'th' if (10..19).include?(self % 100)
16
+ # others
17
+ case self % 10
18
+ when 1: return 'st'
19
+ when 2: return 'nd'
20
+ when 3: return 'rd'
21
+ else return 'th'
22
+ end
23
+ end
24
+ end
25
+
26
+ class Time
27
+ def pretty
28
+ return "#{mday}#{mday.ordinal} #{strftime('%B')} #{year}"
29
+ end
30
+ end
31
+
32
+ def convert_syntax(syntax, source)
33
+ return Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r!^<pre>|</pre>$!,'')
34
+ end
35
+
36
+ if ARGV.length >= 1
37
+ src, template = ARGV
38
+ template ||= File.dirname(__FILE__) + '/../website/template.rhtml'
39
+
40
+ else
41
+ puts("Usage: #{File.split($0).last} source.txt [template.rhtml] > output.html")
42
+ exit!
43
+ end
44
+
45
+ template = ERB.new(File.open(template).read)
46
+
47
+ title = nil
48
+ body = nil
49
+ File.open(src) do |fsrc|
50
+ title_text = fsrc.readline
51
+ body_text = fsrc.read
52
+ syntax_items = []
53
+ body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)</>!m){
54
+ ident = syntax_items.length
55
+ element, syntax, source = $1, $2, $3
56
+ syntax_items << "<#{element} class='syntax'>#{convert_syntax(syntax, source)}</#{element}>"
57
+ "syntax-temp-#{ident}"
58
+ }
59
+ title = RedCloth.new(title_text).to_html.gsub(%r!<.*?>!,'').strip
60
+ body = RedCloth.new(body_text).to_html
61
+ body.gsub!(%r!(?:<pre><code>)?syntax-temp-(d+)(?:</code></pre>)?!){ syntax_items[$1.to_i] }
62
+ end
63
+ stat = File.stat(src)
64
+ created = stat.ctime
65
+ modified = stat.mtime
66
+
67
+ $stdout << template.result(binding)
Binary file
Binary file
@@ -0,0 +1,28 @@
1
+ darwinports:
2
+ response: |
3
+ FFmpeg version SVN-r6399, Copyright (c) 2000-2004 Fabrice Bellard
4
+ configuration: --prefix=/opt/local --prefix=/opt/local --disable-vhook --mandir=/opt/local/share/man --extra-cflags=-DHAVE_LRINTF --extra-ldflags=-d -L/opt/local/lib --enable-gpl --enable-mp3lame --enable-libogg --enable-vorbis --enable-faac --enable-faad --enable-xvid --enable-x264 --enable-a52 --enable-dts
5
+ libavutil version: 49.0.1
6
+ libavcodec version: 51.16.0
7
+ libavformat version: 50.5.0
8
+ built on Mar 29 2007 17:18:04, gcc: 4.0.1 (Apple Computer, Inc. build 5367)
9
+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'spec/files/kites.mp4':
10
+ Duration: 00:00:19.6, start: 0.000000, bitrate: 98 kb/s
11
+ Stream #0.0(und): Video: mpeg4, yuv420p, 176x144, 10.00 fps(r)
12
+ Stream #0.1(und): Audio: samr / 0x726D6173, 8000 Hz, mono
13
+ Must supply at least one output file
14
+
15
+ osx_intel_1:
16
+ response: |
17
+ FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
18
+ Mac OSX universal build for ffmpegX
19
+ configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
20
+ libavutil version: 49.0.0
21
+ libavcodec version: 51.9.0
22
+ libavformat version: 50.4.0
23
+ built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
24
+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'spec/files/kites.mp4':
25
+ Duration: 00:00:19.6, start: 0.000000, bitrate: 98 kb/s
26
+ Stream #0.0(und), 10.00 fps(r): Video: mpeg4, yuv420p, 176x144
27
+ Stream #0.1(und): Audio: amr_nb, 8000 Hz, mono
28
+ Must supply at least one output file
@@ -0,0 +1,608 @@
1
+ # TODO descriptive names for these would be nice..
2
+
3
+ result1: |
4
+ FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
5
+ Mac OSX universal build for ffmpegX
6
+ configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
7
+ libavutil version: 49.0.0
8
+ libavcodec version: 51.9.0
9
+ libavformat version: 50.4.0
10
+ built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
11
+
12
+ Seems that stream 1 comes from film source: 600.00 (600/1) -> 59.75 (239/4)
13
+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'jobjob2.mov':
14
+ Duration: 00:01:09.0, start: 0.000000, bitrate: 28847 kb/s
15
+ Stream #0.0(eng): Audio: aac, 44100 Hz, stereo
16
+ Stream #0.1(eng), 59.75 fps(r): Video: dvvideo, yuv411p, 720x480
17
+ Stream mapping:
18
+ Stream #0.1 -> #0.0
19
+ Stream #0.0 -> #0.1
20
+ Press [q] to stop encoding
21
+ frame= 4126 q=31.0 Lsize= 5917kB time=69.1 bitrate= 702.0kbits/s
22
+ video:2417kB audio:540kB global headers:0kB muxing overhead 100.140277%
23
+
24
+ result2: |
25
+ FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
26
+ Mac OSX universal build for ffmpegX
27
+ configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
28
+ libavutil version: 49.0.0
29
+ libavcodec version: 51.9.0
30
+ libavformat version: 50.4.0
31
+ built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
32
+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/jon/code/spinoza/rvideo/config/../spec/files/kites.mp4':
33
+ Duration: 00:00:19.6, start: 0.000000, bitrate: 98 kb/s
34
+ Stream #0.0(und), 10.00 fps(r): Video: mpeg4, yuv420p, 176x144
35
+ Stream #0.1(und): Audio: amr_nb, 8000 Hz, mono
36
+ Output #0, avi, to '/Users/jon/code/spinoza/rvideo/config/../tmp/kites-transcoded.avi':
37
+ Stream #0.0, 29.97 fps(c): Video: xvid, yuv420p, 320x240, q=2-31, 200 kb/s
38
+ Stream #0.1: Audio: mp3, 44100 Hz, mono, 64 kb/s
39
+ Stream mapping:
40
+ Stream #0.0 -> #0.0
41
+ Stream #0.1 -> #0.1
42
+ Press [q] to stop, [?] for help
43
+ frame= 584 q=6.0 Lsize= 708kB time=19.5 bitrate= 297.8kbits/s
44
+ video:49kB audio:153kB global headers:0kB muxing overhead 250.444444%
45
+
46
+ result3: |
47
+ FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
48
+ Mac OSX universal build for ffmpegX
49
+ configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
50
+ libavutil version: 49.0.0
51
+ libavcodec version: 51.9.0
52
+ libavformat version: 50.4.0
53
+ built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
54
+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/jon/code/spinoza/rvideo/config/../spec/files/kites.mp4':
55
+ Duration: 00:00:19.6, start: 0.000000, bitrate: 98 kb/s
56
+ Stream #0.0(und), 10.00 fps(r): Video: mpeg4, yuv420p, 176x144
57
+ Stream #0.1(und): Audio: amr_nb, 8000 Hz, mono
58
+ Output #0, avi, to '/Users/jon/code/spinoza/rvideo/config/../tmp/kites-transcoded.avi':
59
+ Stream #0.0, 29.97 fps(c): Video: xvid, yuv420p, 320x240, q=2-31, 200 kb/s
60
+ Stream #0.1: Audio: mp3, 44100 Hz, mono, 64 kb/s
61
+ Stream mapping:
62
+ Stream #0.0 -> #0.0
63
+ Stream #0.1 -> #0.1
64
+ Press [q] to stop encoding
65
+ frame= 273 fps= 31 q=10.0 Lsize= 398kB time=5.9 bitrate= 551.8kbits/s
66
+ video:284kB audio:92kB global headers:0kB muxing overhead 5.723981%
67
+
68
+ result4: |
69
+ FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2007 Fabrice Bellard, et al.
70
+ configuration: --prefix=/opt/local --prefix=/opt/local --disable-vhook --mandir=/opt/local/share/man --enable-shared --enable-pthreads --enable-libmp3lame --enable-gpl --enable-libfaac --enable-libfaad --enable-xvid --enable-x264
71
+ libavutil version: 49.4.0
72
+ libavcodec version: 51.40.4
73
+ libavformat version: 51.12.1
74
+ built on Sep 19 2007 11:30:28, gcc: 4.0.1 (Apple Computer, Inc. build 5367)
75
+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Eric/Projects/rvidtest/rvideo/report/input_files/jobjob.mov':
76
+ Duration: 00:01:12.0, start: 0.000000, bitrate: 972 kb/s
77
+ Stream #0.0(eng): Video: mpeg4, yuv420p, 512x384, 29.97 fps(r)
78
+ Stream #0.1(eng): Audio: mp3, 48000 Hz, stereo
79
+ Output #0, mp3, to '/Users/Eric/Projects/rvidtest/rvideo/report/generated_reports/62/output_files/jobjob_mov/private_mp3.mp3':
80
+ Stream #0.0: Audio: mp3, 48000 Hz, stereo, 0 kb/s
81
+ Stream mapping:
82
+ Stream #0.1 -> #0.0
83
+ Press [q] to stop encoding
84
+ mdb:94, lastbuf:0 skipping granule 0
85
+ size= 1080kB time=69.1 bitrate= 128.0kbits /s
86
+ video:0kB audio:1080kB global headers:0kB muxing overhead 0.002893%
87
+
88
+ ###
89
+
90
+ amr_nb_not_supported: |
91
+ Unexpected result details (FFmpeg version SVN-r9102, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --prefix=/opt/local --prefix=/opt/local --disable-vhook --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-mmx --enable-gpl --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-libtheora --enable-libfaac --enable-libfaad --enable-xvid --enable-x264 --enable-liba52 libavutil version: 49.4.0 libavcodec version: 51.40.4 libavformat version: 51.12.1 built on Dec 20 2007 13:49:31, gcc: 4.0.1 (Apple Inc. build 5465) Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 29.97 (30000/1001) Input #0, avi, from '/Users/swd/Sites/worker/tmp/22/1989-Onboard-Hungaroring-Piquet.avi': Duration: 00:01:37.3, start: 0.000000, bitrate: 1393 kb/s Stream #0.0: Video: mpeg4, yuv420p, 512x384, 29.97 fps(r) Stream #0.1: Audio: mp3, 24000 Hz, stereo, 40 kb/s Unknown codec 'amr_nb' )
92
+
93
+ missing_command: |
94
+ FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
95
+ Mac OSX universal build for ffmpegX
96
+ configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
97
+ libavutil version: 49.0.0
98
+ libavcodec version: 51.9.0
99
+ libavformat version: 50.4.0
100
+ built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
101
+ usage: ffmpeg [[infile options] -i infile]... {[outfile options] outfile}...
102
+ Hyper fast Audio and Video encoder
103
+
104
+ Main options:
105
+ -L show license
106
+ -h show help
107
+ -version show version
108
+ -formats show available formats, codecs, protocols, ...
109
+ -f fmt force format
110
+ -img img_fmt force image format
111
+ -i filename input file name
112
+ -y overwrite output files
113
+ -t duration set the recording time
114
+ -fs limit_size set the limit file size
115
+ -ss time_off set the start time offset
116
+ -itsoffset time_off set the input ts offset
117
+ -title string set the title
118
+ -timestamp time set the timestamp
119
+ -author string set the author
120
+ -copyright string set the copyright
121
+ -comment string set the comment
122
+ -v verbose control amount of logging
123
+ -target type specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\", \"dv50\", \pal-vcd\", \"ntsc-svcd\", ...)
124
+ -dframes number set the number of data frames to record
125
+ -scodec codec force subtitle codec ('copy' to copy stream)
126
+ -newsubtitle add a new subtitle stream to the current output stream
127
+ -slang code set the ISO 639 language code (3 letters) of the current subtitle stream
128
+
129
+ Video options:
130
+ -b bitrate set video bitrate (in kbit/s)
131
+ -vframes number set the number of video frames to record
132
+ -r rate set frame rate (Hz value, fraction or abbreviation)
133
+ -s size set frame size (WxH or abbreviation)
134
+ -aspect aspect set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
135
+ -croptop size set top crop band size (in pixels)
136
+ -cropbottom size set bottom crop band size (in pixels)
137
+ -cropleft size set left crop band size (in pixels)
138
+ -cropright size set right crop band size (in pixels)
139
+ -padtop size set top pad band size (in pixels)
140
+ -padbottom size set bottom pad band size (in pixels)
141
+ -padleft size set left pad band size (in pixels)
142
+ -padright size set right pad band size (in pixels)
143
+ -padcolor color set color of pad bands (Hex 000000 thru FFFFFF)
144
+ -vn disable video
145
+ -bt tolerance set video bitrate tolerance (in kbit/s)
146
+ -maxrate bitrate set max video bitrate tolerance (in kbit/s)
147
+ -minrate bitrate set min video bitrate tolerance (in kbit/s)
148
+ -bufsize size set ratecontrol buffer size (in kByte)
149
+ -vcodec codec force video codec ('copy' to copy stream)
150
+ -sameq use same video quality as source (implies VBR)
151
+ -pass n select the pass number (1 or 2)
152
+ -passlogfile file select two pass log file name
153
+ -newvideo add a new video stream to the current output stream
154
+
155
+ Advanced Video options:
156
+ -pix_fmt format set pixel format
157
+ -g gop_size set the group of picture size
158
+ -intra use only intra frames
159
+ -vdt n discard threshold
160
+ -qscale q use fixed video quantiser scale (VBR)
161
+ -qmin q min video quantiser scale (VBR)
162
+ -qmax q max video quantiser scale (VBR)
163
+ -lmin lambda min video lagrange factor (VBR)
164
+ -lmax lambda max video lagrange factor (VBR)
165
+ -mblmin q min macroblock quantiser scale (VBR)
166
+ -mblmax q max macroblock quantiser scale (VBR)
167
+ -qdiff q max difference between the quantiser scale (VBR)
168
+ -qblur blur video quantiser scale blur (VBR)
169
+ -qsquish squish how to keep quantiser between qmin and qmax (0 = clip, 1 = use differentiable function)
170
+ -qcomp compression video quantiser scale compression (VBR)
171
+ -rc_init_cplx complexity initial complexity for 1-pass encoding
172
+ -b_qfactor factor qp factor between p and b frames
173
+ -i_qfactor factor qp factor between p and i frames
174
+ -b_qoffset offset qp offset between p and b frames
175
+ -i_qoffset offset qp offset between p and i frames
176
+ -ibias bias intra quant bias
177
+ -pbias bias inter quant bias
178
+ -rc_eq equation set rate control equation
179
+ -rc_override override rate control override for specific intervals
180
+ -me method set motion estimation method
181
+ -me_threshold motion estimaton threshold
182
+ -mb_threshold macroblock threshold
183
+ -bf frames use 'frames' B frames
184
+ -preme pre motion estimation
185
+ -bug param workaround not auto detected encoder bugs
186
+ -strict strictness how strictly to follow the standards
187
+ -deinterlace deinterlace pictures
188
+ -psnr calculate PSNR of compressed frames
189
+ -vstats dump video coding statistics to file
190
+ -vhook module insert video processing module
191
+ -intra_matrix matrix specify intra matrix coeffs
192
+ -inter_matrix matrix specify inter matrix coeffs
193
+ -top top=1/bottom=0/auto=-1 field first
194
+ -sc_threshold threshold scene change threshold
195
+ -me_range range limit motion vectors range (1023 for DivX player)
196
+ -dc precision intra_dc_precision
197
+ -mepc factor (1.0 = 256) motion estimation bitrate penalty compensation
198
+ -vtag fourcc/tag force video tag/fourcc
199
+ -skip_threshold threshold frame skip threshold
200
+ -skip_factor factor frame skip factor
201
+ -skip_exp exponent frame skip exponent
202
+ -genpts generate pts
203
+ -qphist show QP histogram
204
+
205
+ Audio options:
206
+ -aframes number set the number of audio frames to record
207
+ -ab bitrate set audio bitrate (in kbit/s)
208
+ -aq quality set audio quality (codec-specific)
209
+ -ar rate set audio sampling rate (in Hz)
210
+ -ac channels set number of audio channels
211
+ -an disable audio
212
+ -acodec codec force audio codec ('copy' to copy stream)
213
+ -vol volume change audio volume (256=normal)
214
+ -newaudio add a new audio stream to the current output stream
215
+ -alang code set the ISO 639 language code (3 letters) of the current audio stream
216
+
217
+ Advanced Audio options:
218
+ -atag fourcc/tag force audio tag/fourcc
219
+
220
+ Subtitle options:
221
+ -scodec codec force subtitle codec ('copy' to copy stream)
222
+ -newsubtitle add a new subtitle stream to the current output stream
223
+ -slang code set the ISO 639 language code (3 letters) of the current subtitle stream
224
+
225
+ Audio/Video grab options:
226
+ -vd device set video grab device
227
+ -vc channel set video grab channel (DV1394 only)
228
+ -tvstd standard set television standard (NTSC, PAL (SECAM))
229
+ -ad device set audio device
230
+ -grab format request grabbing using
231
+ -gd device set grab device
232
+
233
+ Advanced options:
234
+ -map file:stream[:syncfile:syncstream] set input stream mapping
235
+ -map_meta_data outfile:infile set meta data information of outfile from infile
236
+ -benchmark add timings for benchmarking
237
+ -dump dump each input packet
238
+ -hex when dumping packets, also dump the payload
239
+ -re read input at native frame rate
240
+ -loop_input loop (current only works with images)
241
+ -loop_output number of times to loop output in formats that support looping (0 loops forever)
242
+ -threads count thread count
243
+ -vsync video sync method
244
+ -async audio sync method
245
+ -vglobal video global header storage type
246
+ -copyts copy timestamps
247
+ -shortest finish encoding within shortest input
248
+ -dts_delta_threshold timestamp discontinuity delta threshold
249
+ -ps size set packet size in bits
250
+ -error rate error rate
251
+ -muxrate rate set mux rate
252
+ -packetsize size set packet size
253
+ -muxdelay seconds set the maximum demux-decode delay
254
+ -muxpreload seconds set the initial demux-decode delay
255
+ AVCodecContext AVOptions:
256
+ -bit_rate <int> E.VA.
257
+ -bit_rate_tolerance <int> E.V..
258
+ -flags <flags> EDVA.
259
+ -mv4 E.V.. use four motion vector by macroblock (mpeg4)
260
+ -obmc E.V.. use overlapped block motion compensation (h263+)
261
+ -qpel E.V.. use 1/4 pel motion compensation
262
+ -loop E.V.. use loop filter
263
+ -gmc E.V.. use gmc
264
+ -mv0 E.V.. always try a mb with mv=<0,0>
265
+ -part E.V.. use data partitioning
266
+ -gray EDV.. only decode/encode grayscale
267
+ -psnr E.V.. error[?] variables will be set during encoding
268
+ -naq E.V.. normalize adaptive quantization
269
+ -ildct E.V.. use interlaced dct
270
+ -low_delay .DV.. force low delay
271
+ -alt E.V.. enable alternate scantable (mpeg2/mpeg4)
272
+ -trell E.V.. use trellis quantization
273
+ -bitexact EDVAS use only bitexact stuff (except (i)dct)
274
+ -aic E.V.. h263 advanced intra coding / mpeg4 ac prediction
275
+ -umv E.V.. use unlimited motion vectors
276
+ -cbp E.V.. use rate distortion optimization for cbp
277
+ -qprd E.V.. use rate distortion optimization for qp selection
278
+ -aiv E.V.. h263 alternative inter vlc
279
+ -slice E.V..
280
+ -ilme E.V.. interlaced motion estimation
281
+ -scan_offset E.V.. will reserve space for svcd scan offset user data
282
+ -cgop E.V.. closed gop
283
+ -fast E.V.. allow non spec compliant speedup tricks
284
+ -sgop E.V.. strictly enforce gop size
285
+ -noout E.V.. skip bitstream encoding
286
+ -local_header E.V.. place global headers at every keyframe instead of in extradata
287
+ -me_method <int> E.V..
288
+ -gop_size <int> E.V..
289
+ -cutoff <int> E..A. set cutoff bandwidth
290
+ -qcompress <float> E.V..
291
+ -qblur <float> E.V..
292
+ -qmin <int> E.V..
293
+ -qmax <int> E.V..
294
+ -max_qdiff <int> E.V..
295
+ -max_b_frames <int> E.V..
296
+ -b_quant_factor <float> E.V..
297
+ -rc_strategy <int> E.V..
298
+ -b_strategy <int> E.V..
299
+ -hurry_up <int> .DV..
300
+ -bugs <int> .DV..
301
+ -autodetect .DV..
302
+ -old_msmpeg4 .DV..
303
+ -xvid_ilace .DV..
304
+ -ump4 .DV..
305
+ -no_padding .DV..
306
+ -amv .DV..
307
+ -ac_vlc .DV..
308
+ -qpel_chroma .DV..
309
+ -std_qpel .DV..
310
+ -qpel_chroma2 .DV..
311
+ -direct_blocksize .DV..
312
+ -edge .DV..
313
+ -hpel_chroma .DV..
314
+ -dc_clip .DV..
315
+ -ms .DV..
316
+ -lelim <int> E.V.. single coefficient elimination threshold for luminance (negative values also consider dc coefficient)
317
+ -celim <int> E.V.. single coefficient elimination threshold for chrominance (negative values also consider dc coefficient)
318
+ -strict <int> E.V..
319
+ -very E.V..
320
+ -strict E.V..
321
+ -normal E.V..
322
+ -inofficial E.V..
323
+ -experimental E.V..
324
+ -b_quant_offset <float> E.V..
325
+ -er <int> .DV..
326
+ -careful .DV..
327
+ -compliant .DV..
328
+ -aggressive .DV..
329
+ -very_aggressive .DV..
330
+ -mpeg_quant <int> E.V..
331
+ -rc_qsquish <float> E.V..
332
+ -rc_qmod_amp <float> E.V..
333
+ -rc_qmod_freq <int> E.V..
334
+ -rc_eq <string> E.V..
335
+ -rc_max_rate <int> E.V..
336
+ -rc_min_rate <int> E.V..
337
+ -rc_buffer_size <int> E.V..
338
+ -rc_buf_aggressivity <float> E.V..
339
+ -i_quant_factor <float> E.V..
340
+ -i_quant_offset <float> E.V..
341
+ -rc_initial_cplx <float> E.V..
342
+ -dct <int> E.V..
343
+ -auto E.V..
344
+ -fastint E.V..
345
+ -int E.V..
346
+ -mmx E.V..
347
+ -mlib E.V..
348
+ -altivec E.V..
349
+ -faan E.V..
350
+ -lumi_mask <float> E.V.. lumimasking
351
+ -tcplx_mask <float> E.V.. temporal complexity masking
352
+ -scplx_mask <float> E.V.. spatial complexity masking
353
+ -p_mask <float> E.V.. inter masking
354
+ -dark_mask <float> E.V.. darkness masking
355
+ -idct <int> EDV..
356
+ -auto EDV..
357
+ -int EDV..
358
+ -simple EDV..
359
+ -simplemmx EDV..
360
+ -libmpeg2mmx EDV..
361
+ -ps2 EDV..
362
+ -mlib EDV..
363
+ -arm EDV..
364
+ -altivec EDV..
365
+ -sh4 EDV..
366
+ -simplearm EDV..
367
+ -h264 EDV..
368
+ -vp3 EDV..
369
+ -ipp EDV..
370
+ -xvidmmx EDV..
371
+ -ec <flags> .DV..
372
+ -guess_mvs .DV..
373
+ -deblock .DV..
374
+ -pred <int> E.V.. prediction method
375
+ -left E.V..
376
+ -plane E.V..
377
+ -median E.V..
378
+ -aspect <rational> E.V..
379
+ -debug <flags> EDVAS print specific debug info
380
+ -pict .DV..
381
+ -rc E.V..
382
+ -bitstream .DV..
383
+ -mb_type .DV..
384
+ -qp .DV..
385
+ -mv .DV..
386
+ -dct_coeff .DV..
387
+ -skip .DV..
388
+ -startcode .DV..
389
+ -pts .DV..
390
+ -er .DV..
391
+ -mmco .DV..
392
+ -bugs .DV..
393
+ -vis_qp .DV..
394
+ -vis_mb_type .DV..
395
+ -vismv <int> .DV.. visualize motion vectors
396
+ -pf .DV..
397
+ -bf .DV..
398
+ -bb .DV..
399
+ -mb_qmin <int> E.V..
400
+ -mb_qmax <int> E.V..
401
+ -cmp <int> E.V.. full pel me compare function
402
+ -subcmp <int> E.V.. sub pel me compare function
403
+ -mbcmp <int> E.V.. macroblock compare function
404
+ -ildctcmp <int> E.V.. interlaced dct compare function
405
+ -dia_size <int> E.V..
406
+ -last_pred <int> E.V..
407
+ -preme <int> E.V..
408
+ -precmp <int> E.V.. pre motion estimation compare function
409
+ -sad E.V..
410
+ -sse E.V..
411
+ -satd E.V..
412
+ -dct E.V..
413
+ -psnr E.V..
414
+ -bit E.V..
415
+ -rd E.V..
416
+ -zero E.V..
417
+ -vsad E.V..
418
+ -vsse E.V..
419
+ -nsse E.V..
420
+ -w53 E.V..
421
+ -w97 E.V..
422
+ -dctmax E.V..
423
+ -chroma E.V..
424
+ -pre_dia_size <int> E.V..
425
+ -subq <int> E.V.. sub pel motion estimation quality
426
+ -me_range <int> E.V..
427
+ -ibias <int> E.V..
428
+ -pbias <int> E.V..
429
+ -coder <int> E.V..
430
+ -vlc E.V.. variable length coder / huffman coder
431
+ -ac E.V.. arithmetic coder
432
+ -context <int> E.V.. context model
433
+ -mbd <int> E.V..
434
+ -simple E.V..
435
+ -bits E.V..
436
+ -rd E.V..
437
+ -sc_threshold <int> E.V..
438
+ -lmin <int> E.V.. min lagrange factor
439
+ -lmax <int> E.V.. max lagrange factor
440
+ -nr <int> E.V.. noise reduction
441
+ -rc_init_occupancy <int> E.V..
442
+ -inter_threshold <int> E.V..
443
+ -flags2 <flags> EDVA.
444
+ -antialias <int> .DV..
445
+ -auto .DV..
446
+ -fastint .DV..
447
+ -int .DV..
448
+ -float .DV..
449
+ -qns <int> E.V.. quantizer noise shaping
450
+ -thread_count <int> EDV..
451
+ -dc <int> E.V..
452
+ -nssew <int> E.V.. nsse weight
453
+ -skip_top <int> .DV..
454
+ -skip_bottom <int> .DV..
455
+ -profile <int> E.VA.
456
+ -unknown E.VA.
457
+ -level <int> E.VA.
458
+ -unknown E.VA.
459
+ -lowres <int> .DV..
460
+ -frame_skip_threshold <int> E.V..
461
+ -frame_skip_factor <int> E.V..
462
+ -frame_skip_exp <int> E.V..
463
+ -skipcmp <int> E.V.. frame skip compare function
464
+ -border_mask <float> E.V..
465
+ -mb_lmin <int> E.V..
466
+ -mb_lmax <int> E.V..
467
+ -me_penalty_compensation <int> E.V..
468
+ -bidir_refine <int> E.V..
469
+ -brd_scale <int> E.V..
470
+ -crf <int> E.V..
471
+ -cqp <int> E.V..
472
+ -keyint_min <int> E.V..
473
+ -refs <int> E.V..
474
+ -chromaoffset <int> E.V..
475
+ -bframebias <int> E.V..
476
+ -trellis <int> E.V..
477
+ -directpred <int> E.V..
478
+ -bpyramid E.V..
479
+ -wpred E.V..
480
+ -mixed_refs E.V..
481
+ -8x8dct E.V..
482
+ -fastpskip E.V..
483
+ -aud E.V..
484
+ -brdo E.V..
485
+ -complexityblur <float> E.V..
486
+ -deblockalpha <int> E.V..
487
+ -deblockbeta <int> E.V..
488
+ -partitions <flags> E.V..
489
+ -parti4x4 E.V..
490
+ -parti8x8 E.V..
491
+ -partp4x4 E.V..
492
+ -partp8x8 E.V..
493
+ -partb8x8 E.V..
494
+ -sc_factor <int> E.V..
495
+
496
+ broken_command: |
497
+ FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
498
+ Mac OSX universal build for ffmpegX
499
+ configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
500
+ libavutil version: 49.0.0
501
+ libavcodec version: 51.9.0
502
+ libavformat version: 50.4.0
503
+ built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
504
+ Unable for find a suitable output format for 'foo'
505
+
506
+ output_has_no_streams: |
507
+ Unexpected result details (FFmpeg version SVN-r10656, Copyright (c) 2000-2007 Fabrice Bellard, et al.
508
+ configuration: --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-liba52 --enable-libxvid --enable-libfaac --enable-libfaad --enable-libx264 --enable-libxvid --enable-pp --enable-shared --enable-gpl --enable-libtheora --enable-libfaadbin --enable-liba52bin --enable-libamr_nb --enable-libamr_wb --extra-ldflags=-L/usr/local/ffmpeg-src/ffmpeg/libavcodec/acfr16/ --extra-libs=-lacfr --enable-libacfr16
509
+ libavutil version: 49.5.0
510
+ libavcodec version: 51.44.0
511
+ libavformat version: 51.14.0
512
+ built on Oct 31 2007 00:58:48, gcc: 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
513
+
514
+ Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 30.00 (30/1)
515
+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/app/current/tmp/114/FlyIn1Comp.mov':
516
+ Duration: 00:00:08.3, start: 0.000000, bitrate: 2253 kb/s
517
+ Stream #0.0(eng): Video: mpeg4, yuv420p, 320x240, 30.00 fps(r)
518
+ Output file does not contain any stream
519
+ )
520
+
521
+ missing_input_file: |
522
+ FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
523
+ Mac OSX universal build for ffmpegX
524
+ configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
525
+ libavutil version: 49.0.0
526
+ libavcodec version: 51.9.0
527
+ libavformat version: 50.4.0
528
+ built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
529
+ asdf: I/O error occured
530
+ Usually that means that input file is truncated and/or corrupted.
531
+
532
+ unexpected_results: |
533
+ FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
534
+ Mac OSX universal build for ffmpegX
535
+ configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
536
+ libavutil version: 49.0.0
537
+ libavcodec version: 51.9.0
538
+ libavformat version: 50.4.0
539
+ built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
540
+
541
+ Seems that stream 1 comes from film source: 600.00 (600/1) -> 59.75 (239/4)
542
+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'jobjob2.mov':
543
+ Duration: 00:01:09.0, start: 0.000000, bitrate: 28847 kb/s
544
+ Stream #0.0(eng): Audio: aac, 44100 Hz, stereo
545
+ Stream #0.1(eng), 59.75 fps(r): Video: dvvideo, yuv411p, 720x480
546
+ Stream mapping:
547
+ Stream #0.1 -> #0.0
548
+ Stream #0.0 -> #0.1
549
+ Press [q] to stop encoding
550
+ foo
551
+ bar
552
+
553
+ unwritable_stream: |
554
+ FFmpeg version CVS, Copyright (c) 2000-2004 Fabrice Bellard
555
+ Mac OSX universal build for ffmpegX
556
+ configuration: --enable-memalign-hack --enable-mp3lame --enable-gpl --disable-vhook --disable-ffplay --disable-ffserver --enable-a52 --enable-xvid --enable-faac --enable-faad --enable-amr_nb --enable-amr_wb --enable-pthreads --enable-x264
557
+ libavutil version: 49.0.0
558
+ libavcodec version: 51.9.0
559
+ libavformat version: 50.4.0
560
+ built on Apr 15 2006 04:58:19, gcc: 4.0.1 (Apple Computer, Inc. build 5250)
561
+
562
+ Seems that stream 1 comes from film source: 600.00 (600/1) -> 59.75 (239/4)
563
+ Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'jobjob2.mov':
564
+ Duration: 00:01:09.0, start: 0.000000, bitrate: 28847 kb/s
565
+ Stream #0.0(eng): Audio: aac, 44100 Hz, stereo
566
+ Stream #0.1(eng), 59.75 fps(r): Video: dvvideo, yuv411p, 720x480
567
+ Stream mapping:
568
+ Stream #0.1 -> #0.0
569
+ Stream #0.0 -> #0.1
570
+ Press [q] to stop encoding
571
+ [mp3 @ 0x54340c]flv doesnt support that sample rate, choose from (44100, 22050, 11025)
572
+ Could not write header for output file #0 (incorrect codec parameters ?)
573
+
574
+ unsupported_codec: |
575
+ FFmpeg version SVN-r9102, Copyright (c) 2000-2007 Fabrice Bellard, et al. configuration: --prefix=/opt/local --prefix=/opt/local --disable-vhook --mandir=/opt/local/share/man --enable-shared --enable-pthreads --disable-mmx --enable-gpl --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-libtheora --enable-libfaac --enable-xvid --enable-x264 --enable-liba52 libavutil version: 49.4.0 libavcodec version: 51.40.4 libavformat version: 51.12.1 built on Dec 11 2007 12:00:30, gcc: 4.0.1 (Apple Inc. build 5465) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/jon/projects/rvideo/spec/files/kites.mp4': Duration: 00:00:19.6, start: 0.000000, bitrate: 98 kb/s Stream #0.0(und): Video: mpeg4, yuv420p, 176x144, 10.00 fps(r) Stream #0.1(und): Audio: samr / 0x726D6173, 8000 Hz, mono Output #0, flv, to '/Users/jon/projects/rvideo/tmp/kites.flv': Stream #0.0: Video: flv, yuv420p, 320x240, q=2-31, pass 1, 300 kb/s, 15.00 fps(c) Stream #0.1: Audio: mp3, 22050 Hz, stereo, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 Unsupported codec (id=73728) for input stream #0.1
576
+
577
+ param_missing_value: |
578
+ FFmpeg version SVN-r17572, Copyright (c) 2000-2009 Fabrice Bellard, et al.
579
+ configuration: --prefix=/usr/local --disable-vhook --enable-pthreads --enable-shared --enable-gpl --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libx264 --enable-nonfree --enable-libamr-nb --enable-libamr-wb
580
+ libavutil 49.15. 0 / 49.15. 0
581
+ libavcodec 52.18. 0 / 52.18. 0
582
+ libavformat 52.29. 2 / 52.29. 2
583
+ libavdevice 52. 1. 0 / 52. 1. 0
584
+ built on Feb 24 2009 18:10:13, gcc: 4.0.1 (Apple Inc. build 5490)
585
+ [avi @ 0x1802400]non-interleaved AVI
586
+ Input #0, avi, from '/Users/seth/diversion/hdcloud/encodes/vimeo.57652_104_419.avi':
587
+ Duration: 00:00:15.16, start: 0.000000, bitrate: 2078 kb/s
588
+ Stream #0.0: Video: mjpeg, yuvj420p, 320x240, 15.10 tbr, 15.10 tbn, 15.10 tbc
589
+ Stream #0.1: Audio: adpcm_ima_wav, 11025 Hz, mono, s16, 44 kb/s
590
+ Expected number for ar but found: -b
591
+
592
+ ###
593
+
594
+ inspect_boat_avi: |
595
+ FFmpeg version SVN-r17587, Copyright (c) 2000-2009 Fabrice Bellard, et al.
596
+ configuration: --prefix=/usr/local --disable-vhook --enable-pthreads --enable-shared --enable-gpl --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libx264 --enable-nonfree --enable-libamr-nb --enable-libamr-wb
597
+ libavutil 49.15. 0 / 49.15. 0
598
+ libavcodec 52.19. 0 / 52.19. 0
599
+ libavformat 52.30. 0 / 52.30. 0
600
+ libavdevice 52. 1. 0 / 52. 1. 0
601
+ built on Feb 25 2009 11:43:00, gcc: 4.0.1 (Apple Inc. build 5490)
602
+ [avi @ 0x1802400]non-interleaved AVI
603
+ Input #0, avi, from 'spec/files/boat.avi':
604
+ Duration: 00:00:15.16, start: 0.000000, bitrate: 2078 kb/s
605
+ Stream #0.0: Video: mjpeg, yuvj420p, 320x240, 15.10 tbr, 15.10 tbn, 15.10 tbc
606
+ Stream #0.1: Audio: adpcm_ima_wav, 11025 Hz, mono, s16, 44 kb/s
607
+ At least one output file must be specified
608
+