mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 09:20:01 +01:00
Compare commits
108 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
076a8dfd41 | ||
|
|
a9a8e5ca99 | ||
|
|
c2a2ad133e | ||
|
|
b6187e48db | ||
|
|
8af11e51f2 | ||
|
|
f597825052 | ||
|
|
7d704f5127 | ||
|
|
eb975b1c8b | ||
|
|
84648d33ba | ||
|
|
4b8a0b058d | ||
|
|
1de90fd375 | ||
|
|
c8b37fd03d | ||
|
|
b37131f798 | ||
|
|
878a7d1573 | ||
|
|
bd968d260a | ||
|
|
00c5cf4beb | ||
|
|
6a57021cf9 | ||
|
|
f20f79307b | ||
|
|
d1bc77d86c | ||
|
|
91d5da9321 | ||
|
|
08ddfb77a1 | ||
|
|
a0352d01e9 | ||
|
|
2ff36ef521 | ||
|
|
7e33a66c0e | ||
|
|
893cf1b1ae | ||
|
|
a8d89df367 | ||
|
|
095946afa7 | ||
|
|
6d75dbebc0 | ||
|
|
f54b8f8482 | ||
|
|
a05219d801 | ||
|
|
c02b02d725 | ||
|
|
5fab0ccd81 | ||
|
|
20829cf8a2 | ||
|
|
0b4840af0c | ||
|
|
896f80f82c | ||
|
|
b57c6d1a4c | ||
|
|
3749066dd8 | ||
|
|
c29c609e0f | ||
|
|
9459390f29 | ||
|
|
2bbd81fba3 | ||
|
|
5e3578893a | ||
|
|
dc1b670a2c | ||
|
|
0156f4f9da | ||
|
|
a52c615a42 | ||
|
|
5c2d7c4dc8 | ||
|
|
004194f465 | ||
|
|
cd63c32ff6 | ||
|
|
5a33a29a91 | ||
|
|
683df9bf54 | ||
|
|
64e2656f7c | ||
|
|
8e3d264fb2 | ||
|
|
46a2dc9175 | ||
|
|
b9e126fbe2 | ||
|
|
07dc4a79c7 | ||
|
|
43de5c034f | ||
|
|
2f0a10174e | ||
|
|
e8baa8eb7f | ||
|
|
d32b2d4de1 | ||
|
|
924b2ee8f2 | ||
|
|
f95e5225fe | ||
|
|
8f536408d1 | ||
|
|
093f0f13e6 | ||
|
|
c172eb7925 | ||
|
|
154ea553f6 | ||
|
|
d734d4ce6a | ||
|
|
c445e9dc62 | ||
|
|
c5c2654351 | ||
|
|
2fe47b21c8 | ||
|
|
b91ebb60d8 | ||
|
|
f1d1ef810a | ||
|
|
b263e94f77 | ||
|
|
9da3063e1c | ||
|
|
b6fe44b9db | ||
|
|
8f7f3f0453 | ||
|
|
376dfd07ab | ||
|
|
cb66b55270 | ||
|
|
9482dd0d17 | ||
|
|
87eedf6943 | ||
|
|
f239b91596 | ||
|
|
d052370c1e | ||
|
|
e54fd33848 | ||
|
|
9b69efc02b | ||
|
|
1bf80a9a14 | ||
|
|
9c709f0534 | ||
|
|
4ad56612f9 | ||
|
|
acb62e998f | ||
|
|
180faac637 | ||
|
|
13c943ffb1 | ||
|
|
18052f1df9 | ||
|
|
4c8b14c37f | ||
|
|
e4071fa04c | ||
|
|
bf5ed476ba | ||
|
|
fcd26ebc8f | ||
|
|
6a34f5d447 | ||
|
|
26f48752fb | ||
|
|
1aef8de6d7 | ||
|
|
9ac3e32b29 | ||
|
|
5254285636 | ||
|
|
137838945f | ||
|
|
6cef3ddbdc | ||
|
|
403eee165c | ||
|
|
523b57b331 | ||
|
|
a3589cce81 | ||
|
|
0820593e64 | ||
|
|
4db2b966be | ||
|
|
0b5c261212 | ||
|
|
680e473643 | ||
|
|
44e83d0c97 |
36
.gitignore
vendored
36
.gitignore
vendored
@@ -1,64 +1,48 @@
|
|||||||
.config
|
.config
|
||||||
.version
|
.version
|
||||||
*.a
|
|
||||||
*.o
|
*.o
|
||||||
*.d
|
*.d
|
||||||
*.def
|
|
||||||
*.dll
|
|
||||||
*.exe
|
*.exe
|
||||||
*.ho
|
*.ho
|
||||||
*.lib
|
|
||||||
*.pc
|
|
||||||
*.so
|
|
||||||
*.so.*
|
|
||||||
*.ver
|
|
||||||
*-example
|
*-example
|
||||||
*-test
|
*-test
|
||||||
*_g
|
*_g
|
||||||
*.def
|
|
||||||
*.dll
|
|
||||||
*.lib
|
|
||||||
*.exp
|
|
||||||
config.*
|
config.*
|
||||||
doc/*.1
|
doc/*.1
|
||||||
doc/*.html
|
doc/*.html
|
||||||
doc/*.pod
|
doc/*.pod
|
||||||
doc/fate.txt
|
|
||||||
doxy
|
doxy
|
||||||
ffmpeg
|
ffmpeg
|
||||||
ffplay
|
ffplay
|
||||||
ffprobe
|
ffprobe
|
||||||
ffserver
|
ffserver
|
||||||
avconv
|
|
||||||
doc/avoptions_codec.texi
|
|
||||||
doc/avoptions_format.texi
|
|
||||||
doc/print_options
|
|
||||||
doc/examples/decoding_encoding
|
|
||||||
doc/examples/filtering_audio
|
|
||||||
doc/examples/filtering_video
|
|
||||||
doc/examples/metadata
|
|
||||||
doc/examples/muxing
|
|
||||||
libavcodec/*_tablegen
|
libavcodec/*_tablegen
|
||||||
libavcodec/*_tables.c
|
libavcodec/*_tables.c
|
||||||
libavcodec/*_tables.h
|
libavcodec/*_tables.h
|
||||||
libavcodec/codec_names.h
|
libavcodec/libavcodec*
|
||||||
|
libavcore/libavcore*
|
||||||
|
libavdevice/libavdevice*
|
||||||
|
libavfilter/libavfilter*
|
||||||
|
libavformat/libavformat*
|
||||||
libavutil/avconfig.h
|
libavutil/avconfig.h
|
||||||
|
libavutil/libavutil*
|
||||||
|
libpostproc/libpostproc*
|
||||||
|
libswscale/libswscale*
|
||||||
tests/audiogen
|
tests/audiogen
|
||||||
tests/base64
|
tests/base64
|
||||||
tests/data
|
tests/data
|
||||||
tests/rotozoom
|
tests/rotozoom
|
||||||
|
tests/seek_test
|
||||||
tests/tiny_psnr
|
tests/tiny_psnr
|
||||||
tests/videogen
|
tests/videogen
|
||||||
tests/vsynth1
|
tests/vsynth1
|
||||||
tests/vsynth2
|
tests/vsynth2
|
||||||
tools/aviocat
|
|
||||||
tools/cws2fws
|
tools/cws2fws
|
||||||
tools/ffeval
|
|
||||||
tools/graph2dot
|
tools/graph2dot
|
||||||
tools/ismindex
|
|
||||||
tools/lavfi-showfiltfmts
|
tools/lavfi-showfiltfmts
|
||||||
tools/pktdumper
|
tools/pktdumper
|
||||||
tools/probetest
|
tools/probetest
|
||||||
tools/qt-faststart
|
tools/qt-faststart
|
||||||
tools/trasher
|
tools/trasher
|
||||||
|
tools/trasher*.d
|
||||||
version.h
|
version.h
|
||||||
|
|||||||
@@ -500,3 +500,5 @@ necessary. Here is a sample; alter the names:
|
|||||||
Ty Coon, President of Vice
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
That's all there is to it!
|
That's all there is to it!
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
310
Changelog
310
Changelog
@@ -1,236 +1,59 @@
|
|||||||
Entries are sorted chronologically from oldest to youngest within each release,
|
Entries are sorted chronologically from oldest to youngest within each release,
|
||||||
releases are sorted from youngest to oldest.
|
releases are sorted from youngest to oldest.
|
||||||
|
|
||||||
version next:
|
|
||||||
|
|
||||||
version 0.11.2:
|
version 0.7.1:
|
||||||
|
|
||||||
- Several bugs and crashes have been fixed as well as build problems
|
- added various additional FOURCC codec identifiers
|
||||||
with recent mingw64
|
- H.264 4:4:4 fixes
|
||||||
|
- build system and compilation fixes
|
||||||
|
- Doxygen and general documentation corrections and improvements
|
||||||
|
- fixed segfault in ffprobe
|
||||||
|
- behavioral fix in av_open_input_stream()
|
||||||
|
- Licensing clarification for LGPL'ed vf_gradfun
|
||||||
|
- bugfixes while seeking in multithreaded decoding
|
||||||
|
- support newer versions of OpenCV
|
||||||
|
- ffmpeg: fix operation with --disable-avfilter
|
||||||
|
- fixed integer underflow in matroska decoder
|
||||||
|
|
||||||
|
version 0.7:
|
||||||
version 0.11:
|
|
||||||
Fixes:CVE-2012-2772, CVE-2012-2774, CVE-2012-2775, CVE-2012-2776, CVE-2012-2777,
|
|
||||||
CVE-2012-2779, CVE-2012-2782, CVE-2012-2783, CVE-2012-2784, CVE-2012-2785,
|
|
||||||
CVE-2012-2786, CVE-2012-2787, CVE-2012-2788, CVE-2012-2789, CVE-2012-2790,
|
|
||||||
CVE-2012-2791, CVE-2012-2792, CVE-2012-2793, CVE-2012-2794, CVE-2012-2795,
|
|
||||||
CVE-2012-2796, CVE-2012-2797, CVE-2012-2798, CVE-2012-2799, CVE-2012-2800,
|
|
||||||
CVE-2012-2801, CVE-2012-2802, CVE-2012-2803, CVE-2012-2804,
|
|
||||||
- v408 Quicktime and Microsoft AYUV Uncompressed 4:4:4:4 encoder and decoder
|
|
||||||
- setfield filter
|
|
||||||
- CDXL demuxer and decoder
|
|
||||||
- Apple ProRes encoder
|
|
||||||
- ffprobe -count_packets and -count_frames options
|
|
||||||
- Sun Rasterfile Encoder
|
|
||||||
- ID3v2 attached pictures reading and writing
|
|
||||||
- WMA Lossless decoder
|
|
||||||
- bluray protocol
|
|
||||||
- blackdetect filter
|
|
||||||
- libutvideo encoder wrapper (--enable-libutvideo)
|
|
||||||
- swapuv filter
|
|
||||||
- bbox filter
|
|
||||||
- XBM encoder and decoder
|
|
||||||
- RealAudio Lossless decoder
|
|
||||||
- ZeroCodec decoder
|
|
||||||
- tile video filter
|
|
||||||
- Metal Gear Solid: The Twin Snakes demuxer
|
|
||||||
- OpenEXR image decoder
|
|
||||||
- removelogo filter
|
|
||||||
- drop support for ffmpeg without libavfilter
|
|
||||||
- drawtext video filter: fontconfig support
|
|
||||||
- ffmpeg -benchmark_all option
|
|
||||||
- super2xsai filter ported from libmpcodecs
|
|
||||||
- add libavresample audio conversion library for compatibility
|
|
||||||
- MicroDVD decoder
|
|
||||||
- Avid Meridien (AVUI) encoder and decoder
|
|
||||||
- accept + prefix to -pix_fmt option to disable automatic conversions.
|
|
||||||
- complete audio filtering in libavfilter and ffmpeg
|
|
||||||
- add fps filter
|
|
||||||
- audio split filter
|
|
||||||
- vorbis parser
|
|
||||||
- png parser
|
|
||||||
- audio mix filter
|
|
||||||
|
|
||||||
|
|
||||||
version 0.10:
|
|
||||||
- Fixes: CVE-2011-3929, CVE-2011-3934, CVE-2011-3935, CVE-2011-3936,
|
|
||||||
CVE-2011-3937, CVE-2011-3940, CVE-2011-3941, CVE-2011-3944,
|
|
||||||
CVE-2011-3945, CVE-2011-3946, CVE-2011-3947, CVE-2011-3949,
|
|
||||||
CVE-2011-3950, CVE-2011-3951, CVE-2011-3952
|
|
||||||
- v410 Quicktime Uncompressed 4:4:4 10-bit encoder and decoder
|
|
||||||
- SBaGen (SBG) binaural beats script demuxer
|
|
||||||
- OpenMG Audio muxer
|
|
||||||
- Timecode extraction in DV and MOV
|
|
||||||
- thumbnail video filter
|
|
||||||
- XML output in ffprobe
|
|
||||||
- asplit audio filter
|
|
||||||
- tinterlace video filter
|
|
||||||
- astreamsync audio filter
|
|
||||||
- amerge audio filter
|
|
||||||
- ISMV (Smooth Streaming) muxer
|
|
||||||
- GSM audio parser
|
|
||||||
- SMJPEG muxer
|
|
||||||
- XWD encoder and decoder
|
|
||||||
- Automatic thread count based on detection number of (available) CPU cores
|
|
||||||
- y41p Brooktree Uncompressed 4:1:1 12-bit encoder and decoder
|
|
||||||
- ffprobe -show_error option
|
|
||||||
- Avid 1:1 10-bit RGB Packer codec
|
|
||||||
- v308 Quicktime Uncompressed 4:4:4 encoder and decoder
|
|
||||||
- yuv4 libquicktime packed 4:2:0 encoder and decoder
|
|
||||||
- ffprobe -show_frames option
|
|
||||||
- silencedetect audio filter
|
|
||||||
- ffprobe -show_program_version, -show_library_versions, -show_versions options
|
|
||||||
- rv34: frame-level multi-threading
|
|
||||||
- optimized iMDCT transform on x86 using SSE for for mpegaudiodec
|
|
||||||
- Improved PGS subtitle decoder
|
|
||||||
- dumpgraph option to lavfi device
|
|
||||||
- r210 and r10k encoders
|
|
||||||
- ffwavesynth decoder
|
|
||||||
- aviocat tool
|
|
||||||
- ffeval tool
|
|
||||||
|
|
||||||
|
|
||||||
version 0.9:
|
|
||||||
|
|
||||||
- openal input device added
|
|
||||||
- boxblur filter added
|
|
||||||
- BWF muxer
|
|
||||||
- Flash Screen Video 2 decoder
|
|
||||||
- lavfi input device added
|
|
||||||
- added avconv, which is almost the same for now, except
|
|
||||||
for a few incompatible changes in the options, which will hopefully make them
|
|
||||||
easier to use. The changes are:
|
|
||||||
* The options placement is now strictly enforced! While in theory the
|
|
||||||
options for ffmpeg should be given in [input options] -i INPUT [output
|
|
||||||
options] OUTPUT order, in practice it was possible to give output options
|
|
||||||
before the -i and it mostly worked. Except when it didn't - the behavior was
|
|
||||||
a bit inconsistent. In avconv, it is not possible to mix input and output
|
|
||||||
options. All non-global options are reset after an input or output filename.
|
|
||||||
* All per-file options are now truly per-file - they apply only to the next
|
|
||||||
input or output file and specifying different values for different files
|
|
||||||
will now work properly (notably -ss and -t options).
|
|
||||||
* All per-stream options are now truly per-stream - it is possible to
|
|
||||||
specify which stream(s) should a given option apply to. See the Stream
|
|
||||||
specifiers section in the avconv manual for details.
|
|
||||||
* In ffmpeg some options (like -newvideo/-newaudio/...) are irregular in the
|
|
||||||
sense that they're specified after the output filename instead of before,
|
|
||||||
like all other options. In avconv this irregularity is removed, all options
|
|
||||||
apply to the next input or output file.
|
|
||||||
* -newvideo/-newaudio/-newsubtitle options were removed. Not only were they
|
|
||||||
irregular and highly confusing, they were also redundant. In avconv the -map
|
|
||||||
option will create new streams in the output file and map input streams to
|
|
||||||
them. E.g. avconv -i INPUT -map 0 OUTPUT will create an output stream for
|
|
||||||
each stream in the first input file.
|
|
||||||
* The -map option now has slightly different and more powerful syntax:
|
|
||||||
+ Colons (':') are used to separate file index/stream type/stream index
|
|
||||||
instead of dots. Comma (',') is used to separate the sync stream instead
|
|
||||||
of colon.. This is done for consistency with other options.
|
|
||||||
+ It's possible to specify stream type. E.g. -map 0:a:2 creates an
|
|
||||||
output stream from the third input audio stream.
|
|
||||||
+ Omitting the stream index now maps all the streams of the given type,
|
|
||||||
not just the first. E.g. -map 0:s creates output streams for all the
|
|
||||||
subtitle streams in the first input file.
|
|
||||||
+ Since -map can now match multiple streams, negative mappings were
|
|
||||||
introduced. Negative mappings disable some streams from an already
|
|
||||||
defined map. E.g. '-map 0 -map -0:a:1' means 'create output streams for
|
|
||||||
all the stream in the first input file, except for the second audio
|
|
||||||
stream'.
|
|
||||||
* There is a new option -c (or -codec) for choosing the decoder/encoder to
|
|
||||||
use, which allows to precisely specify target stream(s) consistently with
|
|
||||||
other options. E.g. -c:v lib264 sets the codec for all video streams, -c:a:0
|
|
||||||
libvorbis sets the codec for the first audio stream and -c copy copies all
|
|
||||||
the streams without reencoding. Old -vcodec/-acodec/-scodec options are now
|
|
||||||
aliases to -c:v/a/s
|
|
||||||
* It is now possible to precisely specify which stream should an AVOption
|
|
||||||
apply to. E.g. -b:v:0 2M sets the bitrate for the first video stream, while
|
|
||||||
-b:a 128k sets the bitrate for all audio streams. Note that the old -ab 128k
|
|
||||||
syntax is deprecated and will stop working soon.
|
|
||||||
* -map_chapters now takes only an input file index and applies to the next
|
|
||||||
output file. This is consistent with how all the other options work.
|
|
||||||
* -map_metadata now takes only an input metadata specifier and applies to
|
|
||||||
the next output file. Output metadata specifier is now part of the option
|
|
||||||
name, similarly to the AVOptions/map/codec feature above.
|
|
||||||
* -metadata can now be used to set metadata on streams and chapters, e.g.
|
|
||||||
-metadata:s:1 language=eng sets the language of the first stream to 'eng'.
|
|
||||||
This made -vlang/-alang/-slang options redundant, so they were removed.
|
|
||||||
* -qscale option now uses stream specifiers and applies to all streams, not
|
|
||||||
just video. I.e. plain -qscale number would now apply to all streams. To get
|
|
||||||
the old behavior, use -qscale:v. Also there is now a shortcut -q for -qscale
|
|
||||||
and -aq is now an alias for -q:a.
|
|
||||||
* -vbsf/-absf/-sbsf options were removed and replaced by a -bsf option which
|
|
||||||
uses stream specifiers. Use -bsf:v/a/s instead of the old options.
|
|
||||||
* -itsscale option now uses stream specifiers, so its argument is only the
|
|
||||||
scale parameter.
|
|
||||||
* -intra option was removed, use -g 0 for the same effect.
|
|
||||||
* -psnr option was removed, use -flags +psnr for the same effect.
|
|
||||||
* -vf option is now an alias to the new -filter option, which uses stream specifiers.
|
|
||||||
* -vframes/-aframes/-dframes options are now aliases to the new -frames option.
|
|
||||||
* -vtag/-atag/-stag options are now aliases to the new -tag option.
|
|
||||||
- XMV demuxer
|
|
||||||
- LOAS demuxer
|
|
||||||
- ashowinfo filter added
|
|
||||||
- Windows Media Image decoder
|
|
||||||
- amovie source added
|
|
||||||
- LATM muxer/demuxer
|
|
||||||
- Speex encoder via libspeex
|
|
||||||
- JSON output in ffprobe
|
|
||||||
- WTV muxer
|
|
||||||
- Optional C++ Support (needed for libstagefright)
|
|
||||||
- H.264 Decoding on Android via Stagefright
|
|
||||||
- Prores decoder
|
|
||||||
- BIN/XBIN/ADF/IDF text file decoder
|
|
||||||
- aconvert audio filter added
|
|
||||||
- audio support to lavfi input device added
|
|
||||||
- libcdio-paranoia input device for audio CD grabbing
|
|
||||||
- Apple ProRes decoder
|
|
||||||
- CELT in Ogg demuxing
|
|
||||||
- G.723.1 demuxer and decoder
|
|
||||||
- libmodplug support (--enable-libmodplug)
|
|
||||||
- VC-1 interlaced decoding
|
|
||||||
- libutvideo wrapper (--enable-libutvideo)
|
|
||||||
- aevalsrc audio source added
|
|
||||||
- Ut Video decoder
|
|
||||||
- Speex encoding via libspeex
|
|
||||||
- 4:2:2 H.264 decoding support
|
|
||||||
- 4:2:2 and 4:4:4 H.264 encoding with libx264
|
|
||||||
- Pulseaudio input device
|
|
||||||
- Prores encoder
|
|
||||||
- Video Decoder Acceleration (VDA) HWAccel module.
|
|
||||||
- replacement Indeo 3 decoder
|
|
||||||
- new ffmpeg option: -map_channel
|
|
||||||
- volume audio filter added
|
|
||||||
- earwax audio filter added
|
|
||||||
- libv4l2 support (--enable-libv4l2)
|
|
||||||
- TLS/SSL and HTTPS protocol support
|
|
||||||
- AVOptions API rewritten and documented
|
|
||||||
- most of CODEC_FLAG2_*, some CODEC_FLAG_* and many codec-specific fields in
|
|
||||||
AVCodecContext deprecated. Codec private options should be used instead.
|
|
||||||
- Properly working defaults in libx264 wrapper, support for native presets.
|
|
||||||
- Encrypted OMA files support
|
|
||||||
- Discworld II BMV decoding support
|
|
||||||
- VBLE Decoder
|
|
||||||
- OS X Video Decoder Acceleration (VDA) support
|
|
||||||
- compact and csv output in ffprobe
|
|
||||||
- pan audio filter
|
|
||||||
- IFF Amiga Continuous Bitmap (ACBM) decoder
|
|
||||||
- ass filter
|
|
||||||
- CRI ADX audio format muxer and demuxer
|
|
||||||
- Playstation Portable PMP format demuxer
|
|
||||||
- Microsoft Windows ICO demuxer
|
|
||||||
- life source
|
|
||||||
- PCM format support in OMA demuxer
|
|
||||||
- CLJR encoder
|
|
||||||
- new option: -report
|
|
||||||
- Dxtory capture format decoder
|
|
||||||
- cellauto source
|
|
||||||
- Simple segmenting muxer
|
|
||||||
- Indeo 4 decoder
|
|
||||||
- SMJPEG demuxer
|
|
||||||
|
|
||||||
|
|
||||||
version 0.8:
|
|
||||||
|
|
||||||
- many many things we forgot because we rather write code than changelogs
|
- many many things we forgot because we rather write code than changelogs
|
||||||
|
- libmpcodecs video filter support (3 times as many filters than before)
|
||||||
|
- mpeg2 aspect ratio dection fixed
|
||||||
|
- libxvid aspect pickiness fixed
|
||||||
|
- Frame multithreaded decoding
|
||||||
|
- E-AC-3 audio encoder
|
||||||
|
- ac3enc: add channel coupling support
|
||||||
|
- floating-point sample format support for (E-)AC-3, DCA, AAC, Vorbis decoders
|
||||||
|
- H.264/MPEG frame-level multithreading
|
||||||
|
- av_metadata_* functions renamed to av_dict_* and moved to libavutil
|
||||||
|
- 4:4:4 H.264 decoding support
|
||||||
|
- 10-bit H.264 optimizations for x86
|
||||||
|
- lut, lutrgb, and lutyuv filters added
|
||||||
|
- buffersink libavfilter sink added
|
||||||
|
- bump libswscale for recently reported ABI break
|
||||||
|
|
||||||
|
|
||||||
|
version 0.7_beta2:
|
||||||
|
|
||||||
|
- VP8 frame-level multithreading
|
||||||
|
- NEON optimizations for VP8
|
||||||
|
- removed a lot of deprecated API cruft
|
||||||
|
- FFT and IMDCT optimizations for AVX (Sandy Bridge) processors
|
||||||
|
- showinfo filter added
|
||||||
|
- DPX image encoder
|
||||||
|
- SMPTE 302M AES3 audio decoder
|
||||||
|
- Apple Core Audio Format muxer
|
||||||
|
- 9bit and 10bit per sample support in the H.264 decoder
|
||||||
|
- 9bit and 10bit FFV1 encoding / decoding
|
||||||
|
- split filter added
|
||||||
|
- select filter added
|
||||||
|
- sdl output device added
|
||||||
|
|
||||||
|
|
||||||
|
version 0.7_beta1:
|
||||||
|
|
||||||
- WebM support in Matroska de/muxer
|
- WebM support in Matroska de/muxer
|
||||||
- low overhead Ogg muxing
|
- low overhead Ogg muxing
|
||||||
- MMS-TCP support
|
- MMS-TCP support
|
||||||
@@ -238,7 +61,6 @@ version 0.8:
|
|||||||
- Demuxer for On2's IVF format
|
- Demuxer for On2's IVF format
|
||||||
- Pictor/PC Paint decoder
|
- Pictor/PC Paint decoder
|
||||||
- HE-AAC v2 decoder
|
- HE-AAC v2 decoder
|
||||||
- HE-AAC v2 encoding with libaacplus
|
|
||||||
- libfaad2 wrapper removed
|
- libfaad2 wrapper removed
|
||||||
- DTS-ES extension (XCh) decoding support
|
- DTS-ES extension (XCh) decoding support
|
||||||
- native VP8 decoder
|
- native VP8 decoder
|
||||||
@@ -250,7 +72,7 @@ version 0.8:
|
|||||||
- RTP depacketization of QDM2
|
- RTP depacketization of QDM2
|
||||||
- ANSI/ASCII art playback system
|
- ANSI/ASCII art playback system
|
||||||
- Lego Mindstorms RSO de/muxer
|
- Lego Mindstorms RSO de/muxer
|
||||||
- libavcore added (and subsequently removed)
|
- libavcore added
|
||||||
- SubRip subtitle file muxer and demuxer
|
- SubRip subtitle file muxer and demuxer
|
||||||
- Chinese AVS encoding via libxavs
|
- Chinese AVS encoding via libxavs
|
||||||
- ffprobe -show_packets option added
|
- ffprobe -show_packets option added
|
||||||
@@ -318,38 +140,6 @@ version 0.8:
|
|||||||
- AMR-WB encoding via libvo-amrwbenc
|
- AMR-WB encoding via libvo-amrwbenc
|
||||||
- xWMA demuxer
|
- xWMA demuxer
|
||||||
- Mobotix MxPEG decoder
|
- Mobotix MxPEG decoder
|
||||||
- VP8 frame-multithreading
|
|
||||||
- NEON optimizations for VP8
|
|
||||||
- Lots of deprecated API cruft removed
|
|
||||||
- fft and imdct optimizations for AVX (Sandy Bridge) processors
|
|
||||||
- showinfo filter added
|
|
||||||
- SMPTE 302M AES3 audio decoder
|
|
||||||
- Apple Core Audio Format muxer
|
|
||||||
- 9bit and 10bit per sample support in the H.264 decoder
|
|
||||||
- 9bit and 10bit FFV1 encoding / decoding
|
|
||||||
- split filter added
|
|
||||||
- select filter added
|
|
||||||
- sdl output device added
|
|
||||||
- libmpcodecs video filter support (3 times as many filters than before)
|
|
||||||
- mpeg2 aspect ratio dection fixed
|
|
||||||
- libxvid aspect pickiness fixed
|
|
||||||
- Frame multithreaded decoding
|
|
||||||
- E-AC-3 audio encoder
|
|
||||||
- ac3enc: add channel coupling support
|
|
||||||
- floating-point sample format support to the ac3, eac3, dca, aac, and vorbis decoders.
|
|
||||||
- H264/MPEG frame-level multi-threading
|
|
||||||
- All av_metadata_* functions renamed to av_dict_* and moved to libavutil
|
|
||||||
- 4:4:4 H.264 decoding support
|
|
||||||
- 10-bit H.264 optimizations for x86
|
|
||||||
- lut, lutrgb, and lutyuv filters added
|
|
||||||
- buffersink libavfilter sink added
|
|
||||||
- Bump libswscale for recently reported ABI break
|
|
||||||
- New J2K encoder (via OpenJPEG)
|
|
||||||
|
|
||||||
|
|
||||||
version 0.7:
|
|
||||||
|
|
||||||
- all the changes for 0.8, but keeping API/ABI compatibility with the 0.6 release
|
|
||||||
|
|
||||||
|
|
||||||
version 0.6:
|
version 0.6:
|
||||||
@@ -793,7 +583,7 @@ version 0.4.5:
|
|||||||
- MPEG-4 vol header fixes (Jonathan Marsden <snmjbm at pacbell.net>)
|
- MPEG-4 vol header fixes (Jonathan Marsden <snmjbm at pacbell.net>)
|
||||||
- ARM optimizations (Lionel Ulmer <lionel.ulmer at free.fr>).
|
- ARM optimizations (Lionel Ulmer <lionel.ulmer at free.fr>).
|
||||||
- Windows porting of file converter
|
- Windows porting of file converter
|
||||||
- added MJPEG raw format (input/output)
|
- added MJPEG raw format (input/ouput)
|
||||||
- added JPEG image format support (input/output)
|
- added JPEG image format support (input/output)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
23
Doxyfile
23
Doxyfile
@@ -31,13 +31,7 @@ PROJECT_NAME = FFmpeg
|
|||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
# if some version control system is used.
|
# if some version control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = 0.11.2
|
PROJECT_NUMBER = 0.8.3
|
||||||
|
|
||||||
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
|
|
||||||
# in the documentation. The maximum height of the logo should not exceed 55
|
|
||||||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will
|
|
||||||
# copy the logo to the output directory.
|
|
||||||
PROJECT_LOGO =
|
|
||||||
|
|
||||||
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
|
||||||
# base path where the generated documentation will be put.
|
# base path where the generated documentation will be put.
|
||||||
@@ -766,7 +760,7 @@ ALPHABETICAL_INDEX = YES
|
|||||||
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
|
||||||
# in which this list will be split (can be a number in the range [1..20])
|
# in which this list will be split (can be a number in the range [1..20])
|
||||||
|
|
||||||
COLS_IN_ALPHA_INDEX = 2
|
COLS_IN_ALPHA_INDEX = 5
|
||||||
|
|
||||||
# In case all classes in a project start with a common prefix, all
|
# In case all classes in a project start with a common prefix, all
|
||||||
# classes will be put under the same header in the alphabetical index.
|
# classes will be put under the same header in the alphabetical index.
|
||||||
@@ -800,13 +794,13 @@ HTML_FILE_EXTENSION = .html
|
|||||||
# each generated HTML page. If it is left blank doxygen will generate a
|
# each generated HTML page. If it is left blank doxygen will generate a
|
||||||
# standard header.
|
# standard header.
|
||||||
|
|
||||||
HTML_HEADER = doc/doxy/header.html
|
HTML_HEADER =
|
||||||
|
|
||||||
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
# The HTML_FOOTER tag can be used to specify a personal HTML footer for
|
||||||
# each generated HTML page. If it is left blank doxygen will generate a
|
# each generated HTML page. If it is left blank doxygen will generate a
|
||||||
# standard footer.
|
# standard footer.
|
||||||
|
|
||||||
HTML_FOOTER = doc/doxy/footer.html
|
HTML_FOOTER =
|
||||||
|
|
||||||
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
|
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
|
||||||
# style sheet that is used by each HTML page. It can be used to
|
# style sheet that is used by each HTML page. It can be used to
|
||||||
@@ -815,7 +809,7 @@ HTML_FOOTER = doc/doxy/footer.html
|
|||||||
# the style sheet file to the HTML output directory, so don't put your own
|
# the style sheet file to the HTML output directory, so don't put your own
|
||||||
# stylesheet in the HTML output directory as well, or it will be erased!
|
# stylesheet in the HTML output directory as well, or it will be erased!
|
||||||
|
|
||||||
HTML_STYLESHEET = doc/doxy/doxy_stylesheet.css
|
HTML_STYLESHEET =
|
||||||
|
|
||||||
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
|
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
|
||||||
# Doxygen will adjust the colors in the stylesheet and background images
|
# Doxygen will adjust the colors in the stylesheet and background images
|
||||||
@@ -825,7 +819,7 @@ HTML_STYLESHEET = doc/doxy/doxy_stylesheet.css
|
|||||||
# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
|
# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
|
||||||
# The allowed range is 0 to 359.
|
# The allowed range is 0 to 359.
|
||||||
|
|
||||||
HTML_COLORSTYLE_HUE = 120
|
HTML_COLORSTYLE_HUE = 220
|
||||||
|
|
||||||
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
|
# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
|
||||||
# the colors in the HTML output. For a value of 0 the output will use
|
# the colors in the HTML output. For a value of 0 the output will use
|
||||||
@@ -864,7 +858,7 @@ HTML_DYNAMIC_SECTIONS = NO
|
|||||||
|
|
||||||
# If the GENERATE_DOCSET tag is set to YES, additional index files
|
# If the GENERATE_DOCSET tag is set to YES, additional index files
|
||||||
# will be generated that can be used as input for Apple's Xcode 3
|
# will be generated that can be used as input for Apple's Xcode 3
|
||||||
# integrated development environment, introduced with OS X 10.5 (Leopard).
|
# integrated development environment, introduced with OSX 10.5 (Leopard).
|
||||||
# To create a documentation set, doxygen will generate a Makefile in the
|
# To create a documentation set, doxygen will generate a Makefile in the
|
||||||
# HTML output directory. Running make will produce the docset in that
|
# HTML output directory. Running make will produce the docset in that
|
||||||
# directory and running "make install" will install the docset in
|
# directory and running "make install" will install the docset in
|
||||||
@@ -1388,8 +1382,7 @@ PREDEFINED = "__attribute__(x)=" \
|
|||||||
# The macro definition that is found in the sources will be used.
|
# The macro definition that is found in the sources will be used.
|
||||||
# Use the PREDEFINED tag if you want to use a different macro definition.
|
# Use the PREDEFINED tag if you want to use a different macro definition.
|
||||||
|
|
||||||
EXPAND_AS_DEFINED = declare_idct \
|
EXPAND_AS_DEFINED = declare_idct
|
||||||
READ_PAR_DATA \
|
|
||||||
|
|
||||||
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
|
||||||
# doxygen's preprocessor will remove all function-like macros that are alone
|
# doxygen's preprocessor will remove all function-like macros that are alone
|
||||||
|
|||||||
14
LICENSE
14
LICENSE
@@ -20,12 +20,8 @@ Specifically, the GPL parts of FFmpeg are
|
|||||||
|
|
||||||
There are a handful of files under other licensing terms, namely:
|
There are a handful of files under other licensing terms, namely:
|
||||||
|
|
||||||
* The files libavcodec/jfdctfst.c, libavcodec/jfdctint_template.c and
|
* The files libavcodec/jfdctfst.c, libavcodec/jfdctint.c, libavcodec/jrevdct.c
|
||||||
libavcodec/jrevdct.c are taken from libjpeg, see the top of the files for
|
are taken from libjpeg, see the top of the files for licensing details.
|
||||||
licensing details. Specifically note that you must credit the IJG in the
|
|
||||||
documentation accompanying your program if you only distribute executables.
|
|
||||||
You must also indicate any changes including additions and deletions to
|
|
||||||
those three files in the documentation.
|
|
||||||
|
|
||||||
Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then
|
Should you, for whatever reason, prefer to use version 3 of the (L)GPL, then
|
||||||
the configure parameter --enable-version3 will activate this licensing option
|
the configure parameter --enable-version3 will activate this licensing option
|
||||||
@@ -45,6 +41,6 @@ is incompatible with the LGPL v2.1 and the GPL v2, but not with version 3 of
|
|||||||
those licenses. So to combine the OpenCORE libraries with FFmpeg, the license
|
those licenses. So to combine the OpenCORE libraries with FFmpeg, the license
|
||||||
version needs to be upgraded by passing --enable-version3 to configure.
|
version needs to be upgraded by passing --enable-version3 to configure.
|
||||||
|
|
||||||
The nonfree external libraries libfaac and libaacplus can be hooked up in FFmpeg.
|
The nonfree external library libfaac can be hooked up in FFmpeg. You need to
|
||||||
You need to pass --enable-nonfree to configure to enable it. Employ this option
|
pass --enable-nonfree to configure to enable it. Employ this option with care
|
||||||
with care as FFmpeg then becomes nonfree and unredistributable.
|
as FFmpeg then becomes nonfree and unredistributable.
|
||||||
|
|||||||
62
MAINTAINERS
62
MAINTAINERS
@@ -4,12 +4,6 @@ FFmpeg maintainers
|
|||||||
Below is a list of the people maintaining different parts of the
|
Below is a list of the people maintaining different parts of the
|
||||||
FFmpeg code.
|
FFmpeg code.
|
||||||
|
|
||||||
Please try to keep entries where you are the maintainer up to date!
|
|
||||||
|
|
||||||
Names in () mean that the maintainer currently has no time to maintain the code.
|
|
||||||
A CC after the name means that the maintainer prefers to be CC-ed on patches
|
|
||||||
and related discussions.
|
|
||||||
|
|
||||||
|
|
||||||
Project Leader
|
Project Leader
|
||||||
==============
|
==============
|
||||||
@@ -25,7 +19,7 @@ ffmpeg:
|
|||||||
ffmpeg.c Michael Niedermayer
|
ffmpeg.c Michael Niedermayer
|
||||||
|
|
||||||
ffplay:
|
ffplay:
|
||||||
ffplay.c Marton Balint
|
ffplay.c Michael Niedermayer
|
||||||
|
|
||||||
ffprobe:
|
ffprobe:
|
||||||
ffprobe.c Stefano Sabatini
|
ffprobe.c Stefano Sabatini
|
||||||
@@ -44,13 +38,13 @@ Miscellaneous Areas
|
|||||||
===================
|
===================
|
||||||
|
|
||||||
documentation Mike Melanson
|
documentation Mike Melanson
|
||||||
website Robert Swain, Lou Logan
|
website Robert Swain
|
||||||
build system (configure,Makefiles) Diego Biurrun, Mans Rullgard
|
build system (configure,Makefiles) Diego Biurrun, Mans Rullgard
|
||||||
project server Árpád Gereöffy, Michael Niedermayer, Reimar Döffinger
|
project server Diego Biurrun, Mans Rullgard
|
||||||
mailinglists Michael Niedermayer, Baptiste Coudurier, Lou Logan
|
mailinglists Michael Niedermayer, Baptiste Coudurier
|
||||||
presets Robert Swain
|
presets Robert Swain
|
||||||
metadata subsystem Aurelien Jacobs
|
metadata subsystem Aurelien Jacobs
|
||||||
release management Michael Niedermayer
|
release management Diego Biurrun, Reinhard Tartler
|
||||||
|
|
||||||
|
|
||||||
libavutil
|
libavutil
|
||||||
@@ -87,8 +81,6 @@ Generic Parts:
|
|||||||
bitstream.c, bitstream.h Michael Niedermayer
|
bitstream.c, bitstream.h Michael Niedermayer
|
||||||
CABAC:
|
CABAC:
|
||||||
cabac.h, cabac.c Michael Niedermayer
|
cabac.h, cabac.c Michael Niedermayer
|
||||||
codec names:
|
|
||||||
codec_names.sh Nicolas George
|
|
||||||
DSP utilities:
|
DSP utilities:
|
||||||
dsputils.c, dsputils.h Michael Niedermayer
|
dsputils.c, dsputils.h Michael Niedermayer
|
||||||
entropy coding:
|
entropy coding:
|
||||||
@@ -142,7 +134,6 @@ Codecs:
|
|||||||
dv.c Roman Shaposhnik
|
dv.c Roman Shaposhnik
|
||||||
eacmv*, eaidct*, eat* Peter Ross
|
eacmv*, eaidct*, eat* Peter Ross
|
||||||
ffv1.c Michael Niedermayer
|
ffv1.c Michael Niedermayer
|
||||||
ffwavesynth.c Nicolas George
|
|
||||||
flac* Justin Ruggles
|
flac* Justin Ruggles
|
||||||
flashsv* Benjamin Larsson
|
flashsv* Benjamin Larsson
|
||||||
flicvideo.c Mike Melanson
|
flicvideo.c Mike Melanson
|
||||||
@@ -159,20 +150,16 @@ Codecs:
|
|||||||
indeo5* Kostya Shishkov
|
indeo5* Kostya Shishkov
|
||||||
interplayvideo.c Mike Melanson
|
interplayvideo.c Mike Melanson
|
||||||
ivi* Kostya Shishkov
|
ivi* Kostya Shishkov
|
||||||
jacosub* Clément Bœsch
|
|
||||||
jpeg_ls.c Kostya Shishkov
|
jpeg_ls.c Kostya Shishkov
|
||||||
jvdec.c Peter Ross
|
jvdec.c Peter Ross
|
||||||
kmvc.c Kostya Shishkov
|
kmvc.c Kostya Shishkov
|
||||||
lcl*.c Roberto Togni, Reimar Doeffinger
|
lcl*.c Roberto Togni, Reimar Doeffinger
|
||||||
libcelt_dec.c Nicolas George
|
|
||||||
libgsm.c Michel Bardiaux
|
libgsm.c Michel Bardiaux
|
||||||
libdirac* David Conrad
|
libdirac* David Conrad
|
||||||
libopenjpeg.c Jaikrishnan Menon
|
libopenjpeg.c Jaikrishnan Menon
|
||||||
libopenjpegenc.c Michael Bradshaw
|
|
||||||
libschroedinger* David Conrad
|
libschroedinger* David Conrad
|
||||||
libspeexdec.c Justin Ruggles
|
libspeexdec.c Justin Ruggles
|
||||||
libtheoraenc.c David Conrad
|
libtheoraenc.c David Conrad
|
||||||
libutvideo* Derek Buitenhuis
|
|
||||||
libvorbis.c David Conrad
|
libvorbis.c David Conrad
|
||||||
libxavs.c Stefan Gehrer
|
libxavs.c Stefan Gehrer
|
||||||
libx264.c Mans Rullgard, Jason Garrett-Glaser
|
libx264.c Mans Rullgard, Jason Garrett-Glaser
|
||||||
@@ -224,9 +211,7 @@ Codecs:
|
|||||||
tta.c Alex Beregszaszi, Jaikrishnan Menon
|
tta.c Alex Beregszaszi, Jaikrishnan Menon
|
||||||
txd.c Ivo van Poorten
|
txd.c Ivo van Poorten
|
||||||
ulti* Kostya Shishkov
|
ulti* Kostya Shishkov
|
||||||
v410*.c Derek Buitenhuis
|
|
||||||
vb.c Kostya Shishkov
|
vb.c Kostya Shishkov
|
||||||
vble.c Derek Buitenhuis
|
|
||||||
vc1* Kostya Shishkov
|
vc1* Kostya Shishkov
|
||||||
vcr1.c Michael Niedermayer
|
vcr1.c Michael Niedermayer
|
||||||
vmnc.c Kostya Shishkov
|
vmnc.c Kostya Shishkov
|
||||||
@@ -245,15 +230,12 @@ Codecs:
|
|||||||
xan.c Mike Melanson
|
xan.c Mike Melanson
|
||||||
xl.c Kostya Shishkov
|
xl.c Kostya Shishkov
|
||||||
xvmc.c Ivan Kalvachev
|
xvmc.c Ivan Kalvachev
|
||||||
zerocodec.c Derek Buitenhuis
|
|
||||||
zmbv* Kostya Shishkov
|
zmbv* Kostya Shishkov
|
||||||
|
|
||||||
Hardware acceleration:
|
Hardware acceleration:
|
||||||
crystalhd.c Philip Langdale
|
crystalhd.c Philip Langdale
|
||||||
dxva2* Laurent Aimar
|
dxva2* Laurent Aimar
|
||||||
libstagefright.cpp Mohamed Naufal
|
|
||||||
vaapi* Gwenole Beauchesne
|
vaapi* Gwenole Beauchesne
|
||||||
vda* Sebastien Zwickert
|
|
||||||
vdpau* Carl Eugen Hoyos
|
vdpau* Carl Eugen Hoyos
|
||||||
|
|
||||||
|
|
||||||
@@ -268,18 +250,6 @@ libavdevice
|
|||||||
vfwcap.c Ramiro Polla
|
vfwcap.c Ramiro Polla
|
||||||
|
|
||||||
|
|
||||||
libavfilter
|
|
||||||
===========
|
|
||||||
|
|
||||||
Video filters:
|
|
||||||
graphdump.c Nicolas George
|
|
||||||
af_amerge.c Nicolas George
|
|
||||||
af_astreamsync.c Nicolas George
|
|
||||||
af_pan.c Nicolas George
|
|
||||||
vsrc_mandelbrot.c Michael Niedermayer
|
|
||||||
vf_yadif.c Michael Niedermayer
|
|
||||||
|
|
||||||
|
|
||||||
libavformat
|
libavformat
|
||||||
===========
|
===========
|
||||||
|
|
||||||
@@ -316,9 +286,7 @@ Muxers/Demuxers:
|
|||||||
ipmovie.c Mike Melanson
|
ipmovie.c Mike Melanson
|
||||||
img2.c Michael Niedermayer
|
img2.c Michael Niedermayer
|
||||||
iss.c Stefan Gehrer
|
iss.c Stefan Gehrer
|
||||||
jacosub* Clément Bœsch
|
|
||||||
jvdec.c Peter Ross
|
jvdec.c Peter Ross
|
||||||
libmodplug.c Clément Bœsch
|
|
||||||
libnut.c Oded Shimon
|
libnut.c Oded Shimon
|
||||||
lmlm4.c Ivo van Poorten
|
lmlm4.c Ivo van Poorten
|
||||||
lxfdec.c Tomas Härdin
|
lxfdec.c Tomas Härdin
|
||||||
@@ -337,7 +305,6 @@ Muxers/Demuxers:
|
|||||||
msnwc_tcp.c Ramiro Polla
|
msnwc_tcp.c Ramiro Polla
|
||||||
mtv.c Reynaldo H. Verdejo Pinochet
|
mtv.c Reynaldo H. Verdejo Pinochet
|
||||||
mxf* Baptiste Coudurier
|
mxf* Baptiste Coudurier
|
||||||
mxfdec.c Tomas Härdin
|
|
||||||
nsvdec.c Francois Revol
|
nsvdec.c Francois Revol
|
||||||
nut.c Michael Niedermayer
|
nut.c Michael Niedermayer
|
||||||
nuv.c Reimar Doeffinger
|
nuv.c Reimar Doeffinger
|
||||||
@@ -357,7 +324,6 @@ Muxers/Demuxers:
|
|||||||
rtpdec_asf.* Ronald S. Bultje
|
rtpdec_asf.* Ronald S. Bultje
|
||||||
rtpenc_mpv.*, rtpenc_aac.* Martin Storsjo
|
rtpenc_mpv.*, rtpenc_aac.* Martin Storsjo
|
||||||
rtsp.c Luca Barbato
|
rtsp.c Luca Barbato
|
||||||
sbgdec.c Nicolas George
|
|
||||||
sdp.c Martin Storsjo
|
sdp.c Martin Storsjo
|
||||||
segafilm.c Mike Melanson
|
segafilm.c Mike Melanson
|
||||||
siff.c Kostya Shishkov
|
siff.c Kostya Shishkov
|
||||||
@@ -374,7 +340,6 @@ Muxers/Demuxers:
|
|||||||
wv.c Kostya Shishkov
|
wv.c Kostya Shishkov
|
||||||
|
|
||||||
Protocols:
|
Protocols:
|
||||||
bluray.c Petri Hintukainen
|
|
||||||
http.c Ronald S. Bultje
|
http.c Ronald S. Bultje
|
||||||
mms*.c Ronald S. Bultje
|
mms*.c Ronald S. Bultje
|
||||||
udp.c Luca Abeni
|
udp.c Luca Abeni
|
||||||
@@ -397,16 +362,8 @@ Sparc Roman Shaposhnik
|
|||||||
x86 Michael Niedermayer
|
x86 Michael Niedermayer
|
||||||
|
|
||||||
|
|
||||||
Releases
|
GnuPG Fingerprints of maintainers and others who have svn write access
|
||||||
========
|
======================================================================
|
||||||
|
|
||||||
0.11 Michael Niedermayer
|
|
||||||
0.10 Michael Niedermayer
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GnuPG Fingerprints of maintainers and contributors
|
|
||||||
==================================================
|
|
||||||
|
|
||||||
Anssi Hannula 1A92 FF42 2DD9 8D2E 8AF7 65A9 4278 C520 513D F3CB
|
Anssi Hannula 1A92 FF42 2DD9 8D2E 8AF7 65A9 4278 C520 513D F3CB
|
||||||
Anton Khirnov 6D0C 6625 56F8 65D1 E5F5 814B B50A 1241 C067 07AB
|
Anton Khirnov 6D0C 6625 56F8 65D1 E5F5 814B B50A 1241 C067 07AB
|
||||||
@@ -416,15 +373,12 @@ Ben Littler 3EE3 3723 E560 3214 A8CD 4DEB 2CDB FCE7 768C 8D2C
|
|||||||
Benoit Fouet B22A 4F4F 43EF 636B BB66 FCDC 0023 AE1E 2985 49C8
|
Benoit Fouet B22A 4F4F 43EF 636B BB66 FCDC 0023 AE1E 2985 49C8
|
||||||
Daniel Verkamp 78A6 07ED 782C 653E C628 B8B9 F0EB 8DD8 2F0E 21C7
|
Daniel Verkamp 78A6 07ED 782C 653E C628 B8B9 F0EB 8DD8 2F0E 21C7
|
||||||
Diego Biurrun 8227 1E31 B6D9 4994 7427 E220 9CAE D6CC 4757 FCC5
|
Diego Biurrun 8227 1E31 B6D9 4994 7427 E220 9CAE D6CC 4757 FCC5
|
||||||
Gwenole Beauchesne 2E63 B3A6 3E44 37E2 017D 2704 53C7 6266 B153 99C4
|
|
||||||
Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368
|
Jaikrishnan Menon 61A1 F09F 01C9 2D45 78E1 C862 25DC 8831 AF70 D368
|
||||||
Justin Ruggles 3136 ECC0 C10D 6C04 5F43 CA29 FCBE CD2A 3787 1EBF
|
Justin Ruggles 3136 ECC0 C10D 6C04 5F43 CA29 FCBE CD2A 3787 1EBF
|
||||||
Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE
|
Loren Merritt ABD9 08F4 C920 3F65 D8BE 35D7 1540 DAA7 060F 56DE
|
||||||
Lou Logan 7D68 DC73 CBEF EABB 671A B6CF 621C 2E28 82F8 DC3A
|
|
||||||
Luca Barbato 6677 4209 213C 8843 5B67 29E7 E84C 78C2 84E9 0E34
|
Luca Barbato 6677 4209 213C 8843 5B67 29E7 E84C 78C2 84E9 0E34
|
||||||
Michael Niedermayer 9FF2 128B 147E F673 0BAD F133 611E C787 040B 0FAB
|
Michael Niedermayer 9FF2 128B 147E F673 0BAD F133 611E C787 040B 0FAB
|
||||||
Nicolas George 24CE 01CE 9ACC 5CEB 74D8 8D9D B063 D997 36E5 4C93
|
Panagiotis Issaris 515C E262 10A8 FDCE 5481 7B9C 3AD7 D9A5 071D B3A9
|
||||||
Panagiotis Issaris 6571 13A3 33D9 3726 F728 AA98 F643 B12E ECF3 E029
|
|
||||||
Peter Ross A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B
|
Peter Ross A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B
|
||||||
Reimar Döffinger C61D 16E5 9E2C D10C 8958 38A4 0899 A2B9 06D4 D9C7
|
Reimar Döffinger C61D 16E5 9E2C D10C 8958 38A4 0899 A2B9 06D4 D9C7
|
||||||
Reinhard Tartler 9300 5DC2 7E87 6C37 ED7B CA9A 9808 3544 9453 48A4
|
Reinhard Tartler 9300 5DC2 7E87 6C37 ED7B CA9A 9808 3544 9453 48A4
|
||||||
|
|||||||
266
Makefile
266
Makefile
@@ -1,14 +1,13 @@
|
|||||||
MAIN_MAKEFILE=1
|
|
||||||
include config.mak
|
include config.mak
|
||||||
|
|
||||||
vpath %.c $(SRC_PATH)
|
SRC_DIR = $(SRC_PATH_BARE)
|
||||||
vpath %.cpp $(SRC_PATH)
|
|
||||||
vpath %.h $(SRC_PATH)
|
vpath %.c $(SRC_DIR)
|
||||||
vpath %.S $(SRC_PATH)
|
vpath %.h $(SRC_DIR)
|
||||||
vpath %.asm $(SRC_PATH)
|
vpath %.S $(SRC_DIR)
|
||||||
vpath %.v $(SRC_PATH)
|
vpath %.asm $(SRC_DIR)
|
||||||
vpath %.texi $(SRC_PATH)
|
vpath %.v $(SRC_DIR)
|
||||||
vpath %/fate_config.sh.template $(SRC_PATH)
|
vpath %.texi $(SRC_PATH_BARE)
|
||||||
|
|
||||||
PROGS-$(CONFIG_FFMPEG) += ffmpeg
|
PROGS-$(CONFIG_FFMPEG) += ffmpeg
|
||||||
PROGS-$(CONFIG_FFPLAY) += ffplay
|
PROGS-$(CONFIG_FFPLAY) += ffplay
|
||||||
@@ -16,61 +15,58 @@ PROGS-$(CONFIG_FFPROBE) += ffprobe
|
|||||||
PROGS-$(CONFIG_FFSERVER) += ffserver
|
PROGS-$(CONFIG_FFSERVER) += ffserver
|
||||||
|
|
||||||
PROGS := $(PROGS-yes:%=%$(EXESUF))
|
PROGS := $(PROGS-yes:%=%$(EXESUF))
|
||||||
INSTPROGS = $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF))
|
PROGS_G = $(PROGS-yes:%=%_g$(EXESUF))
|
||||||
OBJS = $(PROGS-yes:%=%.o) cmdutils.o
|
OBJS = $(PROGS-yes:%=%.o) cmdutils.o
|
||||||
|
MANPAGES = $(PROGS-yes:%=doc/%.1)
|
||||||
|
PODPAGES = $(PROGS-yes:%=doc/%.pod)
|
||||||
|
HTMLPAGES = $(PROGS-yes:%=doc/%.html)
|
||||||
|
TOOLS = $(addprefix tools/, $(addsuffix $(EXESUF), cws2fws graph2dot lavfi-showfiltfmts pktdumper probetest qt-faststart trasher))
|
||||||
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
|
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
|
||||||
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
|
HOSTPROGS := $(TESTTOOLS:%=tests/%)
|
||||||
TOOLS = qt-faststart trasher
|
|
||||||
TOOLS-$(CONFIG_ZLIB) += cws2fws
|
|
||||||
|
|
||||||
BASENAMES = ffmpeg ffplay ffprobe ffserver
|
BASENAMES = ffmpeg ffplay ffprobe ffserver
|
||||||
ALLPROGS = $(BASENAMES:%=%$(PROGSSUF)$(EXESUF))
|
ALLPROGS = $(BASENAMES:%=%$(EXESUF))
|
||||||
ALLPROGS_G = $(BASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
|
ALLPROGS_G = $(BASENAMES:%=%_g$(EXESUF))
|
||||||
ALLMANPAGES = $(BASENAMES:%=%.1)
|
ALLMANPAGES = $(BASENAMES:%=%.1)
|
||||||
|
|
||||||
|
ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale
|
||||||
|
|
||||||
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
|
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
|
||||||
FFLIBS-$(CONFIG_AVFILTER) += avfilter
|
FFLIBS-$(CONFIG_AVFILTER) += avfilter
|
||||||
FFLIBS-$(CONFIG_AVFORMAT) += avformat
|
FFLIBS-$(CONFIG_AVFORMAT) += avformat
|
||||||
FFLIBS-$(CONFIG_AVRESAMPLE) += avresample
|
|
||||||
FFLIBS-$(CONFIG_AVCODEC) += avcodec
|
FFLIBS-$(CONFIG_AVCODEC) += avcodec
|
||||||
FFLIBS-$(CONFIG_POSTPROC) += postproc
|
FFLIBS-$(CONFIG_POSTPROC) += postproc
|
||||||
FFLIBS-$(CONFIG_SWRESAMPLE)+= swresample
|
|
||||||
FFLIBS-$(CONFIG_SWSCALE) += swscale
|
FFLIBS-$(CONFIG_SWSCALE) += swscale
|
||||||
|
|
||||||
FFLIBS := avutil
|
FFLIBS := avutil
|
||||||
|
|
||||||
DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.ffpreset) $(SRC_PATH)/doc/ffprobe.xsd
|
DATA_FILES := $(wildcard $(SRC_DIR)/ffpresets/*.ffpreset)
|
||||||
EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/Makefile
|
|
||||||
|
|
||||||
SKIPHEADERS = cmdutils_common_opts.h
|
SKIPHEADERS = cmdutils_common_opts.h
|
||||||
|
|
||||||
include $(SRC_PATH)/common.mak
|
include common.mak
|
||||||
|
|
||||||
|
FF_LDFLAGS := $(FFLDFLAGS)
|
||||||
FF_EXTRALIBS := $(FFEXTRALIBS)
|
FF_EXTRALIBS := $(FFEXTRALIBS)
|
||||||
FF_DEP_LIBS := $(DEP_LIBS)
|
FF_DEP_LIBS := $(DEP_LIBS)
|
||||||
|
|
||||||
all: $(PROGS)
|
all-$(CONFIG_DOC): documentation
|
||||||
|
|
||||||
$(PROGS): %$(EXESUF): %$(PROGSSUF)_g$(EXESUF)
|
all: $(FF_DEP_LIBS) $(PROGS)
|
||||||
$(CP) $< $@$(PROGSSUF)
|
|
||||||
$(STRIP) $@$(PROGSSUF)
|
|
||||||
|
|
||||||
$(TOOLS): %$(EXESUF): %.o
|
$(PROGS): %$(EXESUF): %_g$(EXESUF)
|
||||||
$(LD) $(LDFLAGS) -o $@ $< $(ELIBS)
|
$(CP) $< $@
|
||||||
|
$(STRIP) $@
|
||||||
tools/cws2fws$(EXESUF): ELIBS = -lz
|
|
||||||
|
|
||||||
config.h: .config
|
config.h: .config
|
||||||
.config: $(wildcard $(FFLIBS:%=$(SRC_PATH)/lib%/all*.c))
|
.config: $(wildcard $(FFLIBS:%=$(SRC_DIR)/lib%/all*.c))
|
||||||
@-tput bold 2>/dev/null
|
@-tput bold 2>/dev/null
|
||||||
@-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n'
|
@-printf '\nWARNING: $(?F) newer than config.h, rerun configure\n\n'
|
||||||
@-tput sgr0 2>/dev/null
|
@-tput sgr0 2>/dev/null
|
||||||
|
|
||||||
SUBDIR_VARS := CLEANFILES EXAMPLES FFLIBS HOSTPROGS TESTPROGS TOOLS \
|
SUBDIR_VARS := OBJS FFLIBS CLEANFILES DIRS TESTPROGS EXAMPLES SKIPHEADERS \
|
||||||
ARCH_HEADERS BUILT_HEADERS SKIPHEADERS \
|
ALTIVEC-OBJS MMX-OBJS NEON-OBJS X86-OBJS YASM-OBJS-FFT YASM-OBJS \
|
||||||
ALTIVEC-OBJS ARMV5TE-OBJS ARMV6-OBJS ARMVFP-OBJS MMI-OBJS \
|
HOSTPROGS BUILT_HEADERS TESTOBJS ARCH_HEADERS ARMV6-OBJS
|
||||||
MMX-OBJS NEON-OBJS VIS-OBJS YASM-OBJS \
|
|
||||||
OBJS TESTOBJS
|
|
||||||
|
|
||||||
define RESET
|
define RESET
|
||||||
$(1) :=
|
$(1) :=
|
||||||
@@ -80,26 +76,31 @@ endef
|
|||||||
define DOSUBDIR
|
define DOSUBDIR
|
||||||
$(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
|
$(foreach V,$(SUBDIR_VARS),$(eval $(call RESET,$(V))))
|
||||||
SUBDIR := $(1)/
|
SUBDIR := $(1)/
|
||||||
include $(SRC_PATH)/$(1)/Makefile
|
include $(1)/Makefile
|
||||||
-include $(SRC_PATH)/$(1)/$(ARCH)/Makefile
|
|
||||||
include $(SRC_PATH)/library.mak
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
$(foreach D,$(FFLIBS),$(eval $(call DOSUBDIR,lib$(D))))
|
||||||
|
|
||||||
ffplay.o: CFLAGS += $(SDL_CFLAGS)
|
ffplay.o: CFLAGS += $(SDL_CFLAGS)
|
||||||
ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
|
ffplay_g$(EXESUF): FF_EXTRALIBS += $(SDL_LIBS)
|
||||||
ffserver_g$(EXESUF): LDFLAGS += $(FFSERVERLDFLAGS)
|
ffserver_g$(EXESUF): FF_LDFLAGS += $(FFSERVERLDFLAGS)
|
||||||
|
|
||||||
%$(PROGSSUF)_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
|
%_g$(EXESUF): %.o cmdutils.o $(FF_DEP_LIBS)
|
||||||
$(LD) $(LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
|
$(LD) $(FF_LDFLAGS) -o $@ $< cmdutils.o $(FF_EXTRALIBS)
|
||||||
|
|
||||||
OBJDIRS += tools
|
alltools: $(TOOLS)
|
||||||
|
|
||||||
|
tools/%$(EXESUF): tools/%.o
|
||||||
|
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||||
|
|
||||||
|
tools/%.o: tools/%.c
|
||||||
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c $(CC_O) $<
|
||||||
|
|
||||||
-include $(wildcard tools/*.d)
|
-include $(wildcard tools/*.d)
|
||||||
|
-include $(wildcard tests/*.d)
|
||||||
|
|
||||||
VERSION_SH = $(SRC_PATH)/version.sh
|
VERSION_SH = $(SRC_PATH_BARE)/version.sh
|
||||||
GIT_LOG = $(SRC_PATH)/.git/logs/HEAD
|
GIT_LOG = $(SRC_PATH_BARE)/.git/logs/HEAD
|
||||||
|
|
||||||
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
|
.version: $(wildcard $(GIT_LOG)) $(VERSION_SH) config.mak
|
||||||
.version: M=@
|
.version: M=@
|
||||||
@@ -111,6 +112,28 @@ version.h .version:
|
|||||||
# force version.sh to run whenever version might have changed
|
# force version.sh to run whenever version might have changed
|
||||||
-include .version
|
-include .version
|
||||||
|
|
||||||
|
DOCS = $(addprefix doc/, developer.html faq.html general.html libavfilter.html) $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
|
||||||
|
|
||||||
|
documentation: $(DOCS)
|
||||||
|
|
||||||
|
-include $(wildcard $(DOCS:%=%.d))
|
||||||
|
|
||||||
|
TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
||||||
|
|
||||||
|
doc/%.html: TAG = HTML
|
||||||
|
doc/%.html: doc/%.texi $(SRC_PATH_BARE)/doc/t2h.init
|
||||||
|
$(Q)$(TEXIDEP)
|
||||||
|
$(M)texi2html -monolithic --init-file $(SRC_PATH_BARE)/doc/t2h.init --output $@ $<
|
||||||
|
|
||||||
|
doc/%.pod: TAG = POD
|
||||||
|
doc/%.pod: doc/%.texi
|
||||||
|
$(Q)$(TEXIDEP)
|
||||||
|
$(M)doc/texi2pod.pl $< $@
|
||||||
|
|
||||||
|
doc/%.1: TAG = MAN
|
||||||
|
doc/%.1: doc/%.pod
|
||||||
|
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
|
||||||
|
|
||||||
ifdef PROGS
|
ifdef PROGS
|
||||||
install: install-progs install-data
|
install: install-progs install-data
|
||||||
endif
|
endif
|
||||||
@@ -120,18 +143,22 @@ install: install-libs install-headers
|
|||||||
install-libs: install-libs-yes
|
install-libs: install-libs-yes
|
||||||
|
|
||||||
install-progs-yes:
|
install-progs-yes:
|
||||||
|
install-progs-$(CONFIG_DOC): install-man
|
||||||
install-progs-$(CONFIG_SHARED): install-libs
|
install-progs-$(CONFIG_SHARED): install-libs
|
||||||
|
|
||||||
install-progs: install-progs-yes $(PROGS)
|
install-progs: install-progs-yes $(PROGS)
|
||||||
$(Q)mkdir -p "$(BINDIR)"
|
$(Q)mkdir -p "$(BINDIR)"
|
||||||
$(INSTALL) -c -m 755 $(INSTPROGS) "$(BINDIR)"
|
$(INSTALL) -c -m 755 $(PROGS) "$(BINDIR)"
|
||||||
|
|
||||||
install-data: $(DATA_FILES) $(EXAMPLES_FILES)
|
install-data: $(DATA_FILES)
|
||||||
$(Q)mkdir -p "$(DATADIR)/examples"
|
$(Q)mkdir -p "$(DATADIR)"
|
||||||
$(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
|
$(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)"
|
||||||
$(INSTALL) -m 644 $(EXAMPLES_FILES) "$(DATADIR)/examples"
|
|
||||||
|
|
||||||
uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data
|
install-man: $(MANPAGES)
|
||||||
|
$(Q)mkdir -p "$(MANDIR)/man1"
|
||||||
|
$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
||||||
|
|
||||||
|
uninstall: uninstall-libs uninstall-headers uninstall-progs uninstall-data uninstall-man
|
||||||
|
|
||||||
uninstall-progs:
|
uninstall-progs:
|
||||||
$(RM) $(addprefix "$(BINDIR)/", $(ALLPROGS))
|
$(RM) $(addprefix "$(BINDIR)/", $(ALLPROGS))
|
||||||
@@ -139,13 +166,21 @@ uninstall-progs:
|
|||||||
uninstall-data:
|
uninstall-data:
|
||||||
$(RM) -r "$(DATADIR)"
|
$(RM) -r "$(DATADIR)"
|
||||||
|
|
||||||
clean::
|
uninstall-man:
|
||||||
|
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
||||||
|
|
||||||
|
testclean:
|
||||||
|
$(RM) -r tests/vsynth1 tests/vsynth2 tests/data
|
||||||
|
$(RM) $(addprefix tests/,$(CLEANSUFFIXES))
|
||||||
|
$(RM) tests/seek_test$(EXESUF) tests/seek_test.o
|
||||||
|
$(RM) $(TESTTOOLS:%=tests/%$(HOSTEXESUF))
|
||||||
|
|
||||||
|
clean:: testclean
|
||||||
$(RM) $(ALLPROGS) $(ALLPROGS_G)
|
$(RM) $(ALLPROGS) $(ALLPROGS_G)
|
||||||
$(RM) $(CLEANSUFFIXES)
|
$(RM) $(CLEANSUFFIXES)
|
||||||
|
$(RM) doc/*.html doc/*.pod doc/*.1 doc/*.d doc/*~
|
||||||
$(RM) $(TOOLS)
|
$(RM) $(TOOLS)
|
||||||
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
||||||
$(RM) coverage.info
|
|
||||||
$(RM) -r coverage-html
|
|
||||||
|
|
||||||
distclean::
|
distclean::
|
||||||
$(RM) $(DISTCLEANSUFFIXES)
|
$(RM) $(DISTCLEANSUFFIXES)
|
||||||
@@ -154,30 +189,119 @@ distclean::
|
|||||||
config:
|
config:
|
||||||
$(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
|
$(SRC_PATH)/configure $(value FFMPEG_CONFIGURATION)
|
||||||
|
|
||||||
# Without the sed genthml thinks "libavutil" and "./libavutil" are two different things
|
# regression tests
|
||||||
coverage.info: $(wildcard *.gcda *.gcno */*.gcda */*.gcno */*/*.gcda */*/*.gcno)
|
|
||||||
$(Q)lcov -c -d . -b . | sed -e 's#/./#/#g' > $@
|
|
||||||
|
|
||||||
coverage-html: coverage.info
|
check: test
|
||||||
$(Q)mkdir -p $@
|
|
||||||
$(Q)genhtml -o $@ $<
|
|
||||||
$(Q)touch $@
|
|
||||||
|
|
||||||
check: all alltools checkheaders examples testprogs fate
|
fulltest test: codectest lavftest lavfitest seektest
|
||||||
|
|
||||||
include $(SRC_PATH)/doc/Makefile
|
FFSERVER_REFFILE = $(SRC_PATH)/tests/ffserver.regression.ref
|
||||||
include $(SRC_PATH)/tests/Makefile
|
|
||||||
|
|
||||||
$(sort $(OBJDIRS)):
|
codectest: fate-codec
|
||||||
$(Q)mkdir -p $@
|
lavftest: fate-lavf
|
||||||
|
lavfitest: fate-lavfi
|
||||||
|
seektest: fate-seek
|
||||||
|
|
||||||
# Dummy rule to stop make trying to rebuild removed or renamed headers
|
AREF = fate-acodec-aref
|
||||||
%.h:
|
VREF = fate-vsynth1-vref fate-vsynth2-vref
|
||||||
@:
|
REFS = $(AREF) $(VREF)
|
||||||
|
|
||||||
# Disable suffix rules. Most of the builtin rules are suffix rules,
|
$(VREF): ffmpeg$(EXESUF) tests/vsynth1/00.pgm tests/vsynth2/00.pgm
|
||||||
# so this saves some time on slow systems.
|
$(AREF): ffmpeg$(EXESUF) tests/data/asynth1.sw
|
||||||
.SUFFIXES:
|
|
||||||
|
|
||||||
.PHONY: all all-yes alltools check *clean config install*
|
ffservertest: ffserver$(EXESUF) tests/vsynth1/00.pgm tests/data/asynth1.sw
|
||||||
.PHONY: testprogs uninstall*
|
@echo
|
||||||
|
@echo "Unfortunately ffserver is broken and therefore its regression"
|
||||||
|
@echo "test fails randomly. Treat the results accordingly."
|
||||||
|
@echo
|
||||||
|
$(SRC_PATH)/tests/ffserver-regression.sh $(FFSERVER_REFFILE) $(SRC_PATH)/tests/ffserver.conf
|
||||||
|
|
||||||
|
tests/vsynth1/00.pgm: tests/videogen$(HOSTEXESUF)
|
||||||
|
@mkdir -p tests/vsynth1
|
||||||
|
$(M)./$< 'tests/vsynth1/'
|
||||||
|
|
||||||
|
tests/vsynth2/00.pgm: tests/rotozoom$(HOSTEXESUF)
|
||||||
|
@mkdir -p tests/vsynth2
|
||||||
|
$(M)./$< 'tests/vsynth2/' $(SRC_PATH)/tests/lena.pnm
|
||||||
|
|
||||||
|
tests/data/asynth1.sw: tests/audiogen$(HOSTEXESUF)
|
||||||
|
@mkdir -p tests/data
|
||||||
|
$(M)./$< $@
|
||||||
|
|
||||||
|
tests/data/asynth1.sw tests/vsynth%/00.pgm: TAG = GEN
|
||||||
|
|
||||||
|
tests/seek_test$(EXESUF): tests/seek_test.o $(FF_DEP_LIBS)
|
||||||
|
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||||
|
|
||||||
|
tools/lavfi-showfiltfmts$(EXESUF): tools/lavfi-showfiltfmts.o $(FF_DEP_LIBS)
|
||||||
|
$(LD) $(FF_LDFLAGS) -o $@ $< $(FF_EXTRALIBS)
|
||||||
|
|
||||||
|
include $(SRC_PATH_BARE)/tests/fate.mak
|
||||||
|
include $(SRC_PATH_BARE)/tests/fate2.mak
|
||||||
|
|
||||||
|
include $(SRC_PATH_BARE)/tests/fate/aac.mak
|
||||||
|
include $(SRC_PATH_BARE)/tests/fate/als.mak
|
||||||
|
include $(SRC_PATH_BARE)/tests/fate/fft.mak
|
||||||
|
include $(SRC_PATH_BARE)/tests/fate/h264.mak
|
||||||
|
include $(SRC_PATH_BARE)/tests/fate/mp3.mak
|
||||||
|
include $(SRC_PATH_BARE)/tests/fate/vorbis.mak
|
||||||
|
include $(SRC_PATH_BARE)/tests/fate/vp8.mak
|
||||||
|
|
||||||
|
FATE_ACODEC = $(ACODEC_TESTS:%=fate-acodec-%)
|
||||||
|
FATE_VSYNTH1 = $(VCODEC_TESTS:%=fate-vsynth1-%)
|
||||||
|
FATE_VSYNTH2 = $(VCODEC_TESTS:%=fate-vsynth2-%)
|
||||||
|
FATE_VCODEC = $(FATE_VSYNTH1) $(FATE_VSYNTH2)
|
||||||
|
FATE_LAVF = $(LAVF_TESTS:%=fate-lavf-%)
|
||||||
|
FATE_LAVFI = $(LAVFI_TESTS:%=fate-lavfi-%)
|
||||||
|
FATE_SEEK = $(SEEK_TESTS:seek_%=fate-seek-%)
|
||||||
|
|
||||||
|
FATE = $(FATE_ACODEC) \
|
||||||
|
$(FATE_VCODEC) \
|
||||||
|
$(FATE_LAVF) \
|
||||||
|
$(FATE_LAVFI) \
|
||||||
|
$(FATE_SEEK) \
|
||||||
|
|
||||||
|
$(filter-out %-aref,$(FATE_ACODEC)): $(AREF)
|
||||||
|
$(filter-out %-vref,$(FATE_VCODEC)): $(VREF)
|
||||||
|
$(FATE_LAVF): $(REFS)
|
||||||
|
$(FATE_LAVFI): $(REFS) tools/lavfi-showfiltfmts$(EXESUF)
|
||||||
|
$(FATE_SEEK): fate-codec fate-lavf tests/seek_test$(EXESUF)
|
||||||
|
|
||||||
|
$(FATE_ACODEC): CMD = codectest acodec
|
||||||
|
$(FATE_VSYNTH1): CMD = codectest vsynth1
|
||||||
|
$(FATE_VSYNTH2): CMD = codectest vsynth2
|
||||||
|
$(FATE_LAVF): CMD = lavftest
|
||||||
|
$(FATE_LAVFI): CMD = lavfitest
|
||||||
|
$(FATE_SEEK): CMD = seektest
|
||||||
|
|
||||||
|
fate-codec: fate-acodec fate-vcodec
|
||||||
|
fate-acodec: $(FATE_ACODEC)
|
||||||
|
fate-vcodec: $(FATE_VCODEC)
|
||||||
|
fate-lavf: $(FATE_LAVF)
|
||||||
|
fate-lavfi: $(FATE_LAVFI)
|
||||||
|
fate-seek: $(FATE_SEEK)
|
||||||
|
|
||||||
|
ifdef SAMPLES
|
||||||
|
FATE += $(FATE_TESTS)
|
||||||
|
fate-rsync:
|
||||||
|
rsync -vaLW rsync://fate-suite.libav.org/fate-suite/ $(SAMPLES)
|
||||||
|
else
|
||||||
|
fate-rsync:
|
||||||
|
@echo "use 'make fate-rsync SAMPLES=/path/to/samples' to sync the fate suite"
|
||||||
|
$(FATE_TESTS):
|
||||||
|
@echo "SAMPLES not specified, cannot run FATE. See doc/fate.txt for more information."
|
||||||
|
endif
|
||||||
|
|
||||||
|
FATE_UTILS = base64 tiny_psnr
|
||||||
|
|
||||||
|
fate: $(FATE)
|
||||||
|
|
||||||
|
$(FATE): ffmpeg$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
|
||||||
|
@echo "TEST $(@:fate-%=%)"
|
||||||
|
$(Q)$(SRC_PATH)/tests/fate-run.sh $@ "$(SAMPLES)" "$(TARGET_EXEC)" "$(TARGET_PATH)" '$(CMD)' '$(CMP)' '$(REF)' '$(FUZZ)' '$(THREADS)' '$(THREAD_TYPE)'
|
||||||
|
|
||||||
|
fate-list:
|
||||||
|
@printf '%s\n' $(sort $(FATE))
|
||||||
|
|
||||||
|
.PHONY: all alltools *clean check config documentation examples install*
|
||||||
|
.PHONY: *test testprogs uninstall*
|
||||||
|
|||||||
8
README
8
README
@@ -4,15 +4,9 @@ FFmpeg README
|
|||||||
1) Documentation
|
1) Documentation
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
* Read the documentation in the doc/ directory in git.
|
* Read the documentation in the doc/ directory.
|
||||||
You can also view it online at http://ffmpeg.org/documentation.html
|
|
||||||
|
|
||||||
2) Licensing
|
2) Licensing
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* See the LICENSE file.
|
* See the LICENSE file.
|
||||||
|
|
||||||
3) Build and Install
|
|
||||||
--------------------
|
|
||||||
|
|
||||||
* See the INSTALL file.
|
|
||||||
|
|||||||
13
arch.mak
13
arch.mak
@@ -1,13 +0,0 @@
|
|||||||
OBJS-$(HAVE_ARMV5TE) += $(ARMV5TE-OBJS) $(ARMV5TE-OBJS-yes)
|
|
||||||
OBJS-$(HAVE_ARMV6) += $(ARMV6-OBJS) $(ARMV6-OBJS-yes)
|
|
||||||
OBJS-$(HAVE_ARMVFP) += $(ARMVFP-OBJS) $(ARMVFP-OBJS-yes)
|
|
||||||
OBJS-$(HAVE_NEON) += $(NEON-OBJS) $(NEON-OBJS-yes)
|
|
||||||
|
|
||||||
OBJS-$(HAVE_MMI) += $(MMI-OBJS) $(MMI-OBJS-yes)
|
|
||||||
|
|
||||||
OBJS-$(HAVE_ALTIVEC) += $(ALTIVEC-OBJS) $(ALTIVEC-OBJS-yes)
|
|
||||||
|
|
||||||
OBJS-$(HAVE_VIS) += $(VIS-OBJS) $(VIS-OBJS-yes)
|
|
||||||
|
|
||||||
OBJS-$(HAVE_MMX) += $(MMX-OBJS) $(MMX-OBJS-yes)
|
|
||||||
OBJS-$(HAVE_YASM) += $(YASM-OBJS) $(YASM-OBJS-yes)
|
|
||||||
1113
cmdutils.c
1113
cmdutils.c
File diff suppressed because it is too large
Load Diff
154
cmdutils.h
154
cmdutils.h
@@ -43,16 +43,11 @@ extern const char program_name[];
|
|||||||
*/
|
*/
|
||||||
extern const int program_birth_year;
|
extern const int program_birth_year;
|
||||||
|
|
||||||
/**
|
extern const char **opt_names;
|
||||||
* this year, defined by the program for show_banner()
|
|
||||||
*/
|
|
||||||
extern const int this_year;
|
|
||||||
|
|
||||||
extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
extern AVCodecContext *avcodec_opts[AVMEDIA_TYPE_NB];
|
||||||
extern AVFormatContext *avformat_opts;
|
extern AVFormatContext *avformat_opts;
|
||||||
extern struct SwsContext *sws_opts;
|
extern struct SwsContext *sws_opts;
|
||||||
extern struct SwrContext *swr_opts;
|
extern AVDictionary *format_opts, *video_opts, *audio_opts, *sub_opts;
|
||||||
extern AVDictionary *format_opts, *codec_opts;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the cmdutils option system, in particular
|
* Initialize the cmdutils option system, in particular
|
||||||
@@ -82,14 +77,6 @@ int opt_default(const char *opt, const char *arg);
|
|||||||
*/
|
*/
|
||||||
int opt_loglevel(const char *opt, const char *arg);
|
int opt_loglevel(const char *opt, const char *arg);
|
||||||
|
|
||||||
int opt_report(const char *opt);
|
|
||||||
|
|
||||||
int opt_max_alloc(const char *opt, const char *arg);
|
|
||||||
|
|
||||||
int opt_cpuflags(const char *opt, const char *arg);
|
|
||||||
|
|
||||||
int opt_codec_debug(const char *opt, const char *arg);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit the execution time.
|
* Limit the execution time.
|
||||||
*/
|
*/
|
||||||
@@ -101,15 +88,14 @@ int opt_timelimit(const char *opt, const char *arg);
|
|||||||
* parsed or the corresponding value is invalid.
|
* parsed or the corresponding value is invalid.
|
||||||
*
|
*
|
||||||
* @param context the context of the value to be set (e.g. the
|
* @param context the context of the value to be set (e.g. the
|
||||||
* corresponding command line option name)
|
* corresponding commandline option name)
|
||||||
* @param numstr the string to be parsed
|
* @param numstr the string to be parsed
|
||||||
* @param type the type (OPT_INT64 or OPT_FLOAT) as which the
|
* @param type the type (OPT_INT64 or OPT_FLOAT) as which the
|
||||||
* string should be parsed
|
* string should be parsed
|
||||||
* @param min the minimum valid accepted value
|
* @param min the minimum valid accepted value
|
||||||
* @param max the maximum valid accepted value
|
* @param max the maximum valid accepted value
|
||||||
*/
|
*/
|
||||||
double parse_number_or_die(const char *context, const char *numstr, int type,
|
double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max);
|
||||||
double min, double max);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse a string specifying a time and return its corresponding
|
* Parse a string specifying a time and return its corresponding
|
||||||
@@ -117,7 +103,7 @@ double parse_number_or_die(const char *context, const char *numstr, int type,
|
|||||||
* the string cannot be correctly parsed.
|
* the string cannot be correctly parsed.
|
||||||
*
|
*
|
||||||
* @param context the context of the value to be set (e.g. the
|
* @param context the context of the value to be set (e.g. the
|
||||||
* corresponding command line option name)
|
* corresponding commandline option name)
|
||||||
* @param timestr the string to be parsed
|
* @param timestr the string to be parsed
|
||||||
* @param is_duration a flag which tells how to interpret timestr, if
|
* @param is_duration a flag which tells how to interpret timestr, if
|
||||||
* not zero timestr is interpreted as a duration, otherwise as a
|
* not zero timestr is interpreted as a duration, otherwise as a
|
||||||
@@ -125,19 +111,7 @@ double parse_number_or_die(const char *context, const char *numstr, int type,
|
|||||||
*
|
*
|
||||||
* @see parse_date()
|
* @see parse_date()
|
||||||
*/
|
*/
|
||||||
int64_t parse_time_or_die(const char *context, const char *timestr,
|
int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration);
|
||||||
int is_duration);
|
|
||||||
|
|
||||||
typedef struct SpecifierOpt {
|
|
||||||
char *specifier; /**< stream/chapter/program/... specifier */
|
|
||||||
union {
|
|
||||||
uint8_t *str;
|
|
||||||
int i;
|
|
||||||
int64_t i64;
|
|
||||||
float f;
|
|
||||||
double dbl;
|
|
||||||
} u;
|
|
||||||
} SpecifierOpt;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *name;
|
const char *name;
|
||||||
@@ -155,101 +129,31 @@ typedef struct {
|
|||||||
#define OPT_INT64 0x0400
|
#define OPT_INT64 0x0400
|
||||||
#define OPT_EXIT 0x0800
|
#define OPT_EXIT 0x0800
|
||||||
#define OPT_DATA 0x1000
|
#define OPT_DATA 0x1000
|
||||||
#define OPT_FUNC2 0x2000
|
|
||||||
#define OPT_OFFSET 0x4000 /* option is specified as an offset in a passed optctx */
|
|
||||||
#define OPT_SPEC 0x8000 /* option is to be stored in an array of SpecifierOpt.
|
|
||||||
Implies OPT_OFFSET. Next element after the offset is
|
|
||||||
an int containing element count in the array. */
|
|
||||||
#define OPT_TIME 0x10000
|
|
||||||
#define OPT_DOUBLE 0x20000
|
|
||||||
union {
|
union {
|
||||||
void *dst_ptr;
|
int *int_arg;
|
||||||
|
char **str_arg;
|
||||||
|
float *float_arg;
|
||||||
int (*func_arg)(const char *, const char *);
|
int (*func_arg)(const char *, const char *);
|
||||||
int (*func2_arg)(void *, const char *, const char *);
|
int64_t *int64_arg;
|
||||||
size_t off;
|
|
||||||
} u;
|
} u;
|
||||||
const char *help;
|
const char *help;
|
||||||
const char *argname;
|
const char *argname;
|
||||||
} OptionDef;
|
} OptionDef;
|
||||||
|
|
||||||
void show_help_options(const OptionDef *options, const char *msg, int mask,
|
void show_help_options(const OptionDef *options, const char *msg, int mask, int value);
|
||||||
int value);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show help for all options with given flags in class and all its
|
|
||||||
* children.
|
|
||||||
*/
|
|
||||||
void show_help_children(const AVClass *class, int flags);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse the command line arguments.
|
* Parse the command line arguments.
|
||||||
*
|
|
||||||
* @param optctx an opaque options context
|
|
||||||
* @param options Array with the definitions required to interpret every
|
* @param options Array with the definitions required to interpret every
|
||||||
* option of the form: -option_name [argument]
|
* option of the form: -option_name [argument]
|
||||||
* @param parse_arg_function Name of the function called to process every
|
* @param parse_arg_function Name of the function called to process every
|
||||||
* argument without a leading option name flag. NULL if such arguments do
|
* argument without a leading option name flag. NULL if such arguments do
|
||||||
* not have to be processed.
|
* not have to be processed.
|
||||||
*/
|
*/
|
||||||
void parse_options(void *optctx, int argc, char **argv, const OptionDef *options,
|
void parse_options(int argc, char **argv, const OptionDef *options,
|
||||||
void (* parse_arg_function)(void *optctx, const char*));
|
int (* parse_arg_function)(const char *opt, const char *arg));
|
||||||
|
|
||||||
/**
|
void set_context_opts(void *ctx, void *opts_ctx, int flags, AVCodec *codec);
|
||||||
* Parse one given option.
|
|
||||||
*
|
|
||||||
* @return on success 1 if arg was consumed, 0 otherwise; negative number on error
|
|
||||||
*/
|
|
||||||
int parse_option(void *optctx, const char *opt, const char *arg,
|
|
||||||
const OptionDef *options);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the '-loglevel' option in the command line args and apply it.
|
|
||||||
*/
|
|
||||||
void parse_loglevel(int argc, char **argv, const OptionDef *options);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return index of option opt in argv or 0 if not found.
|
|
||||||
*/
|
|
||||||
int locate_option(int argc, char **argv, const OptionDef *options,
|
|
||||||
const char *optname);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if the given stream matches a stream specifier.
|
|
||||||
*
|
|
||||||
* @param s Corresponding format context.
|
|
||||||
* @param st Stream from s to be checked.
|
|
||||||
* @param spec A stream specifier of the [v|a|s|d]:[\<stream index\>] form.
|
|
||||||
*
|
|
||||||
* @return 1 if the stream matches, 0 if it doesn't, <0 on error
|
|
||||||
*/
|
|
||||||
int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Filter out options for given codec.
|
|
||||||
*
|
|
||||||
* Create a new options dictionary containing only the options from
|
|
||||||
* opts which apply to the codec with ID codec_id.
|
|
||||||
*
|
|
||||||
* @param s Corresponding format context.
|
|
||||||
* @param st A stream from s for which the options should be filtered.
|
|
||||||
* @return a pointer to the created dictionary
|
|
||||||
*/
|
|
||||||
AVDictionary *filter_codec_opts(AVDictionary *opts, AVCodec *codec,
|
|
||||||
AVFormatContext *s, AVStream *st);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Setup AVCodecContext options for avformat_find_stream_info().
|
|
||||||
*
|
|
||||||
* Create an array of dictionaries, one dictionary for each stream
|
|
||||||
* contained in s.
|
|
||||||
* Each dictionary will contain the options from codec_opts which can
|
|
||||||
* be applied to the corresponding stream codec context.
|
|
||||||
*
|
|
||||||
* @return pointer to the created array of dictionaries, NULL if it
|
|
||||||
* cannot be created
|
|
||||||
*/
|
|
||||||
AVDictionary **setup_find_stream_info_opts(AVFormatContext *s,
|
|
||||||
AVDictionary *codec_opts);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print an error message to stderr, indicating filename and a human
|
* Print an error message to stderr, indicating filename and a human
|
||||||
@@ -267,7 +171,7 @@ void print_error(const char *filename, int err);
|
|||||||
* current version of the repository and of the libav* libraries used by
|
* current version of the repository and of the libav* libraries used by
|
||||||
* the program.
|
* the program.
|
||||||
*/
|
*/
|
||||||
void show_banner(int argc, char **argv, const OptionDef *options);
|
void show_banner(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print the version of the program to stdout. The version message
|
* Print the version of the program to stdout. The version message
|
||||||
@@ -326,12 +230,6 @@ int opt_protocols(const char *opt, const char *arg);
|
|||||||
*/
|
*/
|
||||||
int opt_pix_fmts(const char *opt, const char *arg);
|
int opt_pix_fmts(const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
|
||||||
* Print a listing containing all the sample formats supported by the
|
|
||||||
* program.
|
|
||||||
*/
|
|
||||||
int show_sample_fmts(const char *opt, const char *arg);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a positive value if a line read from standard input
|
* Return a positive value if a line read from standard input
|
||||||
* starts with [yY], otherwise return 0.
|
* starts with [yY], otherwise return 0.
|
||||||
@@ -347,7 +245,7 @@ int read_yesno(void);
|
|||||||
* @return 0 in case of success, a negative value corresponding to an
|
* @return 0 in case of success, a negative value corresponding to an
|
||||||
* AVERROR error code in case of failure.
|
* AVERROR error code in case of failure.
|
||||||
*/
|
*/
|
||||||
int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
|
int read_file(const char *filename, char **bufptr, size_t *size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a file corresponding to a preset file.
|
* Get a file corresponding to a preset file.
|
||||||
@@ -358,7 +256,7 @@ int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
|
|||||||
* at configuration time or in a "ffpresets" folder along the executable
|
* at configuration time or in a "ffpresets" folder along the executable
|
||||||
* on win32, in that order. If no such file is found and
|
* on win32, in that order. If no such file is found and
|
||||||
* codec_name is defined, then search for a file named
|
* codec_name is defined, then search for a file named
|
||||||
* codec_name-preset_name.avpreset in the above-mentioned directories.
|
* codec_name-preset_name.ffpreset in the above-mentioned directories.
|
||||||
*
|
*
|
||||||
* @param filename buffer where the name of the found filename is written
|
* @param filename buffer where the name of the found filename is written
|
||||||
* @param filename_size size in bytes of the filename buffer
|
* @param filename_size size in bytes of the filename buffer
|
||||||
@@ -370,20 +268,4 @@ int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
|
|||||||
FILE *get_preset_file(char *filename, size_t filename_size,
|
FILE *get_preset_file(char *filename, size_t filename_size,
|
||||||
const char *preset_name, int is_path, const char *codec_name);
|
const char *preset_name, int is_path, const char *codec_name);
|
||||||
|
|
||||||
/**
|
#endif /* FFMPEG_CMDUTILS_H */
|
||||||
* Do all the necessary cleanup and abort.
|
|
||||||
* This function is implemented in the avtools, not cmdutils.
|
|
||||||
*/
|
|
||||||
void exit_program(int ret);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Realloc array to hold new_size elements of elem_size.
|
|
||||||
* Calls exit_program() on failure.
|
|
||||||
*
|
|
||||||
* @param elem_size size in bytes of each element
|
|
||||||
* @param size new element count will be written here
|
|
||||||
* @return reallocated array
|
|
||||||
*/
|
|
||||||
void *grow_array(void *array, int elem_size, int *size, int new_size);
|
|
||||||
|
|
||||||
#endif /* CMDUTILS_H */
|
|
||||||
|
|||||||
@@ -10,11 +10,4 @@
|
|||||||
{ "protocols", OPT_EXIT, {(void*)opt_protocols}, "show available protocols" },
|
{ "protocols", OPT_EXIT, {(void*)opt_protocols}, "show available protocols" },
|
||||||
{ "filters", OPT_EXIT, {(void*)opt_filters }, "show available filters" },
|
{ "filters", OPT_EXIT, {(void*)opt_filters }, "show available filters" },
|
||||||
{ "pix_fmts" , OPT_EXIT, {(void*)opt_pix_fmts }, "show available pixel formats" },
|
{ "pix_fmts" , OPT_EXIT, {(void*)opt_pix_fmts }, "show available pixel formats" },
|
||||||
{ "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
|
|
||||||
{ "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
|
{ "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
|
||||||
{ "v", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
|
|
||||||
{ "debug", HAS_ARG, {(void*)opt_codec_debug}, "set debug flags", "flags" },
|
|
||||||
{ "fdebug", HAS_ARG, {(void*)opt_codec_debug}, "set debug flags", "flags" },
|
|
||||||
{ "report", 0, {(void*)opt_report}, "generate a report" },
|
|
||||||
{ "max_alloc", HAS_ARG, {(void*)opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },
|
|
||||||
{ "cpuflags", HAS_ARG | OPT_EXPERT, {(void*)opt_cpuflags}, "force specific cpu flags", "flags" },
|
|
||||||
|
|||||||
73
common.mak
73
common.mak
@@ -10,7 +10,7 @@ ifndef SUBDIR
|
|||||||
ifndef V
|
ifndef V
|
||||||
Q = @
|
Q = @
|
||||||
ECHO = printf "$(1)\t%s\n" $(2)
|
ECHO = printf "$(1)\t%s\n" $(2)
|
||||||
BRIEF = CC CXX AS YASM AR LD HOSTCC STRIP CP
|
BRIEF = CC AS YASM AR LD HOSTCC STRIP CP
|
||||||
SILENT = DEPCC YASMDEP RM RANLIB
|
SILENT = DEPCC YASMDEP RM RANLIB
|
||||||
MSG = $@
|
MSG = $@
|
||||||
M = @$(call ECHO,$(TAG),$@);
|
M = @$(call ECHO,$(TAG),$@);
|
||||||
@@ -20,38 +20,20 @@ $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
|
|||||||
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
|
$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample
|
IFLAGS := -I. -I$(SRC_PATH)
|
||||||
|
CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
|
||||||
|
CFLAGS += $(ECFLAGS)
|
||||||
|
YASMFLAGS += $(IFLAGS) -Pconfig.asm
|
||||||
|
|
||||||
# NASM requires -I path terminated with /
|
|
||||||
IFLAGS := -I. -I$(SRC_PATH)/
|
|
||||||
CPPFLAGS := $(IFLAGS) $(CPPFLAGS)
|
|
||||||
CFLAGS += $(ECFLAGS)
|
|
||||||
CCFLAGS = $(CFLAGS)
|
|
||||||
CXXFLAGS := $(CFLAGS) $(CXXFLAGS)
|
|
||||||
YASMFLAGS += $(IFLAGS) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm
|
|
||||||
HOSTCFLAGS += $(IFLAGS)
|
HOSTCFLAGS += $(IFLAGS)
|
||||||
LDFLAGS := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS)
|
|
||||||
|
|
||||||
define COMPILE
|
|
||||||
$($(1)DEP)
|
|
||||||
$($(1)) $(CPPFLAGS) $($(1)FLAGS) $($(1)_DEPFLAGS) -c $($(1)_O) $<
|
|
||||||
endef
|
|
||||||
|
|
||||||
COMPILE_C = $(call COMPILE,CC)
|
|
||||||
COMPILE_CXX = $(call COMPILE,CXX)
|
|
||||||
COMPILE_S = $(call COMPILE,AS)
|
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(COMPILE_C)
|
$(CCDEP)
|
||||||
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(CC_DEPFLAGS) -c $(CC_O) $<
|
||||||
%.o: %.cpp
|
|
||||||
$(COMPILE_CXX)
|
|
||||||
|
|
||||||
%.s: %.c
|
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -S -o $@ $<
|
|
||||||
|
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
$(COMPILE_S)
|
$(ASDEP)
|
||||||
|
$(AS) $(CPPFLAGS) $(ASFLAGS) $(AS_DEPFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
%.ho: %.h
|
%.ho: %.h
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
|
$(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
|
||||||
@@ -73,48 +55,37 @@ COMPILE_S = $(call COMPILE,AS)
|
|||||||
$(OBJS):
|
$(OBJS):
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include $(SRC_PATH)/arch.mak
|
OBJS-$(HAVE_MMX) += $(MMX-OBJS-yes)
|
||||||
|
|
||||||
OBJS += $(OBJS-yes)
|
OBJS += $(OBJS-yes)
|
||||||
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
FFLIBS := $(FFLIBS-yes) $(FFLIBS)
|
||||||
TESTPROGS += $(TESTPROGS-yes)
|
TESTPROGS += $(TESTPROGS-yes)
|
||||||
|
|
||||||
FFEXTRALIBS := $(FFLIBS:%=-l%$(BUILDSUF)) $(EXTRALIBS)
|
FFEXTRALIBS := $(addprefix -l,$(addsuffix $(BUILDSUF),$(FFLIBS))) $(EXTRALIBS)
|
||||||
|
FFLDFLAGS := $(addprefix -Llib,$(ALLFFLIBS)) $(LDFLAGS)
|
||||||
|
|
||||||
EXAMPLES := $(EXAMPLES:%=$(SUBDIR)%-example$(EXESUF))
|
EXAMPLES := $(addprefix $(SUBDIR),$(addsuffix -example$(EXESUF),$(EXAMPLES)))
|
||||||
OBJS := $(sort $(OBJS:%=$(SUBDIR)%))
|
OBJS := $(addprefix $(SUBDIR),$(sort $(OBJS)))
|
||||||
TESTOBJS := $(TESTOBJS:%=$(SUBDIR)%) $(TESTPROGS:%=$(SUBDIR)%-test.o)
|
TESTOBJS := $(addprefix $(SUBDIR),$(TESTOBJS) $(TESTPROGS:%=%-test.o))
|
||||||
TESTPROGS := $(TESTPROGS:%=$(SUBDIR)%-test$(EXESUF))
|
TESTPROGS := $(addprefix $(SUBDIR),$(addsuffix -test$(EXESUF),$(TESTPROGS)))
|
||||||
HOSTOBJS := $(HOSTPROGS:%=$(SUBDIR)%.o)
|
HOSTOBJS := $(addprefix $(SUBDIR),$(addsuffix .o,$(HOSTPROGS)))
|
||||||
HOSTPROGS := $(HOSTPROGS:%=$(SUBDIR)%$(HOSTEXESUF))
|
HOSTPROGS := $(addprefix $(SUBDIR),$(addsuffix $(HOSTEXESUF),$(HOSTPROGS)))
|
||||||
TOOLS += $(TOOLS-yes)
|
|
||||||
TOOLOBJS := $(TOOLS:%=tools/%.o)
|
|
||||||
TOOLS := $(TOOLS:%=tools/%$(EXESUF))
|
|
||||||
|
|
||||||
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
||||||
|
|
||||||
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
|
ALLHEADERS := $(subst $(SRC_DIR)/,$(SUBDIR),$(wildcard $(SRC_DIR)/*.h $(SRC_DIR)/$(ARCH)/*.h))
|
||||||
SKIPHEADERS += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
|
SKIPHEADERS += $(addprefix $(ARCH)/,$(ARCH_HEADERS))
|
||||||
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
|
SKIPHEADERS := $(addprefix $(SUBDIR),$(SKIPHEADERS-) $(SKIPHEADERS))
|
||||||
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
|
checkheaders: $(filter-out $(SKIPHEADERS:.h=.ho),$(ALLHEADERS:.h=.ho))
|
||||||
|
|
||||||
alltools: $(TOOLS)
|
|
||||||
|
|
||||||
$(HOSTOBJS): %.o: %.c
|
$(HOSTOBJS): %.o: %.c
|
||||||
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
|
$(HOSTCC) $(HOSTCFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
$(HOSTPROGS): %$(HOSTEXESUF): %.o
|
$(HOSTPROGS): %$(HOSTEXESUF): %.o
|
||||||
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
|
$(HOSTCC) $(HOSTLDFLAGS) -o $@ $< $(HOSTLIBS)
|
||||||
|
|
||||||
$(OBJS): | $(sort $(dir $(OBJS)))
|
CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver
|
||||||
$(HOSTOBJS): | $(sort $(dir $(HOSTOBJS)))
|
|
||||||
$(TESTOBJS): | $(sort $(dir $(TESTOBJS)))
|
|
||||||
$(TOOLOBJS): | tools
|
|
||||||
|
|
||||||
OBJDIRS := $(OBJDIRS) $(dir $(OBJS) $(HOSTOBJS) $(TESTOBJS))
|
|
||||||
|
|
||||||
CLEANSUFFIXES = *.d *.o *~ *.ho *.map *.ver *.gcno *.gcda
|
|
||||||
DISTCLEANSUFFIXES = *.pc
|
DISTCLEANSUFFIXES = *.pc
|
||||||
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a
|
LIBSUFFIXES = *.a *.lib *.so *.so.* *.dylib *.dll *.def *.dll.a *.exp
|
||||||
|
|
||||||
-include $(wildcard $(OBJS:.o=.d) $(TESTOBJS:.o=.d))
|
-include $(wildcard $(OBJS:.o=.d) $(TESTOBJS:.o=.d))
|
||||||
|
|||||||
692
doc/APIchanges
692
doc/APIchanges
File diff suppressed because it is too large
Load Diff
73
doc/Makefile
73
doc/Makefile
@@ -1,73 +0,0 @@
|
|||||||
MANPAGES = $(PROGS-yes:%=doc/%.1)
|
|
||||||
PODPAGES = $(PROGS-yes:%=doc/%.pod)
|
|
||||||
HTMLPAGES = $(PROGS-yes:%=doc/%.html) \
|
|
||||||
doc/developer.html \
|
|
||||||
doc/faq.html \
|
|
||||||
doc/fate.html \
|
|
||||||
doc/general.html \
|
|
||||||
doc/git-howto.html \
|
|
||||||
doc/libavfilter.html \
|
|
||||||
doc/platform.html \
|
|
||||||
doc/syntax.html \
|
|
||||||
|
|
||||||
TXTPAGES = doc/fate.txt \
|
|
||||||
|
|
||||||
|
|
||||||
DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES)
|
|
||||||
ifdef HAVE_MAKEINFO
|
|
||||||
DOCS += $(TXTPAGES)
|
|
||||||
endif
|
|
||||||
|
|
||||||
all-$(CONFIG_DOC): documentation
|
|
||||||
|
|
||||||
documentation: $(DOCS)
|
|
||||||
|
|
||||||
TEXIDEP = awk '/^@(verbatim)?include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d)
|
|
||||||
|
|
||||||
doc/%.txt: TAG = TXT
|
|
||||||
doc/%.txt: doc/%.texi
|
|
||||||
$(Q)$(TEXIDEP)
|
|
||||||
$(M)makeinfo --force --no-headers -o $@ $< 2>/dev/null
|
|
||||||
|
|
||||||
doc/print_options.o: libavformat/options_table.h libavcodec/options_table.h
|
|
||||||
|
|
||||||
GENTEXI = format codec
|
|
||||||
GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
|
|
||||||
|
|
||||||
$(GENTEXI): TAG = GENTEXI
|
|
||||||
$(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
|
|
||||||
$(M)doc/print_options $* > $@
|
|
||||||
|
|
||||||
doc/%.html: TAG = HTML
|
|
||||||
doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
|
|
||||||
$(Q)$(TEXIDEP)
|
|
||||||
$(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
|
|
||||||
|
|
||||||
doc/%.pod: TAG = POD
|
|
||||||
doc/%.pod: doc/%.texi $(GENTEXI)
|
|
||||||
$(Q)$(TEXIDEP)
|
|
||||||
$(M)$(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
|
|
||||||
|
|
||||||
doc/%.1: TAG = MAN
|
|
||||||
doc/%.1: doc/%.pod $(GENTEXI)
|
|
||||||
$(M)pod2man --section=1 --center=" " --release=" " $< > $@
|
|
||||||
|
|
||||||
$(DOCS): | doc/
|
|
||||||
|
|
||||||
install-progs-$(CONFIG_DOC): install-man
|
|
||||||
|
|
||||||
install-man: $(MANPAGES)
|
|
||||||
$(Q)mkdir -p "$(MANDIR)/man1"
|
|
||||||
$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
|
||||||
|
|
||||||
uninstall: uninstall-man
|
|
||||||
|
|
||||||
uninstall-man:
|
|
||||||
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
|
||||||
|
|
||||||
clean::
|
|
||||||
$(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
|
|
||||||
|
|
||||||
-include $(wildcard $(DOCS:%=%.d))
|
|
||||||
|
|
||||||
.PHONY: documentation
|
|
||||||
@@ -1,16 +1,65 @@
|
|||||||
Release Notes
|
Release Notes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
* 0.11 "Happiness" May, 2012
|
* 0.8 "Love" June, 2011
|
||||||
|
* 0.7 "Peace" June, 2011 (identical to 0.8 but using 0.6 ABI/API)
|
||||||
|
|
||||||
|
|
||||||
General notes
|
General notes
|
||||||
-------------
|
-------------
|
||||||
See the Changelog file for a list of significant changes. Note, there
|
|
||||||
are many more new features and bugfixes than whats listed there.
|
This release enables frame-based multithreaded decoding for a number of codecs,
|
||||||
|
including theora, huffyuv, VP8, H.263, mpeg4 and H.264. Additionally, there has
|
||||||
|
been a major cleanup of
|
||||||
|
both internal and external APIs. For this reason, the major versions of all
|
||||||
|
libraries except libpostproc have been bumped. This means that 0.8 can be installed
|
||||||
|
side-by-side with previous releases, on the other hand applications need to be
|
||||||
|
recompiled to use 0.8.
|
||||||
|
|
||||||
|
Other important changes are more than 200 bugfixes, known regressions were fixed
|
||||||
|
w.r.t 0.5 and 0.6, additions of decoders including, but not limited to,
|
||||||
|
AMR-WB, single stream LATM/LOAS, G.722 ADPCM, a native VP8 decoder
|
||||||
|
and HE-AACv2. Additionally, many new de/muxers such as WebM in Matroska, Apple
|
||||||
|
HTTP Live Streaming, SAP, IEC 61937 (S/PDIF) have been added.
|
||||||
|
|
||||||
|
See the Changelog file for a list of significant changes.
|
||||||
|
|
||||||
Bugreports against FFmpeg git master or the most recent FFmpeg release are
|
Bugreports against FFmpeg git master or the most recent FFmpeg release are
|
||||||
accepted. If you are experiencing issues with any formally released version of
|
accepted. If you are experiencing issues with any formally released version of
|
||||||
FFmpeg, please try git master to check if the issue still exists. If it does,
|
FFmpeg, please try git master to check if the issue still exists. If it does,
|
||||||
make your report against the development code following the usual bug reporting
|
make your report against the development code following the usual bug reporting
|
||||||
guidelines.
|
guidelines.
|
||||||
|
|
||||||
|
Note, if you have difficulty building for mingw, try --disable-outdev=sdl
|
||||||
|
|
||||||
|
|
||||||
|
API changes
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Please see git log of the public headers or the file doc/APIchanges for
|
||||||
|
programmer-centric information. Note that some long-time deprecated APIs have
|
||||||
|
been removed. Also, a number of additional APIs have been deprecated and might
|
||||||
|
be removed in the next release.
|
||||||
|
|
||||||
|
|
||||||
|
Other notable changes
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
- high quality dithering in swscale to fix banding issues
|
||||||
|
- ffmpeg is now interactive and various information can be turned on/off while its running
|
||||||
|
- resolution changing support in ffmpeg
|
||||||
|
- sdl output device
|
||||||
|
- optimizations in libavfilter that make it much faster
|
||||||
|
- split, buffer, select, lut, negate filters amongth others
|
||||||
|
- more than 50 new video filters from mplayers libmpcodecs
|
||||||
|
- many ARM NEON optimizations
|
||||||
|
- nonfree libfaad support for AAC decoding removed
|
||||||
|
- 4:4:4 H.264 decoding
|
||||||
|
- 9/10bit H.264 decoding
|
||||||
|
- Win64 Assembler support
|
||||||
|
- native MMSH/MMST support
|
||||||
|
- Windows TV demuxing
|
||||||
|
- native AMR-WB decoding
|
||||||
|
- native GSM-MS decoding
|
||||||
|
- SMPTE 302M decoding
|
||||||
|
- AVS encoding
|
||||||
|
|||||||
82
doc/TODO
Normal file
82
doc/TODO
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
ffmpeg TODO list:
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Fabrice's TODO list: (unordered)
|
||||||
|
-------------------
|
||||||
|
Short term:
|
||||||
|
|
||||||
|
- use AVFMTCTX_DISCARD_PKT in ffplay so that DV has a chance to work
|
||||||
|
- add RTSP regression test (both client and server)
|
||||||
|
- make ffserver allocate AVFormatContext
|
||||||
|
- clean up (incompatible change, for 0.5.0):
|
||||||
|
* AVStream -> AVComponent
|
||||||
|
* AVFormatContext -> AVInputStream/AVOutputStream
|
||||||
|
* suppress rate_emu from AVCodecContext
|
||||||
|
- add new float/integer audio filterting and conversion : suppress
|
||||||
|
CODEC_ID_PCM_xxc and use CODEC_ID_RAWAUDIO.
|
||||||
|
- fix telecine and frame rate conversion
|
||||||
|
|
||||||
|
Long term (ask me if you want to help):
|
||||||
|
|
||||||
|
- commit new imgconvert API and new PIX_FMT_xxx alpha formats
|
||||||
|
- commit new LGPL'ed float and integer-only AC3 decoder
|
||||||
|
- add WMA integer-only decoder
|
||||||
|
- add new MPEG4-AAC audio decoder (both integer-only and float version)
|
||||||
|
|
||||||
|
Michael's TODO list: (unordered) (if anyone wanna help with sth, just ask)
|
||||||
|
-------------------
|
||||||
|
- optimize H264 CABAC
|
||||||
|
- more optimizations
|
||||||
|
- simper rate control
|
||||||
|
|
||||||
|
Philip'a TODO list: (alphabetically ordered) (please help)
|
||||||
|
------------------
|
||||||
|
- Add a multi-ffm filetype so that feeds can be recorded into multiple files rather
|
||||||
|
than one big file.
|
||||||
|
- Authenticated users support -- where the authentication is in the URL
|
||||||
|
- Change ASF files so that the embedded timestamp in the frames is right rather
|
||||||
|
than being an offset from the start of the stream
|
||||||
|
- Make ffm files more resilient to changes in the codec structures so that you
|
||||||
|
can play old ffm files.
|
||||||
|
|
||||||
|
Baptiste's TODO list:
|
||||||
|
-----------------
|
||||||
|
- mov edit list support (AVEditList)
|
||||||
|
- YUV 10 bit per component support "2vuy"
|
||||||
|
- mxf muxer
|
||||||
|
- mpeg2 non linear quantizer
|
||||||
|
|
||||||
|
unassigned TODO: (unordered)
|
||||||
|
---------------
|
||||||
|
- use AVFrame for audio codecs too
|
||||||
|
- rework aviobuf.c buffering strategy and fix url_fskip
|
||||||
|
- generate optimal huffman tables for mjpeg encoding
|
||||||
|
- fix ffserver regression tests
|
||||||
|
- support xvids motion estimation
|
||||||
|
- support x264s motion estimation
|
||||||
|
- support x264s rate control
|
||||||
|
- SNOW: non translational motion compensation
|
||||||
|
- SNOW: more optimal quantization
|
||||||
|
- SNOW: 4x4 block support
|
||||||
|
- SNOW: 1/8 pel motion compensation support
|
||||||
|
- SNOW: iterative motion estimation based on subsampled images
|
||||||
|
- SNOW: try B frames and MCTF and see how their PSNR/bitrate/complexity behaves
|
||||||
|
- SNOW: try to use the wavelet transformed MC-ed reference frame as context for the entropy coder
|
||||||
|
- SNOW: think about/analyize how to make snow use multiple cpus/threads
|
||||||
|
- SNOW: finish spec
|
||||||
|
- FLAC: lossy encoding (viterbi and naive scalar quantization)
|
||||||
|
- libavfilter
|
||||||
|
- JPEG2000 decoder & encoder
|
||||||
|
- MPEG4 GMC encoding support
|
||||||
|
- macroblock based pixel format (better cache locality, somewhat complex, one paper claimed it faster for high res)
|
||||||
|
- regression tests for codecs which do not have an encoder (I+P-frame bitstream in the 'master' branch)
|
||||||
|
- add support for using mplayers video filters to ffmpeg
|
||||||
|
- H264 encoder
|
||||||
|
- per MB ratecontrol (so VCD and such do work better)
|
||||||
|
- write a script which iteratively changes all functions between always_inline and noinline and benchmarks the result to find the best set of inlined functions
|
||||||
|
- convert all the non SIMD asm into small asm vs. C testcases and submit them to the gcc devels so they can improve gcc
|
||||||
|
- generic audio mixing API
|
||||||
|
- extract PES packetizer from PS muxer and use it for new TS muxer
|
||||||
|
- implement automatic AVBistreamFilter activation
|
||||||
|
- make cabac encoder use bytestream (see http://trac.videolan.org/x264/changeset/?format=diff&new=651)
|
||||||
|
- merge imdct and windowing, the current code does considerable amounts of redundant work
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
All the numerical options, if not specified otherwise, accept in input
|
|
||||||
a string representing a number, which may contain one of the
|
|
||||||
International System number postfixes, for example 'K', 'M', 'G'.
|
|
||||||
If 'i' is appended after the postfix, powers of 2 are used instead of
|
|
||||||
powers of 10. The 'B' postfix multiplies the value for 8, and can be
|
|
||||||
appended after another postfix or used alone. This allows using for
|
|
||||||
example 'KB', 'MiB', 'G' and 'B' as postfix.
|
|
||||||
|
|
||||||
Options which do not take arguments are boolean options, and set the
|
|
||||||
corresponding value to true. They can be set to false by prefixing
|
|
||||||
with "no" the option name, for example using "-nofoo" in the
|
|
||||||
command line will set to false the boolean option with name "foo".
|
|
||||||
|
|
||||||
@anchor{Stream specifiers}
|
|
||||||
@section Stream specifiers
|
|
||||||
Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
|
|
||||||
are used to precisely specify which stream(s) does a given option belong to.
|
|
||||||
|
|
||||||
A stream specifier is a string generally appended to the option name and
|
|
||||||
separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains
|
|
||||||
@code{a:1} stream specifer, which matches the second audio stream. Therefore it
|
|
||||||
would select the ac3 codec for the second audio stream.
|
|
||||||
|
|
||||||
A stream specifier can match several stream, the option is then applied to all
|
|
||||||
of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio
|
|
||||||
streams.
|
|
||||||
|
|
||||||
An empty stream specifier matches all streams, for example @code{-codec copy}
|
|
||||||
or @code{-codec: copy} would copy all the streams without reencoding.
|
|
||||||
|
|
||||||
Possible forms of stream specifiers are:
|
|
||||||
@table @option
|
|
||||||
@item @var{stream_index}
|
|
||||||
Matches the stream with this index. E.g. @code{-threads:1 4} would set the
|
|
||||||
thread count for the second stream to 4.
|
|
||||||
@item @var{stream_type}[:@var{stream_index}]
|
|
||||||
@var{stream_type} is one of: 'v' for video, 'a' for audio, 's' for subtitle,
|
|
||||||
'd' for data and 't' for attachments. If @var{stream_index} is given, then
|
|
||||||
matches stream number @var{stream_index} of this type. Otherwise matches all
|
|
||||||
streams of this type.
|
|
||||||
@item p:@var{program_id}[:@var{stream_index}]
|
|
||||||
If @var{stream_index} is given, then matches stream number @var{stream_index} in
|
|
||||||
program with id @var{program_id}. Otherwise matches all streams in this program.
|
|
||||||
@item #@var{stream_id}
|
|
||||||
Matches the stream by format-specific ID.
|
|
||||||
@end table
|
|
||||||
@section Generic options
|
|
||||||
|
|
||||||
These options are shared amongst the av* tools.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item -L
|
|
||||||
Show license.
|
|
||||||
|
|
||||||
@item -h, -?, -help, --help
|
|
||||||
Show help.
|
|
||||||
|
|
||||||
@item -version
|
|
||||||
Show version.
|
|
||||||
|
|
||||||
@item -formats
|
|
||||||
Show available formats.
|
|
||||||
|
|
||||||
The fields preceding the format names have the following meanings:
|
|
||||||
@table @samp
|
|
||||||
@item D
|
|
||||||
Decoding available
|
|
||||||
@item E
|
|
||||||
Encoding available
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item -codecs
|
|
||||||
Show available codecs.
|
|
||||||
|
|
||||||
The fields preceding the codec names have the following meanings:
|
|
||||||
@table @samp
|
|
||||||
@item D
|
|
||||||
Decoding available
|
|
||||||
@item E
|
|
||||||
Encoding available
|
|
||||||
@item V/A/S
|
|
||||||
Video/audio/subtitle codec
|
|
||||||
@item S
|
|
||||||
Codec supports slices
|
|
||||||
@item D
|
|
||||||
Codec supports direct rendering
|
|
||||||
@item T
|
|
||||||
Codec can handle input truncated at random locations instead of only at frame boundaries
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item -bsfs
|
|
||||||
Show available bitstream filters.
|
|
||||||
|
|
||||||
@item -protocols
|
|
||||||
Show available protocols.
|
|
||||||
|
|
||||||
@item -filters
|
|
||||||
Show available libavfilter filters.
|
|
||||||
|
|
||||||
@item -pix_fmts
|
|
||||||
Show available pixel formats.
|
|
||||||
|
|
||||||
@item -sample_fmts
|
|
||||||
Show available sample formats.
|
|
||||||
|
|
||||||
@item -loglevel @var{loglevel} | -v @var{loglevel}
|
|
||||||
Set the logging level used by the library.
|
|
||||||
@var{loglevel} is a number or a string containing one of the following values:
|
|
||||||
@table @samp
|
|
||||||
@item quiet
|
|
||||||
@item panic
|
|
||||||
@item fatal
|
|
||||||
@item error
|
|
||||||
@item warning
|
|
||||||
@item info
|
|
||||||
@item verbose
|
|
||||||
@item debug
|
|
||||||
@end table
|
|
||||||
|
|
||||||
By default the program logs to stderr, if coloring is supported by the
|
|
||||||
terminal, colors are used to mark errors and warnings. Log coloring
|
|
||||||
can be disabled setting the environment variable
|
|
||||||
@env{AV_LOG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
|
|
||||||
the environment variable @env{AV_LOG_FORCE_COLOR}.
|
|
||||||
The use of the environment variable @env{NO_COLOR} is deprecated and
|
|
||||||
will be dropped in a following FFmpeg version.
|
|
||||||
|
|
||||||
@item -report
|
|
||||||
Dump full command line and console output to a file named
|
|
||||||
@code{@var{program}-@var{YYYYMMDD}-@var{HHMMSS}.log} in the current
|
|
||||||
directory.
|
|
||||||
This file can be useful for bug reports.
|
|
||||||
It also implies @code{-loglevel verbose}.
|
|
||||||
|
|
||||||
Note: setting the environment variable @code{FFREPORT} to any value has the
|
|
||||||
same effect.
|
|
||||||
|
|
||||||
@item -cpuflags flags (@emph{global})
|
|
||||||
Allows setting and clearing cpu flags. This option is intended
|
|
||||||
for testing. Do not use it unless you know what you're doing.
|
|
||||||
@example
|
|
||||||
ffmpeg -cpuflags -sse+mmx ...
|
|
||||||
ffmpeg -cpuflags mmx ...
|
|
||||||
ffmpeg -cpuflags 0 ...
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section AVOptions
|
|
||||||
|
|
||||||
These options are provided directly by the libavformat, libavdevice and
|
|
||||||
libavcodec libraries. To see the list of available AVOptions, use the
|
|
||||||
@option{-help} option. They are separated into two categories:
|
|
||||||
@table @option
|
|
||||||
@item generic
|
|
||||||
These options can be set for any container, codec or device. Generic options
|
|
||||||
are listed under AVFormatContext options for containers/devices and under
|
|
||||||
AVCodecContext options for codecs.
|
|
||||||
@item private
|
|
||||||
These options are specific to the given container, device or codec. Private
|
|
||||||
options are listed under their corresponding containers/devices/codecs.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
For example to write an ID3v2.3 header instead of a default ID3v2.4 to
|
|
||||||
an MP3 file, use the @option{id3v2_version} private option of the MP3
|
|
||||||
muxer:
|
|
||||||
@example
|
|
||||||
ffmpeg -i input.flac -id3v2_version 3 out.mp3
|
|
||||||
@end example
|
|
||||||
|
|
||||||
All codec AVOptions are obviously per-stream, so the chapter on stream
|
|
||||||
specifiers applies to them
|
|
||||||
|
|
||||||
Note @option{-nooption} syntax cannot be used for boolean AVOptions,
|
|
||||||
use @option{-option 0}/@option{-option 1}.
|
|
||||||
|
|
||||||
Note2 old undocumented way of specifying per-stream AVOptions by prepending
|
|
||||||
v/a/s to the options name is now obsolete and will be removed soon.
|
|
||||||
|
|
||||||
@include avoptions_codec.texi
|
|
||||||
@include avoptions_format.texi
|
|
||||||
@@ -23,20 +23,6 @@ Below is a description of the currently available bitstream filters.
|
|||||||
|
|
||||||
@section h264_mp4toannexb
|
@section h264_mp4toannexb
|
||||||
|
|
||||||
Convert an H.264 bitstream from length prefixed mode to start code
|
|
||||||
prefixed mode (as defined in the Annex B of the ITU-T H.264
|
|
||||||
specification).
|
|
||||||
|
|
||||||
This is required by some streaming formats, typically the MPEG-2
|
|
||||||
transport stream format ("mpegts").
|
|
||||||
|
|
||||||
For example to remux an MP4 file containing an H.264 stream to mpegts
|
|
||||||
format with @command{ffmpeg}, you can use the command:
|
|
||||||
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT.mp4 -codec copy -bsf:v h264_mp4toannexb OUTPUT.ts
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section imx_dump_header
|
@section imx_dump_header
|
||||||
|
|
||||||
@section mjpeg2jpeg
|
@section mjpeg2jpeg
|
||||||
@@ -48,7 +34,7 @@ JPEG image. The individual frames can be extracted without loss,
|
|||||||
e.g. by
|
e.g. by
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -i ../some_mjpeg.avi -c:v copy frames_%d.jpg
|
ffmpeg -i ../some_mjpeg.avi -vcodec copy frames_%d.jpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Unfortunately, these chunks are incomplete JPEG images, because
|
Unfortunately, these chunks are incomplete JPEG images, because
|
||||||
@@ -71,9 +57,9 @@ stream (carrying the AVI1 header ID and lacking a DHT segment) to
|
|||||||
produce fully qualified JPEG images.
|
produce fully qualified JPEG images.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -i mjpeg-movie.avi -c:v copy -bsf:v mjpeg2jpeg frame_%d.jpg
|
ffmpeg -i mjpeg-movie.avi -vcodec copy -vbsf mjpeg2jpeg frame_%d.jpg
|
||||||
exiftran -i -9 frame*.jpg
|
exiftran -i -9 frame*.jpg
|
||||||
ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
|
ffmpeg -i frame_%d.jpg -vcodec copy rotated.avi
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section mjpega_dump_header
|
@section mjpega_dump_header
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ follows.
|
|||||||
|
|
||||||
@section rawvideo
|
@section rawvideo
|
||||||
|
|
||||||
Raw video decoder.
|
Rawvideo decoder.
|
||||||
|
|
||||||
This decoder decodes rawvideo streams.
|
This decoder decodes rawvideo streams.
|
||||||
|
|
||||||
@@ -48,16 +48,3 @@ top-field-first is assumed
|
|||||||
@end table
|
@end table
|
||||||
|
|
||||||
@c man end VIDEO DECODERS
|
@c man end VIDEO DECODERS
|
||||||
|
|
||||||
@chapter Audio Decoders
|
|
||||||
@c man begin AUDIO DECODERS
|
|
||||||
|
|
||||||
@section ffwavesynth
|
|
||||||
|
|
||||||
Internal wave synthetizer.
|
|
||||||
|
|
||||||
This decoder generates wave patterns according to predefined sequences. Its
|
|
||||||
use is purely internal and the format of the data it accepts is not publicly
|
|
||||||
documented.
|
|
||||||
|
|
||||||
@c man end AUDIO DECODERS
|
|
||||||
|
|||||||
@@ -49,19 +49,19 @@ sequence of filenames of the form @file{i%m%g-1.jpg},
|
|||||||
The size, the pixel format, and the format of each image must be the
|
The size, the pixel format, and the format of each image must be the
|
||||||
same for all the files in the sequence.
|
same for all the files in the sequence.
|
||||||
|
|
||||||
The following example shows how to use @command{ffmpeg} for creating a
|
The following example shows how to use @file{ffmpeg} for creating a
|
||||||
video from the images in the file sequence @file{img-001.jpeg},
|
video from the images in the file sequence @file{img-001.jpeg},
|
||||||
@file{img-002.jpeg}, ..., assuming an input frame rate of 10 frames per
|
@file{img-002.jpeg}, ..., assuming an input framerate of 10 frames per
|
||||||
second:
|
second:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i 'img-%03d.jpeg' -r 10 out.mkv
|
ffmpeg -r 10 -f image2 -i 'img-%03d.jpeg' out.avi
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Note that the pattern must not necessarily contain "%d" or
|
Note that the pattern must not necessarily contain "%d" or
|
||||||
"%0@var{N}d", for example to convert a single image file
|
"%0@var{N}d", for example to convert a single image file
|
||||||
@file{img.jpeg} you can employ the command:
|
@file{img.jpeg} you can employ the command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i img.jpeg img.png
|
ffmpeg -f image2 -i img.jpeg img.png
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section applehttp
|
@section applehttp
|
||||||
@@ -75,34 +75,4 @@ the caller can decide which variant streams to actually receive.
|
|||||||
The total bitrate of the variant that the stream belongs to is
|
The total bitrate of the variant that the stream belongs to is
|
||||||
available in a metadata key named "variant_bitrate".
|
available in a metadata key named "variant_bitrate".
|
||||||
|
|
||||||
@section sbg
|
|
||||||
|
|
||||||
SBaGen script demuxer.
|
|
||||||
|
|
||||||
This demuxer reads the script language used by SBaGen
|
|
||||||
@url{http://uazu.net/sbagen/} to generate binaural beats sessions. A SBG
|
|
||||||
script looks like that:
|
|
||||||
@example
|
|
||||||
-SE
|
|
||||||
a: 300-2.5/3 440+4.5/0
|
|
||||||
b: 300-2.5/0 440+4.5/3
|
|
||||||
off: -
|
|
||||||
NOW == a
|
|
||||||
+0:07:00 == b
|
|
||||||
+0:14:00 == a
|
|
||||||
+0:21:00 == b
|
|
||||||
+0:30:00 off
|
|
||||||
@end example
|
|
||||||
|
|
||||||
A SBG script can mix absolute and relative timestamps. If the script uses
|
|
||||||
either only absolute timestamps (including the script start time) or only
|
|
||||||
relative ones, then its layout is fixed, and the conversion is
|
|
||||||
straightforward. On the other hand, if the script mixes both kind of
|
|
||||||
timestamps, then the @var{NOW} reference for relative timestamps will be
|
|
||||||
taken from the current time of day at the time the script is read, and the
|
|
||||||
script layout will be frozen according to that reference. That means that if
|
|
||||||
the script is directly played, the actual times will match the absolute
|
|
||||||
timestamps up to the sound controller's clock accuracy, but if the user
|
|
||||||
somehow pauses the playback or seeks, all times will be shifted accordingly.
|
|
||||||
|
|
||||||
@c man end INPUT DEVICES
|
@c man end INPUT DEVICES
|
||||||
|
|||||||
@@ -14,13 +14,12 @@
|
|||||||
@section API
|
@section API
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item libavcodec is the library containing the codecs (both encoding and
|
@item libavcodec is the library containing the codecs (both encoding and
|
||||||
decoding). Look at @file{doc/examples/decoding_encoding.c} to see how to use
|
decoding). Look at @file{libavcodec/apiexample.c} to see how to use it.
|
||||||
it.
|
|
||||||
|
|
||||||
@item libavformat is the library containing the file format handling (mux and
|
@item libavformat is the library containing the file format handling (mux and
|
||||||
demux code for several formats). Look at @file{ffplay.c} to use it in a
|
demux code for several formats). Look at @file{ffplay.c} to use it in a
|
||||||
player. See @file{doc/examples/muxing.c} to use it to generate audio or video
|
player. See @file{libavformat/output-example.c} to use it to generate
|
||||||
streams.
|
audio or video streams.
|
||||||
|
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@@ -35,86 +34,9 @@ You can use libavcodec or libavformat in your commercial program, but
|
|||||||
@emph{any patch you make must be published}. The best way to proceed is
|
@emph{any patch you make must be published}. The best way to proceed is
|
||||||
to send your patches to the FFmpeg mailing list.
|
to send your patches to the FFmpeg mailing list.
|
||||||
|
|
||||||
@section Contributing
|
|
||||||
|
|
||||||
There are 3 ways by which code gets into ffmpeg.
|
|
||||||
@itemize @bullet
|
|
||||||
@item Submitting Patches to the main developer mailing list
|
|
||||||
see @ref{Submitting patches} for details.
|
|
||||||
@item Directly committing changes to the main tree.
|
|
||||||
@item Committing changes to a git clone, for example on github.com or
|
|
||||||
gitorious.org. And asking us to merge these changes.
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
Whichever way, changes should be reviewed by the maintainer of the code
|
|
||||||
before they are committed. And they should follow the @ref{Coding Rules}.
|
|
||||||
The developer making the commit and the author are responsible for their changes
|
|
||||||
and should try to fix issues their commit causes.
|
|
||||||
|
|
||||||
@anchor{Coding Rules}
|
@anchor{Coding Rules}
|
||||||
@section Coding Rules
|
@section Coding Rules
|
||||||
|
|
||||||
@subsection Code formatting conventions
|
|
||||||
|
|
||||||
There are the following guidelines regarding the indentation in files:
|
|
||||||
@itemize @bullet
|
|
||||||
@item
|
|
||||||
Indent size is 4.
|
|
||||||
@item
|
|
||||||
The TAB character is forbidden outside of Makefiles as is any
|
|
||||||
form of trailing whitespace. Commits containing either will be
|
|
||||||
rejected by the git repository.
|
|
||||||
@item
|
|
||||||
You should try to limit your code lines to 80 characters; however, do so if
|
|
||||||
and only if this improves readability.
|
|
||||||
@end itemize
|
|
||||||
The presentation is one inspired by 'indent -i4 -kr -nut'.
|
|
||||||
|
|
||||||
The main priority in FFmpeg is simplicity and small code size in order to
|
|
||||||
minimize the bug count.
|
|
||||||
|
|
||||||
@subsection Comments
|
|
||||||
Use the JavaDoc/Doxygen format (see examples below) so that code documentation
|
|
||||||
can be generated automatically. All nontrivial functions should have a comment
|
|
||||||
above them explaining what the function does, even if it is just one sentence.
|
|
||||||
All structures and their member variables should be documented, too.
|
|
||||||
|
|
||||||
Avoid Qt-style and similar Doxygen syntax with @code{!} in it, i.e. replace
|
|
||||||
@code{//!} with @code{///} and similar. Also @@ syntax should be employed
|
|
||||||
for markup commands, i.e. use @code{@@param} and not @code{\param}.
|
|
||||||
|
|
||||||
@example
|
|
||||||
/**
|
|
||||||
* @@file
|
|
||||||
* MPEG codec.
|
|
||||||
* @@author ...
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Summary sentence.
|
|
||||||
* more text ...
|
|
||||||
* ...
|
|
||||||
*/
|
|
||||||
typedef struct Foobar@{
|
|
||||||
int var1; /**< var1 description */
|
|
||||||
int var2; ///< var2 description
|
|
||||||
/** var3 description */
|
|
||||||
int var3;
|
|
||||||
@} Foobar;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Summary sentence.
|
|
||||||
* more text ...
|
|
||||||
* ...
|
|
||||||
* @@param my_parameter description of my_parameter
|
|
||||||
* @@return return value description
|
|
||||||
*/
|
|
||||||
int myfunc(int my_parameter)
|
|
||||||
...
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@subsection C language features
|
|
||||||
|
|
||||||
FFmpeg is programmed in the ISO C90 language with a few additional
|
FFmpeg is programmed in the ISO C90 language with a few additional
|
||||||
features from ISO C99, namely:
|
features from ISO C99, namely:
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@@ -146,72 +68,55 @@ mixing statements and declarations;
|
|||||||
GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
|
GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@subsection Naming conventions
|
Indent size is 4.
|
||||||
All names are using underscores (_), not CamelCase. For example, @samp{avfilter_get_video_buffer} is
|
The presentation is one inspired by 'indent -i4 -kr -nut'.
|
||||||
a valid function name and @samp{AVFilterGetVideo} is not. The exception from this are type names, like
|
The TAB character is forbidden outside of Makefiles as is any
|
||||||
for example structs and enums; they should always be in the CamelCase
|
form of trailing whitespace. Commits containing either will be
|
||||||
|
rejected by the git repository.
|
||||||
|
|
||||||
|
The main priority in FFmpeg is simplicity and small code size in order to
|
||||||
|
minimize the bug count.
|
||||||
|
|
||||||
There are following conventions for naming variables and functions:
|
Comments: Use the JavaDoc/Doxygen
|
||||||
@itemize @bullet
|
format (see examples below) so that code documentation
|
||||||
@item
|
can be generated automatically. All nontrivial functions should have a comment
|
||||||
For local variables no prefix is required.
|
above them explaining what the function does, even if it is just one sentence.
|
||||||
@item
|
All structures and their member variables should be documented, too.
|
||||||
For variables and functions declared as @code{static} no prefixes are required.
|
@example
|
||||||
@item
|
/**
|
||||||
For variables and functions used internally by the library, @code{ff_} prefix
|
* @@file mpeg.c
|
||||||
should be used.
|
* MPEG codec.
|
||||||
For example, @samp{ff_w64_demuxer}.
|
* @@author ...
|
||||||
@item
|
*/
|
||||||
For variables and functions used internally across multiple libraries, use
|
|
||||||
@code{avpriv_}. For example, @samp{avpriv_aac_parse_header}.
|
/**
|
||||||
@item
|
* Summary sentence.
|
||||||
For exported names, each library has its own prefixes. Just check the existing
|
* more text ...
|
||||||
code and name accordingly.
|
* ...
|
||||||
@end itemize
|
*/
|
||||||
|
typedef struct Foobar@{
|
||||||
|
int var1; /**< var1 description */
|
||||||
|
int var2; ///< var2 description
|
||||||
|
/** var3 description */
|
||||||
|
int var3;
|
||||||
|
@} Foobar;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Summary sentence.
|
||||||
|
* more text ...
|
||||||
|
* ...
|
||||||
|
* @@param my_parameter description of my_parameter
|
||||||
|
* @@return return value description
|
||||||
|
*/
|
||||||
|
int myfunc(int my_parameter)
|
||||||
|
...
|
||||||
|
@end example
|
||||||
|
|
||||||
@subsection Miscellanous conventions
|
|
||||||
@itemize @bullet
|
|
||||||
@item
|
|
||||||
fprintf and printf are forbidden in libavformat and libavcodec,
|
fprintf and printf are forbidden in libavformat and libavcodec,
|
||||||
please use av_log() instead.
|
please use av_log() instead.
|
||||||
@item
|
|
||||||
Casts should be used only when necessary. Unneeded parentheses
|
Casts should be used only when necessary. Unneeded parentheses
|
||||||
should also be avoided if they don't make the code easier to understand.
|
should also be avoided if they don't make the code easier to understand.
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@subsection Editor configuration
|
|
||||||
In order to configure Vim to follow FFmpeg formatting conventions, paste
|
|
||||||
the following snippet into your @file{.vimrc}:
|
|
||||||
@example
|
|
||||||
" indentation rules for FFmpeg: 4 spaces, no tabs
|
|
||||||
set expandtab
|
|
||||||
set shiftwidth=4
|
|
||||||
set softtabstop=4
|
|
||||||
set cindent
|
|
||||||
set cinoptions=(0
|
|
||||||
" allow tabs in Makefiles
|
|
||||||
autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=8
|
|
||||||
" Trailing whitespace and tabs are forbidden, so highlight them.
|
|
||||||
highlight ForbiddenWhitespace ctermbg=red guibg=red
|
|
||||||
match ForbiddenWhitespace /\s\+$\|\t/
|
|
||||||
" Do not highlight spaces at the end of line while typing on that line.
|
|
||||||
autocmd InsertEnter * match ForbiddenWhitespace /\t\|\s\+\%#\@@<!$/
|
|
||||||
@end example
|
|
||||||
|
|
||||||
For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
|
|
||||||
@example
|
|
||||||
(c-add-style "ffmpeg"
|
|
||||||
'("k&r"
|
|
||||||
(c-basic-offset . 4)
|
|
||||||
(indent-tabs-mode nil)
|
|
||||||
(show-trailing-whitespace t)
|
|
||||||
(c-offsets-alist
|
|
||||||
(statement-cont . (c-lineup-assignments +)))
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(setq c-default-style "ffmpeg")
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section Development Policy
|
@section Development Policy
|
||||||
|
|
||||||
@@ -273,7 +178,7 @@ For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
|
|||||||
Always fill out the commit log message. Describe in a few lines what you
|
Always fill out the commit log message. Describe in a few lines what you
|
||||||
changed and why. You can refer to mailing list postings if you fix a
|
changed and why. You can refer to mailing list postings if you fix a
|
||||||
particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
|
particular bug. Comments such as "fixed!" or "Changed it." are unacceptable.
|
||||||
Recommended format:
|
Recommanded format:
|
||||||
area changed: Short 1 line description
|
area changed: Short 1 line description
|
||||||
|
|
||||||
details describing what and why and giving references.
|
details describing what and why and giving references.
|
||||||
@@ -308,7 +213,7 @@ For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
|
|||||||
always check values read from some untrusted source before using them
|
always check values read from some untrusted source before using them
|
||||||
as array index or other risky things.
|
as array index or other risky things.
|
||||||
@item
|
@item
|
||||||
Remember to check if you need to bump versions for the specific libav*
|
Remember to check if you need to bump versions for the specific libav
|
||||||
parts (libavutil, libavcodec, libavformat) you are changing. You need
|
parts (libavutil, libavcodec, libavformat) you are changing. You need
|
||||||
to change the version integer.
|
to change the version integer.
|
||||||
Incrementing the first component means no backward compatibility to
|
Incrementing the first component means no backward compatibility to
|
||||||
@@ -335,11 +240,9 @@ We think our rules are not too hard. If you have comments, contact us.
|
|||||||
|
|
||||||
Note, these rules are mostly borrowed from the MPlayer project.
|
Note, these rules are mostly borrowed from the MPlayer project.
|
||||||
|
|
||||||
@anchor{Submitting patches}
|
|
||||||
@section Submitting patches
|
@section Submitting patches
|
||||||
|
|
||||||
First, read the @ref{Coding Rules} above if you did not yet, in particular
|
First, read the (@pxref{Coding Rules}) above if you did not yet.
|
||||||
the rules regarding patch submission.
|
|
||||||
|
|
||||||
When you submit your patch, please use @code{git format-patch} or
|
When you submit your patch, please use @code{git format-patch} or
|
||||||
@code{git send-email}. We cannot read other diffs :-)
|
@code{git send-email}. We cannot read other diffs :-)
|
||||||
@@ -354,8 +257,8 @@ for us and greatly increases your chances of getting your patch applied.
|
|||||||
Use the patcheck tool of FFmpeg to check your patch.
|
Use the patcheck tool of FFmpeg to check your patch.
|
||||||
The tool is located in the tools directory.
|
The tool is located in the tools directory.
|
||||||
|
|
||||||
Run the @ref{Regression tests} before submitting a patch in order to verify
|
Run the regression tests before submitting a patch so that you can
|
||||||
it does not cause unexpected problems.
|
verify that there are no big problems.
|
||||||
|
|
||||||
Patches should be posted as base64 encoded attachments (or any other
|
Patches should be posted as base64 encoded attachments (or any other
|
||||||
encoding which ensures that the patch will not be trashed during
|
encoding which ensures that the patch will not be trashed during
|
||||||
@@ -389,13 +292,13 @@ send a reminder by email. Your patch should eventually be dealt with.
|
|||||||
AVInputFormat/AVOutputFormat struct?
|
AVInputFormat/AVOutputFormat struct?
|
||||||
@item
|
@item
|
||||||
Did you bump the minor version number (and reset the micro version
|
Did you bump the minor version number (and reset the micro version
|
||||||
number) in @file{libavcodec/version.h} or @file{libavformat/version.h}?
|
number) in @file{avcodec.h} or @file{avformat.h}?
|
||||||
@item
|
@item
|
||||||
Did you register it in @file{allcodecs.c} or @file{allformats.c}?
|
Did you register it in @file{allcodecs.c} or @file{allformats.c}?
|
||||||
@item
|
@item
|
||||||
Did you add the CodecID to @file{avcodec.h}?
|
Did you add the CodecID to @file{avcodec.h}?
|
||||||
@item
|
@item
|
||||||
If it has a fourCC, did you add it to @file{libavformat/riff.c},
|
If it has a fourcc, did you add it to @file{libavformat/riff.c},
|
||||||
even if it is only a decoder?
|
even if it is only a decoder?
|
||||||
@item
|
@item
|
||||||
Did you add a rule to compile the appropriate files in the Makefile?
|
Did you add a rule to compile the appropriate files in the Makefile?
|
||||||
@@ -422,7 +325,7 @@ send a reminder by email. Your patch should eventually be dealt with.
|
|||||||
|
|
||||||
@enumerate
|
@enumerate
|
||||||
@item
|
@item
|
||||||
Does @code{make fate} pass with the patch applied?
|
Does 'make fate' pass with the patch applied?
|
||||||
@item
|
@item
|
||||||
Was the patch generated with git format-patch or send-email?
|
Was the patch generated with git format-patch or send-email?
|
||||||
@item
|
@item
|
||||||
@@ -434,7 +337,7 @@ send a reminder by email. Your patch should eventually be dealt with.
|
|||||||
@item
|
@item
|
||||||
Is the patch against latest FFmpeg git master branch?
|
Is the patch against latest FFmpeg git master branch?
|
||||||
@item
|
@item
|
||||||
Are you subscribed to ffmpeg-devel?
|
Are you subscribed to ffmpeg-dev?
|
||||||
(the list is subscribers only due to spam)
|
(the list is subscribers only due to spam)
|
||||||
@item
|
@item
|
||||||
Have you checked that the changes are minimal, so that the same cannot be
|
Have you checked that the changes are minimal, so that the same cannot be
|
||||||
@@ -507,23 +410,34 @@ After a patch is approved it will be committed to the repository.
|
|||||||
We will review all submitted patches, but sometimes we are quite busy so
|
We will review all submitted patches, but sometimes we are quite busy so
|
||||||
especially for large patches this can take several weeks.
|
especially for large patches this can take several weeks.
|
||||||
|
|
||||||
If you feel that the review process is too slow and you are willing to try to
|
|
||||||
take over maintainership of the area of code you change then just clone
|
|
||||||
git master and maintain the area of code there. We will merge each area from
|
|
||||||
where its best maintained.
|
|
||||||
|
|
||||||
When resubmitting patches, please do not make any significant changes
|
When resubmitting patches, please do not make any significant changes
|
||||||
not related to the comments received during review. Such patches will
|
not related to the comments received during review. Such patches will
|
||||||
be rejected. Instead, submit significant changes or new features as
|
be rejected. Instead, submit significant changes or new features as
|
||||||
separate patches.
|
separate patches.
|
||||||
|
|
||||||
@anchor{Regression tests}
|
|
||||||
@section Regression tests
|
@section Regression tests
|
||||||
|
|
||||||
Before submitting a patch (or committing to the repository), you should at least
|
Before submitting a patch (or committing to the repository), you should at least
|
||||||
test that you did not break anything.
|
test that you did not break anything.
|
||||||
|
|
||||||
Running 'make fate' accomplishes this, please see @url{fate.html} for details.
|
The regression tests build a synthetic video stream and a synthetic
|
||||||
|
audio stream. These are then encoded and decoded with all codecs or
|
||||||
|
formats. The CRC (or MD5) of each generated file is recorded in a
|
||||||
|
result file. A 'diff' is launched to compare the reference results and
|
||||||
|
the result file. The output is checked immediately after each test
|
||||||
|
has run.
|
||||||
|
|
||||||
|
The regression tests then go on to test the FFserver code with a
|
||||||
|
limited set of streams. It is important that this step runs correctly
|
||||||
|
as well.
|
||||||
|
|
||||||
|
Run 'make test' to test all the codecs and formats. Commands like
|
||||||
|
'make regtest-mpeg2' can be used to run a single test. By default,
|
||||||
|
make will abort if any test fails. To run all tests regardless,
|
||||||
|
use make -k. To get a more verbose output, use 'make V=1 test' or
|
||||||
|
'make V=2 test'.
|
||||||
|
|
||||||
|
Run 'make fulltest' to test all the codecs, formats and FFserver.
|
||||||
|
|
||||||
[Of course, some patches may change the results of the regression tests. In
|
[Of course, some patches may change the results of the regression tests. In
|
||||||
this case, the reference results of the regression tests shall be modified
|
this case, the reference results of the regression tests shall be modified
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,10 +0,0 @@
|
|||||||
</div>
|
|
||||||
|
|
||||||
<div id="footer">
|
|
||||||
Generated on $datetime for $projectname by <a href="http://www.doxygen.org/index.html">doxygen</a> $doxygenversion
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
||||||
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
|
|
||||||
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
|
|
||||||
<link href="$relpath$doxy_stylesheet.css" rel="stylesheet" type="text/css" />
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<div id="container">
|
|
||||||
|
|
||||||
<div id="body">
|
|
||||||
<div>
|
|
||||||
@@ -320,10 +320,10 @@ apply Dolby Surround EX processing.
|
|||||||
Not Indicated (default)
|
Not Indicated (default)
|
||||||
@item 1
|
@item 1
|
||||||
@itemx on
|
@itemx on
|
||||||
Dolby Surround EX Off
|
Dolby Surround EX On
|
||||||
@item 2
|
@item 2
|
||||||
@itemx off
|
@itemx off
|
||||||
Dolby Surround EX On
|
Dolby Surround EX Off
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@item -dheadphone_mode @var{mode}
|
@item -dheadphone_mode @var{mode}
|
||||||
@@ -337,10 +337,10 @@ processing.
|
|||||||
Not Indicated (default)
|
Not Indicated (default)
|
||||||
@item 1
|
@item 1
|
||||||
@itemx on
|
@itemx on
|
||||||
Dolby Headphone Off
|
Dolby Headphone On
|
||||||
@item 2
|
@item 2
|
||||||
@itemx off
|
@itemx off
|
||||||
Dolby Headphone On
|
Dolby Headphone Off
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@item -ad_conv_type @var{type}
|
@item -ad_conv_type @var{type}
|
||||||
@@ -551,33 +551,36 @@ Set the encoding preset.
|
|||||||
|
|
||||||
@item tune @var{tune_name}
|
@item tune @var{tune_name}
|
||||||
Tune the encoding params.
|
Tune the encoding params.
|
||||||
|
Deprecated in favor of @var{x264_opts}
|
||||||
|
|
||||||
@item fastfirstpass @var{bool}
|
@item fastfirstpass @var{bool}
|
||||||
Use fast settings when encoding first pass, default value is 1.
|
Use fast settings when encoding first pass, default value is 1.
|
||||||
|
Deprecated in favor of @var{x264_opts}.
|
||||||
|
|
||||||
@item profile @var{profile_name}
|
@item profile @var{profile_name}
|
||||||
Set profile restrictions.
|
Set profile restrictions.
|
||||||
|
Deprecated in favor of @var{x264_opts}.
|
||||||
|
|
||||||
@item level @var{level}
|
@item level @var{level}
|
||||||
Specify level (as defined by Annex A).
|
Specify level (as defined by Annex A).
|
||||||
Deprecated in favor of @var{x264opts}.
|
Deprecated in favor of @var{x264_opts}.
|
||||||
|
|
||||||
@item passlogfile @var{filename}
|
@item passlogfile @var{filename}
|
||||||
Specify filename for 2 pass stats.
|
Specify filename for 2 pass stats.
|
||||||
Deprecated in favor of @var{x264opts} (see @var{stats} libx264 option).
|
Deprecated in favor of @var{x264_opts}.
|
||||||
|
|
||||||
@item wpredp @var{wpred_type}
|
@item wpredp @var{wpred_type}
|
||||||
Specify Weighted prediction for P-frames.
|
Specify Weighted prediction for P-frames.
|
||||||
Deprecated in favor of @var{x264opts} (see @var{weightp} libx264 option).
|
Deprecated in favor of @var{x264_opts}.
|
||||||
|
|
||||||
@item x264opts @var{options}
|
@item x264opts @var{options}
|
||||||
Allow to set any x264 option, see x264 --fullhelp for a list.
|
Allow to set any x264 option, see x264 manual for a list.
|
||||||
|
|
||||||
@var{options} is a list of @var{key}=@var{value} couples separated by
|
@var{options} is a list of @var{key}=@var{value} couples separated by
|
||||||
":".
|
":".
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
For example to specify libx264 encoding options with @command{ffmpeg}:
|
For example to specify libx264 encoding options with @file{ffmpeg}:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
|
ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
|
||||||
@end example
|
@end example
|
||||||
|
|||||||
174
doc/errno.txt
174
doc/errno.txt
@@ -1,174 +0,0 @@
|
|||||||
The following table lists most error codes found in various operating
|
|
||||||
systems supported by FFmpeg.
|
|
||||||
|
|
||||||
OS
|
|
||||||
Code Std F LBMWwb Text (YMMV)
|
|
||||||
|
|
||||||
E2BIG POSIX ++++++ Argument list too long
|
|
||||||
EACCES POSIX ++++++ Permission denied
|
|
||||||
EADDRINUSE POSIX +++..+ Address in use
|
|
||||||
EADDRNOTAVAIL POSIX +++..+ Cannot assign requested address
|
|
||||||
EADV +..... Advertise error
|
|
||||||
EAFNOSUPPORT POSIX +++..+ Address family not supported
|
|
||||||
EAGAIN POSIX + ++++++ Resource temporarily unavailable
|
|
||||||
EALREADY POSIX +++..+ Operation already in progress
|
|
||||||
EAUTH .++... Authentication error
|
|
||||||
EBADARCH ..+... Bad CPU type in executable
|
|
||||||
EBADE +..... Invalid exchange
|
|
||||||
EBADEXEC ..+... Bad executable
|
|
||||||
EBADF POSIX ++++++ Bad file descriptor
|
|
||||||
EBADFD +..... File descriptor in bad state
|
|
||||||
EBADMACHO ..+... Malformed Macho file
|
|
||||||
EBADMSG POSIX ++4... Bad message
|
|
||||||
EBADR +..... Invalid request descriptor
|
|
||||||
EBADRPC .++... RPC struct is bad
|
|
||||||
EBADRQC +..... Invalid request code
|
|
||||||
EBADSLT +..... Invalid slot
|
|
||||||
EBFONT +..... Bad font file format
|
|
||||||
EBUSY POSIX - ++++++ Device or resource busy
|
|
||||||
ECANCELED POSIX +++... Operation canceled
|
|
||||||
ECHILD POSIX ++++++ No child processes
|
|
||||||
ECHRNG +..... Channel number out of range
|
|
||||||
ECOMM +..... Communication error on send
|
|
||||||
ECONNABORTED POSIX +++..+ Software caused connection abort
|
|
||||||
ECONNREFUSED POSIX - +++ss+ Connection refused
|
|
||||||
ECONNRESET POSIX +++..+ Connection reset
|
|
||||||
EDEADLK POSIX ++++++ Resource deadlock avoided
|
|
||||||
EDEADLOCK +..++. File locking deadlock error
|
|
||||||
EDESTADDRREQ POSIX +++... Destination address required
|
|
||||||
EDEVERR ..+... Device error
|
|
||||||
EDOM C89 - ++++++ Numerical argument out of domain
|
|
||||||
EDOOFUS .F.... Programming error
|
|
||||||
EDOTDOT +..... RFS specific error
|
|
||||||
EDQUOT POSIX +++... Disc quota exceeded
|
|
||||||
EEXIST POSIX ++++++ File exists
|
|
||||||
EFAULT POSIX - ++++++ Bad address
|
|
||||||
EFBIG POSIX - ++++++ File too large
|
|
||||||
EFTYPE .++... Inappropriate file type or format
|
|
||||||
EHOSTDOWN +++... Host is down
|
|
||||||
EHOSTUNREACH POSIX +++..+ No route to host
|
|
||||||
EHWPOISON +..... Memory page has hardware error
|
|
||||||
EIDRM POSIX +++... Identifier removed
|
|
||||||
EILSEQ C99 ++++++ Illegal byte sequence
|
|
||||||
EINPROGRESS POSIX - +++ss+ Operation in progress
|
|
||||||
EINTR POSIX - ++++++ Interrupted system call
|
|
||||||
EINVAL POSIX + ++++++ Invalid argument
|
|
||||||
EIO POSIX + ++++++ I/O error
|
|
||||||
EISCONN POSIX +++..+ Socket is already connected
|
|
||||||
EISDIR POSIX ++++++ Is a directory
|
|
||||||
EISNAM +..... Is a named type file
|
|
||||||
EKEYEXPIRED +..... Key has expired
|
|
||||||
EKEYREJECTED +..... Key was rejected by service
|
|
||||||
EKEYREVOKED +..... Key has been revoked
|
|
||||||
EL2HLT +..... Level 2 halted
|
|
||||||
EL2NSYNC +..... Level 2 not synchronized
|
|
||||||
EL3HLT +..... Level 3 halted
|
|
||||||
EL3RST +..... Level 3 reset
|
|
||||||
ELIBACC +..... Can not access a needed shared library
|
|
||||||
ELIBBAD +..... Accessing a corrupted shared library
|
|
||||||
ELIBEXEC +..... Cannot exec a shared library directly
|
|
||||||
ELIBMAX +..... Too many shared libraries
|
|
||||||
ELIBSCN +..... .lib section in a.out corrupted
|
|
||||||
ELNRNG +..... Link number out of range
|
|
||||||
ELOOP POSIX +++..+ Too many levels of symbolic links
|
|
||||||
EMEDIUMTYPE +..... Wrong medium type
|
|
||||||
EMFILE POSIX ++++++ Too many open files
|
|
||||||
EMLINK POSIX ++++++ Too many links
|
|
||||||
EMSGSIZE POSIX +++..+ Message too long
|
|
||||||
EMULTIHOP POSIX ++4... Multihop attempted
|
|
||||||
ENAMETOOLONG POSIX - ++++++ Filen ame too long
|
|
||||||
ENAVAIL +..... No XENIX semaphores available
|
|
||||||
ENEEDAUTH .++... Need authenticator
|
|
||||||
ENETDOWN POSIX +++..+ Network is down
|
|
||||||
ENETRESET SUSv3 +++..+ Network dropped connection on reset
|
|
||||||
ENETUNREACH POSIX +++..+ Network unreachable
|
|
||||||
ENFILE POSIX ++++++ Too many open files in system
|
|
||||||
ENOANO +..... No anode
|
|
||||||
ENOATTR .++... Attribute not found
|
|
||||||
ENOBUFS POSIX - +++..+ No buffer space available
|
|
||||||
ENOCSI +..... No CSI structure available
|
|
||||||
ENODATA XSR +N4... No message available
|
|
||||||
ENODEV POSIX - ++++++ No such device
|
|
||||||
ENOENT POSIX - ++++++ No such file or directory
|
|
||||||
ENOEXEC POSIX ++++++ Exec format error
|
|
||||||
ENOFILE ...++. No such file or directory
|
|
||||||
ENOKEY +..... Required key not available
|
|
||||||
ENOLCK POSIX ++++++ No locks available
|
|
||||||
ENOLINK POSIX ++4... Link has been severed
|
|
||||||
ENOMEDIUM +..... No medium found
|
|
||||||
ENOMEM POSIX ++++++ Not enough space
|
|
||||||
ENOMSG POSIX +++..+ No message of desired type
|
|
||||||
ENONET +..... Machine is not on the network
|
|
||||||
ENOPKG +..... Package not installed
|
|
||||||
ENOPROTOOPT POSIX +++..+ Protocol not available
|
|
||||||
ENOSPC POSIX ++++++ No space left on device
|
|
||||||
ENOSR XSR +N4... No STREAM resources
|
|
||||||
ENOSTR XSR +N4... Not a STREAM
|
|
||||||
ENOSYS POSIX + ++++++ Function not implemented
|
|
||||||
ENOTBLK +++... Block device required
|
|
||||||
ENOTCONN POSIX +++..+ Socket is not connected
|
|
||||||
ENOTDIR POSIX ++++++ Not a directory
|
|
||||||
ENOTEMPTY POSIX ++++++ Directory not empty
|
|
||||||
ENOTNAM +..... Not a XENIX named type file
|
|
||||||
ENOTRECOVERABLE SUSv4 - +..... State not recoverable
|
|
||||||
ENOTSOCK POSIX +++..+ Socket operation on non-socket
|
|
||||||
ENOTSUP POSIX +++... Operation not supported
|
|
||||||
ENOTTY POSIX ++++++ Inappropriate I/O control operation
|
|
||||||
ENOTUNIQ +..... Name not unique on network
|
|
||||||
ENXIO POSIX ++++++ No such device or address
|
|
||||||
EOPNOTSUPP POSIX +++..+ Operation not supported (on socket)
|
|
||||||
EOVERFLOW POSIX +++..+ Value too large to be stored in data type
|
|
||||||
EOWNERDEAD SUSv4 +..... Owner died
|
|
||||||
EPERM POSIX - ++++++ Operation not permitted
|
|
||||||
EPFNOSUPPORT +++..+ Protocol family not supported
|
|
||||||
EPIPE POSIX - ++++++ Broken pipe
|
|
||||||
EPROCLIM .++... Too many processes
|
|
||||||
EPROCUNAVAIL .++... Bad procedure for program
|
|
||||||
EPROGMISMATCH .++... Program version wrong
|
|
||||||
EPROGUNAVAIL .++... RPC prog. not avail
|
|
||||||
EPROTO POSIX ++4... Protocol error
|
|
||||||
EPROTONOSUPPORT POSIX - +++ss+ Protocol not supported
|
|
||||||
EPROTOTYPE POSIX +++..+ Protocol wrong type for socket
|
|
||||||
EPWROFF ..+... Device power is off
|
|
||||||
ERANGE C89 - ++++++ Result too large
|
|
||||||
EREMCHG +..... Remote address changed
|
|
||||||
EREMOTE +++... Object is remote
|
|
||||||
EREMOTEIO +..... Remote I/O error
|
|
||||||
ERESTART +..... Interrupted system call should be restarted
|
|
||||||
ERFKILL +..... Operation not possible due to RF-kill
|
|
||||||
EROFS POSIX ++++++ Read-only file system
|
|
||||||
ERPCMISMATCH .++... RPC version wrong
|
|
||||||
ESHLIBVERS ..+... Shared library version mismatch
|
|
||||||
ESHUTDOWN +++..+ Cannot send after socket shutdown
|
|
||||||
ESOCKTNOSUPPORT +++... Socket type not supported
|
|
||||||
ESPIPE POSIX ++++++ Illegal seek
|
|
||||||
ESRCH POSIX ++++++ No such process
|
|
||||||
ESRMNT +..... Srmount error
|
|
||||||
ESTALE POSIX +++..+ Stale NFS file handle
|
|
||||||
ESTRPIPE +..... Streams pipe error
|
|
||||||
ETIME XSR +N4... Stream ioctl timeout
|
|
||||||
ETIMEDOUT POSIX - +++ss+ Connection timed out
|
|
||||||
ETOOMANYREFS +++... Too many references: cannot splice
|
|
||||||
ETXTBSY POSIX +++... Text file busy
|
|
||||||
EUCLEAN +..... Structure needs cleaning
|
|
||||||
EUNATCH +..... Protocol driver not attached
|
|
||||||
EUSERS +++... Too many users
|
|
||||||
EWOULDBLOCK POSIX +++..+ Operation would block
|
|
||||||
EXDEV POSIX ++++++ Cross-device link
|
|
||||||
EXFULL +..... Exchange full
|
|
||||||
|
|
||||||
Notations:
|
|
||||||
|
|
||||||
F: used in FFmpeg (-: a few times, +: a lot)
|
|
||||||
|
|
||||||
SUSv3: Single Unix Specification, version 3
|
|
||||||
SUSv4: Single Unix Specification, version 4
|
|
||||||
XSR: XSI STREAMS (obsolete)
|
|
||||||
|
|
||||||
OS: availability on some supported operating systems
|
|
||||||
L: GNU/Linux
|
|
||||||
B: BSD (F: FreeBSD, N: NetBSD)
|
|
||||||
M: MacOS X
|
|
||||||
W: Microsoft Windows (s: emulated with winsock, see libavformat/network.h)
|
|
||||||
w: Mingw32 (3.17) and Mingw64 (2.0.1)
|
|
||||||
b: BeOS
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
@chapter Expression Evaluation
|
@chapter Expression Evaluation
|
||||||
@c man begin EXPRESSION EVALUATION
|
@c man begin EXPRESSION EVALUATION
|
||||||
|
|
||||||
When evaluating an arithmetic expression, FFmpeg uses an internal
|
When evaluating an arithemetic expression, FFmpeg uses an internal
|
||||||
formula evaluator, implemented through the @file{libavutil/eval.h}
|
formula evaluator, implemented through the @file{libavutil/eval.h}
|
||||||
interface.
|
interface.
|
||||||
|
|
||||||
@@ -50,11 +50,10 @@ Allow to store the value of the expression @var{expr} in an internal
|
|||||||
variable. @var{var} specifies the number of the variable where to
|
variable. @var{var} specifies the number of the variable where to
|
||||||
store the value, and it is a value ranging from 0 to 9. The function
|
store the value, and it is a value ranging from 0 to 9. The function
|
||||||
returns the value stored in the internal variable.
|
returns the value stored in the internal variable.
|
||||||
Note, Variables are currently not shared between expressions.
|
|
||||||
|
|
||||||
@item ld(var)
|
@item ld(var)
|
||||||
Allow to load the value of the internal variable with number
|
Allow to load the value of the internal variable with number
|
||||||
@var{var}, which was previously stored with st(@var{var}, @var{expr}).
|
@var{var}, which was previosly stored with st(@var{var}, @var{expr}).
|
||||||
The function returns the loaded value.
|
The function returns the loaded value.
|
||||||
|
|
||||||
@item while(cond, expr)
|
@item while(cond, expr)
|
||||||
@@ -84,66 +83,21 @@ Return 1.0 if @var{expr} is zero, 0.0 otherwise.
|
|||||||
@item pow(x, y)
|
@item pow(x, y)
|
||||||
Compute the power of @var{x} elevated @var{y}, it is equivalent to
|
Compute the power of @var{x} elevated @var{y}, it is equivalent to
|
||||||
"(@var{x})^(@var{y})".
|
"(@var{x})^(@var{y})".
|
||||||
|
|
||||||
@item random(x)
|
|
||||||
Return a pseudo random value between 0.0 and 1.0. @var{x} is the index of the
|
|
||||||
internal variable which will be used to save the seed/state.
|
|
||||||
|
|
||||||
@item hypot(x, y)
|
|
||||||
This function is similar to the C function with the same name; it returns
|
|
||||||
"sqrt(@var{x}*@var{x} + @var{y}*@var{y})", the length of the hypotenuse of a
|
|
||||||
right triangle with sides of length @var{x} and @var{y}, or the distance of the
|
|
||||||
point (@var{x}, @var{y}) from the origin.
|
|
||||||
|
|
||||||
@item gcd(x, y)
|
|
||||||
Return the greatest common divisor of @var{x} and @var{y}. If both @var{x} and
|
|
||||||
@var{y} are 0 or either or both are less than zero then behavior is undefined.
|
|
||||||
|
|
||||||
@item if(x, y)
|
|
||||||
Evaluate @var{x}, and if the result is non-zero return the result of
|
|
||||||
the evaluation of @var{y}, return 0 otherwise.
|
|
||||||
|
|
||||||
@item ifnot(x, y)
|
|
||||||
Evaluate @var{x}, and if the result is zero return the result of the
|
|
||||||
evaluation of @var{y}, return 0 otherwise.
|
|
||||||
|
|
||||||
@item taylor(expr, x) taylor(expr, x, id)
|
|
||||||
Evaluate a taylor series at x.
|
|
||||||
expr represents the LD(id)-th derivates of f(x) at 0. If id is not specified
|
|
||||||
then 0 is assumed.
|
|
||||||
note, when you have the derivatives at y instead of 0
|
|
||||||
taylor(expr, x-y) can be used
|
|
||||||
When the series does not converge the results are undefined.
|
|
||||||
|
|
||||||
@item root(expr, max)
|
|
||||||
Finds x where f(x)=0 in the interval 0..max.
|
|
||||||
f() must be continuous or the result is undefined.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
The following constants are available:
|
Note that:
|
||||||
@table @option
|
|
||||||
@item PI
|
|
||||||
area of the unit disc, approximately 3.14
|
|
||||||
@item E
|
|
||||||
exp(1) (Euler's number), approximately 2.718
|
|
||||||
@item PHI
|
|
||||||
golden ratio (1+sqrt(5))/2, approximately 1.618
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Assuming that an expression is considered "true" if it has a non-zero
|
|
||||||
value, note that:
|
|
||||||
|
|
||||||
@code{*} works like AND
|
@code{*} works like AND
|
||||||
|
|
||||||
@code{+} works like OR
|
@code{+} works like OR
|
||||||
|
|
||||||
and the construct:
|
thus
|
||||||
@example
|
@example
|
||||||
if A then B else C
|
if A then B else C
|
||||||
@end example
|
@end example
|
||||||
is equivalent to
|
is equivalent to
|
||||||
@example
|
@example
|
||||||
if(A,B) + ifnot(A,C)
|
A*B + not(A)*C
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
In your C code, you can extend the list of unary and binary functions,
|
In your C code, you can extend the list of unary and binary functions,
|
||||||
|
|||||||
@@ -1,28 +1,17 @@
|
|||||||
# use pkg-config for getting CFLAGS and LDLIBS
|
# use pkg-config for getting CFLAGS abd LDFLAGS
|
||||||
FFMPEG_LIBS= libavdevice \
|
FFMPEG_LIBS=libavdevice libavformat libavfilter libavcodec libswscale libavutil
|
||||||
libavformat \
|
CFLAGS+=$(shell pkg-config --cflags $(FFMPEG_LIBS))
|
||||||
libavfilter \
|
LDFLAGS+=$(shell pkg-config --libs $(FFMPEG_LIBS))
|
||||||
libavcodec \
|
|
||||||
libavresample \
|
|
||||||
libswresample \
|
|
||||||
libswscale \
|
|
||||||
libavutil \
|
|
||||||
|
|
||||||
CFLAGS += -Wall -O2 -g
|
EXAMPLES=encoding-example muxing-example
|
||||||
CFLAGS += $(shell pkg-config --cflags $(FFMPEG_LIBS))
|
|
||||||
LDLIBS += $(shell pkg-config --libs $(FFMPEG_LIBS))
|
|
||||||
|
|
||||||
EXAMPLES= decoding_encoding \
|
|
||||||
filtering_video \
|
|
||||||
filtering_audio \
|
|
||||||
metadata \
|
|
||||||
muxing \
|
|
||||||
|
|
||||||
OBJS=$(addsuffix .o,$(EXAMPLES))
|
OBJS=$(addsuffix .o,$(EXAMPLES))
|
||||||
|
|
||||||
# the following examples make explicit use of the math library
|
%: %.o
|
||||||
decoding_encoding: LDLIBS += -lm
|
$(CC) $< $(LDFLAGS) -o $@
|
||||||
muxing: LDLIBS += -lm
|
|
||||||
|
%.o: %.c
|
||||||
|
$(CC) $< $(CFLAGS) -c -o $@
|
||||||
|
|
||||||
.phony: all clean
|
.phony: all clean
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +1,42 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2001 Fabrice Bellard
|
* Copyright (c) 2001 Fabrice Bellard
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* This file is part of FFmpeg.
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in
|
* FFmpeg is free software; you can redistribute it and/or
|
||||||
* all copies or substantial portions of the Software.
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* FFmpeg is distributed in the hope that it will be useful,
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
* Lesser General Public License for more details.
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
*
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* THE SOFTWARE.
|
* License along with FFmpeg; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* libavcodec API use example.
|
* avcodec API use example.
|
||||||
*
|
*
|
||||||
* Note that libavcodec only handles codecs (mpeg, mpeg4, etc...),
|
* Note that this library only handles codecs (mpeg, mpeg4, etc...),
|
||||||
* not file formats (avi, vob, mp4, mov, mkv, mxf, flv, mpegts, mpegps, etc...). See library 'libavformat' for the
|
* not file formats (avi, vob, etc...). See library 'libavformat' for the
|
||||||
* format handling
|
* format handling
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <math.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <libavutil/imgutils.h>
|
#ifdef HAVE_AV_CONFIG_H
|
||||||
#include <libavutil/opt.h>
|
#undef HAVE_AV_CONFIG_H
|
||||||
#include <libavcodec/avcodec.h>
|
#endif
|
||||||
#include <libavutil/mathematics.h>
|
|
||||||
#include <libavutil/samplefmt.h>
|
#include "libavcodec/avcodec.h"
|
||||||
|
#include "libavutil/mathematics.h"
|
||||||
|
|
||||||
#define INBUF_SIZE 4096
|
#define INBUF_SIZE 4096
|
||||||
#define AUDIO_INBUF_SIZE 20480
|
#define AUDIO_INBUF_SIZE 20480
|
||||||
@@ -54,7 +55,7 @@ static void audio_encode_example(const char *filename)
|
|||||||
float t, tincr;
|
float t, tincr;
|
||||||
uint8_t *outbuf;
|
uint8_t *outbuf;
|
||||||
|
|
||||||
printf("Encode audio file %s\n", filename);
|
printf("Audio encoding\n");
|
||||||
|
|
||||||
/* find the MP2 encoder */
|
/* find the MP2 encoder */
|
||||||
codec = avcodec_find_encoder(CODEC_ID_MP2);
|
codec = avcodec_find_encoder(CODEC_ID_MP2);
|
||||||
@@ -63,16 +64,15 @@ static void audio_encode_example(const char *filename)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
c = avcodec_alloc_context3(codec);
|
c= avcodec_alloc_context();
|
||||||
|
|
||||||
/* put sample parameters */
|
/* put sample parameters */
|
||||||
c->bit_rate = 64000;
|
c->bit_rate = 64000;
|
||||||
c->sample_rate = 44100;
|
c->sample_rate = 44100;
|
||||||
c->channels = 2;
|
c->channels = 2;
|
||||||
c->sample_fmt = AV_SAMPLE_FMT_S16;
|
|
||||||
|
|
||||||
/* open it */
|
/* open it */
|
||||||
if (avcodec_open2(c, codec, NULL) < 0) {
|
if (avcodec_open(c, codec) < 0) {
|
||||||
fprintf(stderr, "could not open codec\n");
|
fprintf(stderr, "could not open codec\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -117,15 +117,15 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
|||||||
{
|
{
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
AVCodecContext *c= NULL;
|
AVCodecContext *c= NULL;
|
||||||
int len;
|
int out_size, len;
|
||||||
FILE *f, *outfile;
|
FILE *f, *outfile;
|
||||||
|
uint8_t *outbuf;
|
||||||
uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
|
uint8_t inbuf[AUDIO_INBUF_SIZE + FF_INPUT_BUFFER_PADDING_SIZE];
|
||||||
AVPacket avpkt;
|
AVPacket avpkt;
|
||||||
AVFrame *decoded_frame = NULL;
|
|
||||||
|
|
||||||
av_init_packet(&avpkt);
|
av_init_packet(&avpkt);
|
||||||
|
|
||||||
printf("Decode audio file %s\n", filename);
|
printf("Audio decoding\n");
|
||||||
|
|
||||||
/* find the mpeg audio decoder */
|
/* find the mpeg audio decoder */
|
||||||
codec = avcodec_find_decoder(CODEC_ID_MP2);
|
codec = avcodec_find_decoder(CODEC_ID_MP2);
|
||||||
@@ -134,14 +134,16 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
c = avcodec_alloc_context3(codec);
|
c= avcodec_alloc_context();
|
||||||
|
|
||||||
/* open it */
|
/* open it */
|
||||||
if (avcodec_open2(c, codec, NULL) < 0) {
|
if (avcodec_open(c, codec) < 0) {
|
||||||
fprintf(stderr, "could not open codec\n");
|
fprintf(stderr, "could not open codec\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
outbuf = malloc(AVCODEC_MAX_AUDIO_FRAME_SIZE);
|
||||||
|
|
||||||
f = fopen(filename, "rb");
|
f = fopen(filename, "rb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
fprintf(stderr, "could not open %s\n", filename);
|
fprintf(stderr, "could not open %s\n", filename);
|
||||||
@@ -158,32 +160,18 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
|||||||
avpkt.size = fread(inbuf, 1, AUDIO_INBUF_SIZE, f);
|
avpkt.size = fread(inbuf, 1, AUDIO_INBUF_SIZE, f);
|
||||||
|
|
||||||
while (avpkt.size > 0) {
|
while (avpkt.size > 0) {
|
||||||
int got_frame = 0;
|
out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
|
||||||
|
len = avcodec_decode_audio3(c, (short *)outbuf, &out_size, &avpkt);
|
||||||
if (!decoded_frame) {
|
|
||||||
if (!(decoded_frame = avcodec_alloc_frame())) {
|
|
||||||
fprintf(stderr, "out of memory\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
avcodec_get_frame_defaults(decoded_frame);
|
|
||||||
|
|
||||||
len = avcodec_decode_audio4(c, decoded_frame, &got_frame, &avpkt);
|
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
fprintf(stderr, "Error while decoding\n");
|
fprintf(stderr, "Error while decoding\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (got_frame) {
|
if (out_size > 0) {
|
||||||
/* if a frame has been decoded, output it */
|
/* if a frame has been decoded, output it */
|
||||||
int data_size = av_samples_get_buffer_size(NULL, c->channels,
|
fwrite(outbuf, 1, out_size, outfile);
|
||||||
decoded_frame->nb_samples,
|
|
||||||
c->sample_fmt, 1);
|
|
||||||
fwrite(decoded_frame->data[0], 1, data_size, outfile);
|
|
||||||
}
|
}
|
||||||
avpkt.size -= len;
|
avpkt.size -= len;
|
||||||
avpkt.data += len;
|
avpkt.data += len;
|
||||||
avpkt.dts =
|
|
||||||
avpkt.pts = AV_NOPTS_VALUE;
|
|
||||||
if (avpkt.size < AUDIO_REFILL_THRESH) {
|
if (avpkt.size < AUDIO_REFILL_THRESH) {
|
||||||
/* Refill the input buffer, to avoid trying to decode
|
/* Refill the input buffer, to avoid trying to decode
|
||||||
* incomplete frames. Instead of this, one could also use
|
* incomplete frames. Instead of this, one could also use
|
||||||
@@ -200,35 +188,34 @@ static void audio_decode_example(const char *outfilename, const char *filename)
|
|||||||
|
|
||||||
fclose(outfile);
|
fclose(outfile);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
free(outbuf);
|
||||||
|
|
||||||
avcodec_close(c);
|
avcodec_close(c);
|
||||||
av_free(c);
|
av_free(c);
|
||||||
av_free(decoded_frame);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Video encoding example
|
* Video encoding example
|
||||||
*/
|
*/
|
||||||
static void video_encode_example(const char *filename, int codec_id)
|
static void video_encode_example(const char *filename)
|
||||||
{
|
{
|
||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
AVCodecContext *c= NULL;
|
AVCodecContext *c= NULL;
|
||||||
int i, out_size, x, y, outbuf_size;
|
int i, out_size, size, x, y, outbuf_size;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
AVFrame *picture;
|
AVFrame *picture;
|
||||||
uint8_t *outbuf;
|
uint8_t *outbuf, *picture_buf;
|
||||||
int had_output=0;
|
|
||||||
|
|
||||||
printf("Encode video file %s\n", filename);
|
printf("Video encoding\n");
|
||||||
|
|
||||||
/* find the mpeg1 video encoder */
|
/* find the mpeg1 video encoder */
|
||||||
codec = avcodec_find_encoder(codec_id);
|
codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO);
|
||||||
if (!codec) {
|
if (!codec) {
|
||||||
fprintf(stderr, "codec not found\n");
|
fprintf(stderr, "codec not found\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
c = avcodec_alloc_context3(codec);
|
c= avcodec_alloc_context();
|
||||||
picture= avcodec_alloc_frame();
|
picture= avcodec_alloc_frame();
|
||||||
|
|
||||||
/* put sample parameters */
|
/* put sample parameters */
|
||||||
@@ -242,11 +229,8 @@ static void video_encode_example(const char *filename, int codec_id)
|
|||||||
c->max_b_frames=1;
|
c->max_b_frames=1;
|
||||||
c->pix_fmt = PIX_FMT_YUV420P;
|
c->pix_fmt = PIX_FMT_YUV420P;
|
||||||
|
|
||||||
if(codec_id == CODEC_ID_H264)
|
|
||||||
av_opt_set(c->priv_data, "preset", "slow", 0);
|
|
||||||
|
|
||||||
/* open it */
|
/* open it */
|
||||||
if (avcodec_open2(c, codec, NULL) < 0) {
|
if (avcodec_open(c, codec) < 0) {
|
||||||
fprintf(stderr, "could not open codec\n");
|
fprintf(stderr, "could not open codec\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -258,13 +242,17 @@ static void video_encode_example(const char *filename, int codec_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* alloc image and output buffer */
|
/* alloc image and output buffer */
|
||||||
outbuf_size = 100000 + 12*c->width*c->height;
|
outbuf_size = 100000;
|
||||||
outbuf = malloc(outbuf_size);
|
outbuf = malloc(outbuf_size);
|
||||||
|
size = c->width * c->height;
|
||||||
|
picture_buf = malloc((size * 3) / 2); /* size for YUV 420 */
|
||||||
|
|
||||||
/* the image can be allocated by any means and av_image_alloc() is
|
picture->data[0] = picture_buf;
|
||||||
* just the most convenient way if av_malloc() is to be used */
|
picture->data[1] = picture->data[0] + size;
|
||||||
av_image_alloc(picture->data, picture->linesize,
|
picture->data[2] = picture->data[1] + size / 4;
|
||||||
c->width, c->height, c->pix_fmt, 1);
|
picture->linesize[0] = c->width;
|
||||||
|
picture->linesize[1] = c->width / 2;
|
||||||
|
picture->linesize[2] = c->width / 2;
|
||||||
|
|
||||||
/* encode 1 second of video */
|
/* encode 1 second of video */
|
||||||
for(i=0;i<25;i++) {
|
for(i=0;i<25;i++) {
|
||||||
@@ -287,17 +275,15 @@ static void video_encode_example(const char *filename, int codec_id)
|
|||||||
|
|
||||||
/* encode the image */
|
/* encode the image */
|
||||||
out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture);
|
out_size = avcodec_encode_video(c, outbuf, outbuf_size, picture);
|
||||||
had_output |= out_size;
|
|
||||||
printf("encoding frame %3d (size=%5d)\n", i, out_size);
|
printf("encoding frame %3d (size=%5d)\n", i, out_size);
|
||||||
fwrite(outbuf, 1, out_size, f);
|
fwrite(outbuf, 1, out_size, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the delayed frames */
|
/* get the delayed frames */
|
||||||
for(; out_size || !had_output; i++) {
|
for(; out_size; i++) {
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL);
|
out_size = avcodec_encode_video(c, outbuf, outbuf_size, NULL);
|
||||||
had_output |= out_size;
|
|
||||||
printf("write frame %3d (size=%5d)\n", i, out_size);
|
printf("write frame %3d (size=%5d)\n", i, out_size);
|
||||||
fwrite(outbuf, 1, out_size, f);
|
fwrite(outbuf, 1, out_size, f);
|
||||||
}
|
}
|
||||||
@@ -309,11 +295,11 @@ static void video_encode_example(const char *filename, int codec_id)
|
|||||||
outbuf[3] = 0xb7;
|
outbuf[3] = 0xb7;
|
||||||
fwrite(outbuf, 1, 4, f);
|
fwrite(outbuf, 1, 4, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
free(picture_buf);
|
||||||
free(outbuf);
|
free(outbuf);
|
||||||
|
|
||||||
avcodec_close(c);
|
avcodec_close(c);
|
||||||
av_free(c);
|
av_free(c);
|
||||||
av_free(picture->data[0]);
|
|
||||||
av_free(picture);
|
av_free(picture);
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@@ -351,7 +337,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
|
|||||||
/* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */
|
/* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */
|
||||||
memset(inbuf + INBUF_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
memset(inbuf + INBUF_SIZE, 0, FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
|
|
||||||
printf("Decode video file %s\n", filename);
|
printf("Video decoding\n");
|
||||||
|
|
||||||
/* find the mpeg1 video decoder */
|
/* find the mpeg1 video decoder */
|
||||||
codec = avcodec_find_decoder(CODEC_ID_MPEG1VIDEO);
|
codec = avcodec_find_decoder(CODEC_ID_MPEG1VIDEO);
|
||||||
@@ -360,7 +346,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
c = avcodec_alloc_context3(codec);
|
c= avcodec_alloc_context();
|
||||||
picture= avcodec_alloc_frame();
|
picture= avcodec_alloc_frame();
|
||||||
|
|
||||||
if(codec->capabilities&CODEC_CAP_TRUNCATED)
|
if(codec->capabilities&CODEC_CAP_TRUNCATED)
|
||||||
@@ -371,7 +357,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
|
|||||||
available in the bitstream. */
|
available in the bitstream. */
|
||||||
|
|
||||||
/* open it */
|
/* open it */
|
||||||
if (avcodec_open2(c, codec, NULL) < 0) {
|
if (avcodec_open(c, codec) < 0) {
|
||||||
fprintf(stderr, "could not open codec\n");
|
fprintf(stderr, "could not open codec\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -458,6 +444,9 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
const char *filename;
|
const char *filename;
|
||||||
|
|
||||||
|
/* must be called before using avcodec lib */
|
||||||
|
avcodec_init();
|
||||||
|
|
||||||
/* register all the codecs */
|
/* register all the codecs */
|
||||||
avcodec_register_all();
|
avcodec_register_all();
|
||||||
|
|
||||||
@@ -465,8 +454,7 @@ int main(int argc, char **argv)
|
|||||||
audio_encode_example("/tmp/test.mp2");
|
audio_encode_example("/tmp/test.mp2");
|
||||||
audio_decode_example("/tmp/test.sw", "/tmp/test.mp2");
|
audio_decode_example("/tmp/test.sw", "/tmp/test.mp2");
|
||||||
|
|
||||||
video_encode_example("/tmp/test.h264", CODEC_ID_H264);
|
video_encode_example("/tmp/test.mpg");
|
||||||
video_encode_example("/tmp/test.mpg", CODEC_ID_MPEG1VIDEO);
|
|
||||||
filename = "/tmp/test.mpg";
|
filename = "/tmp/test.mpg";
|
||||||
} else {
|
} else {
|
||||||
filename = argv[1];
|
filename = argv[1];
|
||||||
@@ -1,235 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2010 Nicolas George
|
|
||||||
* Copyright (c) 2011 Stefano Sabatini
|
|
||||||
* Copyright (c) 2012 Clément Bœsch
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file
|
|
||||||
* API example for audio decoding and filtering
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <libavcodec/avcodec.h>
|
|
||||||
#include <libavformat/avformat.h>
|
|
||||||
#include <libavfilter/avfiltergraph.h>
|
|
||||||
#include <libavfilter/avcodec.h>
|
|
||||||
#include <libavfilter/buffersink.h>
|
|
||||||
#include <libavfilter/buffersrc.h>
|
|
||||||
|
|
||||||
const char *filter_descr = "aresample=8000,aconvert=s16:mono";
|
|
||||||
const char *player = "ffplay -f s16le -ar 8000 -ac 1 -";
|
|
||||||
|
|
||||||
static AVFormatContext *fmt_ctx;
|
|
||||||
static AVCodecContext *dec_ctx;
|
|
||||||
AVFilterContext *buffersink_ctx;
|
|
||||||
AVFilterContext *buffersrc_ctx;
|
|
||||||
AVFilterGraph *filter_graph;
|
|
||||||
static int audio_stream_index = -1;
|
|
||||||
|
|
||||||
static int open_input_file(const char *filename)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
AVCodec *dec;
|
|
||||||
|
|
||||||
if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)) < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot open input file\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* select the audio stream */
|
|
||||||
ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &dec, 0);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot find a audio stream in the input file\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
audio_stream_index = ret;
|
|
||||||
dec_ctx = fmt_ctx->streams[audio_stream_index]->codec;
|
|
||||||
|
|
||||||
/* init the audio decoder */
|
|
||||||
if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot open audio decoder\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int init_filters(const char *filters_descr)
|
|
||||||
{
|
|
||||||
char args[512];
|
|
||||||
int ret;
|
|
||||||
AVFilter *abuffersrc = avfilter_get_by_name("abuffer");
|
|
||||||
AVFilter *abuffersink = avfilter_get_by_name("abuffersink");
|
|
||||||
AVFilterInOut *outputs = avfilter_inout_alloc();
|
|
||||||
AVFilterInOut *inputs = avfilter_inout_alloc();
|
|
||||||
const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 };
|
|
||||||
const int64_t *chlayouts = avfilter_all_channel_layouts;
|
|
||||||
AVABufferSinkParams *abuffersink_params;
|
|
||||||
const AVFilterLink *outlink;
|
|
||||||
|
|
||||||
filter_graph = avfilter_graph_alloc();
|
|
||||||
|
|
||||||
/* buffer audio source: the decoded frames from the decoder will be inserted here. */
|
|
||||||
if (!dec_ctx->channel_layout)
|
|
||||||
dec_ctx->channel_layout = av_get_default_channel_layout(dec_ctx->channels);
|
|
||||||
snprintf(args, sizeof(args), "%d:%d:0x%"PRIx64,
|
|
||||||
dec_ctx->sample_rate, dec_ctx->sample_fmt, dec_ctx->channel_layout);
|
|
||||||
ret = avfilter_graph_create_filter(&buffersrc_ctx, abuffersrc, "in",
|
|
||||||
args, NULL, filter_graph);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot create audio buffer source\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* buffer audio sink: to terminate the filter chain. */
|
|
||||||
abuffersink_params = av_abuffersink_params_alloc();
|
|
||||||
abuffersink_params->sample_fmts = sample_fmts;
|
|
||||||
abuffersink_params->channel_layouts = chlayouts;
|
|
||||||
ret = avfilter_graph_create_filter(&buffersink_ctx, abuffersink, "out",
|
|
||||||
NULL, abuffersink_params, filter_graph);
|
|
||||||
av_free(abuffersink_params);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot create audio buffer sink\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Endpoints for the filter graph. */
|
|
||||||
outputs->name = av_strdup("in");
|
|
||||||
outputs->filter_ctx = buffersrc_ctx;
|
|
||||||
outputs->pad_idx = 0;
|
|
||||||
outputs->next = NULL;
|
|
||||||
|
|
||||||
inputs->name = av_strdup("out");
|
|
||||||
inputs->filter_ctx = buffersink_ctx;
|
|
||||||
inputs->pad_idx = 0;
|
|
||||||
inputs->next = NULL;
|
|
||||||
|
|
||||||
if ((ret = avfilter_graph_parse(filter_graph, filters_descr,
|
|
||||||
&inputs, &outputs, NULL)) < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if ((ret = avfilter_graph_config(filter_graph, NULL)) < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
/* Print summary of the sink buffer
|
|
||||||
* Note: args buffer is reused to store channel layout string */
|
|
||||||
outlink = buffersink_ctx->inputs[0];
|
|
||||||
av_get_channel_layout_string(args, sizeof(args), -1, outlink->channel_layout);
|
|
||||||
av_log(NULL, AV_LOG_INFO, "Output: srate:%dHz fmt:%s chlayout:%s\n",
|
|
||||||
(int)outlink->sample_rate,
|
|
||||||
(char *)av_x_if_null(av_get_sample_fmt_name(outlink->format), "?"),
|
|
||||||
args);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void print_samplesref(AVFilterBufferRef *samplesref)
|
|
||||||
{
|
|
||||||
const AVFilterBufferRefAudioProps *props = samplesref->audio;
|
|
||||||
const int n = props->nb_samples * av_get_channel_layout_nb_channels(props->channel_layout);
|
|
||||||
const uint16_t *p = (uint16_t*)samplesref->data[0];
|
|
||||||
const uint16_t *p_end = p + n;
|
|
||||||
|
|
||||||
while (p < p_end) {
|
|
||||||
fputc(*p & 0xff, stdout);
|
|
||||||
fputc(*p>>8 & 0xff, stdout);
|
|
||||||
p++;
|
|
||||||
}
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
AVPacket packet;
|
|
||||||
AVFrame frame;
|
|
||||||
int got_frame;
|
|
||||||
|
|
||||||
if (argc != 2) {
|
|
||||||
fprintf(stderr, "Usage: %s file | %s\n", argv[0], player);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
avcodec_register_all();
|
|
||||||
av_register_all();
|
|
||||||
avfilter_register_all();
|
|
||||||
|
|
||||||
if ((ret = open_input_file(argv[1])) < 0)
|
|
||||||
goto end;
|
|
||||||
if ((ret = init_filters(filter_descr)) < 0)
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
/* read all packets */
|
|
||||||
while (1) {
|
|
||||||
AVFilterBufferRef *samplesref;
|
|
||||||
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (packet.stream_index == audio_stream_index) {
|
|
||||||
avcodec_get_frame_defaults(&frame);
|
|
||||||
got_frame = 0;
|
|
||||||
ret = avcodec_decode_audio4(dec_ctx, &frame, &got_frame, &packet);
|
|
||||||
av_free_packet(&packet);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Error decoding audio\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (got_frame) {
|
|
||||||
/* push the audio data from decoded frame into the filtergraph */
|
|
||||||
if (av_buffersrc_add_frame(buffersrc_ctx, &frame, 0) < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Error while feeding the audio filtergraph\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* pull filtered audio from the filtergraph */
|
|
||||||
while (avfilter_poll_frame(buffersink_ctx->inputs[0])) {
|
|
||||||
av_buffersink_get_buffer_ref(buffersink_ctx, &samplesref, 0);
|
|
||||||
if (samplesref) {
|
|
||||||
print_samplesref(samplesref);
|
|
||||||
avfilter_unref_buffer(samplesref);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end:
|
|
||||||
avfilter_graph_free(&filter_graph);
|
|
||||||
if (dec_ctx)
|
|
||||||
avcodec_close(dec_ctx);
|
|
||||||
avformat_close_input(&fmt_ctx);
|
|
||||||
|
|
||||||
if (ret < 0 && ret != AVERROR_EOF) {
|
|
||||||
char buf[1024];
|
|
||||||
av_strerror(ret, buf, sizeof(buf));
|
|
||||||
fprintf(stderr, "Error occurred: %s\n", buf);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
@@ -1,231 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2010 Nicolas George
|
|
||||||
* Copyright (c) 2011 Stefano Sabatini
|
|
||||||
*
|
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
|
||||||
* in the Software without restriction, including without limitation the rights
|
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
|
||||||
* furnished to do so, subject to the following conditions:
|
|
||||||
*
|
|
||||||
* The above copyright notice and this permission notice shall be included in
|
|
||||||
* all copies or substantial portions of the Software.
|
|
||||||
*
|
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
* THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file
|
|
||||||
* API example for decoding and filtering
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define _XOPEN_SOURCE 600 /* for usleep */
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <libavcodec/avcodec.h>
|
|
||||||
#include <libavformat/avformat.h>
|
|
||||||
#include <libavfilter/avfiltergraph.h>
|
|
||||||
#include <libavfilter/avcodec.h>
|
|
||||||
#include <libavfilter/buffersink.h>
|
|
||||||
|
|
||||||
const char *filter_descr = "scale=78:24";
|
|
||||||
|
|
||||||
static AVFormatContext *fmt_ctx;
|
|
||||||
static AVCodecContext *dec_ctx;
|
|
||||||
AVFilterContext *buffersink_ctx;
|
|
||||||
AVFilterContext *buffersrc_ctx;
|
|
||||||
AVFilterGraph *filter_graph;
|
|
||||||
static int video_stream_index = -1;
|
|
||||||
static int64_t last_pts = AV_NOPTS_VALUE;
|
|
||||||
|
|
||||||
static int open_input_file(const char *filename)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
AVCodec *dec;
|
|
||||||
|
|
||||||
if ((ret = avformat_open_input(&fmt_ctx, filename, NULL, NULL)) < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot open input file\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((ret = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot find stream information\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* select the video stream */
|
|
||||||
ret = av_find_best_stream(fmt_ctx, AVMEDIA_TYPE_VIDEO, -1, -1, &dec, 0);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot find a video stream in the input file\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
video_stream_index = ret;
|
|
||||||
dec_ctx = fmt_ctx->streams[video_stream_index]->codec;
|
|
||||||
|
|
||||||
/* init the video decoder */
|
|
||||||
if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot open video decoder\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int init_filters(const char *filters_descr)
|
|
||||||
{
|
|
||||||
char args[512];
|
|
||||||
int ret;
|
|
||||||
AVFilter *buffersrc = avfilter_get_by_name("buffer");
|
|
||||||
AVFilter *buffersink = avfilter_get_by_name("buffersink");
|
|
||||||
AVFilterInOut *outputs = avfilter_inout_alloc();
|
|
||||||
AVFilterInOut *inputs = avfilter_inout_alloc();
|
|
||||||
enum PixelFormat pix_fmts[] = { PIX_FMT_GRAY8, PIX_FMT_NONE };
|
|
||||||
filter_graph = avfilter_graph_alloc();
|
|
||||||
|
|
||||||
/* buffer video source: the decoded frames from the decoder will be inserted here. */
|
|
||||||
snprintf(args, sizeof(args), "%d:%d:%d:%d:%d:%d:%d",
|
|
||||||
dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt,
|
|
||||||
dec_ctx->time_base.num, dec_ctx->time_base.den,
|
|
||||||
dec_ctx->sample_aspect_ratio.num, dec_ctx->sample_aspect_ratio.den);
|
|
||||||
ret = avfilter_graph_create_filter(&buffersrc_ctx, buffersrc, "in",
|
|
||||||
args, NULL, filter_graph);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot create buffer source\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* buffer video sink: to terminate the filter chain. */
|
|
||||||
ret = avfilter_graph_create_filter(&buffersink_ctx, buffersink, "out",
|
|
||||||
NULL, pix_fmts, filter_graph);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot create buffer sink\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Endpoints for the filter graph. */
|
|
||||||
outputs->name = av_strdup("in");
|
|
||||||
outputs->filter_ctx = buffersrc_ctx;
|
|
||||||
outputs->pad_idx = 0;
|
|
||||||
outputs->next = NULL;
|
|
||||||
|
|
||||||
inputs->name = av_strdup("out");
|
|
||||||
inputs->filter_ctx = buffersink_ctx;
|
|
||||||
inputs->pad_idx = 0;
|
|
||||||
inputs->next = NULL;
|
|
||||||
|
|
||||||
if ((ret = avfilter_graph_parse(filter_graph, filters_descr,
|
|
||||||
&inputs, &outputs, NULL)) < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if ((ret = avfilter_graph_config(filter_graph, NULL)) < 0)
|
|
||||||
return ret;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void display_picref(AVFilterBufferRef *picref, AVRational time_base)
|
|
||||||
{
|
|
||||||
int x, y;
|
|
||||||
uint8_t *p0, *p;
|
|
||||||
int64_t delay;
|
|
||||||
|
|
||||||
if (picref->pts != AV_NOPTS_VALUE) {
|
|
||||||
if (last_pts != AV_NOPTS_VALUE) {
|
|
||||||
/* sleep roughly the right amount of time;
|
|
||||||
* usleep is in microseconds, just like AV_TIME_BASE. */
|
|
||||||
delay = av_rescale_q(picref->pts - last_pts,
|
|
||||||
time_base, AV_TIME_BASE_Q);
|
|
||||||
if (delay > 0 && delay < 1000000)
|
|
||||||
usleep(delay);
|
|
||||||
}
|
|
||||||
last_pts = picref->pts;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Trivial ASCII grayscale display. */
|
|
||||||
p0 = picref->data[0];
|
|
||||||
puts("\033c");
|
|
||||||
for (y = 0; y < picref->video->h; y++) {
|
|
||||||
p = p0;
|
|
||||||
for (x = 0; x < picref->video->w; x++)
|
|
||||||
putchar(" .-+#"[*(p++) / 52]);
|
|
||||||
putchar('\n');
|
|
||||||
p0 += picref->linesize[0];
|
|
||||||
}
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
AVPacket packet;
|
|
||||||
AVFrame frame;
|
|
||||||
int got_frame;
|
|
||||||
|
|
||||||
if (argc != 2) {
|
|
||||||
fprintf(stderr, "Usage: %s file\n", argv[0]);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
avcodec_register_all();
|
|
||||||
av_register_all();
|
|
||||||
avfilter_register_all();
|
|
||||||
|
|
||||||
if ((ret = open_input_file(argv[1])) < 0)
|
|
||||||
goto end;
|
|
||||||
if ((ret = init_filters(filter_descr)) < 0)
|
|
||||||
goto end;
|
|
||||||
|
|
||||||
/* read all packets */
|
|
||||||
while (1) {
|
|
||||||
AVFilterBufferRef *picref;
|
|
||||||
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (packet.stream_index == video_stream_index) {
|
|
||||||
avcodec_get_frame_defaults(&frame);
|
|
||||||
got_frame = 0;
|
|
||||||
ret = avcodec_decode_video2(dec_ctx, &frame, &got_frame, &packet);
|
|
||||||
av_free_packet(&packet);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Error decoding video\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (got_frame) {
|
|
||||||
frame.pts = av_frame_get_best_effort_timestamp(&frame);
|
|
||||||
|
|
||||||
/* push the decoded frame into the filtergraph */
|
|
||||||
av_vsrc_buffer_add_frame(buffersrc_ctx, &frame, 0);
|
|
||||||
|
|
||||||
/* pull filtered pictures from the filtergraph */
|
|
||||||
while (avfilter_poll_frame(buffersink_ctx->inputs[0])) {
|
|
||||||
av_buffersink_get_buffer_ref(buffersink_ctx, &picref, 0);
|
|
||||||
if (picref) {
|
|
||||||
display_picref(picref, buffersink_ctx->inputs[0]->time_base);
|
|
||||||
avfilter_unref_buffer(picref);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end:
|
|
||||||
avfilter_graph_free(&filter_graph);
|
|
||||||
if (dec_ctx)
|
|
||||||
avcodec_close(dec_ctx);
|
|
||||||
avformat_close_input(&fmt_ctx);
|
|
||||||
|
|
||||||
if (ret < 0 && ret != AVERROR_EOF) {
|
|
||||||
char buf[1024];
|
|
||||||
av_strerror(ret, buf, sizeof(buf));
|
|
||||||
fprintf(stderr, "Error occurred: %s\n", buf);
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
@@ -22,10 +22,8 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* libavformat API example.
|
* Libavformat API example: Output a media file in any supported
|
||||||
*
|
* libavformat format. The default codecs are used.
|
||||||
* Output a media file in any supported libavformat format.
|
|
||||||
* The default codecs are used.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -33,26 +31,27 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <libavutil/mathematics.h>
|
#include "libavformat/avformat.h"
|
||||||
#include <libavformat/avformat.h>
|
#include "libswscale/swscale.h"
|
||||||
#include <libswscale/swscale.h>
|
|
||||||
|
|
||||||
#undef exit
|
#undef exit
|
||||||
|
|
||||||
/* 5 seconds stream duration */
|
/* 5 seconds stream duration */
|
||||||
#define STREAM_DURATION 200.0
|
#define STREAM_DURATION 5.0
|
||||||
#define STREAM_FRAME_RATE 25 /* 25 images/s */
|
#define STREAM_FRAME_RATE 25 /* 25 images/s */
|
||||||
#define STREAM_NB_FRAMES ((int)(STREAM_DURATION * STREAM_FRAME_RATE))
|
#define STREAM_NB_FRAMES ((int)(STREAM_DURATION * STREAM_FRAME_RATE))
|
||||||
#define STREAM_PIX_FMT PIX_FMT_YUV420P /* default pix_fmt */
|
#define STREAM_PIX_FMT PIX_FMT_YUV420P /* default pix_fmt */
|
||||||
|
|
||||||
static int sws_flags = SWS_BICUBIC;
|
static int sws_flags = SWS_BICUBIC;
|
||||||
|
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
/* audio output */
|
/* audio output */
|
||||||
|
|
||||||
static float t, tincr, tincr2;
|
float t, tincr, tincr2;
|
||||||
static int16_t *samples;
|
int16_t *samples;
|
||||||
static int audio_input_frame_size;
|
uint8_t *audio_outbuf;
|
||||||
|
int audio_outbuf_size;
|
||||||
|
int audio_input_frame_size;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* add an audio output stream
|
* add an audio output stream
|
||||||
@@ -61,32 +60,25 @@ static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
|
|||||||
{
|
{
|
||||||
AVCodecContext *c;
|
AVCodecContext *c;
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
AVCodec *codec;
|
|
||||||
|
|
||||||
/* find the audio encoder */
|
st = av_new_stream(oc, 1);
|
||||||
codec = avcodec_find_encoder(codec_id);
|
|
||||||
if (!codec) {
|
|
||||||
fprintf(stderr, "codec not found\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
st = avformat_new_stream(oc, codec);
|
|
||||||
if (!st) {
|
if (!st) {
|
||||||
fprintf(stderr, "Could not alloc stream\n");
|
fprintf(stderr, "Could not alloc stream\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
st->id = 1;
|
|
||||||
|
|
||||||
c = st->codec;
|
c = st->codec;
|
||||||
|
c->codec_id = codec_id;
|
||||||
|
c->codec_type = AVMEDIA_TYPE_AUDIO;
|
||||||
|
|
||||||
/* put sample parameters */
|
/* put sample parameters */
|
||||||
c->sample_fmt = AV_SAMPLE_FMT_S16;
|
c->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||||
c->bit_rate = 64000;
|
c->bit_rate = 64000;
|
||||||
c->sample_rate = 44100;
|
c->sample_rate = 44100;
|
||||||
c->channels = 2;
|
c->channels = 2;
|
||||||
|
|
||||||
// some formats want stream headers to be separate
|
// some formats want stream headers to be separate
|
||||||
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
|
if(oc->oformat->flags & AVFMT_GLOBALHEADER)
|
||||||
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||||
|
|
||||||
return st;
|
return st;
|
||||||
@@ -95,43 +87,65 @@ static AVStream *add_audio_stream(AVFormatContext *oc, enum CodecID codec_id)
|
|||||||
static void open_audio(AVFormatContext *oc, AVStream *st)
|
static void open_audio(AVFormatContext *oc, AVStream *st)
|
||||||
{
|
{
|
||||||
AVCodecContext *c;
|
AVCodecContext *c;
|
||||||
|
AVCodec *codec;
|
||||||
|
|
||||||
c = st->codec;
|
c = st->codec;
|
||||||
|
|
||||||
|
/* find the audio encoder */
|
||||||
|
codec = avcodec_find_encoder(c->codec_id);
|
||||||
|
if (!codec) {
|
||||||
|
fprintf(stderr, "codec not found\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
/* open it */
|
/* open it */
|
||||||
if (avcodec_open2(c, NULL, NULL) < 0) {
|
if (avcodec_open(c, codec) < 0) {
|
||||||
fprintf(stderr, "could not open codec\n");
|
fprintf(stderr, "could not open codec\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* init signal generator */
|
/* init signal generator */
|
||||||
t = 0;
|
t = 0;
|
||||||
tincr = 2 * M_PI * 110.0 / c->sample_rate;
|
tincr = 2 * M_PI * 110.0 / c->sample_rate;
|
||||||
/* increment frequency by 110 Hz per second */
|
/* increment frequency by 110 Hz per second */
|
||||||
tincr2 = 2 * M_PI * 110.0 / c->sample_rate / c->sample_rate;
|
tincr2 = 2 * M_PI * 110.0 / c->sample_rate / c->sample_rate;
|
||||||
|
|
||||||
if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)
|
audio_outbuf_size = 10000;
|
||||||
audio_input_frame_size = 10000;
|
audio_outbuf = av_malloc(audio_outbuf_size);
|
||||||
else
|
|
||||||
|
/* ugly hack for PCM codecs (will be removed ASAP with new PCM
|
||||||
|
support to compute the input frame size in samples */
|
||||||
|
if (c->frame_size <= 1) {
|
||||||
|
audio_input_frame_size = audio_outbuf_size / c->channels;
|
||||||
|
switch(st->codec->codec_id) {
|
||||||
|
case CODEC_ID_PCM_S16LE:
|
||||||
|
case CODEC_ID_PCM_S16BE:
|
||||||
|
case CODEC_ID_PCM_U16LE:
|
||||||
|
case CODEC_ID_PCM_U16BE:
|
||||||
|
audio_input_frame_size >>= 1;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
audio_input_frame_size = c->frame_size;
|
audio_input_frame_size = c->frame_size;
|
||||||
samples = av_malloc(audio_input_frame_size *
|
}
|
||||||
av_get_bytes_per_sample(c->sample_fmt) *
|
samples = av_malloc(audio_input_frame_size * 2 * c->channels);
|
||||||
c->channels);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prepare a 16 bit dummy audio frame of 'frame_size' samples and
|
/* prepare a 16 bit dummy audio frame of 'frame_size' samples and
|
||||||
* 'nb_channels' channels. */
|
'nb_channels' channels */
|
||||||
static void get_audio_frame(int16_t *samples, int frame_size, int nb_channels)
|
static void get_audio_frame(int16_t *samples, int frame_size, int nb_channels)
|
||||||
{
|
{
|
||||||
int j, i, v;
|
int j, i, v;
|
||||||
int16_t *q;
|
int16_t *q;
|
||||||
|
|
||||||
q = samples;
|
q = samples;
|
||||||
for (j = 0; j < frame_size; j++) {
|
for(j=0;j<frame_size;j++) {
|
||||||
v = (int)(sin(t) * 10000);
|
v = (int)(sin(t) * 10000);
|
||||||
for (i = 0; i < nb_channels; i++)
|
for(i = 0; i < nb_channels; i++)
|
||||||
*q++ = v;
|
*q++ = v;
|
||||||
t += tincr;
|
t += tincr;
|
||||||
tincr += tincr2;
|
tincr += tincr2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -139,28 +153,22 @@ static void get_audio_frame(int16_t *samples, int frame_size, int nb_channels)
|
|||||||
static void write_audio_frame(AVFormatContext *oc, AVStream *st)
|
static void write_audio_frame(AVFormatContext *oc, AVStream *st)
|
||||||
{
|
{
|
||||||
AVCodecContext *c;
|
AVCodecContext *c;
|
||||||
AVPacket pkt = { 0 }; // data and size must be 0;
|
AVPacket pkt;
|
||||||
AVFrame *frame = avcodec_alloc_frame();
|
|
||||||
int got_packet;
|
|
||||||
|
|
||||||
av_init_packet(&pkt);
|
av_init_packet(&pkt);
|
||||||
|
|
||||||
c = st->codec;
|
c = st->codec;
|
||||||
|
|
||||||
get_audio_frame(samples, audio_input_frame_size, c->channels);
|
get_audio_frame(samples, audio_input_frame_size, c->channels);
|
||||||
frame->nb_samples = audio_input_frame_size;
|
|
||||||
avcodec_fill_audio_frame(frame, c->channels, c->sample_fmt,
|
|
||||||
(uint8_t *)samples,
|
|
||||||
audio_input_frame_size *
|
|
||||||
av_get_bytes_per_sample(c->sample_fmt) *
|
|
||||||
c->channels, 1);
|
|
||||||
|
|
||||||
avcodec_encode_audio2(c, &pkt, frame, &got_packet);
|
pkt.size= avcodec_encode_audio(c, audio_outbuf, audio_outbuf_size, samples);
|
||||||
if (!got_packet)
|
|
||||||
return;
|
|
||||||
|
|
||||||
pkt.stream_index = st->index;
|
if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE)
|
||||||
|
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
|
||||||
|
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||||
|
pkt.stream_index= st->index;
|
||||||
|
pkt.data= audio_outbuf;
|
||||||
|
|
||||||
/* Write the compressed frame to the media file. */
|
/* write the compressed frame in the media file */
|
||||||
if (av_interleaved_write_frame(oc, &pkt) != 0) {
|
if (av_interleaved_write_frame(oc, &pkt) != 0) {
|
||||||
fprintf(stderr, "Error while writing audio frame\n");
|
fprintf(stderr, "Error while writing audio frame\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
@@ -172,72 +180,57 @@ static void close_audio(AVFormatContext *oc, AVStream *st)
|
|||||||
avcodec_close(st->codec);
|
avcodec_close(st->codec);
|
||||||
|
|
||||||
av_free(samples);
|
av_free(samples);
|
||||||
|
av_free(audio_outbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
/* video output */
|
/* video output */
|
||||||
|
|
||||||
static AVFrame *picture, *tmp_picture;
|
AVFrame *picture, *tmp_picture;
|
||||||
static uint8_t *video_outbuf;
|
uint8_t *video_outbuf;
|
||||||
static int frame_count, video_outbuf_size;
|
int frame_count, video_outbuf_size;
|
||||||
|
|
||||||
/* Add a video output stream. */
|
/* add a video output stream */
|
||||||
static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)
|
static AVStream *add_video_stream(AVFormatContext *oc, enum CodecID codec_id)
|
||||||
{
|
{
|
||||||
AVCodecContext *c;
|
AVCodecContext *c;
|
||||||
AVStream *st;
|
AVStream *st;
|
||||||
AVCodec *codec;
|
|
||||||
|
|
||||||
/* find the video encoder */
|
st = av_new_stream(oc, 0);
|
||||||
codec = avcodec_find_encoder(codec_id);
|
|
||||||
if (!codec) {
|
|
||||||
fprintf(stderr, "codec not found\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
st = avformat_new_stream(oc, codec);
|
|
||||||
if (!st) {
|
if (!st) {
|
||||||
fprintf(stderr, "Could not alloc stream\n");
|
fprintf(stderr, "Could not alloc stream\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
c = st->codec;
|
c = st->codec;
|
||||||
|
|
||||||
/* find the video encoder */
|
|
||||||
codec = avcodec_find_encoder(codec_id);
|
|
||||||
if (!codec) {
|
|
||||||
fprintf(stderr, "codec not found\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
avcodec_get_context_defaults3(c, codec);
|
|
||||||
|
|
||||||
c->codec_id = codec_id;
|
c->codec_id = codec_id;
|
||||||
|
c->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||||
|
|
||||||
/* Put sample parameters. */
|
/* put sample parameters */
|
||||||
c->bit_rate = 400000;
|
c->bit_rate = 400000;
|
||||||
/* Resolution must be a multiple of two. */
|
/* resolution must be a multiple of two */
|
||||||
c->width = 352;
|
c->width = 352;
|
||||||
c->height = 288;
|
c->height = 288;
|
||||||
/* timebase: This is the fundamental unit of time (in seconds) in terms
|
/* time base: this is the fundamental unit of time (in seconds) in terms
|
||||||
* of which frame timestamps are represented. For fixed-fps content,
|
of which frame timestamps are represented. for fixed-fps content,
|
||||||
* timebase should be 1/framerate and timestamp increments should be
|
timebase should be 1/framerate and timestamp increments should be
|
||||||
* identical to 1. */
|
identically 1. */
|
||||||
c->time_base.den = STREAM_FRAME_RATE;
|
c->time_base.den = STREAM_FRAME_RATE;
|
||||||
c->time_base.num = 1;
|
c->time_base.num = 1;
|
||||||
c->gop_size = 12; /* emit one intra frame every twelve frames at most */
|
c->gop_size = 12; /* emit one intra frame every twelve frames at most */
|
||||||
c->pix_fmt = STREAM_PIX_FMT;
|
c->pix_fmt = STREAM_PIX_FMT;
|
||||||
if (c->codec_id == CODEC_ID_MPEG2VIDEO) {
|
if (c->codec_id == CODEC_ID_MPEG2VIDEO) {
|
||||||
/* just for testing, we also add B frames */
|
/* just for testing, we also add B frames */
|
||||||
c->max_b_frames = 2;
|
c->max_b_frames = 2;
|
||||||
}
|
}
|
||||||
if (c->codec_id == CODEC_ID_MPEG1VIDEO) {
|
if (c->codec_id == CODEC_ID_MPEG1VIDEO){
|
||||||
/* Needed to avoid using macroblocks in which some coeffs overflow.
|
/* Needed to avoid using macroblocks in which some coeffs overflow.
|
||||||
* This does not happen with normal video, it just happens here as
|
This does not happen with normal video, it just happens here as
|
||||||
* the motion of the chroma plane does not match the luma plane. */
|
the motion of the chroma plane does not match the luma plane. */
|
||||||
c->mb_decision = 2;
|
c->mb_decision=2;
|
||||||
}
|
}
|
||||||
/* Some formats want stream headers to be separate. */
|
// some formats want stream headers to be separate
|
||||||
if (oc->oformat->flags & AVFMT_GLOBALHEADER)
|
if(oc->oformat->flags & AVFMT_GLOBALHEADER)
|
||||||
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
c->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||||
|
|
||||||
return st;
|
return st;
|
||||||
@@ -252,7 +245,7 @@ static AVFrame *alloc_picture(enum PixelFormat pix_fmt, int width, int height)
|
|||||||
picture = avcodec_alloc_frame();
|
picture = avcodec_alloc_frame();
|
||||||
if (!picture)
|
if (!picture)
|
||||||
return NULL;
|
return NULL;
|
||||||
size = avpicture_get_size(pix_fmt, width, height);
|
size = avpicture_get_size(pix_fmt, width, height);
|
||||||
picture_buf = av_malloc(size);
|
picture_buf = av_malloc(size);
|
||||||
if (!picture_buf) {
|
if (!picture_buf) {
|
||||||
av_free(picture);
|
av_free(picture);
|
||||||
@@ -265,38 +258,46 @@ static AVFrame *alloc_picture(enum PixelFormat pix_fmt, int width, int height)
|
|||||||
|
|
||||||
static void open_video(AVFormatContext *oc, AVStream *st)
|
static void open_video(AVFormatContext *oc, AVStream *st)
|
||||||
{
|
{
|
||||||
|
AVCodec *codec;
|
||||||
AVCodecContext *c;
|
AVCodecContext *c;
|
||||||
|
|
||||||
c = st->codec;
|
c = st->codec;
|
||||||
|
|
||||||
|
/* find the video encoder */
|
||||||
|
codec = avcodec_find_encoder(c->codec_id);
|
||||||
|
if (!codec) {
|
||||||
|
fprintf(stderr, "codec not found\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
/* open the codec */
|
/* open the codec */
|
||||||
if (avcodec_open2(c, NULL, NULL) < 0) {
|
if (avcodec_open(c, codec) < 0) {
|
||||||
fprintf(stderr, "could not open codec\n");
|
fprintf(stderr, "could not open codec\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
video_outbuf = NULL;
|
video_outbuf = NULL;
|
||||||
if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
|
if (!(oc->oformat->flags & AVFMT_RAWPICTURE)) {
|
||||||
/* Allocate output buffer. */
|
/* allocate output buffer */
|
||||||
/* XXX: API change will be done. */
|
/* XXX: API change will be done */
|
||||||
/* Buffers passed into lav* can be allocated any way you prefer,
|
/* buffers passed into lav* can be allocated any way you prefer,
|
||||||
* as long as they're aligned enough for the architecture, and
|
as long as they're aligned enough for the architecture, and
|
||||||
* they're freed appropriately (such as using av_free for buffers
|
they're freed appropriately (such as using av_free for buffers
|
||||||
* allocated with av_malloc). */
|
allocated with av_malloc) */
|
||||||
video_outbuf_size = 200000;
|
video_outbuf_size = 200000;
|
||||||
video_outbuf = av_malloc(video_outbuf_size);
|
video_outbuf = av_malloc(video_outbuf_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate the encoded raw picture. */
|
/* allocate the encoded raw picture */
|
||||||
picture = alloc_picture(c->pix_fmt, c->width, c->height);
|
picture = alloc_picture(c->pix_fmt, c->width, c->height);
|
||||||
if (!picture) {
|
if (!picture) {
|
||||||
fprintf(stderr, "Could not allocate picture\n");
|
fprintf(stderr, "Could not allocate picture\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the output format is not YUV420P, then a temporary YUV420P
|
/* if the output format is not YUV420P, then a temporary YUV420P
|
||||||
* picture is needed too. It is then converted to the required
|
picture is needed too. It is then converted to the required
|
||||||
* output format. */
|
output format */
|
||||||
tmp_picture = NULL;
|
tmp_picture = NULL;
|
||||||
if (c->pix_fmt != PIX_FMT_YUV420P) {
|
if (c->pix_fmt != PIX_FMT_YUV420P) {
|
||||||
tmp_picture = alloc_picture(PIX_FMT_YUV420P, c->width, c->height);
|
tmp_picture = alloc_picture(PIX_FMT_YUV420P, c->width, c->height);
|
||||||
@@ -307,22 +308,23 @@ static void open_video(AVFormatContext *oc, AVStream *st)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prepare a dummy image. */
|
/* prepare a dummy image */
|
||||||
static void fill_yuv_image(AVFrame *pict, int frame_index,
|
static void fill_yuv_image(AVFrame *pict, int frame_index, int width, int height)
|
||||||
int width, int height)
|
|
||||||
{
|
{
|
||||||
int x, y, i;
|
int x, y, i;
|
||||||
|
|
||||||
i = frame_index;
|
i = frame_index;
|
||||||
|
|
||||||
/* Y */
|
/* Y */
|
||||||
for (y = 0; y < height; y++)
|
for(y=0;y<height;y++) {
|
||||||
for (x = 0; x < width; x++)
|
for(x=0;x<width;x++) {
|
||||||
pict->data[0][y * pict->linesize[0] + x] = x + y + i * 3;
|
pict->data[0][y * pict->linesize[0] + x] = x + y + i * 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Cb and Cr */
|
/* Cb and Cr */
|
||||||
for (y = 0; y < height / 2; y++) {
|
for(y=0;y<height/2;y++) {
|
||||||
for (x = 0; x < width / 2; x++) {
|
for(x=0;x<width/2;x++) {
|
||||||
pict->data[1][y * pict->linesize[1] + x] = 128 + y + i * 2;
|
pict->data[1][y * pict->linesize[1] + x] = 128 + y + i * 2;
|
||||||
pict->data[2][y * pict->linesize[2] + x] = 64 + x + i * 5;
|
pict->data[2][y * pict->linesize[2] + x] = 64 + x + i * 5;
|
||||||
}
|
}
|
||||||
@@ -338,13 +340,13 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
|
|||||||
c = st->codec;
|
c = st->codec;
|
||||||
|
|
||||||
if (frame_count >= STREAM_NB_FRAMES) {
|
if (frame_count >= STREAM_NB_FRAMES) {
|
||||||
/* No more frames to compress. The codec has a latency of a few
|
/* no more frame to compress. The codec has a latency of a few
|
||||||
* frames if using B-frames, so we get the last frames by
|
frames if using B frames, so we get the last frames by
|
||||||
* passing the same picture again. */
|
passing the same picture again */
|
||||||
} else {
|
} else {
|
||||||
if (c->pix_fmt != PIX_FMT_YUV420P) {
|
if (c->pix_fmt != PIX_FMT_YUV420P) {
|
||||||
/* as we only generate a YUV420P picture, we must convert it
|
/* as we only generate a YUV420P picture, we must convert it
|
||||||
* to the codec pixel format if needed */
|
to the codec pixel format if needed */
|
||||||
if (img_convert_ctx == NULL) {
|
if (img_convert_ctx == NULL) {
|
||||||
img_convert_ctx = sws_getContext(c->width, c->height,
|
img_convert_ctx = sws_getContext(c->width, c->height,
|
||||||
PIX_FMT_YUV420P,
|
PIX_FMT_YUV420P,
|
||||||
@@ -352,8 +354,7 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
|
|||||||
c->pix_fmt,
|
c->pix_fmt,
|
||||||
sws_flags, NULL, NULL, NULL);
|
sws_flags, NULL, NULL, NULL);
|
||||||
if (img_convert_ctx == NULL) {
|
if (img_convert_ctx == NULL) {
|
||||||
fprintf(stderr,
|
fprintf(stderr, "Cannot initialize the conversion context\n");
|
||||||
"Cannot initialize the conversion context\n");
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -365,38 +366,36 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (oc->oformat->flags & AVFMT_RAWPICTURE) {
|
if (oc->oformat->flags & AVFMT_RAWPICTURE) {
|
||||||
/* Raw video case - the API will change slightly in the near
|
/* raw video case. The API will change slightly in the near
|
||||||
* future for that. */
|
futur for that */
|
||||||
AVPacket pkt;
|
AVPacket pkt;
|
||||||
av_init_packet(&pkt);
|
av_init_packet(&pkt);
|
||||||
|
|
||||||
pkt.flags |= AV_PKT_FLAG_KEY;
|
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||||
pkt.stream_index = st->index;
|
pkt.stream_index= st->index;
|
||||||
pkt.data = (uint8_t *)picture;
|
pkt.data= (uint8_t *)picture;
|
||||||
pkt.size = sizeof(AVPicture);
|
pkt.size= sizeof(AVPicture);
|
||||||
|
|
||||||
ret = av_interleaved_write_frame(oc, &pkt);
|
ret = av_interleaved_write_frame(oc, &pkt);
|
||||||
} else {
|
} else {
|
||||||
/* encode the image */
|
/* encode the image */
|
||||||
out_size = avcodec_encode_video(c, video_outbuf,
|
out_size = avcodec_encode_video(c, video_outbuf, video_outbuf_size, picture);
|
||||||
video_outbuf_size, picture);
|
/* if zero size, it means the image was buffered */
|
||||||
/* If size is zero, it means the image was buffered. */
|
|
||||||
if (out_size > 0) {
|
if (out_size > 0) {
|
||||||
AVPacket pkt;
|
AVPacket pkt;
|
||||||
av_init_packet(&pkt);
|
av_init_packet(&pkt);
|
||||||
|
|
||||||
if (c->coded_frame->pts != AV_NOPTS_VALUE)
|
if (c->coded_frame->pts != AV_NOPTS_VALUE)
|
||||||
pkt.pts = av_rescale_q(c->coded_frame->pts,
|
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
|
||||||
c->time_base, st->time_base);
|
if(c->coded_frame->key_frame)
|
||||||
if (c->coded_frame->key_frame)
|
|
||||||
pkt.flags |= AV_PKT_FLAG_KEY;
|
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||||
|
pkt.stream_index= st->index;
|
||||||
|
pkt.data= video_outbuf;
|
||||||
|
pkt.size= out_size;
|
||||||
|
|
||||||
pkt.stream_index = st->index;
|
/* write the compressed frame in the media file */
|
||||||
pkt.data = video_outbuf;
|
|
||||||
pkt.size = out_size;
|
|
||||||
|
|
||||||
/* Write the compressed frame to the media file. */
|
|
||||||
ret = av_interleaved_write_frame(oc, &pkt);
|
ret = av_interleaved_write_frame(oc, &pkt);
|
||||||
} else {
|
} else {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@@ -433,7 +432,7 @@ int main(int argc, char **argv)
|
|||||||
double audio_pts, video_pts;
|
double audio_pts, video_pts;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* Initialize libavcodec, and register all codecs and formats. */
|
/* initialize libavcodec, and register all codecs and formats */
|
||||||
av_register_all();
|
av_register_all();
|
||||||
|
|
||||||
if (argc != 2) {
|
if (argc != 2) {
|
||||||
@@ -442,7 +441,7 @@ int main(int argc, char **argv)
|
|||||||
"The output format is automatically guessed according to the file extension.\n"
|
"The output format is automatically guessed according to the file extension.\n"
|
||||||
"Raw images can also be output by using '%%d' in the filename\n"
|
"Raw images can also be output by using '%%d' in the filename\n"
|
||||||
"\n", argv[0]);
|
"\n", argv[0]);
|
||||||
return 1;
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
filename = argv[1];
|
filename = argv[1];
|
||||||
@@ -454,12 +453,12 @@ int main(int argc, char **argv)
|
|||||||
avformat_alloc_output_context2(&oc, NULL, "mpeg", filename);
|
avformat_alloc_output_context2(&oc, NULL, "mpeg", filename);
|
||||||
}
|
}
|
||||||
if (!oc) {
|
if (!oc) {
|
||||||
return 1;
|
exit(1);
|
||||||
}
|
}
|
||||||
fmt = oc->oformat;
|
fmt= oc->oformat;
|
||||||
|
|
||||||
/* Add the audio and video streams using the default format codecs
|
/* add the audio and video streams using the default format codecs
|
||||||
* and initialize the codecs. */
|
and initialize the codecs */
|
||||||
video_st = NULL;
|
video_st = NULL;
|
||||||
audio_st = NULL;
|
audio_st = NULL;
|
||||||
if (fmt->video_codec != CODEC_ID_NONE) {
|
if (fmt->video_codec != CODEC_ID_NONE) {
|
||||||
@@ -469,37 +468,35 @@ int main(int argc, char **argv)
|
|||||||
audio_st = add_audio_stream(oc, fmt->audio_codec);
|
audio_st = add_audio_stream(oc, fmt->audio_codec);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now that all the parameters are set, we can open the audio and
|
av_dump_format(oc, 0, filename, 1);
|
||||||
* video codecs and allocate the necessary encode buffers. */
|
|
||||||
|
/* now that all the parameters are set, we can open the audio and
|
||||||
|
video codecs and allocate the necessary encode buffers */
|
||||||
if (video_st)
|
if (video_st)
|
||||||
open_video(oc, video_st);
|
open_video(oc, video_st);
|
||||||
if (audio_st)
|
if (audio_st)
|
||||||
open_audio(oc, audio_st);
|
open_audio(oc, audio_st);
|
||||||
|
|
||||||
av_dump_format(oc, 0, filename, 1);
|
|
||||||
|
|
||||||
/* open the output file, if needed */
|
/* open the output file, if needed */
|
||||||
if (!(fmt->flags & AVFMT_NOFILE)) {
|
if (!(fmt->flags & AVFMT_NOFILE)) {
|
||||||
if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) {
|
if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) {
|
||||||
fprintf(stderr, "Could not open '%s'\n", filename);
|
fprintf(stderr, "Could not open '%s'\n", filename);
|
||||||
return 1;
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write the stream header, if any. */
|
/* write the stream header, if any */
|
||||||
avformat_write_header(oc, NULL);
|
av_write_header(oc);
|
||||||
|
|
||||||
picture->pts = 0;
|
for(;;) {
|
||||||
for (;;) {
|
/* compute current audio and video time */
|
||||||
/* Compute current audio and video time. */
|
|
||||||
if (audio_st)
|
if (audio_st)
|
||||||
audio_pts = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;
|
audio_pts = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;
|
||||||
else
|
else
|
||||||
audio_pts = 0.0;
|
audio_pts = 0.0;
|
||||||
|
|
||||||
if (video_st)
|
if (video_st)
|
||||||
video_pts = (double)video_st->pts.val * video_st->time_base.num /
|
video_pts = (double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;
|
||||||
video_st->time_base.den;
|
|
||||||
else
|
else
|
||||||
video_pts = 0.0;
|
video_pts = 0.0;
|
||||||
|
|
||||||
@@ -512,31 +509,31 @@ int main(int argc, char **argv)
|
|||||||
write_audio_frame(oc, audio_st);
|
write_audio_frame(oc, audio_st);
|
||||||
} else {
|
} else {
|
||||||
write_video_frame(oc, video_st);
|
write_video_frame(oc, video_st);
|
||||||
picture->pts++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write the trailer, if any. The trailer must be written before you
|
/* write the trailer, if any. the trailer must be written
|
||||||
* close the CodecContexts open when you wrote the header; otherwise
|
* before you close the CodecContexts open when you wrote the
|
||||||
* av_write_trailer() may try to use memory that was freed on
|
* header; otherwise write_trailer may try to use memory that
|
||||||
* av_codec_close(). */
|
* was freed on av_codec_close() */
|
||||||
av_write_trailer(oc);
|
av_write_trailer(oc);
|
||||||
|
|
||||||
/* Close each codec. */
|
/* close each codec */
|
||||||
if (video_st)
|
if (video_st)
|
||||||
close_video(oc, video_st);
|
close_video(oc, video_st);
|
||||||
if (audio_st)
|
if (audio_st)
|
||||||
close_audio(oc, audio_st);
|
close_audio(oc, audio_st);
|
||||||
|
|
||||||
/* Free the streams. */
|
/* free the streams */
|
||||||
for (i = 0; i < oc->nb_streams; i++) {
|
for(i = 0; i < oc->nb_streams; i++) {
|
||||||
av_freep(&oc->streams[i]->codec);
|
av_freep(&oc->streams[i]->codec);
|
||||||
av_freep(&oc->streams[i]);
|
av_freep(&oc->streams[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(fmt->flags & AVFMT_NOFILE))
|
if (!(fmt->flags & AVFMT_NOFILE)) {
|
||||||
/* Close the output file. */
|
/* close the output file */
|
||||||
avio_close(oc->pb);
|
avio_close(oc->pb);
|
||||||
|
}
|
||||||
|
|
||||||
/* free the stream */
|
/* free the stream */
|
||||||
av_free(oc);
|
av_free(oc);
|
||||||
203
doc/faq.texi
203
doc/faq.texi
@@ -11,6 +11,22 @@
|
|||||||
|
|
||||||
@chapter General Questions
|
@chapter General Questions
|
||||||
|
|
||||||
|
@section When will the next FFmpeg version be released? / Why are FFmpeg releases so few and far between?
|
||||||
|
|
||||||
|
Like most open source projects FFmpeg suffers from a certain lack of
|
||||||
|
manpower. For this reason the developers have to prioritize the work
|
||||||
|
they do and putting out releases is not at the top of the list, fixing
|
||||||
|
bugs and reviewing patches takes precedence. Please don't complain or
|
||||||
|
request more timely and/or frequent releases unless you are willing to
|
||||||
|
help out creating them.
|
||||||
|
|
||||||
|
@section I have a problem with an old version of FFmpeg; where should I report it?
|
||||||
|
Nowhere. We do not support old FFmpeg versions in any way, we simply lack
|
||||||
|
the time, motivation and manpower to do so. If you have a problem with an
|
||||||
|
old version of FFmpeg, upgrade to the latest git snapshot. If you
|
||||||
|
still experience the problem, then you can report it according to the
|
||||||
|
guidelines in @url{http://ffmpeg.org/bugreports.html}.
|
||||||
|
|
||||||
@section Why doesn't FFmpeg support feature [xyz]?
|
@section Why doesn't FFmpeg support feature [xyz]?
|
||||||
|
|
||||||
Because no one has taken on that task yet. FFmpeg development is
|
Because no one has taken on that task yet. FFmpeg development is
|
||||||
@@ -24,6 +40,30 @@ No. Windows DLLs are not portable, bloated and often slow.
|
|||||||
Moreover FFmpeg strives to support all codecs natively.
|
Moreover FFmpeg strives to support all codecs natively.
|
||||||
A DLL loader is not conducive to that goal.
|
A DLL loader is not conducive to that goal.
|
||||||
|
|
||||||
|
@section My bug report/mail to ffmpeg-devel/user has not received any replies.
|
||||||
|
|
||||||
|
Likely reasons
|
||||||
|
@itemize
|
||||||
|
@item We are busy and haven't had time yet to read your report or
|
||||||
|
investigate the issue.
|
||||||
|
@item You didn't follow @url{http://ffmpeg.org/bugreports.html}.
|
||||||
|
@item You didn't use git HEAD.
|
||||||
|
@item You reported a segmentation fault without gdb output.
|
||||||
|
@item You describe a problem but not how to reproduce it.
|
||||||
|
@item It's unclear if you use ffmpeg as command line tool or use
|
||||||
|
libav* from another application.
|
||||||
|
@item You speak about a video having problems on playback but
|
||||||
|
not what you use to play it.
|
||||||
|
@item We have no faint clue what you are talking about besides
|
||||||
|
that it is related to FFmpeg.
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
@section Is there a forum for FFmpeg? I do not like mailing lists.
|
||||||
|
|
||||||
|
You may view our mailing lists with a more forum-alike look here:
|
||||||
|
@url{http://dir.gmane.org/gmane.comp.video.ffmpeg.user},
|
||||||
|
but, if you post, please remember that our mailing list rules still apply there.
|
||||||
|
|
||||||
@section I cannot read this file although this format seems to be supported by ffmpeg.
|
@section I cannot read this file although this format seems to be supported by ffmpeg.
|
||||||
|
|
||||||
Even if ffmpeg can read the container format, it may not support all its
|
Even if ffmpeg can read the container format, it may not support all its
|
||||||
@@ -83,8 +123,7 @@ problem and an NP-hard problem...
|
|||||||
|
|
||||||
@section ffmpeg does not work; what is wrong?
|
@section ffmpeg does not work; what is wrong?
|
||||||
|
|
||||||
Try a @code{make distclean} in the ffmpeg source directory before the build.
|
Try a @code{make distclean} in the ffmpeg source directory before the build. If this does not help see
|
||||||
If this does not help see
|
|
||||||
(@url{http://ffmpeg.org/bugreports.html}).
|
(@url{http://ffmpeg.org/bugreports.html}).
|
||||||
|
|
||||||
@section How do I encode single pictures into movies?
|
@section How do I encode single pictures into movies?
|
||||||
@@ -135,15 +174,15 @@ The @file{movie.mpg} used as input will be converted to
|
|||||||
|
|
||||||
Instead of relying on file format self-recognition, you may also use
|
Instead of relying on file format self-recognition, you may also use
|
||||||
@table @option
|
@table @option
|
||||||
@item -c:v ppm
|
@item -vcodec ppm
|
||||||
@item -c:v png
|
@item -vcodec png
|
||||||
@item -c:v mjpeg
|
@item -vcodec mjpeg
|
||||||
@end table
|
@end table
|
||||||
to force the encoding.
|
to force the encoding.
|
||||||
|
|
||||||
Applying that to the previous example:
|
Applying that to the previous example:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i movie.mpg -f image2 -c:v mjpeg menu%d.jpg
|
ffmpeg -i movie.mpg -f image2 -vcodec mjpeg menu%d.jpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Beware that there is no "jpeg" codec. Use "mjpeg" instead.
|
Beware that there is no "jpeg" codec. Use "mjpeg" instead.
|
||||||
@@ -162,21 +201,59 @@ Use @file{-} as file name.
|
|||||||
|
|
||||||
Try '-f image2 test%d.jpg'.
|
Try '-f image2 test%d.jpg'.
|
||||||
|
|
||||||
@section Why can I not change the frame rate?
|
@section Why can I not change the framerate?
|
||||||
|
|
||||||
Some codecs, like MPEG-1/2, only allow a small number of fixed frame rates.
|
Some codecs, like MPEG-1/2, only allow a small number of fixed framerates.
|
||||||
Choose a different codec with the -c:v command line option.
|
Choose a different codec with the -vcodec command line option.
|
||||||
|
|
||||||
@section How do I encode Xvid or DivX video with ffmpeg?
|
@section How do I encode Xvid or DivX video with ffmpeg?
|
||||||
|
|
||||||
Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4
|
Both Xvid and DivX (version 4+) are implementations of the ISO MPEG-4
|
||||||
standard (note that there are many other coding formats that use this
|
standard (note that there are many other coding formats that use this
|
||||||
same standard). Thus, use '-c:v mpeg4' to encode in these formats. The
|
same standard). Thus, use '-vcodec mpeg4' to encode in these formats. The
|
||||||
default fourcc stored in an MPEG-4-coded file will be 'FMP4'. If you want
|
default fourcc stored in an MPEG-4-coded file will be 'FMP4'. If you want
|
||||||
a different fourcc, use the '-vtag' option. E.g., '-vtag xvid' will
|
a different fourcc, use the '-vtag' option. E.g., '-vtag xvid' will
|
||||||
force the fourcc 'xvid' to be stored as the video fourcc rather than the
|
force the fourcc 'xvid' to be stored as the video fourcc rather than the
|
||||||
default.
|
default.
|
||||||
|
|
||||||
|
@section How do I encode videos which play on the iPod?
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
@item needed stuff
|
||||||
|
-acodec libfaac -vcodec mpeg4 width<=320 height<=240
|
||||||
|
@item working stuff
|
||||||
|
mv4, title
|
||||||
|
@item non-working stuff
|
||||||
|
B-frames
|
||||||
|
@item example command line
|
||||||
|
ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 320x180 -metadata title=X output.mp4
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@section How do I encode videos which play on the PSP?
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
@item needed stuff
|
||||||
|
-acodec libfaac -vcodec mpeg4 width*height<=76800 width%16=0 height%16=0 -ar 24000 -r 30000/1001 or 15000/1001 -f psp
|
||||||
|
@item working stuff
|
||||||
|
mv4, title
|
||||||
|
@item non-working stuff
|
||||||
|
B-frames
|
||||||
|
@item example command line
|
||||||
|
ffmpeg -i input -acodec libfaac -ab 128k -vcodec mpeg4 -b 1200k -ar 24000 -mbd 2 -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp output.mp4
|
||||||
|
@item needed stuff for H.264
|
||||||
|
-acodec libfaac -vcodec libx264 width*height<=76800 width%16=0? height%16=0? -ar 48000 -coder 1 -r 30000/1001 or 15000/1001 -f psp
|
||||||
|
@item working stuff for H.264
|
||||||
|
title, loop filter
|
||||||
|
@item non-working stuff for H.264
|
||||||
|
CAVLC
|
||||||
|
@item example command line
|
||||||
|
ffmpeg -i input -acodec libfaac -ab 128k -vcodec libx264 -b 1200k -ar 48000 -mbd 2 -coder 1 -cmp 2 -subcmp 2 -s 368x192 -r 30000/1001 -metadata title=X -f psp -flags loop -trellis 2 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 output.mp4
|
||||||
|
@item higher resolution for newer PSP firmwares, width<=480, height<=272
|
||||||
|
-vcodec libx264 -level 21 -coder 1 -f psp
|
||||||
|
@item example command line
|
||||||
|
ffmpeg -i input -acodec libfaac -ab 128k -ac 2 -ar 48000 -vcodec libx264 -level 21 -b 640k -coder 1 -f psp -flags +loop -trellis 2 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -g 250 -s 480x272 output.mp4
|
||||||
|
@end table
|
||||||
|
|
||||||
@section Which are good parameters for encoding high quality MPEG-4?
|
@section Which are good parameters for encoding high quality MPEG-4?
|
||||||
|
|
||||||
'-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2',
|
'-mbd rd -flags +mv4+aic -trellis 2 -cmp 2 -subcmp 2 -g 300 -pass 1/2',
|
||||||
@@ -208,8 +285,7 @@ Just create an "input.avs" text file with this single line ...
|
|||||||
ffmpeg -i input.avs
|
ffmpeg -i input.avs
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
For ANY other help on Avisynth, please visit the
|
For ANY other help on Avisynth, please visit @url{http://www.avisynth.org/}.
|
||||||
@uref{http://www.avisynth.org/, Avisynth homepage}.
|
|
||||||
|
|
||||||
@section How can I join video files?
|
@section How can I join video files?
|
||||||
|
|
||||||
@@ -222,13 +298,13 @@ equally humble @code{copy} under Windows), and finally transcoding back to your
|
|||||||
format of choice.
|
format of choice.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -i input1.avi -same_quant intermediate1.mpg
|
ffmpeg -i input1.avi -sameq intermediate1.mpg
|
||||||
ffmpeg -i input2.avi -same_quant intermediate2.mpg
|
ffmpeg -i input2.avi -sameq intermediate2.mpg
|
||||||
cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg
|
cat intermediate1.mpg intermediate2.mpg > intermediate_all.mpg
|
||||||
ffmpeg -i intermediate_all.mpg -same_quant output.avi
|
ffmpeg -i intermediate_all.mpg -sameq output.avi
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Notice that you should either use @code{-same_quant} or set a reasonably high
|
Notice that you should either use @code{-sameq} or set a reasonably high
|
||||||
bitrate for your intermediate and output files, if you want to preserve
|
bitrate for your intermediate and output files, if you want to preserve
|
||||||
video quality.
|
video quality.
|
||||||
|
|
||||||
@@ -238,10 +314,10 @@ of named pipes, should your platform support it:
|
|||||||
@example
|
@example
|
||||||
mkfifo intermediate1.mpg
|
mkfifo intermediate1.mpg
|
||||||
mkfifo intermediate2.mpg
|
mkfifo intermediate2.mpg
|
||||||
ffmpeg -i input1.avi -same_quant -y intermediate1.mpg < /dev/null &
|
ffmpeg -i input1.avi -sameq -y intermediate1.mpg < /dev/null &
|
||||||
ffmpeg -i input2.avi -same_quant -y intermediate2.mpg < /dev/null &
|
ffmpeg -i input2.avi -sameq -y intermediate2.mpg < /dev/null &
|
||||||
cat intermediate1.mpg intermediate2.mpg |\
|
cat intermediate1.mpg intermediate2.mpg |\
|
||||||
ffmpeg -f mpeg -i - -same_quant -c:v mpeg4 -acodec libmp3lame output.avi
|
ffmpeg -f mpeg -i - -sameq -vcodec mpeg4 -acodec libmp3lame output.avi
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
|
Similarly, the yuv4mpegpipe format, and the raw video, raw audio codecs also
|
||||||
@@ -268,47 +344,27 @@ cat temp1.a temp2.a > all.a &
|
|||||||
cat temp1.v temp2.v > all.v &
|
cat temp1.v temp2.v > all.v &
|
||||||
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
|
ffmpeg -f u16le -acodec pcm_s16le -ac 2 -ar 44100 -i all.a \
|
||||||
-f yuv4mpegpipe -i all.v \
|
-f yuv4mpegpipe -i all.v \
|
||||||
-same_quant -y output.flv
|
-sameq -y output.flv
|
||||||
rm temp[12].[av] all.[av]
|
rm temp[12].[av] all.[av]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section -profile option fails when encoding H.264 video with AAC audio
|
@section The ffmpeg program does not respect the -maxrate setting, some frames are bigger than maxrate/fps.
|
||||||
|
|
||||||
@command{ffmpeg} prints an error like
|
Read the MPEG spec about video buffer verifier.
|
||||||
|
|
||||||
@example
|
@section I want CBR, but no matter what I do frame sizes differ.
|
||||||
Undefined constant or missing '(' in 'baseline'
|
|
||||||
Unable to parse option value "baseline"
|
|
||||||
Error setting option profile to value baseline.
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Short answer: write @option{-profile:v} instead of @option{-profile}.
|
You do not understand what CBR is, please read the MPEG spec.
|
||||||
|
Read about video buffer verifier and constant bitrate.
|
||||||
|
The one sentence summary is that there is a buffer and the input rate is
|
||||||
|
constant, the output can vary as needed.
|
||||||
|
|
||||||
Long answer: this happens because the @option{-profile} option can apply to both
|
@section How do I check if a stream is CBR?
|
||||||
video and audio. Specifically the AAC encoder also defines some profiles, none
|
|
||||||
of which are named @var{baseline}.
|
|
||||||
|
|
||||||
The solution is to apply the @option{-profile} option to the video stream only
|
To quote the MPEG-2 spec:
|
||||||
by using @url{http://ffmpeg.org/ffmpeg.html#Stream-specifiers-1, Stream specifiers}.
|
"There is no way to tell that a bitstream is constant bitrate without
|
||||||
Appending @code{:v} to it will do exactly that.
|
examining all of the vbv_delay values and making complicated computations."
|
||||||
|
|
||||||
@section Using @option{-f lavfi}, audio becomes mono for no apparent reason.
|
|
||||||
|
|
||||||
Use @option{-dumpgraph -} to find out exactly where the channel layout is
|
|
||||||
lost.
|
|
||||||
|
|
||||||
Most likely, it is through @code{auto-inserted aconvert}. Try to understand
|
|
||||||
why the converting filter was needed at that place.
|
|
||||||
|
|
||||||
Just before the output is a likely place, as @option{-f lavfi} currently
|
|
||||||
only support packed S16.
|
|
||||||
|
|
||||||
Then insert the correct @code{aconvert} explicitly in the filter graph,
|
|
||||||
specifying the exact format.
|
|
||||||
|
|
||||||
@example
|
|
||||||
aconvert=s16:stereo:packed
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@chapter Development
|
@chapter Development
|
||||||
|
|
||||||
@@ -356,12 +412,12 @@ the FFmpeg Windows Help Forum at
|
|||||||
|
|
||||||
No. These tools are too bloated and they complicate the build.
|
No. These tools are too bloated and they complicate the build.
|
||||||
|
|
||||||
@section Why not rewrite FFmpeg in object-oriented C++?
|
@section Why not rewrite ffmpeg in object-oriented C++?
|
||||||
|
|
||||||
FFmpeg is already organized in a highly modular manner and does not need to
|
FFmpeg is already organized in a highly modular manner and does not need to
|
||||||
be rewritten in a formal object language. Further, many of the developers
|
be rewritten in a formal object language. Further, many of the developers
|
||||||
favor straight C; it works for them. For more arguments on this matter,
|
favor straight C; it works for them. For more arguments on this matter,
|
||||||
read @uref{http://www.tux.org/lkml/#s15, "Programming Religion"}.
|
read "Programming Religion" at (@url{http://www.tux.org/lkml/#s15}).
|
||||||
|
|
||||||
@section Why are the ffmpeg programs devoid of debugging symbols?
|
@section Why are the ffmpeg programs devoid of debugging symbols?
|
||||||
|
|
||||||
@@ -372,10 +428,18 @@ you need the debug information, use the *_g versions.
|
|||||||
@section I do not like the LGPL, can I contribute code under the GPL instead?
|
@section I do not like the LGPL, can I contribute code under the GPL instead?
|
||||||
|
|
||||||
Yes, as long as the code is optional and can easily and cleanly be placed
|
Yes, as long as the code is optional and can easily and cleanly be placed
|
||||||
under #if CONFIG_GPL without breaking anything. So, for example, a new codec
|
under #if CONFIG_GPL without breaking anything. So for example a new codec
|
||||||
or filter would be OK under GPL while a bug fix to LGPL code would not.
|
or filter would be OK under GPL while a bug fix to LGPL code would not.
|
||||||
|
|
||||||
@section I'm using FFmpeg from within my C++ application but the linker complains about missing symbols which seem to be available.
|
@section I want to compile xyz.c alone but my compiler produced many errors.
|
||||||
|
|
||||||
|
Common code is in its own files in libav* and is used by the individual
|
||||||
|
codecs. They will not work without the common parts, you have to compile
|
||||||
|
the whole libav*. If you wish, disable some parts with configure switches.
|
||||||
|
You can also try to hack it and remove more, but if you had problems fixing
|
||||||
|
the compilation failure then you are probably not qualified for this.
|
||||||
|
|
||||||
|
@section I'm using libavcodec from within my C++ application but the linker complains about missing symbols which seem to be available.
|
||||||
|
|
||||||
FFmpeg is a pure C project, so to use the libraries within your C++ application
|
FFmpeg is a pure C project, so to use the libraries within your C++ application
|
||||||
you need to explicitly state that you are using a C library. You can do this by
|
you need to explicitly state that you are using a C library. You can do this by
|
||||||
@@ -383,16 +447,19 @@ encompassing your FFmpeg includes using @code{extern "C"}.
|
|||||||
|
|
||||||
See @url{http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3}
|
See @url{http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3}
|
||||||
|
|
||||||
@section I'm using libavutil from within my C++ application but the compiler complains about 'UINT64_C' was not declared in this scope
|
|
||||||
|
|
||||||
FFmpeg is a pure C project using C99 math features, in order to enable C++
|
|
||||||
to use them you have to append -D__STDC_CONSTANT_MACROS to your CXXFLAGS
|
|
||||||
|
|
||||||
@section I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?
|
@section I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?
|
||||||
|
|
||||||
You have to implement a URLProtocol, see @file{libavformat/file.c} in
|
You have to implement a URLProtocol, see @file{libavformat/file.c} in
|
||||||
FFmpeg and @file{libmpdemux/demux_lavf.c} in MPlayer sources.
|
FFmpeg and @file{libmpdemux/demux_lavf.c} in MPlayer sources.
|
||||||
|
|
||||||
|
@section I get "No compatible shell script interpreter found." in MSys.
|
||||||
|
|
||||||
|
The standard MSys bash (2.04) is broken. You need to install 2.05 or later.
|
||||||
|
|
||||||
|
@section I get "./configure: line <xxx>: pr: command not found" in MSys.
|
||||||
|
|
||||||
|
The standard MSys install doesn't come with pr. You need to get it from the coreutils package.
|
||||||
|
|
||||||
@section Where can I find libav* headers for Pascal/Delphi?
|
@section Where can I find libav* headers for Pascal/Delphi?
|
||||||
|
|
||||||
see @url{http://www.iversenit.dk/dev/ffmpeg-headers/}
|
see @url{http://www.iversenit.dk/dev/ffmpeg-headers/}
|
||||||
@@ -407,24 +474,12 @@ Even if peculiar since it is network oriented, RTP is a container like any
|
|||||||
other. You have to @emph{demux} RTP before feeding the payload to libavcodec.
|
other. You have to @emph{demux} RTP before feeding the payload to libavcodec.
|
||||||
In this specific case please look at RFC 4629 to see how it should be done.
|
In this specific case please look at RFC 4629 to see how it should be done.
|
||||||
|
|
||||||
@section AVStream.r_frame_rate is wrong, it is much larger than the frame rate.
|
@section AVStream.r_frame_rate is wrong, it is much larger than the framerate.
|
||||||
|
|
||||||
r_frame_rate is NOT the average frame rate, it is the smallest frame rate
|
r_frame_rate is NOT the average framerate, it is the smallest framerate
|
||||||
that can accurately represent all timestamps. So no, it is not
|
that can accurately represent all timestamps. So no, it is not
|
||||||
wrong if it is larger than the average!
|
wrong if it is larger than the average!
|
||||||
For example, if you have mixed 25 and 30 fps content, then r_frame_rate
|
For example, if you have mixed 25 and 30 fps content, then r_frame_rate
|
||||||
will be 150.
|
will be 150.
|
||||||
|
|
||||||
@section Why is @code{make fate} not running all tests?
|
|
||||||
|
|
||||||
Make sure you have the fate-suite samples and the @code{SAMPLES} Make variable
|
|
||||||
or @code{FATE_SAMPLES} environment variable or the @code{--samples}
|
|
||||||
@command{configure} option is set to the right path.
|
|
||||||
|
|
||||||
@section Why is @code{make fate} not finding the samples?
|
|
||||||
|
|
||||||
Do you happen to have a @code{~} character in the samples path to indicate a
|
|
||||||
home directory? The value is used in ways where the shell cannot expand it,
|
|
||||||
causing FATE to not find files. Just replace @code{~} by the full path.
|
|
||||||
|
|
||||||
@bye
|
@bye
|
||||||
|
|||||||
176
doc/fate.texi
176
doc/fate.texi
@@ -1,176 +0,0 @@
|
|||||||
\input texinfo @c -*- texinfo -*-
|
|
||||||
|
|
||||||
@settitle FATE Automated Testing Environment
|
|
||||||
@titlepage
|
|
||||||
@center @titlefont{FATE Automated Testing Environment}
|
|
||||||
@end titlepage
|
|
||||||
|
|
||||||
@node Top
|
|
||||||
@top
|
|
||||||
|
|
||||||
@contents
|
|
||||||
|
|
||||||
@chapter Introduction
|
|
||||||
|
|
||||||
FATE is an extended regression suite on the client-side and a means
|
|
||||||
for results aggregation and presentation on the server-side.
|
|
||||||
|
|
||||||
The first part of this document explains how you can use FATE from
|
|
||||||
your FFmpeg source directory to test your ffmpeg binary. The second
|
|
||||||
part describes how you can run FATE to submit the results to FFmpeg's
|
|
||||||
FATE server.
|
|
||||||
|
|
||||||
In any way you can have a look at the publicly viewable FATE results
|
|
||||||
by visiting this website:
|
|
||||||
|
|
||||||
@url{http://fate.ffmpeg.org/}
|
|
||||||
|
|
||||||
This is especially recommended for all people contributing source
|
|
||||||
code to FFmpeg, as it can be seen if some test on some platform broke
|
|
||||||
with there recent contribution. This usually happens on the platforms
|
|
||||||
the developers could not test on.
|
|
||||||
|
|
||||||
The second part of this document describes how you can run FATE to
|
|
||||||
submit your results to FFmpeg's FATE server. If you want to submit your
|
|
||||||
results be sure to check that your combination of CPU, OS and compiler
|
|
||||||
is not already listed on the above mentioned website.
|
|
||||||
|
|
||||||
In the third part you can find a comprehensive listing of FATE makefile
|
|
||||||
targets and variables.
|
|
||||||
|
|
||||||
|
|
||||||
@chapter Using FATE from your FFmpeg source directory
|
|
||||||
|
|
||||||
If you want to run FATE on your machine you need to have the samples
|
|
||||||
in place. You can get the samples via the build target fate-rsync.
|
|
||||||
Use this command from the top-level source directory:
|
|
||||||
|
|
||||||
@example
|
|
||||||
make fate-rsync SAMPLES=fate-suite/
|
|
||||||
make fate SAMPLES=fate-suite/
|
|
||||||
@end example
|
|
||||||
|
|
||||||
The above commands set the samples location by passing a makefile
|
|
||||||
variable via command line. It is also possible to set the samples
|
|
||||||
location at source configuration time by invoking configure with
|
|
||||||
`--samples=<path to the samples directory>'. Afterwards you can
|
|
||||||
invoke the makefile targets without setting the SAMPLES makefile
|
|
||||||
variable. This is illustrated by the following commands:
|
|
||||||
|
|
||||||
@example
|
|
||||||
./configure --samples=fate-suite/
|
|
||||||
make fate-rsync
|
|
||||||
make fate
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Yet another way to tell FATE about the location of the sample
|
|
||||||
directory is by making sure the environment variable FATE_SAMPLES
|
|
||||||
contains the path to your samples directory. This can be achieved
|
|
||||||
by e.g. putting that variable in your shell profile or by setting
|
|
||||||
it in your interactive session.
|
|
||||||
|
|
||||||
@example
|
|
||||||
FATE_SAMPLES=fate-suite/ make fate
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@float NOTE
|
|
||||||
Do not put a '~' character in the samples path to indicate a home
|
|
||||||
directory. Because of shell nuances, this will cause FATE to fail.
|
|
||||||
@end float
|
|
||||||
|
|
||||||
|
|
||||||
@chapter Submitting the results to the FFmpeg result aggregation server
|
|
||||||
|
|
||||||
To submit your results to the server you should run fate through the
|
|
||||||
shell script tests/fate.sh from the FFmpeg sources. This script needs
|
|
||||||
to be invoked with a configuration file as its first argument.
|
|
||||||
|
|
||||||
@example
|
|
||||||
tests/fate.sh /path/to/fate_config
|
|
||||||
@end example
|
|
||||||
|
|
||||||
A configuration file template with comments describing the individual
|
|
||||||
configuration variables can be found at @file{tests/fate_config.sh.template}.
|
|
||||||
|
|
||||||
@ifhtml
|
|
||||||
The mentioned configuration template is also available here:
|
|
||||||
@verbatiminclude ../tests/fate_config.sh.template
|
|
||||||
@end ifhtml
|
|
||||||
|
|
||||||
Create a configuration that suits your needs, based on the configuration
|
|
||||||
template. The `slot' configuration variable can be any string that is not
|
|
||||||
yet used, but it is suggested that you name it adhering to the following
|
|
||||||
pattern <arch>-<os>-<compiler>-<compiler version>. The configuration file
|
|
||||||
itself will be sourced in a shell script, therefore all shell features may
|
|
||||||
be used. This enables you to setup the environment as you need it for your
|
|
||||||
build.
|
|
||||||
|
|
||||||
For your first test runs the `fate_recv' variable should be empty or
|
|
||||||
commented out. This will run everything as normal except that it will omit
|
|
||||||
the submission of the results to the server. The following files should be
|
|
||||||
present in $workdir as specified in the configuration file:
|
|
||||||
|
|
||||||
@itemize
|
|
||||||
@item configure.log
|
|
||||||
@item compile.log
|
|
||||||
@item test.log
|
|
||||||
@item report
|
|
||||||
@item version
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
When you have everything working properly you can create an SSH key and
|
|
||||||
send its public part to the FATE server administrator.
|
|
||||||
|
|
||||||
Configure your SSH client to use public key authentication with that key
|
|
||||||
when connecting to the FATE server. Also do not forget to check the identity
|
|
||||||
of the server and to accept its host key. This can usually be achieved by
|
|
||||||
running your SSH client manually and killing it after you accepted the key.
|
|
||||||
The FATE server's fingerprint is:
|
|
||||||
|
|
||||||
b1:31:c8:79:3f:04:1d:f8:f2:23:26:5a:fd:55:fa:92
|
|
||||||
|
|
||||||
The only thing left is to automate the execution of the fate.sh script and
|
|
||||||
the synchronisation of the samples directory.
|
|
||||||
|
|
||||||
|
|
||||||
@chapter FATE makefile targets and variables
|
|
||||||
|
|
||||||
@section Makefile targets
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item fate-rsync
|
|
||||||
Download/synchronize sample files to the configured samples directory.
|
|
||||||
|
|
||||||
@item fate-list
|
|
||||||
Will list all fate/regression test targets.
|
|
||||||
|
|
||||||
@item fate
|
|
||||||
Run the FATE test suite (requires the fate-suite dataset).
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section Makefile variables
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item V
|
|
||||||
Verbosity level, can be set to 0, 1 or 2.
|
|
||||||
@itemize
|
|
||||||
@item 0: show just the test arguments
|
|
||||||
@item 1: show just the command used in the test
|
|
||||||
@item 2: show everything
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@item SAMPLES
|
|
||||||
Specify or override the path to the FATE samples at make time, it has a
|
|
||||||
meaning only while running the regression tests.
|
|
||||||
|
|
||||||
@item THREADS
|
|
||||||
Specify how many threads to use while running regression tests, it is
|
|
||||||
quite useful to detect thread-related regressions.
|
|
||||||
@item CPUFLAGS
|
|
||||||
Specify CPU flags.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Example:
|
|
||||||
@example
|
|
||||||
make V=1 SAMPLES=/var/fate/samples THREADS=2 CPUFLAGS=mmx fate
|
|
||||||
@end example
|
|
||||||
45
doc/fate.txt
Normal file
45
doc/fate.txt
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
FATE Automated Testing Environment
|
||||||
|
|
||||||
|
FATE provides a regression testsuite that can be run locally or configured
|
||||||
|
to send reports to fate.ffmpeg.org.
|
||||||
|
In order to run, it needs a large amount of data (samples and references)
|
||||||
|
that is provided separately from the actual source distribution.
|
||||||
|
|
||||||
|
Use the following command to get the fate test samples
|
||||||
|
|
||||||
|
# make fate-rsync SAMPLES=fate-suite/
|
||||||
|
|
||||||
|
To inform the build system about the testsuite location, pass
|
||||||
|
`--samples=<path to the samples>` to configure or set the SAMPLES Make
|
||||||
|
variable or the FATE_SAMPLES environment variable to a suitable value.
|
||||||
|
|
||||||
|
For information on how to set up FATE to send results to the official FFmpeg
|
||||||
|
testing framework, please refer to the following wiki page:
|
||||||
|
http://wiki.multimedia.cx/index.php?title=FATE
|
||||||
|
|
||||||
|
FATE Makefile targets:
|
||||||
|
|
||||||
|
fate-list
|
||||||
|
Will list all fate/regression test targets.
|
||||||
|
|
||||||
|
fate
|
||||||
|
Run the FATE test suite (requires the fate-suite dataset).
|
||||||
|
|
||||||
|
Fate Makefile variables:
|
||||||
|
|
||||||
|
V
|
||||||
|
Verbosity level, can be set to 0, 1 or 2.
|
||||||
|
* 0: show just the test arguments
|
||||||
|
* 1: show just the command used in the test
|
||||||
|
* 2: show everything
|
||||||
|
|
||||||
|
SAMPLES
|
||||||
|
Specify or override the path to the FATE samples at make time, it has a
|
||||||
|
meaning only while running the regression tests.
|
||||||
|
|
||||||
|
THREADS
|
||||||
|
Specify how many threads to use while running regression tests, it is
|
||||||
|
quite useful to detect thread-related regressions.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
make V=1 SAMPLES=/var/fate/samples THREADS=2 fate
|
||||||
4561
doc/ffmpeg-mt-authorship.txt
Normal file
4561
doc/ffmpeg-mt-authorship.txt
Normal file
File diff suppressed because it is too large
Load Diff
1072
doc/ffmpeg.texi
1072
doc/ffmpeg.texi
File diff suppressed because it is too large
Load Diff
@@ -1,47 +0,0 @@
|
|||||||
:
|
|
||||||
ffmpeg.c : libav*
|
|
||||||
======== : ======
|
|
||||||
:
|
|
||||||
:
|
|
||||||
--------------------------------:---> AVStream...
|
|
||||||
InputStream input_streams[] / :
|
|
||||||
/ :
|
|
||||||
InputFile input_files[] +==========================+ / ^ :
|
|
||||||
------> 0 | : st ---:-----------:--/ : :
|
|
||||||
^ +------+-----------+-----+ / +--------------------------+ : :
|
|
||||||
: | :ist_index--:-----:---------/ 1 | : st : | : :
|
|
||||||
: +------+-----------+-----+ +==========================+ : :
|
|
||||||
nb_input_files : | :ist_index--:-----:------------------> 2 | : st : | : :
|
|
||||||
: +------+-----------+-----+ +--------------------------+ : nb_input_streams :
|
|
||||||
: | :ist_index : | 3 | ... | : :
|
|
||||||
v +------+-----------+-----+ +--------------------------+ : :
|
|
||||||
--> 4 | | : :
|
|
||||||
| +--------------------------+ : :
|
|
||||||
| 5 | | : :
|
|
||||||
| +==========================+ v :
|
|
||||||
| :
|
|
||||||
| :
|
|
||||||
| :
|
|
||||||
| :
|
|
||||||
--------- --------------------------------:---> AVStream...
|
|
||||||
\ / :
|
|
||||||
OutputStream output_streams[] / :
|
|
||||||
\ / :
|
|
||||||
+======\======================/======+ ^ :
|
|
||||||
------> 0 | : source_index : st-:--- | : :
|
|
||||||
OutputFile output_files[] / +------------------------------------+ : :
|
|
||||||
/ 1 | : : : | : :
|
|
||||||
^ +------+------------+-----+ / +------------------------------------+ : :
|
|
||||||
: | : ost_index -:-----:------/ 2 | : : : | : :
|
|
||||||
nb_output_files : +------+------------+-----+ +====================================+ : :
|
|
||||||
: | : ost_index -:-----|-----------------> 3 | : : : | : :
|
|
||||||
: +------+------------+-----+ +------------------------------------+ : nb_output_streams :
|
|
||||||
: | : : | 4 | | : :
|
|
||||||
: +------+------------+-----+ +------------------------------------+ : :
|
|
||||||
: | : : | 5 | | : :
|
|
||||||
v +------+------------+-----+ +------------------------------------+ : :
|
|
||||||
6 | | : :
|
|
||||||
+------------------------------------+ : :
|
|
||||||
7 | | : :
|
|
||||||
+====================================+ v :
|
|
||||||
:
|
|
||||||
@@ -28,7 +28,7 @@ various FFmpeg APIs.
|
|||||||
@chapter Options
|
@chapter Options
|
||||||
@c man begin OPTIONS
|
@c man begin OPTIONS
|
||||||
|
|
||||||
@include avtools-common-opts.texi
|
@include fftools-common-opts.texi
|
||||||
|
|
||||||
@section Main options
|
@section Main options
|
||||||
|
|
||||||
@@ -38,9 +38,8 @@ Force displayed width.
|
|||||||
@item -y @var{height}
|
@item -y @var{height}
|
||||||
Force displayed height.
|
Force displayed height.
|
||||||
@item -s @var{size}
|
@item -s @var{size}
|
||||||
Set frame size (WxH or abbreviation), needed for videos which do
|
Set frame size (WxH or abbreviation), needed for videos which don't
|
||||||
not contain a header with the frame size like raw YUV. This option
|
contain a header with the frame size like raw YUV.
|
||||||
has been deprecated in favor of private options, try -video_size.
|
|
||||||
@item -an
|
@item -an
|
||||||
Disable audio.
|
Disable audio.
|
||||||
@item -vn
|
@item -vn
|
||||||
@@ -91,7 +90,6 @@ Read @var{input_file}.
|
|||||||
@table @option
|
@table @option
|
||||||
@item -pix_fmt @var{format}
|
@item -pix_fmt @var{format}
|
||||||
Set pixel format.
|
Set pixel format.
|
||||||
This option has been deprecated in favor of private options, try -pixel_format.
|
|
||||||
@item -stats
|
@item -stats
|
||||||
Show the stream duration, the codec parameters, the current position in
|
Show the stream duration, the codec parameters, the current position in
|
||||||
the stream and the audio/video synchronisation drift.
|
the stream and the audio/video synchronisation drift.
|
||||||
@@ -134,8 +132,6 @@ Exit when video is done playing.
|
|||||||
Exit if any key is pressed.
|
Exit if any key is pressed.
|
||||||
@item -exitonmousedown
|
@item -exitonmousedown
|
||||||
Exit if any mouse button is pressed.
|
Exit if any mouse button is pressed.
|
||||||
@item -codec:@var{stream_type}
|
|
||||||
Force a specific decoder implementation
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section While playing
|
@section While playing
|
||||||
@@ -168,9 +164,6 @@ Seek backward/forward 10 seconds.
|
|||||||
@item down/up
|
@item down/up
|
||||||
Seek backward/forward 1 minute.
|
Seek backward/forward 1 minute.
|
||||||
|
|
||||||
@item page down/page up
|
|
||||||
Seek backward/forward 10 minutes.
|
|
||||||
|
|
||||||
@item mouse click
|
@item mouse click
|
||||||
Seek to percentage in file corresponding to fraction of width.
|
Seek to percentage in file corresponding to fraction of width.
|
||||||
|
|
||||||
@@ -178,7 +171,6 @@ Seek to percentage in file corresponding to fraction of width.
|
|||||||
|
|
||||||
@c man end
|
@c man end
|
||||||
|
|
||||||
@include syntax.texi
|
|
||||||
@include eval.texi
|
@include eval.texi
|
||||||
@include decoders.texi
|
@include decoders.texi
|
||||||
@include demuxers.texi
|
@include demuxers.texi
|
||||||
|
|||||||
257
doc/ffprobe.texi
257
doc/ffprobe.texi
@@ -42,18 +42,25 @@ for specifying which information to display, and for setting how
|
|||||||
ffprobe will show it.
|
ffprobe will show it.
|
||||||
|
|
||||||
ffprobe output is designed to be easily parsable by a textual filter,
|
ffprobe output is designed to be easily parsable by a textual filter,
|
||||||
and consists of one or more sections of a form defined by the selected
|
and consists of one or more sections of the form:
|
||||||
writer, which is specified by the @option{print_format} option.
|
@example
|
||||||
|
[SECTION]
|
||||||
|
key1=val1
|
||||||
|
...
|
||||||
|
keyN=valN
|
||||||
|
[/SECTION]
|
||||||
|
@end example
|
||||||
|
|
||||||
Metadata tags stored in the container or in the streams are recognized
|
Metadata tags stored in the container or in the streams are recognized
|
||||||
and printed in the corresponding "FORMAT" or "STREAM" section.
|
and printed in the corresponding "FORMAT" or "STREAM" section, and
|
||||||
|
are prefixed by the string "TAG:".
|
||||||
|
|
||||||
@c man end
|
@c man end
|
||||||
|
|
||||||
@chapter Options
|
@chapter Options
|
||||||
@c man begin OPTIONS
|
@c man begin OPTIONS
|
||||||
|
|
||||||
@include avtools-common-opts.texi
|
@include fftools-common-opts.texi
|
||||||
|
|
||||||
@section Main options
|
@section Main options
|
||||||
|
|
||||||
@@ -80,25 +87,6 @@ Use sexagesimal format HH:MM:SS.MICROSECONDS for time values.
|
|||||||
Prettify the format of the displayed values, it corresponds to the
|
Prettify the format of the displayed values, it corresponds to the
|
||||||
options "-unit -prefix -byte_binary_prefix -sexagesimal".
|
options "-unit -prefix -byte_binary_prefix -sexagesimal".
|
||||||
|
|
||||||
@item -print_format @var{writer_name}[=@var{writer_options}]
|
|
||||||
Set the output printing format.
|
|
||||||
|
|
||||||
@var{writer_name} specifies the name of the writer, and
|
|
||||||
@var{writer_options} specifies the options to be passed to the writer.
|
|
||||||
|
|
||||||
For example for printing the output in JSON format, specify:
|
|
||||||
@example
|
|
||||||
-print_format json
|
|
||||||
@end example
|
|
||||||
|
|
||||||
For more details on the available output printing formats, see the
|
|
||||||
Writers section below.
|
|
||||||
|
|
||||||
@item -show_error
|
|
||||||
Show information about the error found when trying to probe the input.
|
|
||||||
|
|
||||||
The error information is printed within a section with name "ERROR".
|
|
||||||
|
|
||||||
@item -show_format
|
@item -show_format
|
||||||
Show information about the container format of the input multimedia
|
Show information about the container format of the input multimedia
|
||||||
stream.
|
stream.
|
||||||
@@ -106,11 +94,6 @@ stream.
|
|||||||
All the container format information is printed within a section with
|
All the container format information is printed within a section with
|
||||||
name "FORMAT".
|
name "FORMAT".
|
||||||
|
|
||||||
@item -show_format_entry @var{name}
|
|
||||||
Like @option{-show_format}, but only prints the specified entry of the
|
|
||||||
container format information, rather than all. This option may be given more
|
|
||||||
than once, then all specified entries will be shown.
|
|
||||||
|
|
||||||
@item -show_packets
|
@item -show_packets
|
||||||
Show information about each packet contained in the input multimedia
|
Show information about each packet contained in the input multimedia
|
||||||
stream.
|
stream.
|
||||||
@@ -118,13 +101,6 @@ stream.
|
|||||||
The information for each single packet is printed within a dedicated
|
The information for each single packet is printed within a dedicated
|
||||||
section with name "PACKET".
|
section with name "PACKET".
|
||||||
|
|
||||||
@item -show_frames
|
|
||||||
Show information about each frame contained in the input multimedia
|
|
||||||
stream.
|
|
||||||
|
|
||||||
The information for each single frame is printed within a dedicated
|
|
||||||
section with name "FRAME".
|
|
||||||
|
|
||||||
@item -show_streams
|
@item -show_streams
|
||||||
Show information about each media stream contained in the input
|
Show information about each media stream contained in the input
|
||||||
multimedia stream.
|
multimedia stream.
|
||||||
@@ -132,223 +108,12 @@ multimedia stream.
|
|||||||
Each media stream information is printed within a dedicated section
|
Each media stream information is printed within a dedicated section
|
||||||
with name "STREAM".
|
with name "STREAM".
|
||||||
|
|
||||||
@item -count_frames
|
|
||||||
Count the number of frames per stream and report it in the
|
|
||||||
corresponding stream section.
|
|
||||||
|
|
||||||
@item -count_packets
|
|
||||||
Count the number of packets per stream and report it in the
|
|
||||||
corresponding stream section.
|
|
||||||
|
|
||||||
@item -show_private_data, -private
|
|
||||||
Show private data, that is data depending on the format of the
|
|
||||||
particular shown element.
|
|
||||||
This option is enabled by default, but you may need to disable it
|
|
||||||
for specific uses, for example when creating XSD-compliant XML output.
|
|
||||||
|
|
||||||
@item -show_program_version
|
|
||||||
Show information related to program version.
|
|
||||||
|
|
||||||
Version information is printed within a section with name
|
|
||||||
"PROGRAM_VERSION".
|
|
||||||
|
|
||||||
@item -show_library_versions
|
|
||||||
Show information related to library versions.
|
|
||||||
|
|
||||||
Version information for each library is printed within a section with
|
|
||||||
name "LIBRARY_VERSION".
|
|
||||||
|
|
||||||
@item -show_versions
|
|
||||||
Show information related to program and library versions. This is the
|
|
||||||
equivalent of setting both @option{-show_program_version} and
|
|
||||||
@option{-show_library_versions} options.
|
|
||||||
|
|
||||||
@item -i @var{input_file}
|
@item -i @var{input_file}
|
||||||
Read @var{input_file}.
|
Read @var{input_file}.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
@c man end
|
@c man end
|
||||||
|
|
||||||
@chapter Writers
|
|
||||||
@c man begin WRITERS
|
|
||||||
|
|
||||||
A writer defines the output format adopted by @command{ffprobe}, and will be
|
|
||||||
used for printing all the parts of the output.
|
|
||||||
|
|
||||||
A writer may accept one or more arguments, which specify the options to
|
|
||||||
adopt.
|
|
||||||
|
|
||||||
A description of the currently available writers follows.
|
|
||||||
|
|
||||||
@section default
|
|
||||||
Default format.
|
|
||||||
|
|
||||||
Print each section in the form:
|
|
||||||
@example
|
|
||||||
[SECTION]
|
|
||||||
key1=val1
|
|
||||||
...
|
|
||||||
keyN=valN
|
|
||||||
[/SECTION]
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Metadata tags are printed as a line in the corresponding FORMAT or
|
|
||||||
STREAM section, and are prefixed by the string "TAG:".
|
|
||||||
|
|
||||||
This writer accepts options as a list of @var{key}=@var{value} pairs,
|
|
||||||
separated by ":".
|
|
||||||
|
|
||||||
A description of the accepted options follows.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item nokey, nk
|
|
||||||
If set to 1 specify not to print the key of each field. Default value
|
|
||||||
is 0.
|
|
||||||
|
|
||||||
@item noprint_wrappers, nw
|
|
||||||
If set to 1 specify not to print the section header and footer.
|
|
||||||
Default value is 0.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section compact
|
|
||||||
Compact format.
|
|
||||||
|
|
||||||
Each section is printed on a single line.
|
|
||||||
If no option is specifid, the output has the form:
|
|
||||||
@example
|
|
||||||
section|key1=val1| ... |keyN=valN
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Metadata tags are printed in the corresponding "format" or "stream"
|
|
||||||
section. A metadata tag key, if printed, is prefixed by the string
|
|
||||||
"tag:".
|
|
||||||
|
|
||||||
This writer accepts options as a list of @var{key}=@var{value} pairs,
|
|
||||||
separated by ":".
|
|
||||||
|
|
||||||
The description of the accepted options follows.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item item_sep, s
|
|
||||||
Specify the character to use for separating fields in the output line.
|
|
||||||
It must be a single printable character, it is "|" by default.
|
|
||||||
|
|
||||||
@item nokey, nk
|
|
||||||
If set to 1 specify not to print the key of each field. Its default
|
|
||||||
value is 0.
|
|
||||||
|
|
||||||
@item escape, e
|
|
||||||
Set the escape mode to use, default to "c".
|
|
||||||
|
|
||||||
It can assume one of the following values:
|
|
||||||
@table @option
|
|
||||||
@item c
|
|
||||||
Perform C-like escaping. Strings containing a newline ('\n') or
|
|
||||||
carriage return ('\r'), the escaping character ('\') or the item
|
|
||||||
separator character @var{SEP} are escaped using C-like fashioned
|
|
||||||
escaping, so that a newline is converted to the sequence "\n", a
|
|
||||||
carriage return to "\r", '\' to "\\" and the separator @var{SEP} is
|
|
||||||
converted to "\@var{SEP}".
|
|
||||||
|
|
||||||
@item csv
|
|
||||||
Perform CSV-like escaping, as described in RFC4180. Strings
|
|
||||||
containing a newline ('\n'), a carriage return ('\r'), a double quote
|
|
||||||
('"'), or @var{SEP} are enclosed in double-quotes.
|
|
||||||
|
|
||||||
@item none
|
|
||||||
Perform no escaping.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section csv
|
|
||||||
CSV format.
|
|
||||||
|
|
||||||
This writer is equivalent to
|
|
||||||
@code{compact=item_sep=,:nokey=1:escape=csv}.
|
|
||||||
|
|
||||||
@section json
|
|
||||||
JSON based format.
|
|
||||||
|
|
||||||
Each section is printed using JSON notation.
|
|
||||||
|
|
||||||
This writer accepts options as a list of @var{key}=@var{value} pairs,
|
|
||||||
separated by ":".
|
|
||||||
|
|
||||||
The description of the accepted options follows.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item compact, c
|
|
||||||
If set to 1 enable compact output, that is each section will be
|
|
||||||
printed on a single line. Default value is 0.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
For more information about JSON, see @url{http://www.json.org/}.
|
|
||||||
|
|
||||||
@section xml
|
|
||||||
XML based format.
|
|
||||||
|
|
||||||
The XML output is described in the XML schema description file
|
|
||||||
@file{ffprobe.xsd} installed in the FFmpeg datadir.
|
|
||||||
|
|
||||||
An updated version of the schema can be retrieved at the url
|
|
||||||
@url{http://www.ffmpeg.org/schema/ffprobe.xsd}, which redirects to the
|
|
||||||
latest schema committed into the FFmpeg development source code tree.
|
|
||||||
|
|
||||||
Note that the output issued will be compliant to the
|
|
||||||
@file{ffprobe.xsd} schema only when no special global output options
|
|
||||||
(@option{unit}, @option{prefix}, @option{byte_binary_prefix},
|
|
||||||
@option{sexagesimal} etc.) are specified.
|
|
||||||
|
|
||||||
This writer accepts options as a list of @var{key}=@var{value} pairs,
|
|
||||||
separated by ":".
|
|
||||||
|
|
||||||
The description of the accepted options follows.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item fully_qualified, q
|
|
||||||
If set to 1 specify if the output should be fully qualified. Default
|
|
||||||
value is 0.
|
|
||||||
This is required for generating an XML file which can be validated
|
|
||||||
through an XSD file.
|
|
||||||
|
|
||||||
@item xsd_compliant, x
|
|
||||||
If set to 1 perform more checks for ensuring that the output is XSD
|
|
||||||
compliant. Default value is 0.
|
|
||||||
This option automatically sets @option{fully_qualified} to 1.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
For more information about the XML format, see
|
|
||||||
@url{http://www.w3.org/XML/}.
|
|
||||||
@c man end WRITERS
|
|
||||||
|
|
||||||
@chapter Timecode
|
|
||||||
@c man begin TIMECODE
|
|
||||||
|
|
||||||
@command{ffprobe} supports Timecode extraction:
|
|
||||||
|
|
||||||
@itemize
|
|
||||||
|
|
||||||
@item
|
|
||||||
MPEG1/2 timecode is extracted from the GOP, and is available in the video
|
|
||||||
stream details (@option{-show_streams}, see @var{timecode}).
|
|
||||||
|
|
||||||
@item
|
|
||||||
MOV timecode is extracted from tmcd track, so is available in the tmcd
|
|
||||||
stream metadata (@option{-show_streams}, see @var{TAG:timecode}).
|
|
||||||
|
|
||||||
@item
|
|
||||||
DV and GXF timecodes are available in format metadata
|
|
||||||
(@option{-show_format}, see @var{TAG:timecode}).
|
|
||||||
|
|
||||||
@end itemize
|
|
||||||
@c man end TIMECODE
|
|
||||||
|
|
||||||
@include syntax.texi
|
|
||||||
@include decoders.texi
|
@include decoders.texi
|
||||||
@include demuxers.texi
|
@include demuxers.texi
|
||||||
@include protocols.texi
|
@include protocols.texi
|
||||||
|
|||||||
167
doc/ffprobe.xsd
167
doc/ffprobe.xsd
@@ -1,167 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
|
||||||
targetNamespace="http://www.ffmpeg.org/schema/ffprobe"
|
|
||||||
xmlns:ffprobe="http://www.ffmpeg.org/schema/ffprobe">
|
|
||||||
|
|
||||||
<xsd:element name="ffprobe" type="ffprobe:ffprobeType"/>
|
|
||||||
|
|
||||||
<xsd:complexType name="ffprobeType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="packets" type="ffprobe:packetsType" minOccurs="0" maxOccurs="1" />
|
|
||||||
<xsd:element name="frames" type="ffprobe:framesType" minOccurs="0" maxOccurs="1" />
|
|
||||||
<xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1" />
|
|
||||||
<xsd:element name="format" type="ffprobe:formatType" minOccurs="0" maxOccurs="1" />
|
|
||||||
<xsd:element name="error" type="ffprobe:errorType" minOccurs="0" maxOccurs="1" />
|
|
||||||
<xsd:element name="program_version" type="ffprobe:programVersionType" minOccurs="0" maxOccurs="1" />
|
|
||||||
<xsd:element name="library_versions" type="ffprobe:libraryVersionsType" minOccurs="0" maxOccurs="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="packetsType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="packet" type="ffprobe:packetType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="framesType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="frame" type="ffprobe:frameType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="packetType">
|
|
||||||
<xsd:attribute name="codec_type" type="xsd:string" use="required" />
|
|
||||||
<xsd:attribute name="stream_index" type="xsd:int" use="required" />
|
|
||||||
<xsd:attribute name="pts" type="xsd:long" />
|
|
||||||
<xsd:attribute name="pts_time" type="xsd:float" />
|
|
||||||
<xsd:attribute name="dts" type="xsd:long" />
|
|
||||||
<xsd:attribute name="dts_time" type="xsd:float" />
|
|
||||||
<xsd:attribute name="duration" type="xsd:long" />
|
|
||||||
<xsd:attribute name="duration_time" type="xsd:float" />
|
|
||||||
<xsd:attribute name="size" type="xsd:long" use="required" />
|
|
||||||
<xsd:attribute name="pos" type="xsd:long" />
|
|
||||||
<xsd:attribute name="flags" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="frameType">
|
|
||||||
<xsd:attribute name="media_type" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="key_frame" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="pts" type="xsd:long" />
|
|
||||||
<xsd:attribute name="pts_time" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="pkt_pts" type="xsd:long" />
|
|
||||||
<xsd:attribute name="pkt_pts_time" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="pkt_dts" type="xsd:long" />
|
|
||||||
<xsd:attribute name="pkt_dts_time" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="pkt_pos" type="xsd:long" />
|
|
||||||
|
|
||||||
<!-- audio attributes -->
|
|
||||||
<xsd:attribute name="sample_fmt" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="nb_samples" type="xsd:long" />
|
|
||||||
|
|
||||||
<!-- video attributes -->
|
|
||||||
<xsd:attribute name="width" type="xsd:long" />
|
|
||||||
<xsd:attribute name="height" type="xsd:long" />
|
|
||||||
<xsd:attribute name="pix_fmt" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="sample_aspect_ratio" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="pict_type" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="coded_picture_number" type="xsd:long" />
|
|
||||||
<xsd:attribute name="display_picture_number" type="xsd:long" />
|
|
||||||
<xsd:attribute name="interlaced_frame" type="xsd:int" />
|
|
||||||
<xsd:attribute name="top_field_first" type="xsd:int" />
|
|
||||||
<xsd:attribute name="repeat_pict" type="xsd:int" />
|
|
||||||
<xsd:attribute name="reference" type="xsd:int" />
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="streamsType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="stream" type="ffprobe:streamType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="streamType">
|
|
||||||
<xsd:attribute name="index" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="codec_name" type="xsd:string" />
|
|
||||||
<xsd:attribute name="codec_long_name" type="xsd:string" />
|
|
||||||
<xsd:attribute name="codec_type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="codec_time_base" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="codec_tag" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
|
|
||||||
|
|
||||||
<!-- video attributes -->
|
|
||||||
<xsd:attribute name="width" type="xsd:int"/>
|
|
||||||
<xsd:attribute name="height" type="xsd:int"/>
|
|
||||||
<xsd:attribute name="has_b_frames" type="xsd:int"/>
|
|
||||||
<xsd:attribute name="sample_aspect_ratio" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="display_aspect_ratio" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="pix_fmt" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="level" type="xsd:int"/>
|
|
||||||
<xsd:attribute name="timecode" type="xsd:string"/>
|
|
||||||
|
|
||||||
<!-- audio attributes -->
|
|
||||||
<xsd:attribute name="sample_fmt" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="sample_rate" type="xsd:int"/>
|
|
||||||
<xsd:attribute name="channels" type="xsd:int"/>
|
|
||||||
<xsd:attribute name="bits_per_sample" type="xsd:int"/>
|
|
||||||
|
|
||||||
<xsd:attribute name="id" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="r_frame_rate" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="avg_frame_rate" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="time_base" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="start_time" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="duration" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="bit_rate" type="xsd:int"/>
|
|
||||||
<xsd:attribute name="nb_frames" type="xsd:int"/>
|
|
||||||
<xsd:attribute name="nb_read_frames" type="xsd:int"/>
|
|
||||||
<xsd:attribute name="nb_read_packets" type="xsd:int"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="formatType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
|
|
||||||
<xsd:attribute name="filename" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="nb_streams" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="format_name" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="format_long_name" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="start_time" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="duration" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="size" type="xsd:long"/>
|
|
||||||
<xsd:attribute name="bit_rate" type="xsd:long"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="tagType">
|
|
||||||
<xsd:attribute name="key" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="value" type="xsd:string" use="required"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="errorType">
|
|
||||||
<xsd:attribute name="code" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="string" type="xsd:string" use="required"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="programVersionType">
|
|
||||||
<xsd:attribute name="version" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="copyright" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="build_date" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="build_time" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="compiler_type" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="compiler_version" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="configuration" type="xsd:string" use="required"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="libraryVersionType">
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="major" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="minor" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="micro" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="version" type="xsd:int" use="required"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="libraryVersionsType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="library_version" type="ffprobe:libraryVersionType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:schema>
|
|
||||||
@@ -373,3 +373,5 @@ ACL allow 192.168.0.0 192.168.255.255
|
|||||||
<Redirect index.html>
|
<Redirect index.html>
|
||||||
URL http://www.ffmpeg.org/
|
URL http://www.ffmpeg.org/
|
||||||
</Redirect>
|
</Redirect>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ ffserver [options]
|
|||||||
@c man begin DESCRIPTION
|
@c man begin DESCRIPTION
|
||||||
|
|
||||||
ffserver is a streaming server for both audio and video. It supports
|
ffserver is a streaming server for both audio and video. It supports
|
||||||
|
|
||||||
several live feeds, streaming from files and time shifting on live feeds
|
several live feeds, streaming from files and time shifting on live feeds
|
||||||
(you can seek to positions in the past on each live feed, provided you
|
(you can seek to positions in the past on each live feed, provided you
|
||||||
specify a big enough feed storage in ffserver.conf).
|
specify a big enough feed storage in ffserver.conf).
|
||||||
@@ -35,7 +34,7 @@ file.
|
|||||||
|
|
||||||
This documentation covers only the streaming aspects of ffserver /
|
This documentation covers only the streaming aspects of ffserver /
|
||||||
ffmpeg. All questions about parameters for ffmpeg, codec questions,
|
ffmpeg. All questions about parameters for ffmpeg, codec questions,
|
||||||
etc. are not covered here. Read @file{ffmpeg.html} for more
|
etc. are not covered here. Read @file{ffmpeg-doc.html} for more
|
||||||
information.
|
information.
|
||||||
|
|
||||||
@section How does it work?
|
@section How does it work?
|
||||||
@@ -111,8 +110,8 @@ As a simple test, just run the following two command lines where INPUTFILE
|
|||||||
is some file which you can decode with ffmpeg:
|
is some file which you can decode with ffmpeg:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffserver -f doc/ffserver.conf &
|
./ffserver -f doc/ffserver.conf &
|
||||||
ffmpeg -i INPUTFILE http://localhost:8090/feed1.ffm
|
./ffmpeg -i INPUTFILE http://localhost:8090/feed1.ffm
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
At this point you should be able to go to your Windows machine and fire up
|
At this point you should be able to go to your Windows machine and fire up
|
||||||
@@ -147,7 +146,7 @@ that only captures in stereo and also requires that one channel be flipped.
|
|||||||
If you are one of these people, then export 'AUDIO_FLIP_LEFT=1' before
|
If you are one of these people, then export 'AUDIO_FLIP_LEFT=1' before
|
||||||
starting ffmpeg.
|
starting ffmpeg.
|
||||||
|
|
||||||
@subsection The audio and video lose sync after a while.
|
@subsection The audio and video loose sync after a while.
|
||||||
|
|
||||||
Yes, they do.
|
Yes, they do.
|
||||||
|
|
||||||
@@ -241,7 +240,7 @@ For example: @samp{http://localhost:8080/test.asf?date=2002-07-26T23:05:00}.
|
|||||||
@chapter Options
|
@chapter Options
|
||||||
@c man begin OPTIONS
|
@c man begin OPTIONS
|
||||||
|
|
||||||
@include avtools-common-opts.texi
|
@include fftools-common-opts.texi
|
||||||
|
|
||||||
@section Main options
|
@section Main options
|
||||||
|
|
||||||
@@ -266,7 +265,7 @@ rather than as a daemon.
|
|||||||
|
|
||||||
@c man begin SEEALSO
|
@c man begin SEEALSO
|
||||||
|
|
||||||
ffmpeg(1), ffplay(1), ffprobe(1), the @file{ffserver.conf}
|
ffmpeg(1), ffplay(1), ffprobe(1), the @file{ffmpeg/doc/ffserver.conf}
|
||||||
example and the FFmpeg HTML documentation
|
example and the FFmpeg HTML documentation
|
||||||
@c man end
|
@c man end
|
||||||
|
|
||||||
|
|||||||
93
doc/fftools-common-opts.texi
Normal file
93
doc/fftools-common-opts.texi
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
All the numerical options, if not specified otherwise, accept in input
|
||||||
|
a string representing a number, which may contain one of the
|
||||||
|
International System number postfixes, for example 'K', 'M', 'G'.
|
||||||
|
If 'i' is appended after the postfix, powers of 2 are used instead of
|
||||||
|
powers of 10. The 'B' postfix multiplies the value for 8, and can be
|
||||||
|
appended after another postfix or used alone. This allows using for
|
||||||
|
example 'KB', 'MiB', 'G' and 'B' as postfix.
|
||||||
|
|
||||||
|
Options which do not take arguments are boolean options, and set the
|
||||||
|
corresponding value to true. They can be set to false by prefixing
|
||||||
|
with "no" the option name, for example using "-nofoo" in the
|
||||||
|
commandline will set to false the boolean option with name "foo".
|
||||||
|
|
||||||
|
@section Generic options
|
||||||
|
|
||||||
|
These options are shared amongst the ff* tools.
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
|
||||||
|
@item -L
|
||||||
|
Show license.
|
||||||
|
|
||||||
|
@item -h, -?, -help, --help
|
||||||
|
Show help.
|
||||||
|
|
||||||
|
@item -version
|
||||||
|
Show version.
|
||||||
|
|
||||||
|
@item -formats
|
||||||
|
Show available formats.
|
||||||
|
|
||||||
|
The fields preceding the format names have the following meanings:
|
||||||
|
@table @samp
|
||||||
|
@item D
|
||||||
|
Decoding available
|
||||||
|
@item E
|
||||||
|
Encoding available
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item -codecs
|
||||||
|
Show available codecs.
|
||||||
|
|
||||||
|
The fields preceding the codec names have the following meanings:
|
||||||
|
@table @samp
|
||||||
|
@item D
|
||||||
|
Decoding available
|
||||||
|
@item E
|
||||||
|
Encoding available
|
||||||
|
@item V/A/S
|
||||||
|
Video/audio/subtitle codec
|
||||||
|
@item S
|
||||||
|
Codec supports slices
|
||||||
|
@item D
|
||||||
|
Codec supports direct rendering
|
||||||
|
@item T
|
||||||
|
Codec can handle input truncated at random locations instead of only at frame boundaries
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item -bsfs
|
||||||
|
Show available bitstream filters.
|
||||||
|
|
||||||
|
@item -protocols
|
||||||
|
Show available protocols.
|
||||||
|
|
||||||
|
@item -filters
|
||||||
|
Show available libavfilter filters.
|
||||||
|
|
||||||
|
@item -pix_fmts
|
||||||
|
Show available pixel formats.
|
||||||
|
|
||||||
|
@item -loglevel @var{loglevel}
|
||||||
|
Set the logging level used by the library.
|
||||||
|
@var{loglevel} is a number or a string containing one of the following values:
|
||||||
|
@table @samp
|
||||||
|
@item quiet
|
||||||
|
@item panic
|
||||||
|
@item fatal
|
||||||
|
@item error
|
||||||
|
@item warning
|
||||||
|
@item info
|
||||||
|
@item verbose
|
||||||
|
@item debug
|
||||||
|
@end table
|
||||||
|
|
||||||
|
By default the program logs to stderr, if coloring is supported by the
|
||||||
|
terminal, colors are used to mark errors and warnings. Log coloring
|
||||||
|
can be disabled setting the environment variable
|
||||||
|
@env{FFMPEG_FORCE_NOCOLOR} or @env{NO_COLOR}, or can be forced setting
|
||||||
|
the environment variable @env{FFMPEG_FORCE_COLOR}.
|
||||||
|
The use of the environment variable @env{NO_COLOR} is deprecated and
|
||||||
|
will be dropped in a following FFmpeg version.
|
||||||
|
|
||||||
|
@end table
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
Filter design
|
|
||||||
=============
|
|
||||||
|
|
||||||
This document explains guidelines that should be observed (or ignored with
|
|
||||||
good reason) when writing filters for libavfilter.
|
|
||||||
|
|
||||||
In this document, the word “frame” indicates either a video frame or a group
|
|
||||||
of audio samples, as stored in an AVFilterBuffer structure.
|
|
||||||
|
|
||||||
|
|
||||||
Format negotiation
|
|
||||||
==================
|
|
||||||
|
|
||||||
The query_formats method should set, for each input and each output links,
|
|
||||||
the list supported formats.
|
|
||||||
|
|
||||||
For video links, that means pixel format. For audio links, that means
|
|
||||||
channel layout, and sample format (the sample packing is implied by the
|
|
||||||
sample format).
|
|
||||||
|
|
||||||
The lists are not just lists, they are references to shared objects. When
|
|
||||||
the negotiation mechanism computes the intersection of the formats
|
|
||||||
supported at each ends of a link, all references to both lists are
|
|
||||||
replaced with a reference to the intersection. And when a single format is
|
|
||||||
eventually chosen for a link amongst the remaining list, again, all
|
|
||||||
references to the list are updated.
|
|
||||||
|
|
||||||
That means that if a filter requires that its input and output have the
|
|
||||||
same format amongst a supported list, all it have to do is use a reference
|
|
||||||
to the same list of formats.
|
|
||||||
|
|
||||||
|
|
||||||
Buffer references ownership and permissions
|
|
||||||
===========================================
|
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
||||||
|
|
||||||
Frame scheduling
|
|
||||||
================
|
|
||||||
|
|
||||||
The purpose of these rules is to ensure that frames flow in the filter
|
|
||||||
graph without getting stuck and accumulating somewhere.
|
|
||||||
|
|
||||||
Simple filters that output one frame for each input frame should not have
|
|
||||||
to worry about it.
|
|
||||||
|
|
||||||
start_frame / filter_samples
|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
These methods are called when a frame is pushed to the filter's input.
|
|
||||||
They can be called at any time except in a reentrant way.
|
|
||||||
|
|
||||||
If the input frame is enough to produce output, then the filter should
|
|
||||||
push the output frames on the output link immediately.
|
|
||||||
|
|
||||||
As an exception to the previous rule, if the input frame is enough to
|
|
||||||
produce several output frames, then the filter needs output only at
|
|
||||||
least one per link. The additional frames can be left buffered in the
|
|
||||||
filter; these buffered frames must be flushed immediately if a new input
|
|
||||||
produces new output.
|
|
||||||
|
|
||||||
(Example: framerate-doubling filter: start_frame must (1) flush the
|
|
||||||
second copy of the previous frame, if it is still there, (2) push the
|
|
||||||
first copy of the incoming frame, (3) keep the second copy for later.)
|
|
||||||
|
|
||||||
If the input frame is not enough to produce output, the filter must not
|
|
||||||
call request_frame to get more. It must just process the frame or queue
|
|
||||||
it. The task of requesting more frames is left to the filter's
|
|
||||||
request_frame method or the application.
|
|
||||||
|
|
||||||
If a filter has several inputs, the filter must be ready for frames
|
|
||||||
arriving randomly on any input. Therefore, any filter with several input
|
|
||||||
will most likely require some kind of queuing mechanism. It is perfectly
|
|
||||||
acceptable to have a limited queue and to drop frames when the inputs
|
|
||||||
are too unbalanced.
|
|
||||||
|
|
||||||
request_frame
|
|
||||||
-------------
|
|
||||||
|
|
||||||
This method is called when a frame is wanted on an output.
|
|
||||||
|
|
||||||
For an input, it should directly call start_frame or filter_samples on
|
|
||||||
the corresponding output.
|
|
||||||
|
|
||||||
For a filter, if there are queued frames already ready, one of these
|
|
||||||
frames should be pushed. If not, the filter should request a frame on
|
|
||||||
one of its input, repeatedly until at least one frame has been pushed.
|
|
||||||
|
|
||||||
Return values:
|
|
||||||
if request_frame could produce a frame, it should return 0;
|
|
||||||
if it could not for temporary reasons, it should return AVERROR(EAGAIN);
|
|
||||||
if it could not because there are no more frames, it should return
|
|
||||||
AVERROR_EOF.
|
|
||||||
|
|
||||||
The typical implementation of request_frame for a filter with several
|
|
||||||
inputs will look like that:
|
|
||||||
|
|
||||||
if (frames_queued) {
|
|
||||||
push_one_frame();
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
while (!frame_pushed) {
|
|
||||||
input = input_where_a_frame_is_most_needed();
|
|
||||||
ret = avfilter_request_frame(input);
|
|
||||||
if (ret == AVERROR_EOF) {
|
|
||||||
process_eof_on_input();
|
|
||||||
} else if (ret < 0) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
Note that, except for filters that can have queued frames, request_frame
|
|
||||||
does not push frames: it requests them to its input, and as a reaction,
|
|
||||||
the start_frame / filter_samples method will be called and do the work.
|
|
||||||
2231
doc/filters.texi
2231
doc/filters.texi
File diff suppressed because it is too large
Load Diff
543
doc/general.texi
543
doc/general.texi
@@ -9,93 +9,29 @@
|
|||||||
|
|
||||||
@contents
|
@contents
|
||||||
|
|
||||||
@chapter External libraries
|
@chapter external libraries
|
||||||
|
|
||||||
FFmpeg can be hooked up with a number of external libraries to add support
|
FFmpeg can be hooked up with a number of external libraries to add support
|
||||||
for more formats. None of them are used by default, their use has to be
|
for more formats. None of them are used by default, their use has to be
|
||||||
explicitly requested by passing the appropriate flags to
|
explicitly requested by passing the appropriate flags to @file{./configure}.
|
||||||
@command{./configure}.
|
|
||||||
|
|
||||||
@section OpenJPEG
|
@section OpenCORE AMR
|
||||||
|
|
||||||
FFmpeg can use the OpenJPEG libraries for encoding/decoding J2K videos. Go to
|
|
||||||
@url{http://www.openjpeg.org/} to get the libraries and follow the installation
|
|
||||||
instructions. To enable using OpenJPEG in FFmpeg, pass @code{--enable-libopenjpeg} to
|
|
||||||
@file{./configure}.
|
|
||||||
|
|
||||||
|
|
||||||
@section OpenCORE and VisualOn libraries
|
|
||||||
|
|
||||||
Spun off Google Android sources, OpenCore and VisualOn libraries provide
|
|
||||||
encoders for a number of audio codecs.
|
|
||||||
|
|
||||||
@float NOTE
|
|
||||||
OpenCORE and VisualOn libraries are under the Apache License 2.0
|
|
||||||
(see @url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is
|
|
||||||
incompatible with the LGPL version 2.1 and GPL version 2. You have to
|
|
||||||
upgrade FFmpeg's license to LGPL version 3 (or if you have enabled
|
|
||||||
GPL components, GPL version 3) to use it.
|
|
||||||
@end float
|
|
||||||
|
|
||||||
@subsection OpenCORE AMR
|
|
||||||
|
|
||||||
FFmpeg can make use of the OpenCORE libraries for AMR-NB
|
FFmpeg can make use of the OpenCORE libraries for AMR-NB
|
||||||
decoding/encoding and AMR-WB decoding.
|
decoding/encoding and AMR-WB decoding.
|
||||||
|
|
||||||
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
|
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the instructions for
|
||||||
instructions for installing the libraries.
|
installing the libraries. Then pass @code{--enable-libopencore-amrnb} and/or
|
||||||
Then pass @code{--enable-libopencore-amrnb} and/or
|
@code{--enable-libopencore-amrwb} to configure to enable the libraries.
|
||||||
@code{--enable-libopencore-amrwb} to configure to enable them.
|
|
||||||
|
|
||||||
@subsection VisualOn AAC encoder library
|
Note that OpenCORE is under the Apache License 2.0 (see
|
||||||
|
@url{http://www.apache.org/licenses/LICENSE-2.0} for details), which is
|
||||||
FFmpeg can make use of the VisualOn AACenc library for AAC encoding.
|
incompatible with the LGPL version 2.1 and GPL version 2. You have to
|
||||||
|
upgrade FFmpeg's license to LGPL version 3 (or if you have enabled
|
||||||
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
|
GPL components, GPL version 3) to use it.
|
||||||
instructions for installing the library.
|
|
||||||
Then pass @code{--enable-libvo-aacenc} to configure to enable it.
|
|
||||||
|
|
||||||
@subsection VisualOn AMR-WB encoder library
|
|
||||||
|
|
||||||
FFmpeg can make use of the VisualOn AMR-WBenc library for AMR-WB encoding.
|
|
||||||
|
|
||||||
Go to @url{http://sourceforge.net/projects/opencore-amr/} and follow the
|
|
||||||
instructions for installing the library.
|
|
||||||
Then pass @code{--enable-libvo-amrwbenc} to configure to enable it.
|
|
||||||
|
|
||||||
@section LAME
|
|
||||||
|
|
||||||
FFmpeg can make use of the LAME library for MP3 encoding.
|
|
||||||
|
|
||||||
Go to @url{http://lame.sourceforge.net/} and follow the
|
|
||||||
instructions for installing the library.
|
|
||||||
Then pass @code{--enable-libmp3lame} to configure to enable it.
|
|
||||||
|
|
||||||
@section libvpx
|
|
||||||
|
|
||||||
FFmpeg can make use of the libvpx library for VP8 encoding.
|
|
||||||
|
|
||||||
Go to @url{http://www.webmproject.org/} and follow the instructions for
|
|
||||||
installing the library. Then pass @code{--enable-libvpx} to configure to
|
|
||||||
enable it.
|
|
||||||
|
|
||||||
@section x264
|
|
||||||
|
|
||||||
FFmpeg can make use of the x264 library for H.264 encoding.
|
|
||||||
|
|
||||||
Go to @url{http://www.videolan.org/developers/x264.html} and follow the
|
|
||||||
instructions for installing the library. Then pass @code{--enable-libx264} to
|
|
||||||
configure to enable it.
|
|
||||||
|
|
||||||
@float NOTE
|
|
||||||
x264 is under the GNU Public License Version 2 or later
|
|
||||||
(see @url{http://www.gnu.org/licenses/old-licenses/gpl-2.0.html} for
|
|
||||||
details), you must upgrade FFmpeg's license to GPL in order to use it.
|
|
||||||
@end float
|
|
||||||
|
|
||||||
|
|
||||||
|
@chapter Supported File Formats and Codecs
|
||||||
@chapter Supported File Formats, Codecs or Features
|
|
||||||
|
|
||||||
You can use the @code{-formats} and @code{-codecs} options to have an exhaustive list.
|
You can use the @code{-formats} and @code{-codecs} options to have an exhaustive list.
|
||||||
|
|
||||||
@@ -109,15 +45,12 @@ library:
|
|||||||
@item 4xm @tab @tab X
|
@item 4xm @tab @tab X
|
||||||
@tab 4X Technologies format, used in some games.
|
@tab 4X Technologies format, used in some games.
|
||||||
@item 8088flex TMV @tab @tab X
|
@item 8088flex TMV @tab @tab X
|
||||||
@item ACT Voice @tab @tab X
|
|
||||||
@tab contains G.729 audio
|
|
||||||
@item Adobe Filmstrip @tab X @tab X
|
@item Adobe Filmstrip @tab X @tab X
|
||||||
@item Audio IFF (AIFF) @tab X @tab X
|
@item Audio IFF (AIFF) @tab X @tab X
|
||||||
@item American Laser Games MM @tab @tab X
|
@item American Laser Games MM @tab @tab X
|
||||||
@tab Multimedia format used in games like Mad Dog McCree.
|
@tab Multimedia format used in games like Mad Dog McCree.
|
||||||
@item 3GPP AMR @tab X @tab X
|
@item 3GPP AMR @tab X @tab X
|
||||||
@item Apple HTTP Live Streaming @tab @tab X
|
@item Apple HTTP Live Streaming @tab @tab X
|
||||||
@item Artworx Data Format @tab @tab X
|
|
||||||
@item ASF @tab X @tab X
|
@item ASF @tab X @tab X
|
||||||
@item AVI @tab X @tab X
|
@item AVI @tab X @tab X
|
||||||
@item AVISynth @tab @tab X
|
@item AVISynth @tab @tab X
|
||||||
@@ -127,25 +60,18 @@ library:
|
|||||||
@tab Audio and video format used in some games by Beam Software.
|
@tab Audio and video format used in some games by Beam Software.
|
||||||
@item Bethesda Softworks VID @tab @tab X
|
@item Bethesda Softworks VID @tab @tab X
|
||||||
@tab Used in some games from Bethesda Softworks.
|
@tab Used in some games from Bethesda Softworks.
|
||||||
@item Binary text @tab @tab X
|
|
||||||
@item Bink @tab @tab X
|
@item Bink @tab @tab X
|
||||||
@tab Multimedia format used by many games.
|
@tab Multimedia format used by many games.
|
||||||
@item Bitmap Brothers JV @tab @tab X
|
@item Bitmap Brothers JV @tab @tab X
|
||||||
@tab Used in Z and Z95 games.
|
@tab Used in Z and Z95 games.
|
||||||
@item Brute Force & Ignorance @tab @tab X
|
@item Brute Force & Ignorance @tab @tab X
|
||||||
@tab Used in the game Flash Traffic: City of Angels.
|
@tab Used in the game Flash Traffic: City of Angels.
|
||||||
@item BWF @tab X @tab X
|
|
||||||
@item CRI ADX @tab X @tab X
|
|
||||||
@tab Audio-only format used in console video games.
|
|
||||||
@item Discworld II BMV @tab @tab X
|
|
||||||
@item Interplay C93 @tab @tab X
|
@item Interplay C93 @tab @tab X
|
||||||
@tab Used in the game Cyberia from Interplay.
|
@tab Used in the game Cyberia from Interplay.
|
||||||
@item Delphine Software International CIN @tab @tab X
|
@item Delphine Software International CIN @tab @tab X
|
||||||
@tab Multimedia format used by Delphine Software games.
|
@tab Multimedia format used by Delphine Software games.
|
||||||
@item CD+G @tab @tab X
|
@item CD+G @tab @tab X
|
||||||
@tab Video format used by CD+G karaoke disks
|
@tab Video format used by CD+G karaoke disks
|
||||||
@item Commodore CDXL @tab @tab X
|
|
||||||
@tab Amiga CD video format
|
|
||||||
@item Core Audio Format @tab X @tab X
|
@item Core Audio Format @tab X @tab X
|
||||||
@tab Apple Core Audio Format
|
@tab Apple Core Audio Format
|
||||||
@item CRC testing format @tab X @tab
|
@item CRC testing format @tab X @tab
|
||||||
@@ -175,19 +101,13 @@ library:
|
|||||||
@item framecrc testing format @tab X @tab
|
@item framecrc testing format @tab X @tab
|
||||||
@item FunCom ISS @tab @tab X
|
@item FunCom ISS @tab @tab X
|
||||||
@tab Audio format used in various games from FunCom like The Longest Journey.
|
@tab Audio format used in various games from FunCom like The Longest Journey.
|
||||||
@item G.723.1 @tab X @tab X
|
|
||||||
@item G.729 BIT @tab X @tab X
|
|
||||||
@item G.729 raw @tab @tab X
|
|
||||||
@item GIF Animation @tab X @tab
|
@item GIF Animation @tab X @tab
|
||||||
@item GXF @tab X @tab X
|
@item GXF @tab X @tab X
|
||||||
@tab General eXchange Format SMPTE 360M, used by Thomson Grass Valley
|
@tab General eXchange Format SMPTE 360M, used by Thomson Grass Valley
|
||||||
playout servers.
|
playout servers.
|
||||||
@item iCEDraw File @tab @tab X
|
|
||||||
@item ICO @tab @tab X
|
|
||||||
@tab Microsoft Windows ICO
|
|
||||||
@item id Quake II CIN video @tab @tab X
|
@item id Quake II CIN video @tab @tab X
|
||||||
@item id RoQ @tab X @tab X
|
@item id RoQ @tab X @tab X
|
||||||
@tab Used in Quake III, Jedi Knight 2 and other computer games.
|
@tab Used in Quake III, Jedi Knight 2, other computer games.
|
||||||
@item IEC61937 encapsulation @tab X @tab X
|
@item IEC61937 encapsulation @tab X @tab X
|
||||||
@item IFF @tab @tab X
|
@item IFF @tab @tab X
|
||||||
@tab Interchange File Format
|
@tab Interchange File Format
|
||||||
@@ -197,11 +117,8 @@ library:
|
|||||||
@tab A format generated by IndigoVision 8000 video server.
|
@tab A format generated by IndigoVision 8000 video server.
|
||||||
@item IVF (On2) @tab X @tab X
|
@item IVF (On2) @tab X @tab X
|
||||||
@tab A format used by libvpx
|
@tab A format used by libvpx
|
||||||
@item LATM @tab X @tab X
|
|
||||||
@item LMLM4 @tab @tab X
|
@item LMLM4 @tab @tab X
|
||||||
@tab Used by Linux Media Labs MPEG-4 PCI boards
|
@tab Used by Linux Media Labs MPEG-4 PCI boards
|
||||||
@item LOAS @tab @tab X
|
|
||||||
@tab contains LATM multiplexed AAC audio
|
|
||||||
@item LXF @tab @tab X
|
@item LXF @tab @tab X
|
||||||
@tab VR native stream format, used by Leitch/Harris' video servers.
|
@tab VR native stream format, used by Leitch/Harris' video servers.
|
||||||
@item Matroska @tab X @tab X
|
@item Matroska @tab X @tab X
|
||||||
@@ -211,7 +128,6 @@ library:
|
|||||||
@item MAXIS XA @tab @tab X
|
@item MAXIS XA @tab @tab X
|
||||||
@tab Used in Sim City 3000; file extension .xa.
|
@tab Used in Sim City 3000; file extension .xa.
|
||||||
@item MD Studio @tab @tab X
|
@item MD Studio @tab @tab X
|
||||||
@item Metal Gear Solid: The Twin Snakes @tab @tab X
|
|
||||||
@item Mobotix .mxg @tab @tab X
|
@item Mobotix .mxg @tab @tab X
|
||||||
@item Monkey's Audio @tab @tab X
|
@item Monkey's Audio @tab @tab X
|
||||||
@item Motion Pixels MVI @tab @tab X
|
@item Motion Pixels MVI @tab @tab X
|
||||||
@@ -311,7 +227,6 @@ library:
|
|||||||
@item RTP @tab X @tab X
|
@item RTP @tab X @tab X
|
||||||
@item RTSP @tab X @tab X
|
@item RTSP @tab X @tab X
|
||||||
@item SAP @tab X @tab X
|
@item SAP @tab X @tab X
|
||||||
@item SBG @tab @tab X
|
|
||||||
@item SDP @tab @tab X
|
@item SDP @tab @tab X
|
||||||
@item Sega FILM/CPK @tab @tab X
|
@item Sega FILM/CPK @tab @tab X
|
||||||
@tab Used in many Sega Saturn console games.
|
@tab Used in many Sega Saturn console games.
|
||||||
@@ -321,9 +236,7 @@ library:
|
|||||||
@tab Used in Sierra CD-ROM games.
|
@tab Used in Sierra CD-ROM games.
|
||||||
@item Smacker @tab @tab X
|
@item Smacker @tab @tab X
|
||||||
@tab Multimedia format used by many games.
|
@tab Multimedia format used by many games.
|
||||||
@item SMJPEG @tab X @tab X
|
@item Sony OpenMG (OMA) @tab @tab X
|
||||||
@tab Used in certain Loki game ports.
|
|
||||||
@item Sony OpenMG (OMA) @tab X @tab X
|
|
||||||
@tab Audio format used in Sony Sonic Stage and Sony Vegas.
|
@tab Audio format used in Sony Sonic Stage and Sony Vegas.
|
||||||
@item Sony PlayStation STR @tab @tab X
|
@item Sony PlayStation STR @tab @tab X
|
||||||
@item Sony Wave64 (W64) @tab @tab X
|
@item Sony Wave64 (W64) @tab @tab X
|
||||||
@@ -339,21 +252,17 @@ library:
|
|||||||
@item WAV @tab X @tab X
|
@item WAV @tab X @tab X
|
||||||
@item WavPack @tab @tab X
|
@item WavPack @tab @tab X
|
||||||
@item WebM @tab X @tab X
|
@item WebM @tab X @tab X
|
||||||
@item Windows Televison (WTV) @tab X @tab X
|
@item Windows Televison (WTV) @tab @tab X
|
||||||
@item Wing Commander III movie @tab @tab X
|
@item Wing Commander III movie @tab @tab X
|
||||||
@tab Multimedia format used in Origin's Wing Commander III computer game.
|
@tab Multimedia format used in Origin's Wing Commander III computer game.
|
||||||
@item Westwood Studios audio @tab @tab X
|
@item Westwood Studios audio @tab @tab X
|
||||||
@tab Multimedia format used in Westwood Studios games.
|
@tab Multimedia format used in Westwood Studios games.
|
||||||
@item Westwood Studios VQA @tab @tab X
|
@item Westwood Studios VQA @tab @tab X
|
||||||
@tab Multimedia format used in Westwood Studios games.
|
@tab Multimedia format used in Westwood Studios games.
|
||||||
@item XMV @tab @tab X
|
|
||||||
@tab Microsoft video container used in Xbox games.
|
|
||||||
@item xWMA @tab @tab X
|
@item xWMA @tab @tab X
|
||||||
@tab Microsoft audio container used by XAudio 2.
|
@tab Microsoft audio container used by XAudio 2.
|
||||||
@item eXtended BINary text (XBIN) @tab @tab X
|
|
||||||
@item YUV4MPEG pipe @tab X @tab X
|
@item YUV4MPEG pipe @tab X @tab X
|
||||||
@item Psygnosis YOP @tab @tab X
|
@item Psygnosis YOP @tab @tab X
|
||||||
@item ZeroCodec Lossless Video @tab @tab X
|
|
||||||
@end multitable
|
@end multitable
|
||||||
|
|
||||||
@code{X} means that encoding (resp. decoding) is supported.
|
@code{X} means that encoding (resp. decoding) is supported.
|
||||||
@@ -373,8 +282,6 @@ following image formats are supported:
|
|||||||
@tab Microsoft BMP image
|
@tab Microsoft BMP image
|
||||||
@item DPX @tab X @tab X
|
@item DPX @tab X @tab X
|
||||||
@tab Digital Picture Exchange
|
@tab Digital Picture Exchange
|
||||||
@item EXR @tab @tab X
|
|
||||||
@tab OpenEXR
|
|
||||||
@item JPEG @tab X @tab X
|
@item JPEG @tab X @tab X
|
||||||
@tab Progressive JPEG is not supported.
|
@tab Progressive JPEG is not supported.
|
||||||
@item JPEG 2000 @tab X @tab X
|
@item JPEG 2000 @tab X @tab X
|
||||||
@@ -394,22 +301,19 @@ following image formats are supported:
|
|||||||
@item PIC @tab @tab X
|
@item PIC @tab @tab X
|
||||||
@tab Pictor/PC Paint
|
@tab Pictor/PC Paint
|
||||||
@item PNG @tab X @tab X
|
@item PNG @tab X @tab X
|
||||||
|
@tab 2/4 bpp not supported yet
|
||||||
@item PPM @tab X @tab X
|
@item PPM @tab X @tab X
|
||||||
@tab Portable PixelMap image
|
@tab Portable PixelMap image
|
||||||
@item PTX @tab @tab X
|
@item PTX @tab @tab X
|
||||||
@tab V.Flash PTX format
|
@tab V.Flash PTX format
|
||||||
@item SGI @tab X @tab X
|
@item SGI @tab X @tab X
|
||||||
@tab SGI RGB image format
|
@tab SGI RGB image format
|
||||||
@item Sun Rasterfile @tab X @tab X
|
@item Sun Rasterfile @tab @tab X
|
||||||
@tab Sun RAS image format
|
@tab Sun RAS image format
|
||||||
@item TIFF @tab X @tab X
|
@item TIFF @tab X @tab X
|
||||||
@tab YUV, JPEG and some extension is not supported yet.
|
@tab YUV, JPEG and some extension is not supported yet.
|
||||||
@item Truevision Targa @tab X @tab X
|
@item Truevision Targa @tab X @tab X
|
||||||
@tab Targa (.TGA) image format
|
@tab Targa (.TGA) image format
|
||||||
@item XBM @tab X @tab X
|
|
||||||
@tab X BitMap image format
|
|
||||||
@item XWD @tab X @tab X
|
|
||||||
@tab X Window Dump image format
|
|
||||||
@end multitable
|
@end multitable
|
||||||
|
|
||||||
@code{X} means that encoding (resp. decoding) is supported.
|
@code{X} means that encoding (resp. decoding) is supported.
|
||||||
@@ -429,11 +333,10 @@ following image formats are supported:
|
|||||||
@tab Creates video suitable to be played on a commodore 64 (multicolor mode).
|
@tab Creates video suitable to be played on a commodore 64 (multicolor mode).
|
||||||
@item American Laser Games MM @tab @tab X
|
@item American Laser Games MM @tab @tab X
|
||||||
@tab Used in games like Mad Dog McCree.
|
@tab Used in games like Mad Dog McCree.
|
||||||
@item AMV Video @tab X @tab X
|
@item AMV Video @tab @tab X
|
||||||
@tab Used in Chinese MP3 players.
|
@tab Used in Chinese MP3 players.
|
||||||
@item ANSI/ASCII art @tab @tab X
|
@item ANSI/ASCII art @tab @tab X
|
||||||
@item Apple MJPEG-B @tab @tab X
|
@item Apple MJPEG-B @tab @tab X
|
||||||
@item Apple ProRes @tab X @tab X
|
|
||||||
@item Apple QuickDraw @tab @tab X
|
@item Apple QuickDraw @tab @tab X
|
||||||
@tab fourcc: qdrw
|
@tab fourcc: qdrw
|
||||||
@item Asus v1 @tab X @tab X
|
@item Asus v1 @tab X @tab X
|
||||||
@@ -449,18 +352,13 @@ following image formats are supported:
|
|||||||
@item Autodesk Animator Flic video @tab @tab X
|
@item Autodesk Animator Flic video @tab @tab X
|
||||||
@item Autodesk RLE @tab @tab X
|
@item Autodesk RLE @tab @tab X
|
||||||
@tab fourcc: AASC
|
@tab fourcc: AASC
|
||||||
@item Avid 1:1 10-bit RGB Packer @tab X @tab X
|
|
||||||
@tab fourcc: AVrp
|
|
||||||
@item AVS (Audio Video Standard) video @tab @tab X
|
@item AVS (Audio Video Standard) video @tab @tab X
|
||||||
@tab Video encoding used by the Creature Shock game.
|
@tab Video encoding used by the Creature Shock game.
|
||||||
@item AYUV @tab X @tab X
|
|
||||||
@tab Microsoft uncompressed packed 4:4:4:4
|
|
||||||
@item Beam Software VB @tab @tab X
|
@item Beam Software VB @tab @tab X
|
||||||
@item Bethesda VID video @tab @tab X
|
@item Bethesda VID video @tab @tab X
|
||||||
@tab Used in some games from Bethesda Softworks.
|
@tab Used in some games from Bethesda Softworks.
|
||||||
@item Bink Video @tab @tab X
|
@item Bink Video @tab @tab X
|
||||||
@item Bitmap Brothers JV video @tab @tab X
|
@item Bitmap Brothers JV video @tab @tab X
|
||||||
@item y41p Brooktree uncompressed 4:1:1 12-bit @tab X @tab X
|
|
||||||
@item Brute Force & Ignorance @tab @tab X
|
@item Brute Force & Ignorance @tab @tab X
|
||||||
@tab Used in the game Flash Traffic: City of Angels.
|
@tab Used in the game Flash Traffic: City of Angels.
|
||||||
@item C93 video @tab @tab X
|
@item C93 video @tab @tab X
|
||||||
@@ -469,21 +367,18 @@ following image formats are supported:
|
|||||||
@tab fourcc: CSCD
|
@tab fourcc: CSCD
|
||||||
@item CD+G @tab @tab X
|
@item CD+G @tab @tab X
|
||||||
@tab Video codec for CD+G karaoke disks
|
@tab Video codec for CD+G karaoke disks
|
||||||
@item CDXL @tab @tab X
|
|
||||||
@tab Amiga CD video codec
|
|
||||||
@item Chinese AVS video @tab E @tab X
|
@item Chinese AVS video @tab E @tab X
|
||||||
@tab AVS1-P2, JiZhun profile, encoding through external library libxavs
|
@tab AVS1-P2, JiZhun profile, encoding through external library libxavs
|
||||||
@item Delphine Software International CIN video @tab @tab X
|
@item Delphine Software International CIN video @tab @tab X
|
||||||
@tab Codec used in Delphine Software International games.
|
@tab Codec used in Delphine Software International games.
|
||||||
@item Discworld II BMV Video @tab @tab X
|
|
||||||
@item Cinepak @tab @tab X
|
@item Cinepak @tab @tab X
|
||||||
@item Cirrus Logic AccuPak @tab X @tab X
|
@item Cirrus Logic AccuPak @tab @tab X
|
||||||
@tab fourcc: CLJR
|
@tab fourcc: CLJR
|
||||||
@item Creative YUV (CYUV) @tab @tab X
|
@item Creative YUV (CYUV) @tab @tab X
|
||||||
@item DFA @tab @tab X
|
@item DFA @tab @tab X
|
||||||
@tab Codec used in Chronomaster game.
|
@tab Codec used in Chronomaster game.
|
||||||
@item Dirac @tab E @tab X
|
@item Dirac @tab E @tab E
|
||||||
@tab supported through external library libschroedinger
|
@tab supported through external libdirac/libschroedinger libraries
|
||||||
@item Deluxe Paint Animation @tab @tab X
|
@item Deluxe Paint Animation @tab @tab X
|
||||||
@item DNxHD @tab X @tab X
|
@item DNxHD @tab X @tab X
|
||||||
@tab aka SMPTE VC3
|
@tab aka SMPTE VC3
|
||||||
@@ -492,7 +387,6 @@ following image formats are supported:
|
|||||||
@item Duck TrueMotion 2.0 @tab @tab X
|
@item Duck TrueMotion 2.0 @tab @tab X
|
||||||
@tab fourcc: TM20
|
@tab fourcc: TM20
|
||||||
@item DV (Digital Video) @tab X @tab X
|
@item DV (Digital Video) @tab X @tab X
|
||||||
@item Dxtory capture format @tab @tab X
|
|
||||||
@item Feeble Files/ScummVM DXA @tab @tab X
|
@item Feeble Files/ScummVM DXA @tab @tab X
|
||||||
@tab Codec originally used in Feeble Files game.
|
@tab Codec originally used in Feeble Files game.
|
||||||
@item Electronic Arts CMV video @tab @tab X
|
@item Electronic Arts CMV video @tab @tab X
|
||||||
@@ -502,15 +396,13 @@ following image formats are supported:
|
|||||||
@item Electronic Arts TGQ video @tab @tab X
|
@item Electronic Arts TGQ video @tab @tab X
|
||||||
@item Electronic Arts TQI video @tab @tab X
|
@item Electronic Arts TQI video @tab @tab X
|
||||||
@item Escape 124 @tab @tab X
|
@item Escape 124 @tab @tab X
|
||||||
@item Escape 130 @tab @tab X
|
|
||||||
@item FFmpeg video codec #1 @tab X @tab X
|
@item FFmpeg video codec #1 @tab X @tab X
|
||||||
@tab lossless codec (fourcc: FFV1)
|
@tab experimental lossless codec (fourcc: FFV1)
|
||||||
@item Flash Screen Video v1 @tab X @tab X
|
@item Flash Screen Video v1 @tab X @tab X
|
||||||
@tab fourcc: FSV1
|
@tab fourcc: FSV1
|
||||||
@item Flash Screen Video v2 @tab X @tab X
|
@item Flash Screen Video v2 @tab X
|
||||||
@item Flash Video (FLV) @tab X @tab X
|
@item Flash Video (FLV) @tab X @tab X
|
||||||
@tab Sorenson H.263 used in Flash
|
@tab Sorenson H.263 used in Flash
|
||||||
@item Forward Uncompressed @tab @tab X
|
|
||||||
@item Fraps @tab @tab X
|
@item Fraps @tab @tab X
|
||||||
@item H.261 @tab X @tab X
|
@item H.261 @tab X @tab X
|
||||||
@item H.263 / H.263-1996 @tab X @tab X
|
@item H.263 / H.263-1996 @tab X @tab X
|
||||||
@@ -527,19 +419,17 @@ following image formats are supported:
|
|||||||
@item id RoQ video @tab X @tab X
|
@item id RoQ video @tab X @tab X
|
||||||
@tab Used in Quake III, Jedi Knight 2, other computer games.
|
@tab Used in Quake III, Jedi Knight 2, other computer games.
|
||||||
@item IFF ILBM @tab @tab X
|
@item IFF ILBM @tab @tab X
|
||||||
@tab IFF interleaved bitmap
|
@tab IFF interlaved bitmap
|
||||||
@item IFF ByteRun1 @tab @tab X
|
@item IFF ByteRun1 @tab @tab X
|
||||||
@tab IFF run length encoded bitmap
|
@tab IFF run length encoded bitmap
|
||||||
@item Intel H.263 @tab @tab X
|
@item Intel H.263 @tab @tab X
|
||||||
@item Intel Indeo 2 @tab @tab X
|
@item Intel Indeo 2 @tab @tab X
|
||||||
@item Intel Indeo 3 @tab @tab X
|
@item Intel Indeo 3 @tab @tab X
|
||||||
@item Intel Indeo 4 @tab @tab X
|
|
||||||
@item Intel Indeo 5 @tab @tab X
|
@item Intel Indeo 5 @tab @tab X
|
||||||
@item Interplay C93 @tab @tab X
|
@item Interplay C93 @tab @tab X
|
||||||
@tab Used in the game Cyberia from Interplay.
|
@tab Used in the game Cyberia from Interplay.
|
||||||
@item Interplay MVE video @tab @tab X
|
@item Interplay MVE video @tab @tab X
|
||||||
@tab Used in Interplay .MVE files.
|
@tab Used in Interplay .MVE files.
|
||||||
@item J2K @tab X @tab X
|
|
||||||
@item Karl Morton's video codec @tab @tab X
|
@item Karl Morton's video codec @tab @tab X
|
||||||
@tab Codec used in Worms games.
|
@tab Codec used in Worms games.
|
||||||
@item Kega Game Video (KGV1) @tab @tab X
|
@item Kega Game Video (KGV1) @tab @tab X
|
||||||
@@ -563,7 +453,7 @@ following image formats are supported:
|
|||||||
@item MPEG-1/2 video (VDPAU acceleration) @tab @tab X
|
@item MPEG-1/2 video (VDPAU acceleration) @tab @tab X
|
||||||
@item MPEG-2 video @tab X @tab X
|
@item MPEG-2 video @tab X @tab X
|
||||||
@item MPEG-4 part 2 @tab X @tab X
|
@item MPEG-4 part 2 @tab X @tab X
|
||||||
@tab libxvidcore can be used alternatively for encoding.
|
@ libxvidcore can be used alternatively for encoding.
|
||||||
@item MPEG-4 part 2 Microsoft variant version 1 @tab @tab X
|
@item MPEG-4 part 2 Microsoft variant version 1 @tab @tab X
|
||||||
@item MPEG-4 part 2 Microsoft variant version 2 @tab X @tab X
|
@item MPEG-4 part 2 Microsoft variant version 2 @tab X @tab X
|
||||||
@item MPEG-4 part 2 Microsoft variant version 3 @tab X @tab X
|
@item MPEG-4 part 2 Microsoft variant version 3 @tab X @tab X
|
||||||
@@ -580,8 +470,6 @@ following image formats are supported:
|
|||||||
@tab fourcc: VP80, encoding supported through external library libvpx
|
@tab fourcc: VP80, encoding supported through external library libvpx
|
||||||
@item planar RGB @tab @tab X
|
@item planar RGB @tab @tab X
|
||||||
@tab fourcc: 8BPS
|
@tab fourcc: 8BPS
|
||||||
@item Prores @tab @tab X
|
|
||||||
@tab fourcc: apch,apcn,apcs,apco
|
|
||||||
@item Q-team QPEG @tab @tab X
|
@item Q-team QPEG @tab @tab X
|
||||||
@tab fourccs: QPEG, Q1.0, Q1.1
|
@tab fourccs: QPEG, Q1.0, Q1.1
|
||||||
@item QuickTime 8BPS video @tab @tab X
|
@item QuickTime 8BPS video @tab @tab X
|
||||||
@@ -591,8 +479,8 @@ following image formats are supported:
|
|||||||
@tab fourcc: 'smc '
|
@tab fourcc: 'smc '
|
||||||
@item QuickTime video (RPZA) @tab @tab X
|
@item QuickTime video (RPZA) @tab @tab X
|
||||||
@tab fourcc: rpza
|
@tab fourcc: rpza
|
||||||
@item R10K AJA Kona 10-bit RGB Codec @tab X @tab X
|
@item R10K AJA Kona 10-bit RGB Codec @tab @tab X
|
||||||
@item R210 Quicktime Uncompressed RGB 10-bit @tab X @tab X
|
@item R210 Quicktime Uncompressed RGB 10-bit @tab @tab X
|
||||||
@item Raw Video @tab X @tab X
|
@item Raw Video @tab X @tab X
|
||||||
@item RealVideo 1.0 @tab X @tab X
|
@item RealVideo 1.0 @tab X @tab X
|
||||||
@item RealVideo 2.0 @tab X @tab X
|
@item RealVideo 2.0 @tab X @tab X
|
||||||
@@ -623,16 +511,10 @@ following image formats are supported:
|
|||||||
@tab encoding supported through external library libtheora
|
@tab encoding supported through external library libtheora
|
||||||
@item Tiertex Limited SEQ video @tab @tab X
|
@item Tiertex Limited SEQ video @tab @tab X
|
||||||
@tab Codec used in DOS CD-ROM FlashBack game.
|
@tab Codec used in DOS CD-ROM FlashBack game.
|
||||||
@item Ut Video @tab @tab X
|
@item V210 Quicktime Uncompressed 4:2:2 10-bit @tab X @tab X
|
||||||
@item v210 QuickTime uncompressed 4:2:2 10-bit @tab X @tab X
|
|
||||||
@item v308 QuickTime uncompressed 4:4:4 @tab X @tab X
|
|
||||||
@item v408 QuickTime uncompressed 4:4:4:4 @tab X @tab X
|
|
||||||
@item v410 QuickTime uncompressed 4:4:4 10-bit @tab X @tab X
|
|
||||||
@item VBLE Lossless Codec @tab @tab X
|
|
||||||
@item VMware Screen Codec / VMware Video @tab @tab X
|
@item VMware Screen Codec / VMware Video @tab @tab X
|
||||||
@tab Codec used in videos captured by VMware.
|
@tab Codec used in videos captured by VMware.
|
||||||
@item Westwood Studios VQA (Vector Quantized Animation) video @tab @tab X
|
@item Westwood Studios VQA (Vector Quantized Animation) video @tab @tab X
|
||||||
@item Windows Media Image @tab @tab X
|
|
||||||
@item Windows Media Video 7 @tab X @tab X
|
@item Windows Media Video 7 @tab X @tab X
|
||||||
@item Windows Media Video 8 @tab X @tab X
|
@item Windows Media Video 8 @tab X @tab X
|
||||||
@item Windows Media Video 9 @tab @tab X
|
@item Windows Media Video 9 @tab @tab X
|
||||||
@@ -645,8 +527,6 @@ following image formats are supported:
|
|||||||
@item WMV7 @tab X @tab X
|
@item WMV7 @tab X @tab X
|
||||||
@item YAMAHA SMAF @tab X @tab X
|
@item YAMAHA SMAF @tab X @tab X
|
||||||
@item Psygnosis YOP Video @tab @tab X
|
@item Psygnosis YOP Video @tab @tab X
|
||||||
@item yuv4 @tab X @tab X
|
|
||||||
@tab libquicktime uncompressed packed 4:2:0
|
|
||||||
@item ZLIB @tab X @tab X
|
@item ZLIB @tab X @tab X
|
||||||
@tab part of LCL, encoder experimental
|
@tab part of LCL, encoder experimental
|
||||||
@item Zip Motion Blocks Video @tab X @tab X
|
@item Zip Motion Blocks Video @tab X @tab X
|
||||||
@@ -662,8 +542,6 @@ following image formats are supported:
|
|||||||
@multitable @columnfractions .4 .1 .1 .4
|
@multitable @columnfractions .4 .1 .1 .4
|
||||||
@item Name @tab Encoding @tab Decoding @tab Comments
|
@item Name @tab Encoding @tab Decoding @tab Comments
|
||||||
@item 8SVX audio @tab @tab X
|
@item 8SVX audio @tab @tab X
|
||||||
@item AAC+ @tab E @tab X
|
|
||||||
@tab encoding supported through external library libaacplus
|
|
||||||
@item AAC @tab E @tab X
|
@item AAC @tab E @tab X
|
||||||
@tab encoding supported through external library libfaac and libvo-aacenc
|
@tab encoding supported through external library libfaac and libvo-aacenc
|
||||||
@item AC-3 @tab IX @tab X
|
@item AC-3 @tab IX @tab X
|
||||||
@@ -721,16 +599,15 @@ following image formats are supported:
|
|||||||
@item Atrac 3 @tab @tab X
|
@item Atrac 3 @tab @tab X
|
||||||
@item Bink Audio @tab @tab X
|
@item Bink Audio @tab @tab X
|
||||||
@tab Used in Bink and Smacker files in many games.
|
@tab Used in Bink and Smacker files in many games.
|
||||||
@item CELT @tab @tab E
|
@item CELT (Opus) @tab @tab E
|
||||||
@tab decoding supported through external library libcelt
|
@tab decoding supported through external library libcelt
|
||||||
@item Delphine Software International CIN audio @tab @tab X
|
@item Delphine Software International CIN audio @tab @tab X
|
||||||
@tab Codec used in Delphine Software International games.
|
@tab Codec used in Delphine Software International games.
|
||||||
@item Discworld II BMV Audio @tab @tab X
|
|
||||||
@item COOK @tab @tab X
|
@item COOK @tab @tab X
|
||||||
@tab All versions except 5.1 are supported.
|
@tab All versions except 5.1 are supported.
|
||||||
@item DCA (DTS Coherent Acoustics) @tab X @tab X
|
@item DCA (DTS Coherent Acoustics) @tab X @tab X
|
||||||
@item DPCM id RoQ @tab X @tab X
|
@item DPCM id RoQ @tab X @tab X
|
||||||
@tab Used in Quake III, Jedi Knight 2 and other computer games.
|
@tab Used in Quake III, Jedi Knight 2, other computer games.
|
||||||
@item DPCM Interplay @tab @tab X
|
@item DPCM Interplay @tab @tab X
|
||||||
@tab Used in various Interplay computer games.
|
@tab Used in various Interplay computer games.
|
||||||
@item DPCM Sierra Online @tab @tab X
|
@item DPCM Sierra Online @tab @tab X
|
||||||
@@ -742,8 +619,6 @@ following image formats are supported:
|
|||||||
@item DV audio @tab @tab X
|
@item DV audio @tab @tab X
|
||||||
@item Enhanced AC-3 @tab X @tab X
|
@item Enhanced AC-3 @tab X @tab X
|
||||||
@item FLAC (Free Lossless Audio Codec) @tab X @tab IX
|
@item FLAC (Free Lossless Audio Codec) @tab X @tab IX
|
||||||
@item G.723.1 @tab X @tab X
|
|
||||||
@item G.729 @tab @tab X
|
|
||||||
@item GSM @tab E @tab X
|
@item GSM @tab E @tab X
|
||||||
@tab encoding supported through external library libgsm
|
@tab encoding supported through external library libgsm
|
||||||
@item GSM Microsoft variant @tab E @tab X
|
@item GSM Microsoft variant @tab E @tab X
|
||||||
@@ -786,7 +661,7 @@ following image formats are supported:
|
|||||||
@item PCM unsigned 24-bit little-endian @tab X @tab X
|
@item PCM unsigned 24-bit little-endian @tab X @tab X
|
||||||
@item PCM unsigned 32-bit big-endian @tab X @tab X
|
@item PCM unsigned 32-bit big-endian @tab X @tab X
|
||||||
@item PCM unsigned 32-bit little-endian @tab X @tab X
|
@item PCM unsigned 32-bit little-endian @tab X @tab X
|
||||||
@item PCM Zork @tab @tab X
|
@item PCM Zork @tab X @tab X
|
||||||
@item QCELP / PureVoice @tab @tab X
|
@item QCELP / PureVoice @tab @tab X
|
||||||
@item QDesign Music Codec 2 @tab @tab X
|
@item QDesign Music Codec 2 @tab @tab X
|
||||||
@tab There are still some distortions.
|
@tab There are still some distortions.
|
||||||
@@ -796,7 +671,6 @@ following image formats are supported:
|
|||||||
@tab Real 28800 bit/s codec
|
@tab Real 28800 bit/s codec
|
||||||
@item RealAudio 3.0 (dnet) @tab IX @tab X
|
@item RealAudio 3.0 (dnet) @tab IX @tab X
|
||||||
@tab Real low bitrate AC-3 codec
|
@tab Real low bitrate AC-3 codec
|
||||||
@item RealAudio Lossless @tab @tab X
|
|
||||||
@item RealAudio SIPR / ACELP.NET @tab @tab X
|
@item RealAudio SIPR / ACELP.NET @tab @tab X
|
||||||
@item Shorten @tab @tab X
|
@item Shorten @tab @tab X
|
||||||
@item Sierra VMD audio @tab @tab X
|
@item Sierra VMD audio @tab @tab X
|
||||||
@@ -807,7 +681,7 @@ following image formats are supported:
|
|||||||
@tab experimental codec
|
@tab experimental codec
|
||||||
@item Sonic lossless @tab X @tab X
|
@item Sonic lossless @tab X @tab X
|
||||||
@tab experimental codec
|
@tab experimental codec
|
||||||
@item Speex @tab E @tab E
|
@item Speex @tab @tab E
|
||||||
@tab supported through external library libspeex
|
@tab supported through external library libspeex
|
||||||
@item True Audio (TTA) @tab @tab X
|
@item True Audio (TTA) @tab @tab X
|
||||||
@item TrueHD @tab @tab X
|
@item TrueHD @tab @tab X
|
||||||
@@ -819,7 +693,6 @@ following image formats are supported:
|
|||||||
@item Westwood Audio (SND1) @tab @tab X
|
@item Westwood Audio (SND1) @tab @tab X
|
||||||
@item Windows Media Audio 1 @tab X @tab X
|
@item Windows Media Audio 1 @tab X @tab X
|
||||||
@item Windows Media Audio 2 @tab X @tab X
|
@item Windows Media Audio 2 @tab X @tab X
|
||||||
@item Windows Media Audio Lossless @tab @tab X
|
|
||||||
@item Windows Media Audio Pro @tab @tab X
|
@item Windows Media Audio Pro @tab @tab X
|
||||||
@item Windows Media Audio Voice @tab @tab X
|
@item Windows Media Audio Voice @tab @tab X
|
||||||
@end multitable
|
@end multitable
|
||||||
@@ -838,8 +711,7 @@ performance on systems without hardware floating point support).
|
|||||||
@item SSA/ASS @tab X @tab X @tab X @tab X
|
@item SSA/ASS @tab X @tab X @tab X @tab X
|
||||||
@item DVB @tab X @tab X @tab X @tab X
|
@item DVB @tab X @tab X @tab X @tab X
|
||||||
@item DVD @tab X @tab X @tab X @tab X
|
@item DVD @tab X @tab X @tab X @tab X
|
||||||
@item JACOsub @tab X @tab X @tab @tab X
|
@item MicroDVD @tab X @tab X @tab @tab
|
||||||
@item MicroDVD @tab X @tab X @tab @tab X
|
|
||||||
@item PGS @tab @tab @tab @tab X
|
@item PGS @tab @tab @tab @tab X
|
||||||
@item SubRip (SRT) @tab X @tab X @tab X @tab X
|
@item SubRip (SRT) @tab X @tab X @tab X @tab X
|
||||||
@item XSUB @tab @tab @tab X @tab X
|
@item XSUB @tab @tab @tab X @tab X
|
||||||
@@ -872,12 +744,10 @@ performance on systems without hardware floating point support).
|
|||||||
@item ALSA @tab X @tab X
|
@item ALSA @tab X @tab X
|
||||||
@item BKTR @tab X @tab
|
@item BKTR @tab X @tab
|
||||||
@item DV1394 @tab X @tab
|
@item DV1394 @tab X @tab
|
||||||
@item Linux framebuffer @tab X @tab
|
|
||||||
@item JACK @tab X @tab
|
@item JACK @tab X @tab
|
||||||
@item LIBCDIO @tab X
|
|
||||||
@item LIBDC1394 @tab X @tab
|
@item LIBDC1394 @tab X @tab
|
||||||
@item OSS @tab X @tab X
|
@item OSS @tab X @tab X
|
||||||
@item Pulseaudio @tab X @tab
|
@item Video4Linux @tab X @tab
|
||||||
@item Video4Linux2 @tab X @tab
|
@item Video4Linux2 @tab X @tab
|
||||||
@item VfW capture @tab X @tab
|
@item VfW capture @tab X @tab
|
||||||
@item X11 grabbing @tab X @tab
|
@item X11 grabbing @tab X @tab
|
||||||
@@ -885,15 +755,342 @@ performance on systems without hardware floating point support).
|
|||||||
|
|
||||||
@code{X} means that input/output is supported.
|
@code{X} means that input/output is supported.
|
||||||
|
|
||||||
@section Timecode
|
|
||||||
|
|
||||||
@multitable @columnfractions .4 .1 .1
|
@chapter Platform Specific information
|
||||||
@item Codec/format @tab Read @tab Write
|
|
||||||
@item DV @tab X @tab X
|
@section DOS
|
||||||
@item GXF @tab X @tab X
|
|
||||||
@item MOV @tab X @tab
|
Using a cross-compiler is preferred for various reasons.
|
||||||
@item MPEG1/2 @tab X @tab X
|
|
||||||
@item MXF @tab X @tab X
|
@section OS/2
|
||||||
@end multitable
|
|
||||||
|
For information about compiling FFmpeg on OS/2 see
|
||||||
|
@url{http://www.edm2.com/index.php/FFmpeg}.
|
||||||
|
|
||||||
|
@section Unix-like
|
||||||
|
|
||||||
|
Some parts of FFmpeg cannot be built with version 2.15 of the GNU
|
||||||
|
assembler which is still provided by a few AMD64 distributions. To
|
||||||
|
make sure your compiler really uses the required version of gas
|
||||||
|
after a binutils upgrade, run:
|
||||||
|
|
||||||
|
@example
|
||||||
|
$(gcc -print-prog-name=as) --version
|
||||||
|
@end example
|
||||||
|
|
||||||
|
If not, then you should install a different compiler that has no
|
||||||
|
hard-coded path to gas. In the worst case pass @code{--disable-asm}
|
||||||
|
to configure.
|
||||||
|
|
||||||
|
@subsection BSD
|
||||||
|
|
||||||
|
BSD make will not build FFmpeg, you need to install and use GNU Make
|
||||||
|
(@file{gmake}).
|
||||||
|
|
||||||
|
@subsection (Open)Solaris
|
||||||
|
|
||||||
|
GNU Make is required to build FFmpeg, so you have to invoke (@file{gmake}),
|
||||||
|
standard Solaris Make will not work. When building with a non-c99 front-end
|
||||||
|
(gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o}
|
||||||
|
or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options
|
||||||
|
since the libc is not c99-compliant by default. The probes performed by
|
||||||
|
configure may raise an exception leading to the death of configure itself
|
||||||
|
due to a bug in the system shell. Simply invoke a different shell such as
|
||||||
|
bash directly to work around this:
|
||||||
|
|
||||||
|
@example
|
||||||
|
bash ./configure
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@subsection Darwin (MacOS X, iPhone)
|
||||||
|
|
||||||
|
MacOS X on PowerPC or ARM (iPhone) requires a preprocessor from
|
||||||
|
@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
|
||||||
|
assembler functions. Just download the Perl script and put it somewhere
|
||||||
|
in your PATH, FFmpeg's configure will pick it up automatically.
|
||||||
|
|
||||||
|
@section Windows
|
||||||
|
|
||||||
|
To get help and instructions for building FFmpeg under Windows, check out
|
||||||
|
the FFmpeg Windows Help Forum at
|
||||||
|
@url{http://ffmpeg.arrozcru.org/}.
|
||||||
|
|
||||||
|
@subsection Native Windows compilation
|
||||||
|
|
||||||
|
FFmpeg can be built to run natively on Windows using the MinGW tools. Install
|
||||||
|
the latest versions of MSYS and MinGW from @url{http://www.mingw.org/}.
|
||||||
|
You can find detailed installation
|
||||||
|
instructions in the download section and the FAQ.
|
||||||
|
|
||||||
|
FFmpeg does not build out-of-the-box with the packages the automated MinGW
|
||||||
|
installer provides. It also requires coreutils to be installed and many other
|
||||||
|
packages updated to the latest version. The minimum version for some packages
|
||||||
|
are listed below:
|
||||||
|
|
||||||
|
@itemize
|
||||||
|
@item bash 3.1
|
||||||
|
@item msys-make 3.81-2 (note: not mingw32-make)
|
||||||
|
@item w32api 3.13
|
||||||
|
@item mingw-runtime 3.15
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
FFmpeg automatically passes @code{-fno-common} to the compiler to work around
|
||||||
|
a GCC bug (see @url{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216}).
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
|
||||||
|
@itemize
|
||||||
|
|
||||||
|
@item Building natively using MSYS can be sped up by disabling implicit rules
|
||||||
|
in the Makefile by calling @code{make -r} instead of plain @code{make}. This
|
||||||
|
speed up is close to non-existent for normal one-off builds and is only
|
||||||
|
noticeable when running make for a second time (for example in
|
||||||
|
@code{make install}).
|
||||||
|
|
||||||
|
@item In order to compile FFplay, you must have the MinGW development library
|
||||||
|
of SDL. Get it from @url{http://www.libsdl.org}.
|
||||||
|
Edit the @file{bin/sdl-config} script so that it points to the correct prefix
|
||||||
|
where SDL was installed. Verify that @file{sdl-config} can be launched from
|
||||||
|
the MSYS command line.
|
||||||
|
|
||||||
|
@item By using @code{./configure --enable-shared} when configuring FFmpeg,
|
||||||
|
you can build libavutil, libavcodec and libavformat as DLLs.
|
||||||
|
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
@subsection Microsoft Visual C++ compatibility
|
||||||
|
|
||||||
|
As stated in the FAQ, FFmpeg will not compile under MSVC++. However, if you
|
||||||
|
want to use the libav* libraries in your own applications, you can still
|
||||||
|
compile those applications using MSVC++. But the libav* libraries you link
|
||||||
|
to @emph{must} be built with MinGW. However, you will not be able to debug
|
||||||
|
inside the libav* libraries, since MSVC++ does not recognize the debug
|
||||||
|
symbols generated by GCC.
|
||||||
|
We strongly recommend you to move over from MSVC++ to MinGW tools.
|
||||||
|
|
||||||
|
This description of how to use the FFmpeg libraries with MSVC++ is based on
|
||||||
|
Microsoft Visual C++ 2005 Express Edition. If you have a different version,
|
||||||
|
you might have to modify the procedures slightly.
|
||||||
|
|
||||||
|
@subsubsection Using static libraries
|
||||||
|
|
||||||
|
Assuming you have just built and installed FFmpeg in @file{/usr/local}.
|
||||||
|
|
||||||
|
@enumerate
|
||||||
|
|
||||||
|
@item Create a new console application ("File / New / Project") and then
|
||||||
|
select "Win32 Console Application". On the appropriate page of the
|
||||||
|
Application Wizard, uncheck the "Precompiled headers" option.
|
||||||
|
|
||||||
|
@item Write the source code for your application, or, for testing, just
|
||||||
|
copy the code from an existing sample application into the source file
|
||||||
|
that MSVC++ has already created for you. For example, you can copy
|
||||||
|
@file{libavformat/output-example.c} from the FFmpeg distribution.
|
||||||
|
|
||||||
|
@item Open the "Project / Properties" dialog box. In the "Configuration"
|
||||||
|
combo box, select "All Configurations" so that the changes you make will
|
||||||
|
affect both debug and release builds. In the tree view on the left hand
|
||||||
|
side, select "C/C++ / General", then edit the "Additional Include
|
||||||
|
Directories" setting to contain the path where the FFmpeg includes were
|
||||||
|
installed (i.e. @file{c:\msys\1.0\local\include}).
|
||||||
|
Do not add MinGW's include directory here, or the include files will
|
||||||
|
conflict with MSVC's.
|
||||||
|
|
||||||
|
@item Still in the "Project / Properties" dialog box, select
|
||||||
|
"Linker / General" from the tree view and edit the
|
||||||
|
"Additional Library Directories" setting to contain the @file{lib}
|
||||||
|
directory where FFmpeg was installed (i.e. @file{c:\msys\1.0\local\lib}),
|
||||||
|
the directory where MinGW libs are installed (i.e. @file{c:\mingw\lib}),
|
||||||
|
and the directory where MinGW's GCC libs are installed
|
||||||
|
(i.e. @file{C:\mingw\lib\gcc\mingw32\4.2.1-sjlj}). Then select
|
||||||
|
"Linker / Input" from the tree view, and add the files @file{libavformat.a},
|
||||||
|
@file{libavcodec.a}, @file{libavutil.a}, @file{libmingwex.a},
|
||||||
|
@file{libgcc.a}, and any other libraries you used (i.e. @file{libz.a})
|
||||||
|
to the end of "Additional Dependencies".
|
||||||
|
|
||||||
|
@item Now, select "C/C++ / Code Generation" from the tree view. Select
|
||||||
|
"Debug" in the "Configuration" combo box. Make sure that "Runtime
|
||||||
|
Library" is set to "Multi-threaded Debug DLL". Then, select "Release" in
|
||||||
|
the "Configuration" combo box and make sure that "Runtime Library" is
|
||||||
|
set to "Multi-threaded DLL".
|
||||||
|
|
||||||
|
@item Click "OK" to close the "Project / Properties" dialog box.
|
||||||
|
|
||||||
|
@item MSVC++ lacks some C99 header files that are fundamental for FFmpeg.
|
||||||
|
Get msinttypes from @url{http://code.google.com/p/msinttypes/downloads/list}
|
||||||
|
and install it in MSVC++'s include directory
|
||||||
|
(i.e. @file{C:\Program Files\Microsoft Visual Studio 8\VC\include}).
|
||||||
|
|
||||||
|
@item MSVC++ also does not understand the @code{inline} keyword used by
|
||||||
|
FFmpeg, so you must add this line before @code{#include}ing libav*:
|
||||||
|
@example
|
||||||
|
#define inline _inline
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@item Build your application, everything should work.
|
||||||
|
|
||||||
|
@end enumerate
|
||||||
|
|
||||||
|
@subsubsection Using shared libraries
|
||||||
|
|
||||||
|
This is how to create DLL and LIB files that are compatible with MSVC++:
|
||||||
|
|
||||||
|
@enumerate
|
||||||
|
|
||||||
|
@item Add a call to @file{vcvars32.bat} (which sets up the environment
|
||||||
|
variables for the Visual C++ tools) as the first line of @file{msys.bat}.
|
||||||
|
The standard location for @file{vcvars32.bat} is
|
||||||
|
@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat},
|
||||||
|
and the standard location for @file{msys.bat} is @file{C:\msys\1.0\msys.bat}.
|
||||||
|
If this corresponds to your setup, add the following line as the first line
|
||||||
|
of @file{msys.bat}:
|
||||||
|
|
||||||
|
@example
|
||||||
|
call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Alternatively, you may start the @file{Visual Studio 2005 Command Prompt},
|
||||||
|
and run @file{c:\msys\1.0\msys.bat} from there.
|
||||||
|
|
||||||
|
@item Within the MSYS shell, run @code{lib.exe}. If you get a help message
|
||||||
|
from @file{Microsoft (R) Library Manager}, this means your environment
|
||||||
|
variables are set up correctly, the @file{Microsoft (R) Library Manager}
|
||||||
|
is on the path and will be used by FFmpeg to create
|
||||||
|
MSVC++-compatible import libraries.
|
||||||
|
|
||||||
|
@item Build FFmpeg with
|
||||||
|
|
||||||
|
@example
|
||||||
|
./configure --enable-shared
|
||||||
|
make
|
||||||
|
make install
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Your install path (@file{/usr/local/} by default) should now have the
|
||||||
|
necessary DLL and LIB files under the @file{bin} directory.
|
||||||
|
|
||||||
|
@end enumerate
|
||||||
|
|
||||||
|
To use those files with MSVC++, do the same as you would do with
|
||||||
|
the static libraries, as described above. But in Step 4,
|
||||||
|
you should only need to add the directory where the LIB files are installed
|
||||||
|
(i.e. @file{c:\msys\usr\local\bin}). This is not a typo, the LIB files are
|
||||||
|
installed in the @file{bin} directory. And instead of adding the static
|
||||||
|
libraries (@file{libxxx.a} files) you should add the MSVC import libraries
|
||||||
|
(@file{avcodec.lib}, @file{avformat.lib}, and
|
||||||
|
@file{avutil.lib}). Note that you should not use the GCC import
|
||||||
|
libraries (@file{libxxx.dll.a} files), as these will give you undefined
|
||||||
|
reference errors. There should be no need for @file{libmingwex.a},
|
||||||
|
@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
|
||||||
|
statically linked into the DLLs. The @file{bin} directory contains a bunch
|
||||||
|
of DLL files, but the ones that are actually used to run your application
|
||||||
|
are the ones with a major version number in their filenames
|
||||||
|
(i.e. @file{avcodec-51.dll}).
|
||||||
|
|
||||||
|
FFmpeg headers do not declare global data for Windows DLLs through the usual
|
||||||
|
dllexport/dllimport interface. Such data will be exported properly while
|
||||||
|
building, but to use them in your MSVC++ code you will have to edit the
|
||||||
|
appropriate headers and mark the data as dllimport. For example, in
|
||||||
|
libavutil/pixdesc.h you should have:
|
||||||
|
@example
|
||||||
|
extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Note that using import libraries created by dlltool requires
|
||||||
|
the linker optimization option to be set to
|
||||||
|
"References: Keep Unreferenced Data (@code{/OPT:NOREF})", otherwise
|
||||||
|
the resulting binaries will fail during runtime. This isn't
|
||||||
|
required when using import libraries generated by lib.exe.
|
||||||
|
This issue is reported upstream at
|
||||||
|
@url{http://sourceware.org/bugzilla/show_bug.cgi?id=12633}.
|
||||||
|
|
||||||
|
@subsection Cross compilation for Windows with Linux
|
||||||
|
|
||||||
|
You must use the MinGW cross compilation tools available at
|
||||||
|
@url{http://www.mingw.org/}.
|
||||||
|
|
||||||
|
Then configure FFmpeg with the following options:
|
||||||
|
@example
|
||||||
|
./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
|
||||||
|
@end example
|
||||||
|
(you can change the cross-prefix according to the prefix chosen for the
|
||||||
|
MinGW tools).
|
||||||
|
|
||||||
|
Then you can easily test FFmpeg with Wine
|
||||||
|
(@url{http://www.winehq.com/}).
|
||||||
|
|
||||||
|
@subsection Compilation under Cygwin
|
||||||
|
|
||||||
|
Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
|
||||||
|
llrint() in its C library.
|
||||||
|
|
||||||
|
Install your Cygwin with all the "Base" packages, plus the
|
||||||
|
following "Devel" ones:
|
||||||
|
@example
|
||||||
|
binutils, gcc4-core, make, git, mingw-runtime, texi2html
|
||||||
|
@end example
|
||||||
|
|
||||||
|
And the following "Utils" one:
|
||||||
|
@example
|
||||||
|
diffutils
|
||||||
|
@end example
|
||||||
|
|
||||||
|
Then run
|
||||||
|
|
||||||
|
@example
|
||||||
|
./configure
|
||||||
|
@end example
|
||||||
|
|
||||||
|
to make a static build.
|
||||||
|
|
||||||
|
The current @code{gcc4-core} package is buggy and needs this flag to build
|
||||||
|
shared libraries:
|
||||||
|
|
||||||
|
@example
|
||||||
|
./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
|
||||||
|
@end example
|
||||||
|
|
||||||
|
If you want to build FFmpeg with additional libraries, download Cygwin
|
||||||
|
"Devel" packages for Ogg and Vorbis from any Cygwin packages repository:
|
||||||
|
@example
|
||||||
|
libogg-devel, libvorbis-devel
|
||||||
|
@end example
|
||||||
|
|
||||||
|
These library packages are only available from Cygwin Ports
|
||||||
|
(@url{http://sourceware.org/cygwinports/}) :
|
||||||
|
|
||||||
|
@example
|
||||||
|
yasm, libSDL-devel, libdirac-devel, libfaac-devel, libgsm-devel,
|
||||||
|
libmp3lame-devel, libschroedinger1.0-devel, speex-devel, libtheora-devel,
|
||||||
|
libxvidcore-devel
|
||||||
|
@end example
|
||||||
|
|
||||||
|
The recommendation for libnut and x264 is to build them from source by
|
||||||
|
yourself, as they evolve too quickly for Cygwin Ports to be up to date.
|
||||||
|
|
||||||
|
Cygwin 1.7.x has IPv6 support. You can add IPv6 to Cygwin 1.5.x by means
|
||||||
|
of the @code{libgetaddrinfo-devel} package, available at Cygwin Ports.
|
||||||
|
|
||||||
|
@subsection Crosscompilation for Windows under Cygwin
|
||||||
|
|
||||||
|
With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
|
||||||
|
|
||||||
|
Just install your Cygwin as explained before, plus these additional
|
||||||
|
"Devel" packages:
|
||||||
|
@example
|
||||||
|
gcc-mingw-core, mingw-runtime, mingw-zlib
|
||||||
|
@end example
|
||||||
|
|
||||||
|
and add some special flags to your configure invocation.
|
||||||
|
|
||||||
|
For a static build run
|
||||||
|
@example
|
||||||
|
./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
||||||
|
@end example
|
||||||
|
|
||||||
|
and for a build with shared libraries
|
||||||
|
@example
|
||||||
|
./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
||||||
|
@end example
|
||||||
|
|
||||||
@bye
|
@bye
|
||||||
|
|||||||
@@ -1,352 +0,0 @@
|
|||||||
\input texinfo @c -*- texinfo -*-
|
|
||||||
|
|
||||||
@settitle Using git to develop FFmpeg
|
|
||||||
|
|
||||||
@titlepage
|
|
||||||
@center @titlefont{Using git to develop FFmpeg}
|
|
||||||
@end titlepage
|
|
||||||
|
|
||||||
@top
|
|
||||||
|
|
||||||
@contents
|
|
||||||
|
|
||||||
@chapter Introduction
|
|
||||||
|
|
||||||
This document aims in giving some quick references on a set of useful git
|
|
||||||
commands. You should always use the extensive and detailed documentation
|
|
||||||
provided directly by git:
|
|
||||||
|
|
||||||
@example
|
|
||||||
git --help
|
|
||||||
man git
|
|
||||||
@end example
|
|
||||||
|
|
||||||
shows you the available subcommands,
|
|
||||||
|
|
||||||
@example
|
|
||||||
git <command> --help
|
|
||||||
man git-<command>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
shows information about the subcommand <command>.
|
|
||||||
|
|
||||||
Additional information could be found on the
|
|
||||||
@url{http://gitref.org, Git Reference} website
|
|
||||||
|
|
||||||
For more information about the Git project, visit the
|
|
||||||
|
|
||||||
@url{http://git-scm.com/, Git website}
|
|
||||||
|
|
||||||
Consult these resources whenever you have problems, they are quite exhaustive.
|
|
||||||
|
|
||||||
What follows now is a basic introduction to Git and some FFmpeg-specific
|
|
||||||
guidelines to ease the contribution to the project
|
|
||||||
|
|
||||||
@chapter Basics Usage
|
|
||||||
|
|
||||||
@section Get GIT
|
|
||||||
|
|
||||||
You can get git from @url{http://git-scm.com/}
|
|
||||||
Most distribution and operating system provide a package for it.
|
|
||||||
|
|
||||||
|
|
||||||
@section Cloning the source tree
|
|
||||||
|
|
||||||
@example
|
|
||||||
git clone git://source.ffmpeg.org/ffmpeg <target>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
This will put the FFmpeg sources into the directory @var{<target>}.
|
|
||||||
|
|
||||||
@example
|
|
||||||
git clone git@@source.ffmpeg.org:ffmpeg <target>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
This will put the FFmpeg sources into the directory @var{<target>} and let
|
|
||||||
you push back your changes to the remote repository.
|
|
||||||
|
|
||||||
Make sure that you do not have Windows line endings in your checkouts,
|
|
||||||
otherwise you may experience spurious compilation failures. One way to
|
|
||||||
achieve this is to run
|
|
||||||
|
|
||||||
@example
|
|
||||||
git config --global core.autocrlf false
|
|
||||||
@end example
|
|
||||||
|
|
||||||
|
|
||||||
@section Updating the source tree to the latest revision
|
|
||||||
|
|
||||||
@example
|
|
||||||
git pull (--rebase)
|
|
||||||
@end example
|
|
||||||
|
|
||||||
pulls in the latest changes from the tracked branch. The tracked branch
|
|
||||||
can be remote. By default the master branch tracks the branch master in
|
|
||||||
the remote origin.
|
|
||||||
|
|
||||||
@float IMPORTANT
|
|
||||||
@command{--rebase} (see below) is recommended.
|
|
||||||
@end float
|
|
||||||
|
|
||||||
@section Rebasing your local branches
|
|
||||||
|
|
||||||
@example
|
|
||||||
git pull --rebase
|
|
||||||
@end example
|
|
||||||
|
|
||||||
fetches the changes from the main repository and replays your local commits
|
|
||||||
over it. This is required to keep all your local changes at the top of
|
|
||||||
FFmpeg's master tree. The master tree will reject pushes with merge commits.
|
|
||||||
|
|
||||||
|
|
||||||
@section Adding/removing files/directories
|
|
||||||
|
|
||||||
@example
|
|
||||||
git add [-A] <filename/dirname>
|
|
||||||
git rm [-r] <filename/dirname>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
GIT needs to get notified of all changes you make to your working
|
|
||||||
directory that makes files appear or disappear.
|
|
||||||
Line moves across files are automatically tracked.
|
|
||||||
|
|
||||||
|
|
||||||
@section Showing modifications
|
|
||||||
|
|
||||||
@example
|
|
||||||
git diff <filename(s)>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
will show all local modifications in your working directory as unified diff.
|
|
||||||
|
|
||||||
|
|
||||||
@section Inspecting the changelog
|
|
||||||
|
|
||||||
@example
|
|
||||||
git log <filename(s)>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
You may also use the graphical tools like gitview or gitk or the web
|
|
||||||
interface available at http://source.ffmpeg.org/
|
|
||||||
|
|
||||||
@section Checking source tree status
|
|
||||||
|
|
||||||
@example
|
|
||||||
git status
|
|
||||||
@end example
|
|
||||||
|
|
||||||
detects all the changes you made and lists what actions will be taken in case
|
|
||||||
of a commit (additions, modifications, deletions, etc.).
|
|
||||||
|
|
||||||
|
|
||||||
@section Committing
|
|
||||||
|
|
||||||
@example
|
|
||||||
git diff --check
|
|
||||||
@end example
|
|
||||||
|
|
||||||
to double check your changes before committing them to avoid trouble later
|
|
||||||
on. All experienced developers do this on each and every commit, no matter
|
|
||||||
how small.
|
|
||||||
Every one of them has been saved from looking like a fool by this many times.
|
|
||||||
It's very easy for stray debug output or cosmetic modifications to slip in,
|
|
||||||
please avoid problems through this extra level of scrutiny.
|
|
||||||
|
|
||||||
For cosmetics-only commits you should get (almost) empty output from
|
|
||||||
|
|
||||||
@example
|
|
||||||
git diff -w -b <filename(s)>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Also check the output of
|
|
||||||
|
|
||||||
@example
|
|
||||||
git status
|
|
||||||
@end example
|
|
||||||
|
|
||||||
to make sure you don't have untracked files or deletions.
|
|
||||||
|
|
||||||
@example
|
|
||||||
git add [-i|-p|-A] <filenames/dirnames>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Make sure you have told git your name and email address
|
|
||||||
|
|
||||||
@example
|
|
||||||
git config --global user.name "My Name"
|
|
||||||
git config --global user.email my@@email.invalid
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Use @var{--global} to set the global configuration for all your git checkouts.
|
|
||||||
|
|
||||||
Git will select the changes to the files for commit. Optionally you can use
|
|
||||||
the interactive or the patch mode to select hunk by hunk what should be
|
|
||||||
added to the commit.
|
|
||||||
|
|
||||||
|
|
||||||
@example
|
|
||||||
git commit
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Git will commit the selected changes to your current local branch.
|
|
||||||
|
|
||||||
You will be prompted for a log message in an editor, which is either
|
|
||||||
set in your personal configuration file through
|
|
||||||
|
|
||||||
@example
|
|
||||||
git config --global core.editor
|
|
||||||
@end example
|
|
||||||
|
|
||||||
or set by one of the following environment variables:
|
|
||||||
@var{GIT_EDITOR}, @var{VISUAL} or @var{EDITOR}.
|
|
||||||
|
|
||||||
Log messages should be concise but descriptive. Explain why you made a change,
|
|
||||||
what you did will be obvious from the changes themselves most of the time.
|
|
||||||
Saying just "bug fix" or "10l" is bad. Remember that people of varying skill
|
|
||||||
levels look at and educate themselves while reading through your code. Don't
|
|
||||||
include filenames in log messages, Git provides that information.
|
|
||||||
|
|
||||||
Possibly make the commit message have a terse, descriptive first line, an
|
|
||||||
empty line and then a full description. The first line will be used to name
|
|
||||||
the patch by git format-patch.
|
|
||||||
|
|
||||||
@section Preparing a patchset
|
|
||||||
|
|
||||||
@example
|
|
||||||
git format-patch <commit> [-o directory]
|
|
||||||
@end example
|
|
||||||
|
|
||||||
will generate a set of patches for each commit between @var{<commit>} and
|
|
||||||
current @var{HEAD}. E.g.
|
|
||||||
|
|
||||||
@example
|
|
||||||
git format-patch origin/master
|
|
||||||
@end example
|
|
||||||
|
|
||||||
will generate patches for all commits on current branch which are not
|
|
||||||
present in upstream.
|
|
||||||
A useful shortcut is also
|
|
||||||
|
|
||||||
@example
|
|
||||||
git format-patch -n
|
|
||||||
@end example
|
|
||||||
|
|
||||||
which will generate patches from last @var{n} commits.
|
|
||||||
By default the patches are created in the current directory.
|
|
||||||
|
|
||||||
@section Sending patches for review
|
|
||||||
|
|
||||||
@example
|
|
||||||
git send-email <commit list|directory>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
will send the patches created by @command{git format-patch} or directly
|
|
||||||
generates them. All the email fields can be configured in the global/local
|
|
||||||
configuration or overridden by command line.
|
|
||||||
Note that this tool must often be installed separately (e.g. @var{git-email}
|
|
||||||
package on Debian-based distros).
|
|
||||||
|
|
||||||
|
|
||||||
@section Renaming/moving/copying files or contents of files
|
|
||||||
|
|
||||||
Git automatically tracks such changes, making those normal commits.
|
|
||||||
|
|
||||||
@example
|
|
||||||
mv/cp path/file otherpath/otherfile
|
|
||||||
git add [-A] .
|
|
||||||
git commit
|
|
||||||
@end example
|
|
||||||
|
|
||||||
|
|
||||||
@chapter FFmpeg specific
|
|
||||||
|
|
||||||
@section Reverting broken commits
|
|
||||||
|
|
||||||
@example
|
|
||||||
git reset <commit>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@command{git reset} will uncommit the changes till @var{<commit>} rewriting
|
|
||||||
the current branch history.
|
|
||||||
|
|
||||||
@example
|
|
||||||
git commit --amend
|
|
||||||
@end example
|
|
||||||
|
|
||||||
allows to amend the last commit details quickly.
|
|
||||||
|
|
||||||
@example
|
|
||||||
git rebase -i origin/master
|
|
||||||
@end example
|
|
||||||
|
|
||||||
will replay local commits over the main repository allowing to edit, merge
|
|
||||||
or remove some of them in the process.
|
|
||||||
|
|
||||||
@float NOTE
|
|
||||||
@command{git reset}, @command{git commit --amend} and @command{git rebase}
|
|
||||||
rewrite history, so you should use them ONLY on your local or topic branches.
|
|
||||||
The main repository will reject those changes.
|
|
||||||
@end float
|
|
||||||
|
|
||||||
@example
|
|
||||||
git revert <commit>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@command{git revert} will generate a revert commit. This will not make the
|
|
||||||
faulty commit disappear from the history.
|
|
||||||
|
|
||||||
@section Pushing changes to remote trees
|
|
||||||
|
|
||||||
@example
|
|
||||||
git push
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Will push the changes to the default remote (@var{origin}).
|
|
||||||
Git will prevent you from pushing changes if the local and remote trees are
|
|
||||||
out of sync. Refer to and to sync the local tree.
|
|
||||||
|
|
||||||
@example
|
|
||||||
git remote add <name> <url>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Will add additional remote with a name reference, it is useful if you want
|
|
||||||
to push your local branch for review on a remote host.
|
|
||||||
|
|
||||||
@example
|
|
||||||
git push <remote> <refspec>
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Will push the changes to the @var{<remote>} repository.
|
|
||||||
Omitting @var{<refspec>} makes @command{git push} update all the remote
|
|
||||||
branches matching the local ones.
|
|
||||||
|
|
||||||
@section Finding a specific svn revision
|
|
||||||
|
|
||||||
Since version 1.7.1 git supports @var{:/foo} syntax for specifying commits
|
|
||||||
based on a regular expression. see man gitrevisions
|
|
||||||
|
|
||||||
@example
|
|
||||||
git show :/'as revision 23456'
|
|
||||||
@end example
|
|
||||||
|
|
||||||
will show the svn changeset @var{r23456}. With older git versions searching in
|
|
||||||
the @command{git log} output is the easiest option (especially if a pager with
|
|
||||||
search capabilities is used).
|
|
||||||
This commit can be checked out with
|
|
||||||
|
|
||||||
@example
|
|
||||||
git checkout -b svn_23456 :/'as revision 23456'
|
|
||||||
@end example
|
|
||||||
|
|
||||||
or for git < 1.7.1 with
|
|
||||||
|
|
||||||
@example
|
|
||||||
git checkout -b svn_23456 $SHA1
|
|
||||||
@end example
|
|
||||||
|
|
||||||
where @var{$SHA1} is the commit hash from the @command{git log} output.
|
|
||||||
|
|
||||||
@chapter Server Issues
|
|
||||||
|
|
||||||
Contact the project admins @email{root@@ffmpeg.org} if you have technical
|
|
||||||
problems with the GIT server.
|
|
||||||
@@ -39,17 +39,16 @@ I. BASICS:
|
|||||||
|
|
||||||
0. Get GIT:
|
0. Get GIT:
|
||||||
|
|
||||||
Most distributions have a git package, if not
|
|
||||||
You can get git from http://git-scm.com/
|
You can get git from http://git-scm.com/
|
||||||
|
|
||||||
|
|
||||||
1. Cloning the source tree:
|
1. Cloning the source tree:
|
||||||
|
|
||||||
git clone git://source.ffmpeg.org/ffmpeg <target>
|
git clone git://git.videolan.org/ffmpeg <target>
|
||||||
|
|
||||||
This will put the FFmpeg sources into the directory <target>.
|
This will put the FFmpeg sources into the directory <target>.
|
||||||
|
|
||||||
git clone git@source.ffmpeg.org:ffmpeg <target>
|
git clone git@git.videolan.org:ffmpeg <target>
|
||||||
|
|
||||||
This will put the FFmpeg sources into the directory <target> and let
|
This will put the FFmpeg sources into the directory <target> and let
|
||||||
you push back your changes to the remote repository.
|
you push back your changes to the remote repository.
|
||||||
@@ -98,7 +97,7 @@ I. BASICS:
|
|||||||
git log <filename(s)>
|
git log <filename(s)>
|
||||||
|
|
||||||
You may also use the graphical tools like gitview or gitk or the web
|
You may also use the graphical tools like gitview or gitk or the web
|
||||||
interface available at http://source.ffmpeg.org
|
interface available at http://git.videolan.org
|
||||||
|
|
||||||
6. Checking source tree status:
|
6. Checking source tree status:
|
||||||
|
|
||||||
@@ -206,19 +205,8 @@ I. BASICS:
|
|||||||
|
|
||||||
git format-patch <commit> [-o directory]
|
git format-patch <commit> [-o directory]
|
||||||
|
|
||||||
will generate a set of patches for each commit between <commit> and
|
will generate a set of patches out of the current branch starting from
|
||||||
current HEAD. E.g.
|
commit. By default the patches are created in the current directory.
|
||||||
|
|
||||||
git format-patch origin/master
|
|
||||||
|
|
||||||
will generate patches for all commits on current branch which are not
|
|
||||||
present in upstream.
|
|
||||||
A useful shortcut is also
|
|
||||||
|
|
||||||
git format-patch -n
|
|
||||||
|
|
||||||
which will generate patches from last n commits.
|
|
||||||
By default the patches are created in the current directory.
|
|
||||||
|
|
||||||
11. Sending patches for review
|
11. Sending patches for review
|
||||||
|
|
||||||
@@ -227,8 +215,6 @@ I. BASICS:
|
|||||||
will send the patches created by git format-patch or directly generates
|
will send the patches created by git format-patch or directly generates
|
||||||
them. All the email fields can be configured in the global/local
|
them. All the email fields can be configured in the global/local
|
||||||
configuration or overridden by command line.
|
configuration or overridden by command line.
|
||||||
Note that this tool must often be installed separately (e.g. git-email
|
|
||||||
package on Debian-based distros).
|
|
||||||
|
|
||||||
12. Pushing changes to remote trees
|
12. Pushing changes to remote trees
|
||||||
|
|
||||||
|
|||||||
444
doc/indevs.texi
444
doc/indevs.texi
@@ -42,7 +42,7 @@ specify card number or identifier, device number and subdevice number
|
|||||||
To see the list of cards currently recognized by your system check the
|
To see the list of cards currently recognized by your system check the
|
||||||
files @file{/proc/asound/cards} and @file{/proc/asound/devices}.
|
files @file{/proc/asound/cards} and @file{/proc/asound/devices}.
|
||||||
|
|
||||||
For example to capture with @command{ffmpeg} from an ALSA device with
|
For example to capture with @file{ffmpeg} from an ALSA device with
|
||||||
card id 0, you may run the command:
|
card id 0, you may run the command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f alsa -i hw:0 alsaout.wav
|
ffmpeg -f alsa -i hw:0 alsaout.wav
|
||||||
@@ -55,101 +55,6 @@ For more information see:
|
|||||||
|
|
||||||
BSD video input device.
|
BSD video input device.
|
||||||
|
|
||||||
@section dshow
|
|
||||||
|
|
||||||
Windows DirectShow input device.
|
|
||||||
|
|
||||||
DirectShow support is enabled when FFmpeg is built with the mingw-w64 project.
|
|
||||||
Currently only audio and video devices are supported.
|
|
||||||
|
|
||||||
Multiple devices may be opened as separate inputs, but they may also be
|
|
||||||
opened on the same input, which should improve synchronism between them.
|
|
||||||
|
|
||||||
The input name should be in the format:
|
|
||||||
|
|
||||||
@example
|
|
||||||
@var{TYPE}=@var{NAME}[:@var{TYPE}=@var{NAME}]
|
|
||||||
@end example
|
|
||||||
|
|
||||||
where @var{TYPE} can be either @var{audio} or @var{video},
|
|
||||||
and @var{NAME} is the device's name.
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
|
|
||||||
If no options are specified, the device's defaults are used.
|
|
||||||
If the device does not support the requested options, it will
|
|
||||||
fail to open.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item video_size
|
|
||||||
Set the video size in the captured video.
|
|
||||||
|
|
||||||
@item framerate
|
|
||||||
Set the framerate in the captured video.
|
|
||||||
|
|
||||||
@item sample_rate
|
|
||||||
Set the sample rate (in Hz) of the captured audio.
|
|
||||||
|
|
||||||
@item sample_size
|
|
||||||
Set the sample size (in bits) of the captured audio.
|
|
||||||
|
|
||||||
@item channels
|
|
||||||
Set the number of channels in the captured audio.
|
|
||||||
|
|
||||||
@item list_devices
|
|
||||||
If set to @option{true}, print a list of devices and exit.
|
|
||||||
|
|
||||||
@item list_options
|
|
||||||
If set to @option{true}, print a list of selected device's options
|
|
||||||
and exit.
|
|
||||||
|
|
||||||
@item video_device_number
|
|
||||||
Set video device number for devices with same name (starts at 0,
|
|
||||||
defaults to 0).
|
|
||||||
|
|
||||||
@item audio_device_number
|
|
||||||
Set audio device number for devices with same name (starts at 0,
|
|
||||||
defaults to 0).
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@subsection Examples
|
|
||||||
|
|
||||||
@itemize
|
|
||||||
|
|
||||||
@item
|
|
||||||
Print the list of DirectShow supported devices and exit:
|
|
||||||
@example
|
|
||||||
$ ffmpeg -list_devices true -f dshow -i dummy
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Open video device @var{Camera}:
|
|
||||||
@example
|
|
||||||
$ ffmpeg -f dshow -i video="Camera"
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Open second video device with name @var{Camera}:
|
|
||||||
@example
|
|
||||||
$ ffmpeg -f dshow -video_device_number 1 -i video="Camera"
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Open video device @var{Camera} and audio device @var{Microphone}:
|
|
||||||
@example
|
|
||||||
$ ffmpeg -f dshow -i video="Camera":audio="Microphone"
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Print the list of supported options in selected device and exit:
|
|
||||||
@example
|
|
||||||
$ ffmpeg -list_options true -f dshow -i video="Camera"
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@section dv1394
|
@section dv1394
|
||||||
|
|
||||||
Linux DV 1394 input device.
|
Linux DV 1394 input device.
|
||||||
@@ -167,14 +72,14 @@ For more detailed information read the file
|
|||||||
Documentation/fb/framebuffer.txt included in the Linux source tree.
|
Documentation/fb/framebuffer.txt included in the Linux source tree.
|
||||||
|
|
||||||
To record from the framebuffer device @file{/dev/fb0} with
|
To record from the framebuffer device @file{/dev/fb0} with
|
||||||
@command{ffmpeg}:
|
@file{ffmpeg}:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
|
ffmpeg -f fbdev -r 10 -i /dev/fb0 out.avi
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
You can take a single screenshot image with the command:
|
You can take a single screenshot image with the command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f fbdev -frames:v 1 -r 1 -i /dev/fb0 screenshot.jpeg
|
ffmpeg -f fbdev -vframes 1 -r 1 -i /dev/fb0 screenshot.jpeg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
|
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
|
||||||
@@ -196,15 +101,15 @@ device.
|
|||||||
Once you have created one or more JACK readable clients, you need to
|
Once you have created one or more JACK readable clients, you need to
|
||||||
connect them to one or more JACK writable clients.
|
connect them to one or more JACK writable clients.
|
||||||
|
|
||||||
To connect or disconnect JACK clients you can use the @command{jack_connect}
|
To connect or disconnect JACK clients you can use the
|
||||||
and @command{jack_disconnect} programs, or do it through a graphical interface,
|
@file{jack_connect} and @file{jack_disconnect} programs, or do it
|
||||||
for example with @command{qjackctl}.
|
through a graphical interface, for example with @file{qjackctl}.
|
||||||
|
|
||||||
To list the JACK clients and their properties you can invoke the command
|
To list the JACK clients and their properties you can invoke the command
|
||||||
@command{jack_lsp}.
|
@file{jack_lsp}.
|
||||||
|
|
||||||
Follows an example which shows how to capture a JACK readable client
|
Follows an example which shows how to capture a JACK readable client
|
||||||
with @command{ffmpeg}.
|
with @file{ffmpeg}.
|
||||||
@example
|
@example
|
||||||
# Create a JACK writable client with name "ffmpeg".
|
# Create a JACK writable client with name "ffmpeg".
|
||||||
$ ffmpeg -f jack -i ffmpeg -y out.wav
|
$ ffmpeg -f jack -i ffmpeg -y out.wav
|
||||||
@@ -228,165 +133,10 @@ $ jack_connect metro:120_bpm ffmpeg:input_1
|
|||||||
For more information read:
|
For more information read:
|
||||||
@url{http://jackaudio.org/}
|
@url{http://jackaudio.org/}
|
||||||
|
|
||||||
@section lavfi
|
|
||||||
|
|
||||||
Libavfilter input virtual device.
|
|
||||||
|
|
||||||
This input device reads data from the open output pads of a libavfilter
|
|
||||||
filtergraph.
|
|
||||||
|
|
||||||
For each filtergraph open output, the input device will create a
|
|
||||||
corresponding stream which is mapped to the generated output. Currently
|
|
||||||
only video data is supported. The filtergraph is specified through the
|
|
||||||
option @option{graph}.
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item graph
|
|
||||||
Specify the filtergraph to use as input. Each video open output must be
|
|
||||||
labelled by a unique string of the form "out@var{N}", where @var{N} is a
|
|
||||||
number starting from 0 corresponding to the mapped input stream
|
|
||||||
generated by the device.
|
|
||||||
The first unlabelled output is automatically assigned to the "out0"
|
|
||||||
label, but all the others need to be specified explicitly.
|
|
||||||
|
|
||||||
If not specified defaults to the filename specified for the input
|
|
||||||
device.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@subsection Examples
|
|
||||||
|
|
||||||
@itemize
|
|
||||||
@item
|
|
||||||
Create a color video stream and play it back with @command{ffplay}:
|
|
||||||
@example
|
|
||||||
ffplay -f lavfi -graph "color=pink [out0]" dummy
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
As the previous example, but use filename for specifying the graph
|
|
||||||
description, and omit the "out0" label:
|
|
||||||
@example
|
|
||||||
ffplay -f lavfi color=pink
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Create three different video test filtered sources and play them:
|
|
||||||
@example
|
|
||||||
ffplay -f lavfi -graph "testsrc [out0]; testsrc,hflip [out1]; testsrc,negate [out2]" test3
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Read an audio stream from a file using the amovie source and play it
|
|
||||||
back with @command{ffplay}:
|
|
||||||
@example
|
|
||||||
ffplay -f lavfi "amovie=test.wav"
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Read an audio stream and a video stream and play it back with
|
|
||||||
@command{ffplay}:
|
|
||||||
@example
|
|
||||||
ffplay -f lavfi "movie=test.avi[out0];amovie=test.wav[out1]"
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@section libdc1394
|
@section libdc1394
|
||||||
|
|
||||||
IIDC1394 input device, based on libdc1394 and libraw1394.
|
IIDC1394 input device, based on libdc1394 and libraw1394.
|
||||||
|
|
||||||
@section openal
|
|
||||||
|
|
||||||
The OpenAL input device provides audio capture on all systems with a
|
|
||||||
working OpenAL 1.1 implementation.
|
|
||||||
|
|
||||||
To enable this input device during configuration, you need OpenAL
|
|
||||||
headers and libraries installed on your system, and need to configure
|
|
||||||
FFmpeg with @code{--enable-openal}.
|
|
||||||
|
|
||||||
OpenAL headers and libraries should be provided as part of your OpenAL
|
|
||||||
implementation, or as an additional download (an SDK). Depending on your
|
|
||||||
installation you may need to specify additional flags via the
|
|
||||||
@code{--extra-cflags} and @code{--extra-ldflags} for allowing the build
|
|
||||||
system to locate the OpenAL headers and libraries.
|
|
||||||
|
|
||||||
An incomplete list of OpenAL implementations follows:
|
|
||||||
|
|
||||||
@table @strong
|
|
||||||
@item Creative
|
|
||||||
The official Windows implementation, providing hardware acceleration
|
|
||||||
with supported devices and software fallback.
|
|
||||||
See @url{http://openal.org/}.
|
|
||||||
@item OpenAL Soft
|
|
||||||
Portable, open source (LGPL) software implementation. Includes
|
|
||||||
backends for the most common sound APIs on the Windows, Linux,
|
|
||||||
Solaris, and BSD operating systems.
|
|
||||||
See @url{http://kcat.strangesoft.net/openal.html}.
|
|
||||||
@item Apple
|
|
||||||
OpenAL is part of Core Audio, the official Mac OS X Audio interface.
|
|
||||||
See @url{http://developer.apple.com/technologies/mac/audio-and-video.html}
|
|
||||||
@end table
|
|
||||||
|
|
||||||
This device allows to capture from an audio input device handled
|
|
||||||
through OpenAL.
|
|
||||||
|
|
||||||
You need to specify the name of the device to capture in the provided
|
|
||||||
filename. If the empty string is provided, the device will
|
|
||||||
automatically select the default device. You can get the list of the
|
|
||||||
supported devices by using the option @var{list_devices}.
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item channels
|
|
||||||
Set the number of channels in the captured audio. Only the values
|
|
||||||
@option{1} (monaural) and @option{2} (stereo) are currently supported.
|
|
||||||
Defaults to @option{2}.
|
|
||||||
|
|
||||||
@item sample_size
|
|
||||||
Set the sample size (in bits) of the captured audio. Only the values
|
|
||||||
@option{8} and @option{16} are currently supported. Defaults to
|
|
||||||
@option{16}.
|
|
||||||
|
|
||||||
@item sample_rate
|
|
||||||
Set the sample rate (in Hz) of the captured audio.
|
|
||||||
Defaults to @option{44.1k}.
|
|
||||||
|
|
||||||
@item list_devices
|
|
||||||
If set to @option{true}, print a list of devices and exit.
|
|
||||||
Defaults to @option{false}.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@subsection Examples
|
|
||||||
|
|
||||||
Print the list of OpenAL supported devices and exit:
|
|
||||||
@example
|
|
||||||
$ ffmpeg -list_devices true -f openal -i dummy out.ogg
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Capture from the OpenAL device @file{DR-BT101 via PulseAudio}:
|
|
||||||
@example
|
|
||||||
$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out.ogg
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Capture from the default device (note the empty string '' as filename):
|
|
||||||
@example
|
|
||||||
$ ffmpeg -f openal -i '' out.ogg
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Capture from two devices simultaneously, writing to two different files,
|
|
||||||
within the same @command{ffmpeg} command:
|
|
||||||
@example
|
|
||||||
$ ffmpeg -f openal -i 'DR-BT101 via PulseAudio' out1.ogg -f openal -i 'ALSA Default' out2.ogg
|
|
||||||
@end example
|
|
||||||
Note: not all OpenAL implementations support multiple simultaneous capture -
|
|
||||||
try the latest OpenAL Soft if the above does not work.
|
|
||||||
|
|
||||||
@section oss
|
@section oss
|
||||||
|
|
||||||
Open Sound System input device.
|
Open Sound System input device.
|
||||||
@@ -395,7 +145,7 @@ The filename to provide to the input device is the device node
|
|||||||
representing the OSS input device, and is usually set to
|
representing the OSS input device, and is usually set to
|
||||||
@file{/dev/dsp}.
|
@file{/dev/dsp}.
|
||||||
|
|
||||||
For example to grab from @file{/dev/dsp} using @command{ffmpeg} use the
|
For example to grab from @file{/dev/dsp} using @file{ffmpeg} use the
|
||||||
command:
|
command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
|
ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
|
||||||
@@ -404,89 +154,6 @@ ffmpeg -f oss -i /dev/dsp /tmp/oss.wav
|
|||||||
For more information about OSS see:
|
For more information about OSS see:
|
||||||
@url{http://manuals.opensound.com/usersguide/dsp.html}
|
@url{http://manuals.opensound.com/usersguide/dsp.html}
|
||||||
|
|
||||||
@section pulse
|
|
||||||
|
|
||||||
pulseaudio input device.
|
|
||||||
|
|
||||||
To enable this input device during configuration you need libpulse-simple
|
|
||||||
installed in your system.
|
|
||||||
|
|
||||||
The filename to provide to the input device is a source device or the
|
|
||||||
string "default"
|
|
||||||
|
|
||||||
To list the pulse source devices and their properties you can invoke
|
|
||||||
the command @command{pactl list sources}.
|
|
||||||
|
|
||||||
@example
|
|
||||||
ffmpeg -f pulse -i default /tmp/pulse.wav
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@subsection @var{server} AVOption
|
|
||||||
|
|
||||||
The syntax is:
|
|
||||||
@example
|
|
||||||
-server @var{server name}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Connects to a specific server.
|
|
||||||
|
|
||||||
@subsection @var{name} AVOption
|
|
||||||
|
|
||||||
The syntax is:
|
|
||||||
@example
|
|
||||||
-name @var{application name}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Specify the application name pulse will use when showing active clients,
|
|
||||||
by default it is the LIBAVFORMAT_IDENT string
|
|
||||||
|
|
||||||
@subsection @var{stream_name} AVOption
|
|
||||||
|
|
||||||
The syntax is:
|
|
||||||
@example
|
|
||||||
-stream_name @var{stream name}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Specify the stream name pulse will use when showing active streams,
|
|
||||||
by default it is "record"
|
|
||||||
|
|
||||||
@subsection @var{sample_rate} AVOption
|
|
||||||
|
|
||||||
The syntax is:
|
|
||||||
@example
|
|
||||||
-sample_rate @var{samplerate}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Specify the samplerate in Hz, by default 48kHz is used.
|
|
||||||
|
|
||||||
@subsection @var{channels} AVOption
|
|
||||||
|
|
||||||
The syntax is:
|
|
||||||
@example
|
|
||||||
-channels @var{N}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Specify the channels in use, by default 2 (stereo) is set.
|
|
||||||
|
|
||||||
@subsection @var{frame_size} AVOption
|
|
||||||
|
|
||||||
The syntax is:
|
|
||||||
@example
|
|
||||||
-frame_size @var{bytes}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Specify the number of byte per frame, by default it is set to 1024.
|
|
||||||
|
|
||||||
@subsection @var{fragment_size} AVOption
|
|
||||||
|
|
||||||
The syntax is:
|
|
||||||
@example
|
|
||||||
-fragment_size @var{bytes}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Specify the minimal buffering fragment in pulseaudio, it will affect the
|
|
||||||
audio latency. By default it is unset.
|
|
||||||
|
|
||||||
@section sndio
|
@section sndio
|
||||||
|
|
||||||
sndio input device.
|
sndio input device.
|
||||||
@@ -498,15 +165,15 @@ The filename to provide to the input device is the device node
|
|||||||
representing the sndio input device, and is usually set to
|
representing the sndio input device, and is usually set to
|
||||||
@file{/dev/audio0}.
|
@file{/dev/audio0}.
|
||||||
|
|
||||||
For example to grab from @file{/dev/audio0} using @command{ffmpeg} use the
|
For example to grab from @file{/dev/audio0} using @file{ffmpeg} use the
|
||||||
command:
|
command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
|
ffmpeg -f sndio -i /dev/audio0 /tmp/oss.wav
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section video4linux2
|
@section video4linux and video4linux2
|
||||||
|
|
||||||
Video4Linux2 input video device.
|
Video4Linux and Video4Linux2 input video devices.
|
||||||
|
|
||||||
The name of the device to grab is a file device node, usually Linux
|
The name of the device to grab is a file device node, usually Linux
|
||||||
systems tend to automatically create such nodes when the device
|
systems tend to automatically create such nodes when the device
|
||||||
@@ -514,33 +181,35 @@ systems tend to automatically create such nodes when the device
|
|||||||
kind @file{/dev/video@var{N}}, where @var{N} is a number associated to
|
kind @file{/dev/video@var{N}}, where @var{N} is a number associated to
|
||||||
the device.
|
the device.
|
||||||
|
|
||||||
Video4Linux2 devices usually support a limited set of
|
Video4Linux and Video4Linux2 devices only support a limited set of
|
||||||
@var{width}x@var{height} sizes and framerates. You can check which are
|
@var{width}x@var{height} sizes and framerates. You can check which are
|
||||||
supported using @command{-list_formats all} for Video4Linux2 devices.
|
supported for example with the command @file{dov4l} for Video4Linux
|
||||||
|
devices and the command @file{v4l-info} for Video4Linux2 devices.
|
||||||
|
|
||||||
Some usage examples of the video4linux2 devices with ffmpeg and ffplay:
|
If the size for the device is set to 0x0, the input device will
|
||||||
|
try to autodetect the size to use.
|
||||||
|
Only for the video4linux2 device, if the frame rate is set to 0/0 the
|
||||||
|
input device will use the frame rate value already set in the driver.
|
||||||
|
|
||||||
The time base for the timestamps is 1 microsecond. Depending on the kernel
|
Video4Linux support is deprecated since Linux 2.6.30, and will be
|
||||||
version and configuration, the timestamps may be derived from the real time
|
dropped in later versions.
|
||||||
clock (origin at the Unix Epoch) or the monotonic clock (origin usually at
|
|
||||||
boot time, unaffected by NTP or manual changes to the clock). The
|
|
||||||
@option{-timestamps abs} or @option{-ts abs} option can be used to force
|
|
||||||
conversion into the real time clock.
|
|
||||||
|
|
||||||
Note that if FFmpeg is build with v4l-utils support ("--enable-libv4l2"
|
Follow some usage examples of the video4linux devices with the ff*
|
||||||
option), it will always be used.
|
tools.
|
||||||
@example
|
@example
|
||||||
# Grab and show the input of a video4linux2 device.
|
# Grab and show the input of a video4linux device, frame rate is set
|
||||||
ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
|
# to the default of 25/1.
|
||||||
|
ffplay -s 320x240 -f video4linux /dev/video0
|
||||||
|
|
||||||
# Grab and record the input of a video4linux2 device, leave the
|
# Grab and show the input of a video4linux2 device, autoadjust size.
|
||||||
framerate and size as previously set.
|
ffplay -f video4linux2 /dev/video0
|
||||||
ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
|
|
||||||
|
# Grab and record the input of a video4linux2 device, autoadjust size,
|
||||||
|
# frame rate value defaults to 0/0 so it is read from the video4linux2
|
||||||
|
# driver.
|
||||||
|
ffmpeg -f video4linux2 -i /dev/video0 out.mpeg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
"v4l" and "v4l2" can be used as aliases for the respective "video4linux" and
|
|
||||||
"video4linux2".
|
|
||||||
|
|
||||||
@section vfwcap
|
@section vfwcap
|
||||||
|
|
||||||
VfW (Video for Windows) capture input device.
|
VfW (Video for Windows) capture input device.
|
||||||
@@ -562,7 +231,7 @@ The filename passed as input has the syntax:
|
|||||||
|
|
||||||
@var{hostname}:@var{display_number}.@var{screen_number} specifies the
|
@var{hostname}:@var{display_number}.@var{screen_number} specifies the
|
||||||
X11 display name of the screen to grab from. @var{hostname} can be
|
X11 display name of the screen to grab from. @var{hostname} can be
|
||||||
omitted, and defaults to "localhost". The environment variable
|
ommitted, and defaults to "localhost". The environment variable
|
||||||
@env{DISPLAY} contains the default display name.
|
@env{DISPLAY} contains the default display name.
|
||||||
|
|
||||||
@var{x_offset} and @var{y_offset} specify the offsets of the grabbed
|
@var{x_offset} and @var{y_offset} specify the offsets of the grabbed
|
||||||
@@ -571,54 +240,15 @@ default to 0.
|
|||||||
|
|
||||||
Check the X11 documentation (e.g. man X) for more detailed information.
|
Check the X11 documentation (e.g. man X) for more detailed information.
|
||||||
|
|
||||||
Use the @command{dpyinfo} program for getting basic information about the
|
Use the @file{dpyinfo} program for getting basic information about the
|
||||||
properties of your X11 display (e.g. grep for "name" or "dimensions").
|
properties of your X11 display (e.g. grep for "name" or "dimensions").
|
||||||
|
|
||||||
For example to grab from @file{:0.0} using @command{ffmpeg}:
|
For example to grab from @file{:0.0} using @file{ffmpeg}:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
|
ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
|
||||||
|
|
||||||
# Grab at position 10,20.
|
# Grab at position 10,20.
|
||||||
ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
|
ffmpeg -f x11grab -25 -s cif -i :0.0+10,20 out.mpg
|
||||||
@end example
|
|
||||||
|
|
||||||
@subsection @var{follow_mouse} AVOption
|
|
||||||
|
|
||||||
The syntax is:
|
|
||||||
@example
|
|
||||||
-follow_mouse centered|@var{PIXELS}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
When it is specified with "centered", the grabbing region follows the mouse
|
|
||||||
pointer and keeps the pointer at the center of region; otherwise, the region
|
|
||||||
follows only when the mouse pointer reaches within @var{PIXELS} (greater than
|
|
||||||
zero) to the edge of region.
|
|
||||||
|
|
||||||
For example:
|
|
||||||
@example
|
|
||||||
ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
|
|
||||||
|
|
||||||
# Follows only when the mouse pointer reaches within 100 pixels to edge
|
|
||||||
ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@subsection @var{show_region} AVOption
|
|
||||||
|
|
||||||
The syntax is:
|
|
||||||
@example
|
|
||||||
-show_region 1
|
|
||||||
@end example
|
|
||||||
|
|
||||||
If @var{show_region} AVOption is specified with @var{1}, then the grabbing
|
|
||||||
region will be indicated on screen. With this option, it's easy to know what is
|
|
||||||
being grabbed if only a portion of the screen is grabbed.
|
|
||||||
|
|
||||||
For example:
|
|
||||||
@example
|
|
||||||
ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
|
|
||||||
|
|
||||||
# With follow_mouse
|
|
||||||
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg
|
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@c man end INPUT DEVICES
|
@c man end INPUT DEVICES
|
||||||
|
|||||||
@@ -5,42 +5,32 @@ NOTE: This is a draft.
|
|||||||
|
|
||||||
Overview:
|
Overview:
|
||||||
---------
|
---------
|
||||||
|
|
||||||
FFmpeg uses Trac for tracking issues, new issues and changes to
|
FFmpeg uses Trac for tracking issues, new issues and changes to
|
||||||
existing issues can be done through a web interface.
|
existing issues can be done through a web interface.
|
||||||
|
|
||||||
Issues can be different kinds of things we want to keep track of
|
|
||||||
but that do not belong into the source tree itself. This includes
|
|
||||||
bug reports, patches, feature requests and license violations. We
|
|
||||||
might add more items to this list in the future, so feel free to
|
|
||||||
propose a new `type of issue' on the ffmpeg-devel mailing list if
|
|
||||||
you feel it is worth tracking.
|
|
||||||
|
|
||||||
It is possible to subscribe to individual issues by adding yourself to the
|
It is possible to subscribe to individual issues by adding yourself to the
|
||||||
Cc list or to subscribe to the ffmpeg-trac mailing list which receives
|
nosy list or to subscribe to the ffmpeg-issues mailing list which receives
|
||||||
a mail for every change to every issue.
|
a mail for every change to every issue. Replies to such mails will also
|
||||||
|
be properly added to the respective issue.
|
||||||
(the above does all work already after light testing)
|
(the above does all work already after light testing)
|
||||||
|
|
||||||
The subscription URL for the ffmpeg-trac list is:
|
The subscription URL for the ffmpeg-trac list is:
|
||||||
http(s)://ffmpeg.org/mailman/listinfo/ffmpeg-trac
|
http(s)://ffmpeg.org/mailman/listinfo/ffmpeg-trac
|
||||||
The URL of the webinterface of the tracker is:
|
The URL of the webinterface of the tracker is:
|
||||||
http(s)://ffmpeg.org/trac/ffmpeg
|
http(s)://ffmpeg.org/trac/ffmpeg
|
||||||
|
|
||||||
|
NOTE: issue = (bug report || patch || feature request)
|
||||||
|
|
||||||
Type:
|
Type:
|
||||||
-----
|
-----
|
||||||
bug / defect
|
bug
|
||||||
An error, flaw, mistake, failure, or fault in FFmpeg or libav* that
|
An error, flaw, mistake, failure, or fault in FFmpeg or libav* that
|
||||||
prevents it from behaving as intended.
|
prevents it from behaving as intended.
|
||||||
|
|
||||||
feature request / enhancement
|
feature request
|
||||||
Request of support for encoding or decoding of a new codec, container
|
Request of support for encoding or decoding of a new codec, container
|
||||||
or variant.
|
or variant.
|
||||||
Request of support for more, less or plain different output or behavior
|
Request of support for more, less or plain different output or behavior
|
||||||
where the current implementation cannot be considered wrong.
|
where the current implementation cannot be considered wrong.
|
||||||
|
|
||||||
license violation
|
|
||||||
ticket to keep track of (L)GPL violations of ffmpeg by others
|
|
||||||
|
|
||||||
patch
|
patch
|
||||||
A patch as generated by diff which conforms to the patch submission and
|
A patch as generated by diff which conforms to the patch submission and
|
||||||
development policy.
|
development policy.
|
||||||
@@ -61,8 +51,6 @@ important
|
|||||||
the separation to normal is somewhat fuzzy.
|
the separation to normal is somewhat fuzzy.
|
||||||
For feature requests this priority would be used for things many people
|
For feature requests this priority would be used for things many people
|
||||||
want.
|
want.
|
||||||
Regressions also should be marked as important, regressions are bugs that
|
|
||||||
don't exist in a past revision or another branch.
|
|
||||||
|
|
||||||
normal
|
normal
|
||||||
|
|
||||||
@@ -92,17 +80,6 @@ closed
|
|||||||
final state
|
final state
|
||||||
|
|
||||||
|
|
||||||
Analyzed flag:
|
|
||||||
--------------
|
|
||||||
Bugs which have been analyzed and where it is understood what causes them
|
|
||||||
and which exact chain of events triggers them. This analysis should be
|
|
||||||
available as a message in the bug report.
|
|
||||||
Note, do not change the status to analyzed without also providing a clear
|
|
||||||
and understandable analysis.
|
|
||||||
This state implicates that the bug either has been reproduced or that
|
|
||||||
reproduction is not needed as the bug is already understood.
|
|
||||||
|
|
||||||
|
|
||||||
Type/Status/Substatus:
|
Type/Status/Substatus:
|
||||||
----------
|
----------
|
||||||
*/new/new
|
*/new/new
|
||||||
@@ -130,6 +107,24 @@ Type/Status/Substatus:
|
|||||||
Issues for which some information has been requested by the developers,
|
Issues for which some information has been requested by the developers,
|
||||||
but which has not been provided by anyone within reasonable time.
|
but which has not been provided by anyone within reasonable time.
|
||||||
|
|
||||||
|
bug/open/reproduced
|
||||||
|
Bugs which have been reproduced.
|
||||||
|
|
||||||
|
bug/open/analyzed
|
||||||
|
Bugs which have been analyzed and where it is understood what causes them
|
||||||
|
and which exact chain of events triggers them. This analysis should be
|
||||||
|
available as a message in the bug report.
|
||||||
|
Note, do not change the status to analyzed without also providing a clear
|
||||||
|
and understandable analysis.
|
||||||
|
This state implicates that the bug either has been reproduced or that
|
||||||
|
reproduction is not needed as the bug is already understood.
|
||||||
|
|
||||||
|
bug/open/needs_more_info
|
||||||
|
Bug reports which are incomplete and or where more information is needed
|
||||||
|
from the submitter or another person who can provide it.
|
||||||
|
This state implicates that the bug has not been analyzed or reproduced.
|
||||||
|
Note, the idea behind needs_more_info is to offload work from the
|
||||||
|
developers to the users whenever possible.
|
||||||
|
|
||||||
bug/closed/fixed
|
bug/closed/fixed
|
||||||
Bugs which have to the best of our knowledge been fixed.
|
Bugs which have to the best of our knowledge been fixed.
|
||||||
@@ -163,6 +158,10 @@ patch/closed/applied
|
|||||||
patch/closed/rejected
|
patch/closed/rejected
|
||||||
Patches which have been rejected.
|
Patches which have been rejected.
|
||||||
|
|
||||||
|
feature_request/open/needs_more_info
|
||||||
|
Feature requests where it is not clear what exactly is wanted
|
||||||
|
(these also could be closed as invalid ...).
|
||||||
|
|
||||||
feature_request/closed/implemented
|
feature_request/closed/implemented
|
||||||
Feature requests which have been implemented.
|
Feature requests which have been implemented.
|
||||||
|
|
||||||
@@ -174,10 +173,12 @@ Note, please do not use type-status-substatus combinations other than the
|
|||||||
above without asking on ffmpeg-dev first!
|
above without asking on ffmpeg-dev first!
|
||||||
|
|
||||||
Note2, if you provide the requested info do not forget to remove the
|
Note2, if you provide the requested info do not forget to remove the
|
||||||
needs_more_info substatus.
|
needs_more_info substate.
|
||||||
|
|
||||||
Component:
|
Topic:
|
||||||
----------
|
------
|
||||||
|
A topic is a tag you should add to your issue in order to make grouping them
|
||||||
|
easier.
|
||||||
|
|
||||||
avcodec
|
avcodec
|
||||||
issues in libavcodec/*
|
issues in libavcodec/*
|
||||||
@@ -197,9 +198,6 @@ ffmpeg
|
|||||||
ffplay
|
ffplay
|
||||||
issues in or related to ffplay.c
|
issues in or related to ffplay.c
|
||||||
|
|
||||||
ffprobe
|
|
||||||
issues in or related to ffprobe.c
|
|
||||||
|
|
||||||
ffserver
|
ffserver
|
||||||
issues in or related to ffserver.c
|
issues in or related to ffserver.c
|
||||||
|
|
||||||
@@ -207,7 +205,7 @@ build system
|
|||||||
issues in or related to configure/Makefile
|
issues in or related to configure/Makefile
|
||||||
|
|
||||||
regression
|
regression
|
||||||
bugs which were not present in a past revision
|
bugs which were working in a past revision
|
||||||
|
|
||||||
trac
|
roundup
|
||||||
issues related to our issue tracker
|
issues related to our issue tracker
|
||||||
|
|||||||
@@ -14,8 +14,20 @@
|
|||||||
Libavfilter is the filtering API of FFmpeg. It is the substitute of the
|
Libavfilter is the filtering API of FFmpeg. It is the substitute of the
|
||||||
now deprecated 'vhooks' and started as a Google Summer of Code project.
|
now deprecated 'vhooks' and started as a Google Summer of Code project.
|
||||||
|
|
||||||
Audio filtering integration into the main FFmpeg repository is a work in
|
Integrating libavfilter into the main FFmpeg repository is a work in
|
||||||
progress, so audio API and ABI should not be considered stable yet.
|
progress. If you wish to try the unfinished development code of
|
||||||
|
libavfilter then check it out from the libavfilter repository into
|
||||||
|
some directory of your choice by:
|
||||||
|
|
||||||
|
@example
|
||||||
|
svn checkout svn://svn.ffmpeg.org/soc/libavfilter
|
||||||
|
@end example
|
||||||
|
|
||||||
|
And then read the README file in the top directory to learn how to
|
||||||
|
integrate it into ffmpeg and ffplay.
|
||||||
|
|
||||||
|
But note that there may still be serious bugs in the code and its API
|
||||||
|
and ABI should not be considered stable yet!
|
||||||
|
|
||||||
@chapter Tutorial
|
@chapter Tutorial
|
||||||
|
|
||||||
@@ -36,20 +48,21 @@ and the vflip filter before merging it back with the other stream by
|
|||||||
overlaying it on top. You can use the following command to achieve this:
|
overlaying it on top. You can use the following command to achieve this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -i input -vf "[in] split [T1], fifo, [T2] overlay=0:H/2 [out]; [T1] fifo, crop=iw:ih/2:0:ih/2, vflip [T2]" output
|
./ffmpeg -i in.avi -s 240x320 -vf "[in] split [T1], fifo, [T2] overlay= 0:240 [out]; [T1] fifo, crop=0:0:-1:240, vflip [T2]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The result will be that in output the top half of the video is mirrored
|
where input_video.avi has a vertical resolution of 480 pixels. The
|
||||||
|
result will be that in output the top half of the video is mirrored
|
||||||
onto the bottom half.
|
onto the bottom half.
|
||||||
|
|
||||||
Video filters are loaded using the @var{-vf} option passed to
|
Video filters are loaded using the @var{-vf} option passed to
|
||||||
@command{ffmpeg} or to @command{ffplay}. Filters in the same linear
|
ffmpeg or to ffplay. Filters in the same linear chain are separated by
|
||||||
chain are separated by commas. In our example, @var{split, fifo,
|
commas. In our example, @var{split, fifo, overlay} are in one linear
|
||||||
overlay} are in one linear chain, and @var{fifo, crop, vflip} are in
|
chain, and @var{fifo, crop, vflip} are in another. The points where
|
||||||
another. The points where the linear chains join are labeled by names
|
the linear chains join are labeled by names enclosed in square
|
||||||
enclosed in square brackets. In our example, that is @var{[T1]} and
|
brackets. In our example, that is @var{[T1]} and @var{[T2]}. The magic
|
||||||
@var{[T2]}. The magic labels @var{[in]} and @var{[out]} are the points
|
labels @var{[in]} and @var{[out]} are the points where video is input
|
||||||
where video is input and output.
|
and output.
|
||||||
|
|
||||||
Some filters take in input a list of parameters: they are specified
|
Some filters take in input a list of parameters: they are specified
|
||||||
after the filter name and an equal sign, and are separated each other
|
after the filter name and an equal sign, and are separated each other
|
||||||
|
|||||||
255
doc/muxers.texi
255
doc/muxers.texi
@@ -43,93 +43,53 @@ You can print the CRC to stdout with the command:
|
|||||||
ffmpeg -i INPUT -f crc -
|
ffmpeg -i INPUT -f crc -
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
You can select the output format of each frame with @command{ffmpeg} by
|
You can select the output format of each frame with @file{ffmpeg} by
|
||||||
specifying the audio and video codec and format. For example to
|
specifying the audio and video codec and format. For example to
|
||||||
compute the CRC of the input audio converted to PCM unsigned 8-bit
|
compute the CRC of the input audio converted to PCM unsigned 8-bit
|
||||||
and the input video converted to MPEG-2 video, use the command:
|
and the input video converted to MPEG-2 video, use the command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f crc -
|
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f crc -
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
See also the @ref{framecrc} muxer.
|
See also the @code{framecrc} muxer (@pxref{framecrc}).
|
||||||
|
|
||||||
@anchor{framecrc}
|
@anchor{framecrc}
|
||||||
@section framecrc
|
@section framecrc
|
||||||
|
|
||||||
Per-packet CRC (Cyclic Redundancy Check) testing format.
|
Per-frame CRC (Cyclic Redundancy Check) testing format.
|
||||||
|
|
||||||
This muxer computes and prints the Adler-32 CRC for each audio
|
This muxer computes and prints the Adler-32 CRC for each decoded audio
|
||||||
and video packet. By default audio frames are converted to signed
|
and video frame. By default audio frames are converted to signed
|
||||||
16-bit raw audio and video frames to raw video before computing the
|
16-bit raw audio and video frames to raw video before computing the
|
||||||
CRC.
|
CRC.
|
||||||
|
|
||||||
The output of the muxer consists of a line for each audio and video
|
The output of the muxer consists of a line for each audio and video
|
||||||
packet of the form:
|
frame of the form: @var{stream_index}, @var{frame_dts},
|
||||||
@example
|
@var{frame_size}, 0x@var{CRC}, where @var{CRC} is a hexadecimal
|
||||||
@var{stream_index}, @var{packet_dts}, @var{packet_pts}, @var{packet_duration}, @var{packet_size}, 0x@var{CRC}
|
number 0-padded to 8 digits containing the CRC of the decoded frame.
|
||||||
@end example
|
|
||||||
|
|
||||||
@var{CRC} is a hexadecimal number 0-padded to 8 digits containing the
|
For example to compute the CRC of each decoded frame in the input, and
|
||||||
CRC of the packet.
|
store it in the file @file{out.crc}:
|
||||||
|
|
||||||
For example to compute the CRC of the audio and video frames in
|
|
||||||
@file{INPUT}, converted to raw audio and video packets, and store it
|
|
||||||
in the file @file{out.crc}:
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -i INPUT -f framecrc out.crc
|
ffmpeg -i INPUT -f framecrc out.crc
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
To print the information to stdout, use the command:
|
You can print the CRC of each decoded frame to stdout with the command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i INPUT -f framecrc -
|
ffmpeg -i INPUT -f framecrc -
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
With @command{ffmpeg}, you can select the output format to which the
|
You can select the output format of each frame with @file{ffmpeg} by
|
||||||
audio and video frames are encoded before computing the CRC for each
|
specifying the audio and video codec and format. For example, to
|
||||||
packet by specifying the audio and video codec. For example, to
|
|
||||||
compute the CRC of each decoded input audio frame converted to PCM
|
compute the CRC of each decoded input audio frame converted to PCM
|
||||||
unsigned 8-bit and of each decoded input video frame converted to
|
unsigned 8-bit and of each decoded input video frame converted to
|
||||||
MPEG-2 video, use the command:
|
MPEG-2 video, use the command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i INPUT -c:a pcm_u8 -c:v mpeg2video -f framecrc -
|
ffmpeg -i INPUT -acodec pcm_u8 -vcodec mpeg2video -f framecrc -
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
See also the @ref{crc} muxer.
|
See also the @code{crc} muxer (@pxref{crc}).
|
||||||
|
|
||||||
@anchor{framemd5}
|
|
||||||
@section framemd5
|
|
||||||
|
|
||||||
Per-packet MD5 testing format.
|
|
||||||
|
|
||||||
This muxer computes and prints the MD5 hash for each audio
|
|
||||||
and video packet. By default audio frames are converted to signed
|
|
||||||
16-bit raw audio and video frames to raw video before computing the
|
|
||||||
hash.
|
|
||||||
|
|
||||||
The output of the muxer consists of a line for each audio and video
|
|
||||||
packet of the form:
|
|
||||||
@example
|
|
||||||
@var{stream_index}, @var{packet_dts}, @var{packet_pts}, @var{packet_duration}, @var{packet_size}, @var{MD5}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@var{MD5} is a hexadecimal number representing the computed MD5 hash
|
|
||||||
for the packet.
|
|
||||||
|
|
||||||
For example to compute the MD5 of the audio and video frames in
|
|
||||||
@file{INPUT}, converted to raw audio and video packets, and store it
|
|
||||||
in the file @file{out.md5}:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -f framemd5 out.md5
|
|
||||||
@end example
|
|
||||||
|
|
||||||
To print the information to stdout, use the command:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -f framemd5 -
|
|
||||||
@end example
|
|
||||||
|
|
||||||
See also the @ref{md5} muxer.
|
|
||||||
|
|
||||||
@anchor{image2}
|
|
||||||
@section image2
|
@section image2
|
||||||
|
|
||||||
Image file muxer.
|
Image file muxer.
|
||||||
@@ -159,26 +119,26 @@ The pattern "img%%-%d.jpg" will specify a sequence of filenames of the
|
|||||||
form @file{img%-1.jpg}, @file{img%-2.jpg}, ..., @file{img%-10.jpg},
|
form @file{img%-1.jpg}, @file{img%-2.jpg}, ..., @file{img%-10.jpg},
|
||||||
etc.
|
etc.
|
||||||
|
|
||||||
The following example shows how to use @command{ffmpeg} for creating a
|
The following example shows how to use @file{ffmpeg} for creating a
|
||||||
sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ...,
|
sequence of files @file{img-001.jpeg}, @file{img-002.jpeg}, ...,
|
||||||
taking one image every second from the input video:
|
taking one image every second from the input video:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i in.avi -vsync 1 -r 1 -f image2 'img-%03d.jpeg'
|
ffmpeg -i in.avi -r 1 -f image2 'img-%03d.jpeg'
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Note that with @command{ffmpeg}, if the format is not specified with the
|
Note that with @file{ffmpeg}, if the format is not specified with the
|
||||||
@code{-f} option and the output filename specifies an image file
|
@code{-f} option and the output filename specifies an image file
|
||||||
format, the image2 muxer is automatically selected, so the previous
|
format, the image2 muxer is automatically selected, so the previous
|
||||||
command can be written as:
|
command can be written as:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i in.avi -vsync 1 -r 1 'img-%03d.jpeg'
|
ffmpeg -i in.avi -r 1 'img-%03d.jpeg'
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Note also that the pattern must not necessarily contain "%d" or
|
Note also that the pattern must not necessarily contain "%d" or
|
||||||
"%0@var{N}d", for example to create a single image file
|
"%0@var{N}d", for example to create a single image file
|
||||||
@file{img.jpeg} from the input video you can employ the command:
|
@file{img.jpeg} from the input video you can employ the command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg
|
ffmpeg -i in.avi -f image2 -vframes 1 img.jpeg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The image muxer supports the .Y.U.V image file format. This format is
|
The image muxer supports the .Y.U.V image file format. This format is
|
||||||
@@ -187,104 +147,6 @@ each of the YUV420P components. To read or write this image file format,
|
|||||||
specify the name of the '.Y' file. The muxer will automatically open the
|
specify the name of the '.Y' file. The muxer will automatically open the
|
||||||
'.U' and '.V' files as required.
|
'.U' and '.V' files as required.
|
||||||
|
|
||||||
@anchor{md5}
|
|
||||||
@section md5
|
|
||||||
|
|
||||||
MD5 testing format.
|
|
||||||
|
|
||||||
This muxer computes and prints the MD5 hash of all the input audio
|
|
||||||
and video frames. By default audio frames are converted to signed
|
|
||||||
16-bit raw audio and video frames to raw video before computing the
|
|
||||||
hash.
|
|
||||||
|
|
||||||
The output of the muxer consists of a single line of the form:
|
|
||||||
MD5=@var{MD5}, where @var{MD5} is a hexadecimal number representing
|
|
||||||
the computed MD5 hash.
|
|
||||||
|
|
||||||
For example to compute the MD5 hash of the input converted to raw
|
|
||||||
audio and video, and store it in the file @file{out.md5}:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -f md5 out.md5
|
|
||||||
@end example
|
|
||||||
|
|
||||||
You can print the MD5 to stdout with the command:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -f md5 -
|
|
||||||
@end example
|
|
||||||
|
|
||||||
See also the @ref{framemd5} muxer.
|
|
||||||
|
|
||||||
@section MOV/MP4/ISMV
|
|
||||||
|
|
||||||
The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4
|
|
||||||
file has all the metadata about all packets stored in one location
|
|
||||||
(written at the end of the file, it can be moved to the start for
|
|
||||||
better playback using the @command{qt-faststart} tool). A fragmented
|
|
||||||
file consists of a number of fragments, where packets and metadata
|
|
||||||
about these packets are stored together. Writing a fragmented
|
|
||||||
file has the advantage that the file is decodable even if the
|
|
||||||
writing is interrupted (while a normal MOV/MP4 is undecodable if
|
|
||||||
it is not properly finished), and it requires less memory when writing
|
|
||||||
very long files (since writing normal MOV/MP4 files stores info about
|
|
||||||
every single packet in memory until the file is closed). The downside
|
|
||||||
is that it is less compatible with other applications.
|
|
||||||
|
|
||||||
Fragmentation is enabled by setting one of the AVOptions that define
|
|
||||||
how to cut the file into fragments:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item -moov_size @var{bytes}
|
|
||||||
Reserves space for the moov atom at the beginning of the file instead of placing the
|
|
||||||
moov atom at the end. If the space reserved is insufficient, muxing will fail.
|
|
||||||
@item -movflags frag_keyframe
|
|
||||||
Start a new fragment at each video keyframe.
|
|
||||||
@item -frag_duration @var{duration}
|
|
||||||
Create fragments that are @var{duration} microseconds long.
|
|
||||||
@item -frag_size @var{size}
|
|
||||||
Create fragments that contain up to @var{size} bytes of payload data.
|
|
||||||
@item -movflags frag_custom
|
|
||||||
Allow the caller to manually choose when to cut fragments, by
|
|
||||||
calling @code{av_write_frame(ctx, NULL)} to write a fragment with
|
|
||||||
the packets written so far. (This is only useful with other
|
|
||||||
applications integrating libavformat, not from @command{ffmpeg}.)
|
|
||||||
@item -min_frag_duration @var{duration}
|
|
||||||
Don't create fragments that are shorter than @var{duration} microseconds long.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
If more than one condition is specified, fragments are cut when
|
|
||||||
one of the specified conditions is fulfilled. The exception to this is
|
|
||||||
@code{-min_frag_duration}, which has to be fulfilled for any of the other
|
|
||||||
conditions to apply.
|
|
||||||
|
|
||||||
Additionally, the way the output file is written can be adjusted
|
|
||||||
through a few other options:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item -movflags empty_moov
|
|
||||||
Write an initial moov atom directly at the start of the file, without
|
|
||||||
describing any samples in it. Generally, an mdat/moov pair is written
|
|
||||||
at the start of the file, as a normal MOV/MP4 file, containing only
|
|
||||||
a short portion of the file. With this option set, there is no initial
|
|
||||||
mdat atom, and the moov atom only describes the tracks but has
|
|
||||||
a zero duration.
|
|
||||||
|
|
||||||
Files written with this option set do not work in QuickTime.
|
|
||||||
This option is implicitly set when writing ismv (Smooth Streaming) files.
|
|
||||||
@item -movflags separate_moof
|
|
||||||
Write a separate moof (movie fragment) atom for each track. Normally,
|
|
||||||
packets for all tracks are written in a moof atom (which is slightly
|
|
||||||
more efficient), but with this option set, the muxer writes one moof/mdat
|
|
||||||
pair for each track, making it easier to separate tracks.
|
|
||||||
|
|
||||||
This option is implicitly set when writing ismv (Smooth Streaming) files.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Smooth Streaming content can be pushed in real time to a publishing
|
|
||||||
point on IIS with this muxer. Example:
|
|
||||||
@example
|
|
||||||
ffmpeg -re @var{<normal input/transcoding options>} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1)
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section mpegts
|
@section mpegts
|
||||||
|
|
||||||
MPEG transport stream muxer.
|
MPEG transport stream muxer.
|
||||||
@@ -315,7 +177,7 @@ and @code{service_name}. If they are not set the default for
|
|||||||
@code{service_name} is "Service01".
|
@code{service_name} is "Service01".
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -i file.mpg -c copy \
|
ffmpeg -i file.mpg -acodec copy -vcodec copy \
|
||||||
-mpegts_original_network_id 0x1122 \
|
-mpegts_original_network_id 0x1122 \
|
||||||
-mpegts_transport_stream_id 0x3344 \
|
-mpegts_transport_stream_id 0x3344 \
|
||||||
-mpegts_service_id 0x5566 \
|
-mpegts_service_id 0x5566 \
|
||||||
@@ -333,14 +195,14 @@ Null muxer.
|
|||||||
This muxer does not generate any output file, it is mainly useful for
|
This muxer does not generate any output file, it is mainly useful for
|
||||||
testing or benchmarking purposes.
|
testing or benchmarking purposes.
|
||||||
|
|
||||||
For example to benchmark decoding with @command{ffmpeg} you can use the
|
For example to benchmark decoding with @file{ffmpeg} you can use the
|
||||||
command:
|
command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -benchmark -i INPUT -f null out.null
|
ffmpeg -benchmark -i INPUT -f null out.null
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Note that the above command does not read or write the @file{out.null}
|
Note that the above command does not read or write the @file{out.null}
|
||||||
file, but specifying the output file is required by the @command{ffmpeg}
|
file, but specifying the output file is required by the @file{ffmpeg}
|
||||||
syntax.
|
syntax.
|
||||||
|
|
||||||
Alternatively you can write the command as:
|
Alternatively you can write the command as:
|
||||||
@@ -408,74 +270,7 @@ Both eyes laced in one Block, Right-eye view is first
|
|||||||
|
|
||||||
For example a 3D WebM clip can be created using the following command line:
|
For example a 3D WebM clip can be created using the following command line:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i sample_left_right_clip.mpg -an -c:v libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
|
ffmpeg -i sample_left_right_clip.mpg -an -vcodec libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
|
||||||
@end example
|
|
||||||
|
|
||||||
@section segment
|
|
||||||
|
|
||||||
Basic stream segmenter.
|
|
||||||
|
|
||||||
The segmenter muxer outputs streams to a number of separate files of nearly
|
|
||||||
fixed duration. Output filename pattern can be set in a fashion similar to
|
|
||||||
@ref{image2}.
|
|
||||||
|
|
||||||
Every segment starts with a video keyframe, if a video stream is present.
|
|
||||||
The segment muxer works best with a single constant frame rate video.
|
|
||||||
|
|
||||||
Optionally it can generate a flat list of the created segments, one segment
|
|
||||||
per line.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item segment_format @var{format}
|
|
||||||
Override the inner container format, by default it is guessed by the filename
|
|
||||||
extension.
|
|
||||||
@item segment_time @var{t}
|
|
||||||
Set segment duration to @var{t} seconds.
|
|
||||||
@item segment_list @var{name}
|
|
||||||
Generate also a listfile named @var{name}.
|
|
||||||
@item segment_list_size @var{size}
|
|
||||||
Overwrite the listfile once it reaches @var{size} entries.
|
|
||||||
@item segment_wrap @var{limit}
|
|
||||||
Wrap around segment index once it reaches @var{limit}.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@example
|
|
||||||
ffmpeg -i in.mkv -c copy -map 0 -f segment -list out.list out%03d.nut
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section mp3
|
|
||||||
|
|
||||||
The MP3 muxer writes a raw MP3 stream with an ID3v2 header at the beginning and
|
|
||||||
optionally an ID3v1 tag at the end. ID3v2.3 and ID3v2.4 are supported, the
|
|
||||||
@code{id3v2_version} option controls which one is used. The legacy ID3v1 tag is
|
|
||||||
not written by default, but may be enabled with the @code{write_id3v1} option.
|
|
||||||
|
|
||||||
For seekable output the muxer also writes a Xing frame at the beginning, which
|
|
||||||
contains the number of frames in the file. It is useful for computing duration
|
|
||||||
of VBR files.
|
|
||||||
|
|
||||||
The muxer supports writing ID3v2 attached pictures (APIC frames). The pictures
|
|
||||||
are supplied to the muxer in form of a video stream with a single packet. There
|
|
||||||
can be any number of those streams, each will correspond to a single APIC frame.
|
|
||||||
The stream metadata tags @var{title} and @var{comment} map to APIC
|
|
||||||
@var{description} and @var{picture type} respectively. See
|
|
||||||
@url{http://id3.org/id3v2.4.0-frames} for allowed picture types.
|
|
||||||
|
|
||||||
Note that the APIC frames must be written at the beginning, so the muxer will
|
|
||||||
buffer the audio frames until it gets all the pictures. It is therefore advised
|
|
||||||
to provide the pictures as soon as possible to avoid excessive buffering.
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
Write an mp3 with an ID3v2.3 header and an ID3v1 footer:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -id3v2_version 3 -write_id3v1 1 out.mp3
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Attach a picture to an mp3:
|
|
||||||
@example
|
|
||||||
ffmpeg -i input.mp3 -i cover.png -c copy -metadata:s:v title="Album cover"
|
|
||||||
-metadata:s:v comment="Cover (Front)" out.mp3
|
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@c man end MUXERS
|
@c man end MUXERS
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ OSS (Open Sound System) output device.
|
|||||||
|
|
||||||
@section sdl
|
@section sdl
|
||||||
|
|
||||||
SDL (Simple DirectMedia Layer) output device.
|
SDL (Simple Directmedia Layer) output device.
|
||||||
|
|
||||||
This output devices allows to show a video stream in an SDL
|
This output devices allows to show a video stream in an SDL
|
||||||
window. Only one SDL window is allowed per application, so you can
|
window. Only one SDL window is allowed per application, so you can
|
||||||
@@ -60,7 +60,7 @@ If not specified it defaults to the size of the input video.
|
|||||||
|
|
||||||
@subsection Examples
|
@subsection Examples
|
||||||
|
|
||||||
The following command shows the @command{ffmpeg} output is an
|
The following command shows the @file{ffmpeg} output is an
|
||||||
SDL window, forcing its size to the qcif format:
|
SDL window, forcing its size to the qcif format:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
|
ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL output"
|
||||||
|
|||||||
@@ -1,380 +0,0 @@
|
|||||||
\input texinfo @c -*- texinfo -*-
|
|
||||||
|
|
||||||
@settitle Platform Specific information
|
|
||||||
@titlepage
|
|
||||||
@center @titlefont{Platform Specific information}
|
|
||||||
@end titlepage
|
|
||||||
|
|
||||||
@top
|
|
||||||
|
|
||||||
@contents
|
|
||||||
|
|
||||||
@chapter Unix-like
|
|
||||||
|
|
||||||
Some parts of FFmpeg cannot be built with version 2.15 of the GNU
|
|
||||||
assembler which is still provided by a few AMD64 distributions. To
|
|
||||||
make sure your compiler really uses the required version of gas
|
|
||||||
after a binutils upgrade, run:
|
|
||||||
|
|
||||||
@example
|
|
||||||
$(gcc -print-prog-name=as) --version
|
|
||||||
@end example
|
|
||||||
|
|
||||||
If not, then you should install a different compiler that has no
|
|
||||||
hard-coded path to gas. In the worst case pass @code{--disable-asm}
|
|
||||||
to configure.
|
|
||||||
|
|
||||||
@section BSD
|
|
||||||
|
|
||||||
BSD make will not build FFmpeg, you need to install and use GNU Make
|
|
||||||
(@command{gmake}).
|
|
||||||
|
|
||||||
@section (Open)Solaris
|
|
||||||
|
|
||||||
GNU Make is required to build FFmpeg, so you have to invoke (@command{gmake}),
|
|
||||||
standard Solaris Make will not work. When building with a non-c99 front-end
|
|
||||||
(gcc, generic suncc) add either @code{--extra-libs=/usr/lib/values-xpg6.o}
|
|
||||||
or @code{--extra-libs=/usr/lib/64/values-xpg6.o} to the configure options
|
|
||||||
since the libc is not c99-compliant by default. The probes performed by
|
|
||||||
configure may raise an exception leading to the death of configure itself
|
|
||||||
due to a bug in the system shell. Simply invoke a different shell such as
|
|
||||||
bash directly to work around this:
|
|
||||||
|
|
||||||
@example
|
|
||||||
bash ./configure
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@anchor{Darwin}
|
|
||||||
@section Darwin (Mac OS X, iPhone)
|
|
||||||
|
|
||||||
The toolchain provided with Xcode is sufficient to build the basic
|
|
||||||
unacelerated code.
|
|
||||||
|
|
||||||
Mac OS X on PowerPC or ARM (iPhone) requires a preprocessor from
|
|
||||||
@url{http://github.com/yuvi/gas-preprocessor} to build the optimized
|
|
||||||
assembler functions. Just download the Perl script and put it somewhere
|
|
||||||
in your PATH, FFmpeg's configure will pick it up automatically.
|
|
||||||
|
|
||||||
Mac OS X on amd64 and x86 requires @command{yasm} to build most of the
|
|
||||||
optimized assembler functions. @uref{http://www.finkproject.org/, Fink},
|
|
||||||
@uref{http://www.gentoo.org/proj/en/gentoo-alt/prefix/bootstrap-macos.xml, Gentoo Prefix},
|
|
||||||
@uref{http://mxcl.github.com/homebrew/, Homebrew}
|
|
||||||
or @uref{http://www.macports.org, MacPorts} can easily provide it.
|
|
||||||
|
|
||||||
|
|
||||||
@chapter DOS
|
|
||||||
|
|
||||||
Using a cross-compiler is preferred for various reasons.
|
|
||||||
@url{http://www.delorie.com/howto/djgpp/linux-x-djgpp.html}
|
|
||||||
|
|
||||||
|
|
||||||
@chapter OS/2
|
|
||||||
|
|
||||||
For information about compiling FFmpeg on OS/2 see
|
|
||||||
@url{http://www.edm2.com/index.php/FFmpeg}.
|
|
||||||
|
|
||||||
|
|
||||||
@chapter Windows
|
|
||||||
|
|
||||||
To get help and instructions for building FFmpeg under Windows, check out
|
|
||||||
the FFmpeg Windows Help Forum at
|
|
||||||
@url{http://ffmpeg.arrozcru.org/}.
|
|
||||||
|
|
||||||
@section Native Windows compilation
|
|
||||||
|
|
||||||
FFmpeg can be built to run natively on Windows using the MinGW tools. Install
|
|
||||||
the latest versions of MSYS and MinGW from @url{http://www.mingw.org/}.
|
|
||||||
You can find detailed installation instructions in the download
|
|
||||||
section and the FAQ.
|
|
||||||
|
|
||||||
FFmpeg does not build out-of-the-box with the packages the automated MinGW
|
|
||||||
installer provides. It also requires coreutils to be installed and many other
|
|
||||||
packages updated to the latest version. The minimum versions for some packages
|
|
||||||
are listed below:
|
|
||||||
|
|
||||||
@itemize
|
|
||||||
@item bash 3.1
|
|
||||||
@item msys-make 3.81-2 (note: not mingw32-make)
|
|
||||||
@item w32api 3.13
|
|
||||||
@item mingw-runtime 3.15
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
FFmpeg automatically passes @code{-fno-common} to the compiler to work around
|
|
||||||
a GCC bug (see @url{http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216}).
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
|
|
||||||
@itemize
|
|
||||||
|
|
||||||
@item Building natively using MSYS can be sped up by disabling implicit rules
|
|
||||||
in the Makefile by calling @code{make -r} instead of plain @code{make}. This
|
|
||||||
speed up is close to non-existent for normal one-off builds and is only
|
|
||||||
noticeable when running make for a second time (for example during
|
|
||||||
@code{make install}).
|
|
||||||
|
|
||||||
@item In order to compile FFplay, you must have the MinGW development library
|
|
||||||
of @uref{http://www.libsdl.org/, SDL} and @code{pkg-config} installed.
|
|
||||||
|
|
||||||
@item By using @code{./configure --enable-shared} when configuring FFmpeg,
|
|
||||||
you can build the FFmpeg libraries (e.g. libavutil, libavcodec,
|
|
||||||
libavformat) as DLLs.
|
|
||||||
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@section Microsoft Visual C++ compatibility
|
|
||||||
|
|
||||||
As stated in the FAQ, FFmpeg will not compile under MSVC++. However, if you
|
|
||||||
want to use the libav* libraries in your own applications, you can still
|
|
||||||
compile those applications using MSVC++. But the libav* libraries you link
|
|
||||||
to @emph{must} be built with MinGW. However, you will not be able to debug
|
|
||||||
inside the libav* libraries, since MSVC++ does not recognize the debug
|
|
||||||
symbols generated by GCC.
|
|
||||||
We strongly recommend you to move over from MSVC++ to MinGW tools.
|
|
||||||
|
|
||||||
This description of how to use the FFmpeg libraries with MSVC++ is based on
|
|
||||||
Microsoft Visual C++ 2005 Express Edition. If you have a different version,
|
|
||||||
you might have to modify the procedures slightly.
|
|
||||||
|
|
||||||
@subsection Using static libraries
|
|
||||||
|
|
||||||
Assuming you have just built and installed FFmpeg in @file{/usr/local}:
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
|
|
||||||
@item Create a new console application ("File / New / Project") and then
|
|
||||||
select "Win32 Console Application". On the appropriate page of the
|
|
||||||
Application Wizard, uncheck the "Precompiled headers" option.
|
|
||||||
|
|
||||||
@item Write the source code for your application, or, for testing, just
|
|
||||||
copy the code from an existing sample application into the source file
|
|
||||||
that MSVC++ has already created for you. For example, you can copy
|
|
||||||
@file{libavformat/output-example.c} from the FFmpeg distribution.
|
|
||||||
|
|
||||||
@item Open the "Project / Properties" dialog box. In the "Configuration"
|
|
||||||
combo box, select "All Configurations" so that the changes you make will
|
|
||||||
affect both debug and release builds. In the tree view on the left hand
|
|
||||||
side, select "C/C++ / General", then edit the "Additional Include
|
|
||||||
Directories" setting to contain the path where the FFmpeg includes were
|
|
||||||
installed (i.e. @file{c:\msys\1.0\local\include}).
|
|
||||||
Do not add MinGW's include directory here, or the include files will
|
|
||||||
conflict with MSVC's.
|
|
||||||
|
|
||||||
@item Still in the "Project / Properties" dialog box, select
|
|
||||||
"Linker / General" from the tree view and edit the
|
|
||||||
"Additional Library Directories" setting to contain the @file{lib}
|
|
||||||
directory where FFmpeg was installed (i.e. @file{c:\msys\1.0\local\lib}),
|
|
||||||
the directory where MinGW libs are installed (i.e. @file{c:\mingw\lib}),
|
|
||||||
and the directory where MinGW's GCC libs are installed
|
|
||||||
(i.e. @file{C:\mingw\lib\gcc\mingw32\4.2.1-sjlj}). Then select
|
|
||||||
"Linker / Input" from the tree view, and add the files @file{libavformat.a},
|
|
||||||
@file{libavcodec.a}, @file{libavutil.a}, @file{libmingwex.a},
|
|
||||||
@file{libgcc.a}, and any other libraries you used (i.e. @file{libz.a})
|
|
||||||
to the end of "Additional Dependencies".
|
|
||||||
|
|
||||||
@item Now, select "C/C++ / Code Generation" from the tree view. Select
|
|
||||||
"Debug" in the "Configuration" combo box. Make sure that "Runtime
|
|
||||||
Library" is set to "Multi-threaded Debug DLL". Then, select "Release" in
|
|
||||||
the "Configuration" combo box and make sure that "Runtime Library" is
|
|
||||||
set to "Multi-threaded DLL".
|
|
||||||
|
|
||||||
@item Click "OK" to close the "Project / Properties" dialog box.
|
|
||||||
|
|
||||||
@item MSVC++ lacks some C99 header files that are fundamental for FFmpeg.
|
|
||||||
Get msinttypes from @url{http://code.google.com/p/msinttypes/downloads/list}
|
|
||||||
and install it in MSVC++'s include directory
|
|
||||||
(i.e. @file{C:\Program Files\Microsoft Visual Studio 8\VC\include}).
|
|
||||||
|
|
||||||
@item MSVC++ also does not understand the @code{inline} keyword used by
|
|
||||||
FFmpeg, so you must add this line before @code{#include}ing libav*:
|
|
||||||
@example
|
|
||||||
#define inline _inline
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item Build your application, everything should work.
|
|
||||||
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
@subsection Using shared libraries
|
|
||||||
|
|
||||||
This is how to create DLL and LIB files that are compatible with MSVC++:
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
|
|
||||||
@item Add a call to @file{vcvars32.bat} (which sets up the environment
|
|
||||||
variables for the Visual C++ tools) as the first line of @file{msys.bat}.
|
|
||||||
The standard location for @file{vcvars32.bat} is
|
|
||||||
@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat},
|
|
||||||
and the standard location for @file{msys.bat} is @file{C:\msys\1.0\msys.bat}.
|
|
||||||
If this corresponds to your setup, add the following line as the first line
|
|
||||||
of @file{msys.bat}:
|
|
||||||
|
|
||||||
@example
|
|
||||||
call "C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Alternatively, you may start the @file{Visual Studio 2005 Command Prompt},
|
|
||||||
and run @file{c:\msys\1.0\msys.bat} from there.
|
|
||||||
|
|
||||||
@item Within the MSYS shell, run @code{lib.exe}. If you get a help message
|
|
||||||
from @file{Microsoft (R) Library Manager}, this means your environment
|
|
||||||
variables are set up correctly, the @file{Microsoft (R) Library Manager}
|
|
||||||
is on the path and will be used by FFmpeg to create
|
|
||||||
MSVC++-compatible import libraries.
|
|
||||||
|
|
||||||
@item Build FFmpeg with
|
|
||||||
|
|
||||||
@example
|
|
||||||
./configure --enable-shared
|
|
||||||
make
|
|
||||||
make install
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Your install path (@file{/usr/local/} by default) should now have the
|
|
||||||
necessary DLL and LIB files under the @file{bin} directory.
|
|
||||||
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
Alternatively, build the libraries with a cross compiler, according to
|
|
||||||
the instructions below in @ref{Cross compilation for Windows with Linux}.
|
|
||||||
|
|
||||||
To use those files with MSVC++, do the same as you would do with
|
|
||||||
the static libraries, as described above. But in Step 4,
|
|
||||||
you should only need to add the directory where the LIB files are installed
|
|
||||||
(i.e. @file{c:\msys\usr\local\bin}). This is not a typo, the LIB files are
|
|
||||||
installed in the @file{bin} directory. And instead of adding the static
|
|
||||||
libraries (@file{libxxx.a} files) you should add the MSVC import libraries
|
|
||||||
(@file{avcodec.lib}, @file{avformat.lib}, and
|
|
||||||
@file{avutil.lib}). Note that you should not use the GCC import
|
|
||||||
libraries (@file{libxxx.dll.a} files), as these will give you undefined
|
|
||||||
reference errors. There should be no need for @file{libmingwex.a},
|
|
||||||
@file{libgcc.a}, and @file{wsock32.lib}, nor any other external library
|
|
||||||
statically linked into the DLLs.
|
|
||||||
|
|
||||||
FFmpeg headers do not declare global data for Windows DLLs through the usual
|
|
||||||
dllexport/dllimport interface. Such data will be exported properly while
|
|
||||||
building, but to use them in your MSVC++ code you will have to edit the
|
|
||||||
appropriate headers and mark the data as dllimport. For example, in
|
|
||||||
libavutil/pixdesc.h you should have:
|
|
||||||
@example
|
|
||||||
extern __declspec(dllimport) const AVPixFmtDescriptor av_pix_fmt_descriptors[];
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Note that using import libraries created by dlltool requires
|
|
||||||
the linker optimization option to be set to
|
|
||||||
"References: Keep Unreferenced Data (@code{/OPT:NOREF})", otherwise
|
|
||||||
the resulting binaries will fail during runtime. This isn't
|
|
||||||
required when using import libraries generated by lib.exe.
|
|
||||||
This issue is reported upstream at
|
|
||||||
@url{http://sourceware.org/bugzilla/show_bug.cgi?id=12633}.
|
|
||||||
|
|
||||||
To create import libraries that work with the @code{/OPT:REF} option
|
|
||||||
(which is enabled by default in Release mode), follow these steps:
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
|
|
||||||
@item Open @emph{Visual Studio 2005 Command Prompt}.
|
|
||||||
|
|
||||||
Alternatively, in a normal command line prompt, call @file{vcvars32.bat}
|
|
||||||
which sets up the environment variables for the Visual C++ tools
|
|
||||||
(the standard location for this file is
|
|
||||||
@file{C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat}).
|
|
||||||
|
|
||||||
@item Enter the @file{bin} directory where the created LIB and DLL files
|
|
||||||
are stored.
|
|
||||||
|
|
||||||
@item Generate new import libraries with @command{lib.exe}:
|
|
||||||
|
|
||||||
@example
|
|
||||||
lib /machine:i386 /def:..\lib\foo-version.def /out:foo.lib
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Replace @code{foo-version} and @code{foo} with the respective library names.
|
|
||||||
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
@anchor{Cross compilation for Windows with Linux}
|
|
||||||
@section Cross compilation for Windows with Linux
|
|
||||||
|
|
||||||
You must use the MinGW cross compilation tools available at
|
|
||||||
@url{http://www.mingw.org/}.
|
|
||||||
|
|
||||||
Then configure FFmpeg with the following options:
|
|
||||||
@example
|
|
||||||
./configure --target-os=mingw32 --cross-prefix=i386-mingw32msvc-
|
|
||||||
@end example
|
|
||||||
(you can change the cross-prefix according to the prefix chosen for the
|
|
||||||
MinGW tools).
|
|
||||||
|
|
||||||
Then you can easily test FFmpeg with @uref{http://www.winehq.com/, Wine}.
|
|
||||||
|
|
||||||
@section Compilation under Cygwin
|
|
||||||
|
|
||||||
Please use Cygwin 1.7.x as the obsolete 1.5.x Cygwin versions lack
|
|
||||||
llrint() in its C library.
|
|
||||||
|
|
||||||
Install your Cygwin with all the "Base" packages, plus the
|
|
||||||
following "Devel" ones:
|
|
||||||
@example
|
|
||||||
binutils, gcc4-core, make, git, mingw-runtime, texi2html
|
|
||||||
@end example
|
|
||||||
|
|
||||||
And the following "Utils" one:
|
|
||||||
@example
|
|
||||||
diffutils
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Then run
|
|
||||||
|
|
||||||
@example
|
|
||||||
./configure
|
|
||||||
@end example
|
|
||||||
|
|
||||||
to make a static build.
|
|
||||||
|
|
||||||
To build shared libraries add a special compiler flag to work around current
|
|
||||||
@code{gcc4-core} package bugs in addition to the normal configure flags:
|
|
||||||
|
|
||||||
@example
|
|
||||||
./configure --enable-shared --disable-static --extra-cflags=-fno-reorder-functions
|
|
||||||
@end example
|
|
||||||
|
|
||||||
If you want to build FFmpeg with additional libraries, download Cygwin
|
|
||||||
"Devel" packages for Ogg and Vorbis from any Cygwin packages repository:
|
|
||||||
@example
|
|
||||||
libogg-devel, libvorbis-devel
|
|
||||||
@end example
|
|
||||||
|
|
||||||
These library packages are only available from
|
|
||||||
@uref{http://sourceware.org/cygwinports/, Cygwin Ports}:
|
|
||||||
|
|
||||||
@example
|
|
||||||
yasm, libSDL-devel, libfaac-devel, libaacplus-devel, libgsm-devel, libmp3lame-devel,
|
|
||||||
libschroedinger1.0-devel, speex-devel, libtheora-devel, libxvidcore-devel
|
|
||||||
@end example
|
|
||||||
|
|
||||||
The recommendation for x264 is to build it from source, as it evolves too
|
|
||||||
quickly for Cygwin Ports to be up to date.
|
|
||||||
|
|
||||||
@section Crosscompilation for Windows under Cygwin
|
|
||||||
|
|
||||||
With Cygwin you can create Windows binaries that do not need the cygwin1.dll.
|
|
||||||
|
|
||||||
Just install your Cygwin as explained before, plus these additional
|
|
||||||
"Devel" packages:
|
|
||||||
@example
|
|
||||||
gcc-mingw-core, mingw-runtime, mingw-zlib
|
|
||||||
@end example
|
|
||||||
|
|
||||||
and add some special flags to your configure invocation.
|
|
||||||
|
|
||||||
For a static build run
|
|
||||||
@example
|
|
||||||
./configure --target-os=mingw32 --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
|
||||||
@end example
|
|
||||||
|
|
||||||
and for a build with shared libraries
|
|
||||||
@example
|
|
||||||
./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@bye
|
|
||||||
@@ -1,125 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (c) 2012 Anton Khirnov
|
|
||||||
*
|
|
||||||
* This file is part of Libav.
|
|
||||||
*
|
|
||||||
* Libav is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
|
||||||
* License as published by the Free Software Foundation; either
|
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Libav is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
* Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with Libav; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* generate texinfo manpages for avoptions
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <float.h>
|
|
||||||
|
|
||||||
#include "libavformat/avformat.h"
|
|
||||||
#include "libavcodec/avcodec.h"
|
|
||||||
#include "libavutil/opt.h"
|
|
||||||
|
|
||||||
static void print_usage(void)
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Usage: enum_options type\n"
|
|
||||||
"type: format codec\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void print_option(const AVOption *opts, const AVOption *o, int per_stream)
|
|
||||||
{
|
|
||||||
printf("@item -%s%s @var{", o->name, per_stream ? "[:stream_specifier]" : "");
|
|
||||||
switch (o->type) {
|
|
||||||
case AV_OPT_TYPE_BINARY: printf("hexadecimal string"); break;
|
|
||||||
case AV_OPT_TYPE_STRING: printf("string"); break;
|
|
||||||
case AV_OPT_TYPE_INT:
|
|
||||||
case AV_OPT_TYPE_INT64: printf("integer"); break;
|
|
||||||
case AV_OPT_TYPE_FLOAT:
|
|
||||||
case AV_OPT_TYPE_DOUBLE: printf("float"); break;
|
|
||||||
case AV_OPT_TYPE_RATIONAL: printf("rational number"); break;
|
|
||||||
case AV_OPT_TYPE_FLAGS: printf("flags"); break;
|
|
||||||
default: printf("value"); break;
|
|
||||||
}
|
|
||||||
printf("} (@emph{");
|
|
||||||
|
|
||||||
if (o->flags & AV_OPT_FLAG_DECODING_PARAM) {
|
|
||||||
printf("input");
|
|
||||||
if (o->flags & AV_OPT_FLAG_ENCODING_PARAM)
|
|
||||||
printf("/");
|
|
||||||
}
|
|
||||||
if (o->flags & AV_OPT_FLAG_ENCODING_PARAM) printf("output");
|
|
||||||
if (o->flags & AV_OPT_FLAG_AUDIO_PARAM) printf(",audio");
|
|
||||||
if (o->flags & AV_OPT_FLAG_VIDEO_PARAM) printf(",video");
|
|
||||||
if (o->flags & AV_OPT_FLAG_SUBTITLE_PARAM) printf(",subtitles");
|
|
||||||
|
|
||||||
printf("})\n");
|
|
||||||
if (o->help)
|
|
||||||
printf("%s\n", o->help);
|
|
||||||
|
|
||||||
if (o->unit) {
|
|
||||||
const AVOption *u;
|
|
||||||
printf("\nPossible values:\n@table @samp\n");
|
|
||||||
|
|
||||||
for (u = opts; u->name; u++) {
|
|
||||||
if (u->type == AV_OPT_TYPE_CONST && u->unit && !strcmp(u->unit, o->unit))
|
|
||||||
printf("@item %s\n%s\n", u->name, u->help ? u->help : "");
|
|
||||||
}
|
|
||||||
printf("@end table\n");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void show_opts(const AVOption *opts, int per_stream)
|
|
||||||
{
|
|
||||||
const AVOption *o;
|
|
||||||
|
|
||||||
printf("@table @option\n");
|
|
||||||
for (o = opts; o->name; o++) {
|
|
||||||
if (o->type != AV_OPT_TYPE_CONST)
|
|
||||||
print_option(opts, o, per_stream);
|
|
||||||
}
|
|
||||||
printf("@end table\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void show_format_opts(void)
|
|
||||||
{
|
|
||||||
#include "libavformat/options_table.h"
|
|
||||||
|
|
||||||
printf("@section Format AVOptions\n");
|
|
||||||
show_opts(options, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void show_codec_opts(void)
|
|
||||||
{
|
|
||||||
#include "libavcodec/options_table.h"
|
|
||||||
|
|
||||||
printf("@section Codec AVOptions\n");
|
|
||||||
show_opts(options, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
if (argc < 2)
|
|
||||||
print_usage();
|
|
||||||
|
|
||||||
printf("@c DO NOT EDIT THIS FILE!\n"
|
|
||||||
"@c It was generated by print_options.\n\n");
|
|
||||||
if (!strcmp(argv[1], "format"))
|
|
||||||
show_format_opts();
|
|
||||||
else if (!strcmp(argv[1], "codec"))
|
|
||||||
show_codec_opts();
|
|
||||||
else
|
|
||||||
print_usage();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
@@ -19,34 +19,20 @@ supported protocols.
|
|||||||
|
|
||||||
A description of the currently available protocols follows.
|
A description of the currently available protocols follows.
|
||||||
|
|
||||||
@section bluray
|
@section applehttp
|
||||||
|
|
||||||
Read BluRay playlist.
|
Read Apple HTTP Live Streaming compliant segmented stream as
|
||||||
|
a uniform one. The M3U8 playlists describing the segments can be
|
||||||
|
remote HTTP resources or local files, accessed using the standard
|
||||||
|
file protocol.
|
||||||
|
HTTP is default, specific protocol can be declared by specifying
|
||||||
|
"+@var{proto}" after the applehttp URI scheme name, where @var{proto}
|
||||||
|
is either "file" or "http".
|
||||||
|
|
||||||
The accepted options are:
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item angle
|
|
||||||
BluRay angle
|
|
||||||
|
|
||||||
@item chapter
|
|
||||||
Start chapter (1...N)
|
|
||||||
|
|
||||||
@item playlist
|
|
||||||
Playlist to read (BDMV/PLAYLIST/?????.mpls)
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
Read longest playlist from BluRay mounted to /mnt/bluray:
|
|
||||||
@example
|
@example
|
||||||
bluray:/mnt/bluray
|
applehttp://host/path/to/remote/resource.m3u8
|
||||||
@end example
|
applehttp+http://host/path/to/remote/resource.m3u8
|
||||||
|
applehttp+file://path/to/local/resource.m3u8
|
||||||
Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapter 2:
|
|
||||||
@example
|
|
||||||
-playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
|
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section concat
|
@section concat
|
||||||
@@ -66,7 +52,7 @@ resource to be concatenated, each one possibly specifying a distinct
|
|||||||
protocol.
|
protocol.
|
||||||
|
|
||||||
For example to read a sequence of files @file{split1.mpeg},
|
For example to read a sequence of files @file{split1.mpeg},
|
||||||
@file{split2.mpeg}, @file{split3.mpeg} with @command{ffplay} use the
|
@file{split2.mpeg}, @file{split3.mpeg} with @file{ffplay} use the
|
||||||
command:
|
command:
|
||||||
@example
|
@example
|
||||||
ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
|
ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
|
||||||
@@ -81,7 +67,7 @@ File access protocol.
|
|||||||
|
|
||||||
Allow to read from or read to a file.
|
Allow to read from or read to a file.
|
||||||
|
|
||||||
For example to read from a file @file{input.mpeg} with @command{ffmpeg}
|
For example to read from a file @file{input.mpeg} with @file{ffmpeg}
|
||||||
use the command:
|
use the command:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i file:input.mpeg output.mpeg
|
ffmpeg -i file:input.mpeg output.mpeg
|
||||||
@@ -95,26 +81,6 @@ specified with the name "FILE.mpeg" is interpreted as the URL
|
|||||||
|
|
||||||
Gopher protocol.
|
Gopher protocol.
|
||||||
|
|
||||||
@section hls
|
|
||||||
|
|
||||||
Read Apple HTTP Live Streaming compliant segmented stream as
|
|
||||||
a uniform one. The M3U8 playlists describing the segments can be
|
|
||||||
remote HTTP resources or local files, accessed using the standard
|
|
||||||
file protocol.
|
|
||||||
The nested protocol is declared by specifying
|
|
||||||
"+@var{proto}" after the hls URI scheme name, where @var{proto}
|
|
||||||
is either "file" or "http".
|
|
||||||
|
|
||||||
@example
|
|
||||||
hls+http://host/path/to/remote/resource.m3u8
|
|
||||||
hls+file://path/to/local/resource.m3u8
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Using this protocol is discouraged - the hls demuxer should work
|
|
||||||
just as well (if not, please report the issues) and is more complete.
|
|
||||||
To use the hls demuxer instead, simply use the direct URLs to the
|
|
||||||
m3u8 files.
|
|
||||||
|
|
||||||
@section http
|
@section http
|
||||||
|
|
||||||
HTTP (Hyper Text Transfer Protocol).
|
HTTP (Hyper Text Transfer Protocol).
|
||||||
@@ -168,14 +134,14 @@ pipe (e.g. 0 for stdin, 1 for stdout, 2 for stderr). If @var{number}
|
|||||||
is not specified, by default the stdout file descriptor will be used
|
is not specified, by default the stdout file descriptor will be used
|
||||||
for writing, stdin for reading.
|
for writing, stdin for reading.
|
||||||
|
|
||||||
For example to read from stdin with @command{ffmpeg}:
|
For example to read from stdin with @file{ffmpeg}:
|
||||||
@example
|
@example
|
||||||
cat test.wav | ffmpeg -i pipe:0
|
cat test.wav | ffmpeg -i pipe:0
|
||||||
# ...this is the same as...
|
# ...this is the same as...
|
||||||
cat test.wav | ffmpeg -i pipe:
|
cat test.wav | ffmpeg -i pipe:
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
For writing to stdout with @command{ffmpeg}:
|
For writing to stdout with @file{ffmpeg}:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
|
ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
|
||||||
# ...this is the same as...
|
# ...this is the same as...
|
||||||
@@ -189,8 +155,8 @@ be seekable, so they will fail with the pipe output protocol.
|
|||||||
|
|
||||||
Real-Time Messaging Protocol.
|
Real-Time Messaging Protocol.
|
||||||
|
|
||||||
The Real-Time Messaging Protocol (RTMP) is used for streaming multimedia
|
The Real-Time Messaging Protocol (RTMP) is used for streaming multime‐
|
||||||
content across a TCP/IP network.
|
dia content across a TCP/IP network.
|
||||||
|
|
||||||
The required syntax is:
|
The required syntax is:
|
||||||
@example
|
@example
|
||||||
@@ -217,7 +183,7 @@ application specified in @var{app}, may be prefixed by "mp4:".
|
|||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
For example to read with @command{ffplay} a multimedia resource named
|
For example to read with @file{ffplay} a multimedia resource named
|
||||||
"sample" from the application "vod" from an RTMP server "myserver":
|
"sample" from the application "vod" from an RTMP server "myserver":
|
||||||
@example
|
@example
|
||||||
ffplay rtmp://myserver/vod/sample
|
ffplay rtmp://myserver/vod/sample
|
||||||
@@ -229,7 +195,7 @@ Real-Time Messaging Protocol and its variants supported through
|
|||||||
librtmp.
|
librtmp.
|
||||||
|
|
||||||
Requires the presence of the librtmp headers and library during
|
Requires the presence of the librtmp headers and library during
|
||||||
configuration. You need to explicitly configure the build with
|
configuration. You need to explicitely configure the build with
|
||||||
"--enable-librtmp". If enabled this will replace the native RTMP
|
"--enable-librtmp". If enabled this will replace the native RTMP
|
||||||
protocol.
|
protocol.
|
||||||
|
|
||||||
@@ -253,12 +219,12 @@ meaning as specified for the RTMP native protocol.
|
|||||||
See the librtmp manual page (man 3 librtmp) for more information.
|
See the librtmp manual page (man 3 librtmp) for more information.
|
||||||
|
|
||||||
For example, to stream a file in real-time to an RTMP server using
|
For example, to stream a file in real-time to an RTMP server using
|
||||||
@command{ffmpeg}:
|
@file{ffmpeg}:
|
||||||
@example
|
@example
|
||||||
ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
|
ffmpeg -re -i myfile -f flv rtmp://myserver/live/mystream
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
To play the same stream using @command{ffplay}:
|
To play the same stream using @file{ffplay}:
|
||||||
@example
|
@example
|
||||||
ffplay "rtmp://myserver/live/mystream live=1"
|
ffplay "rtmp://myserver/live/mystream live=1"
|
||||||
@end example
|
@end example
|
||||||
@@ -276,19 +242,16 @@ data transferred over RDT).
|
|||||||
|
|
||||||
The muxer can be used to send a stream using RTSP ANNOUNCE to a server
|
The muxer can be used to send a stream using RTSP ANNOUNCE to a server
|
||||||
supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
|
supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's
|
||||||
@uref{http://github.com/revmischa/rtsp-server, RTSP server}).
|
RTSP server, @url{http://github.com/revmischa/rtsp-server}).
|
||||||
|
|
||||||
The required syntax for a RTSP url is:
|
The required syntax for a RTSP url is:
|
||||||
@example
|
@example
|
||||||
rtsp://@var{hostname}[:@var{port}]/@var{path}
|
rtsp://@var{hostname}[:@var{port}]/@var{path}[?@var{options}]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The following options (set on the @command{ffmpeg}/@command{ffplay} command
|
@var{options} is a @code{&}-separated list. The following options
|
||||||
line, or set in code via @code{AVOption}s or in @code{avformat_open_input}),
|
|
||||||
are supported:
|
are supported:
|
||||||
|
|
||||||
Flags for @code{rtsp_transport}:
|
|
||||||
|
|
||||||
@table @option
|
@table @option
|
||||||
|
|
||||||
@item udp
|
@item udp
|
||||||
@@ -298,31 +261,27 @@ Use UDP as lower transport protocol.
|
|||||||
Use TCP (interleaving within the RTSP control channel) as lower
|
Use TCP (interleaving within the RTSP control channel) as lower
|
||||||
transport protocol.
|
transport protocol.
|
||||||
|
|
||||||
@item udp_multicast
|
@item multicast
|
||||||
Use UDP multicast as lower transport protocol.
|
Use UDP multicast as lower transport protocol.
|
||||||
|
|
||||||
@item http
|
@item http
|
||||||
Use HTTP tunneling as lower transport protocol, which is useful for
|
Use HTTP tunneling as lower transport protocol, which is useful for
|
||||||
passing proxies.
|
passing proxies.
|
||||||
|
|
||||||
|
@item filter_src
|
||||||
|
Accept packets only from negotiated peer address and port.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
Multiple lower transport protocols may be specified, in that case they are
|
Multiple lower transport protocols may be specified, in that case they are
|
||||||
tried one at a time (if the setup of one fails, the next one is tried).
|
tried one at a time (if the setup of one fails, the next one is tried).
|
||||||
For the muxer, only the @code{tcp} and @code{udp} options are supported.
|
For the muxer, only the @code{tcp} and @code{udp} options are supported.
|
||||||
|
|
||||||
Flags for @code{rtsp_flags}:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item filter_src
|
|
||||||
Accept packets only from negotiated peer address and port.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
When receiving data over UDP, the demuxer tries to reorder received packets
|
When receiving data over UDP, the demuxer tries to reorder received packets
|
||||||
(since they may arrive out of order, or packets may get lost totally). This
|
(since they may arrive out of order, or packets may get lost totally). In
|
||||||
can be disabled by setting the maximum demuxing delay to zero (via
|
order for this to be enabled, a maximum delay must be specified in the
|
||||||
the @code{max_delay} field of AVFormatContext).
|
@code{max_delay} field of AVFormatContext.
|
||||||
|
|
||||||
When watching multi-bitrate Real-RTSP streams with @command{ffplay}, the
|
When watching multi-bitrate Real-RTSP streams with @file{ffplay}, the
|
||||||
streams to display can be chosen with @code{-vst} @var{n} and
|
streams to display can be chosen with @code{-vst} @var{n} and
|
||||||
@code{-ast} @var{n} for video and audio respectively, and can be switched
|
@code{-ast} @var{n} for video and audio respectively, and can be switched
|
||||||
on the fly by pressing @code{v} and @code{a}.
|
on the fly by pressing @code{v} and @code{a}.
|
||||||
@@ -332,13 +291,13 @@ Example command lines:
|
|||||||
To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
|
To watch a stream over UDP, with a max reordering delay of 0.5 seconds:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
|
ffplay -max_delay 500000 rtsp://server/video.mp4?udp
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
To watch a stream tunneled over HTTP:
|
To watch a stream tunneled over HTTP:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffplay -rtsp_transport http rtsp://server/video.mp4
|
ffplay rtsp://server/video.mp4?http
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
To send a stream in realtime to a RTSP server, for others to watch:
|
To send a stream in realtime to a RTSP server, for others to watch:
|
||||||
@@ -399,13 +358,13 @@ To broadcast a stream on the local subnet, for watching in VLC:
|
|||||||
ffmpeg -re -i @var{input} -f sap sap://224.0.0.255?same_port=1
|
ffmpeg -re -i @var{input} -f sap sap://224.0.0.255?same_port=1
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Similarly, for watching in @command{ffplay}:
|
Similarly, for watching in ffplay:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -re -i @var{input} -f sap sap://224.0.0.255
|
ffmpeg -re -i @var{input} -f sap sap://224.0.0.255
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
And for watching in @command{ffplay}, over IPv6:
|
And for watching in ffplay, over IPv6:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -re -i @var{input} -f sap sap://[ff0e::1:2:3:4]
|
ffmpeg -re -i @var{input} -f sap sap://[ff0e::1:2:3:4]
|
||||||
@@ -480,11 +439,6 @@ set the UDP buffer size in bytes
|
|||||||
@item localport=@var{port}
|
@item localport=@var{port}
|
||||||
override the local UDP port to bind with
|
override the local UDP port to bind with
|
||||||
|
|
||||||
@item localaddr=@var{addr}
|
|
||||||
Choose the local IP address. This is useful e.g. if sending multicast
|
|
||||||
and the host has multiple interfaces, where the user can choose
|
|
||||||
which interface to send on by specifying the IP address of that interface.
|
|
||||||
|
|
||||||
@item pkt_size=@var{size}
|
@item pkt_size=@var{size}
|
||||||
set the size in bytes of UDP packets
|
set the size in bytes of UDP packets
|
||||||
|
|
||||||
@@ -506,7 +460,7 @@ For receiving, this gives the benefit of only receiving packets from
|
|||||||
the specified peer address/port.
|
the specified peer address/port.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
Some usage examples of the udp protocol with @command{ffmpeg} follow.
|
Some usage examples of the udp protocol with @file{ffmpeg} follow.
|
||||||
|
|
||||||
To stream over UDP to a remote endpoint:
|
To stream over UDP to a remote endpoint:
|
||||||
@example
|
@example
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ essential that changes to their codebase are publicly visible, clean and
|
|||||||
easy reviewable that again leads us to:
|
easy reviewable that again leads us to:
|
||||||
* use of a revision control system like git
|
* use of a revision control system like git
|
||||||
* separation of cosmetic from non-cosmetic changes (this is almost entirely
|
* separation of cosmetic from non-cosmetic changes (this is almost entirely
|
||||||
ignored by mentors and students in soc 2006 which might lead to a surprise
|
ignored by mentors and students in soc 2006 which might lead to a suprise
|
||||||
when the code will be reviewed at the end before a possible inclusion in
|
when the code will be reviewed at the end before a possible inclusion in
|
||||||
FFmpeg, individual changes were generally not reviewable due to cosmetics).
|
FFmpeg, individual changes were generally not reviewable due to cosmetics).
|
||||||
* frequent commits, so that comments can be provided early
|
* frequent commits, so that comments can be provided early
|
||||||
|
|||||||
@@ -1,46 +0,0 @@
|
|||||||
The official guide to swresample for confused developers.
|
|
||||||
=========================================================
|
|
||||||
|
|
||||||
Current (simplified) Architecture:
|
|
||||||
---------------------------------
|
|
||||||
Input
|
|
||||||
v
|
|
||||||
__________________/|\___________
|
|
||||||
/ | \
|
|
||||||
/ input sample format convert v
|
|
||||||
/ | ___________/
|
|
||||||
| |/
|
|
||||||
| v
|
|
||||||
| ___________/|\___________ _____________
|
|
||||||
| / | \ | |
|
|
||||||
| Rematrix | resample <---->| Buffers |
|
|
||||||
| \___________ | ___________/ |_____________|
|
|
||||||
v \|/
|
|
||||||
Special Converter v
|
|
||||||
v ___________/|\___________ _____________
|
|
||||||
| / | \ | |
|
|
||||||
| Rematrix | resample <---->| Buffers |
|
|
||||||
| \___________ | ___________/ |_____________|
|
|
||||||
| \|/
|
|
||||||
| v
|
|
||||||
| |\___________
|
|
||||||
\ | \
|
|
||||||
\ output sample format convert v
|
|
||||||
\_________________ | ___________/
|
|
||||||
\|/
|
|
||||||
v
|
|
||||||
Output
|
|
||||||
|
|
||||||
Planar/Packed convertion is done when needed during sample format convertion
|
|
||||||
Every step can be skipped without memcpy when its not needed.
|
|
||||||
Either Resampling and Rematrixing can be performed first depending on which
|
|
||||||
way its faster.
|
|
||||||
The Buffers are needed for resampling due to resamplng being a process that
|
|
||||||
requires future and past data, it thus also introduces inevitably a delay when
|
|
||||||
used.
|
|
||||||
Internally 32bit float and 16bit int is supported currently, other formats can
|
|
||||||
easily be added
|
|
||||||
Externally all sample formats in packed and planar configuration are supported
|
|
||||||
Its also trivial to add special converters for common cases
|
|
||||||
If only sample format and or packed/planar convertion is needed it
|
|
||||||
is performed from input to output directly in a single pass with no intermediates.
|
|
||||||
@@ -96,3 +96,4 @@ would benefit from it.
|
|||||||
Also, as already hinted at, initFilter() accepts an optional convolutional
|
Also, as already hinted at, initFilter() accepts an optional convolutional
|
||||||
filter as input that can be used for contrast, saturation, blur, sharpening
|
filter as input that can be used for contrast, saturation, blur, sharpening
|
||||||
shift, chroma vs. luma shift, ...
|
shift, chroma vs. luma shift, ...
|
||||||
|
|
||||||
|
|||||||
158
doc/syntax.texi
158
doc/syntax.texi
@@ -1,158 +0,0 @@
|
|||||||
@chapter Syntax
|
|
||||||
@c man begin SYNTAX
|
|
||||||
|
|
||||||
When evaluating specific formats, FFmpeg uses internal library parsing
|
|
||||||
functions, shared by the tools. This section documents the syntax of
|
|
||||||
some of these formats.
|
|
||||||
|
|
||||||
@anchor{date syntax}
|
|
||||||
@section Date
|
|
||||||
|
|
||||||
The accepted syntax is:
|
|
||||||
@example
|
|
||||||
[(YYYY-MM-DD|YYYYMMDD)[T|t| ]]((HH:MM:SS[.m...]]])|(HHMMSS[.m...]]]))[Z]
|
|
||||||
now
|
|
||||||
@end example
|
|
||||||
|
|
||||||
If the value is "now" it takes the current time.
|
|
||||||
|
|
||||||
Time is local time unless Z is appended, in which case it is
|
|
||||||
interpreted as UTC.
|
|
||||||
If the year-month-day part is not specified it takes the current
|
|
||||||
year-month-day.
|
|
||||||
|
|
||||||
@anchor{time duration syntax}
|
|
||||||
@section Time duration
|
|
||||||
|
|
||||||
The accepted syntax is:
|
|
||||||
@example
|
|
||||||
[-]HH:MM:SS[.m...]
|
|
||||||
[-]S+[.m...]
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@var{HH} expresses the number of hours, @var{MM} the number a of minutes
|
|
||||||
and @var{SS} the number of seconds.
|
|
||||||
|
|
||||||
@anchor{video size syntax}
|
|
||||||
@section Video size
|
|
||||||
Specify the size of the sourced video, it may be a string of the form
|
|
||||||
@var{width}x@var{height}, or the name of a size abbreviation.
|
|
||||||
|
|
||||||
The following abbreviations are recognized:
|
|
||||||
@table @samp
|
|
||||||
@item sqcif
|
|
||||||
128x96
|
|
||||||
@item qcif
|
|
||||||
176x144
|
|
||||||
@item cif
|
|
||||||
352x288
|
|
||||||
@item 4cif
|
|
||||||
704x576
|
|
||||||
@item 16cif
|
|
||||||
1408x1152
|
|
||||||
@item qqvga
|
|
||||||
160x120
|
|
||||||
@item qvga
|
|
||||||
320x240
|
|
||||||
@item vga
|
|
||||||
640x480
|
|
||||||
@item svga
|
|
||||||
800x600
|
|
||||||
@item xga
|
|
||||||
1024x768
|
|
||||||
@item uxga
|
|
||||||
1600x1200
|
|
||||||
@item qxga
|
|
||||||
2048x1536
|
|
||||||
@item sxga
|
|
||||||
1280x1024
|
|
||||||
@item qsxga
|
|
||||||
2560x2048
|
|
||||||
@item hsxga
|
|
||||||
5120x4096
|
|
||||||
@item wvga
|
|
||||||
852x480
|
|
||||||
@item wxga
|
|
||||||
1366x768
|
|
||||||
@item wsxga
|
|
||||||
1600x1024
|
|
||||||
@item wuxga
|
|
||||||
1920x1200
|
|
||||||
@item woxga
|
|
||||||
2560x1600
|
|
||||||
@item wqsxga
|
|
||||||
3200x2048
|
|
||||||
@item wquxga
|
|
||||||
3840x2400
|
|
||||||
@item whsxga
|
|
||||||
6400x4096
|
|
||||||
@item whuxga
|
|
||||||
7680x4800
|
|
||||||
@item cga
|
|
||||||
320x200
|
|
||||||
@item ega
|
|
||||||
640x350
|
|
||||||
@item hd480
|
|
||||||
852x480
|
|
||||||
@item hd720
|
|
||||||
1280x720
|
|
||||||
@item hd1080
|
|
||||||
1920x1080
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@anchor{video rate syntax}
|
|
||||||
@section Video rate
|
|
||||||
|
|
||||||
Specify the frame rate of a video, expressed as the number of frames
|
|
||||||
generated per second. It has to be a string in the format
|
|
||||||
@var{frame_rate_num}/@var{frame_rate_den}, an integer number, a float
|
|
||||||
number or a valid video frame rate abbreviation.
|
|
||||||
|
|
||||||
The following abbreviations are recognized:
|
|
||||||
@table @samp
|
|
||||||
@item ntsc
|
|
||||||
30000/1001
|
|
||||||
@item pal
|
|
||||||
25/1
|
|
||||||
@item qntsc
|
|
||||||
30000/1
|
|
||||||
@item qpal
|
|
||||||
25/1
|
|
||||||
@item sntsc
|
|
||||||
30000/1
|
|
||||||
@item spal
|
|
||||||
25/1
|
|
||||||
@item film
|
|
||||||
24/1
|
|
||||||
@item ntsc-film
|
|
||||||
24000/1
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@anchor{ratio syntax}
|
|
||||||
@section Ratio
|
|
||||||
|
|
||||||
A ratio can be expressed as an expression, or in the form
|
|
||||||
@var{numerator}:@var{denominator}.
|
|
||||||
|
|
||||||
Note that a ratio with infinite (1/0) or negative value is
|
|
||||||
considered valid, so you should check on the returned value if you
|
|
||||||
want to exclude those values.
|
|
||||||
|
|
||||||
The undefined value can be expressed using the "0:0" string.
|
|
||||||
|
|
||||||
@anchor{color syntax}
|
|
||||||
@section Color
|
|
||||||
|
|
||||||
It can be the name of a color (case insensitive match) or a
|
|
||||||
[0x|#]RRGGBB[AA] sequence, possibly followed by "@" and a string
|
|
||||||
representing the alpha component.
|
|
||||||
|
|
||||||
The alpha component may be a string composed by "0x" followed by an
|
|
||||||
hexadecimal number or a decimal number between 0.0 and 1.0, which
|
|
||||||
represents the opacity value (0x00/0.0 means completely transparent,
|
|
||||||
0xff/1.0 completely opaque).
|
|
||||||
If the alpha component is not specified then 0xff is assumed.
|
|
||||||
|
|
||||||
The string "random" will result in a random color.
|
|
||||||
|
|
||||||
@c man end SYNTAX
|
|
||||||
156
doc/t2h.init
156
doc/t2h.init
@@ -1,161 +1,15 @@
|
|||||||
# no horiz rules between sections
|
# no horiz rules between sections
|
||||||
$end_section = \&FFmpeg_end_section;
|
$end_section = \&FFMPEG_end_section;
|
||||||
sub FFmpeg_end_section($$)
|
sub FFMPEG_end_section($$)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
$EXTRA_HEAD =
|
$print_page_foot = \&FFMPEG_print_page_foot;
|
||||||
'<link rel="icon" href="favicon.png" type="image/png" />
|
sub FFMPEG_print_page_foot($$)
|
||||||
<link rel="stylesheet" type="text/css" href="default.css" />
|
|
||||||
';
|
|
||||||
|
|
||||||
$CSS_LINES = <<EOT;
|
|
||||||
<style type="text/css">
|
|
||||||
<!--
|
|
||||||
a.summary-letter { text-decoration: none }
|
|
||||||
a { color: #2D6198; }
|
|
||||||
a:visited { color: #884488; }
|
|
||||||
h1 a, h2 a, h3 a { text-decoration: inherit; color: inherit; }
|
|
||||||
p { margin-left: 1em; margin-right: 1em; }
|
|
||||||
table { margin-left: 2em; }
|
|
||||||
pre { margin-left: 2em; }
|
|
||||||
#footer { text-align: center; }
|
|
||||||
#body { margin-left: 1em; margin-right: 1em; }
|
|
||||||
body { background-color: #313131; margin: 0; }
|
|
||||||
|
|
||||||
#container {
|
|
||||||
background-color: white;
|
|
||||||
color: #202020;
|
|
||||||
margin-left: 1em;
|
|
||||||
margin-right: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
background-color: #7BB37B;
|
|
||||||
border: 1px solid #6A996A;
|
|
||||||
color: #151515;
|
|
||||||
font-size: 1.2em;
|
|
||||||
padding-bottom: 0.2em;
|
|
||||||
padding-left: 0.4em;
|
|
||||||
padding-top: 0.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
color: #313131;
|
|
||||||
font-size: 1.2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
color: #313131;
|
|
||||||
font-size: 0.8em;
|
|
||||||
margin-bottom: -8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.note {
|
|
||||||
margin: 1em;
|
|
||||||
border: 1px solid #bbc9d8;
|
|
||||||
background-color: #dde1e1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.important {
|
|
||||||
margin: 1em;
|
|
||||||
border: 1px solid #d26767;
|
|
||||||
background-color: #f8e1e1;
|
|
||||||
}
|
|
||||||
|
|
||||||
-->
|
|
||||||
</style>
|
|
||||||
EOT
|
|
||||||
|
|
||||||
my $FFMPEG_NAVBAR = $ENV{"FFMPEG_NAVBAR"} || '';
|
|
||||||
|
|
||||||
$AFTER_BODY_OPEN =
|
|
||||||
'<div id="container">' .
|
|
||||||
"\n$FFMPEG_NAVBAR\n" .
|
|
||||||
'<div id="body">';
|
|
||||||
|
|
||||||
$PRE_BODY_CLOSE = '</div></div>';
|
|
||||||
|
|
||||||
$SMALL_RULE = '';
|
|
||||||
$BODYTEXT = '';
|
|
||||||
|
|
||||||
$print_page_foot = \&FFmpeg_print_page_foot;
|
|
||||||
sub FFmpeg_print_page_foot($$)
|
|
||||||
{
|
{
|
||||||
my $fh = shift;
|
my $fh = shift;
|
||||||
print $fh '<div id="footer">' . "\n";
|
print $fh "$SMALL_RULE\n";
|
||||||
T2H_DEFAULT_print_page_foot($fh);
|
T2H_DEFAULT_print_page_foot($fh);
|
||||||
print $fh "</div>\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
$float = \&FFmpeg_float;
|
|
||||||
|
|
||||||
sub FFmpeg_float($$$$)
|
|
||||||
{
|
|
||||||
my $text = shift;
|
|
||||||
my $float = shift;
|
|
||||||
my $caption = shift;
|
|
||||||
my $shortcaption = shift;
|
|
||||||
|
|
||||||
my $label = '';
|
|
||||||
if (exists($float->{'id'}))
|
|
||||||
{
|
|
||||||
$label = &$anchor($float->{'id'});
|
|
||||||
}
|
|
||||||
my $class = '';
|
|
||||||
my $subject = '';
|
|
||||||
|
|
||||||
if ($caption =~ /NOTE/)
|
|
||||||
{
|
|
||||||
$class = "note";
|
|
||||||
}
|
|
||||||
elsif ($caption =~ /IMPORTANT/)
|
|
||||||
{
|
|
||||||
$class = "important";
|
|
||||||
}
|
|
||||||
|
|
||||||
return '<div class="float ' . $class . '">' . "$label\n" . $text . '</div>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$print_page_head = \&FFmpeg_print_page_head;
|
|
||||||
sub FFmpeg_print_page_head($$)
|
|
||||||
{
|
|
||||||
my $fh = shift;
|
|
||||||
my $longtitle = "$Texi2HTML::THISDOC{'title_no_texi'}";
|
|
||||||
$longtitle .= ": $Texi2HTML::NO_TEXI{'This'}" if exists $Texi2HTML::NO_TEXI{'This'};
|
|
||||||
my $description = $DOCUMENT_DESCRIPTION;
|
|
||||||
$description = $longtitle if (!defined($description));
|
|
||||||
$description = "<meta name=\"description\" content=\"$description\">" if
|
|
||||||
($description ne '');
|
|
||||||
$description = $Texi2HTML::THISDOC{'documentdescription'} if (defined($Texi2HTML::THISDOC{'documentdescription'}));
|
|
||||||
my $encoding = '';
|
|
||||||
$encoding = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$ENCODING\">" if (defined($ENCODING) and ($ENCODING ne ''));
|
|
||||||
$longtitle =~ s/Documentation.*//g;
|
|
||||||
$longtitle = "FFmpeg documentation : " . $longtitle;
|
|
||||||
|
|
||||||
print $fh <<EOT;
|
|
||||||
$DOCTYPE
|
|
||||||
<html>
|
|
||||||
$Texi2HTML::THISDOC{'copying'}<!-- Created on $Texi2HTML::THISDOC{today} by $Texi2HTML::THISDOC{program} -->
|
|
||||||
<!--
|
|
||||||
$Texi2HTML::THISDOC{program_authors}
|
|
||||||
-->
|
|
||||||
<head>
|
|
||||||
<title>$longtitle</title>
|
|
||||||
|
|
||||||
$description
|
|
||||||
<meta name="keywords" content="$longtitle">
|
|
||||||
<meta name="resource-type" content="document">
|
|
||||||
<meta name="distribution" content="global">
|
|
||||||
<meta name="Generator" content="$Texi2HTML::THISDOC{program}">
|
|
||||||
$encoding
|
|
||||||
$CSS_LINES
|
|
||||||
$EXTRA_HEAD
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body $BODYTEXT>
|
|
||||||
$AFTER_BODY_OPEN
|
|
||||||
EOT
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# no navigation elements
|
# no navigation elements
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $shift = "";
|
|||||||
%defs = ();
|
%defs = ();
|
||||||
$fnno = 1;
|
$fnno = 1;
|
||||||
$inf = "";
|
$inf = "";
|
||||||
@ibase = ();
|
$ibase = "";
|
||||||
|
|
||||||
while ($_ = shift) {
|
while ($_ = shift) {
|
||||||
if (/^-D(.*)$/) {
|
if (/^-D(.*)$/) {
|
||||||
@@ -52,8 +52,6 @@ while ($_ = shift) {
|
|||||||
die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
|
die "flags may only contain letters, digits, hyphens, dashes and underscores\n"
|
||||||
unless $flag =~ /^[a-zA-Z0-9_-]+$/;
|
unless $flag =~ /^[a-zA-Z0-9_-]+$/;
|
||||||
$defs{$flag} = $value;
|
$defs{$flag} = $value;
|
||||||
} elsif (/^-I(.*)$/) {
|
|
||||||
push @ibase, $1 ne "" ? $1 : shift;
|
|
||||||
} elsif (/^-/) {
|
} elsif (/^-/) {
|
||||||
usage();
|
usage();
|
||||||
} else {
|
} else {
|
||||||
@@ -63,12 +61,10 @@ while ($_ = shift) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
push @ibase, ".";
|
|
||||||
|
|
||||||
if (defined $in) {
|
if (defined $in) {
|
||||||
$inf = gensym();
|
$inf = gensym();
|
||||||
open($inf, "<$in") or die "opening \"$in\": $!\n";
|
open($inf, "<$in") or die "opening \"$in\": $!\n";
|
||||||
push @ibase, $1 if $in =~ m|^(.+)/[^/]+$|;
|
$ibase = $1 if $in =~ m|^(.+)/[^/]+$|;
|
||||||
} else {
|
} else {
|
||||||
$inf = \*STDIN;
|
$inf = \*STDIN;
|
||||||
}
|
}
|
||||||
@@ -78,7 +74,7 @@ if (defined $out) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
while(defined $inf) {
|
while(defined $inf) {
|
||||||
INF: while(<$inf>) {
|
while(<$inf>) {
|
||||||
# Certain commands are discarded without further processing.
|
# Certain commands are discarded without further processing.
|
||||||
/^\@(?:
|
/^\@(?:
|
||||||
[a-z]+index # @*index: useful only in complete manual
|
[a-z]+index # @*index: useful only in complete manual
|
||||||
@@ -108,10 +104,11 @@ INF: while(<$inf>) {
|
|||||||
push @instack, $inf;
|
push @instack, $inf;
|
||||||
$inf = gensym();
|
$inf = gensym();
|
||||||
|
|
||||||
for (@ibase) {
|
# Try cwd and $ibase.
|
||||||
open($inf, "<" . $_ . "/" . $1) and next INF;
|
open($inf, "<" . $1)
|
||||||
}
|
or open($inf, "<" . $ibase . "/" . $1)
|
||||||
die "cannot open $1: $!\n";
|
or die "cannot open $1 or $ibase/$1: $!\n";
|
||||||
|
next;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
|
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
|
||||||
@@ -355,7 +352,6 @@ sub postprocess
|
|||||||
s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
|
s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
|
||||||
s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
|
s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
|
||||||
s/;\s+\@pxref\{(?:[^\}]*)\}//g;
|
s/;\s+\@pxref\{(?:[^\}]*)\}//g;
|
||||||
s/\@ref\{([^\}]*)\}/$1/g;
|
|
||||||
s/\@noindent\s*//g;
|
s/\@noindent\s*//g;
|
||||||
s/\@refill//g;
|
s/\@refill//g;
|
||||||
s/\@gol//g;
|
s/\@gol//g;
|
||||||
|
|||||||
@@ -107,3 +107,4 @@ one with score 3)
|
|||||||
|
|
||||||
Author: Michael niedermayer
|
Author: Michael niedermayer
|
||||||
Copyright LGPL
|
Copyright LGPL
|
||||||
|
|
||||||
|
|||||||
17
ffpresets/libvpx-1080p.ffpreset
Normal file
17
ffpresets/libvpx-1080p.ffpreset
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
vcodec=libvpx
|
||||||
|
g=120
|
||||||
|
rc_lookahead=16
|
||||||
|
quality=good
|
||||||
|
speed=0
|
||||||
|
profile=1
|
||||||
|
qmax=51
|
||||||
|
qmin=11
|
||||||
|
slices=4
|
||||||
|
vb=2M
|
||||||
|
|
||||||
|
#ignored unless using -pass 2
|
||||||
|
maxrate=24M
|
||||||
|
minrate=100k
|
||||||
|
arnr_max_frames=7
|
||||||
|
arnr_strength=5
|
||||||
|
arnr_type=3
|
||||||
17
ffpresets/libvpx-1080p50_60.ffpreset
Normal file
17
ffpresets/libvpx-1080p50_60.ffpreset
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
vcodec=libvpx
|
||||||
|
g=120
|
||||||
|
rc_lookahead=25
|
||||||
|
quality=good
|
||||||
|
speed=0
|
||||||
|
profile=1
|
||||||
|
qmax=51
|
||||||
|
qmin=11
|
||||||
|
slices=4
|
||||||
|
vb=2M
|
||||||
|
|
||||||
|
#ignored unless using -pass 2
|
||||||
|
maxrate=24M
|
||||||
|
minrate=100k
|
||||||
|
arnr_max_frames=7
|
||||||
|
arnr_strength=5
|
||||||
|
arnr_type=3
|
||||||
16
ffpresets/libvpx-360p.ffpreset
Normal file
16
ffpresets/libvpx-360p.ffpreset
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
vcodec=libvpx
|
||||||
|
g=120
|
||||||
|
rc_lookahead=16
|
||||||
|
quality=good
|
||||||
|
speed=0
|
||||||
|
profile=0
|
||||||
|
qmax=63
|
||||||
|
qmin=0
|
||||||
|
vb=768k
|
||||||
|
|
||||||
|
#ignored unless using -pass 2
|
||||||
|
maxrate=1.5M
|
||||||
|
minrate=40k
|
||||||
|
arnr_max_frames=7
|
||||||
|
arnr_strength=5
|
||||||
|
arnr_type=3
|
||||||
17
ffpresets/libvpx-720p.ffpreset
Normal file
17
ffpresets/libvpx-720p.ffpreset
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
vcodec=libvpx
|
||||||
|
g=120
|
||||||
|
rc_lookahead=16
|
||||||
|
quality=good
|
||||||
|
speed=0
|
||||||
|
profile=0
|
||||||
|
qmax=51
|
||||||
|
qmin=11
|
||||||
|
slices=4
|
||||||
|
vb=2M
|
||||||
|
|
||||||
|
#ignored unless using -pass 2
|
||||||
|
maxrate=24M
|
||||||
|
minrate=100k
|
||||||
|
arnr_max_frames=7
|
||||||
|
arnr_strength=5
|
||||||
|
arnr_type=3
|
||||||
17
ffpresets/libvpx-720p50_60.ffpreset
Normal file
17
ffpresets/libvpx-720p50_60.ffpreset
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
vcodec=libvpx
|
||||||
|
g=120
|
||||||
|
rc_lookahead=25
|
||||||
|
quality=good
|
||||||
|
speed=0
|
||||||
|
profile=0
|
||||||
|
qmax=51
|
||||||
|
qmin=11
|
||||||
|
slices=4
|
||||||
|
vb=2M
|
||||||
|
|
||||||
|
#ignored unless using -pass 2
|
||||||
|
maxrate=24M
|
||||||
|
minrate=100k
|
||||||
|
arnr_max_frames=7
|
||||||
|
arnr_strength=5
|
||||||
|
arnr_type=3
|
||||||
4
ffpresets/libx264-baseline.ffpreset
Normal file
4
ffpresets/libx264-baseline.ffpreset
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
coder=0
|
||||||
|
bf=0
|
||||||
|
flags2=-wpred-dct8x8
|
||||||
|
wpredp=0
|
||||||
7
ffpresets/libx264-ipod320.ffpreset
Normal file
7
ffpresets/libx264-ipod320.ffpreset
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
coder=0
|
||||||
|
bf=0
|
||||||
|
flags2=-wpred-dct8x8
|
||||||
|
level=13
|
||||||
|
maxrate=768000
|
||||||
|
bufsize=3000000
|
||||||
|
wpredp=0
|
||||||
8
ffpresets/libx264-ipod640.ffpreset
Normal file
8
ffpresets/libx264-ipod640.ffpreset
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
coder=0
|
||||||
|
bf=0
|
||||||
|
refs=1
|
||||||
|
flags2=-wpred-dct8x8
|
||||||
|
level=30
|
||||||
|
maxrate=10000000
|
||||||
|
bufsize=10000000
|
||||||
|
wpredp=0
|
||||||
20
ffpresets/libx264-lossless_fast.ffpreset
Normal file
20
ffpresets/libx264-lossless_fast.ffpreset
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
coder=0
|
||||||
|
flags=+loop+cgop
|
||||||
|
cmp=+chroma
|
||||||
|
partitions=-parti8x8+parti4x4+partp8x8-partp4x4-partb8x8
|
||||||
|
me_method=hex
|
||||||
|
subq=3
|
||||||
|
me_range=16
|
||||||
|
g=250
|
||||||
|
keyint_min=25
|
||||||
|
sc_threshold=40
|
||||||
|
i_qfactor=0.71
|
||||||
|
b_strategy=1
|
||||||
|
qcomp=0.6
|
||||||
|
qmin=0
|
||||||
|
qmax=69
|
||||||
|
qdiff=4
|
||||||
|
directpred=1
|
||||||
|
flags2=+fastpskip
|
||||||
|
cqp=0
|
||||||
|
wpredp=0
|
||||||
21
ffpresets/libx264-lossless_max.ffpreset
Normal file
21
ffpresets/libx264-lossless_max.ffpreset
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
coder=1
|
||||||
|
flags=+loop+cgop
|
||||||
|
cmp=+chroma
|
||||||
|
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||||
|
me_method=esa
|
||||||
|
subq=8
|
||||||
|
me_range=16
|
||||||
|
g=250
|
||||||
|
keyint_min=25
|
||||||
|
sc_threshold=40
|
||||||
|
i_qfactor=0.71
|
||||||
|
b_strategy=1
|
||||||
|
qcomp=0.6
|
||||||
|
qmin=0
|
||||||
|
qmax=69
|
||||||
|
qdiff=4
|
||||||
|
refs=16
|
||||||
|
directpred=1
|
||||||
|
flags2=+mixed_refs+dct8x8+fastpskip
|
||||||
|
cqp=0
|
||||||
|
wpredp=2
|
||||||
20
ffpresets/libx264-lossless_medium.ffpreset
Normal file
20
ffpresets/libx264-lossless_medium.ffpreset
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
coder=1
|
||||||
|
flags=+loop+cgop
|
||||||
|
cmp=+chroma
|
||||||
|
partitions=-parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||||
|
me_method=hex
|
||||||
|
subq=5
|
||||||
|
me_range=16
|
||||||
|
g=250
|
||||||
|
keyint_min=25
|
||||||
|
sc_threshold=40
|
||||||
|
i_qfactor=0.71
|
||||||
|
b_strategy=1
|
||||||
|
qcomp=0.6
|
||||||
|
qmin=0
|
||||||
|
qmax=69
|
||||||
|
qdiff=4
|
||||||
|
directpred=1
|
||||||
|
flags2=+fastpskip
|
||||||
|
cqp=0
|
||||||
|
wpredp=2
|
||||||
21
ffpresets/libx264-lossless_slow.ffpreset
Normal file
21
ffpresets/libx264-lossless_slow.ffpreset
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
coder=1
|
||||||
|
flags=+loop+cgop
|
||||||
|
cmp=+chroma
|
||||||
|
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||||
|
me_method=umh
|
||||||
|
subq=6
|
||||||
|
me_range=16
|
||||||
|
g=250
|
||||||
|
keyint_min=25
|
||||||
|
sc_threshold=40
|
||||||
|
i_qfactor=0.71
|
||||||
|
b_strategy=1
|
||||||
|
qcomp=0.6
|
||||||
|
qmin=0
|
||||||
|
qmax=69
|
||||||
|
qdiff=4
|
||||||
|
refs=2
|
||||||
|
directpred=1
|
||||||
|
flags2=+dct8x8+fastpskip
|
||||||
|
cqp=0
|
||||||
|
wpredp=2
|
||||||
21
ffpresets/libx264-lossless_slower.ffpreset
Normal file
21
ffpresets/libx264-lossless_slower.ffpreset
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
coder=1
|
||||||
|
flags=+loop+cgop
|
||||||
|
cmp=+chroma
|
||||||
|
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
|
||||||
|
me_method=umh
|
||||||
|
subq=8
|
||||||
|
me_range=16
|
||||||
|
g=250
|
||||||
|
keyint_min=25
|
||||||
|
sc_threshold=40
|
||||||
|
i_qfactor=0.71
|
||||||
|
b_strategy=1
|
||||||
|
qcomp=0.6
|
||||||
|
qmin=0
|
||||||
|
qmax=69
|
||||||
|
qdiff=4
|
||||||
|
refs=4
|
||||||
|
directpred=1
|
||||||
|
flags2=+mixed_refs+dct8x8+fastpskip
|
||||||
|
cqp=0
|
||||||
|
wpredp=2
|
||||||
19
ffpresets/libx264-lossless_ultrafast.ffpreset
Normal file
19
ffpresets/libx264-lossless_ultrafast.ffpreset
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
coder=0
|
||||||
|
flags=+loop+cgop
|
||||||
|
cmp=+chroma
|
||||||
|
partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8
|
||||||
|
me_method=dia
|
||||||
|
subq=0
|
||||||
|
me_range=16
|
||||||
|
g=250
|
||||||
|
keyint_min=25
|
||||||
|
sc_threshold=40
|
||||||
|
i_qfactor=0.71
|
||||||
|
b_strategy=1
|
||||||
|
qcomp=0.6
|
||||||
|
qmin=0
|
||||||
|
qmax=69
|
||||||
|
qdiff=4
|
||||||
|
directpred=1
|
||||||
|
flags2=+fastpskip
|
||||||
|
cqp=0
|
||||||
325
ffserver.c
325
ffserver.c
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
* Multiple format streaming server
|
||||||
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard
|
* Copyright (c) 2000, 2001, 2002 Fabrice Bellard
|
||||||
*
|
*
|
||||||
* This file is part of FFmpeg.
|
* This file is part of FFmpeg.
|
||||||
@@ -18,32 +19,24 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @file
|
|
||||||
* multiple format streaming server based on the FFmpeg libraries
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#if !HAVE_CLOSESOCKET
|
#if !HAVE_CLOSESOCKET
|
||||||
#define closesocket close
|
#define closesocket close
|
||||||
#endif
|
#endif
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
// FIXME those are internal headers, ffserver _really_ shouldn't use them
|
|
||||||
#include "libavformat/ffm.h"
|
#include "libavformat/ffm.h"
|
||||||
#include "libavformat/network.h"
|
#include "libavformat/network.h"
|
||||||
#include "libavformat/os_support.h"
|
#include "libavformat/os_support.h"
|
||||||
#include "libavformat/rtpdec.h"
|
#include "libavformat/rtpdec.h"
|
||||||
#include "libavformat/rtsp.h"
|
#include "libavformat/rtsp.h"
|
||||||
|
// XXX for ffio_open_dyn_packet_buffer, to be removed
|
||||||
#include "libavformat/avio_internal.h"
|
#include "libavformat/avio_internal.h"
|
||||||
#include "libavformat/internal.h"
|
|
||||||
#include "libavformat/url.h"
|
|
||||||
|
|
||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "libavutil/lfg.h"
|
#include "libavutil/lfg.h"
|
||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
#include "libavutil/mathematics.h"
|
|
||||||
#include "libavutil/random_seed.h"
|
#include "libavutil/random_seed.h"
|
||||||
#include "libavutil/parseutils.h"
|
#include "libavutil/parseutils.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
@@ -327,11 +320,6 @@ static AVLFG random_state;
|
|||||||
static FILE *logfile = NULL;
|
static FILE *logfile = NULL;
|
||||||
|
|
||||||
/* FIXME: make ffserver work with IPv6 */
|
/* FIXME: make ffserver work with IPv6 */
|
||||||
void av_noreturn exit_program(int ret)
|
|
||||||
{
|
|
||||||
exit(ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* resolve host with also IP address parsing */
|
/* resolve host with also IP address parsing */
|
||||||
static int resolve_host(struct in_addr *sin_addr, const char *hostname)
|
static int resolve_host(struct in_addr *sin_addr, const char *hostname)
|
||||||
{
|
{
|
||||||
@@ -339,7 +327,8 @@ static int resolve_host(struct in_addr *sin_addr, const char *hostname)
|
|||||||
if (!ff_inet_aton(hostname, sin_addr)) {
|
if (!ff_inet_aton(hostname, sin_addr)) {
|
||||||
#if HAVE_GETADDRINFO
|
#if HAVE_GETADDRINFO
|
||||||
struct addrinfo *ai, *cur;
|
struct addrinfo *ai, *cur;
|
||||||
struct addrinfo hints = { 0 };
|
struct addrinfo hints;
|
||||||
|
memset(&hints, 0, sizeof(hints));
|
||||||
hints.ai_family = AF_INET;
|
hints.ai_family = AF_INET;
|
||||||
if (getaddrinfo(hostname, NULL, &hints, &ai))
|
if (getaddrinfo(hostname, NULL, &hints, &ai))
|
||||||
return -1;
|
return -1;
|
||||||
@@ -481,7 +470,7 @@ static void start_children(FFStream *feed)
|
|||||||
slash++;
|
slash++;
|
||||||
strcpy(slash, "ffmpeg");
|
strcpy(slash, "ffmpeg");
|
||||||
|
|
||||||
http_log("Launch command line: ");
|
http_log("Launch commandline: ");
|
||||||
http_log("%s ", pathname);
|
http_log("%s ", pathname);
|
||||||
for (i = 1; feed->child_argv[i] && feed->child_argv[i][0]; i++)
|
for (i = 1; feed->child_argv[i] && feed->child_argv[i][0]; i++)
|
||||||
http_log("%s ", feed->child_argv[i]);
|
http_log("%s ", feed->child_argv[i]);
|
||||||
@@ -501,10 +490,7 @@ static void start_children(FFStream *feed)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This is needed to make relative pathnames work */
|
/* This is needed to make relative pathnames work */
|
||||||
if (chdir(my_program_dir) < 0) {
|
chdir(my_program_dir);
|
||||||
http_log("chdir failed\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
signal(SIGPIPE, SIG_DFL);
|
signal(SIGPIPE, SIG_DFL);
|
||||||
|
|
||||||
@@ -530,7 +516,6 @@ static int socket_open_listen(struct sockaddr_in *my_addr)
|
|||||||
tmp = 1;
|
tmp = 1;
|
||||||
setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp));
|
setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp));
|
||||||
|
|
||||||
my_addr->sin_family = AF_INET;
|
|
||||||
if (bind (server_fd, (struct sockaddr *) my_addr, sizeof (*my_addr)) < 0) {
|
if (bind (server_fd, (struct sockaddr *) my_addr, sizeof (*my_addr)) < 0) {
|
||||||
char bindmsg[32];
|
char bindmsg[32];
|
||||||
snprintf(bindmsg, sizeof(bindmsg), "bind(port %d)", ntohs(my_addr->sin_port));
|
snprintf(bindmsg, sizeof(bindmsg), "bind(port %d)", ntohs(my_addr->sin_port));
|
||||||
@@ -858,7 +843,7 @@ static void close_connection(HTTPContext *c)
|
|||||||
if (st->codec->codec)
|
if (st->codec->codec)
|
||||||
avcodec_close(st->codec);
|
avcodec_close(st->codec);
|
||||||
}
|
}
|
||||||
avformat_close_input(&c->fmt_in);
|
av_close_input_file(c->fmt_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free RTP output streams if any */
|
/* free RTP output streams if any */
|
||||||
@@ -876,7 +861,7 @@ static void close_connection(HTTPContext *c)
|
|||||||
}
|
}
|
||||||
h = c->rtp_handles[i];
|
h = c->rtp_handles[i];
|
||||||
if (h)
|
if (h)
|
||||||
ffurl_close(h);
|
url_close(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx = &c->fmt_ctx;
|
ctx = &c->fmt_ctx;
|
||||||
@@ -1093,13 +1078,13 @@ static int extract_rates(char *rates, int ratelen, const char *request)
|
|||||||
const char *p;
|
const char *p;
|
||||||
|
|
||||||
for (p = request; *p && *p != '\r' && *p != '\n'; ) {
|
for (p = request; *p && *p != '\r' && *p != '\n'; ) {
|
||||||
if (av_strncasecmp(p, "Pragma:", 7) == 0) {
|
if (strncasecmp(p, "Pragma:", 7) == 0) {
|
||||||
const char *q = p + 7;
|
const char *q = p + 7;
|
||||||
|
|
||||||
while (*q && *q != '\n' && isspace(*q))
|
while (*q && *q != '\n' && isspace(*q))
|
||||||
q++;
|
q++;
|
||||||
|
|
||||||
if (av_strncasecmp(q, "stream-switch-entry=", 20) == 0) {
|
if (strncasecmp(q, "stream-switch-entry=", 20) == 0) {
|
||||||
int stream_no;
|
int stream_no;
|
||||||
int rate_no;
|
int rate_no;
|
||||||
|
|
||||||
@@ -1279,9 +1264,9 @@ static void parse_acl_row(FFStream *stream, FFStream* feed, IPAddressACL *ext_ac
|
|||||||
int errors = 0;
|
int errors = 0;
|
||||||
|
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (av_strcasecmp(arg, "allow") == 0)
|
if (strcasecmp(arg, "allow") == 0)
|
||||||
acl.action = IP_ALLOW;
|
acl.action = IP_ALLOW;
|
||||||
else if (av_strcasecmp(arg, "deny") == 0)
|
else if (strcasecmp(arg, "deny") == 0)
|
||||||
acl.action = IP_DENY;
|
acl.action = IP_DENY;
|
||||||
else {
|
else {
|
||||||
fprintf(stderr, "%s:%d: ACL action '%s' is not ALLOW or DENY\n",
|
fprintf(stderr, "%s:%d: ACL action '%s' is not ALLOW or DENY\n",
|
||||||
@@ -1366,7 +1351,7 @@ static IPAddressACL* parse_dynamic_acl(FFStream *stream, HTTPContext *c)
|
|||||||
continue;
|
continue;
|
||||||
get_arg(cmd, sizeof(cmd), &p);
|
get_arg(cmd, sizeof(cmd), &p);
|
||||||
|
|
||||||
if (!av_strcasecmp(cmd, "ACL"))
|
if (!strcasecmp(cmd, "ACL"))
|
||||||
parse_acl_row(NULL, NULL, acl, p, stream->dynamic_acl, line_num);
|
parse_acl_row(NULL, NULL, acl, p, stream->dynamic_acl, line_num);
|
||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
@@ -1508,7 +1493,7 @@ static int http_parse_request(HTTPContext *c)
|
|||||||
av_strlcpy(filename, url + ((*url == '/') ? 1 : 0), sizeof(filename)-1);
|
av_strlcpy(filename, url + ((*url == '/') ? 1 : 0), sizeof(filename)-1);
|
||||||
|
|
||||||
for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
|
for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
|
||||||
if (av_strncasecmp(p, "User-Agent:", 11) == 0) {
|
if (strncasecmp(p, "User-Agent:", 11) == 0) {
|
||||||
useragent = p + 11;
|
useragent = p + 11;
|
||||||
if (*useragent && *useragent != '\n' && isspace(*useragent))
|
if (*useragent && *useragent != '\n' && isspace(*useragent))
|
||||||
useragent++;
|
useragent++;
|
||||||
@@ -1526,7 +1511,7 @@ static int http_parse_request(HTTPContext *c)
|
|||||||
redir_type = REDIR_ASX;
|
redir_type = REDIR_ASX;
|
||||||
filename[strlen(filename)-1] = 'f';
|
filename[strlen(filename)-1] = 'f';
|
||||||
} else if (av_match_ext(filename, "asf") &&
|
} else if (av_match_ext(filename, "asf") &&
|
||||||
(!useragent || av_strncasecmp(useragent, "NSPlayer", 8) != 0)) {
|
(!useragent || strncasecmp(useragent, "NSPlayer", 8) != 0)) {
|
||||||
/* if this isn't WMP or lookalike, return the redirector file */
|
/* if this isn't WMP or lookalike, return the redirector file */
|
||||||
redir_type = REDIR_ASF;
|
redir_type = REDIR_ASF;
|
||||||
} else if (av_match_ext(filename, "rpm,ram")) {
|
} else if (av_match_ext(filename, "rpm,ram")) {
|
||||||
@@ -1621,7 +1606,7 @@ static int http_parse_request(HTTPContext *c)
|
|||||||
char *hostinfo = 0;
|
char *hostinfo = 0;
|
||||||
|
|
||||||
for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
|
for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
|
||||||
if (av_strncasecmp(p, "Host:", 5) == 0) {
|
if (strncasecmp(p, "Host:", 5) == 0) {
|
||||||
hostinfo = p + 5;
|
hostinfo = p + 5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1750,11 +1735,11 @@ static int http_parse_request(HTTPContext *c)
|
|||||||
int client_id = 0;
|
int client_id = 0;
|
||||||
|
|
||||||
for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
|
for (p = c->buffer; *p && *p != '\r' && *p != '\n'; ) {
|
||||||
if (av_strncasecmp(p, "Pragma: log-line=", 17) == 0) {
|
if (strncasecmp(p, "Pragma: log-line=", 17) == 0) {
|
||||||
logline = p;
|
logline = p;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (av_strncasecmp(p, "Pragma: client-id=", 18) == 0)
|
if (strncasecmp(p, "Pragma: client-id=", 18) == 0)
|
||||||
client_id = strtol(p + 18, 0, 10);
|
client_id = strtol(p + 18, 0, 10);
|
||||||
p = strchr(p, '\n');
|
p = strchr(p, '\n');
|
||||||
if (!p)
|
if (!p)
|
||||||
@@ -1871,7 +1856,7 @@ static int http_parse_request(HTTPContext *c)
|
|||||||
|
|
||||||
static void fmt_bytecount(AVIOContext *pb, int64_t count)
|
static void fmt_bytecount(AVIOContext *pb, int64_t count)
|
||||||
{
|
{
|
||||||
static const char suffix[] = " kMGTP";
|
static const char *suffix = " kMGTP";
|
||||||
const char *s;
|
const char *s;
|
||||||
|
|
||||||
for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++);
|
for (s = suffix; count >= 100000 && s[1]; count /= 1000, s++);
|
||||||
@@ -2121,6 +2106,22 @@ static void compute_status(HTTPContext *c)
|
|||||||
c->buffer_end = c->pb_buffer + len;
|
c->buffer_end = c->pb_buffer + len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* check if the parser needs to be opened for stream i */
|
||||||
|
static void open_parser(AVFormatContext *s, int i)
|
||||||
|
{
|
||||||
|
AVStream *st = s->streams[i];
|
||||||
|
AVCodec *codec;
|
||||||
|
|
||||||
|
if (!st->codec->codec) {
|
||||||
|
codec = avcodec_find_decoder(st->codec->codec_id);
|
||||||
|
if (codec && (codec->capabilities & CODEC_CAP_PARSE_ONLY)) {
|
||||||
|
st->codec->parse_only = 1;
|
||||||
|
if (avcodec_open(st->codec, codec) < 0)
|
||||||
|
st->codec->parse_only = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int open_input_stream(HTTPContext *c, const char *info)
|
static int open_input_stream(HTTPContext *c, const char *info)
|
||||||
{
|
{
|
||||||
char buf[128];
|
char buf[128];
|
||||||
@@ -2160,18 +2161,18 @@ static int open_input_stream(HTTPContext *c, const char *info)
|
|||||||
http_log("could not open %s: %d\n", input_filename, ret);
|
http_log("could not open %s: %d\n", input_filename, ret);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set buffer size */
|
|
||||||
if (buf_size > 0) ffio_set_buf_size(s->pb, buf_size);
|
|
||||||
|
|
||||||
s->flags |= AVFMT_FLAG_GENPTS;
|
s->flags |= AVFMT_FLAG_GENPTS;
|
||||||
c->fmt_in = s;
|
c->fmt_in = s;
|
||||||
if (strcmp(s->iformat->name, "ffm") && avformat_find_stream_info(c->fmt_in, NULL) < 0) {
|
if (strcmp(s->iformat->name, "ffm") && av_find_stream_info(c->fmt_in) < 0) {
|
||||||
http_log("Could not find stream info '%s'\n", input_filename);
|
http_log("Could not find stream info '%s'\n", input_filename);
|
||||||
avformat_close_input(&s);
|
av_close_input_file(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* open each parser */
|
||||||
|
for(i=0;i<s->nb_streams;i++)
|
||||||
|
open_parser(s, i);
|
||||||
|
|
||||||
/* choose stream as clock source (we favorize video stream if
|
/* choose stream as clock source (we favorize video stream if
|
||||||
present) for packet sending */
|
present) for packet sending */
|
||||||
c->pts_stream_index = 0;
|
c->pts_stream_index = 0;
|
||||||
@@ -2263,6 +2264,7 @@ static int http_prepare_data(HTTPContext *c)
|
|||||||
* Default value from FFmpeg
|
* Default value from FFmpeg
|
||||||
* Try to set it use configuration option
|
* Try to set it use configuration option
|
||||||
*/
|
*/
|
||||||
|
c->fmt_ctx.preload = (int)(0.5*AV_TIME_BASE);
|
||||||
c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE);
|
c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE);
|
||||||
|
|
||||||
if (avformat_write_header(&c->fmt_ctx, NULL) < 0) {
|
if (avformat_write_header(&c->fmt_ctx, NULL) < 0) {
|
||||||
@@ -2305,7 +2307,8 @@ static int http_prepare_data(HTTPContext *c)
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
if (c->stream->loop) {
|
if (c->stream->loop) {
|
||||||
avformat_close_input(&c->fmt_in);
|
av_close_input_file(c->fmt_in);
|
||||||
|
c->fmt_in = NULL;
|
||||||
if (open_input_stream(c, "") < 0)
|
if (open_input_stream(c, "") < 0)
|
||||||
goto no_loop;
|
goto no_loop;
|
||||||
goto redo;
|
goto redo;
|
||||||
@@ -2381,7 +2384,7 @@ static int http_prepare_data(HTTPContext *c)
|
|||||||
if (c->rtp_protocol == RTSP_LOWER_TRANSPORT_TCP)
|
if (c->rtp_protocol == RTSP_LOWER_TRANSPORT_TCP)
|
||||||
max_packet_size = RTSP_TCP_MAX_PACKET_SIZE;
|
max_packet_size = RTSP_TCP_MAX_PACKET_SIZE;
|
||||||
else
|
else
|
||||||
max_packet_size = c->rtp_handles[c->packet_stream_index]->max_packet_size;
|
max_packet_size = url_get_max_packet_size(c->rtp_handles[c->packet_stream_index]);
|
||||||
ret = ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size);
|
ret = ffio_open_dyn_packet_buf(&ctx->pb, max_packet_size);
|
||||||
} else {
|
} else {
|
||||||
ret = avio_open_dyn_buf(&ctx->pb);
|
ret = avio_open_dyn_buf(&ctx->pb);
|
||||||
@@ -2534,8 +2537,8 @@ static int http_send_data(HTTPContext *c)
|
|||||||
} else {
|
} else {
|
||||||
/* send RTP packet directly in UDP */
|
/* send RTP packet directly in UDP */
|
||||||
c->buffer_ptr += 4;
|
c->buffer_ptr += 4;
|
||||||
ffurl_write(c->rtp_handles[c->packet_stream_index],
|
url_write(c->rtp_handles[c->packet_stream_index],
|
||||||
c->buffer_ptr, len);
|
c->buffer_ptr, len);
|
||||||
c->buffer_ptr += len;
|
c->buffer_ptr += len;
|
||||||
/* here we continue as we can send several packets per 10 ms slot */
|
/* here we continue as we can send several packets per 10 ms slot */
|
||||||
}
|
}
|
||||||
@@ -2585,11 +2588,8 @@ static int http_start_receive_data(HTTPContext *c)
|
|||||||
if (c->stream->truncate) {
|
if (c->stream->truncate) {
|
||||||
/* truncate feed file */
|
/* truncate feed file */
|
||||||
ffm_write_write_index(c->feed_fd, FFM_PACKET_SIZE);
|
ffm_write_write_index(c->feed_fd, FFM_PACKET_SIZE);
|
||||||
|
ftruncate(c->feed_fd, FFM_PACKET_SIZE);
|
||||||
http_log("Truncating feed file '%s'\n", c->stream->feed_filename);
|
http_log("Truncating feed file '%s'\n", c->stream->feed_filename);
|
||||||
if (ftruncate(c->feed_fd, FFM_PACKET_SIZE) < 0) {
|
|
||||||
http_log("Error truncating feed file: %s\n", strerror(errno));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if ((c->stream->feed_write_index = ffm_read_write_index(fd)) < 0) {
|
if ((c->stream->feed_write_index = ffm_read_write_index(fd)) < 0) {
|
||||||
http_log("Error reading write index from feed file: %s\n", strerror(errno));
|
http_log("Error reading write index from feed file: %s\n", strerror(errno));
|
||||||
@@ -2732,7 +2732,7 @@ static int http_receive_data(HTTPContext *c)
|
|||||||
|
|
||||||
/* Now we have the actual streams */
|
/* Now we have the actual streams */
|
||||||
if (s->nb_streams != feed->nb_streams) {
|
if (s->nb_streams != feed->nb_streams) {
|
||||||
avformat_close_input(&s);
|
av_close_input_stream(s);
|
||||||
av_free(pb);
|
av_free(pb);
|
||||||
http_log("Feed '%s' stream number does not match registered feed\n",
|
http_log("Feed '%s' stream number does not match registered feed\n",
|
||||||
c->stream->feed_filename);
|
c->stream->feed_filename);
|
||||||
@@ -2745,7 +2745,7 @@ static int http_receive_data(HTTPContext *c)
|
|||||||
avcodec_copy_context(fst->codec, st->codec);
|
avcodec_copy_context(fst->codec, st->codec);
|
||||||
}
|
}
|
||||||
|
|
||||||
avformat_close_input(&s);
|
av_close_input_stream(s);
|
||||||
av_free(pb);
|
av_free(pb);
|
||||||
}
|
}
|
||||||
c->buffer_ptr = c->buffer;
|
c->buffer_ptr = c->buffer;
|
||||||
@@ -2837,7 +2837,7 @@ static int rtsp_parse_request(HTTPContext *c)
|
|||||||
char protocol[32];
|
char protocol[32];
|
||||||
char line[1024];
|
char line[1024];
|
||||||
int len;
|
int len;
|
||||||
RTSPMessageHeader header1 = { 0 }, *header = &header1;
|
RTSPMessageHeader header1, *header = &header1;
|
||||||
|
|
||||||
c->buffer_ptr[0] = '\0';
|
c->buffer_ptr[0] = '\0';
|
||||||
p = c->buffer;
|
p = c->buffer;
|
||||||
@@ -2863,6 +2863,7 @@ static int rtsp_parse_request(HTTPContext *c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* parse each header line */
|
/* parse each header line */
|
||||||
|
memset(header, 0, sizeof(*header));
|
||||||
/* skip to next line */
|
/* skip to next line */
|
||||||
while (*p != '\n' && *p != '\0')
|
while (*p != '\n' && *p != '\0')
|
||||||
p++;
|
p++;
|
||||||
@@ -3163,8 +3164,8 @@ static void rtsp_cmd_setup(HTTPContext *c, const char *url,
|
|||||||
|
|
||||||
switch(rtp_c->rtp_protocol) {
|
switch(rtp_c->rtp_protocol) {
|
||||||
case RTSP_LOWER_TRANSPORT_UDP:
|
case RTSP_LOWER_TRANSPORT_UDP:
|
||||||
rtp_port = ff_rtp_get_local_rtp_port(rtp_c->rtp_handles[stream_index]);
|
rtp_port = rtp_get_local_rtp_port(rtp_c->rtp_handles[stream_index]);
|
||||||
rtcp_port = ff_rtp_get_local_rtcp_port(rtp_c->rtp_handles[stream_index]);
|
rtcp_port = rtp_get_local_rtcp_port(rtp_c->rtp_handles[stream_index]);
|
||||||
avio_printf(c->pb, "Transport: RTP/AVP/UDP;unicast;"
|
avio_printf(c->pb, "Transport: RTP/AVP/UDP;unicast;"
|
||||||
"client_port=%d-%d;server_port=%d-%d",
|
"client_port=%d-%d;server_port=%d-%d",
|
||||||
th->client_port_min, th->client_port_max,
|
th->client_port_min, th->client_port_max,
|
||||||
@@ -3420,10 +3421,10 @@ static int rtp_new_av_stream(HTTPContext *c,
|
|||||||
"rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port));
|
"rtp://%s:%d", ipaddr, ntohs(dest_addr->sin_port));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ffurl_open(&h, ctx->filename, AVIO_FLAG_WRITE, NULL, NULL) < 0)
|
if (url_open(&h, ctx->filename, AVIO_FLAG_WRITE) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
c->rtp_handles[stream_index] = h;
|
c->rtp_handles[stream_index] = h;
|
||||||
max_packet_size = h->max_packet_size;
|
max_packet_size = url_get_max_packet_size(h);
|
||||||
break;
|
break;
|
||||||
case RTSP_LOWER_TRANSPORT_TCP:
|
case RTSP_LOWER_TRANSPORT_TCP:
|
||||||
/* RTP/TCP case */
|
/* RTP/TCP case */
|
||||||
@@ -3446,7 +3447,7 @@ static int rtp_new_av_stream(HTTPContext *c,
|
|||||||
if (avformat_write_header(ctx, NULL) < 0) {
|
if (avformat_write_header(ctx, NULL) < 0) {
|
||||||
fail:
|
fail:
|
||||||
if (h)
|
if (h)
|
||||||
ffurl_close(h);
|
url_close(h);
|
||||||
av_free(ctx);
|
av_free(ctx);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -3468,7 +3469,7 @@ static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int cop
|
|||||||
if (!fst)
|
if (!fst)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (copy) {
|
if (copy) {
|
||||||
fst->codec = avcodec_alloc_context3(NULL);
|
fst->codec= avcodec_alloc_context();
|
||||||
memcpy(fst->codec, codec, sizeof(AVCodecContext));
|
memcpy(fst->codec, codec, sizeof(AVCodecContext));
|
||||||
if (codec->extradata_size) {
|
if (codec->extradata_size) {
|
||||||
fst->codec->extradata = av_malloc(codec->extradata_size);
|
fst->codec->extradata = av_malloc(codec->extradata_size);
|
||||||
@@ -3483,7 +3484,7 @@ static AVStream *add_av_stream1(FFStream *stream, AVCodecContext *codec, int cop
|
|||||||
}
|
}
|
||||||
fst->priv_data = av_mallocz(sizeof(FeedData));
|
fst->priv_data = av_mallocz(sizeof(FeedData));
|
||||||
fst->index = stream->nb_streams;
|
fst->index = stream->nb_streams;
|
||||||
avpriv_set_pts_info(fst, 33, 1, 90000);
|
av_set_pts_info(fst, 33, 1, 90000);
|
||||||
fst->sample_aspect_ratio = codec->sample_aspect_ratio;
|
fst->sample_aspect_ratio = codec->sample_aspect_ratio;
|
||||||
stream->streams[stream->nb_streams++] = fst;
|
stream->streams[stream->nb_streams++] = fst;
|
||||||
return fst;
|
return fst;
|
||||||
@@ -3508,7 +3509,7 @@ static int add_av_stream(FFStream *feed, AVStream *st)
|
|||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
if (av1->channels == av->channels &&
|
if (av1->channels == av->channels &&
|
||||||
av1->sample_rate == av->sample_rate)
|
av1->sample_rate == av->sample_rate)
|
||||||
return i;
|
goto found;
|
||||||
break;
|
break;
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
if (av1->width == av->width &&
|
if (av1->width == av->width &&
|
||||||
@@ -3516,7 +3517,7 @@ static int add_av_stream(FFStream *feed, AVStream *st)
|
|||||||
av1->time_base.den == av->time_base.den &&
|
av1->time_base.den == av->time_base.den &&
|
||||||
av1->time_base.num == av->time_base.num &&
|
av1->time_base.num == av->time_base.num &&
|
||||||
av1->gop_size == av->gop_size)
|
av1->gop_size == av->gop_size)
|
||||||
return i;
|
goto found;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
abort();
|
abort();
|
||||||
@@ -3528,6 +3529,8 @@ static int add_av_stream(FFStream *feed, AVStream *st)
|
|||||||
if (!fst)
|
if (!fst)
|
||||||
return -1;
|
return -1;
|
||||||
return feed->nb_streams - 1;
|
return feed->nb_streams - 1;
|
||||||
|
found:
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void remove_stream(FFStream *stream)
|
static void remove_stream(FFStream *stream)
|
||||||
@@ -3621,10 +3624,10 @@ static void build_file_streams(void)
|
|||||||
} else {
|
} else {
|
||||||
/* find all the AVStreams inside and reference them in
|
/* find all the AVStreams inside and reference them in
|
||||||
'stream' */
|
'stream' */
|
||||||
if (avformat_find_stream_info(infile, NULL) < 0) {
|
if (av_find_stream_info(infile) < 0) {
|
||||||
http_log("Could not find codec parameters from '%s'\n",
|
http_log("Could not find codec parameters from '%s'\n",
|
||||||
stream->feed_filename);
|
stream->feed_filename);
|
||||||
avformat_close_input(&infile);
|
av_close_input_file(infile);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
extract_mpeg4_header(infile);
|
extract_mpeg4_header(infile);
|
||||||
@@ -3632,7 +3635,7 @@ static void build_file_streams(void)
|
|||||||
for(i=0;i<infile->nb_streams;i++)
|
for(i=0;i<infile->nb_streams;i++)
|
||||||
add_av_stream1(stream, infile->streams[i]->codec, 1);
|
add_av_stream1(stream, infile->streams[i]->codec, 1);
|
||||||
|
|
||||||
avformat_close_input(&infile);
|
av_close_input_file(infile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3648,10 +3651,7 @@ static void build_feed_streams(void)
|
|||||||
for(stream = first_stream; stream != NULL; stream = stream->next) {
|
for(stream = first_stream; stream != NULL; stream = stream->next) {
|
||||||
feed = stream->feed;
|
feed = stream->feed;
|
||||||
if (feed) {
|
if (feed) {
|
||||||
if (stream->is_feed) {
|
if (!stream->is_feed) {
|
||||||
for(i=0;i<stream->nb_streams;i++)
|
|
||||||
stream->feed_streams[i] = i;
|
|
||||||
} else {
|
|
||||||
/* we handle a stream coming from a feed */
|
/* we handle a stream coming from a feed */
|
||||||
for(i=0;i<stream->nb_streams;i++)
|
for(i=0;i<stream->nb_streams;i++)
|
||||||
stream->feed_streams[i] = add_av_stream(feed, stream->streams[i]);
|
stream->feed_streams[i] = add_av_stream(feed, stream->streams[i]);
|
||||||
@@ -3659,6 +3659,17 @@ static void build_feed_streams(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* gather all streams */
|
||||||
|
for(stream = first_stream; stream != NULL; stream = stream->next) {
|
||||||
|
feed = stream->feed;
|
||||||
|
if (feed) {
|
||||||
|
if (stream->is_feed) {
|
||||||
|
for(i=0;i<stream->nb_streams;i++)
|
||||||
|
stream->feed_streams[i] = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* create feed files if needed */
|
/* create feed files if needed */
|
||||||
for(feed = first_feed; feed != NULL; feed = feed->next_feed) {
|
for(feed = first_feed; feed != NULL; feed = feed->next_feed) {
|
||||||
int fd;
|
int fd;
|
||||||
@@ -3669,8 +3680,6 @@ static void build_feed_streams(void)
|
|||||||
int matches = 0;
|
int matches = 0;
|
||||||
|
|
||||||
if (avformat_open_input(&s, feed->feed_filename, NULL, NULL) >= 0) {
|
if (avformat_open_input(&s, feed->feed_filename, NULL, NULL) >= 0) {
|
||||||
/* set buffer size */
|
|
||||||
ffio_set_buf_size(s->pb, FFM_PACKET_SIZE);
|
|
||||||
/* Now see if it matches */
|
/* Now see if it matches */
|
||||||
if (s->nb_streams == feed->nb_streams) {
|
if (s->nb_streams == feed->nb_streams) {
|
||||||
matches = 1;
|
matches = 1;
|
||||||
@@ -3724,7 +3733,7 @@ static void build_feed_streams(void)
|
|||||||
http_log("Deleting feed file '%s' as stream counts differ (%d != %d)\n",
|
http_log("Deleting feed file '%s' as stream counts differ (%d != %d)\n",
|
||||||
feed->feed_filename, s->nb_streams, feed->nb_streams);
|
feed->feed_filename, s->nb_streams, feed->nb_streams);
|
||||||
|
|
||||||
avformat_close_input(&s);
|
av_close_input_file(s);
|
||||||
} else
|
} else
|
||||||
http_log("Deleting feed file '%s' as it appears to be corrupt\n",
|
http_log("Deleting feed file '%s' as it appears to be corrupt\n",
|
||||||
feed->feed_filename);
|
feed->feed_filename);
|
||||||
@@ -3877,7 +3886,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
|
|||||||
st = av_mallocz(sizeof(AVStream));
|
st = av_mallocz(sizeof(AVStream));
|
||||||
if (!st)
|
if (!st)
|
||||||
return;
|
return;
|
||||||
st->codec = avcodec_alloc_context3(NULL);
|
st->codec = avcodec_alloc_context();
|
||||||
stream->streams[stream->nb_streams++] = st;
|
stream->streams[stream->nb_streams++] = st;
|
||||||
memcpy(st->codec, av, sizeof(AVCodecContext));
|
memcpy(st->codec, av, sizeof(AVCodecContext));
|
||||||
}
|
}
|
||||||
@@ -3934,7 +3943,7 @@ static int ffserver_opt_default(const char *opt, const char *arg,
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
const AVOption *o = av_opt_find(avctx, opt, NULL, type, 0);
|
const AVOption *o = av_opt_find(avctx, opt, NULL, type, 0);
|
||||||
if(o)
|
if(o)
|
||||||
ret = av_opt_set(avctx, opt, arg, 0);
|
ret = av_set_string3(avctx, opt, arg, 1, NULL);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4055,40 +4064,40 @@ static int parse_ffconfig(const char *filename)
|
|||||||
|
|
||||||
get_arg(cmd, sizeof(cmd), &p);
|
get_arg(cmd, sizeof(cmd), &p);
|
||||||
|
|
||||||
if (!av_strcasecmp(cmd, "Port")) {
|
if (!strcasecmp(cmd, "Port")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
val = atoi(arg);
|
val = atoi(arg);
|
||||||
if (val < 1 || val > 65536) {
|
if (val < 1 || val > 65536) {
|
||||||
ERROR("Invalid_port: %s\n", arg);
|
ERROR("Invalid_port: %s\n", arg);
|
||||||
}
|
}
|
||||||
my_http_addr.sin_port = htons(val);
|
my_http_addr.sin_port = htons(val);
|
||||||
} else if (!av_strcasecmp(cmd, "BindAddress")) {
|
} else if (!strcasecmp(cmd, "BindAddress")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (resolve_host(&my_http_addr.sin_addr, arg) != 0) {
|
if (resolve_host(&my_http_addr.sin_addr, arg) != 0) {
|
||||||
ERROR("%s:%d: Invalid host/IP address: %s\n", arg);
|
ERROR("%s:%d: Invalid host/IP address: %s\n", arg);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "NoDaemon")) {
|
} else if (!strcasecmp(cmd, "NoDaemon")) {
|
||||||
ffserver_daemon = 0;
|
ffserver_daemon = 0;
|
||||||
} else if (!av_strcasecmp(cmd, "RTSPPort")) {
|
} else if (!strcasecmp(cmd, "RTSPPort")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
val = atoi(arg);
|
val = atoi(arg);
|
||||||
if (val < 1 || val > 65536) {
|
if (val < 1 || val > 65536) {
|
||||||
ERROR("%s:%d: Invalid port: %s\n", arg);
|
ERROR("%s:%d: Invalid port: %s\n", arg);
|
||||||
}
|
}
|
||||||
my_rtsp_addr.sin_port = htons(atoi(arg));
|
my_rtsp_addr.sin_port = htons(atoi(arg));
|
||||||
} else if (!av_strcasecmp(cmd, "RTSPBindAddress")) {
|
} else if (!strcasecmp(cmd, "RTSPBindAddress")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (resolve_host(&my_rtsp_addr.sin_addr, arg) != 0) {
|
if (resolve_host(&my_rtsp_addr.sin_addr, arg) != 0) {
|
||||||
ERROR("Invalid host/IP address: %s\n", arg);
|
ERROR("Invalid host/IP address: %s\n", arg);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "MaxHTTPConnections")) {
|
} else if (!strcasecmp(cmd, "MaxHTTPConnections")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
val = atoi(arg);
|
val = atoi(arg);
|
||||||
if (val < 1 || val > 65536) {
|
if (val < 1 || val > 65536) {
|
||||||
ERROR("Invalid MaxHTTPConnections: %s\n", arg);
|
ERROR("Invalid MaxHTTPConnections: %s\n", arg);
|
||||||
}
|
}
|
||||||
nb_max_http_connections = val;
|
nb_max_http_connections = val;
|
||||||
} else if (!av_strcasecmp(cmd, "MaxClients")) {
|
} else if (!strcasecmp(cmd, "MaxClients")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
val = atoi(arg);
|
val = atoi(arg);
|
||||||
if (val < 1 || val > nb_max_http_connections) {
|
if (val < 1 || val > nb_max_http_connections) {
|
||||||
@@ -4096,7 +4105,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
} else {
|
} else {
|
||||||
nb_max_connections = val;
|
nb_max_connections = val;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "MaxBandwidth")) {
|
} else if (!strcasecmp(cmd, "MaxBandwidth")) {
|
||||||
int64_t llval;
|
int64_t llval;
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
llval = atoll(arg);
|
llval = atoll(arg);
|
||||||
@@ -4104,10 +4113,10 @@ static int parse_ffconfig(const char *filename)
|
|||||||
ERROR("Invalid MaxBandwidth: %s\n", arg);
|
ERROR("Invalid MaxBandwidth: %s\n", arg);
|
||||||
} else
|
} else
|
||||||
max_bandwidth = llval;
|
max_bandwidth = llval;
|
||||||
} else if (!av_strcasecmp(cmd, "CustomLog")) {
|
} else if (!strcasecmp(cmd, "CustomLog")) {
|
||||||
if (!ffserver_debug)
|
if (!ffserver_debug)
|
||||||
get_arg(logfilename, sizeof(logfilename), &p);
|
get_arg(logfilename, sizeof(logfilename), &p);
|
||||||
} else if (!av_strcasecmp(cmd, "<Feed")) {
|
} else if (!strcasecmp(cmd, "<Feed")) {
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
/* Feed related options */
|
/* Feed related options */
|
||||||
char *q;
|
char *q;
|
||||||
@@ -4141,7 +4150,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
*last_feed = feed;
|
*last_feed = feed;
|
||||||
last_feed = &feed->next_feed;
|
last_feed = &feed->next_feed;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "Launch")) {
|
} else if (!strcasecmp(cmd, "Launch")) {
|
||||||
if (feed) {
|
if (feed) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -4163,24 +4172,24 @@ static int parse_ffconfig(const char *filename)
|
|||||||
inet_ntoa(my_http_addr.sin_addr),
|
inet_ntoa(my_http_addr.sin_addr),
|
||||||
ntohs(my_http_addr.sin_port), feed->filename);
|
ntohs(my_http_addr.sin_port), feed->filename);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "ReadOnlyFile")) {
|
} else if (!strcasecmp(cmd, "ReadOnlyFile")) {
|
||||||
if (feed) {
|
if (feed) {
|
||||||
get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
|
get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
|
||||||
feed->readonly = 1;
|
feed->readonly = 1;
|
||||||
} else if (stream) {
|
} else if (stream) {
|
||||||
get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
|
get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "File")) {
|
} else if (!strcasecmp(cmd, "File")) {
|
||||||
if (feed) {
|
if (feed) {
|
||||||
get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
|
get_arg(feed->feed_filename, sizeof(feed->feed_filename), &p);
|
||||||
} else if (stream)
|
} else if (stream)
|
||||||
get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
|
get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
|
||||||
} else if (!av_strcasecmp(cmd, "Truncate")) {
|
} else if (!strcasecmp(cmd, "Truncate")) {
|
||||||
if (feed) {
|
if (feed) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
feed->truncate = strtod(arg, NULL);
|
feed->truncate = strtod(arg, NULL);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "FileMaxSize")) {
|
} else if (!strcasecmp(cmd, "FileMaxSize")) {
|
||||||
if (feed) {
|
if (feed) {
|
||||||
char *p1;
|
char *p1;
|
||||||
double fsize;
|
double fsize;
|
||||||
@@ -4204,12 +4213,12 @@ static int parse_ffconfig(const char *filename)
|
|||||||
ERROR("Feed max file size is too small, must be at least %d\n", FFM_PACKET_SIZE*4);
|
ERROR("Feed max file size is too small, must be at least %d\n", FFM_PACKET_SIZE*4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "</Feed>")) {
|
} else if (!strcasecmp(cmd, "</Feed>")) {
|
||||||
if (!feed) {
|
if (!feed) {
|
||||||
ERROR("No corresponding <Feed> for </Feed>\n");
|
ERROR("No corresponding <Feed> for </Feed>\n");
|
||||||
}
|
}
|
||||||
feed = NULL;
|
feed = NULL;
|
||||||
} else if (!av_strcasecmp(cmd, "<Stream")) {
|
} else if (!strcasecmp(cmd, "<Stream")) {
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
/* Stream related options */
|
/* Stream related options */
|
||||||
char *q;
|
char *q;
|
||||||
@@ -4230,9 +4239,8 @@ static int parse_ffconfig(const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
stream->fmt = ffserver_guess_format(NULL, stream->filename, NULL);
|
stream->fmt = ffserver_guess_format(NULL, stream->filename, NULL);
|
||||||
avcodec_get_context_defaults3(&video_enc, NULL);
|
avcodec_get_context_defaults2(&video_enc, AVMEDIA_TYPE_VIDEO);
|
||||||
avcodec_get_context_defaults3(&audio_enc, NULL);
|
avcodec_get_context_defaults2(&audio_enc, AVMEDIA_TYPE_AUDIO);
|
||||||
|
|
||||||
audio_id = CODEC_ID_NONE;
|
audio_id = CODEC_ID_NONE;
|
||||||
video_id = CODEC_ID_NONE;
|
video_id = CODEC_ID_NONE;
|
||||||
if (stream->fmt) {
|
if (stream->fmt) {
|
||||||
@@ -4243,7 +4251,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
*last_stream = stream;
|
*last_stream = stream;
|
||||||
last_stream = &stream->next;
|
last_stream = &stream->next;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "Feed")) {
|
} else if (!strcasecmp(cmd, "Feed")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
FFStream *sfeed;
|
FFStream *sfeed;
|
||||||
@@ -4259,7 +4267,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
else
|
else
|
||||||
stream->feed = sfeed;
|
stream->feed = sfeed;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "Format")) {
|
} else if (!strcasecmp(cmd, "Format")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
if (!strcmp(arg, "status")) {
|
if (!strcmp(arg, "status")) {
|
||||||
@@ -4280,7 +4288,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
video_id = stream->fmt->video_codec;
|
video_id = stream->fmt->video_codec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "InputFormat")) {
|
} else if (!strcasecmp(cmd, "InputFormat")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
stream->ifmt = av_find_input_format(arg);
|
stream->ifmt = av_find_input_format(arg);
|
||||||
@@ -4288,65 +4296,65 @@ static int parse_ffconfig(const char *filename)
|
|||||||
ERROR("Unknown input format: %s\n", arg);
|
ERROR("Unknown input format: %s\n", arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "FaviconURL")) {
|
} else if (!strcasecmp(cmd, "FaviconURL")) {
|
||||||
if (stream && stream->stream_type == STREAM_TYPE_STATUS) {
|
if (stream && stream->stream_type == STREAM_TYPE_STATUS) {
|
||||||
get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
|
get_arg(stream->feed_filename, sizeof(stream->feed_filename), &p);
|
||||||
} else {
|
} else {
|
||||||
ERROR("FaviconURL only permitted for status streams\n");
|
ERROR("FaviconURL only permitted for status streams\n");
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "Author")) {
|
} else if (!strcasecmp(cmd, "Author")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
get_arg(stream->author, sizeof(stream->author), &p);
|
get_arg(stream->author, sizeof(stream->author), &p);
|
||||||
} else if (!av_strcasecmp(cmd, "Comment")) {
|
} else if (!strcasecmp(cmd, "Comment")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
get_arg(stream->comment, sizeof(stream->comment), &p);
|
get_arg(stream->comment, sizeof(stream->comment), &p);
|
||||||
} else if (!av_strcasecmp(cmd, "Copyright")) {
|
} else if (!strcasecmp(cmd, "Copyright")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
get_arg(stream->copyright, sizeof(stream->copyright), &p);
|
get_arg(stream->copyright, sizeof(stream->copyright), &p);
|
||||||
} else if (!av_strcasecmp(cmd, "Title")) {
|
} else if (!strcasecmp(cmd, "Title")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
get_arg(stream->title, sizeof(stream->title), &p);
|
get_arg(stream->title, sizeof(stream->title), &p);
|
||||||
} else if (!av_strcasecmp(cmd, "Preroll")) {
|
} else if (!strcasecmp(cmd, "Preroll")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
stream->prebuffer = atof(arg) * 1000;
|
stream->prebuffer = atof(arg) * 1000;
|
||||||
} else if (!av_strcasecmp(cmd, "StartSendOnKey")) {
|
} else if (!strcasecmp(cmd, "StartSendOnKey")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
stream->send_on_key = 1;
|
stream->send_on_key = 1;
|
||||||
} else if (!av_strcasecmp(cmd, "AudioCodec")) {
|
} else if (!strcasecmp(cmd, "AudioCodec")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
audio_id = opt_audio_codec(arg);
|
audio_id = opt_audio_codec(arg);
|
||||||
if (audio_id == CODEC_ID_NONE) {
|
if (audio_id == CODEC_ID_NONE) {
|
||||||
ERROR("Unknown AudioCodec: %s\n", arg);
|
ERROR("Unknown AudioCodec: %s\n", arg);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoCodec")) {
|
} else if (!strcasecmp(cmd, "VideoCodec")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
video_id = opt_video_codec(arg);
|
video_id = opt_video_codec(arg);
|
||||||
if (video_id == CODEC_ID_NONE) {
|
if (video_id == CODEC_ID_NONE) {
|
||||||
ERROR("Unknown VideoCodec: %s\n", arg);
|
ERROR("Unknown VideoCodec: %s\n", arg);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "MaxTime")) {
|
} else if (!strcasecmp(cmd, "MaxTime")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
stream->max_time = atof(arg) * 1000;
|
stream->max_time = atof(arg) * 1000;
|
||||||
} else if (!av_strcasecmp(cmd, "AudioBitRate")) {
|
} else if (!strcasecmp(cmd, "AudioBitRate")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
audio_enc.bit_rate = lrintf(atof(arg) * 1000);
|
audio_enc.bit_rate = lrintf(atof(arg) * 1000);
|
||||||
} else if (!av_strcasecmp(cmd, "AudioChannels")) {
|
} else if (!strcasecmp(cmd, "AudioChannels")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
audio_enc.channels = atoi(arg);
|
audio_enc.channels = atoi(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "AudioSampleRate")) {
|
} else if (!strcasecmp(cmd, "AudioSampleRate")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
audio_enc.sample_rate = atoi(arg);
|
audio_enc.sample_rate = atoi(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "AudioQuality")) {
|
} else if (!strcasecmp(cmd, "AudioQuality")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
// audio_enc.quality = atof(arg) * 1000;
|
// audio_enc.quality = atof(arg) * 1000;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoBitRateRange")) {
|
} else if (!strcasecmp(cmd, "VideoBitRateRange")) {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
int minrate, maxrate;
|
int minrate, maxrate;
|
||||||
|
|
||||||
@@ -4359,32 +4367,32 @@ static int parse_ffconfig(const char *filename)
|
|||||||
ERROR("Incorrect format for VideoBitRateRange -- should be <min>-<max>: %s\n", arg);
|
ERROR("Incorrect format for VideoBitRateRange -- should be <min>-<max>: %s\n", arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "Debug")) {
|
} else if (!strcasecmp(cmd, "Debug")) {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
video_enc.debug = strtol(arg,0,0);
|
video_enc.debug = strtol(arg,0,0);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "Strict")) {
|
} else if (!strcasecmp(cmd, "Strict")) {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
video_enc.strict_std_compliance = atoi(arg);
|
video_enc.strict_std_compliance = atoi(arg);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoBufferSize")) {
|
} else if (!strcasecmp(cmd, "VideoBufferSize")) {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
video_enc.rc_buffer_size = atoi(arg) * 8*1024;
|
video_enc.rc_buffer_size = atoi(arg) * 8*1024;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoBitRateTolerance")) {
|
} else if (!strcasecmp(cmd, "VideoBitRateTolerance")) {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
video_enc.bit_rate_tolerance = atoi(arg) * 1000;
|
video_enc.bit_rate_tolerance = atoi(arg) * 1000;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoBitRate")) {
|
} else if (!strcasecmp(cmd, "VideoBitRate")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
video_enc.bit_rate = atoi(arg) * 1000;
|
video_enc.bit_rate = atoi(arg) * 1000;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoSize")) {
|
} else if (!strcasecmp(cmd, "VideoSize")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
av_parse_video_size(&video_enc.width, &video_enc.height, arg);
|
av_parse_video_size(&video_enc.width, &video_enc.height, arg);
|
||||||
@@ -4393,7 +4401,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
ERROR("Image size must be a multiple of 16\n");
|
ERROR("Image size must be a multiple of 16\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoFrameRate")) {
|
} else if (!strcasecmp(cmd, "VideoFrameRate")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
AVRational frame_rate;
|
AVRational frame_rate;
|
||||||
@@ -4404,29 +4412,29 @@ static int parse_ffconfig(const char *filename)
|
|||||||
video_enc.time_base.den = frame_rate.num;
|
video_enc.time_base.den = frame_rate.num;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoGopSize")) {
|
} else if (!strcasecmp(cmd, "VideoGopSize")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.gop_size = atoi(arg);
|
video_enc.gop_size = atoi(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "VideoIntraOnly")) {
|
} else if (!strcasecmp(cmd, "VideoIntraOnly")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.gop_size = 1;
|
video_enc.gop_size = 1;
|
||||||
} else if (!av_strcasecmp(cmd, "VideoHighQuality")) {
|
} else if (!strcasecmp(cmd, "VideoHighQuality")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.mb_decision = FF_MB_DECISION_BITS;
|
video_enc.mb_decision = FF_MB_DECISION_BITS;
|
||||||
} else if (!av_strcasecmp(cmd, "Video4MotionVector")) {
|
} else if (!strcasecmp(cmd, "Video4MotionVector")) {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
video_enc.mb_decision = FF_MB_DECISION_BITS; //FIXME remove
|
video_enc.mb_decision = FF_MB_DECISION_BITS; //FIXME remove
|
||||||
video_enc.flags |= CODEC_FLAG_4MV;
|
video_enc.flags |= CODEC_FLAG_4MV;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "AVOptionVideo") ||
|
} else if (!strcasecmp(cmd, "AVOptionVideo") ||
|
||||||
!av_strcasecmp(cmd, "AVOptionAudio")) {
|
!strcasecmp(cmd, "AVOptionAudio")) {
|
||||||
char arg2[1024];
|
char arg2[1024];
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
int type;
|
int type;
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
get_arg(arg2, sizeof(arg2), &p);
|
get_arg(arg2, sizeof(arg2), &p);
|
||||||
if (!av_strcasecmp(cmd, "AVOptionVideo")) {
|
if (!strcasecmp(cmd, "AVOptionVideo")) {
|
||||||
avctx = &video_enc;
|
avctx = &video_enc;
|
||||||
type = AV_OPT_FLAG_VIDEO_PARAM;
|
type = AV_OPT_FLAG_VIDEO_PARAM;
|
||||||
} else {
|
} else {
|
||||||
@@ -4436,12 +4444,12 @@ static int parse_ffconfig(const char *filename)
|
|||||||
if (ffserver_opt_default(arg, arg2, avctx, type|AV_OPT_FLAG_ENCODING_PARAM)) {
|
if (ffserver_opt_default(arg, arg2, avctx, type|AV_OPT_FLAG_ENCODING_PARAM)) {
|
||||||
ERROR("AVOption error: %s %s\n", arg, arg2);
|
ERROR("AVOption error: %s %s\n", arg, arg2);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "AVPresetVideo") ||
|
} else if (!strcasecmp(cmd, "AVPresetVideo") ||
|
||||||
!av_strcasecmp(cmd, "AVPresetAudio")) {
|
!strcasecmp(cmd, "AVPresetAudio")) {
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
int type;
|
int type;
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (!av_strcasecmp(cmd, "AVPresetVideo")) {
|
if (!strcasecmp(cmd, "AVPresetVideo")) {
|
||||||
avctx = &video_enc;
|
avctx = &video_enc;
|
||||||
video_enc.codec_id = video_id;
|
video_enc.codec_id = video_id;
|
||||||
type = AV_OPT_FLAG_VIDEO_PARAM;
|
type = AV_OPT_FLAG_VIDEO_PARAM;
|
||||||
@@ -4453,26 +4461,26 @@ static int parse_ffconfig(const char *filename)
|
|||||||
if (ffserver_opt_preset(arg, avctx, type|AV_OPT_FLAG_ENCODING_PARAM, &audio_id, &video_id)) {
|
if (ffserver_opt_preset(arg, avctx, type|AV_OPT_FLAG_ENCODING_PARAM, &audio_id, &video_id)) {
|
||||||
ERROR("AVPreset error: %s\n", arg);
|
ERROR("AVPreset error: %s\n", arg);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoTag")) {
|
} else if (!strcasecmp(cmd, "VideoTag")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if ((strlen(arg) == 4) && stream)
|
if ((strlen(arg) == 4) && stream)
|
||||||
video_enc.codec_tag = MKTAG(arg[0], arg[1], arg[2], arg[3]);
|
video_enc.codec_tag = MKTAG(arg[0], arg[1], arg[2], arg[3]);
|
||||||
} else if (!av_strcasecmp(cmd, "BitExact")) {
|
} else if (!strcasecmp(cmd, "BitExact")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.flags |= CODEC_FLAG_BITEXACT;
|
video_enc.flags |= CODEC_FLAG_BITEXACT;
|
||||||
} else if (!av_strcasecmp(cmd, "DctFastint")) {
|
} else if (!strcasecmp(cmd, "DctFastint")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.dct_algo = FF_DCT_FASTINT;
|
video_enc.dct_algo = FF_DCT_FASTINT;
|
||||||
} else if (!av_strcasecmp(cmd, "IdctSimple")) {
|
} else if (!strcasecmp(cmd, "IdctSimple")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.idct_algo = FF_IDCT_SIMPLE;
|
video_enc.idct_algo = FF_IDCT_SIMPLE;
|
||||||
} else if (!av_strcasecmp(cmd, "Qscale")) {
|
} else if (!strcasecmp(cmd, "Qscale")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
video_enc.flags |= CODEC_FLAG_QSCALE;
|
video_enc.flags |= CODEC_FLAG_QSCALE;
|
||||||
video_enc.global_quality = FF_QP2LAMBDA * atoi(arg);
|
video_enc.global_quality = FF_QP2LAMBDA * atoi(arg);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoQDiff")) {
|
} else if (!strcasecmp(cmd, "VideoQDiff")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
video_enc.max_qdiff = atoi(arg);
|
video_enc.max_qdiff = atoi(arg);
|
||||||
@@ -4480,7 +4488,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
ERROR("VideoQDiff out of range\n");
|
ERROR("VideoQDiff out of range\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoQMax")) {
|
} else if (!strcasecmp(cmd, "VideoQMax")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
video_enc.qmax = atoi(arg);
|
video_enc.qmax = atoi(arg);
|
||||||
@@ -4488,7 +4496,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
ERROR("VideoQMax out of range\n");
|
ERROR("VideoQMax out of range\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "VideoQMin")) {
|
} else if (!strcasecmp(cmd, "VideoQMin")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
video_enc.qmin = atoi(arg);
|
video_enc.qmin = atoi(arg);
|
||||||
@@ -4496,39 +4504,39 @@ static int parse_ffconfig(const char *filename)
|
|||||||
ERROR("VideoQMin out of range\n");
|
ERROR("VideoQMin out of range\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "LumaElim")) {
|
} else if (!strcasecmp(cmd, "LumaElim")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.luma_elim_threshold = atoi(arg);
|
video_enc.luma_elim_threshold = atoi(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "ChromaElim")) {
|
} else if (!strcasecmp(cmd, "ChromaElim")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.chroma_elim_threshold = atoi(arg);
|
video_enc.chroma_elim_threshold = atoi(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "LumiMask")) {
|
} else if (!strcasecmp(cmd, "LumiMask")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.lumi_masking = atof(arg);
|
video_enc.lumi_masking = atof(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "DarkMask")) {
|
} else if (!strcasecmp(cmd, "DarkMask")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
video_enc.dark_masking = atof(arg);
|
video_enc.dark_masking = atof(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "NoVideo")) {
|
} else if (!strcasecmp(cmd, "NoVideo")) {
|
||||||
video_id = CODEC_ID_NONE;
|
video_id = CODEC_ID_NONE;
|
||||||
} else if (!av_strcasecmp(cmd, "NoAudio")) {
|
} else if (!strcasecmp(cmd, "NoAudio")) {
|
||||||
audio_id = CODEC_ID_NONE;
|
audio_id = CODEC_ID_NONE;
|
||||||
} else if (!av_strcasecmp(cmd, "ACL")) {
|
} else if (!strcasecmp(cmd, "ACL")) {
|
||||||
parse_acl_row(stream, feed, NULL, p, filename, line_num);
|
parse_acl_row(stream, feed, NULL, p, filename, line_num);
|
||||||
} else if (!av_strcasecmp(cmd, "DynamicACL")) {
|
} else if (!strcasecmp(cmd, "DynamicACL")) {
|
||||||
if (stream) {
|
if (stream) {
|
||||||
get_arg(stream->dynamic_acl, sizeof(stream->dynamic_acl), &p);
|
get_arg(stream->dynamic_acl, sizeof(stream->dynamic_acl), &p);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "RTSPOption")) {
|
} else if (!strcasecmp(cmd, "RTSPOption")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
av_freep(&stream->rtsp_option);
|
av_freep(&stream->rtsp_option);
|
||||||
stream->rtsp_option = av_strdup(arg);
|
stream->rtsp_option = av_strdup(arg);
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "MulticastAddress")) {
|
} else if (!strcasecmp(cmd, "MulticastAddress")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream) {
|
if (stream) {
|
||||||
if (resolve_host(&stream->multicast_ip, arg) != 0) {
|
if (resolve_host(&stream->multicast_ip, arg) != 0) {
|
||||||
@@ -4537,18 +4545,18 @@ static int parse_ffconfig(const char *filename)
|
|||||||
stream->is_multicast = 1;
|
stream->is_multicast = 1;
|
||||||
stream->loop = 1; /* default is looping */
|
stream->loop = 1; /* default is looping */
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "MulticastPort")) {
|
} else if (!strcasecmp(cmd, "MulticastPort")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
stream->multicast_port = atoi(arg);
|
stream->multicast_port = atoi(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "MulticastTTL")) {
|
} else if (!strcasecmp(cmd, "MulticastTTL")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
stream->multicast_ttl = atoi(arg);
|
stream->multicast_ttl = atoi(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "NoLoop")) {
|
} else if (!strcasecmp(cmd, "NoLoop")) {
|
||||||
if (stream)
|
if (stream)
|
||||||
stream->loop = 0;
|
stream->loop = 0;
|
||||||
} else if (!av_strcasecmp(cmd, "</Stream>")) {
|
} else if (!strcasecmp(cmd, "</Stream>")) {
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
ERROR("No corresponding <Stream> for </Stream>\n");
|
ERROR("No corresponding <Stream> for </Stream>\n");
|
||||||
} else {
|
} else {
|
||||||
@@ -4566,7 +4574,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
}
|
}
|
||||||
stream = NULL;
|
stream = NULL;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "<Redirect")) {
|
} else if (!strcasecmp(cmd, "<Redirect")) {
|
||||||
/*********************************************/
|
/*********************************************/
|
||||||
char *q;
|
char *q;
|
||||||
if (stream || feed || redirect) {
|
if (stream || feed || redirect) {
|
||||||
@@ -4582,10 +4590,10 @@ static int parse_ffconfig(const char *filename)
|
|||||||
*q = '\0';
|
*q = '\0';
|
||||||
redirect->stream_type = STREAM_TYPE_REDIRECT;
|
redirect->stream_type = STREAM_TYPE_REDIRECT;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "URL")) {
|
} else if (!strcasecmp(cmd, "URL")) {
|
||||||
if (redirect)
|
if (redirect)
|
||||||
get_arg(redirect->feed_filename, sizeof(redirect->feed_filename), &p);
|
get_arg(redirect->feed_filename, sizeof(redirect->feed_filename), &p);
|
||||||
} else if (!av_strcasecmp(cmd, "</Redirect>")) {
|
} else if (!strcasecmp(cmd, "</Redirect>")) {
|
||||||
if (!redirect) {
|
if (!redirect) {
|
||||||
ERROR("No corresponding <Redirect> for </Redirect>\n");
|
ERROR("No corresponding <Redirect> for </Redirect>\n");
|
||||||
} else {
|
} else {
|
||||||
@@ -4594,7 +4602,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
}
|
}
|
||||||
redirect = NULL;
|
redirect = NULL;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "LoadModule")) {
|
} else if (!strcasecmp(cmd, "LoadModule")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
#if HAVE_DLOPEN
|
#if HAVE_DLOPEN
|
||||||
load_module(arg);
|
load_module(arg);
|
||||||
@@ -4665,24 +4673,23 @@ static const OptionDef options[] = {
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
struct sigaction sigact = { { 0 } };
|
struct sigaction sigact;
|
||||||
|
|
||||||
parse_loglevel(argc, argv, options);
|
|
||||||
av_register_all();
|
av_register_all();
|
||||||
avformat_network_init();
|
|
||||||
|
|
||||||
show_banner(argc, argv, options);
|
show_banner();
|
||||||
|
|
||||||
my_program_name = argv[0];
|
my_program_name = argv[0];
|
||||||
my_program_dir = getcwd(0, 0);
|
my_program_dir = getcwd(0, 0);
|
||||||
ffserver_daemon = 1;
|
ffserver_daemon = 1;
|
||||||
|
|
||||||
parse_options(NULL, argc, argv, options, NULL);
|
parse_options(argc, argv, options, NULL);
|
||||||
|
|
||||||
unsetenv("http_proxy"); /* Kill the http_proxy */
|
unsetenv("http_proxy"); /* Kill the http_proxy */
|
||||||
|
|
||||||
av_lfg_init(&random_state, av_get_random_seed());
|
av_lfg_init(&random_state, av_get_random_seed());
|
||||||
|
|
||||||
|
memset(&sigact, 0, sizeof(sigact));
|
||||||
sigact.sa_handler = handle_child_exit;
|
sigact.sa_handler = handle_child_exit;
|
||||||
sigact.sa_flags = SA_NOCLDSTOP | SA_RESTART;
|
sigact.sa_flags = SA_NOCLDSTOP | SA_RESTART;
|
||||||
sigaction(SIGCHLD, &sigact, 0);
|
sigaction(SIGCHLD, &sigact, 0);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* GSM common header
|
* Multiple format streaming server
|
||||||
|
* copyright (c) 2002 Fabrice Bellard
|
||||||
*
|
*
|
||||||
* This file is part of FFmpeg.
|
* This file is part of FFmpeg.
|
||||||
*
|
*
|
||||||
@@ -17,15 +18,11 @@
|
|||||||
* License along with FFmpeg; if not, write to the Free Software
|
* License along with FFmpeg; if not, write to the Free Software
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
#ifndef FFMPEG_FFSERVER_H
|
||||||
|
#define FFMPEG_FFSERVER_H
|
||||||
|
|
||||||
#ifndef AVCODEC_GSM_H
|
/* interface between ffserver and modules */
|
||||||
#define AVCODEC_GSM_H
|
|
||||||
|
|
||||||
/* bytes per block */
|
void ffserver_module_init(void);
|
||||||
#define GSM_BLOCK_SIZE 33
|
|
||||||
#define GSM_MS_BLOCK_SIZE 65
|
|
||||||
|
|
||||||
/* samples per block */
|
#endif /* FFMPEG_FFSERVER_H */
|
||||||
#define GSM_FRAME_SIZE 160
|
|
||||||
|
|
||||||
#endif /* AVCODEC_GSM_H */
|
|
||||||
1017
libavcodec/4xm.c
1017
libavcodec/4xm.c
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@
|
|||||||
*
|
*
|
||||||
* Supports: PAL8 (RGB 8bpp, paletted)
|
* Supports: PAL8 (RGB 8bpp, paletted)
|
||||||
* : BGR24 (RGB 24bpp) (can also output it as RGB32)
|
* : BGR24 (RGB 24bpp) (can also output it as RGB32)
|
||||||
* : RGB32 (RGB 32bpp, 4th plane is alpha)
|
* : RGB32 (RGB 32bpp, 4th plane is probably alpha and it's ignored)
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -38,20 +38,20 @@
|
|||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
|
|
||||||
|
|
||||||
static const enum PixelFormat pixfmt_rgb24[] = {
|
static const enum PixelFormat pixfmt_rgb24[] = {PIX_FMT_BGR24, PIX_FMT_RGB32, PIX_FMT_NONE};
|
||||||
PIX_FMT_BGR24, PIX_FMT_RGB32, PIX_FMT_NONE };
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Decoder context
|
* Decoder context
|
||||||
*/
|
*/
|
||||||
typedef struct EightBpsContext {
|
typedef struct EightBpsContext {
|
||||||
AVCodecContext *avctx;
|
|
||||||
AVFrame pic;
|
|
||||||
|
|
||||||
unsigned char planes;
|
AVCodecContext *avctx;
|
||||||
unsigned char planemap[4];
|
AVFrame pic;
|
||||||
|
|
||||||
uint32_t pal[256];
|
unsigned char planes;
|
||||||
|
unsigned char planemap[4];
|
||||||
|
|
||||||
|
uint32_t pal[256];
|
||||||
} EightBpsContext;
|
} EightBpsContext;
|
||||||
|
|
||||||
|
|
||||||
@@ -60,90 +60,94 @@ typedef struct EightBpsContext {
|
|||||||
* Decode a frame
|
* Decode a frame
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static int decode_frame(AVCodecContext *avctx, void *data,
|
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
|
||||||
int *data_size, AVPacket *avpkt)
|
|
||||||
{
|
{
|
||||||
const uint8_t *buf = avpkt->data;
|
const uint8_t *buf = avpkt->data;
|
||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
EightBpsContext * const c = avctx->priv_data;
|
EightBpsContext * const c = avctx->priv_data;
|
||||||
const unsigned char *encoded = buf;
|
const unsigned char *encoded = buf;
|
||||||
unsigned char *pixptr, *pixptr_end;
|
unsigned char *pixptr, *pixptr_end;
|
||||||
unsigned int height = avctx->height; // Real image height
|
unsigned int height = avctx->height; // Real image height
|
||||||
unsigned int dlen, p, row;
|
unsigned int dlen, p, row;
|
||||||
const unsigned char *lp, *dp;
|
const unsigned char *lp, *dp;
|
||||||
unsigned char count;
|
unsigned char count;
|
||||||
unsigned int planes = c->planes;
|
unsigned int px_inc;
|
||||||
unsigned char *planemap = c->planemap;
|
unsigned int planes = c->planes;
|
||||||
|
unsigned char *planemap = c->planemap;
|
||||||
|
|
||||||
if (c->pic.data[0])
|
if(c->pic.data[0])
|
||||||
avctx->release_buffer(avctx, &c->pic);
|
avctx->release_buffer(avctx, &c->pic);
|
||||||
|
|
||||||
c->pic.reference = 0;
|
c->pic.reference = 0;
|
||||||
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
|
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
|
||||||
if (avctx->get_buffer(avctx, &c->pic) < 0){
|
if(avctx->get_buffer(avctx, &c->pic) < 0){
|
||||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set data pointer after line lengths */
|
/* Set data pointer after line lengths */
|
||||||
dp = encoded + planes * (height << 1);
|
dp = encoded + planes * (height << 1);
|
||||||
|
|
||||||
for (p = 0; p < planes; p++) {
|
/* Ignore alpha plane, don't know what to do with it */
|
||||||
/* Lines length pointer for this plane */
|
if (planes == 4)
|
||||||
lp = encoded + p * (height << 1);
|
planes--;
|
||||||
|
|
||||||
/* Decode a plane */
|
px_inc = planes + (avctx->pix_fmt == PIX_FMT_RGB32);
|
||||||
for (row = 0; row < height; row++) {
|
|
||||||
pixptr = c->pic.data[0] + row * c->pic.linesize[0] + planemap[p];
|
for (p = 0; p < planes; p++) {
|
||||||
pixptr_end = pixptr + c->pic.linesize[0];
|
/* Lines length pointer for this plane */
|
||||||
dlen = av_be2ne16(*(const unsigned short *)(lp + row * 2));
|
lp = encoded + p * (height << 1);
|
||||||
/* Decode a row of this plane */
|
|
||||||
while (dlen > 0) {
|
/* Decode a plane */
|
||||||
if (dp + 1 >= buf + buf_size)
|
for(row = 0; row < height; row++) {
|
||||||
return -1;
|
pixptr = c->pic.data[0] + row * c->pic.linesize[0] + planemap[p];
|
||||||
if ((count = *dp++) <= 127) {
|
pixptr_end = pixptr + c->pic.linesize[0];
|
||||||
count++;
|
dlen = av_be2ne16(*(const unsigned short *)(lp+row*2));
|
||||||
dlen -= count + 1;
|
/* Decode a row of this plane */
|
||||||
if (pixptr + count * planes > pixptr_end)
|
while(dlen > 0) {
|
||||||
break;
|
if(dp + 1 >= buf+buf_size) return -1;
|
||||||
if (dp + count > buf + buf_size)
|
if ((count = *dp++) <= 127) {
|
||||||
return -1;
|
count++;
|
||||||
while (count--) {
|
dlen -= count + 1;
|
||||||
*pixptr = *dp++;
|
if (pixptr + count * px_inc > pixptr_end)
|
||||||
pixptr += planes;
|
break;
|
||||||
}
|
if(dp + count > buf+buf_size) return -1;
|
||||||
} else {
|
while(count--) {
|
||||||
count = 257 - count;
|
*pixptr = *dp++;
|
||||||
if (pixptr + count * planes > pixptr_end)
|
pixptr += px_inc;
|
||||||
break;
|
}
|
||||||
while (count--) {
|
} else {
|
||||||
*pixptr = *dp;
|
count = 257 - count;
|
||||||
pixptr += planes;
|
if (pixptr + count * px_inc > pixptr_end)
|
||||||
}
|
break;
|
||||||
dp++;
|
while(count--) {
|
||||||
dlen -= 2;
|
*pixptr = *dp;
|
||||||
|
pixptr += px_inc;
|
||||||
|
}
|
||||||
|
dp++;
|
||||||
|
dlen -= 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (avctx->bits_per_coded_sample <= 8) {
|
|
||||||
const uint8_t *pal = av_packet_get_side_data(avpkt,
|
|
||||||
AV_PKT_DATA_PALETTE,
|
|
||||||
NULL);
|
|
||||||
if (pal) {
|
|
||||||
c->pic.palette_has_changed = 1;
|
|
||||||
memcpy(c->pal, pal, AVPALETTE_SIZE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
|
if (avctx->bits_per_coded_sample <= 8) {
|
||||||
}
|
const uint8_t *pal = av_packet_get_side_data(avpkt,
|
||||||
|
AV_PKT_DATA_PALETTE,
|
||||||
|
NULL);
|
||||||
|
if (pal) {
|
||||||
|
c->pic.palette_has_changed = 1;
|
||||||
|
memcpy(c->pal, pal, AVPALETTE_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
*data_size = sizeof(AVFrame);
|
memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
|
||||||
*(AVFrame*)data = c->pic;
|
}
|
||||||
|
|
||||||
/* always report that the buffer was completely consumed */
|
*data_size = sizeof(AVFrame);
|
||||||
return buf_size;
|
*(AVFrame*)data = c->pic;
|
||||||
|
|
||||||
|
/* always report that the buffer was completely consumed */
|
||||||
|
return buf_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -154,47 +158,47 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
*/
|
*/
|
||||||
static av_cold int decode_init(AVCodecContext *avctx)
|
static av_cold int decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
EightBpsContext * const c = avctx->priv_data;
|
EightBpsContext * const c = avctx->priv_data;
|
||||||
|
|
||||||
c->avctx = avctx;
|
c->avctx = avctx;
|
||||||
c->pic.data[0] = NULL;
|
|
||||||
|
|
||||||
avcodec_get_frame_defaults(&c->pic);
|
avcodec_get_frame_defaults(&c->pic);
|
||||||
switch (avctx->bits_per_coded_sample) {
|
c->pic.data[0] = NULL;
|
||||||
case 8:
|
|
||||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
switch (avctx->bits_per_coded_sample) {
|
||||||
c->planes = 1;
|
case 8:
|
||||||
c->planemap[0] = 0; // 1st plane is palette indexes
|
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||||
break;
|
c->planes = 1;
|
||||||
case 24:
|
c->planemap[0] = 0; // 1st plane is palette indexes
|
||||||
avctx->pix_fmt = avctx->get_format(avctx, pixfmt_rgb24);
|
break;
|
||||||
c->planes = 3;
|
case 24:
|
||||||
c->planemap[0] = 2; // 1st plane is red
|
avctx->pix_fmt = avctx->get_format(avctx, pixfmt_rgb24);
|
||||||
c->planemap[1] = 1; // 2nd plane is green
|
c->planes = 3;
|
||||||
c->planemap[2] = 0; // 3rd plane is blue
|
c->planemap[0] = 2; // 1st plane is red
|
||||||
break;
|
c->planemap[1] = 1; // 2nd plane is green
|
||||||
case 32:
|
c->planemap[2] = 0; // 3rd plane is blue
|
||||||
avctx->pix_fmt = PIX_FMT_RGB32;
|
break;
|
||||||
c->planes = 4;
|
case 32:
|
||||||
|
avctx->pix_fmt = PIX_FMT_RGB32;
|
||||||
|
c->planes = 4;
|
||||||
#if HAVE_BIGENDIAN
|
#if HAVE_BIGENDIAN
|
||||||
c->planemap[0] = 1; // 1st plane is red
|
c->planemap[0] = 1; // 1st plane is red
|
||||||
c->planemap[1] = 2; // 2nd plane is green
|
c->planemap[1] = 2; // 2nd plane is green
|
||||||
c->planemap[2] = 3; // 3rd plane is blue
|
c->planemap[2] = 3; // 3rd plane is blue
|
||||||
c->planemap[3] = 0; // 4th plane is alpha
|
c->planemap[3] = 0; // 4th plane is alpha???
|
||||||
#else
|
#else
|
||||||
c->planemap[0] = 2; // 1st plane is red
|
c->planemap[0] = 2; // 1st plane is red
|
||||||
c->planemap[1] = 1; // 2nd plane is green
|
c->planemap[1] = 1; // 2nd plane is green
|
||||||
c->planemap[2] = 0; // 3rd plane is blue
|
c->planemap[2] = 0; // 3rd plane is blue
|
||||||
c->planemap[3] = 3; // 4th plane is alpha
|
c->planemap[3] = 3; // 4th plane is alpha???
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_log(avctx, AV_LOG_ERROR, "Error: Unsupported color depth: %u.\n",
|
av_log(avctx, AV_LOG_ERROR, "Error: Unsupported color depth: %u.\n", avctx->bits_per_coded_sample);
|
||||||
avctx->bits_per_coded_sample);
|
return -1;
|
||||||
return -1;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -207,24 +211,25 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
*/
|
*/
|
||||||
static av_cold int decode_end(AVCodecContext *avctx)
|
static av_cold int decode_end(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
EightBpsContext * const c = avctx->priv_data;
|
EightBpsContext * const c = avctx->priv_data;
|
||||||
|
|
||||||
if (c->pic.data[0])
|
if (c->pic.data[0])
|
||||||
avctx->release_buffer(avctx, &c->pic);
|
avctx->release_buffer(avctx, &c->pic);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AVCodec ff_eightbps_decoder = {
|
AVCodec ff_eightbps_decoder = {
|
||||||
.name = "8bps",
|
"8bps",
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
AVMEDIA_TYPE_VIDEO,
|
||||||
.id = CODEC_ID_8BPS,
|
CODEC_ID_8BPS,
|
||||||
.priv_data_size = sizeof(EightBpsContext),
|
sizeof(EightBpsContext),
|
||||||
.init = decode_init,
|
decode_init,
|
||||||
.close = decode_end,
|
NULL,
|
||||||
.decode = decode_frame,
|
decode_end,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
decode_frame,
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
CODEC_CAP_DR1,
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
/**
|
/**
|
||||||
* @file
|
* @file
|
||||||
* 8svx audio decoder
|
* 8svx audio decoder
|
||||||
* @author Jaikrishnan Menon
|
|
||||||
*
|
|
||||||
* supports: fibonacci delta encoding
|
* supports: fibonacci delta encoding
|
||||||
* : exponential encoding
|
* : exponential encoding
|
||||||
*
|
*
|
||||||
@@ -41,13 +39,12 @@
|
|||||||
|
|
||||||
/** decoder context */
|
/** decoder context */
|
||||||
typedef struct EightSvxContext {
|
typedef struct EightSvxContext {
|
||||||
AVFrame frame;
|
|
||||||
const int8_t *table;
|
const int8_t *table;
|
||||||
|
|
||||||
/* buffer used to store the whole audio decoded/interleaved chunk,
|
/* buffer used to store the whole audio decoded/interleaved chunk,
|
||||||
* which is sent with the first packet */
|
* which is sent with the first packet */
|
||||||
uint8_t *samples;
|
uint8_t *samples;
|
||||||
int64_t samples_size;
|
size_t samples_size;
|
||||||
int samples_idx;
|
int samples_idx;
|
||||||
} EightSvxContext;
|
} EightSvxContext;
|
||||||
|
|
||||||
@@ -100,19 +97,18 @@ static int delta_decode(int8_t *dst, const uint8_t *src, int src_size,
|
|||||||
return dst-dst0;
|
return dst-dst0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** decode a frame */
|
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||||
static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
|
AVPacket *avpkt)
|
||||||
int *got_frame_ptr, AVPacket *avpkt)
|
|
||||||
{
|
{
|
||||||
EightSvxContext *esc = avctx->priv_data;
|
EightSvxContext *esc = avctx->priv_data;
|
||||||
int n, out_data_size, ret;
|
int out_data_size, n;
|
||||||
uint8_t *src, *dst;
|
uint8_t *src, *dst;
|
||||||
|
|
||||||
/* decode and interleave the first packet */
|
/* decode and interleave the first packet */
|
||||||
if (!esc->samples && avpkt) {
|
if (!esc->samples && avpkt) {
|
||||||
uint8_t *deinterleaved_samples, *p = NULL;
|
uint8_t *deinterleaved_samples;
|
||||||
|
|
||||||
esc->samples_size = avctx->codec->id == CODEC_ID_8SVX_RAW || avctx->codec->id ==CODEC_ID_PCM_S8_PLANAR?
|
esc->samples_size = avctx->codec->id == CODEC_ID_8SVX_RAW ?
|
||||||
avpkt->size : avctx->channels + (avpkt->size-avctx->channels) * 2;
|
avpkt->size : avctx->channels + (avpkt->size-avctx->channels) * 2;
|
||||||
if (!(esc->samples = av_malloc(esc->samples_size)))
|
if (!(esc->samples = av_malloc(esc->samples_size)))
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
@@ -123,13 +119,8 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
int n = esc->samples_size;
|
int n = esc->samples_size;
|
||||||
|
|
||||||
if (buf_size < 2) {
|
|
||||||
av_log(avctx, AV_LOG_ERROR, "packet size is too small\n");
|
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
|
||||||
if (!(deinterleaved_samples = av_mallocz(n)))
|
if (!(deinterleaved_samples = av_mallocz(n)))
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
p = deinterleaved_samples;
|
|
||||||
|
|
||||||
/* the uncompressed starting value is contained in the first byte */
|
/* the uncompressed starting value is contained in the first byte */
|
||||||
if (avctx->channels == 2) {
|
if (avctx->channels == 2) {
|
||||||
@@ -146,25 +137,21 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
interleave_stereo(esc->samples, deinterleaved_samples, esc->samples_size);
|
interleave_stereo(esc->samples, deinterleaved_samples, esc->samples_size);
|
||||||
else
|
else
|
||||||
memcpy(esc->samples, deinterleaved_samples, esc->samples_size);
|
memcpy(esc->samples, deinterleaved_samples, esc->samples_size);
|
||||||
av_freep(&p);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get output buffer */
|
/* return single packed with fixed size */
|
||||||
esc->frame.nb_samples = (FFMIN(MAX_FRAME_SIZE, esc->samples_size - esc->samples_idx) +avctx->channels-1) / avctx->channels;
|
out_data_size = FFMIN(MAX_FRAME_SIZE, esc->samples_size - esc->samples_idx);
|
||||||
if ((ret = avctx->get_buffer(avctx, &esc->frame)) < 0) {
|
if (*data_size < out_data_size) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
av_log(avctx, AV_LOG_ERROR, "Provided buffer with size %d is too small.\n", *data_size);
|
||||||
return ret;
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
*got_frame_ptr = 1;
|
*data_size = out_data_size;
|
||||||
*(AVFrame *)data = esc->frame;
|
dst = data;
|
||||||
|
|
||||||
dst = esc->frame.data[0];
|
|
||||||
src = esc->samples + esc->samples_idx;
|
src = esc->samples + esc->samples_idx;
|
||||||
out_data_size = esc->frame.nb_samples * avctx->channels;
|
|
||||||
for (n = out_data_size; n > 0; n--)
|
for (n = out_data_size; n > 0; n--)
|
||||||
*dst++ = *src++ + 128;
|
*dst++ = *src++ + 128;
|
||||||
esc->samples_idx += out_data_size;
|
esc->samples_idx += *data_size;
|
||||||
|
|
||||||
return avctx->codec->id == CODEC_ID_8SVX_FIB || avctx->codec->id == CODEC_ID_8SVX_EXP ?
|
return avctx->codec->id == CODEC_ID_8SVX_FIB || avctx->codec->id == CODEC_ID_8SVX_EXP ?
|
||||||
(avctx->frame_number == 0)*2 + out_data_size / 2 :
|
(avctx->frame_number == 0)*2 + out_data_size / 2 :
|
||||||
@@ -175,7 +162,7 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
|
|||||||
{
|
{
|
||||||
EightSvxContext *esc = avctx->priv_data;
|
EightSvxContext *esc = avctx->priv_data;
|
||||||
|
|
||||||
if (avctx->channels < 1 || avctx->channels > 2) {
|
if (avctx->channels > 2) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "8SVX does not support more than 2 channels\n");
|
av_log(avctx, AV_LOG_ERROR, "8SVX does not support more than 2 channels\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
@@ -183,7 +170,6 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
|
|||||||
switch (avctx->codec->id) {
|
switch (avctx->codec->id) {
|
||||||
case CODEC_ID_8SVX_FIB: esc->table = fibonacci; break;
|
case CODEC_ID_8SVX_FIB: esc->table = fibonacci; break;
|
||||||
case CODEC_ID_8SVX_EXP: esc->table = exponential; break;
|
case CODEC_ID_8SVX_EXP: esc->table = exponential; break;
|
||||||
case CODEC_ID_PCM_S8_PLANAR:
|
|
||||||
case CODEC_ID_8SVX_RAW: esc->table = NULL; break;
|
case CODEC_ID_8SVX_RAW: esc->table = NULL; break;
|
||||||
default:
|
default:
|
||||||
av_log(avctx, AV_LOG_ERROR, "Invalid codec id %d.\n", avctx->codec->id);
|
av_log(avctx, AV_LOG_ERROR, "Invalid codec id %d.\n", avctx->codec->id);
|
||||||
@@ -191,9 +177,6 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
|
|||||||
}
|
}
|
||||||
avctx->sample_fmt = AV_SAMPLE_FMT_U8;
|
avctx->sample_fmt = AV_SAMPLE_FMT_U8;
|
||||||
|
|
||||||
avcodec_get_frame_defaults(&esc->frame);
|
|
||||||
avctx->coded_frame = &esc->frame;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,7 +199,6 @@ AVCodec ff_eightsvx_fib_decoder = {
|
|||||||
.init = eightsvx_decode_init,
|
.init = eightsvx_decode_init,
|
||||||
.decode = eightsvx_decode_frame,
|
.decode = eightsvx_decode_frame,
|
||||||
.close = eightsvx_decode_close,
|
.close = eightsvx_decode_close,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -228,18 +210,16 @@ AVCodec ff_eightsvx_exp_decoder = {
|
|||||||
.init = eightsvx_decode_init,
|
.init = eightsvx_decode_init,
|
||||||
.decode = eightsvx_decode_frame,
|
.decode = eightsvx_decode_frame,
|
||||||
.close = eightsvx_decode_close,
|
.close = eightsvx_decode_close,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
||||||
};
|
};
|
||||||
|
|
||||||
AVCodec ff_pcm_s8_planar_decoder = {
|
AVCodec ff_eightsvx_raw_decoder = {
|
||||||
.name = "pcm_s8_planar",
|
.name = "8svx_raw",
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = CODEC_ID_PCM_S8_PLANAR,
|
.id = CODEC_ID_8SVX_RAW,
|
||||||
.priv_data_size = sizeof(EightSvxContext),
|
.priv_data_size = sizeof(EightSvxContext),
|
||||||
.init = eightsvx_decode_init,
|
.init = eightsvx_decode_init,
|
||||||
.close = eightsvx_decode_close,
|
.decode = eightsvx_decode_frame,
|
||||||
.decode = eightsvx_decode_frame,
|
.close = eightsvx_decode_close,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
.long_name = NULL_IF_CONFIG_SMALL("8SVX rawaudio"),
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("PCM signed 8-bit planar"),
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,14 +3,7 @@ include $(SUBDIR)../config.mak
|
|||||||
NAME = avcodec
|
NAME = avcodec
|
||||||
FFLIBS = avutil
|
FFLIBS = avutil
|
||||||
|
|
||||||
HEADERS = avcodec.h \
|
HEADERS = avcodec.h avfft.h dxva2.h opt.h vaapi.h vdpau.h version.h xvmc.h
|
||||||
avfft.h \
|
|
||||||
dxva2.h \
|
|
||||||
vaapi.h \
|
|
||||||
vda.h \
|
|
||||||
vdpau.h \
|
|
||||||
version.h \
|
|
||||||
xvmc.h \
|
|
||||||
|
|
||||||
OBJS = allcodecs.o \
|
OBJS = allcodecs.o \
|
||||||
audioconvert.o \
|
audioconvert.o \
|
||||||
@@ -46,7 +39,6 @@ OBJS-$(CONFIG_GOLOMB) += golomb.o
|
|||||||
OBJS-$(CONFIG_H264DSP) += h264dsp.o h264idct.o
|
OBJS-$(CONFIG_H264DSP) += h264dsp.o h264idct.o
|
||||||
OBJS-$(CONFIG_H264PRED) += h264pred.o
|
OBJS-$(CONFIG_H264PRED) += h264pred.o
|
||||||
OBJS-$(CONFIG_HUFFMAN) += huffman.o
|
OBJS-$(CONFIG_HUFFMAN) += huffman.o
|
||||||
OBJS-$(CONFIG_LIBXVID) += libxvid_rc.o
|
|
||||||
OBJS-$(CONFIG_LPC) += lpc.o
|
OBJS-$(CONFIG_LPC) += lpc.o
|
||||||
OBJS-$(CONFIG_LSP) += lsp.o
|
OBJS-$(CONFIG_LSP) += lsp.o
|
||||||
OBJS-$(CONFIG_MDCT) += mdct_fixed.o mdct_float.o
|
OBJS-$(CONFIG_MDCT) += mdct_fixed.o mdct_float.o
|
||||||
@@ -57,25 +49,22 @@ RDFT-OBJS-$(CONFIG_HARDCODED_TABLES) += sin_tables.o
|
|||||||
OBJS-$(CONFIG_RDFT) += rdft.o $(RDFT-OBJS-yes)
|
OBJS-$(CONFIG_RDFT) += rdft.o $(RDFT-OBJS-yes)
|
||||||
OBJS-$(CONFIG_SINEWIN) += sinewin.o
|
OBJS-$(CONFIG_SINEWIN) += sinewin.o
|
||||||
OBJS-$(CONFIG_VAAPI) += vaapi.o
|
OBJS-$(CONFIG_VAAPI) += vaapi.o
|
||||||
OBJS-$(CONFIG_VDA) += vda.o
|
|
||||||
OBJS-$(CONFIG_VDPAU) += vdpau.o
|
OBJS-$(CONFIG_VDPAU) += vdpau.o
|
||||||
|
|
||||||
# decoders/encoders/hardware accelerators
|
# decoders/encoders/hardware accelerators
|
||||||
OBJS-$(CONFIG_A64MULTI_ENCODER) += a64multienc.o elbg.o
|
OBJS-$(CONFIG_A64MULTI_ENCODER) += a64multienc.o elbg.o
|
||||||
OBJS-$(CONFIG_A64MULTI5_ENCODER) += a64multienc.o elbg.o
|
OBJS-$(CONFIG_A64MULTI5_ENCODER) += a64multienc.o elbg.o
|
||||||
OBJS-$(CONFIG_AAC_DECODER) += aacdec.o aactab.o aacsbr.o aacps.o \
|
OBJS-$(CONFIG_AAC_DECODER) += aacdec.o aactab.o aacsbr.o aacps.o \
|
||||||
aacadtsdec.o mpeg4audio.o kbdwin.o \
|
aacadtsdec.o mpeg4audio.o kbdwin.o
|
||||||
sbrdsp.o aacpsdsp.o
|
|
||||||
OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o \
|
OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o \
|
||||||
aacpsy.o aactab.o \
|
aacpsy.o aactab.o \
|
||||||
psymodel.o iirfilter.o \
|
psymodel.o iirfilter.o \
|
||||||
mpeg4audio.o kbdwin.o \
|
mpeg4audio.o kbdwin.o
|
||||||
audio_frame_queue.o
|
|
||||||
OBJS-$(CONFIG_AASC_DECODER) += aasc.o msrledec.o
|
OBJS-$(CONFIG_AASC_DECODER) += aasc.o msrledec.o
|
||||||
OBJS-$(CONFIG_AC3_DECODER) += ac3dec.o ac3dec_data.o ac3.o kbdwin.o
|
OBJS-$(CONFIG_AC3_DECODER) += ac3dec.o ac3dec_data.o ac3.o kbdwin.o
|
||||||
OBJS-$(CONFIG_AC3_ENCODER) += ac3enc_float.o ac3enc.o ac3tab.o \
|
OBJS-$(CONFIG_AC3_ENCODER) += ac3enc_combined.o ac3enc_fixed.o ac3enc_float.o ac3tab.o ac3.o kbdwin.o ac3enc.o
|
||||||
ac3.o kbdwin.o
|
OBJS-$(CONFIG_AC3_FLOAT_ENCODER) += ac3enc_float.o ac3tab.o ac3tab.o ac3.o kbdwin.o
|
||||||
OBJS-$(CONFIG_AC3_FIXED_ENCODER) += ac3enc_fixed.o ac3enc.o ac3tab.o ac3.o
|
OBJS-$(CONFIG_AC3_FIXED_ENCODER) += ac3enc_fixed.o ac3tab.o ac3tab.o ac3.o ac3enc.o
|
||||||
OBJS-$(CONFIG_ALAC_DECODER) += alac.o
|
OBJS-$(CONFIG_ALAC_DECODER) += alac.o
|
||||||
OBJS-$(CONFIG_ALAC_ENCODER) += alacenc.o
|
OBJS-$(CONFIG_ALAC_ENCODER) += alacenc.o
|
||||||
OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mpeg4audio.o
|
OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mpeg4audio.o
|
||||||
@@ -101,39 +90,26 @@ OBJS-$(CONFIG_ATRAC1_DECODER) += atrac1.o atrac.o
|
|||||||
OBJS-$(CONFIG_ATRAC3_DECODER) += atrac3.o atrac.o
|
OBJS-$(CONFIG_ATRAC3_DECODER) += atrac3.o atrac.o
|
||||||
OBJS-$(CONFIG_AURA_DECODER) += cyuv.o
|
OBJS-$(CONFIG_AURA_DECODER) += cyuv.o
|
||||||
OBJS-$(CONFIG_AURA2_DECODER) += aura.o
|
OBJS-$(CONFIG_AURA2_DECODER) += aura.o
|
||||||
OBJS-$(CONFIG_AVRP_DECODER) += r210dec.o
|
|
||||||
OBJS-$(CONFIG_AVRP_ENCODER) += r210enc.o
|
|
||||||
OBJS-$(CONFIG_AVS_DECODER) += avs.o
|
OBJS-$(CONFIG_AVS_DECODER) += avs.o
|
||||||
OBJS-$(CONFIG_AVUI_DECODER) += avuidec.o
|
|
||||||
OBJS-$(CONFIG_AVUI_ENCODER) += avuienc.o
|
|
||||||
OBJS-$(CONFIG_AYUV_DECODER) += v408dec.o
|
|
||||||
OBJS-$(CONFIG_AYUV_ENCODER) += v408enc.o
|
|
||||||
OBJS-$(CONFIG_BETHSOFTVID_DECODER) += bethsoftvideo.o
|
OBJS-$(CONFIG_BETHSOFTVID_DECODER) += bethsoftvideo.o
|
||||||
OBJS-$(CONFIG_BFI_DECODER) += bfi.o
|
OBJS-$(CONFIG_BFI_DECODER) += bfi.o
|
||||||
OBJS-$(CONFIG_BINK_DECODER) += bink.o binkdsp.o
|
OBJS-$(CONFIG_BINK_DECODER) += bink.o binkidct.o
|
||||||
OBJS-$(CONFIG_BINKAUDIO_DCT_DECODER) += binkaudio.o wma.o wma_common.o
|
OBJS-$(CONFIG_BINKAUDIO_DCT_DECODER) += binkaudio.o wma.o
|
||||||
OBJS-$(CONFIG_BINKAUDIO_RDFT_DECODER) += binkaudio.o wma.o wma_common.o
|
OBJS-$(CONFIG_BINKAUDIO_RDFT_DECODER) += binkaudio.o wma.o
|
||||||
OBJS-$(CONFIG_BINTEXT_DECODER) += bintext.o cga_data.o
|
|
||||||
OBJS-$(CONFIG_BMP_DECODER) += bmp.o msrledec.o
|
OBJS-$(CONFIG_BMP_DECODER) += bmp.o msrledec.o
|
||||||
OBJS-$(CONFIG_BMP_ENCODER) += bmpenc.o
|
OBJS-$(CONFIG_BMP_ENCODER) += bmpenc.o
|
||||||
OBJS-$(CONFIG_BMV_VIDEO_DECODER) += bmv.o
|
|
||||||
OBJS-$(CONFIG_BMV_AUDIO_DECODER) += bmv.o
|
|
||||||
OBJS-$(CONFIG_C93_DECODER) += c93.o
|
OBJS-$(CONFIG_C93_DECODER) += c93.o
|
||||||
OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o \
|
OBJS-$(CONFIG_CAVS_DECODER) += cavs.o cavsdec.o cavsdsp.o \
|
||||||
mpeg12data.o mpegvideo.o
|
mpeg12data.o mpegvideo.o
|
||||||
OBJS-$(CONFIG_CDGRAPHICS_DECODER) += cdgraphics.o
|
OBJS-$(CONFIG_CDGRAPHICS_DECODER) += cdgraphics.o
|
||||||
OBJS-$(CONFIG_CDXL_DECODER) += cdxl.o
|
|
||||||
OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o
|
OBJS-$(CONFIG_CINEPAK_DECODER) += cinepak.o
|
||||||
OBJS-$(CONFIG_CLJR_DECODER) += cljr.o
|
OBJS-$(CONFIG_CLJR_DECODER) += cljr.o
|
||||||
OBJS-$(CONFIG_CLJR_ENCODER) += cljr.o
|
OBJS-$(CONFIG_CLJR_ENCODER) += cljr.o
|
||||||
OBJS-$(CONFIG_COOK_DECODER) += cook.o
|
OBJS-$(CONFIG_COOK_DECODER) += cook.o
|
||||||
OBJS-$(CONFIG_CSCD_DECODER) += cscd.o
|
OBJS-$(CONFIG_CSCD_DECODER) += cscd.o
|
||||||
OBJS-$(CONFIG_CYUV_DECODER) += cyuv.o
|
OBJS-$(CONFIG_CYUV_DECODER) += cyuv.o
|
||||||
OBJS-$(CONFIG_DCA_DECODER) += dca.o synth_filter.o dcadsp.o \
|
OBJS-$(CONFIG_DCA_DECODER) += dca.o synth_filter.o dcadsp.o
|
||||||
dca_parser.o
|
|
||||||
OBJS-$(CONFIG_DCA_ENCODER) += dcaenc.o
|
OBJS-$(CONFIG_DCA_ENCODER) += dcaenc.o
|
||||||
OBJS-$(CONFIG_DIRAC_DECODER) += diracdec.o dirac.o diracdsp.o \
|
|
||||||
dirac_arith.o mpeg12data.o dwt.o
|
|
||||||
OBJS-$(CONFIG_DFA_DECODER) += dfa.o
|
OBJS-$(CONFIG_DFA_DECODER) += dfa.o
|
||||||
OBJS-$(CONFIG_DNXHD_DECODER) += dnxhddec.o dnxhddata.o
|
OBJS-$(CONFIG_DNXHD_DECODER) += dnxhddec.o dnxhddata.o
|
||||||
OBJS-$(CONFIG_DNXHD_ENCODER) += dnxhdenc.o dnxhddata.o \
|
OBJS-$(CONFIG_DNXHD_ENCODER) += dnxhdenc.o dnxhddata.o \
|
||||||
@@ -148,13 +124,12 @@ OBJS-$(CONFIG_DVBSUB_DECODER) += dvbsubdec.o
|
|||||||
OBJS-$(CONFIG_DVBSUB_ENCODER) += dvbsub.o
|
OBJS-$(CONFIG_DVBSUB_ENCODER) += dvbsub.o
|
||||||
OBJS-$(CONFIG_DVDSUB_DECODER) += dvdsubdec.o
|
OBJS-$(CONFIG_DVDSUB_DECODER) += dvdsubdec.o
|
||||||
OBJS-$(CONFIG_DVDSUB_ENCODER) += dvdsubenc.o
|
OBJS-$(CONFIG_DVDSUB_ENCODER) += dvdsubenc.o
|
||||||
OBJS-$(CONFIG_DVVIDEO_DECODER) += dvdec.o dv.o dvdata.o dv_profile.o
|
OBJS-$(CONFIG_DVVIDEO_DECODER) += dv.o dvdata.o
|
||||||
OBJS-$(CONFIG_DVVIDEO_ENCODER) += dv.o dvdata.o dv_profile.o
|
OBJS-$(CONFIG_DVVIDEO_ENCODER) += dv.o dvdata.o
|
||||||
OBJS-$(CONFIG_DXA_DECODER) += dxa.o
|
OBJS-$(CONFIG_DXA_DECODER) += dxa.o
|
||||||
OBJS-$(CONFIG_DXTORY_DECODER) += dxtory.o
|
OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3dec_data.o
|
||||||
OBJS-$(CONFIG_EAC3_DECODER) += eac3dec.o eac3_data.o
|
|
||||||
OBJS-$(CONFIG_EAC3_ENCODER) += eac3enc.o ac3enc.o ac3enc_float.o \
|
OBJS-$(CONFIG_EAC3_ENCODER) += eac3enc.o ac3enc.o ac3enc_float.o \
|
||||||
ac3tab.o ac3.o kbdwin.o eac3_data.o
|
ac3tab.o ac3.o kbdwin.o
|
||||||
OBJS-$(CONFIG_EACMV_DECODER) += eacmv.o
|
OBJS-$(CONFIG_EACMV_DECODER) += eacmv.o
|
||||||
OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \
|
OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \
|
||||||
mpeg12data.o mpegvideo.o \
|
mpeg12data.o mpegvideo.o \
|
||||||
@@ -169,34 +144,26 @@ OBJS-$(CONFIG_EIGHTSVX_EXP_DECODER) += 8svx.o
|
|||||||
OBJS-$(CONFIG_EIGHTSVX_FIB_DECODER) += 8svx.o
|
OBJS-$(CONFIG_EIGHTSVX_FIB_DECODER) += 8svx.o
|
||||||
OBJS-$(CONFIG_EIGHTSVX_RAW_DECODER) += 8svx.o
|
OBJS-$(CONFIG_EIGHTSVX_RAW_DECODER) += 8svx.o
|
||||||
OBJS-$(CONFIG_ESCAPE124_DECODER) += escape124.o
|
OBJS-$(CONFIG_ESCAPE124_DECODER) += escape124.o
|
||||||
OBJS-$(CONFIG_ESCAPE130_DECODER) += escape130.o
|
|
||||||
OBJS-$(CONFIG_EXR_DECODER) += exr.o
|
|
||||||
OBJS-$(CONFIG_FFV1_DECODER) += ffv1.o rangecoder.o
|
OBJS-$(CONFIG_FFV1_DECODER) += ffv1.o rangecoder.o
|
||||||
OBJS-$(CONFIG_FFV1_ENCODER) += ffv1.o rangecoder.o
|
OBJS-$(CONFIG_FFV1_ENCODER) += ffv1.o rangecoder.o
|
||||||
OBJS-$(CONFIG_FFVHUFF_DECODER) += huffyuv.o
|
OBJS-$(CONFIG_FFVHUFF_DECODER) += huffyuv.o
|
||||||
OBJS-$(CONFIG_FFVHUFF_ENCODER) += huffyuv.o
|
OBJS-$(CONFIG_FFVHUFF_ENCODER) += huffyuv.o
|
||||||
OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o
|
OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
||||||
OBJS-$(CONFIG_FLAC_DECODER) += flacdec.o flacdata.o flac.o
|
|
||||||
OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o vorbis_data.o
|
OBJS-$(CONFIG_FLAC_ENCODER) += flacenc.o flacdata.o flac.o vorbis_data.o
|
||||||
OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
|
OBJS-$(CONFIG_FLASHSV_DECODER) += flashsv.o
|
||||||
OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o
|
OBJS-$(CONFIG_FLASHSV_ENCODER) += flashsvenc.o
|
||||||
OBJS-$(CONFIG_FLASHSV2_ENCODER) += flashsv2enc.o
|
OBJS-$(CONFIG_FLASHSV2_ENCODER) += flashsv2enc.o
|
||||||
OBJS-$(CONFIG_FLASHSV2_DECODER) += flashsv.o
|
|
||||||
OBJS-$(CONFIG_FLIC_DECODER) += flicvideo.o
|
OBJS-$(CONFIG_FLIC_DECODER) += flicvideo.o
|
||||||
OBJS-$(CONFIG_FOURXM_DECODER) += 4xm.o
|
OBJS-$(CONFIG_FOURXM_DECODER) += 4xm.o
|
||||||
OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o
|
OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o
|
||||||
OBJS-$(CONFIG_FRWU_DECODER) += frwu.o
|
OBJS-$(CONFIG_FRWU_DECODER) += frwu.o
|
||||||
OBJS-$(CONFIG_G723_1_DECODER) += g723_1.o acelp_vectors.o \
|
|
||||||
celp_filters.o celp_math.o
|
|
||||||
OBJS-$(CONFIG_G723_1_ENCODER) += g723_1.o acelp_vectors.o celp_math.o
|
|
||||||
OBJS-$(CONFIG_G729_DECODER) += g729dec.o lsp.o celp_math.o acelp_filters.o acelp_pitch_delay.o acelp_vectors.o g729postfilter.o
|
|
||||||
OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o
|
OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o
|
||||||
OBJS-$(CONFIG_GIF_ENCODER) += gif.o lzwenc.o
|
OBJS-$(CONFIG_GIF_ENCODER) += gif.o lzwenc.o
|
||||||
OBJS-$(CONFIG_GSM_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
|
OBJS-$(CONFIG_GSM_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
|
||||||
OBJS-$(CONFIG_GSM_MS_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
|
OBJS-$(CONFIG_GSM_MS_DECODER) += gsmdec.o gsmdec_data.o msgsmdec.o
|
||||||
OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261.o h261data.o \
|
OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261.o h261data.o \
|
OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261.o \
|
||||||
mpegvideo_enc.o motion_est.o \
|
mpegvideo_enc.o motion_est.o \
|
||||||
ratecontrol.o mpeg12data.o \
|
ratecontrol.o mpeg12data.o \
|
||||||
mpegvideo.o
|
mpegvideo.o
|
||||||
@@ -217,23 +184,19 @@ OBJS-$(CONFIG_H264_DECODER) += h264.o \
|
|||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
|
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
|
||||||
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
|
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
|
||||||
OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o
|
|
||||||
OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o
|
OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o
|
||||||
OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o
|
OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o
|
||||||
OBJS-$(CONFIG_IDCIN_DECODER) += idcinvideo.o
|
OBJS-$(CONFIG_IDCIN_DECODER) += idcinvideo.o
|
||||||
OBJS-$(CONFIG_IDF_DECODER) += bintext.o cga_data.o
|
|
||||||
OBJS-$(CONFIG_IFF_BYTERUN1_DECODER) += iff.o
|
OBJS-$(CONFIG_IFF_BYTERUN1_DECODER) += iff.o
|
||||||
OBJS-$(CONFIG_IFF_ILBM_DECODER) += iff.o
|
OBJS-$(CONFIG_IFF_ILBM_DECODER) += iff.o
|
||||||
OBJS-$(CONFIG_IMC_DECODER) += imc.o
|
OBJS-$(CONFIG_IMC_DECODER) += imc.o
|
||||||
OBJS-$(CONFIG_INDEO2_DECODER) += indeo2.o
|
OBJS-$(CONFIG_INDEO2_DECODER) += indeo2.o
|
||||||
OBJS-$(CONFIG_INDEO3_DECODER) += indeo3.o
|
OBJS-$(CONFIG_INDEO3_DECODER) += indeo3.o
|
||||||
OBJS-$(CONFIG_INDEO4_DECODER) += indeo4.o ivi_common.o ivi_dsp.o
|
|
||||||
OBJS-$(CONFIG_INDEO5_DECODER) += indeo5.o ivi_common.o ivi_dsp.o
|
OBJS-$(CONFIG_INDEO5_DECODER) += indeo5.o ivi_common.o ivi_dsp.o
|
||||||
OBJS-$(CONFIG_INTERPLAY_DPCM_DECODER) += dpcm.o
|
OBJS-$(CONFIG_INTERPLAY_DPCM_DECODER) += dpcm.o
|
||||||
OBJS-$(CONFIG_INTERPLAY_VIDEO_DECODER) += interplayvideo.o
|
OBJS-$(CONFIG_INTERPLAY_VIDEO_DECODER) += interplayvideo.o
|
||||||
OBJS-$(CONFIG_JACOSUB_DECODER) += jacosubdec.o ass.o
|
|
||||||
OBJS-$(CONFIG_JPEG2000_DECODER) += j2kdec.o mqcdec.o mqc.o j2k.o j2k_dwt.o
|
OBJS-$(CONFIG_JPEG2000_DECODER) += j2kdec.o mqcdec.o mqc.o j2k.o j2k_dwt.o
|
||||||
OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o j2k.o j2k_dwt.o
|
#OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o j2k.o j2k_dwt.o
|
||||||
OBJS-$(CONFIG_JPEGLS_DECODER) += jpeglsdec.o jpegls.o \
|
OBJS-$(CONFIG_JPEGLS_DECODER) += jpeglsdec.o jpegls.o \
|
||||||
mjpegdec.o mjpeg.o
|
mjpegdec.o mjpeg.o
|
||||||
OBJS-$(CONFIG_JPEGLS_ENCODER) += jpeglsenc.o jpegls.o
|
OBJS-$(CONFIG_JPEGLS_ENCODER) += jpeglsenc.o jpegls.o
|
||||||
@@ -250,7 +213,6 @@ OBJS-$(CONFIG_MACE3_DECODER) += mace.o
|
|||||||
OBJS-$(CONFIG_MACE6_DECODER) += mace.o
|
OBJS-$(CONFIG_MACE6_DECODER) += mace.o
|
||||||
OBJS-$(CONFIG_MDEC_DECODER) += mdec.o mpeg12.o mpeg12data.o \
|
OBJS-$(CONFIG_MDEC_DECODER) += mdec.o mpeg12.o mpeg12data.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_MICRODVD_DECODER) += microdvddec.o ass.o
|
|
||||||
OBJS-$(CONFIG_MIMIC_DECODER) += mimic.o
|
OBJS-$(CONFIG_MIMIC_DECODER) += mimic.o
|
||||||
OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o mjpeg.o
|
OBJS-$(CONFIG_MJPEG_DECODER) += mjpegdec.o mjpeg.o
|
||||||
OBJS-$(CONFIG_MJPEG_ENCODER) += mjpegenc.o mjpeg.o \
|
OBJS-$(CONFIG_MJPEG_ENCODER) += mjpegenc.o mjpeg.o \
|
||||||
@@ -297,7 +259,6 @@ OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o
|
|||||||
OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpegvideo_enc.o \
|
OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpegvideo_enc.o \
|
||||||
timecode.o \
|
|
||||||
motion_est.o ratecontrol.o \
|
motion_est.o ratecontrol.o \
|
||||||
mpeg12.o mpeg12data.o \
|
mpeg12.o mpeg12data.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
@@ -306,7 +267,6 @@ OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL) += vaapi_mpeg2.o
|
|||||||
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpegvideo_enc.o \
|
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpegvideo_enc.o \
|
||||||
timecode.o \
|
|
||||||
motion_est.o ratecontrol.o \
|
motion_est.o ratecontrol.o \
|
||||||
mpeg12.o mpeg12data.o \
|
mpeg12.o mpeg12data.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
@@ -314,22 +274,19 @@ OBJS-$(CONFIG_MPEG4_VAAPI_HWACCEL) += vaapi_mpeg4.o
|
|||||||
OBJS-$(CONFIG_MSMPEG4V1_DECODER) += msmpeg4.o msmpeg4data.o
|
OBJS-$(CONFIG_MSMPEG4V1_DECODER) += msmpeg4.o msmpeg4data.o
|
||||||
OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||||
h263.o ituh263dec.o mpeg4videodec.o
|
h263.o ituh263dec.o mpeg4videodec.o
|
||||||
OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4.o msmpeg4enc.o msmpeg4data.o \
|
OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||||
h263dec.o h263.o ituh263dec.o \
|
h263.o ituh263dec.o mpeg4videodec.o
|
||||||
mpeg4videodec.o
|
|
||||||
OBJS-$(CONFIG_MSMPEG4V3_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
OBJS-$(CONFIG_MSMPEG4V3_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||||
h263.o ituh263dec.o mpeg4videodec.o
|
h263.o ituh263dec.o mpeg4videodec.o
|
||||||
OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4.o msmpeg4enc.o msmpeg4data.o \
|
OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||||
h263dec.o h263.o ituh263dec.o \
|
h263.o ituh263dec.o mpeg4videodec.o
|
||||||
mpeg4videodec.o
|
|
||||||
OBJS-$(CONFIG_MSRLE_DECODER) += msrle.o msrledec.o
|
OBJS-$(CONFIG_MSRLE_DECODER) += msrle.o msrledec.o
|
||||||
OBJS-$(CONFIG_MSVIDEO1_DECODER) += msvideo1.o
|
OBJS-$(CONFIG_MSVIDEO1_DECODER) += msvideo1.o
|
||||||
OBJS-$(CONFIG_MSVIDEO1_ENCODER) += msvideo1enc.o elbg.o
|
OBJS-$(CONFIG_MSVIDEO1_ENCODER) += msvideo1enc.o elbg.o
|
||||||
OBJS-$(CONFIG_MSZH_DECODER) += lcldec.o
|
OBJS-$(CONFIG_MSZH_DECODER) += lcldec.o
|
||||||
OBJS-$(CONFIG_MXPEG_DECODER) += mxpegdec.o mjpegdec.o mjpeg.o
|
OBJS-$(CONFIG_MXPEG_DECODER) += mxpegdec.o mjpegdec.o mjpeg.o
|
||||||
OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o
|
OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o
|
||||||
OBJS-$(CONFIG_NELLYMOSER_ENCODER) += nellymoserenc.o nellymoser.o \
|
OBJS-$(CONFIG_NELLYMOSER_ENCODER) += nellymoserenc.o nellymoser.o
|
||||||
audio_frame_queue.o
|
|
||||||
OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o
|
OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o
|
||||||
OBJS-$(CONFIG_PAM_DECODER) += pnmdec.o pnm.o
|
OBJS-$(CONFIG_PAM_DECODER) += pnmdec.o pnm.o
|
||||||
OBJS-$(CONFIG_PAM_ENCODER) += pamenc.o pnm.o
|
OBJS-$(CONFIG_PAM_ENCODER) += pamenc.o pnm.o
|
||||||
@@ -343,15 +300,10 @@ OBJS-$(CONFIG_PGMYUV_DECODER) += pnmdec.o pnm.o
|
|||||||
OBJS-$(CONFIG_PGMYUV_ENCODER) += pnmenc.o pnm.o
|
OBJS-$(CONFIG_PGMYUV_ENCODER) += pnmenc.o pnm.o
|
||||||
OBJS-$(CONFIG_PGSSUB_DECODER) += pgssubdec.o
|
OBJS-$(CONFIG_PGSSUB_DECODER) += pgssubdec.o
|
||||||
OBJS-$(CONFIG_PICTOR_DECODER) += pictordec.o cga_data.o
|
OBJS-$(CONFIG_PICTOR_DECODER) += pictordec.o cga_data.o
|
||||||
OBJS-$(CONFIG_PNG_DECODER) += png.o pngdec.o pngdsp.o
|
OBJS-$(CONFIG_PNG_DECODER) += png.o pngdec.o
|
||||||
OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o
|
OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o
|
||||||
OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o
|
OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o
|
||||||
OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o
|
OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o
|
||||||
OBJS-$(CONFIG_PRORES_DECODER) += proresdec2.o proresdsp.o
|
|
||||||
OBJS-$(CONFIG_PRORES_LGPL_DECODER) += proresdec_lgpl.o proresdsp.o proresdata.o
|
|
||||||
OBJS-$(CONFIG_PRORES_ENCODER) += proresenc_anatoliy.o
|
|
||||||
OBJS-$(CONFIG_PRORES_ANATOLIY_ENCODER) += proresenc_anatoliy.o
|
|
||||||
OBJS-$(CONFIG_PRORES_KOSTYA_ENCODER) += proresenc_kostya.o proresdata.o proresdsp.o
|
|
||||||
OBJS-$(CONFIG_PTX_DECODER) += ptx.o
|
OBJS-$(CONFIG_PTX_DECODER) += ptx.o
|
||||||
OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o celp_math.o \
|
OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o celp_math.o \
|
||||||
celp_filters.o acelp_vectors.o \
|
celp_filters.o acelp_vectors.o \
|
||||||
@@ -364,14 +316,10 @@ OBJS-$(CONFIG_QPEG_DECODER) += qpeg.o
|
|||||||
OBJS-$(CONFIG_QTRLE_DECODER) += qtrle.o
|
OBJS-$(CONFIG_QTRLE_DECODER) += qtrle.o
|
||||||
OBJS-$(CONFIG_QTRLE_ENCODER) += qtrleenc.o
|
OBJS-$(CONFIG_QTRLE_ENCODER) += qtrleenc.o
|
||||||
OBJS-$(CONFIG_R10K_DECODER) += r210dec.o
|
OBJS-$(CONFIG_R10K_DECODER) += r210dec.o
|
||||||
OBJS-$(CONFIG_R10K_ENCODER) += r210enc.o
|
|
||||||
OBJS-$(CONFIG_R210_DECODER) += r210dec.o
|
OBJS-$(CONFIG_R210_DECODER) += r210dec.o
|
||||||
OBJS-$(CONFIG_R210_ENCODER) += r210enc.o
|
|
||||||
OBJS-$(CONFIG_RA_144_DECODER) += ra144dec.o ra144.o celp_filters.o
|
OBJS-$(CONFIG_RA_144_DECODER) += ra144dec.o ra144.o celp_filters.o
|
||||||
OBJS-$(CONFIG_RA_144_ENCODER) += ra144enc.o ra144.o celp_filters.o \
|
OBJS-$(CONFIG_RA_144_ENCODER) += ra144enc.o ra144.o celp_filters.o
|
||||||
audio_frame_queue.o
|
|
||||||
OBJS-$(CONFIG_RA_288_DECODER) += ra288.o celp_math.o celp_filters.o
|
OBJS-$(CONFIG_RA_288_DECODER) += ra288.o celp_math.o celp_filters.o
|
||||||
OBJS-$(CONFIG_RALF_DECODER) += ralf.o
|
|
||||||
OBJS-$(CONFIG_RAWVIDEO_DECODER) += rawdec.o
|
OBJS-$(CONFIG_RAWVIDEO_DECODER) += rawdec.o
|
||||||
OBJS-$(CONFIG_RAWVIDEO_ENCODER) += rawenc.o
|
OBJS-$(CONFIG_RAWVIDEO_ENCODER) += rawenc.o
|
||||||
OBJS-$(CONFIG_RL2_DECODER) += rl2.o
|
OBJS-$(CONFIG_RL2_DECODER) += rl2.o
|
||||||
@@ -384,9 +332,9 @@ OBJS-$(CONFIG_RV10_DECODER) += rv10.o
|
|||||||
OBJS-$(CONFIG_RV10_ENCODER) += rv10enc.o
|
OBJS-$(CONFIG_RV10_ENCODER) += rv10enc.o
|
||||||
OBJS-$(CONFIG_RV20_DECODER) += rv10.o
|
OBJS-$(CONFIG_RV20_DECODER) += rv10.o
|
||||||
OBJS-$(CONFIG_RV20_ENCODER) += rv20enc.o
|
OBJS-$(CONFIG_RV20_ENCODER) += rv20enc.o
|
||||||
OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o rv34dsp.o \
|
OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv34dsp.o rv40dsp.o \
|
OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv40dsp.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_S302M_DECODER) += s302m.o
|
OBJS-$(CONFIG_S302M_DECODER) += s302m.o
|
||||||
OBJS-$(CONFIG_SGI_DECODER) += sgidec.o
|
OBJS-$(CONFIG_SGI_DECODER) += sgidec.o
|
||||||
@@ -399,12 +347,12 @@ OBJS-$(CONFIG_SIPR_DECODER) += sipr.o acelp_pitch_delay.o \
|
|||||||
OBJS-$(CONFIG_SMACKAUD_DECODER) += smacker.o
|
OBJS-$(CONFIG_SMACKAUD_DECODER) += smacker.o
|
||||||
OBJS-$(CONFIG_SMACKER_DECODER) += smacker.o
|
OBJS-$(CONFIG_SMACKER_DECODER) += smacker.o
|
||||||
OBJS-$(CONFIG_SMC_DECODER) += smc.o
|
OBJS-$(CONFIG_SMC_DECODER) += smc.o
|
||||||
OBJS-$(CONFIG_SNOW_DECODER) += snowdec.o snow.o rangecoder.o
|
OBJS-$(CONFIG_SNOW_DECODER) += snow.o rangecoder.o
|
||||||
OBJS-$(CONFIG_SNOW_ENCODER) += snowenc.o snow.o rangecoder.o \
|
OBJS-$(CONFIG_SNOW_ENCODER) += snow.o rangecoder.o motion_est.o \
|
||||||
motion_est.o ratecontrol.o \
|
ratecontrol.o h263.o \
|
||||||
h263.o mpegvideo.o \
|
mpegvideo.o error_resilience.o \
|
||||||
error_resilience.o ituh263enc.o \
|
ituh263enc.o mpegvideo_enc.o \
|
||||||
mpegvideo_enc.o mpeg12data.o
|
mpeg12data.o
|
||||||
OBJS-$(CONFIG_SOL_DPCM_DECODER) += dpcm.o
|
OBJS-$(CONFIG_SOL_DPCM_DECODER) += dpcm.o
|
||||||
OBJS-$(CONFIG_SONIC_DECODER) += sonic.o
|
OBJS-$(CONFIG_SONIC_DECODER) += sonic.o
|
||||||
OBJS-$(CONFIG_SONIC_ENCODER) += sonic.o
|
OBJS-$(CONFIG_SONIC_ENCODER) += sonic.o
|
||||||
@@ -413,7 +361,6 @@ OBJS-$(CONFIG_SP5X_DECODER) += sp5xdec.o mjpegdec.o mjpeg.o
|
|||||||
OBJS-$(CONFIG_SRT_DECODER) += srtdec.o ass.o
|
OBJS-$(CONFIG_SRT_DECODER) += srtdec.o ass.o
|
||||||
OBJS-$(CONFIG_SRT_ENCODER) += srtenc.o ass_split.o
|
OBJS-$(CONFIG_SRT_ENCODER) += srtenc.o ass_split.o
|
||||||
OBJS-$(CONFIG_SUNRAST_DECODER) += sunrast.o
|
OBJS-$(CONFIG_SUNRAST_DECODER) += sunrast.o
|
||||||
OBJS-$(CONFIG_SUNRAST_ENCODER) += sunrastenc.o
|
|
||||||
OBJS-$(CONFIG_SVQ1_DECODER) += svq1dec.o svq1.o h263.o \
|
OBJS-$(CONFIG_SVQ1_DECODER) += svq1dec.o svq1.o h263.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_SVQ1_ENCODER) += svq1enc.o svq1.o \
|
OBJS-$(CONFIG_SVQ1_ENCODER) += svq1enc.o svq1.o \
|
||||||
@@ -443,18 +390,10 @@ OBJS-$(CONFIG_TTA_DECODER) += tta.o
|
|||||||
OBJS-$(CONFIG_TWINVQ_DECODER) += twinvq.o celp_math.o
|
OBJS-$(CONFIG_TWINVQ_DECODER) += twinvq.o celp_math.o
|
||||||
OBJS-$(CONFIG_TXD_DECODER) += txd.o s3tc.o
|
OBJS-$(CONFIG_TXD_DECODER) += txd.o s3tc.o
|
||||||
OBJS-$(CONFIG_ULTI_DECODER) += ulti.o
|
OBJS-$(CONFIG_ULTI_DECODER) += ulti.o
|
||||||
OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideo.o
|
|
||||||
OBJS-$(CONFIG_V210_DECODER) += v210dec.o
|
OBJS-$(CONFIG_V210_DECODER) += v210dec.o
|
||||||
OBJS-$(CONFIG_V210_ENCODER) += v210enc.o
|
OBJS-$(CONFIG_V210_ENCODER) += v210enc.o
|
||||||
OBJS-$(CONFIG_V308_DECODER) += v308dec.o
|
|
||||||
OBJS-$(CONFIG_V308_ENCODER) += v308enc.o
|
|
||||||
OBJS-$(CONFIG_V408_DECODER) += v408dec.o
|
|
||||||
OBJS-$(CONFIG_V408_ENCODER) += v408enc.o
|
|
||||||
OBJS-$(CONFIG_V410_DECODER) += v410dec.o
|
|
||||||
OBJS-$(CONFIG_V410_ENCODER) += v410enc.o
|
|
||||||
OBJS-$(CONFIG_V210X_DECODER) += v210x.o
|
OBJS-$(CONFIG_V210X_DECODER) += v210x.o
|
||||||
OBJS-$(CONFIG_VB_DECODER) += vb.o
|
OBJS-$(CONFIG_VB_DECODER) += vb.o
|
||||||
OBJS-$(CONFIG_VBLE_DECODER) += vble.o
|
|
||||||
OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o vc1.o vc1data.o vc1dsp.o \
|
OBJS-$(CONFIG_VC1_DECODER) += vc1dec.o vc1.o vc1data.o vc1dsp.o \
|
||||||
msmpeg4.o msmpeg4data.o \
|
msmpeg4.o msmpeg4data.o \
|
||||||
intrax8.o intrax8dsp.o
|
intrax8.o intrax8dsp.o
|
||||||
@@ -477,12 +416,11 @@ OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o vp56dsp.o \
|
|||||||
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8dsp.o vp56rac.o
|
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8dsp.o vp56rac.o
|
||||||
OBJS-$(CONFIG_VQA_DECODER) += vqavideo.o
|
OBJS-$(CONFIG_VQA_DECODER) += vqavideo.o
|
||||||
OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o
|
OBJS-$(CONFIG_WAVPACK_DECODER) += wavpack.o
|
||||||
OBJS-$(CONFIG_WMALOSSLESS_DECODER) += wmalosslessdec.o wma_common.o
|
OBJS-$(CONFIG_WMAPRO_DECODER) += wmaprodec.o wma.o
|
||||||
OBJS-$(CONFIG_WMAPRO_DECODER) += wmaprodec.o wma.o wma_common.o
|
OBJS-$(CONFIG_WMAV1_DECODER) += wmadec.o wma.o aactab.o
|
||||||
OBJS-$(CONFIG_WMAV1_DECODER) += wmadec.o wma.o wma_common.o aactab.o
|
OBJS-$(CONFIG_WMAV1_ENCODER) += wmaenc.o wma.o aactab.o
|
||||||
OBJS-$(CONFIG_WMAV1_ENCODER) += wmaenc.o wma.o wma_common.o aactab.o
|
OBJS-$(CONFIG_WMAV2_DECODER) += wmadec.o wma.o aactab.o
|
||||||
OBJS-$(CONFIG_WMAV2_DECODER) += wmadec.o wma.o wma_common.o aactab.o
|
OBJS-$(CONFIG_WMAV2_ENCODER) += wmaenc.o wma.o aactab.o
|
||||||
OBJS-$(CONFIG_WMAV2_ENCODER) += wmaenc.o wma.o wma_common.o aactab.o
|
|
||||||
OBJS-$(CONFIG_WMAVOICE_DECODER) += wmavoice.o \
|
OBJS-$(CONFIG_WMAVOICE_DECODER) += wmavoice.o \
|
||||||
celp_math.o celp_filters.o \
|
celp_math.o celp_filters.o \
|
||||||
acelp_vectors.o acelp_filters.o
|
acelp_vectors.o acelp_filters.o
|
||||||
@@ -491,27 +429,17 @@ OBJS-$(CONFIG_WMV2_DECODER) += wmv2dec.o wmv2.o \
|
|||||||
msmpeg4.o msmpeg4data.o \
|
msmpeg4.o msmpeg4data.o \
|
||||||
intrax8.o intrax8dsp.o
|
intrax8.o intrax8dsp.o
|
||||||
OBJS-$(CONFIG_WMV2_ENCODER) += wmv2enc.o wmv2.o \
|
OBJS-$(CONFIG_WMV2_ENCODER) += wmv2enc.o wmv2.o \
|
||||||
msmpeg4.o msmpeg4enc.o msmpeg4data.o \
|
msmpeg4.o msmpeg4data.o \
|
||||||
mpeg4videodec.o ituh263dec.o h263dec.o
|
mpeg4videodec.o ituh263dec.o h263dec.o
|
||||||
OBJS-$(CONFIG_WNV1_DECODER) += wnv1.o
|
OBJS-$(CONFIG_WNV1_DECODER) += wnv1.o
|
||||||
OBJS-$(CONFIG_WS_SND1_DECODER) += ws-snd1.o
|
OBJS-$(CONFIG_WS_SND1_DECODER) += ws-snd1.o
|
||||||
OBJS-$(CONFIG_XAN_DPCM_DECODER) += dpcm.o
|
OBJS-$(CONFIG_XAN_DPCM_DECODER) += dpcm.o
|
||||||
OBJS-$(CONFIG_XAN_WC3_DECODER) += xan.o
|
OBJS-$(CONFIG_XAN_WC3_DECODER) += xan.o
|
||||||
OBJS-$(CONFIG_XAN_WC4_DECODER) += xxan.o
|
OBJS-$(CONFIG_XAN_WC4_DECODER) += xxan.o
|
||||||
OBJS-$(CONFIG_XBIN_DECODER) += bintext.o cga_data.o
|
|
||||||
OBJS-$(CONFIG_XBM_DECODER) += xbmdec.o
|
|
||||||
OBJS-$(CONFIG_XBM_ENCODER) += xbmenc.o
|
|
||||||
OBJS-$(CONFIG_XL_DECODER) += xl.o
|
OBJS-$(CONFIG_XL_DECODER) += xl.o
|
||||||
OBJS-$(CONFIG_XSUB_DECODER) += xsubdec.o
|
OBJS-$(CONFIG_XSUB_DECODER) += xsubdec.o
|
||||||
OBJS-$(CONFIG_XSUB_ENCODER) += xsubenc.o
|
OBJS-$(CONFIG_XSUB_ENCODER) += xsubenc.o
|
||||||
OBJS-$(CONFIG_XWD_DECODER) += xwddec.o
|
|
||||||
OBJS-$(CONFIG_XWD_ENCODER) += xwdenc.o
|
|
||||||
OBJS-$(CONFIG_Y41P_DECODER) += y41pdec.o
|
|
||||||
OBJS-$(CONFIG_Y41P_ENCODER) += y41penc.o
|
|
||||||
OBJS-$(CONFIG_YOP_DECODER) += yop.o
|
OBJS-$(CONFIG_YOP_DECODER) += yop.o
|
||||||
OBJS-$(CONFIG_YUV4_DECODER) += yuv4dec.o
|
|
||||||
OBJS-$(CONFIG_YUV4_ENCODER) += yuv4enc.o
|
|
||||||
OBJS-$(CONFIG_ZEROCODEC_DECODER) += zerocodec.o
|
|
||||||
OBJS-$(CONFIG_ZLIB_DECODER) += lcldec.o
|
OBJS-$(CONFIG_ZLIB_DECODER) += lcldec.o
|
||||||
OBJS-$(CONFIG_ZLIB_ENCODER) += lclenc.o
|
OBJS-$(CONFIG_ZLIB_ENCODER) += lclenc.o
|
||||||
OBJS-$(CONFIG_ZMBV_DECODER) += zmbv.o
|
OBJS-$(CONFIG_ZMBV_DECODER) += zmbv.o
|
||||||
@@ -536,7 +464,6 @@ OBJS-$(CONFIG_PCM_MULAW_DECODER) += pcm.o
|
|||||||
OBJS-$(CONFIG_PCM_MULAW_ENCODER) += pcm.o
|
OBJS-$(CONFIG_PCM_MULAW_ENCODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_S8_DECODER) += pcm.o
|
OBJS-$(CONFIG_PCM_S8_DECODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_S8_ENCODER) += pcm.o
|
OBJS-$(CONFIG_PCM_S8_ENCODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_S8_PLANAR_DECODER) += 8svx.o
|
|
||||||
OBJS-$(CONFIG_PCM_S16BE_DECODER) += pcm.o
|
OBJS-$(CONFIG_PCM_S16BE_DECODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_S16BE_ENCODER) += pcm.o
|
OBJS-$(CONFIG_PCM_S16BE_ENCODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_S16LE_DECODER) += pcm.o
|
OBJS-$(CONFIG_PCM_S16LE_DECODER) += pcm.o
|
||||||
@@ -567,76 +494,69 @@ OBJS-$(CONFIG_PCM_U32BE_ENCODER) += pcm.o
|
|||||||
OBJS-$(CONFIG_PCM_U32LE_DECODER) += pcm.o
|
OBJS-$(CONFIG_PCM_U32LE_DECODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_U32LE_ENCODER) += pcm.o
|
OBJS-$(CONFIG_PCM_U32LE_ENCODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_ZORK_DECODER) += pcm.o
|
OBJS-$(CONFIG_PCM_ZORK_DECODER) += pcm.o
|
||||||
|
OBJS-$(CONFIG_PCM_ZORK_ENCODER) += pcm.o
|
||||||
|
|
||||||
OBJS-$(CONFIG_ADPCM_4XM_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_4XM_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o adx.o
|
OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o
|
||||||
OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o adx.o
|
OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o
|
||||||
OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_EA_R2_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_EA_R2_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_EA_R3_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_EA_R3_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_EA_XAS_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_EA_XAS_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_G722_DECODER) += g722.o g722dec.o
|
OBJS-$(CONFIG_ADPCM_G722_DECODER) += g722.o
|
||||||
OBJS-$(CONFIG_ADPCM_G722_ENCODER) += g722.o g722enc.o
|
OBJS-$(CONFIG_ADPCM_G722_ENCODER) += g722.o
|
||||||
OBJS-$(CONFIG_ADPCM_G726_DECODER) += g726.o
|
OBJS-$(CONFIG_ADPCM_G726_DECODER) += g726.o
|
||||||
OBJS-$(CONFIG_ADPCM_G726_ENCODER) += g726.o
|
OBJS-$(CONFIG_ADPCM_G726_ENCODER) += g726.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_AMV_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_AMV_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_APC_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_DK3_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_DK3_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_DK4_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_DK4_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_EA_EACS_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_EA_EACS_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_EA_SEAD_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_EA_SEAD_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_ISS_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_ISS_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_QT_ENCODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_QT_ENCODER) += adpcmenc.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_SMJPEG_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_SMJPEG_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_WAV_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_WAV_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcmenc.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_WS_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_WS_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_MS_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_MS_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_MS_ENCODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_MS_ENCODER) += adpcmenc.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_SWF_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_SWF_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_SWF_ENCODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_SWF_ENCODER) += adpcmenc.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_THP_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_THP_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_XA_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_XA_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcm.o
|
||||||
OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o
|
|
||||||
|
|
||||||
# libavformat dependencies
|
# libavformat dependencies
|
||||||
OBJS-$(CONFIG_ADTS_MUXER) += mpeg4audio.o
|
OBJS-$(CONFIG_ADTS_MUXER) += mpeg4audio.o
|
||||||
OBJS-$(CONFIG_ADX_DEMUXER) += adx.o
|
|
||||||
OBJS-$(CONFIG_CAF_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
OBJS-$(CONFIG_CAF_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_DV_DEMUXER) += dv_profile.o
|
OBJS-$(CONFIG_DV_DEMUXER) += dvdata.o
|
||||||
OBJS-$(CONFIG_DV_MUXER) += dv_profile.o timecode.o
|
OBJS-$(CONFIG_DV_MUXER) += dvdata.o
|
||||||
OBJS-$(CONFIG_FLAC_DEMUXER) += flacdec.o flacdata.o flac.o vorbis_data.o \
|
OBJS-$(CONFIG_FLAC_DEMUXER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
||||||
vorbis_parser.o xiph.o
|
|
||||||
OBJS-$(CONFIG_FLAC_MUXER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
OBJS-$(CONFIG_FLAC_MUXER) += flacdec.o flacdata.o flac.o vorbis_data.o
|
||||||
OBJS-$(CONFIG_FLV_DEMUXER) += mpeg4audio.o
|
OBJS-$(CONFIG_FLV_DEMUXER) += mpeg4audio.o
|
||||||
OBJS-$(CONFIG_GXF_DEMUXER) += mpeg12data.o
|
OBJS-$(CONFIG_GXF_DEMUXER) += mpeg12data.o
|
||||||
OBJS-$(CONFIG_IFF_DEMUXER) += iff.o
|
OBJS-$(CONFIG_IFF_DEMUXER) += iff.o
|
||||||
OBJS-$(CONFIG_LATM_MUXER) += mpeg4audio.o
|
|
||||||
OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER) += xiph.o mpeg4audio.o vorbis_data.o \
|
OBJS-$(CONFIG_MATROSKA_AUDIO_MUXER) += xiph.o mpeg4audio.o vorbis_data.o \
|
||||||
flacdec.o flacdata.o flac.o
|
flacdec.o flacdata.o flac.o
|
||||||
OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_MATROSKA_MUXER) += xiph.o mpeg4audio.o \
|
OBJS-$(CONFIG_MATROSKA_MUXER) += xiph.o mpeg4audio.o \
|
||||||
flacdec.o flacdata.o flac.o \
|
flacdec.o flacdata.o flac.o \
|
||||||
mpegaudiodata.o vorbis_data.o
|
mpegaudiodata.o vorbis_data.o
|
||||||
OBJS-$(CONFIG_MP2_MUXER) += mpegaudiodata.o mpegaudiodecheader.o
|
OBJS-$(CONFIG_MOV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_MP3_MUXER) += mpegaudiodata.o mpegaudiodecheader.o
|
|
||||||
OBJS-$(CONFIG_MOV_DEMUXER) += mpeg4audio.o mpegaudiodata.o ac3tab.o timecode.o
|
|
||||||
OBJS-$(CONFIG_MOV_MUXER) += mpeg4audio.o mpegaudiodata.o
|
OBJS-$(CONFIG_MOV_MUXER) += mpeg4audio.o mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_MPEGTS_MUXER) += mpegvideo.o mpeg4audio.o
|
OBJS-$(CONFIG_MPEGTS_MUXER) += mpegvideo.o mpeg4audio.o
|
||||||
OBJS-$(CONFIG_MPEGTS_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
OBJS-$(CONFIG_MPEGTS_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_MXF_MUXER) += timecode.o
|
|
||||||
OBJS-$(CONFIG_NUT_MUXER) += mpegaudiodata.o
|
OBJS-$(CONFIG_NUT_MUXER) += mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_OGG_DEMUXER) += flacdec.o flacdata.o flac.o \
|
OBJS-$(CONFIG_OGG_DEMUXER) += flacdec.o flacdata.o flac.o \
|
||||||
dirac.o mpeg12data.o vorbis_parser.o \
|
dirac.o mpeg12data.o vorbis_data.o
|
||||||
xiph.o vorbis_data.o
|
|
||||||
OBJS-$(CONFIG_OGG_MUXER) += xiph.o flacdec.o flacdata.o flac.o \
|
OBJS-$(CONFIG_OGG_MUXER) += xiph.o flacdec.o flacdata.o flac.o \
|
||||||
vorbis_data.o
|
vorbis_data.o
|
||||||
OBJS-$(CONFIG_RTP_MUXER) += mpeg4audio.o mpegvideo.o xiph.o
|
OBJS-$(CONFIG_RTP_MUXER) += mpeg4audio.o mpegvideo.o xiph.o
|
||||||
@@ -647,51 +567,42 @@ OBJS-$(CONFIG_WEBM_MUXER) += xiph.o mpeg4audio.o \
|
|||||||
OBJS-$(CONFIG_WTV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
OBJS-$(CONFIG_WTV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||||
|
|
||||||
# external codec libraries
|
# external codec libraries
|
||||||
OBJS-$(CONFIG_LIBAACPLUS_ENCODER) += libaacplus.o
|
|
||||||
OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
|
OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
|
||||||
OBJS-$(CONFIG_LIBFAAC_ENCODER) += libfaac.o audio_frame_queue.o
|
OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o
|
||||||
|
OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o libdirac_libschro.o
|
||||||
|
OBJS-$(CONFIG_LIBFAAC_ENCODER) += libfaac.o
|
||||||
OBJS-$(CONFIG_LIBGSM_DECODER) += libgsm.o
|
OBJS-$(CONFIG_LIBGSM_DECODER) += libgsm.o
|
||||||
OBJS-$(CONFIG_LIBGSM_ENCODER) += libgsm.o
|
OBJS-$(CONFIG_LIBGSM_ENCODER) += libgsm.o
|
||||||
OBJS-$(CONFIG_LIBGSM_MS_DECODER) += libgsm.o
|
OBJS-$(CONFIG_LIBGSM_MS_DECODER) += libgsm.o
|
||||||
OBJS-$(CONFIG_LIBGSM_MS_ENCODER) += libgsm.o
|
OBJS-$(CONFIG_LIBGSM_MS_ENCODER) += libgsm.o
|
||||||
OBJS-$(CONFIG_LIBMP3LAME_ENCODER) += libmp3lame.o mpegaudiodecheader.o \
|
OBJS-$(CONFIG_LIBMP3LAME_ENCODER) += libmp3lame.o
|
||||||
audio_frame_queue.o
|
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_DECODER) += libopencore-amr.o
|
||||||
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_DECODER) += libopencore-amr.o \
|
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o
|
||||||
audio_frame_queue.o
|
|
||||||
OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o \
|
|
||||||
audio_frame_queue.o
|
|
||||||
OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o
|
OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o
|
||||||
OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpegdec.o
|
OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpeg.o
|
||||||
OBJS-$(CONFIG_LIBOPENJPEG_ENCODER) += libopenjpegenc.o
|
|
||||||
OBJS-$(CONFIG_LIBSCHROEDINGER_DECODER) += libschroedingerdec.o \
|
OBJS-$(CONFIG_LIBSCHROEDINGER_DECODER) += libschroedingerdec.o \
|
||||||
libschroedinger.o
|
libschroedinger.o \
|
||||||
|
libdirac_libschro.o
|
||||||
OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \
|
OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \
|
||||||
libschroedinger.o
|
libschroedinger.o \
|
||||||
|
libdirac_libschro.o
|
||||||
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
|
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
|
||||||
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o audio_frame_queue.o
|
|
||||||
OBJS-$(CONFIG_LIBSTAGEFRIGHT_H264_DECODER)+= libstagefright.o
|
|
||||||
OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o
|
OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o
|
||||||
OBJS-$(CONFIG_LIBUTVIDEO_DECODER) += libutvideodec.o
|
OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o
|
||||||
OBJS-$(CONFIG_LIBUTVIDEO_ENCODER) += libutvideoenc.o
|
|
||||||
OBJS-$(CONFIG_LIBVO_AACENC_ENCODER) += libvo-aacenc.o mpeg4audio.o \
|
|
||||||
audio_frame_queue.o
|
|
||||||
OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
|
OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
|
||||||
OBJS-$(CONFIG_LIBVORBIS_ENCODER) += libvorbis.o audio_frame_queue.o \
|
OBJS-$(CONFIG_LIBVORBIS_ENCODER) += libvorbis.o vorbis_data.o
|
||||||
vorbis_data.o vorbis_parser.o
|
|
||||||
OBJS-$(CONFIG_LIBVPX_DECODER) += libvpxdec.o
|
OBJS-$(CONFIG_LIBVPX_DECODER) += libvpxdec.o
|
||||||
OBJS-$(CONFIG_LIBVPX_ENCODER) += libvpxenc.o
|
OBJS-$(CONFIG_LIBVPX_ENCODER) += libvpxenc.o
|
||||||
OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o
|
OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o
|
||||||
OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o
|
OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o
|
||||||
OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o
|
OBJS-$(CONFIG_LIBXVID) += libxvidff.o libxvid_rc.o
|
||||||
|
|
||||||
# parsers
|
# parsers
|
||||||
OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \
|
OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \
|
||||||
aacadtsdec.o mpeg4audio.o
|
aacadtsdec.o mpeg4audio.o
|
||||||
OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o \
|
OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o \
|
||||||
aac_ac3_parser.o
|
aac_ac3_parser.o
|
||||||
OBJS-$(CONFIG_ADX_PARSER) += adx_parser.o adx.o
|
|
||||||
OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o
|
OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o
|
||||||
OBJS-$(CONFIG_COOK_PARSER) += cook_parser.o
|
|
||||||
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o
|
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o
|
||||||
OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o
|
OBJS-$(CONFIG_DIRAC_PARSER) += dirac_parser.o
|
||||||
OBJS-$(CONFIG_DNXHD_PARSER) += dnxhd_parser.o
|
OBJS-$(CONFIG_DNXHD_PARSER) += dnxhd_parser.o
|
||||||
@@ -699,7 +610,6 @@ OBJS-$(CONFIG_DVBSUB_PARSER) += dvbsub_parser.o
|
|||||||
OBJS-$(CONFIG_DVDSUB_PARSER) += dvdsub_parser.o
|
OBJS-$(CONFIG_DVDSUB_PARSER) += dvdsub_parser.o
|
||||||
OBJS-$(CONFIG_FLAC_PARSER) += flac_parser.o flacdata.o flac.o \
|
OBJS-$(CONFIG_FLAC_PARSER) += flac_parser.o flacdata.o flac.o \
|
||||||
vorbis_data.o
|
vorbis_data.o
|
||||||
OBJS-$(CONFIG_GSM_PARSER) += gsm_parser.o
|
|
||||||
OBJS-$(CONFIG_H261_PARSER) += h261_parser.o
|
OBJS-$(CONFIG_H261_PARSER) += h261_parser.o
|
||||||
OBJS-$(CONFIG_H263_PARSER) += h263_parser.o
|
OBJS-$(CONFIG_H263_PARSER) += h263_parser.o
|
||||||
OBJS-$(CONFIG_H264_PARSER) += h264_parser.o h264.o \
|
OBJS-$(CONFIG_H264_PARSER) += h264_parser.o h264.o \
|
||||||
@@ -715,19 +625,15 @@ OBJS-$(CONFIG_MPEG4VIDEO_PARSER) += mpeg4video_parser.o h263.o \
|
|||||||
mpegvideo.o error_resilience.o \
|
mpegvideo.o error_resilience.o \
|
||||||
mpeg4videodec.o mpeg4video.o \
|
mpeg4videodec.o mpeg4video.o \
|
||||||
ituh263dec.o h263dec.o
|
ituh263dec.o h263dec.o
|
||||||
OBJS-$(CONFIG_PNG_PARSER) += png_parser.o
|
|
||||||
OBJS-$(CONFIG_MPEGAUDIO_PARSER) += mpegaudio_parser.o \
|
OBJS-$(CONFIG_MPEGAUDIO_PARSER) += mpegaudio_parser.o \
|
||||||
mpegaudiodecheader.o mpegaudiodata.o
|
mpegaudiodecheader.o mpegaudiodata.o
|
||||||
OBJS-$(CONFIG_MPEGVIDEO_PARSER) += mpegvideo_parser.o \
|
OBJS-$(CONFIG_MPEGVIDEO_PARSER) += mpegvideo_parser.o \
|
||||||
mpeg12.o mpeg12data.o \
|
mpeg12.o mpeg12data.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_PNM_PARSER) += pnm_parser.o pnm.o
|
OBJS-$(CONFIG_PNM_PARSER) += pnm_parser.o pnm.o
|
||||||
OBJS-$(CONFIG_RV30_PARSER) += rv34_parser.o
|
|
||||||
OBJS-$(CONFIG_RV40_PARSER) += rv34_parser.o
|
|
||||||
OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o vc1.o vc1data.o \
|
OBJS-$(CONFIG_VC1_PARSER) += vc1_parser.o vc1.o vc1data.o \
|
||||||
msmpeg4.o msmpeg4data.o mpeg4video.o \
|
msmpeg4.o msmpeg4data.o mpeg4video.o \
|
||||||
h263.o mpegvideo.o error_resilience.o
|
h263.o mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_VORBIS_PARSER) += vorbis_parser.o xiph.o
|
|
||||||
OBJS-$(CONFIG_VP3_PARSER) += vp3_parser.o
|
OBJS-$(CONFIG_VP3_PARSER) += vp3_parser.o
|
||||||
OBJS-$(CONFIG_VP8_PARSER) += vp8_parser.o
|
OBJS-$(CONFIG_VP8_PARSER) += vp8_parser.o
|
||||||
|
|
||||||
@@ -750,8 +656,9 @@ OBJS-$(CONFIG_TEXT2MOVSUB_BSF) += movsub_bsf.o
|
|||||||
|
|
||||||
# thread libraries
|
# thread libraries
|
||||||
OBJS-$(HAVE_PTHREADS) += pthread.o
|
OBJS-$(HAVE_PTHREADS) += pthread.o
|
||||||
OBJS-$(HAVE_W32THREADS) += pthread.o
|
OBJS-$(HAVE_W32THREADS) += w32thread.o
|
||||||
OBJS-$(HAVE_OS2THREADS) += pthread.o
|
|
||||||
|
OBJS-$(CONFIG_MLIB) += mlib/dsputil_mlib.o \
|
||||||
|
|
||||||
# inverse.o contains the ff_inverse table definition, which is used by
|
# inverse.o contains the ff_inverse table definition, which is used by
|
||||||
# the FASTDIV macro (from libavutil); since referencing the external
|
# the FASTDIV macro (from libavutil); since referencing the external
|
||||||
@@ -759,49 +666,35 @@ OBJS-$(HAVE_OS2THREADS) += pthread.o
|
|||||||
# well.
|
# well.
|
||||||
OBJS-$(!CONFIG_SMALL) += inverse.o
|
OBJS-$(!CONFIG_SMALL) += inverse.o
|
||||||
|
|
||||||
|
-include $(SUBDIR)$(ARCH)/Makefile
|
||||||
|
|
||||||
SKIPHEADERS += %_tablegen.h \
|
SKIPHEADERS += %_tablegen.h \
|
||||||
%_tables.h \
|
%_tables.h \
|
||||||
aac_tablegen_decl.h \
|
aac_tablegen_decl.h \
|
||||||
codec_names.h \
|
|
||||||
fft-internal.h \
|
fft-internal.h \
|
||||||
tableprint.h \
|
tableprint.h \
|
||||||
$(ARCH)/vp56_arith.h \
|
$(ARCH)/vp56_arith.h
|
||||||
|
|
||||||
SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h
|
SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h
|
||||||
|
SKIPHEADERS-$(CONFIG_LIBDIRAC) += libdirac.h
|
||||||
SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER) += libschroedinger.h
|
SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER) += libschroedinger.h
|
||||||
SKIPHEADERS-$(CONFIG_LIBUTVIDEO) += libutvideo.h
|
|
||||||
SKIPHEADERS-$(CONFIG_MPEG_XVMC_DECODER) += xvmc.h
|
|
||||||
SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_internal.h
|
SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_internal.h
|
||||||
SKIPHEADERS-$(CONFIG_VDA) += vda.h vda_internal.h
|
|
||||||
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h
|
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h
|
||||||
SKIPHEADERS-$(HAVE_OS2THREADS) += os2threads.h
|
SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h
|
||||||
SKIPHEADERS-$(HAVE_W32THREADS) += w32pthreads.h
|
|
||||||
|
|
||||||
TESTPROGS = cabac \
|
|
||||||
dct \
|
|
||||||
fft \
|
|
||||||
fft-fixed \
|
|
||||||
golomb \
|
|
||||||
iirfilter \
|
|
||||||
rangecoder \
|
|
||||||
snowenc \
|
|
||||||
|
|
||||||
|
TESTPROGS = cabac dct fft fft-fixed h264 iirfilter rangecoder snow
|
||||||
TESTPROGS-$(HAVE_MMX) += motion
|
TESTPROGS-$(HAVE_MMX) += motion
|
||||||
TESTOBJS = dctref.o
|
TESTOBJS = dctref.o
|
||||||
|
|
||||||
HOSTPROGS = aac_tablegen \
|
HOSTPROGS = aac_tablegen aacps_tablegen cbrt_tablegen cos_tablegen \
|
||||||
aacps_tablegen \
|
dv_tablegen motionpixels_tablegen mpegaudio_tablegen \
|
||||||
cbrt_tablegen \
|
pcm_tablegen qdm2_tablegen sinewin_tablegen
|
||||||
cos_tablegen \
|
|
||||||
dv_tablegen \
|
DIRS = alpha arm bfin mlib ppc ps2 sh4 sparc x86
|
||||||
motionpixels_tablegen \
|
|
||||||
mpegaudio_tablegen \
|
|
||||||
pcm_tablegen \
|
|
||||||
qdm2_tablegen \
|
|
||||||
sinewin_tablegen \
|
|
||||||
|
|
||||||
CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
|
CLEANFILES = *_tables.c *_tables.h *_tablegen$(HOSTEXESUF)
|
||||||
|
|
||||||
|
include $(SUBDIR)../subdir.mak
|
||||||
|
|
||||||
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
|
$(SUBDIR)dct-test$(EXESUF): $(SUBDIR)dctref.o
|
||||||
|
|
||||||
TRIG_TABLES = cos cos_fixed sin
|
TRIG_TABLES = cos cos_fixed sin
|
||||||
@@ -836,10 +729,3 @@ $(SUBDIR)motionpixels.o: $(SUBDIR)motionpixels_tables.h
|
|||||||
$(SUBDIR)pcm.o: $(SUBDIR)pcm_tables.h
|
$(SUBDIR)pcm.o: $(SUBDIR)pcm_tables.h
|
||||||
$(SUBDIR)qdm2.o: $(SUBDIR)qdm2_tables.h
|
$(SUBDIR)qdm2.o: $(SUBDIR)qdm2_tables.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CODEC_NAMES_SH := $(SRC_PATH)/$(SUBDIR)codec_names.sh
|
|
||||||
AVCODEC_H := $(SRC_PATH)/$(SUBDIR)avcodec.h
|
|
||||||
$(SUBDIR)codec_names.h: $(CODEC_NAMES_SH) config.h $(AVCODEC_H)
|
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -E $(AVCODEC_H) | \
|
|
||||||
$(CODEC_NAMES_SH) config.h $@
|
|
||||||
$(SUBDIR)utils.o: $(SUBDIR)codec_names.h
|
|
||||||
|
|||||||
@@ -50,9 +50,6 @@ typedef struct A64Context {
|
|||||||
uint8_t *mc_colram;
|
uint8_t *mc_colram;
|
||||||
uint8_t *mc_palette;
|
uint8_t *mc_palette;
|
||||||
int mc_pal_size;
|
int mc_pal_size;
|
||||||
|
|
||||||
/* pts of the next packet that will be output */
|
|
||||||
int64_t next_pts;
|
|
||||||
} A64Context;
|
} A64Context;
|
||||||
|
|
||||||
#endif /* AVCODEC_A64ENC_H */
|
#endif /* AVCODEC_A64ENC_H */
|
||||||
|
|||||||
@@ -28,7 +28,6 @@
|
|||||||
#include "a64colors.h"
|
#include "a64colors.h"
|
||||||
#include "a64tables.h"
|
#include "a64tables.h"
|
||||||
#include "elbg.h"
|
#include "elbg.h"
|
||||||
#include "internal.h"
|
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
|
|
||||||
#define DITHERSTEPS 8
|
#define DITHERSTEPS 8
|
||||||
@@ -222,8 +221,6 @@ static av_cold int a64multi_init_encoder(AVCodecContext *avctx)
|
|||||||
if (!avctx->codec_tag)
|
if (!avctx->codec_tag)
|
||||||
avctx->codec_tag = AV_RL32("a64m");
|
avctx->codec_tag = AV_RL32("a64m");
|
||||||
|
|
||||||
c->next_pts = AV_NOPTS_VALUE;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,19 +239,19 @@ static void a64_compress_colram(unsigned char *buf, int *charmap, uint8_t *colra
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
static int a64multi_encode_frame(AVCodecContext *avctx, unsigned char *buf,
|
||||||
const AVFrame *pict, int *got_packet)
|
int buf_size, void *data)
|
||||||
{
|
{
|
||||||
A64Context *c = avctx->priv_data;
|
A64Context *c = avctx->priv_data;
|
||||||
AVFrame *const p = &c->picture;
|
AVFrame *pict = data;
|
||||||
|
AVFrame *const p = (AVFrame *) & c->picture;
|
||||||
|
|
||||||
int frame;
|
int frame;
|
||||||
int x, y;
|
int x, y;
|
||||||
int b_height;
|
int b_height;
|
||||||
int b_width;
|
int b_width;
|
||||||
|
|
||||||
int req_size, ret;
|
int req_size;
|
||||||
uint8_t *buf = NULL;
|
|
||||||
|
|
||||||
int *charmap = c->mc_charmap;
|
int *charmap = c->mc_charmap;
|
||||||
uint8_t *colram = c->mc_colram;
|
uint8_t *colram = c->mc_colram;
|
||||||
@@ -277,7 +274,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* no data, means end encoding asap */
|
/* no data, means end encoding asap */
|
||||||
if (!pict) {
|
if (!data) {
|
||||||
/* all done, end encoding */
|
/* all done, end encoding */
|
||||||
if (!c->mc_lifetime) return 0;
|
if (!c->mc_lifetime) return 0;
|
||||||
/* no more frames in queue, prepare to flush remaining frames */
|
/* no more frames in queue, prepare to flush remaining frames */
|
||||||
@@ -295,8 +292,6 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
p->key_frame = 1;
|
p->key_frame = 1;
|
||||||
to_meta_with_crop(avctx, p, meta + 32000 * c->mc_frame_counter);
|
to_meta_with_crop(avctx, p, meta + 32000 * c->mc_frame_counter);
|
||||||
c->mc_frame_counter++;
|
c->mc_frame_counter++;
|
||||||
if (c->next_pts == AV_NOPTS_VALUE)
|
|
||||||
c->next_pts = pict->pts;
|
|
||||||
/* lifetime is not reached so wait for next frame first */
|
/* lifetime is not reached so wait for next frame first */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -307,11 +302,6 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
req_size = 0;
|
req_size = 0;
|
||||||
/* any frames to encode? */
|
/* any frames to encode? */
|
||||||
if (c->mc_lifetime) {
|
if (c->mc_lifetime) {
|
||||||
req_size = charset_size + c->mc_lifetime*(screen_size + colram_size);
|
|
||||||
if ((ret = ff_alloc_packet2(avctx, pkt, req_size)) < 0)
|
|
||||||
return ret;
|
|
||||||
buf = pkt->data;
|
|
||||||
|
|
||||||
/* calc optimal new charset + charmaps */
|
/* calc optimal new charset + charmaps */
|
||||||
ff_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
|
ff_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
|
||||||
ff_do_elbg (meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
|
ff_do_elbg (meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
|
||||||
@@ -320,12 +310,15 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
render_charset(avctx, charset, colram);
|
render_charset(avctx, charset, colram);
|
||||||
|
|
||||||
/* copy charset to buf */
|
/* copy charset to buf */
|
||||||
memcpy(buf, charset, charset_size);
|
memcpy(buf,charset, charset_size);
|
||||||
|
|
||||||
/* advance pointers */
|
/* advance pointers */
|
||||||
buf += charset_size;
|
buf += charset_size;
|
||||||
charset += charset_size;
|
charset += charset_size;
|
||||||
|
req_size += charset_size;
|
||||||
}
|
}
|
||||||
|
/* no charset so clean buf */
|
||||||
|
else memset(buf, 0, charset_size);
|
||||||
|
|
||||||
/* write x frames to buf */
|
/* write x frames to buf */
|
||||||
for (frame = 0; frame < c->mc_lifetime; frame++) {
|
for (frame = 0; frame < c->mc_lifetime; frame++) {
|
||||||
@@ -358,12 +351,11 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
/* reset counter */
|
/* reset counter */
|
||||||
c->mc_frame_counter = 0;
|
c->mc_frame_counter = 0;
|
||||||
|
|
||||||
pkt->pts = pkt->dts = c->next_pts;
|
if (req_size > buf_size) {
|
||||||
c->next_pts = AV_NOPTS_VALUE;
|
av_log(avctx, AV_LOG_ERROR, "buf size too small (need %d, got %d)\n", req_size, buf_size);
|
||||||
|
return -1;
|
||||||
pkt->size = req_size;
|
}
|
||||||
pkt->flags |= AV_PKT_FLAG_KEY;
|
return req_size;
|
||||||
*got_packet = !!req_size;
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -374,7 +366,7 @@ AVCodec ff_a64multi_encoder = {
|
|||||||
.id = CODEC_ID_A64_MULTI,
|
.id = CODEC_ID_A64_MULTI,
|
||||||
.priv_data_size = sizeof(A64Context),
|
.priv_data_size = sizeof(A64Context),
|
||||||
.init = a64multi_init_encoder,
|
.init = a64multi_init_encoder,
|
||||||
.encode2 = a64multi_encode_frame,
|
.encode = a64multi_encode_frame,
|
||||||
.close = a64multi_close_encoder,
|
.close = a64multi_close_encoder,
|
||||||
.pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE},
|
.pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
|
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
|
||||||
@@ -387,7 +379,7 @@ AVCodec ff_a64multi5_encoder = {
|
|||||||
.id = CODEC_ID_A64_MULTI5,
|
.id = CODEC_ID_A64_MULTI5,
|
||||||
.priv_data_size = sizeof(A64Context),
|
.priv_data_size = sizeof(A64Context),
|
||||||
.init = a64multi_init_encoder,
|
.init = a64multi_init_encoder,
|
||||||
.encode2 = a64multi_encode_frame,
|
.encode = a64multi_encode_frame,
|
||||||
.close = a64multi_close_encoder,
|
.close = a64multi_close_encoder,
|
||||||
.pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE},
|
.pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE},
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
|
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ enum BandType {
|
|||||||
#define IS_CODEBOOK_UNSIGNED(x) ((x - 1) & 10)
|
#define IS_CODEBOOK_UNSIGNED(x) ((x - 1) & 10)
|
||||||
|
|
||||||
enum ChannelPosition {
|
enum ChannelPosition {
|
||||||
AAC_CHANNEL_OFF = 0,
|
|
||||||
AAC_CHANNEL_FRONT = 1,
|
AAC_CHANNEL_FRONT = 1,
|
||||||
AAC_CHANNEL_SIDE = 2,
|
AAC_CHANNEL_SIDE = 2,
|
||||||
AAC_CHANNEL_BACK = 3,
|
AAC_CHANNEL_BACK = 3,
|
||||||
@@ -105,22 +104,13 @@ enum CouplingPoint {
|
|||||||
* Output configuration status
|
* Output configuration status
|
||||||
*/
|
*/
|
||||||
enum OCStatus {
|
enum OCStatus {
|
||||||
OC_NONE, ///< Output unconfigured
|
OC_NONE, //< Output unconfigured
|
||||||
OC_TRIAL_PCE, ///< Output configuration under trial specified by an inband PCE
|
OC_TRIAL_PCE, //< Output configuration under trial specified by an inband PCE
|
||||||
OC_TRIAL_FRAME, ///< Output configuration under trial specified by a frame header
|
OC_TRIAL_FRAME, //< Output configuration under trial specified by a frame header
|
||||||
OC_GLOBAL_HDR, ///< Output configuration set in a global header but not yet locked
|
OC_GLOBAL_HDR, //< Output configuration set in a global header but not yet locked
|
||||||
OC_LOCKED, ///< Output configuration locked in place
|
OC_LOCKED, //< Output configuration locked in place
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
MPEG4AudioConfig m4ac;
|
|
||||||
uint8_t layout_map[MAX_ELEM_ID*4][3];
|
|
||||||
int layout_map_tags;
|
|
||||||
int channels;
|
|
||||||
uint64_t channel_layout;
|
|
||||||
enum OCStatus status;
|
|
||||||
} OutputConfiguration;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Predictor State
|
* Predictor State
|
||||||
*/
|
*/
|
||||||
@@ -261,7 +251,8 @@ typedef struct {
|
|||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
AVFrame frame;
|
|
||||||
|
MPEG4AudioConfig m4ac;
|
||||||
|
|
||||||
int is_saved; ///< Set if elements have stored overlap from previous frame.
|
int is_saved; ///< Set if elements have stored overlap from previous frame.
|
||||||
DynamicRangeControl che_drc;
|
DynamicRangeControl che_drc;
|
||||||
@@ -270,6 +261,9 @@ typedef struct {
|
|||||||
* @name Channel element related data
|
* @name Channel element related data
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
enum ChannelPosition che_pos[4][MAX_ELEM_ID]; /**< channel element channel mapping with the
|
||||||
|
* first index as the first 4 raw data block types
|
||||||
|
*/
|
||||||
ChannelElement *che[4][MAX_ELEM_ID];
|
ChannelElement *che[4][MAX_ELEM_ID];
|
||||||
ChannelElement *tag_che_map[4][MAX_ELEM_ID];
|
ChannelElement *tag_che_map[4][MAX_ELEM_ID];
|
||||||
int tags_mapped;
|
int tags_mapped;
|
||||||
@@ -304,8 +298,7 @@ typedef struct {
|
|||||||
|
|
||||||
DECLARE_ALIGNED(32, float, temp)[128];
|
DECLARE_ALIGNED(32, float, temp)[128];
|
||||||
|
|
||||||
OutputConfiguration oc[2];
|
enum OCStatus output_configured;
|
||||||
int warned_num_aac_frames;
|
|
||||||
} AACContext;
|
} AACContext;
|
||||||
|
|
||||||
#endif /* AVCODEC_AAC_H */
|
#endif /* AVCODEC_AAC_H */
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ get_next:
|
|||||||
avctx->channels = s->channels;
|
avctx->channels = s->channels;
|
||||||
avctx->channel_layout = s->channel_layout;
|
avctx->channel_layout = s->channel_layout;
|
||||||
}
|
}
|
||||||
s1->duration = s->samples;
|
avctx->frame_size = s->samples;
|
||||||
avctx->audio_service_type = s->service_type;
|
avctx->audio_service_type = s->service_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ typedef struct AACAC3ParseContext {
|
|||||||
int sample_rate;
|
int sample_rate;
|
||||||
int bit_rate;
|
int bit_rate;
|
||||||
int samples;
|
int samples;
|
||||||
uint64_t channel_layout;
|
int64_t channel_layout;
|
||||||
int service_type;
|
int service_type;
|
||||||
|
|
||||||
int remaining_size;
|
int remaining_size;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
if (show_bits(&gb, 12) != 0xfff)
|
if (show_bits(&gb, 12) != 0xfff)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (avpriv_aac_parse_header(&gb, &hdr) < 0) {
|
if (ff_aac_parse_header(&gb, &hdr) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Error parsing ADTS frame header!\n");
|
av_log(avctx, AV_LOG_ERROR, "Error parsing ADTS frame header!\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -72,13 +72,13 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
int pce_size = 0;
|
int pce_size = 0;
|
||||||
uint8_t pce_data[MAX_PCE_SIZE];
|
uint8_t pce_data[MAX_PCE_SIZE];
|
||||||
if (!hdr.chan_config) {
|
if (!hdr.chan_config) {
|
||||||
init_get_bits(&gb, buf, buf_size * 8);
|
init_get_bits(&gb, buf, buf_size);
|
||||||
if (get_bits(&gb, 3) != 5) {
|
if (get_bits(&gb, 3) != 5) {
|
||||||
av_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element is", 0);
|
av_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element is", 0);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
init_put_bits(&pb, pce_data, MAX_PCE_SIZE);
|
init_put_bits(&pb, pce_data, MAX_PCE_SIZE);
|
||||||
pce_size = avpriv_copy_pce_data(&pb, &gb)/8;
|
pce_size = ff_copy_pce_data(&pb, &gb)/8;
|
||||||
flush_put_bits(&pb);
|
flush_put_bits(&pb);
|
||||||
buf_size -= get_bits_count(&gb)/8;
|
buf_size -= get_bits_count(&gb)/8;
|
||||||
buf += get_bits_count(&gb)/8;
|
buf += get_bits_count(&gb)/8;
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
|
|||||||
tmp.u64 = av_be2ne64(state);
|
tmp.u64 = av_be2ne64(state);
|
||||||
init_get_bits(&bits, tmp.u8+8-AAC_ADTS_HEADER_SIZE, AAC_ADTS_HEADER_SIZE * 8);
|
init_get_bits(&bits, tmp.u8+8-AAC_ADTS_HEADER_SIZE, AAC_ADTS_HEADER_SIZE * 8);
|
||||||
|
|
||||||
if ((size = avpriv_aac_parse_header(&bits, &hdr)) < 0)
|
if ((size = ff_aac_parse_header(&bits, &hdr)) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
*need_next_header = 0;
|
*need_next_header = 0;
|
||||||
*new_frame_start = 1;
|
*new_frame_start = 1;
|
||||||
@@ -61,9 +61,9 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1)
|
|||||||
|
|
||||||
|
|
||||||
AVCodecParser ff_aac_parser = {
|
AVCodecParser ff_aac_parser = {
|
||||||
.codec_ids = { CODEC_ID_AAC },
|
{ CODEC_ID_AAC },
|
||||||
.priv_data_size = sizeof(AACAC3ParseContext),
|
sizeof(AACAC3ParseContext),
|
||||||
.parser_init = aac_parse_init,
|
aac_parse_init,
|
||||||
.parser_parse = ff_aac_ac3_parse,
|
ff_aac_ac3_parse,
|
||||||
.parser_close = ff_parse_close,
|
ff_parse_close,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
#include "get_bits.h"
|
#include "get_bits.h"
|
||||||
#include "mpeg4audio.h"
|
#include "mpeg4audio.h"
|
||||||
|
|
||||||
int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
||||||
{
|
{
|
||||||
int size, rdb, ch, sr;
|
int size, rdb, ch, sr;
|
||||||
int aot, crc_abs;
|
int aot, crc_abs;
|
||||||
@@ -39,7 +39,7 @@ int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
|||||||
crc_abs = get_bits1(gbc); /* protection_absent */
|
crc_abs = get_bits1(gbc); /* protection_absent */
|
||||||
aot = get_bits(gbc, 2); /* profile_objecttype */
|
aot = get_bits(gbc, 2); /* profile_objecttype */
|
||||||
sr = get_bits(gbc, 4); /* sample_frequency_index */
|
sr = get_bits(gbc, 4); /* sample_frequency_index */
|
||||||
if(!avpriv_mpeg4audio_sample_rates[sr])
|
if(!ff_mpeg4audio_sample_rates[sr])
|
||||||
return AAC_AC3_PARSE_ERROR_SAMPLE_RATE;
|
return AAC_AC3_PARSE_ERROR_SAMPLE_RATE;
|
||||||
skip_bits1(gbc); /* private_bit */
|
skip_bits1(gbc); /* private_bit */
|
||||||
ch = get_bits(gbc, 3); /* channel_configuration */
|
ch = get_bits(gbc, 3); /* channel_configuration */
|
||||||
@@ -62,7 +62,7 @@ int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr)
|
|||||||
hdr->crc_absent = crc_abs;
|
hdr->crc_absent = crc_abs;
|
||||||
hdr->num_aac_frames = rdb + 1;
|
hdr->num_aac_frames = rdb + 1;
|
||||||
hdr->sampling_index = sr;
|
hdr->sampling_index = sr;
|
||||||
hdr->sample_rate = avpriv_mpeg4audio_sample_rates[sr];
|
hdr->sample_rate = ff_mpeg4audio_sample_rates[sr];
|
||||||
hdr->samples = (rdb + 1) * 1024;
|
hdr->samples = (rdb + 1) * 1024;
|
||||||
hdr->bit_rate = size * 8 * hdr->sample_rate / hdr->samples;
|
hdr->bit_rate = size * 8 * hdr->sample_rate / hdr->samples;
|
||||||
|
|
||||||
|
|||||||
@@ -49,6 +49,6 @@ typedef struct {
|
|||||||
* -2 if the version element is invalid, -3 if the sample rate
|
* -2 if the version element is invalid, -3 if the sample rate
|
||||||
* element is invalid, or -4 if the bit rate element is invalid.
|
* element is invalid, or -4 if the bit rate element is invalid.
|
||||||
*/
|
*/
|
||||||
int avpriv_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr);
|
int ff_aac_parse_header(GetBitContext *gbc, AACADTSHeaderInfo *hdr);
|
||||||
|
|
||||||
#endif /* AVCODEC_AACADTSDEC_H */
|
#endif /* AVCODEC_AACADTSDEC_H */
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user