Compare commits
455 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 17788711ac | |||
| 30c644afeb | |||
| 0cdeacf41b | |||
| 928473a187 | |||
| 43919b6922 | |||
| bd8d8f57e8 | |||
| 581bfd9c6f | |||
| 1218e9d73d | |||
| 2515907a45 | |||
| 7e7772c13a | |||
| ac8ef33f9a | |||
| 4de40be507 | |||
| 64e50b2f2a | |||
| 5b4a79ee02 | |||
| d9618b964b | |||
| 763c753348 | |||
| 4ef5605fc9 | |||
| 3508aa1427 | |||
| 42d9a7010f | |||
| fd6a9fcd42 | |||
| 20be3ea442 | |||
| 70ff376e83 | |||
| 49dd89f902 | |||
| bdc4abd694 | |||
| 5d7320be52 | |||
| 7881d3b2a5 | |||
| 5f2902bdc7 | |||
| ef3687998f | |||
| ba5e66cf65 | |||
| 0e79fd1ec9 | |||
| 9939d98b2c | |||
| abfa416181 | |||
| 237cf31a57 | |||
| 051b47dc4e | |||
| 71bdcd66e1 | |||
| a86cc0cc1b | |||
| b00a3bf332 | |||
| 08fe58ef32 | |||
| 8a3a3e3154 | |||
| 5410d6d26f | |||
| 529488afa3 | |||
| e81236d1a5 | |||
| 54a9f64d42 | |||
| b6351f9978 | |||
| 07f634f948 | |||
| 931f4313b2 | |||
| fd4c80177b | |||
| 2dd1d0c60b | |||
| fa8d407c1f | |||
| 8a21620c26 | |||
| c60caa5769 | |||
| 96e2a4ba74 | |||
| a9c0f905aa | |||
| 42b7d224bc | |||
| 45bb57e009 | |||
| ec0f77fbff | |||
| 3aa99bed5d | |||
| ece0c9c4b0 | |||
| 0da0d7754e | |||
| c03491d96b | |||
| 237958f8e8 | |||
| 8e17d28863 | |||
| 084102cd47 | |||
| 0d5e626197 | |||
| 6560e61826 | |||
| 71b3f64935 | |||
| 69a92ae397 | |||
| d723f92dbf | |||
| 11e5106c56 | |||
| a65573c45d | |||
| 6c28673cb3 | |||
| 5284d17562 | |||
| 01384e3dde | |||
| 2d39d8ffc1 | |||
| 5d33142fd6 | |||
| 7e8b4506e0 | |||
| 96dac432f7 | |||
| b92ccfefc3 | |||
| 6e45a99a7c | |||
| d59804bafb | |||
| 35cf24eee9 | |||
| 341cf9ed81 | |||
| c36f5df34a | |||
| 23b3fe00bb | |||
| 42669252e8 | |||
| 25a9823eb4 | |||
| a8fd50bb4e | |||
| 9282c96071 | |||
| aa9d705871 | |||
| 7ddf252c7e | |||
| 1abb0e5639 | |||
| e5cf4d16c6 | |||
| e0465d6fcf | |||
| 65889b62b3 | |||
| 7fc97160c2 | |||
| c4f0f3c52d | |||
| 4865948d2e | |||
| 891376d261 | |||
| 24a5cd720d | |||
| 75f5fe165c | |||
| 665f70209a | |||
| 12c8e4021c | |||
| f56095c4d7 | |||
| 76601e4ab8 | |||
| e90d620cb9 | |||
| 0ffa44340f | |||
| 0bd9b78fb6 | |||
| 997bf49b1c | |||
| e9d85860d0 | |||
| 2144ce08c1 | |||
| e28c27e25f | |||
| 9b9048a3dd | |||
| 70dc7bb893 | |||
| b9b97900c1 | |||
| d49b57fe0f | |||
| 0f1882b9b2 | |||
| 0fc229450f | |||
| 6f02de4ee8 | |||
| 248a2fca90 | |||
| 1482253790 | |||
| 0f578ea705 | |||
| 48443598ed | |||
| 30ffb80dca | |||
| 0a64e9a029 | |||
| 59b2a9ef95 | |||
| 4ce6d65b6f | |||
| ab4e54f6f6 | |||
| 18342848f7 | |||
| 61a51598e3 | |||
| abc1fa7c5a | |||
| f712d3669e | |||
| ca232ff9b0 | |||
| b4632cec74 | |||
| 454f6c622c | |||
| f70ee7d14f | |||
| c285db74f6 | |||
| cc8d20e345 | |||
| c2b72eac6c | |||
| 9d77a62936 | |||
| f2aaee49b2 | |||
| d13cf32099 | |||
| 5626e11bd5 | |||
| 8d1f38c4b1 | |||
| ea7fbd0b16 | |||
| b2b4df8d51 | |||
| 5691d9a6c1 | |||
| 2b8490b762 | |||
| 4b638ea42d | |||
| 4ecd718285 | |||
| 0607c8af2b | |||
| 3c385ea24c | |||
| c7e9626b7b | |||
| 26d7253441 | |||
| c75a915f66 | |||
| ecd30280f5 | |||
| eada99a854 | |||
| 9ade5b804e | |||
| 753f0738ca | |||
| 85b00d798f | |||
| 8d60d8bef2 | |||
| 53c02d04e4 | |||
| 90c7dfb907 | |||
| 424b00a300 | |||
| 7b38ea4003 | |||
| 71104f7cb0 | |||
| 98fe429ba5 | |||
| 90cf672d7a | |||
| 4af56488c8 | |||
| 4065e55759 | |||
| fe97363c38 | |||
| ce95904013 | |||
| a61998e4f4 | |||
| e5546d4871 | |||
| 8f7ebb88b8 | |||
| e897eb108b | |||
| 2af3a04164 | |||
| 92ca3578bf | |||
| 1be06c8531 | |||
| 6011b806dd | |||
| 3ac85d70f0 | |||
| 401b3dafd9 | |||
| 71516ac175 | |||
| 0983720cf2 | |||
| 9e9d92bbcc | |||
| 3d79041f85 | |||
| 2c71734d9e | |||
| 0759bdc315 | |||
| 1530fbccac | |||
| 7f8aa37bc3 | |||
| 5219e20d58 | |||
| 8ee704c392 | |||
| 9060c10c65 | |||
| 5202621ac4 | |||
| da6a8c9cfd | |||
| f07cebcd91 | |||
| d0ba12fa0c | |||
| a58053dc24 | |||
| b1a960cc83 | |||
| 620d80d572 | |||
| e3ce3d373c | |||
| f31682f2f2 | |||
| fb44a3e4a3 | |||
| 6ee47bd008 | |||
| 7819750157 | |||
| 0d819ed318 | |||
| e63346f7e8 | |||
| ddcccababe | |||
| b580bae53a | |||
| 9085cdd677 | |||
| ab31a9ee4a | |||
| a57d29a50c | |||
| 11b14d0e63 | |||
| bb683ebdba | |||
| b3cc4bd18f | |||
| ca9d302519 | |||
| e925fd215f | |||
| 5e01cd3b69 | |||
| 2256b2a3c1 | |||
| 89c917fcd9 | |||
| 8a38deb789 | |||
| 4fdcb1e1b7 | |||
| b902ba478c | |||
| f0fabcc6ed | |||
| bd29764c61 | |||
| d81ccf1fb2 | |||
| 67d20495f5 | |||
| 5a0a156e88 | |||
| 884094deba | |||
| db20610c49 | |||
| 15a736483e | |||
| c8b90c7cd5 | |||
| 97978b7ae8 | |||
| 3f2efac0fe | |||
| b9058f58bd | |||
| 47faf347a0 | |||
| 3d1e4b7ca5 | |||
| a2bea0df0e | |||
| 483b2016bb | |||
| 271f5d68b9 | |||
| dee327b0e7 | |||
| e438fd3be9 | |||
| 3d380ffde9 | |||
| 84b100396e | |||
| 7855083443 | |||
| ca7f64e0ac | |||
| 2b26f8c6bf | |||
| 6e3697b985 | |||
| c93501687c | |||
| bb6f466794 | |||
| 08a319549a | |||
| d1da1c8384 | |||
| 8ded3738d1 | |||
| a2186a8054 | |||
| a92b73da99 | |||
| ab38b39059 | |||
| 5dde8ba59e | |||
| b841869477 | |||
| 3488e9e269 | |||
| 5a8d78ab7f | |||
| dea7f1c62e | |||
| c7027ae738 | |||
| 971b13752d | |||
| d0ed672484 | |||
| 751e684aae | |||
| 803ca5c349 | |||
| 252002aec1 | |||
| d805a51713 | |||
| 45dd7df83b | |||
| da82be0cc0 | |||
| b8b77aefe8 | |||
| 30147f14d4 | |||
| d6a705d778 | |||
| e24b33cd68 | |||
| 6f7fd2f589 | |||
| f974c54909 | |||
| 71b3235cea | |||
| dcd1acce1a | |||
| 5c502e5d41 | |||
| fa45feefad | |||
| 9f3135b30b | |||
| 7ba102d008 | |||
| 3e65caf5bc | |||
| af7cbdf470 | |||
| 414b377462 | |||
| 86d4d4b011 | |||
| 14f31df2cc | |||
| d04e78805a | |||
| 25c67b2165 | |||
| fd8af75109 | |||
| 93d720b040 | |||
| 720e2d4143 | |||
| 9195ef6f65 | |||
| 833dce3818 | |||
| a8b6721bed | |||
| 1fe734f4d3 | |||
| 311e58e478 | |||
| 970109deaf | |||
| eff0bf7def | |||
| 6559bb893f | |||
| 14e258d847 | |||
| ca47aec665 | |||
| 95e26d33d7 | |||
| f32051cd73 | |||
| c3ee5b4c36 | |||
| c17fd9f9ce | |||
| 0f3cdddf38 | |||
| a0d13f578b | |||
| 91e19ab930 | |||
| bb4126e250 | |||
| 9902eef0f5 | |||
| 6db67ac2a4 | |||
| 85eeab4d22 | |||
| 4431ee1896 | |||
| d2feaf2ba6 | |||
| 0f73cb454d | |||
| 82cfb8c2db | |||
| 0a55c882cb | |||
| c09acf9882 | |||
| a0779a2ee5 | |||
| b4f90013ab | |||
| 3a6fbb0c8e | |||
| 6a782e20d7 | |||
| 8cea63c48a | |||
| 8f87e75c6c | |||
| 06a927a6b5 | |||
| 3c523bdda8 | |||
| ece54c7085 | |||
| 7eee79ea2f | |||
| 458933fdb8 | |||
| 95d0baa952 | |||
| 32cff0d3f0 | |||
| ddce97c7b0 | |||
| 26617b47fa | |||
| b3fb651a8a | |||
| 2da5b69020 | |||
| b23642aa7e | |||
| eae4dfd4e8 | |||
| 6fb2c03e1a | |||
| 1d6b261a24 | |||
| 02f1ae5406 | |||
| aaac34f5e6 | |||
| 7858d261aa | |||
| f85c44264b | |||
| 025e286757 | |||
| 79ec45a455 | |||
| 09653c5444 | |||
| c788713589 | |||
| f637fa5d33 | |||
| dc1881ee11 | |||
| 24187a96ee | |||
| c87f3c3ab4 | |||
| 8f07c09b20 | |||
| 8e3581ab03 | |||
| 5d3cd041fc | |||
| 9865f19f15 | |||
| 90ed770192 | |||
| f9fa321734 | |||
| a0e328d28b | |||
| 848e5cfc0f | |||
| 9d8795e598 | |||
| 64d440a3b4 | |||
| 42586c8754 | |||
| 64d362fce7 | |||
| c55a09a8b6 | |||
| a94404457b | |||
| 364495a351 | |||
| f9c872622e | |||
| 9f2d73168f | |||
| 930d035e72 | |||
| 875649bfae | |||
| 70127070dd | |||
| d83ab33715 | |||
| 06190d75d0 | |||
| c9ea1f7fc5 | |||
| 47de8ccf42 | |||
| 72c1de649a | |||
| 5e3e67f977 | |||
| 221bbd002c | |||
| fffc9316da | |||
| 9a87ba0933 | |||
| d8538a1002 | |||
| 6cb33e0763 | |||
| 2e75c45593 | |||
| ba4cb43f0b | |||
| dc73774792 | |||
| ce11d9490c | |||
| 430ef8a716 | |||
| 627772d988 | |||
| 5ce57e0248 | |||
| 5effd65312 | |||
| cb340ecd7d | |||
| b88bea1d6c | |||
| 99036565ca | |||
| fcc6460dbf | |||
| 1065d4197e | |||
| fbb1af39e4 | |||
| 073bde2b1f | |||
| e4bb67bc50 | |||
| 59549b5ab7 | |||
| c0445df5b3 | |||
| c77b3737b9 | |||
| 04d6946600 | |||
| ae93d3405e | |||
| 054779625f | |||
| e22dd7fbd0 | |||
| 376a9f8e6e | |||
| 9af68f8d1f | |||
| f2361593ca | |||
| 96e6d4da37 | |||
| 735deda2cf | |||
| 5f64a7a625 | |||
| ffd28de388 | |||
| af589dd5e9 | |||
| fd60aeb55b | |||
| 79a3f364dd | |||
| 33d699a4e7 | |||
| f166a02b67 | |||
| c5948b472b | |||
| 7ee5e97c46 | |||
| 7ef2dbd239 | |||
| 524d0d2cfc | |||
| 91f04e7410 | |||
| 9f7baf139f | |||
| ec89046fa1 | |||
| cc0dd86580 | |||
| 0baa0a5a02 | |||
| 039f6921c2 | |||
| 7fa6db2545 | |||
| 840931e766 | |||
| 1ce3f736d2 | |||
| 4d0090f90a | |||
| f8d5f3dff5 | |||
| 298e03d102 | |||
| 54f3902393 | |||
| 3ca6253beb | |||
| 84df0dc40b | |||
| a857811c75 | |||
| 3d6219b6db | |||
| 0a53c7016f | |||
| f0dc5c0419 | |||
| df8c36265a | |||
| c351d8781d | |||
| d553a522b9 | |||
| 0b6d5f27c8 | |||
| 9ecfd7daa3 | |||
| 90f1aa38b6 | |||
| fc5c81ce0a | |||
| e820e3a259 | |||
| 17911d0a96 | |||
| 2ed7f5a670 | |||
| 7c6c5767eb | |||
| 0ec869527c | |||
| 0b198e38c5 | |||
| 1ea3248290 | |||
| bdd2db60c2 |
@@ -6,8 +6,6 @@
|
|||||||
*.dylib
|
*.dylib
|
||||||
*.exe
|
*.exe
|
||||||
*.exp
|
*.exp
|
||||||
*.gcda
|
|
||||||
*.gcno
|
|
||||||
*.h.c
|
*.h.c
|
||||||
*.ilk
|
*.ilk
|
||||||
*.lib
|
*.lib
|
||||||
@@ -26,13 +24,11 @@
|
|||||||
/ffprobe
|
/ffprobe
|
||||||
/ffserver
|
/ffserver
|
||||||
/config.*
|
/config.*
|
||||||
/coverage.info
|
|
||||||
/version.h
|
/version.h
|
||||||
/doc/*.1
|
/doc/*.1
|
||||||
/doc/*.3
|
/doc/*.3
|
||||||
/doc/*.html
|
/doc/*.html
|
||||||
/doc/*.pod
|
/doc/*.pod
|
||||||
/doc/config.texi
|
|
||||||
/doc/avoptions_codec.texi
|
/doc/avoptions_codec.texi
|
||||||
/doc/avoptions_format.texi
|
/doc/avoptions_format.texi
|
||||||
/doc/examples/decoding_encoding
|
/doc/examples/decoding_encoding
|
||||||
@@ -47,7 +43,6 @@
|
|||||||
/doc/fate.txt
|
/doc/fate.txt
|
||||||
/doc/doxy/html/
|
/doc/doxy/html/
|
||||||
/doc/print_options
|
/doc/print_options
|
||||||
/lcov/
|
|
||||||
/libavcodec/*_tablegen
|
/libavcodec/*_tablegen
|
||||||
/libavcodec/*_tables.c
|
/libavcodec/*_tables.c
|
||||||
/libavcodec/*_tables.h
|
/libavcodec/*_tables.h
|
||||||
@@ -57,18 +52,15 @@
|
|||||||
/tests/data/
|
/tests/data/
|
||||||
/tests/rotozoom
|
/tests/rotozoom
|
||||||
/tests/tiny_psnr
|
/tests/tiny_psnr
|
||||||
/tests/tiny_ssim
|
|
||||||
/tests/videogen
|
/tests/videogen
|
||||||
/tests/vsynth1/
|
/tests/vsynth1/
|
||||||
/tools/aviocat
|
/tools/aviocat
|
||||||
/tools/ffbisect
|
/tools/ffbisect
|
||||||
/tools/bisect.need
|
/tools/bisect.need
|
||||||
/tools/crypto_bench
|
|
||||||
/tools/cws2fws
|
/tools/cws2fws
|
||||||
/tools/fourcc2pixfmt
|
/tools/fourcc2pixfmt
|
||||||
/tools/ffescape
|
/tools/ffescape
|
||||||
/tools/ffeval
|
/tools/ffeval
|
||||||
/tools/ffhash
|
|
||||||
/tools/graph2dot
|
/tools/graph2dot
|
||||||
/tools/ismindex
|
/tools/ismindex
|
||||||
/tools/pktdumper
|
/tools/pktdumper
|
||||||
@@ -76,4 +68,3 @@
|
|||||||
/tools/qt-faststart
|
/tools/qt-faststart
|
||||||
/tools/trasher
|
/tools/trasher
|
||||||
/tools/seek_print
|
/tools/seek_print
|
||||||
/tools/zmqsend
|
|
||||||
|
|||||||
@@ -1,125 +1,12 @@
|
|||||||
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 1.2.8:
|
||||||
|
- proresenc_ks: fix buffer overflow
|
||||||
|
- iff: fix crash
|
||||||
version 2.1:
|
- cdgraphics: fix infinite loop
|
||||||
|
- Fix Ticket3804
|
||||||
- aecho filter
|
- Fix Ticket3208
|
||||||
- perspective filter ported from libmpcodecs
|
|
||||||
- ffprobe -show_programs option
|
|
||||||
- compand filter
|
|
||||||
- RTMP seek support
|
|
||||||
- when transcoding with ffmpeg (i.e. not streamcopying), -ss is now accurate
|
|
||||||
even when used as an input option. Previous behavior can be restored with
|
|
||||||
the -noaccurate_seek option.
|
|
||||||
- ffmpeg -t option can now be used for inputs, to limit the duration of
|
|
||||||
data read from an input file
|
|
||||||
- incomplete Voxware MetaSound decoder
|
|
||||||
- read EXIF metadata from JPEG
|
|
||||||
- DVB teletext decoder
|
|
||||||
- phase filter ported from libmpcodecs
|
|
||||||
- w3fdif filter
|
|
||||||
- Opus support in Matroska
|
|
||||||
- FFV1 version 1.3 is stable and no longer experimental
|
|
||||||
- FFV1: YUVA(444,422,420) 9, 10 and 16 bit support
|
|
||||||
- changed DTS stream id in lavf mpeg ps muxer from 0x8a to 0x88, to be
|
|
||||||
more consistent with other muxers.
|
|
||||||
- adelay filter
|
|
||||||
- pullup filter ported from libmpcodecs
|
|
||||||
- ffprobe -read_intervals option
|
|
||||||
- Lossless and alpha support for WebP decoder
|
|
||||||
- Error Resilient AAC syntax (ER AAC LC) decoding
|
|
||||||
- Low Delay AAC (ER AAC LD) decoding
|
|
||||||
- mux chapters in ASF files
|
|
||||||
- SFTP protocol (via libssh)
|
|
||||||
- libx264: add ability to encode in YUVJ422P and YUVJ444P
|
|
||||||
- Fraps: use BT.709 colorspace by default for yuv, as reference fraps decoder does
|
|
||||||
- make decoding alpha optional for prores, ffv1 and vp6 by setting
|
|
||||||
the skip_alpha flag.
|
|
||||||
- ladspa wrapper filter
|
|
||||||
- native VP9 decoder
|
|
||||||
- dpx parser
|
|
||||||
- max_error_rate parameter in ffmpeg
|
|
||||||
- PulseAudio output device
|
|
||||||
- ReplayGain scanner
|
|
||||||
- Enhanced Low Delay AAC (ER AAC ELD) decoding (no LD SBR support)
|
|
||||||
- Linux framebuffer output device
|
|
||||||
- HEVC decoder, raw HEVC demuxer, HEVC demuxing in TS, Matroska and MP4
|
|
||||||
- mergeplanes filter
|
|
||||||
|
|
||||||
|
|
||||||
version 2.0:
|
|
||||||
|
|
||||||
- curves filter
|
|
||||||
- reference-counting for AVFrame and AVPacket data
|
|
||||||
- ffmpeg now fails when input options are used for output file
|
|
||||||
or vice versa
|
|
||||||
- support for Monkey's Audio versions from 3.93
|
|
||||||
- perms and aperms filters
|
|
||||||
- audio filtering support in ffplay
|
|
||||||
- 10% faster aac encoding on x86 and MIPS
|
|
||||||
- sine audio filter source
|
|
||||||
- WebP demuxing and decoding support
|
|
||||||
- new ffmpeg options -filter_script and -filter_complex_script, which allow a
|
|
||||||
filtergraph description to be read from a file
|
|
||||||
- OpenCL support
|
|
||||||
- audio phaser filter
|
|
||||||
- separatefields filter
|
|
||||||
- libquvi demuxer
|
|
||||||
- uniform options syntax across all filters
|
|
||||||
- telecine filter
|
|
||||||
- new interlace filter
|
|
||||||
- smptehdbars source
|
|
||||||
- inverse telecine filters (fieldmatch and decimate)
|
|
||||||
- colorbalance filter
|
|
||||||
- colorchannelmixer filter
|
|
||||||
- The matroska demuxer can now output proper verbatim ASS packets. It will
|
|
||||||
become the default at the next libavformat major bump.
|
|
||||||
- decent native animated GIF encoding
|
|
||||||
- asetrate filter
|
|
||||||
- interleave filter
|
|
||||||
- timeline editing with filters
|
|
||||||
- vidstabdetect and vidstabtransform filters for video stabilization using
|
|
||||||
the vid.stab library
|
|
||||||
- astats filter
|
|
||||||
- trim and atrim filters
|
|
||||||
- ffmpeg -t and -ss (output-only) options are now sample-accurate when
|
|
||||||
transcoding audio
|
|
||||||
- Matroska muxer can now put the index at the beginning of the file.
|
|
||||||
- extractplanes filter
|
|
||||||
- avectorscope filter
|
|
||||||
- ADPCM DTK decoder
|
|
||||||
- ADP demuxer
|
|
||||||
- RSD demuxer
|
|
||||||
- RedSpark demuxer
|
|
||||||
- ADPCM IMA Radical decoder
|
|
||||||
- zmq filters
|
|
||||||
- DCT denoiser filter (dctdnoiz)
|
|
||||||
- Wavelet denoiser filter ported from libmpcodecs as owdenoise (formerly "ow")
|
|
||||||
- Apple Intermediate Codec decoder
|
|
||||||
- Escape 130 video decoder
|
|
||||||
- FTP protocol support
|
|
||||||
- V4L2 output device
|
|
||||||
- 3D LUT filter (lut3d)
|
|
||||||
- SMPTE 302M audio encoder
|
|
||||||
- support for slice multithreading in libavfilter
|
|
||||||
- Hald CLUT support (generation and filtering)
|
|
||||||
- VC-1 interlaced B-frame support
|
|
||||||
- support for WavPack muxing (raw and in Matroska)
|
|
||||||
- XVideo output device
|
|
||||||
- vignette filter
|
|
||||||
- True Audio (TTA) encoder
|
|
||||||
- Go2Webinar decoder
|
|
||||||
- mcdeint filter ported from libmpcodecs
|
|
||||||
- sab filter ported from libmpcodecs
|
|
||||||
- ffprobe -show_chapters option
|
|
||||||
- WavPack encoding through libwavpack
|
|
||||||
- rotate filter
|
|
||||||
- spp filter ported from libmpcodecs
|
|
||||||
- libgme support
|
|
||||||
- psnr filter
|
|
||||||
|
|
||||||
|
|
||||||
version 1.2:
|
version 1.2:
|
||||||
@@ -656,7 +543,7 @@ version 0.6:
|
|||||||
- LPCM support in MPEG-TS (HDMV RID as found on Blu-ray disks)
|
- LPCM support in MPEG-TS (HDMV RID as found on Blu-ray disks)
|
||||||
- WMA Pro decoder
|
- WMA Pro decoder
|
||||||
- Core Audio Format demuxer
|
- Core Audio Format demuxer
|
||||||
- ATRAC1 decoder
|
- Atrac1 decoder
|
||||||
- MD STUDIO audio demuxer
|
- MD STUDIO audio demuxer
|
||||||
- RF64 support in WAV demuxer
|
- RF64 support in WAV demuxer
|
||||||
- MPEG-4 Audio Lossless Coding (ALS) decoder
|
- MPEG-4 Audio Lossless Coding (ALS) decoder
|
||||||
@@ -756,7 +643,7 @@ version 0.5:
|
|||||||
- MXF demuxer
|
- MXF demuxer
|
||||||
- VC-1/WMV3/WMV9 video decoder
|
- VC-1/WMV3/WMV9 video decoder
|
||||||
- MacIntel support
|
- MacIntel support
|
||||||
- AviSynth support
|
- AVISynth support
|
||||||
- VMware video decoder
|
- VMware video decoder
|
||||||
- VP5 video decoder
|
- VP5 video decoder
|
||||||
- VP6 video decoder
|
- VP6 video decoder
|
||||||
@@ -784,7 +671,7 @@ version 0.5:
|
|||||||
- Interplay C93 demuxer and video decoder
|
- Interplay C93 demuxer and video decoder
|
||||||
- Bethsoft VID demuxer and video decoder
|
- Bethsoft VID demuxer and video decoder
|
||||||
- CRYO APC demuxer
|
- CRYO APC demuxer
|
||||||
- ATRAC3 decoder
|
- Atrac3 decoder
|
||||||
- V.Flash PTX decoder
|
- V.Flash PTX decoder
|
||||||
- RoQ muxer, RoQ audio encoder
|
- RoQ muxer, RoQ audio encoder
|
||||||
- Renderware TXD demuxer and decoder
|
- Renderware TXD demuxer and decoder
|
||||||
|
|||||||
@@ -33,17 +33,12 @@ Specifically, the GPL parts of FFmpeg are
|
|||||||
- vf_geq.c
|
- vf_geq.c
|
||||||
- vf_histeq.c
|
- vf_histeq.c
|
||||||
- vf_hqdn3d.c
|
- vf_hqdn3d.c
|
||||||
|
- vf_hue.c
|
||||||
- vf_kerndeint.c
|
- vf_kerndeint.c
|
||||||
- vf_mcdeint.c
|
|
||||||
- vf_mp.c
|
- vf_mp.c
|
||||||
- vf_owdenoise.c
|
- vf_noise.c
|
||||||
- vf_perspective.c
|
|
||||||
- vf_phase.c
|
|
||||||
- vf_pp.c
|
- vf_pp.c
|
||||||
- vf_pullup.c
|
|
||||||
- vf_sab.c
|
|
||||||
- vf_smartblur.c
|
- vf_smartblur.c
|
||||||
- vf_spp.c
|
|
||||||
- vf_stereo3d.c
|
- vf_stereo3d.c
|
||||||
- vf_super2xsai.c
|
- vf_super2xsai.c
|
||||||
- vf_tinterlace.c
|
- vf_tinterlace.c
|
||||||
@@ -74,15 +69,8 @@ affect the licensing of binaries resulting from the combination.
|
|||||||
compatible libraries
|
compatible libraries
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
The following libraries are under GPL:
|
The libcdio, libx264, libxavs and libxvid libraries are under GPL. When
|
||||||
- frei0r
|
combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by
|
||||||
- libcdio
|
|
||||||
- libutvideo
|
|
||||||
- libvidstab
|
|
||||||
- libx264
|
|
||||||
- libxavs
|
|
||||||
- libxvid
|
|
||||||
When combining them with FFmpeg, FFmpeg needs to be licensed as GPL as well by
|
|
||||||
passing --enable-gpl to configure.
|
passing --enable-gpl to configure.
|
||||||
|
|
||||||
The OpenCORE and VisualOn libraries are under the Apache License 2.0. That
|
The OpenCORE and VisualOn libraries are under the Apache License 2.0. That
|
||||||
|
|||||||
+28
-90
@@ -7,14 +7,13 @@ FFmpeg code.
|
|||||||
Please try to keep entries where you are the maintainer up to date!
|
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.
|
Names in () mean that the maintainer currently has no time to maintain the code.
|
||||||
A (CC <address>) after the name means that the maintainer prefers to be CC-ed on
|
A CC after the name means that the maintainer prefers to be CC-ed on patches
|
||||||
patches and related discussions.
|
and related discussions.
|
||||||
|
|
||||||
|
|
||||||
Project Leader
|
Project Leader
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Michael Niedermayer
|
|
||||||
final design decisions
|
final design decisions
|
||||||
|
|
||||||
|
|
||||||
@@ -43,24 +42,16 @@ QuickTime faststart:
|
|||||||
Miscellaneous Areas
|
Miscellaneous Areas
|
||||||
===================
|
===================
|
||||||
|
|
||||||
documentation Stefano Sabatini, Mike Melanson, Timothy Gu
|
documentation Mike Melanson
|
||||||
|
website Robert Swain, Lou Logan
|
||||||
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, Alexander Strasser
|
project server Árpád Gereöffy, Michael Niedermayer, Reimar Döffinger
|
||||||
|
mailinglists Michael Niedermayer, Baptiste Coudurier, Lou Logan
|
||||||
presets Robert Swain
|
presets Robert Swain
|
||||||
metadata subsystem Aurelien Jacobs
|
metadata subsystem Aurelien Jacobs
|
||||||
release management Michael Niedermayer
|
release management Michael Niedermayer
|
||||||
|
|
||||||
|
|
||||||
Communication
|
|
||||||
=============
|
|
||||||
|
|
||||||
website Robert Swain, Lou Logan
|
|
||||||
mailinglists Michael Niedermayer, Baptiste Coudurier, Lou Logan
|
|
||||||
Google+ Paul B Mahol, Michael Niedermayer, Alexander Strasser
|
|
||||||
Twitter Lou Logan
|
|
||||||
Launchpad Timothy Gu
|
|
||||||
|
|
||||||
|
|
||||||
libavutil
|
libavutil
|
||||||
=========
|
=========
|
||||||
|
|
||||||
@@ -70,23 +61,11 @@ Internal Interfaces:
|
|||||||
libavutil/common.h Michael Niedermayer
|
libavutil/common.h Michael Niedermayer
|
||||||
|
|
||||||
Other:
|
Other:
|
||||||
bprint Nicolas George
|
|
||||||
bswap.h
|
|
||||||
des Reimar Doeffinger
|
|
||||||
eval.c, eval.h Michael Niedermayer
|
|
||||||
float_dsp Loren Merritt
|
|
||||||
hash Reimar Doeffinger
|
|
||||||
intfloat* Michael Niedermayer
|
intfloat* Michael Niedermayer
|
||||||
integer.c, integer.h Michael Niedermayer
|
|
||||||
lzo Reimar Doeffinger
|
|
||||||
mathematics.c, mathematics.h Michael Niedermayer
|
|
||||||
mem.c, mem.h Michael Niedermayer
|
|
||||||
opencl.c, opencl.h Wei Gao
|
|
||||||
opt.c, opt.h Michael Niedermayer
|
|
||||||
rational.c, rational.h Michael Niedermayer
|
rational.c, rational.h Michael Niedermayer
|
||||||
rc4 Reimar Doeffinger
|
mathematics.c, mathematics.h Michael Niedermayer
|
||||||
ripemd.c, ripemd.h James Almer
|
integer.c, integer.h Michael Niedermayer
|
||||||
timecode Clément Bœsch
|
bswap.h
|
||||||
|
|
||||||
|
|
||||||
libavcodec
|
libavcodec
|
||||||
@@ -97,6 +76,10 @@ Generic Parts:
|
|||||||
avcodec.h Michael Niedermayer
|
avcodec.h Michael Niedermayer
|
||||||
utility code:
|
utility code:
|
||||||
utils.c Michael Niedermayer
|
utils.c Michael Niedermayer
|
||||||
|
mem.c Michael Niedermayer
|
||||||
|
opt.c, opt.h Michael Niedermayer
|
||||||
|
arithmetic expression evaluator:
|
||||||
|
eval.c Michael Niedermayer
|
||||||
audio and video frame extraction:
|
audio and video frame extraction:
|
||||||
parser.c Michael Niedermayer
|
parser.c Michael Niedermayer
|
||||||
bitstream reading:
|
bitstream reading:
|
||||||
@@ -127,8 +110,6 @@ Generic Parts:
|
|||||||
libpostproc/* Michael Niedermayer
|
libpostproc/* Michael Niedermayer
|
||||||
table generation:
|
table generation:
|
||||||
tableprint.c, tableprint.h Reimar Doeffinger
|
tableprint.c, tableprint.h Reimar Doeffinger
|
||||||
fixed point FFT:
|
|
||||||
fft* Zeljko Lukac
|
|
||||||
|
|
||||||
Codecs:
|
Codecs:
|
||||||
4xm.c Michael Niedermayer
|
4xm.c Michael Niedermayer
|
||||||
@@ -147,8 +128,8 @@ Codecs:
|
|||||||
binkaudio.c Peter Ross
|
binkaudio.c Peter Ross
|
||||||
bmp.c Mans Rullgard, Kostya Shishkov
|
bmp.c Mans Rullgard, Kostya Shishkov
|
||||||
cavs* Stefan Gehrer
|
cavs* Stefan Gehrer
|
||||||
cdxl.c Paul B Mahol
|
|
||||||
celp_filters.* Vitor Sessak
|
celp_filters.* Vitor Sessak
|
||||||
|
cdxl.c Paul B Mahol
|
||||||
cinepak.c Roberto Togni
|
cinepak.c Roberto Togni
|
||||||
cljr Alex Beregszaszi
|
cljr Alex Beregszaszi
|
||||||
cllc.c Derek Buitenhuis
|
cllc.c Derek Buitenhuis
|
||||||
@@ -159,10 +140,9 @@ Codecs:
|
|||||||
dca.c Kostya Shishkov, Benjamin Larsson
|
dca.c Kostya Shishkov, Benjamin Larsson
|
||||||
dnxhd* Baptiste Coudurier
|
dnxhd* Baptiste Coudurier
|
||||||
dpcm.c Mike Melanson
|
dpcm.c Mike Melanson
|
||||||
dv.c Roman Shaposhnik
|
|
||||||
dxa.c Kostya Shishkov
|
dxa.c Kostya Shishkov
|
||||||
|
dv.c Roman Shaposhnik
|
||||||
eacmv*, eaidct*, eat* Peter Ross
|
eacmv*, eaidct*, eat* Peter Ross
|
||||||
exif.c, exif.h Thilo Borgmann
|
|
||||||
ffv1.c Michael Niedermayer
|
ffv1.c Michael Niedermayer
|
||||||
ffwavesynth.c Nicolas George
|
ffwavesynth.c Nicolas George
|
||||||
flac* Justin Ruggles
|
flac* Justin Ruggles
|
||||||
@@ -171,9 +151,9 @@ Codecs:
|
|||||||
g722.c Martin Storsjo
|
g722.c Martin Storsjo
|
||||||
g726.c Roman Shaposhnik
|
g726.c Roman Shaposhnik
|
||||||
gifdec.c Baptiste Coudurier
|
gifdec.c Baptiste Coudurier
|
||||||
|
h264* Loren Merritt, Michael Niedermayer
|
||||||
h261* Michael Niedermayer
|
h261* Michael Niedermayer
|
||||||
h263* Michael Niedermayer
|
h263* Michael Niedermayer
|
||||||
h264* Loren Merritt, Michael Niedermayer
|
|
||||||
huffyuv.c Michael Niedermayer
|
huffyuv.c Michael Niedermayer
|
||||||
idcinvideo.c Mike Melanson
|
idcinvideo.c Mike Melanson
|
||||||
imc* Benjamin Larsson
|
imc* Benjamin Larsson
|
||||||
@@ -182,14 +162,13 @@ Codecs:
|
|||||||
interplayvideo.c Mike Melanson
|
interplayvideo.c Mike Melanson
|
||||||
ivi* Kostya Shishkov
|
ivi* Kostya Shishkov
|
||||||
jacosub* Clément Bœsch
|
jacosub* Clément Bœsch
|
||||||
jpeg2000* Nicolas Bertrand
|
|
||||||
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
|
libcelt_dec.c Nicolas George
|
||||||
libdirac* David Conrad
|
|
||||||
libgsm.c Michel Bardiaux
|
libgsm.c Michel Bardiaux
|
||||||
|
libdirac* David Conrad
|
||||||
libopenjpeg.c Jaikrishnan Menon
|
libopenjpeg.c Jaikrishnan Menon
|
||||||
libopenjpegenc.c Michael Bradshaw
|
libopenjpegenc.c Michael Bradshaw
|
||||||
libschroedinger* David Conrad
|
libschroedinger* David Conrad
|
||||||
@@ -197,8 +176,8 @@ Codecs:
|
|||||||
libtheoraenc.c David Conrad
|
libtheoraenc.c David Conrad
|
||||||
libutvideo* Derek Buitenhuis
|
libutvideo* Derek Buitenhuis
|
||||||
libvorbis.c David Conrad
|
libvorbis.c David Conrad
|
||||||
libx264.c Mans Rullgard, Jason Garrett-Glaser
|
|
||||||
libxavs.c Stefan Gehrer
|
libxavs.c Stefan Gehrer
|
||||||
|
libx264.c Mans Rullgard, Jason Garrett-Glaser
|
||||||
loco.c Kostya Shishkov
|
loco.c Kostya Shishkov
|
||||||
lzo.h, lzo.c Reimar Doeffinger
|
lzo.h, lzo.c Reimar Doeffinger
|
||||||
mdec.c Michael Niedermayer
|
mdec.c Michael Niedermayer
|
||||||
@@ -209,7 +188,6 @@ Codecs:
|
|||||||
mpc* Kostya Shishkov
|
mpc* Kostya Shishkov
|
||||||
mpeg12.c, mpeg12data.h Michael Niedermayer
|
mpeg12.c, mpeg12data.h Michael Niedermayer
|
||||||
mpegvideo.c, mpegvideo.h Michael Niedermayer
|
mpegvideo.c, mpegvideo.h Michael Niedermayer
|
||||||
mqc* Nicolas Bertrand
|
|
||||||
msmpeg4.c, msmpeg4data.h Michael Niedermayer
|
msmpeg4.c, msmpeg4data.h Michael Niedermayer
|
||||||
msrle.c Mike Melanson
|
msrle.c Mike Melanson
|
||||||
msvideo1.c Mike Melanson
|
msvideo1.c Mike Melanson
|
||||||
@@ -235,7 +213,6 @@ Codecs:
|
|||||||
s3tc* Ivo van Poorten
|
s3tc* Ivo van Poorten
|
||||||
smacker.c Kostya Shishkov
|
smacker.c Kostya Shishkov
|
||||||
smc.c Mike Melanson
|
smc.c Mike Melanson
|
||||||
smvjpegdec.c Ash Hughes
|
|
||||||
snow.c Michael Niedermayer, Loren Merritt
|
snow.c Michael Niedermayer, Loren Merritt
|
||||||
sonic.c Alex Beregszaszi
|
sonic.c Alex Beregszaszi
|
||||||
srt* Aurelien Jacobs
|
srt* Aurelien Jacobs
|
||||||
@@ -249,7 +226,6 @@ Codecs:
|
|||||||
truespeech.c Kostya Shishkov
|
truespeech.c Kostya Shishkov
|
||||||
tscc.c Kostya Shishkov
|
tscc.c Kostya Shishkov
|
||||||
tta.c Alex Beregszaszi, Jaikrishnan Menon
|
tta.c Alex Beregszaszi, Jaikrishnan Menon
|
||||||
ttaenc.c Paul B Mahol
|
|
||||||
txd.c Ivo van Poorten
|
txd.c Ivo van Poorten
|
||||||
ulti* Kostya Shishkov
|
ulti* Kostya Shishkov
|
||||||
v410*.c Derek Buitenhuis
|
v410*.c Derek Buitenhuis
|
||||||
@@ -260,8 +236,8 @@ Codecs:
|
|||||||
vda_h264_dec.c Xidorn Quan
|
vda_h264_dec.c Xidorn Quan
|
||||||
vima.c Paul B Mahol
|
vima.c Paul B Mahol
|
||||||
vmnc.c Kostya Shishkov
|
vmnc.c Kostya Shishkov
|
||||||
vorbis_dec.c Denes Balatoni, David Conrad
|
|
||||||
vorbis_enc.c Oded Shimon
|
vorbis_enc.c Oded Shimon
|
||||||
|
vorbis_dec.c Denes Balatoni, David Conrad
|
||||||
vp3* Mike Melanson
|
vp3* Mike Melanson
|
||||||
vp5 Aurelien Jacobs
|
vp5 Aurelien Jacobs
|
||||||
vp6 Aurelien Jacobs
|
vp6 Aurelien Jacobs
|
||||||
@@ -274,7 +250,6 @@ Codecs:
|
|||||||
wnv1.c Kostya Shishkov
|
wnv1.c Kostya Shishkov
|
||||||
xan.c Mike Melanson
|
xan.c Mike Melanson
|
||||||
xbm* Paul B Mahol
|
xbm* Paul B Mahol
|
||||||
xface Stefano Sabatini
|
|
||||||
xl.c Kostya Shishkov
|
xl.c Kostya Shishkov
|
||||||
xvmc.c Ivan Kalvachev
|
xvmc.c Ivan Kalvachev
|
||||||
xwd* Paul B Mahol
|
xwd* Paul B Mahol
|
||||||
@@ -296,15 +271,11 @@ libavdevice
|
|||||||
libavdevice/avdevice.h
|
libavdevice/avdevice.h
|
||||||
|
|
||||||
|
|
||||||
dshow.c Roger Pack
|
|
||||||
fbdev_enc.c Lukasz Marek
|
|
||||||
iec61883.c Georg Lippitsch
|
iec61883.c Georg Lippitsch
|
||||||
lavfi Stefano Sabatini
|
|
||||||
libdc1394.c Roman Shaposhnik
|
libdc1394.c Roman Shaposhnik
|
||||||
pulse_audio_enc.c Lukasz Marek
|
|
||||||
sdl Stefano Sabatini
|
|
||||||
v4l2.c Luca Abeni
|
v4l2.c Luca Abeni
|
||||||
vfwcap.c Ramiro Polla
|
vfwcap.c Ramiro Polla
|
||||||
|
dshow.c Roger Pack
|
||||||
|
|
||||||
libavfilter
|
libavfilter
|
||||||
===========
|
===========
|
||||||
@@ -313,33 +284,10 @@ Generic parts:
|
|||||||
graphdump.c Nicolas George
|
graphdump.c Nicolas George
|
||||||
|
|
||||||
Filters:
|
Filters:
|
||||||
af_adelay.c Paul B Mahol
|
|
||||||
af_aecho.c Paul B Mahol
|
|
||||||
af_afade.c Paul B Mahol
|
|
||||||
af_amerge.c Nicolas George
|
af_amerge.c Nicolas George
|
||||||
af_aphaser.c Paul B Mahol
|
|
||||||
af_aresample.c Michael Niedermayer
|
|
||||||
af_astats.c Paul B Mahol
|
|
||||||
af_astreamsync.c Nicolas George
|
af_astreamsync.c Nicolas George
|
||||||
af_atempo.c Pavel Koshevoy
|
af_atempo.c Pavel Koshevoy
|
||||||
af_biquads.c Paul B Mahol
|
|
||||||
af_compand.c Paul B Mahol
|
|
||||||
af_ladspa.c Paul B Mahol
|
|
||||||
af_pan.c Nicolas George
|
af_pan.c Nicolas George
|
||||||
avf_avectorscope.c Paul B Mahol
|
|
||||||
vf_blend.c Paul B Mahol
|
|
||||||
vf_colorbalance.c Paul B Mahol
|
|
||||||
vf_delogo.c Jean Delvare (CC <khali@linux-fr.org>)
|
|
||||||
vf_drawbox.c/drawgrid Andrey Utkin
|
|
||||||
vf_extractplanes.c Paul B Mahol
|
|
||||||
vf_histogram.c Paul B Mahol
|
|
||||||
vf_il.c Paul B Mahol
|
|
||||||
vf_mergeplanes.c Paul B Mahol
|
|
||||||
vf_psnr.c Paul B Mahol
|
|
||||||
vf_scale.c Michael Niedermayer
|
|
||||||
vf_separatefields.c Paul B Mahol
|
|
||||||
vf_stereo3d.c Paul B Mahol
|
|
||||||
vf_telecine.c Paul B Mahol
|
|
||||||
vf_yadif.c Michael Niedermayer
|
vf_yadif.c Michael Niedermayer
|
||||||
|
|
||||||
Sources:
|
Sources:
|
||||||
@@ -359,14 +307,12 @@ Muxers/Demuxers:
|
|||||||
4xm.c Mike Melanson
|
4xm.c Mike Melanson
|
||||||
adtsenc.c Robert Swain
|
adtsenc.c Robert Swain
|
||||||
afc.c Paul B Mahol
|
afc.c Paul B Mahol
|
||||||
aiffdec.c Baptiste Coudurier, Matthieu Bouron
|
aiff.c Baptiste Coudurier
|
||||||
aiffenc.c Baptiste Coudurier, Matthieu Bouron
|
|
||||||
ape.c Kostya Shishkov
|
ape.c Kostya Shishkov
|
||||||
ass* Aurelien Jacobs
|
ass* Aurelien Jacobs
|
||||||
astdec.c Paul B Mahol
|
astdec.c Paul B Mahol
|
||||||
astenc.c James Almer
|
astenc.c James Almer
|
||||||
avi* Michael Niedermayer
|
avi* Michael Niedermayer
|
||||||
avisynth.c AvxSynth Team (avxsynth.testing at gmail dot com)
|
|
||||||
avr.c Paul B Mahol
|
avr.c Paul B Mahol
|
||||||
bink.c Peter Ross
|
bink.c Peter Ross
|
||||||
brstm.c Paul B Mahol
|
brstm.c Paul B Mahol
|
||||||
@@ -388,8 +334,8 @@ Muxers/Demuxers:
|
|||||||
idcin.c Mike Melanson
|
idcin.c Mike Melanson
|
||||||
idroqdec.c Mike Melanson
|
idroqdec.c Mike Melanson
|
||||||
iff.c Jaikrishnan Menon
|
iff.c Jaikrishnan Menon
|
||||||
img2*.c Michael Niedermayer
|
|
||||||
ipmovie.c Mike Melanson
|
ipmovie.c Mike Melanson
|
||||||
|
img2*.c Michael Niedermayer
|
||||||
ircam* Paul B Mahol
|
ircam* Paul B Mahol
|
||||||
iss.c Stefan Gehrer
|
iss.c Stefan Gehrer
|
||||||
jacosub* Clément Bœsch
|
jacosub* Clément Bœsch
|
||||||
@@ -403,11 +349,11 @@ Muxers/Demuxers:
|
|||||||
matroskadec.c Aurelien Jacobs
|
matroskadec.c Aurelien Jacobs
|
||||||
matroskaenc.c David Conrad
|
matroskaenc.c David Conrad
|
||||||
metadata* Aurelien Jacobs
|
metadata* Aurelien Jacobs
|
||||||
mgsts.c Paul B Mahol
|
|
||||||
microdvd* Aurelien Jacobs
|
microdvd* Aurelien Jacobs
|
||||||
|
mgsts.c Paul B Mahol
|
||||||
mm.c Peter Ross
|
mm.c Peter Ross
|
||||||
mov.c Michael Niedermayer, Baptiste Coudurier
|
mov.c Michael Niedermayer, Baptiste Coudurier
|
||||||
movenc.c Baptiste Coudurier, Matthieu Bouron
|
movenc.c Michael Niedermayer, Baptiste Coudurier
|
||||||
mpc.c Kostya Shishkov
|
mpc.c Kostya Shishkov
|
||||||
mpeg.c Michael Niedermayer
|
mpeg.c Michael Niedermayer
|
||||||
mpegenc.c Michael Niedermayer
|
mpegenc.c Michael Niedermayer
|
||||||
@@ -452,7 +398,6 @@ Muxers/Demuxers:
|
|||||||
voc.c Aurelien Jacobs
|
voc.c Aurelien Jacobs
|
||||||
wav.c Michael Niedermayer
|
wav.c Michael Niedermayer
|
||||||
wc3movie.c Mike Melanson
|
wc3movie.c Mike Melanson
|
||||||
webvtt* Matthew J Heaney
|
|
||||||
westwood.c Mike Melanson
|
westwood.c Mike Melanson
|
||||||
wtv.c Peter Ross
|
wtv.c Peter Ross
|
||||||
wv.c Kostya Shishkov
|
wv.c Kostya Shishkov
|
||||||
@@ -460,9 +405,7 @@ Muxers/Demuxers:
|
|||||||
|
|
||||||
Protocols:
|
Protocols:
|
||||||
bluray.c Petri Hintukainen
|
bluray.c Petri Hintukainen
|
||||||
ftp.c Lukasz Marek
|
|
||||||
http.c Ronald S. Bultje
|
http.c Ronald S. Bultje
|
||||||
libssh.c Lukasz Marek
|
|
||||||
mms*.c Ronald S. Bultje
|
mms*.c Ronald S. Bultje
|
||||||
udp.c Luca Abeni
|
udp.c Luca Abeni
|
||||||
|
|
||||||
@@ -487,7 +430,7 @@ Operating systems / CPU architectures
|
|||||||
Alpha Mans Rullgard, Falk Hueffner
|
Alpha Mans Rullgard, Falk Hueffner
|
||||||
ARM Mans Rullgard
|
ARM Mans Rullgard
|
||||||
AVR32 Mans Rullgard
|
AVR32 Mans Rullgard
|
||||||
MIPS Mans Rullgard, Nedeljko Babic
|
MIPS Mans Rullgard
|
||||||
Mac OS X / PowerPC Romain Dolbeau, Guillaume Poirier
|
Mac OS X / PowerPC Romain Dolbeau, Guillaume Poirier
|
||||||
Amiga / PowerPC Colin Ward
|
Amiga / PowerPC Colin Ward
|
||||||
Linux / PowerPC Luca Barbato
|
Linux / PowerPC Luca Barbato
|
||||||
@@ -501,19 +444,17 @@ x86 Michael Niedermayer
|
|||||||
Releases
|
Releases
|
||||||
========
|
========
|
||||||
|
|
||||||
2.1 Michael Niedermayer
|
1.2 Michael Niedermayer
|
||||||
2.0 Michael Niedermayer
|
1.1 Michael Niedermayer
|
||||||
|
1.0 Michael Niedermayer
|
||||||
|
|
||||||
If you want to maintain an older release, please contact us
|
|
||||||
|
|
||||||
|
|
||||||
GnuPG Fingerprints of maintainers and contributors
|
GnuPG Fingerprints of maintainers and contributors
|
||||||
==================================================
|
==================================================
|
||||||
|
|
||||||
Alexander Strasser 1C96 78B7 83CB 8AA7 9AF5 D1EB A7D8 A57B A876 E58F
|
|
||||||
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
|
||||||
Ash Hughes 694D 43D2 D180 C7C7 6421 ABD3 A641 D0B7 623D 6029
|
|
||||||
Attila Kinali 11F0 F9A6 A1D2 11F6 C745 D10C 6520 BCDD F2DF E765
|
Attila Kinali 11F0 F9A6 A1D2 11F6 C745 D10C 6520 BCDD F2DF E765
|
||||||
Baptiste Coudurier 8D77 134D 20CC 9220 201F C5DB 0AC9 325C 5C1A BAAA
|
Baptiste Coudurier 8D77 134D 20CC 9220 201F C5DB 0AC9 325C 5C1A BAAA
|
||||||
Ben Littler 3EE3 3723 E560 3214 A8CD 4DEB 2CDB FCE7 768C 8D2C
|
Ben Littler 3EE3 3723 E560 3214 A8CD 4DEB 2CDB FCE7 768C 8D2C
|
||||||
@@ -521,10 +462,8 @@ Benoit Fouet B22A 4F4F 43EF 636B BB66 FCDC 0023 AE1E 2985 49C8
|
|||||||
Bœsch Clément 52D0 3A82 D445 F194 DB8B 2B16 87EE 2CB8 F4B8 FCF9
|
Bœsch Clément 52D0 3A82 D445 F194 DB8B 2B16 87EE 2CB8 F4B8 FCF9
|
||||||
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
|
||||||
FFmpeg release signing key FCF9 86EA 15E6 E293 A564 4F10 B432 2F04 D676 58D8
|
|
||||||
Gwenole Beauchesne 2E63 B3A6 3E44 37E2 017D 2704 53C7 6266 B153 99C4
|
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
|
||||||
Jean Delvare 7CA6 9F44 60F1 BDC4 1FD2 C858 A552 6B9B B3CD 4E6A
|
|
||||||
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
|
Lou Logan 7D68 DC73 CBEF EABB 671A B6CF 621C 2E28 82F8 DC3A
|
||||||
@@ -541,4 +480,3 @@ Sascha Sommer 38A0 F88B 868E 9D3A 97D4 D6A0 E823 706F 1E07 0D3C
|
|||||||
Stefano Sabatini 0D0B AD6B 5330 BBAD D3D6 6A0C 719C 2839 FC43 2D5F
|
Stefano Sabatini 0D0B AD6B 5330 BBAD D3D6 6A0C 719C 2839 FC43 2D5F
|
||||||
Stephan Hilb 4F38 0B3A 5F39 B99B F505 E562 8D5C 5554 4E17 8863
|
Stephan Hilb 4F38 0B3A 5F39 B99B F505 E562 8D5C 5554 4E17 8863
|
||||||
Tomas Härdin A79D 4E3D F38F 763F 91F5 8B33 A01E 8AE0 41BB 2551
|
Tomas Härdin A79D 4E3D F38F 763F 91F5 8B33 A01E 8AE0 41BB 2551
|
||||||
Wei Gao 4269 7741 857A 0E60 9EC5 08D2 4744 4EFA 62C1 87B9
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ INSTPROGS = $(PROGS-yes:%=%$(PROGSSUF)$(EXESUF))
|
|||||||
|
|
||||||
OBJS = cmdutils.o $(EXEOBJS)
|
OBJS = cmdutils.o $(EXEOBJS)
|
||||||
OBJS-ffmpeg = ffmpeg_opt.o ffmpeg_filter.o
|
OBJS-ffmpeg = ffmpeg_opt.o ffmpeg_filter.o
|
||||||
TESTTOOLS = audiogen videogen rotozoom tiny_psnr tiny_ssim base64
|
TESTTOOLS = audiogen videogen rotozoom tiny_psnr base64
|
||||||
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
|
HOSTPROGS := $(TESTTOOLS:%=tests/%) doc/print_options
|
||||||
TOOLS = qt-faststart trasher
|
TOOLS = qt-faststart trasher
|
||||||
TOOLS-$(CONFIG_ZLIB) += cws2fws
|
TOOLS-$(CONFIG_ZLIB) += cws2fws
|
||||||
@@ -28,6 +28,7 @@ TOOLS-$(CONFIG_ZLIB) += cws2fws
|
|||||||
BASENAMES = ffmpeg ffplay ffprobe ffserver
|
BASENAMES = ffmpeg ffplay ffprobe ffserver
|
||||||
ALLPROGS = $(BASENAMES:%=%$(PROGSSUF)$(EXESUF))
|
ALLPROGS = $(BASENAMES:%=%$(PROGSSUF)$(EXESUF))
|
||||||
ALLPROGS_G = $(BASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
|
ALLPROGS_G = $(BASENAMES:%=%$(PROGSSUF)_g$(EXESUF))
|
||||||
|
ALLMANPAGES = $(BASENAMES:%=%.1)
|
||||||
|
|
||||||
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
|
FFLIBS-$(CONFIG_AVDEVICE) += avdevice
|
||||||
FFLIBS-$(CONFIG_AVFILTER) += avfilter
|
FFLIBS-$(CONFIG_AVFILTER) += avfilter
|
||||||
@@ -43,7 +44,7 @@ FFLIBS := avutil
|
|||||||
DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.ffpreset) $(SRC_PATH)/doc/ffprobe.xsd
|
DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.ffpreset) $(SRC_PATH)/doc/ffprobe.xsd
|
||||||
EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/Makefile $(SRC_PATH)/doc/examples/README
|
EXAMPLES_FILES := $(wildcard $(SRC_PATH)/doc/examples/*.c) $(SRC_PATH)/doc/examples/Makefile $(SRC_PATH)/doc/examples/README
|
||||||
|
|
||||||
SKIPHEADERS = cmdutils_common_opts.h compat/w32pthreads.h
|
SKIPHEADERS = cmdutils_common_opts.h
|
||||||
|
|
||||||
include $(SRC_PATH)/common.mak
|
include $(SRC_PATH)/common.mak
|
||||||
|
|
||||||
@@ -153,16 +154,25 @@ clean::
|
|||||||
$(RM) $(ALLPROGS) $(ALLPROGS_G)
|
$(RM) $(ALLPROGS) $(ALLPROGS_G)
|
||||||
$(RM) $(CLEANSUFFIXES)
|
$(RM) $(CLEANSUFFIXES)
|
||||||
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
$(RM) $(CLEANSUFFIXES:%=tools/%)
|
||||||
|
$(RM) coverage.info
|
||||||
$(RM) -r coverage-html
|
$(RM) -r coverage-html
|
||||||
$(RM) -rf coverage.info lcov
|
|
||||||
|
|
||||||
distclean::
|
distclean::
|
||||||
$(RM) $(DISTCLEANSUFFIXES)
|
$(RM) $(DISTCLEANSUFFIXES)
|
||||||
$(RM) config.* .config libavutil/avconfig.h .version version.h libavcodec/codec_names.h
|
$(RM) config.* .version version.h libavutil/avconfig.h libavcodec/codec_names.h
|
||||||
|
|
||||||
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
|
||||||
|
coverage.info: $(wildcard *.gcda *.gcno */*.gcda */*.gcno */*/*.gcda */*/*.gcno)
|
||||||
|
$(Q)lcov -c -d . -b . | sed -e 's#/./#/#g' > $@
|
||||||
|
|
||||||
|
coverage-html: coverage.info
|
||||||
|
$(Q)mkdir -p $@
|
||||||
|
$(Q)genhtml -o $@ $<
|
||||||
|
$(Q)touch $@
|
||||||
|
|
||||||
check: all alltools examples testprogs fate
|
check: all alltools examples testprogs fate
|
||||||
|
|
||||||
include $(SRC_PATH)/doc/Makefile
|
include $(SRC_PATH)/doc/Makefile
|
||||||
|
|||||||
+194
-205
@@ -36,7 +36,9 @@
|
|||||||
#include "libavresample/avresample.h"
|
#include "libavresample/avresample.h"
|
||||||
#include "libswscale/swscale.h"
|
#include "libswscale/swscale.h"
|
||||||
#include "libswresample/swresample.h"
|
#include "libswresample/swresample.h"
|
||||||
|
#if CONFIG_POSTPROC
|
||||||
#include "libpostproc/postprocess.h"
|
#include "libpostproc/postprocess.h"
|
||||||
|
#endif
|
||||||
#include "libavutil/avassert.h"
|
#include "libavutil/avassert.h"
|
||||||
#include "libavutil/avstring.h"
|
#include "libavutil/avstring.h"
|
||||||
#include "libavutil/bprint.h"
|
#include "libavutil/bprint.h"
|
||||||
@@ -47,7 +49,6 @@
|
|||||||
#include "libavutil/eval.h"
|
#include "libavutil/eval.h"
|
||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
#include "libavutil/cpu.h"
|
|
||||||
#include "cmdutils.h"
|
#include "cmdutils.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
#if CONFIG_NETWORK
|
#if CONFIG_NETWORK
|
||||||
@@ -57,10 +58,6 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_OPENCL
|
|
||||||
#include "libavutil/opencl.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static int init_report(const char *env);
|
static int init_report(const char *env);
|
||||||
|
|
||||||
@@ -68,7 +65,7 @@ struct SwsContext *sws_opts;
|
|||||||
AVDictionary *swr_opts;
|
AVDictionary *swr_opts;
|
||||||
AVDictionary *format_opts, *codec_opts, *resample_opts;
|
AVDictionary *format_opts, *codec_opts, *resample_opts;
|
||||||
|
|
||||||
const int this_year = 2013;
|
const int this_year = 2015;
|
||||||
|
|
||||||
static FILE *report_file;
|
static FILE *report_file;
|
||||||
|
|
||||||
@@ -112,21 +109,6 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v
|
|||||||
fflush(report_file);
|
fflush(report_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void (*program_exit)(int ret);
|
|
||||||
|
|
||||||
void register_exit(void (*cb)(int ret))
|
|
||||||
{
|
|
||||||
program_exit = cb;
|
|
||||||
}
|
|
||||||
|
|
||||||
void exit_program(int ret)
|
|
||||||
{
|
|
||||||
if (program_exit)
|
|
||||||
program_exit(ret);
|
|
||||||
|
|
||||||
exit(ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
@@ -144,7 +126,7 @@ double parse_number_or_die(const char *context, const char *numstr, int type,
|
|||||||
else
|
else
|
||||||
return d;
|
return d;
|
||||||
av_log(NULL, AV_LOG_FATAL, error, context, numstr, min, max);
|
av_log(NULL, AV_LOG_FATAL, error, context, numstr, min, max);
|
||||||
exit_program(1);
|
exit(1);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,7 +137,7 @@ int64_t parse_time_or_die(const char *context, const char *timestr,
|
|||||||
if (av_parse_time(&us, timestr, is_duration) < 0) {
|
if (av_parse_time(&us, timestr, is_duration) < 0) {
|
||||||
av_log(NULL, AV_LOG_FATAL, "Invalid %s specification for %s: %s\n",
|
av_log(NULL, AV_LOG_FATAL, "Invalid %s specification for %s: %s\n",
|
||||||
is_duration ? "duration" : "date", context, timestr);
|
is_duration ? "duration" : "date", context, timestr);
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
return us;
|
return us;
|
||||||
}
|
}
|
||||||
@@ -214,10 +196,7 @@ static const OptionDef *find_option(const OptionDef *po, const char *name)
|
|||||||
return po;
|
return po;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* _WIN32 means using the windows libc - cygwin doesn't define that
|
#if HAVE_COMMANDLINETOARGVW
|
||||||
* by default. HAVE_COMMANDLINETOARGVW is true on cygwin, while
|
|
||||||
* it doesn't provide the actual command line via GetCommandLineW(). */
|
|
||||||
#if HAVE_COMMANDLINETOARGVW && defined(_WIN32)
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <shellapi.h>
|
#include <shellapi.h>
|
||||||
/* Will be leaked on exit */
|
/* Will be leaked on exit */
|
||||||
@@ -301,7 +280,7 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
|
|||||||
if (po->flags & OPT_STRING) {
|
if (po->flags & OPT_STRING) {
|
||||||
char *str;
|
char *str;
|
||||||
str = av_strdup(arg);
|
str = av_strdup(arg);
|
||||||
av_freep(dst);
|
// av_freep(dst);
|
||||||
*(char **)dst = str;
|
*(char **)dst = str;
|
||||||
} else if (po->flags & OPT_BOOL || po->flags & OPT_INT) {
|
} else if (po->flags & OPT_BOOL || po->flags & OPT_INT) {
|
||||||
*(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
|
*(int *)dst = parse_number_or_die(opt, arg, OPT_INT64, INT_MIN, INT_MAX);
|
||||||
@@ -317,13 +296,12 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
|
|||||||
int ret = po->u.func_arg(optctx, opt, arg);
|
int ret = po->u.func_arg(optctx, opt, arg);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(NULL, AV_LOG_ERROR,
|
av_log(NULL, AV_LOG_ERROR,
|
||||||
"Failed to set value '%s' for option '%s': %s\n",
|
"Failed to set value '%s' for option '%s'\n", arg, opt);
|
||||||
arg, opt, av_err2str(ret));
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (po->flags & OPT_EXIT)
|
if (po->flags & OPT_EXIT)
|
||||||
exit_program(0);
|
exit(0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -383,7 +361,7 @@ void parse_options(void *optctx, int argc, char **argv, const OptionDef *options
|
|||||||
opt++;
|
opt++;
|
||||||
|
|
||||||
if ((ret = parse_option(optctx, opt, argv[optindex], options)) < 0)
|
if ((ret = parse_option(optctx, opt, argv[optindex], options)) < 0)
|
||||||
exit_program(1);
|
exit(1);
|
||||||
optindex += ret;
|
optindex += ret;
|
||||||
} else {
|
} else {
|
||||||
if (parse_arg_function)
|
if (parse_arg_function)
|
||||||
@@ -402,16 +380,6 @@ int parse_optgroup(void *optctx, OptionGroup *g)
|
|||||||
for (i = 0; i < g->nb_opts; i++) {
|
for (i = 0; i < g->nb_opts; i++) {
|
||||||
Option *o = &g->opts[i];
|
Option *o = &g->opts[i];
|
||||||
|
|
||||||
if (g->group_def->flags &&
|
|
||||||
!(g->group_def->flags & o->opt->flags)) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Option %s (%s) cannot be applied to "
|
|
||||||
"%s %s -- you are trying to apply an input option to an "
|
|
||||||
"output file or vice versa. Move this option before the "
|
|
||||||
"file it belongs to.\n", o->key, o->opt->help,
|
|
||||||
g->group_def->name, g->arg);
|
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
av_log(NULL, AV_LOG_DEBUG, "Applying option %s (%s) with argument %s.\n",
|
av_log(NULL, AV_LOG_DEBUG, "Applying option %s (%s) with argument %s.\n",
|
||||||
o->key, o->opt->help, o->val);
|
o->key, o->opt->help, o->val);
|
||||||
|
|
||||||
@@ -498,15 +466,6 @@ void parse_loglevel(int argc, char **argv, const OptionDef *options)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const AVOption *opt_find(void *obj, const char *name, const char *unit,
|
|
||||||
int opt_flags, int search_flags)
|
|
||||||
{
|
|
||||||
const AVOption *o = av_opt_find(obj, name, unit, opt_flags, search_flags);
|
|
||||||
if(o && !o->flags)
|
|
||||||
return NULL;
|
|
||||||
return o;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define FLAGS (o->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
|
#define FLAGS (o->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
|
||||||
int opt_default(void *optctx, const char *opt, const char *arg)
|
int opt_default(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
@@ -527,23 +486,23 @@ int opt_default(void *optctx, const char *opt, const char *arg)
|
|||||||
p = opt + strlen(opt);
|
p = opt + strlen(opt);
|
||||||
av_strlcpy(opt_stripped, opt, FFMIN(sizeof(opt_stripped), p - opt + 1));
|
av_strlcpy(opt_stripped, opt, FFMIN(sizeof(opt_stripped), p - opt + 1));
|
||||||
|
|
||||||
if ((o = opt_find(&cc, opt_stripped, NULL, 0,
|
if ((o = av_opt_find(&cc, opt_stripped, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) ||
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) ||
|
||||||
((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') &&
|
((opt[0] == 'v' || opt[0] == 'a' || opt[0] == 's') &&
|
||||||
(o = opt_find(&cc, opt + 1, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)))) {
|
(o = av_opt_find(&cc, opt + 1, NULL, 0, AV_OPT_SEARCH_FAKE_OBJ)))) {
|
||||||
av_dict_set(&codec_opts, opt, arg, FLAGS);
|
av_dict_set(&codec_opts, opt, arg, FLAGS);
|
||||||
consumed = 1;
|
consumed = 1;
|
||||||
}
|
}
|
||||||
if ((o = opt_find(&fc, opt, NULL, 0,
|
if ((o = av_opt_find(&fc, opt, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
||||||
av_dict_set(&format_opts, opt, arg, FLAGS);
|
av_dict_set(&format_opts, opt, arg, FLAGS);
|
||||||
if (consumed)
|
if(consumed)
|
||||||
av_log(NULL, AV_LOG_VERBOSE, "Routing option %s to both codec and muxer layer\n", opt);
|
av_log(NULL, AV_LOG_VERBOSE, "Routing %s to codec and muxer layer\n", opt);
|
||||||
consumed = 1;
|
consumed = 1;
|
||||||
}
|
}
|
||||||
#if CONFIG_SWSCALE
|
#if CONFIG_SWSCALE
|
||||||
sc = sws_get_class();
|
sc = sws_get_class();
|
||||||
if (!consumed && opt_find(&sc, opt, NULL, 0,
|
if (!consumed && av_opt_find(&sc, opt, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ)) {
|
||||||
// XXX we only support sws_flags, not arbitrary sws options
|
// XXX we only support sws_flags, not arbitrary sws options
|
||||||
int ret = av_opt_set(sws_opts, opt, arg, 0);
|
int ret = av_opt_set(sws_opts, opt, arg, 0);
|
||||||
@@ -556,7 +515,7 @@ int opt_default(void *optctx, const char *opt, const char *arg)
|
|||||||
#endif
|
#endif
|
||||||
#if CONFIG_SWRESAMPLE
|
#if CONFIG_SWRESAMPLE
|
||||||
swr_class = swr_get_class();
|
swr_class = swr_get_class();
|
||||||
if (!consumed && (o=opt_find(&swr_class, opt, NULL, 0,
|
if (!consumed && (o=av_opt_find(&swr_class, opt, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
||||||
struct SwrContext *swr = swr_alloc();
|
struct SwrContext *swr = swr_alloc();
|
||||||
int ret = av_opt_set(swr, opt, arg, 0);
|
int ret = av_opt_set(swr, opt, arg, 0);
|
||||||
@@ -570,7 +529,7 @@ int opt_default(void *optctx, const char *opt, const char *arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_AVRESAMPLE
|
#if CONFIG_AVRESAMPLE
|
||||||
if ((o=opt_find(&rc, opt, NULL, 0,
|
if ((o=av_opt_find(&rc, opt, NULL, 0,
|
||||||
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) {
|
||||||
av_dict_set(&resample_opts, opt, arg, FLAGS);
|
av_dict_set(&resample_opts, opt, arg, FLAGS);
|
||||||
consumed = 1;
|
consumed = 1;
|
||||||
@@ -665,7 +624,7 @@ static void init_parse_context(OptionParseContext *octx,
|
|||||||
octx->nb_groups = nb_groups;
|
octx->nb_groups = nb_groups;
|
||||||
octx->groups = av_mallocz(sizeof(*octx->groups) * octx->nb_groups);
|
octx->groups = av_mallocz(sizeof(*octx->groups) * octx->nb_groups);
|
||||||
if (!octx->groups)
|
if (!octx->groups)
|
||||||
exit_program(1);
|
exit(1);
|
||||||
|
|
||||||
for (i = 0; i < octx->nb_groups; i++)
|
for (i = 0; i < octx->nb_groups; i++)
|
||||||
octx->groups[i].group_def = &groups[i];
|
octx->groups[i].group_def = &groups[i];
|
||||||
@@ -809,18 +768,6 @@ do { \
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int opt_cpuflags(void *optctx, const char *opt, const char *arg)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
unsigned flags = av_get_cpu_flags();
|
|
||||||
|
|
||||||
if ((ret = av_parse_cpu_caps(&flags, arg)) < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
av_force_cpu_flags(flags);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int opt_loglevel(void *optctx, const char *opt, const char *arg)
|
int opt_loglevel(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
const struct { const char *name; int level; } log_levels[] = {
|
const struct { const char *name; int level; } log_levels[] = {
|
||||||
@@ -837,13 +784,6 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
|
|||||||
int level;
|
int level;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
tail = strstr(arg, "repeat");
|
|
||||||
av_log_set_flags(tail ? 0 : AV_LOG_SKIP_REPEATED);
|
|
||||||
if (tail == arg)
|
|
||||||
arg += 6 + (arg[6]=='+');
|
|
||||||
if(tail && !*arg)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) {
|
for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++) {
|
||||||
if (!strcmp(log_levels[i].name, arg)) {
|
if (!strcmp(log_levels[i].name, arg)) {
|
||||||
av_log_set_level(log_levels[i].level);
|
av_log_set_level(log_levels[i].level);
|
||||||
@@ -857,7 +797,7 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
|
|||||||
"Possible levels are numbers or:\n", arg);
|
"Possible levels are numbers or:\n", arg);
|
||||||
for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++)
|
for (i = 0; i < FF_ARRAY_ELEMS(log_levels); i++)
|
||||||
av_log(NULL, AV_LOG_FATAL, "\"%s\"\n", log_levels[i].name);
|
av_log(NULL, AV_LOG_FATAL, "\"%s\"\n", log_levels[i].name);
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
av_log_set_level(level);
|
av_log_set_level(level);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -950,6 +890,7 @@ static int init_report(const char *env)
|
|||||||
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
|
tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday,
|
||||||
tm->tm_hour, tm->tm_min, tm->tm_sec,
|
tm->tm_hour, tm->tm_min, tm->tm_sec,
|
||||||
filename.str);
|
filename.str);
|
||||||
|
av_log_set_level(FFMAX(av_log_get_level(), AV_LOG_VERBOSE));
|
||||||
av_bprint_finalize(&filename, NULL);
|
av_bprint_finalize(&filename, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -967,12 +908,24 @@ int opt_max_alloc(void *optctx, const char *opt, const char *arg)
|
|||||||
max = strtol(arg, &tail, 10);
|
max = strtol(arg, &tail, 10);
|
||||||
if (*tail) {
|
if (*tail) {
|
||||||
av_log(NULL, AV_LOG_FATAL, "Invalid max_alloc \"%s\".\n", arg);
|
av_log(NULL, AV_LOG_FATAL, "Invalid max_alloc \"%s\".\n", arg);
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
av_max_alloc(max);
|
av_max_alloc(max);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int opt_cpuflags(void *optctx, const char *opt, const char *arg)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
unsigned flags = av_get_cpu_flags();
|
||||||
|
|
||||||
|
if ((ret = av_parse_cpu_caps(&flags, arg)) < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
av_force_cpu_flags(flags);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int opt_timelimit(void *optctx, const char *opt, const char *arg)
|
int opt_timelimit(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
#if HAVE_SETRLIMIT
|
#if HAVE_SETRLIMIT
|
||||||
@@ -986,26 +939,6 @@ int opt_timelimit(void *optctx, const char *opt, const char *arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_OPENCL
|
|
||||||
int opt_opencl(void *optctx, const char *opt, const char *arg)
|
|
||||||
{
|
|
||||||
char *key, *value;
|
|
||||||
const char *opts = arg;
|
|
||||||
int ret = 0;
|
|
||||||
while (*opts) {
|
|
||||||
ret = av_opt_get_key_value(&opts, "=", ":", 0, &key, &value);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
ret = av_opencl_set_option(key, value);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
if (*opts)
|
|
||||||
opts++;
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void print_error(const char *filename, int err)
|
void print_error(const char *filename, int err)
|
||||||
{
|
{
|
||||||
char errbuf[128];
|
char errbuf[128];
|
||||||
@@ -1058,10 +991,12 @@ static void print_all_libs_info(int flags, int level)
|
|||||||
PRINT_LIB_INFO(avformat, AVFORMAT, flags, level);
|
PRINT_LIB_INFO(avformat, AVFORMAT, flags, level);
|
||||||
PRINT_LIB_INFO(avdevice, AVDEVICE, flags, level);
|
PRINT_LIB_INFO(avdevice, AVDEVICE, flags, level);
|
||||||
PRINT_LIB_INFO(avfilter, AVFILTER, flags, level);
|
PRINT_LIB_INFO(avfilter, AVFILTER, flags, level);
|
||||||
PRINT_LIB_INFO(avresample, AVRESAMPLE, flags, level);
|
// PRINT_LIB_INFO(avresample, AVRESAMPLE, flags, level);
|
||||||
PRINT_LIB_INFO(swscale, SWSCALE, flags, level);
|
PRINT_LIB_INFO(swscale, SWSCALE, flags, level);
|
||||||
PRINT_LIB_INFO(swresample,SWRESAMPLE, flags, level);
|
PRINT_LIB_INFO(swresample,SWRESAMPLE, flags, level);
|
||||||
|
#if CONFIG_POSTPROC
|
||||||
PRINT_LIB_INFO(postproc, POSTPROC, flags, level);
|
PRINT_LIB_INFO(postproc, POSTPROC, flags, level);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_program_info(int flags, int level)
|
static void print_program_info(int flags, int level)
|
||||||
@@ -1241,8 +1176,7 @@ static void print_codec(const AVCodec *c)
|
|||||||
printf("%s %s [%s]:\n", encoder ? "Encoder" : "Decoder", c->name,
|
printf("%s %s [%s]:\n", encoder ? "Encoder" : "Decoder", c->name,
|
||||||
c->long_name ? c->long_name : "");
|
c->long_name ? c->long_name : "");
|
||||||
|
|
||||||
if (c->type == AVMEDIA_TYPE_VIDEO ||
|
if (c->type == AVMEDIA_TYPE_VIDEO) {
|
||||||
c->type == AVMEDIA_TYPE_AUDIO) {
|
|
||||||
printf(" Threading capabilities: ");
|
printf(" Threading capabilities: ");
|
||||||
switch (c->capabilities & (CODEC_CAP_FRAME_THREADS |
|
switch (c->capabilities & (CODEC_CAP_FRAME_THREADS |
|
||||||
CODEC_CAP_SLICE_THREADS)) {
|
CODEC_CAP_SLICE_THREADS)) {
|
||||||
@@ -1323,7 +1257,7 @@ static unsigned get_codecs_sorted(const AVCodecDescriptor ***rcodecs)
|
|||||||
nb_codecs++;
|
nb_codecs++;
|
||||||
if (!(codecs = av_calloc(nb_codecs, sizeof(*codecs)))) {
|
if (!(codecs = av_calloc(nb_codecs, sizeof(*codecs)))) {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Out of memory\n");
|
av_log(NULL, AV_LOG_ERROR, "Out of memory\n");
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
desc = NULL;
|
desc = NULL;
|
||||||
while ((desc = avcodec_descriptor_next(desc)))
|
while ((desc = avcodec_descriptor_next(desc)))
|
||||||
@@ -1476,62 +1410,36 @@ int show_protocols(void *optctx, const char *opt, const char *arg)
|
|||||||
|
|
||||||
int show_filters(void *optctx, const char *opt, const char *arg)
|
int show_filters(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
const AVFilter av_unused(*filter) = NULL;
|
AVFilter av_unused(**filter) = NULL;
|
||||||
char descr[64], *descr_cur;
|
char descr[64], *descr_cur;
|
||||||
int i, j;
|
int i, j;
|
||||||
const AVFilterPad *pad;
|
const AVFilterPad *pad;
|
||||||
|
|
||||||
printf("Filters:\n"
|
printf("Filters:\n");
|
||||||
" T.. = Timeline support\n"
|
|
||||||
" .S. = Slice threading\n"
|
|
||||||
" ..C = Commmand support\n"
|
|
||||||
" A = Audio input/output\n"
|
|
||||||
" V = Video input/output\n"
|
|
||||||
" N = Dynamic number and/or type of input/output\n"
|
|
||||||
" | = Source or sink filter\n");
|
|
||||||
#if CONFIG_AVFILTER
|
#if CONFIG_AVFILTER
|
||||||
while ((filter = avfilter_next(filter))) {
|
while ((filter = av_filter_next(filter)) && *filter) {
|
||||||
descr_cur = descr;
|
descr_cur = descr;
|
||||||
for (i = 0; i < 2; i++) {
|
for (i = 0; i < 2; i++) {
|
||||||
if (i) {
|
if (i) {
|
||||||
*(descr_cur++) = '-';
|
*(descr_cur++) = '-';
|
||||||
*(descr_cur++) = '>';
|
*(descr_cur++) = '>';
|
||||||
}
|
}
|
||||||
pad = i ? filter->outputs : filter->inputs;
|
pad = i ? (*filter)->outputs : (*filter)->inputs;
|
||||||
for (j = 0; pad && pad[j].name; j++) {
|
for (j = 0; pad && pad[j].name; j++) {
|
||||||
if (descr_cur >= descr + sizeof(descr) - 4)
|
if (descr_cur >= descr + sizeof(descr) - 4)
|
||||||
break;
|
break;
|
||||||
*(descr_cur++) = get_media_type_char(pad[j].type);
|
*(descr_cur++) = get_media_type_char(pad[j].type);
|
||||||
}
|
}
|
||||||
if (!j)
|
if (!j)
|
||||||
*(descr_cur++) = ((!i && (filter->flags & AVFILTER_FLAG_DYNAMIC_INPUTS)) ||
|
*(descr_cur++) = '|';
|
||||||
( i && (filter->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS))) ? 'N' : '|';
|
|
||||||
}
|
}
|
||||||
*descr_cur = 0;
|
*descr_cur = 0;
|
||||||
printf(" %c%c%c %-16s %-10s %s\n",
|
printf("%-16s %-10s %s\n", (*filter)->name, descr, (*filter)->description);
|
||||||
filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE ? 'T' : '.',
|
|
||||||
filter->flags & AVFILTER_FLAG_SLICE_THREADS ? 'S' : '.',
|
|
||||||
filter->process_command ? 'C' : '.',
|
|
||||||
filter->name, descr, filter->description);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int show_colors(void *optctx, const char *opt, const char *arg)
|
|
||||||
{
|
|
||||||
const char *name;
|
|
||||||
const uint8_t *rgb;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
printf("%-32s #RRGGBB\n", "name");
|
|
||||||
|
|
||||||
for (i = 0; name = av_get_known_color_name(i, &rgb); i++)
|
|
||||||
printf("%-32s #%02x%02x%02x\n", name, rgb[0], rgb[1], rgb[2]);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int show_pix_fmts(void *optctx, const char *opt, const char *arg)
|
int show_pix_fmts(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
const AVPixFmtDescriptor *pix_desc = NULL;
|
const AVPixFmtDescriptor *pix_desc = NULL;
|
||||||
@@ -1553,11 +1461,11 @@ int show_pix_fmts(void *optctx, const char *opt, const char *arg)
|
|||||||
while ((pix_desc = av_pix_fmt_desc_next(pix_desc))) {
|
while ((pix_desc = av_pix_fmt_desc_next(pix_desc))) {
|
||||||
enum AVPixelFormat pix_fmt = av_pix_fmt_desc_get_id(pix_desc);
|
enum AVPixelFormat pix_fmt = av_pix_fmt_desc_get_id(pix_desc);
|
||||||
printf("%c%c%c%c%c %-16s %d %2d\n",
|
printf("%c%c%c%c%c %-16s %d %2d\n",
|
||||||
sws_isSupportedInput (pix_fmt) ? 'I' : '.',
|
sws_isSupportedInput (pix_fmt) ? 'I' : '.',
|
||||||
sws_isSupportedOutput(pix_fmt) ? 'O' : '.',
|
sws_isSupportedOutput(pix_fmt) ? 'O' : '.',
|
||||||
pix_desc->flags & AV_PIX_FMT_FLAG_HWACCEL ? 'H' : '.',
|
pix_desc->flags & PIX_FMT_HWACCEL ? 'H' : '.',
|
||||||
pix_desc->flags & AV_PIX_FMT_FLAG_PAL ? 'P' : '.',
|
pix_desc->flags & PIX_FMT_PAL ? 'P' : '.',
|
||||||
pix_desc->flags & AV_PIX_FMT_FLAG_BITSTREAM ? 'B' : '.',
|
pix_desc->flags & PIX_FMT_BITSTREAM ? 'B' : '.',
|
||||||
pix_desc->name,
|
pix_desc->name,
|
||||||
pix_desc->nb_components,
|
pix_desc->nb_components,
|
||||||
av_get_bits_per_pixel(pix_desc));
|
av_get_bits_per_pixel(pix_desc));
|
||||||
@@ -1689,62 +1597,6 @@ static void show_help_muxer(const char *name)
|
|||||||
show_help_children(fmt->priv_class, AV_OPT_FLAG_ENCODING_PARAM);
|
show_help_children(fmt->priv_class, AV_OPT_FLAG_ENCODING_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_AVFILTER
|
|
||||||
static void show_help_filter(const char *name)
|
|
||||||
{
|
|
||||||
#if CONFIG_AVFILTER
|
|
||||||
const AVFilter *f = avfilter_get_by_name(name);
|
|
||||||
int i, count;
|
|
||||||
|
|
||||||
if (!name) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "No filter name specified.\n");
|
|
||||||
return;
|
|
||||||
} else if (!f) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Unknown filter '%s'.\n", name);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("Filter %s\n", f->name);
|
|
||||||
if (f->description)
|
|
||||||
printf(" %s\n", f->description);
|
|
||||||
|
|
||||||
if (f->flags & AVFILTER_FLAG_SLICE_THREADS)
|
|
||||||
printf(" slice threading supported\n");
|
|
||||||
|
|
||||||
printf(" Inputs:\n");
|
|
||||||
count = avfilter_pad_count(f->inputs);
|
|
||||||
for (i = 0; i < count; i++) {
|
|
||||||
printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->inputs, i),
|
|
||||||
media_type_string(avfilter_pad_get_type(f->inputs, i)));
|
|
||||||
}
|
|
||||||
if (f->flags & AVFILTER_FLAG_DYNAMIC_INPUTS)
|
|
||||||
printf(" dynamic (depending on the options)\n");
|
|
||||||
else if (!count)
|
|
||||||
printf(" none (source filter)\n");
|
|
||||||
|
|
||||||
printf(" Outputs:\n");
|
|
||||||
count = avfilter_pad_count(f->outputs);
|
|
||||||
for (i = 0; i < count; i++) {
|
|
||||||
printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->outputs, i),
|
|
||||||
media_type_string(avfilter_pad_get_type(f->outputs, i)));
|
|
||||||
}
|
|
||||||
if (f->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS)
|
|
||||||
printf(" dynamic (depending on the options)\n");
|
|
||||||
else if (!count)
|
|
||||||
printf(" none (sink filter)\n");
|
|
||||||
|
|
||||||
if (f->priv_class)
|
|
||||||
show_help_children(f->priv_class, AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM |
|
|
||||||
AV_OPT_FLAG_AUDIO_PARAM);
|
|
||||||
if (f->flags & AVFILTER_FLAG_SUPPORT_TIMELINE)
|
|
||||||
printf("This filter has support for timeline through the 'enable' option.\n");
|
|
||||||
#else
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Build without libavfilter; "
|
|
||||||
"can not to satisfy request\n");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int show_help(void *optctx, const char *opt, const char *arg)
|
int show_help(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
char *topic, *par;
|
char *topic, *par;
|
||||||
@@ -1765,10 +1617,6 @@ int show_help(void *optctx, const char *opt, const char *arg)
|
|||||||
show_help_demuxer(par);
|
show_help_demuxer(par);
|
||||||
} else if (!strcmp(topic, "muxer")) {
|
} else if (!strcmp(topic, "muxer")) {
|
||||||
show_help_muxer(par);
|
show_help_muxer(par);
|
||||||
#if CONFIG_AVFILTER
|
|
||||||
} else if (!strcmp(topic, "filter")) {
|
|
||||||
show_help_filter(par);
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
show_help_default(topic, par);
|
show_help_default(topic, par);
|
||||||
}
|
}
|
||||||
@@ -1968,13 +1816,13 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
|
|||||||
{
|
{
|
||||||
if (new_size >= INT_MAX / elem_size) {
|
if (new_size >= INT_MAX / elem_size) {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
|
av_log(NULL, AV_LOG_ERROR, "Array too big.\n");
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (*size < new_size) {
|
if (*size < new_size) {
|
||||||
uint8_t *tmp = av_realloc(array, new_size*elem_size);
|
uint8_t *tmp = av_realloc(array, new_size*elem_size);
|
||||||
if (!tmp) {
|
if (!tmp) {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");
|
av_log(NULL, AV_LOG_ERROR, "Could not alloc buffer.\n");
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
|
memset(tmp + *size*elem_size, 0, (new_size-*size) * elem_size);
|
||||||
*size = new_size;
|
*size = new_size;
|
||||||
@@ -1982,3 +1830,144 @@ void *grow_array(void *array, int elem_size, int *size, int new_size)
|
|||||||
}
|
}
|
||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int alloc_buffer(FrameBuffer **pool, AVCodecContext *s, FrameBuffer **pbuf)
|
||||||
|
{
|
||||||
|
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(s->pix_fmt);
|
||||||
|
FrameBuffer *buf;
|
||||||
|
int i, ret;
|
||||||
|
int pixel_size;
|
||||||
|
int h_chroma_shift, v_chroma_shift;
|
||||||
|
int edge = 32; // XXX should be avcodec_get_edge_width(), but that fails on svq1
|
||||||
|
int w = s->width, h = s->height;
|
||||||
|
|
||||||
|
if (!desc)
|
||||||
|
return AVERROR(EINVAL);
|
||||||
|
pixel_size = desc->comp[0].step_minus1 + 1;
|
||||||
|
|
||||||
|
buf = av_mallocz(sizeof(*buf));
|
||||||
|
if (!buf)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
avcodec_align_dimensions(s, &w, &h);
|
||||||
|
|
||||||
|
if (!(s->flags & CODEC_FLAG_EMU_EDGE)) {
|
||||||
|
w += 2*edge;
|
||||||
|
h += 2*edge;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((ret = av_image_alloc(buf->base, buf->linesize, w, h,
|
||||||
|
s->pix_fmt, 32)) < 0) {
|
||||||
|
av_freep(&buf);
|
||||||
|
av_log(s, AV_LOG_ERROR, "alloc_buffer: av_image_alloc() failed\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
avcodec_get_chroma_sub_sample(s->pix_fmt, &h_chroma_shift, &v_chroma_shift);
|
||||||
|
for (i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) {
|
||||||
|
const int h_shift = i==0 ? 0 : h_chroma_shift;
|
||||||
|
const int v_shift = i==0 ? 0 : v_chroma_shift;
|
||||||
|
if ((s->flags & CODEC_FLAG_EMU_EDGE) || !buf->linesize[i] || !buf->base[i])
|
||||||
|
buf->data[i] = buf->base[i];
|
||||||
|
else
|
||||||
|
buf->data[i] = buf->base[i] +
|
||||||
|
FFALIGN((buf->linesize[i]*edge >> v_shift) +
|
||||||
|
(pixel_size*edge >> h_shift), 32);
|
||||||
|
}
|
||||||
|
buf->w = s->width;
|
||||||
|
buf->h = s->height;
|
||||||
|
buf->pix_fmt = s->pix_fmt;
|
||||||
|
buf->pool = pool;
|
||||||
|
|
||||||
|
*pbuf = buf;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int codec_get_buffer(AVCodecContext *s, AVFrame *frame)
|
||||||
|
{
|
||||||
|
FrameBuffer **pool = s->opaque;
|
||||||
|
FrameBuffer *buf;
|
||||||
|
int ret, i;
|
||||||
|
|
||||||
|
if(av_image_check_size(s->width, s->height, 0, s) || s->pix_fmt<0) {
|
||||||
|
av_log(s, AV_LOG_ERROR, "codec_get_buffer: image parameters invalid\n");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!*pool && (ret = alloc_buffer(pool, s, pool)) < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
buf = *pool;
|
||||||
|
*pool = buf->next;
|
||||||
|
buf->next = NULL;
|
||||||
|
if (buf->w != s->width || buf->h != s->height || buf->pix_fmt != s->pix_fmt) {
|
||||||
|
av_freep(&buf->base[0]);
|
||||||
|
av_free(buf);
|
||||||
|
if ((ret = alloc_buffer(pool, s, &buf)) < 0)
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
av_assert0(!buf->refcount);
|
||||||
|
buf->refcount++;
|
||||||
|
|
||||||
|
frame->opaque = buf;
|
||||||
|
frame->type = FF_BUFFER_TYPE_USER;
|
||||||
|
frame->extended_data = frame->data;
|
||||||
|
|
||||||
|
for (i = 0; i < FF_ARRAY_ELEMS(buf->data); i++) {
|
||||||
|
frame->base[i] = buf->base[i]; // XXX h264.c uses base though it shouldn't
|
||||||
|
frame->data[i] = buf->data[i];
|
||||||
|
frame->linesize[i] = buf->linesize[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void unref_buffer(FrameBuffer *buf)
|
||||||
|
{
|
||||||
|
FrameBuffer **pool = buf->pool;
|
||||||
|
|
||||||
|
av_assert0(buf->refcount > 0);
|
||||||
|
buf->refcount--;
|
||||||
|
if (!buf->refcount) {
|
||||||
|
FrameBuffer *tmp;
|
||||||
|
for(tmp= *pool; tmp; tmp= tmp->next)
|
||||||
|
av_assert1(tmp != buf);
|
||||||
|
|
||||||
|
buf->next = *pool;
|
||||||
|
*pool = buf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void codec_release_buffer(AVCodecContext *s, AVFrame *frame)
|
||||||
|
{
|
||||||
|
FrameBuffer *buf = frame->opaque;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if(frame->type!=FF_BUFFER_TYPE_USER) {
|
||||||
|
avcodec_default_release_buffer(s, frame);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < FF_ARRAY_ELEMS(frame->data); i++)
|
||||||
|
frame->data[i] = NULL;
|
||||||
|
|
||||||
|
unref_buffer(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
void filter_release_buffer(AVFilterBuffer *fb)
|
||||||
|
{
|
||||||
|
FrameBuffer *buf = fb->priv;
|
||||||
|
av_free(fb);
|
||||||
|
unref_buffer(buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
void free_buffer_pool(FrameBuffer **pool)
|
||||||
|
{
|
||||||
|
FrameBuffer *buf = *pool;
|
||||||
|
while (buf) {
|
||||||
|
*pool = buf->next;
|
||||||
|
av_freep(&buf->base[0]);
|
||||||
|
av_free(buf);
|
||||||
|
buf = *pool;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+46
-33
@@ -54,16 +54,6 @@ extern struct SwsContext *sws_opts;
|
|||||||
extern AVDictionary *swr_opts;
|
extern AVDictionary *swr_opts;
|
||||||
extern AVDictionary *format_opts, *codec_opts, *resample_opts;
|
extern AVDictionary *format_opts, *codec_opts, *resample_opts;
|
||||||
|
|
||||||
/**
|
|
||||||
* Register a program-specific cleanup routine.
|
|
||||||
*/
|
|
||||||
void register_exit(void (*cb)(int ret));
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wraps exit with a program-specific cleanup routine.
|
|
||||||
*/
|
|
||||||
void exit_program(int ret);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the cmdutils option system, in particular
|
* Initialize the cmdutils option system, in particular
|
||||||
* allocate the *_opts contexts.
|
* allocate the *_opts contexts.
|
||||||
@@ -81,11 +71,6 @@ void uninit_opts(void);
|
|||||||
*/
|
*/
|
||||||
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);
|
void log_callback_help(void* ptr, int level, const char* fmt, va_list vl);
|
||||||
|
|
||||||
/**
|
|
||||||
* Override the cpuflags.
|
|
||||||
*/
|
|
||||||
int opt_cpuflags(void *optctx, const char *opt, const char *arg);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fallback for options that are not explicitly handled, these will be
|
* Fallback for options that are not explicitly handled, these will be
|
||||||
* parsed through AVOptions.
|
* parsed through AVOptions.
|
||||||
@@ -101,9 +86,9 @@ int opt_report(const char *opt);
|
|||||||
|
|
||||||
int opt_max_alloc(void *optctx, const char *opt, const char *arg);
|
int opt_max_alloc(void *optctx, const char *opt, const char *arg);
|
||||||
|
|
||||||
int opt_codec_debug(void *optctx, const char *opt, const char *arg);
|
int opt_cpuflags(void *optctx, const char *opt, const char *arg);
|
||||||
|
|
||||||
int opt_opencl(void *optctx, const char *opt, const char *arg);
|
int opt_codec_debug(void *optctx, const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Limit the execution time.
|
* Limit the execution time.
|
||||||
@@ -177,8 +162,6 @@ typedef struct OptionDef {
|
|||||||
an int containing element count in the array. */
|
an int containing element count in the array. */
|
||||||
#define OPT_TIME 0x10000
|
#define OPT_TIME 0x10000
|
||||||
#define OPT_DOUBLE 0x20000
|
#define OPT_DOUBLE 0x20000
|
||||||
#define OPT_INPUT 0x40000
|
|
||||||
#define OPT_OUTPUT 0x80000
|
|
||||||
union {
|
union {
|
||||||
void *dst_ptr;
|
void *dst_ptr;
|
||||||
int (*func_arg)(void *, const char *, const char *);
|
int (*func_arg)(void *, const char *, const char *);
|
||||||
@@ -259,11 +242,6 @@ typedef struct OptionGroupDef {
|
|||||||
* are terminated by a non-option argument (e.g. ffmpeg output files)
|
* are terminated by a non-option argument (e.g. ffmpeg output files)
|
||||||
*/
|
*/
|
||||||
const char *sep;
|
const char *sep;
|
||||||
/**
|
|
||||||
* Option flags that must be set on each option that is
|
|
||||||
* applied to this group
|
|
||||||
*/
|
|
||||||
int flags;
|
|
||||||
} OptionGroupDef;
|
} OptionGroupDef;
|
||||||
|
|
||||||
typedef struct OptionGroup {
|
typedef struct OptionGroup {
|
||||||
@@ -488,12 +466,6 @@ int show_layouts(void *optctx, const char *opt, const char *arg);
|
|||||||
*/
|
*/
|
||||||
int show_sample_fmts(void *optctx, const char *opt, const char *arg);
|
int show_sample_fmts(void *optctx, const char *opt, const char *arg);
|
||||||
|
|
||||||
/**
|
|
||||||
* Print a listing containing all the color names and values recognized
|
|
||||||
* by the program.
|
|
||||||
*/
|
|
||||||
int show_colors(void *optctx, 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.
|
||||||
@@ -507,7 +479,7 @@ int read_yesno(void);
|
|||||||
* @param filename file to read from
|
* @param filename file to read from
|
||||||
* @param bufptr location where pointer to buffer is returned
|
* @param bufptr location where pointer to buffer is returned
|
||||||
* @param size location where size of buffer is returned
|
* @param size location where size of buffer is returned
|
||||||
* @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 cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
|
||||||
@@ -545,11 +517,52 @@ FILE *get_preset_file(char *filename, size_t filename_size,
|
|||||||
*/
|
*/
|
||||||
void *grow_array(void *array, int elem_size, int *size, int new_size);
|
void *grow_array(void *array, int elem_size, int *size, int new_size);
|
||||||
|
|
||||||
#define media_type_string av_get_media_type_string
|
|
||||||
|
|
||||||
#define GROW_ARRAY(array, nb_elems)\
|
#define GROW_ARRAY(array, nb_elems)\
|
||||||
array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)
|
array = grow_array(array, sizeof(*array), &nb_elems, nb_elems + 1)
|
||||||
|
|
||||||
|
typedef struct FrameBuffer {
|
||||||
|
uint8_t *base[4];
|
||||||
|
uint8_t *data[4];
|
||||||
|
int linesize[4];
|
||||||
|
|
||||||
|
int h, w;
|
||||||
|
enum AVPixelFormat pix_fmt;
|
||||||
|
|
||||||
|
int refcount;
|
||||||
|
struct FrameBuffer **pool; ///< head of the buffer pool
|
||||||
|
struct FrameBuffer *next;
|
||||||
|
} FrameBuffer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a frame from the pool. This is intended to be used as a callback for
|
||||||
|
* AVCodecContext.get_buffer.
|
||||||
|
*
|
||||||
|
* @param s codec context. s->opaque must be a pointer to the head of the
|
||||||
|
* buffer pool.
|
||||||
|
* @param frame frame->opaque will be set to point to the FrameBuffer
|
||||||
|
* containing the frame data.
|
||||||
|
*/
|
||||||
|
int codec_get_buffer(AVCodecContext *s, AVFrame *frame);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A callback to be used for AVCodecContext.release_buffer along with
|
||||||
|
* codec_get_buffer().
|
||||||
|
*/
|
||||||
|
void codec_release_buffer(AVCodecContext *s, AVFrame *frame);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A callback to be used for AVFilterBuffer.free.
|
||||||
|
* @param fb buffer to free. fb->priv must be a pointer to the FrameBuffer
|
||||||
|
* containing the buffer data.
|
||||||
|
*/
|
||||||
|
void filter_release_buffer(AVFilterBuffer *fb);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free all the buffers in the pool. This must be called after all the
|
||||||
|
* buffers have been released.
|
||||||
|
*/
|
||||||
|
void free_buffer_pool(FrameBuffer **pool);
|
||||||
|
|
||||||
#define GET_PIX_FMT_NAME(pix_fmt)\
|
#define GET_PIX_FMT_NAME(pix_fmt)\
|
||||||
const char *name = av_get_pix_fmt_name(pix_fmt);
|
const char *name = av_get_pix_fmt_name(pix_fmt);
|
||||||
|
|
||||||
|
|||||||
@@ -14,12 +14,8 @@
|
|||||||
{ "pix_fmts" , OPT_EXIT, {.func_arg = show_pix_fmts }, "show available pixel formats" },
|
{ "pix_fmts" , OPT_EXIT, {.func_arg = show_pix_fmts }, "show available pixel formats" },
|
||||||
{ "layouts" , OPT_EXIT, {.func_arg = show_layouts }, "show standard channel layouts" },
|
{ "layouts" , OPT_EXIT, {.func_arg = show_layouts }, "show standard channel layouts" },
|
||||||
{ "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
|
{ "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
|
||||||
{ "colors" , OPT_EXIT, {.func_arg = show_colors }, "show available color names" },
|
{ "loglevel" , HAS_ARG, {.func_arg = opt_loglevel}, "set libav* logging level", "loglevel" },
|
||||||
{ "loglevel" , HAS_ARG, {.func_arg = opt_loglevel}, "set logging level", "loglevel" },
|
{ "v", HAS_ARG, {.func_arg = opt_loglevel}, "set libav* logging level", "loglevel" },
|
||||||
{ "v", HAS_ARG, {.func_arg = opt_loglevel}, "set logging level", "loglevel" },
|
|
||||||
{ "report" , 0, {(void*)opt_report}, "generate a report" },
|
{ "report" , 0, {(void*)opt_report}, "generate a report" },
|
||||||
{ "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },
|
{ "max_alloc" , HAS_ARG, {.func_arg = opt_max_alloc}, "set maximum size of a single allocated block", "bytes" },
|
||||||
{ "cpuflags" , HAS_ARG | OPT_EXPERT, { .func_arg = opt_cpuflags }, "force specific cpu flags", "flags" },
|
{ "cpuflags" , HAS_ARG | OPT_EXPERT, {.func_arg = opt_cpuflags}, "force specific cpu flags", "flags" },
|
||||||
#if CONFIG_OPENCL
|
|
||||||
{ "opencl_options", HAS_ARG, {.func_arg = opt_opencl}, "set OpenCL environment options" },
|
|
||||||
#endif
|
|
||||||
|
|||||||
+1
-3
@@ -99,10 +99,8 @@ TOOLOBJS := $(TOOLS:%=tools/%.o)
|
|||||||
TOOLS := $(TOOLS:%=tools/%$(EXESUF))
|
TOOLS := $(TOOLS:%=tools/%$(EXESUF))
|
||||||
HEADERS += $(HEADERS-yes)
|
HEADERS += $(HEADERS-yes)
|
||||||
|
|
||||||
PATH_LIBNAME = $(foreach NAME,$(1),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
DEP_LIBS := $(foreach NAME,$(FFLIBS),lib$(NAME)/$($(CONFIG_SHARED:yes=S)LIBNAME))
|
||||||
DEP_LIBS := $(foreach lib,$(FFLIBS),$(call PATH_LIBNAME,$(lib)))
|
|
||||||
|
|
||||||
SRC_DIR := $(SRC_PATH)/lib$(NAME)
|
|
||||||
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 += $(ARCH_HEADERS:%=$(ARCH)/%) $(SKIPHEADERS-)
|
||||||
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
|
SKIPHEADERS := $(SKIPHEADERS:%=$(SUBDIR)%)
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* Work around the class() function in AIX math.h clashing with
|
|
||||||
* identifiers named "class".
|
|
||||||
*
|
|
||||||
* This file is part of FFmpeg.
|
|
||||||
*
|
|
||||||
* FFmpeg 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.
|
|
||||||
*
|
|
||||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FFMPEG_COMPAT_AIX_MATH_H
|
|
||||||
#define FFMPEG_COMPAT_AIX_MATH_H
|
|
||||||
|
|
||||||
#define class class_in_math_h_causes_problems
|
|
||||||
|
|
||||||
#include_next <math.h>
|
|
||||||
|
|
||||||
#undef class
|
|
||||||
|
|
||||||
#endif /* FFMPEG_COMPAT_AIX_MATH_H */
|
|
||||||
@@ -1,879 +0,0 @@
|
|||||||
// Avisynth C Interface Version 0.20
|
|
||||||
// Copyright 2003 Kevin Atkinson
|
|
||||||
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program 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 General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
|
|
||||||
// http://www.gnu.org/copyleft/gpl.html .
|
|
||||||
//
|
|
||||||
// As a special exception, I give you permission to link to the
|
|
||||||
// Avisynth C interface with independent modules that communicate with
|
|
||||||
// the Avisynth C interface solely through the interfaces defined in
|
|
||||||
// avisynth_c.h, regardless of the license terms of these independent
|
|
||||||
// modules, and to copy and distribute the resulting combined work
|
|
||||||
// under terms of your choice, provided that every copy of the
|
|
||||||
// combined work is accompanied by a complete copy of the source code
|
|
||||||
// of the Avisynth C interface and Avisynth itself (with the version
|
|
||||||
// used to produce the combined work), being distributed under the
|
|
||||||
// terms of the GNU General Public License plus this exception. An
|
|
||||||
// independent module is a module which is not derived from or based
|
|
||||||
// on Avisynth C Interface, such as 3rd-party filters, import and
|
|
||||||
// export plugins, or graphical user interfaces.
|
|
||||||
|
|
||||||
// NOTE: this is a partial update of the Avisynth C interface to recognize
|
|
||||||
// new color spaces added in Avisynth 2.60. By no means is this document
|
|
||||||
// completely Avisynth 2.60 compliant.
|
|
||||||
|
|
||||||
#ifndef __AVISYNTH_C__
|
|
||||||
#define __AVISYNTH_C__
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
# define EXTERN_C extern "C"
|
|
||||||
#else
|
|
||||||
# define EXTERN_C
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define AVSC_USE_STDCALL 1
|
|
||||||
|
|
||||||
#ifndef AVSC_USE_STDCALL
|
|
||||||
# define AVSC_CC __cdecl
|
|
||||||
#else
|
|
||||||
# define AVSC_CC __stdcall
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define AVSC_INLINE static __inline
|
|
||||||
|
|
||||||
#ifdef AVISYNTH_C_EXPORTS
|
|
||||||
# define AVSC_EXPORT EXTERN_C
|
|
||||||
# define AVSC_API(ret, name) EXTERN_C __declspec(dllexport) ret AVSC_CC name
|
|
||||||
#else
|
|
||||||
# define AVSC_EXPORT EXTERN_C __declspec(dllexport)
|
|
||||||
# ifndef AVSC_NO_DECLSPEC
|
|
||||||
# define AVSC_API(ret, name) EXTERN_C __declspec(dllimport) ret AVSC_CC name
|
|
||||||
# else
|
|
||||||
# define AVSC_API(ret, name) typedef ret (AVSC_CC *name##_func)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef unsigned char BYTE;
|
|
||||||
#ifdef __GNUC__
|
|
||||||
typedef long long int INT64;
|
|
||||||
#else
|
|
||||||
typedef __int64 INT64;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Constants
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef __AVISYNTH_H__
|
|
||||||
enum { AVISYNTH_INTERFACE_VERSION = 4 };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum {AVS_SAMPLE_INT8 = 1<<0,
|
|
||||||
AVS_SAMPLE_INT16 = 1<<1,
|
|
||||||
AVS_SAMPLE_INT24 = 1<<2,
|
|
||||||
AVS_SAMPLE_INT32 = 1<<3,
|
|
||||||
AVS_SAMPLE_FLOAT = 1<<4};
|
|
||||||
|
|
||||||
enum {AVS_PLANAR_Y=1<<0,
|
|
||||||
AVS_PLANAR_U=1<<1,
|
|
||||||
AVS_PLANAR_V=1<<2,
|
|
||||||
AVS_PLANAR_ALIGNED=1<<3,
|
|
||||||
AVS_PLANAR_Y_ALIGNED=AVS_PLANAR_Y|AVS_PLANAR_ALIGNED,
|
|
||||||
AVS_PLANAR_U_ALIGNED=AVS_PLANAR_U|AVS_PLANAR_ALIGNED,
|
|
||||||
AVS_PLANAR_V_ALIGNED=AVS_PLANAR_V|AVS_PLANAR_ALIGNED,
|
|
||||||
AVS_PLANAR_A=1<<4,
|
|
||||||
AVS_PLANAR_R=1<<5,
|
|
||||||
AVS_PLANAR_G=1<<6,
|
|
||||||
AVS_PLANAR_B=1<<7,
|
|
||||||
AVS_PLANAR_A_ALIGNED=AVS_PLANAR_A|AVS_PLANAR_ALIGNED,
|
|
||||||
AVS_PLANAR_R_ALIGNED=AVS_PLANAR_R|AVS_PLANAR_ALIGNED,
|
|
||||||
AVS_PLANAR_G_ALIGNED=AVS_PLANAR_G|AVS_PLANAR_ALIGNED,
|
|
||||||
AVS_PLANAR_B_ALIGNED=AVS_PLANAR_B|AVS_PLANAR_ALIGNED};
|
|
||||||
|
|
||||||
// Colorspace properties.
|
|
||||||
enum {AVS_CS_BGR = 1<<28,
|
|
||||||
AVS_CS_YUV = 1<<29,
|
|
||||||
AVS_CS_INTERLEAVED = 1<<30,
|
|
||||||
AVS_CS_PLANAR = 1<<31,
|
|
||||||
|
|
||||||
AVS_CS_SHIFT_SUB_WIDTH = 0,
|
|
||||||
AVS_CS_SHIFT_SUB_HEIGHT = 1 << 3,
|
|
||||||
AVS_CS_SHIFT_SAMPLE_BITS = 1 << 4,
|
|
||||||
|
|
||||||
AVS_CS_SUB_WIDTH_MASK = 7 << AVS_CS_SHIFT_SUB_WIDTH,
|
|
||||||
AVS_CS_SUB_WIDTH_1 = 3 << AVS_CS_SHIFT_SUB_WIDTH, // YV24
|
|
||||||
AVS_CS_SUB_WIDTH_2 = 0 << AVS_CS_SHIFT_SUB_WIDTH, // YV12, I420, YV16
|
|
||||||
AVS_CS_SUB_WIDTH_4 = 1 << AVS_CS_SHIFT_SUB_WIDTH, // YUV9, YV411
|
|
||||||
|
|
||||||
AVS_CS_VPLANEFIRST = 1 << 3, // YV12, YV16, YV24, YV411, YUV9
|
|
||||||
AVS_CS_UPLANEFIRST = 1 << 4, // I420
|
|
||||||
|
|
||||||
AVS_CS_SUB_HEIGHT_MASK = 7 << AVS_CS_SHIFT_SUB_HEIGHT,
|
|
||||||
AVS_CS_SUB_HEIGHT_1 = 3 << AVS_CS_SHIFT_SUB_HEIGHT, // YV16, YV24, YV411
|
|
||||||
AVS_CS_SUB_HEIGHT_2 = 0 << AVS_CS_SHIFT_SUB_HEIGHT, // YV12, I420
|
|
||||||
AVS_CS_SUB_HEIGHT_4 = 1 << AVS_CS_SHIFT_SUB_HEIGHT, // YUV9
|
|
||||||
|
|
||||||
AVS_CS_SAMPLE_BITS_MASK = 7 << AVS_CS_SHIFT_SAMPLE_BITS,
|
|
||||||
AVS_CS_SAMPLE_BITS_8 = 0 << AVS_CS_SHIFT_SAMPLE_BITS,
|
|
||||||
AVS_CS_SAMPLE_BITS_16 = 1 << AVS_CS_SHIFT_SAMPLE_BITS,
|
|
||||||
AVS_CS_SAMPLE_BITS_32 = 2 << AVS_CS_SHIFT_SAMPLE_BITS,
|
|
||||||
|
|
||||||
AVS_CS_PLANAR_MASK = AVS_CS_PLANAR | AVS_CS_INTERLEAVED | AVS_CS_YUV | AVS_CS_BGR | AVS_CS_SAMPLE_BITS_MASK | AVS_CS_SUB_HEIGHT_MASK | AVS_CS_SUB_WIDTH_MASK,
|
|
||||||
AVS_CS_PLANAR_FILTER = ~( AVS_CS_VPLANEFIRST | AVS_CS_UPLANEFIRST )};
|
|
||||||
|
|
||||||
// Specific colorformats
|
|
||||||
enum {
|
|
||||||
AVS_CS_UNKNOWN = 0,
|
|
||||||
AVS_CS_BGR24 = 1<<0 | AVS_CS_BGR | AVS_CS_INTERLEAVED,
|
|
||||||
AVS_CS_BGR32 = 1<<1 | AVS_CS_BGR | AVS_CS_INTERLEAVED,
|
|
||||||
AVS_CS_YUY2 = 1<<2 | AVS_CS_YUV | AVS_CS_INTERLEAVED,
|
|
||||||
// AVS_CS_YV12 = 1<<3 Reserved
|
|
||||||
// AVS_CS_I420 = 1<<4 Reserved
|
|
||||||
AVS_CS_RAW32 = 1<<5 | AVS_CS_INTERLEAVED,
|
|
||||||
|
|
||||||
AVS_CS_YV24 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_1, // YVU 4:4:4 planar
|
|
||||||
AVS_CS_YV16 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_2, // YVU 4:2:2 planar
|
|
||||||
AVS_CS_YV12 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_2 | AVS_CS_SUB_WIDTH_2, // YVU 4:2:0 planar
|
|
||||||
AVS_CS_I420 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_UPLANEFIRST | AVS_CS_SUB_HEIGHT_2 | AVS_CS_SUB_WIDTH_2, // YUV 4:2:0 planar
|
|
||||||
AVS_CS_IYUV = AVS_CS_I420,
|
|
||||||
AVS_CS_YV411 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_1 | AVS_CS_SUB_WIDTH_4, // YVU 4:1:1 planar
|
|
||||||
AVS_CS_YUV9 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 | AVS_CS_VPLANEFIRST | AVS_CS_SUB_HEIGHT_4 | AVS_CS_SUB_WIDTH_4, // YVU 4:1:0 planar
|
|
||||||
AVS_CS_Y8 = AVS_CS_PLANAR | AVS_CS_INTERLEAVED | AVS_CS_YUV | AVS_CS_SAMPLE_BITS_8 // Y 4:0:0 planar
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
AVS_IT_BFF = 1<<0,
|
|
||||||
AVS_IT_TFF = 1<<1,
|
|
||||||
AVS_IT_FIELDBASED = 1<<2};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
AVS_FILTER_TYPE=1,
|
|
||||||
AVS_FILTER_INPUT_COLORSPACE=2,
|
|
||||||
AVS_FILTER_OUTPUT_TYPE=9,
|
|
||||||
AVS_FILTER_NAME=4,
|
|
||||||
AVS_FILTER_AUTHOR=5,
|
|
||||||
AVS_FILTER_VERSION=6,
|
|
||||||
AVS_FILTER_ARGS=7,
|
|
||||||
AVS_FILTER_ARGS_INFO=8,
|
|
||||||
AVS_FILTER_ARGS_DESCRIPTION=10,
|
|
||||||
AVS_FILTER_DESCRIPTION=11};
|
|
||||||
|
|
||||||
enum { //SUBTYPES
|
|
||||||
AVS_FILTER_TYPE_AUDIO=1,
|
|
||||||
AVS_FILTER_TYPE_VIDEO=2,
|
|
||||||
AVS_FILTER_OUTPUT_TYPE_SAME=3,
|
|
||||||
AVS_FILTER_OUTPUT_TYPE_DIFFERENT=4};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
AVS_CACHE_NOTHING=0,
|
|
||||||
AVS_CACHE_RANGE=1,
|
|
||||||
AVS_CACHE_ALL=2,
|
|
||||||
AVS_CACHE_AUDIO=3,
|
|
||||||
AVS_CACHE_AUDIO_NONE=4,
|
|
||||||
AVS_CACHE_AUDIO_AUTO=5
|
|
||||||
};
|
|
||||||
|
|
||||||
#define AVS_FRAME_ALIGN 16
|
|
||||||
|
|
||||||
typedef struct AVS_Clip AVS_Clip;
|
|
||||||
typedef struct AVS_ScriptEnvironment AVS_ScriptEnvironment;
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_VideoInfo
|
|
||||||
//
|
|
||||||
|
|
||||||
// AVS_VideoInfo is layed out identicly to VideoInfo
|
|
||||||
typedef struct AVS_VideoInfo {
|
|
||||||
int width, height; // width=0 means no video
|
|
||||||
unsigned fps_numerator, fps_denominator;
|
|
||||||
int num_frames;
|
|
||||||
|
|
||||||
int pixel_type;
|
|
||||||
|
|
||||||
int audio_samples_per_second; // 0 means no audio
|
|
||||||
int sample_type;
|
|
||||||
INT64 num_audio_samples;
|
|
||||||
int nchannels;
|
|
||||||
|
|
||||||
// Imagetype properties
|
|
||||||
|
|
||||||
int image_type;
|
|
||||||
} AVS_VideoInfo;
|
|
||||||
|
|
||||||
// useful functions of the above
|
|
||||||
AVSC_INLINE int avs_has_video(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->width!=0); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_has_audio(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->audio_samples_per_second!=0); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_rgb(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->pixel_type&AVS_CS_BGR); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_rgb24(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type&AVS_CS_BGR24)==AVS_CS_BGR24; } // Clear out additional properties
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_rgb32(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type & AVS_CS_BGR32) == AVS_CS_BGR32 ; }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yuv(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->pixel_type&AVS_CS_YUV ); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yuy2(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type & AVS_CS_YUY2) == AVS_CS_YUY2; }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yv24(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV24 & AVS_CS_PLANAR_FILTER); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yv16(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV16 & AVS_CS_PLANAR_FILTER); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yv12(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV12 & AVS_CS_PLANAR_FILTER); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yv411(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_YV411 & AVS_CS_PLANAR_FILTER); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_y8(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type & AVS_CS_PLANAR_MASK) == (AVS_CS_Y8 & AVS_CS_PLANAR_FILTER); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_property(const AVS_VideoInfo * p, int property)
|
|
||||||
{ return ((p->pixel_type & property)==property ); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_planar(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->pixel_type & AVS_CS_PLANAR); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_color_space(const AVS_VideoInfo * p, int c_space)
|
|
||||||
{ return avs_is_planar(p) ? ((p->pixel_type & AVS_CS_PLANAR_MASK) == (c_space & AVS_CS_PLANAR_FILTER)) : ((p->pixel_type & c_space) == c_space); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_field_based(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->image_type & AVS_IT_FIELDBASED); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_parity_known(const AVS_VideoInfo * p)
|
|
||||||
{ return ((p->image_type & AVS_IT_FIELDBASED)&&(p->image_type & (AVS_IT_BFF | AVS_IT_TFF))); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_bff(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->image_type & AVS_IT_BFF); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_tff(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->image_type & AVS_IT_TFF); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_bits_per_pixel(const AVS_VideoInfo * p)
|
|
||||||
{
|
|
||||||
switch (p->pixel_type) {
|
|
||||||
case AVS_CS_BGR24: return 24;
|
|
||||||
case AVS_CS_BGR32: return 32;
|
|
||||||
case AVS_CS_YUY2: return 16;
|
|
||||||
case AVS_CS_YV12:
|
|
||||||
case AVS_CS_I420: return 12;
|
|
||||||
default: return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
AVSC_INLINE int avs_bytes_from_pixels(const AVS_VideoInfo * p, int pixels)
|
|
||||||
{ return pixels * (avs_bits_per_pixel(p)>>3); } // Will work on planar images, but will return only luma planes
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_row_size(const AVS_VideoInfo * p)
|
|
||||||
{ return avs_bytes_from_pixels(p,p->width); } // Also only returns first plane on planar images
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_bmp_size(const AVS_VideoInfo * vi)
|
|
||||||
{ if (avs_is_planar(vi)) {int p = vi->height * ((avs_row_size(vi)+3) & ~3); p+=p>>1; return p; } return vi->height * ((avs_row_size(vi)+3) & ~3); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_samples_per_second(const AVS_VideoInfo * p)
|
|
||||||
{ return p->audio_samples_per_second; }
|
|
||||||
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_bytes_per_channel_sample(const AVS_VideoInfo * p)
|
|
||||||
{
|
|
||||||
switch (p->sample_type) {
|
|
||||||
case AVS_SAMPLE_INT8: return sizeof(signed char);
|
|
||||||
case AVS_SAMPLE_INT16: return sizeof(signed short);
|
|
||||||
case AVS_SAMPLE_INT24: return 3;
|
|
||||||
case AVS_SAMPLE_INT32: return sizeof(signed int);
|
|
||||||
case AVS_SAMPLE_FLOAT: return sizeof(float);
|
|
||||||
default: return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
AVSC_INLINE int avs_bytes_per_audio_sample(const AVS_VideoInfo * p)
|
|
||||||
{ return p->nchannels*avs_bytes_per_channel_sample(p);}
|
|
||||||
|
|
||||||
AVSC_INLINE INT64 avs_audio_samples_from_frames(const AVS_VideoInfo * p, INT64 frames)
|
|
||||||
{ return ((INT64)(frames) * p->audio_samples_per_second * p->fps_denominator / p->fps_numerator); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, INT64 samples)
|
|
||||||
{ return (int)(samples * (INT64)p->fps_numerator / (INT64)p->fps_denominator / (INT64)p->audio_samples_per_second); }
|
|
||||||
|
|
||||||
AVSC_INLINE INT64 avs_audio_samples_from_bytes(const AVS_VideoInfo * p, INT64 bytes)
|
|
||||||
{ return bytes / avs_bytes_per_audio_sample(p); }
|
|
||||||
|
|
||||||
AVSC_INLINE INT64 avs_bytes_from_audio_samples(const AVS_VideoInfo * p, INT64 samples)
|
|
||||||
{ return samples * avs_bytes_per_audio_sample(p); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_audio_channels(const AVS_VideoInfo * p)
|
|
||||||
{ return p->nchannels; }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_sample_type(const AVS_VideoInfo * p)
|
|
||||||
{ return p->sample_type;}
|
|
||||||
|
|
||||||
// useful mutator
|
|
||||||
AVSC_INLINE void avs_set_property(AVS_VideoInfo * p, int property)
|
|
||||||
{ p->image_type|=property; }
|
|
||||||
|
|
||||||
AVSC_INLINE void avs_clear_property(AVS_VideoInfo * p, int property)
|
|
||||||
{ p->image_type&=~property; }
|
|
||||||
|
|
||||||
AVSC_INLINE void avs_set_field_based(AVS_VideoInfo * p, int isfieldbased)
|
|
||||||
{ if (isfieldbased) p->image_type|=AVS_IT_FIELDBASED; else p->image_type&=~AVS_IT_FIELDBASED; }
|
|
||||||
|
|
||||||
AVSC_INLINE void avs_set_fps(AVS_VideoInfo * p, unsigned numerator, unsigned denominator)
|
|
||||||
{
|
|
||||||
unsigned x=numerator, y=denominator;
|
|
||||||
while (y) { // find gcd
|
|
||||||
unsigned t = x%y; x = y; y = t;
|
|
||||||
}
|
|
||||||
p->fps_numerator = numerator/x;
|
|
||||||
p->fps_denominator = denominator/x;
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_same_colorspace(AVS_VideoInfo * x, AVS_VideoInfo * y)
|
|
||||||
{
|
|
||||||
return (x->pixel_type == y->pixel_type)
|
|
||||||
|| (avs_is_yv12(x) && avs_is_yv12(y));
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_VideoFrame
|
|
||||||
//
|
|
||||||
|
|
||||||
// VideoFrameBuffer holds information about a memory block which is used
|
|
||||||
// for video data. For efficiency, instances of this class are not deleted
|
|
||||||
// when the refcount reaches zero; instead they're stored in a linked list
|
|
||||||
// to be reused. The instances are deleted when the corresponding AVS
|
|
||||||
// file is closed.
|
|
||||||
|
|
||||||
// AVS_VideoFrameBuffer is layed out identicly to VideoFrameBuffer
|
|
||||||
// DO NOT USE THIS STRUCTURE DIRECTLY
|
|
||||||
typedef struct AVS_VideoFrameBuffer {
|
|
||||||
BYTE * data;
|
|
||||||
int data_size;
|
|
||||||
// sequence_number is incremented every time the buffer is changed, so
|
|
||||||
// that stale views can tell they're no longer valid.
|
|
||||||
volatile long sequence_number;
|
|
||||||
|
|
||||||
volatile long refcount;
|
|
||||||
} AVS_VideoFrameBuffer;
|
|
||||||
|
|
||||||
// VideoFrame holds a "window" into a VideoFrameBuffer.
|
|
||||||
|
|
||||||
// AVS_VideoFrame is layed out identicly to IVideoFrame
|
|
||||||
// DO NOT USE THIS STRUCTURE DIRECTLY
|
|
||||||
typedef struct AVS_VideoFrame {
|
|
||||||
volatile long refcount;
|
|
||||||
AVS_VideoFrameBuffer * vfb;
|
|
||||||
int offset, pitch, row_size, height, offsetU, offsetV, pitchUV; // U&V offsets are from top of picture.
|
|
||||||
int row_sizeUV, heightUV;
|
|
||||||
} AVS_VideoFrame;
|
|
||||||
|
|
||||||
// Access functions for AVS_VideoFrame
|
|
||||||
AVSC_INLINE int avs_get_pitch(const AVS_VideoFrame * p) {
|
|
||||||
return p->pitch;}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_pitch_p(const AVS_VideoFrame * p, int plane) {
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: case AVS_PLANAR_V: return p->pitchUV;}
|
|
||||||
return p->pitch;}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_row_size(const AVS_VideoFrame * p) {
|
|
||||||
return p->row_size; }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_row_size_p(const AVS_VideoFrame * p, int plane) {
|
|
||||||
int r;
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: case AVS_PLANAR_V:
|
|
||||||
if (p->pitchUV) return p->row_sizeUV;
|
|
||||||
else return 0;
|
|
||||||
case AVS_PLANAR_U_ALIGNED: case AVS_PLANAR_V_ALIGNED:
|
|
||||||
if (p->pitchUV) {
|
|
||||||
r = (p->row_sizeUV+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize
|
|
||||||
if (r < p->pitchUV)
|
|
||||||
return r;
|
|
||||||
return p->row_sizeUV;
|
|
||||||
} else return 0;
|
|
||||||
case AVS_PLANAR_Y_ALIGNED:
|
|
||||||
r = (p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize
|
|
||||||
if (r <= p->pitch)
|
|
||||||
return r;
|
|
||||||
return p->row_size;
|
|
||||||
}
|
|
||||||
return p->row_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_height(const AVS_VideoFrame * p) {
|
|
||||||
return p->height;}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_height_p(const AVS_VideoFrame * p, int plane) {
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: case AVS_PLANAR_V:
|
|
||||||
if (p->pitchUV) return p->heightUV;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return p->height;}
|
|
||||||
|
|
||||||
AVSC_INLINE const BYTE* avs_get_read_ptr(const AVS_VideoFrame * p) {
|
|
||||||
return p->vfb->data + p->offset;}
|
|
||||||
|
|
||||||
AVSC_INLINE const BYTE* avs_get_read_ptr_p(const AVS_VideoFrame * p, int plane)
|
|
||||||
{
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: return p->vfb->data + p->offsetU;
|
|
||||||
case AVS_PLANAR_V: return p->vfb->data + p->offsetV;
|
|
||||||
default: return p->vfb->data + p->offset;}
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_writable(const AVS_VideoFrame * p) {
|
|
||||||
return (p->refcount == 1 && p->vfb->refcount == 1);}
|
|
||||||
|
|
||||||
AVSC_INLINE BYTE* avs_get_write_ptr(const AVS_VideoFrame * p)
|
|
||||||
{
|
|
||||||
if (avs_is_writable(p)) {
|
|
||||||
++p->vfb->sequence_number;
|
|
||||||
return p->vfb->data + p->offset;
|
|
||||||
} else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE BYTE* avs_get_write_ptr_p(const AVS_VideoFrame * p, int plane)
|
|
||||||
{
|
|
||||||
if (plane==AVS_PLANAR_Y && avs_is_writable(p)) {
|
|
||||||
++p->vfb->sequence_number;
|
|
||||||
return p->vfb->data + p->offset;
|
|
||||||
} else if (plane==AVS_PLANAR_Y) {
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: return p->vfb->data + p->offsetU;
|
|
||||||
case AVS_PLANAR_V: return p->vfb->data + p->offsetV;
|
|
||||||
default: return p->vfb->data + p->offset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
AVSC_API(void, avs_release_video_frame)(AVS_VideoFrame *);
|
|
||||||
// makes a shallow copy of a video frame
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_copy_video_frame)(AVS_VideoFrame *);
|
|
||||||
|
|
||||||
#ifndef AVSC_NO_DECLSPEC
|
|
||||||
AVSC_INLINE void avs_release_frame(AVS_VideoFrame * f)
|
|
||||||
{avs_release_video_frame(f);}
|
|
||||||
AVSC_INLINE AVS_VideoFrame * avs_copy_frame(AVS_VideoFrame * f)
|
|
||||||
{return avs_copy_video_frame(f);}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_Value
|
|
||||||
//
|
|
||||||
|
|
||||||
// Treat AVS_Value as a fat pointer. That is use avs_copy_value
|
|
||||||
// and avs_release_value appropiaty as you would if AVS_Value was
|
|
||||||
// a pointer.
|
|
||||||
|
|
||||||
// To maintain source code compatibility with future versions of the
|
|
||||||
// avisynth_c API don't use the AVS_Value directly. Use the helper
|
|
||||||
// functions below.
|
|
||||||
|
|
||||||
// AVS_Value is layed out identicly to AVSValue
|
|
||||||
typedef struct AVS_Value AVS_Value;
|
|
||||||
struct AVS_Value {
|
|
||||||
short type; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong
|
|
||||||
// for some function e'rror
|
|
||||||
short array_size;
|
|
||||||
union {
|
|
||||||
void * clip; // do not use directly, use avs_take_clip
|
|
||||||
char boolean;
|
|
||||||
int integer;
|
|
||||||
float floating_pt;
|
|
||||||
const char * string;
|
|
||||||
const AVS_Value * array;
|
|
||||||
} d;
|
|
||||||
};
|
|
||||||
|
|
||||||
// AVS_Value should be initilized with avs_void.
|
|
||||||
// Should also set to avs_void after the value is released
|
|
||||||
// with avs_copy_value. Consider it the equalvent of setting
|
|
||||||
// a pointer to NULL
|
|
||||||
static const AVS_Value avs_void = {'v'};
|
|
||||||
|
|
||||||
AVSC_API(void, avs_copy_value)(AVS_Value * dest, AVS_Value src);
|
|
||||||
AVSC_API(void, avs_release_value)(AVS_Value);
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_defined(AVS_Value v) { return v.type != 'v'; }
|
|
||||||
AVSC_INLINE int avs_is_clip(AVS_Value v) { return v.type == 'c'; }
|
|
||||||
AVSC_INLINE int avs_is_bool(AVS_Value v) { return v.type == 'b'; }
|
|
||||||
AVSC_INLINE int avs_is_int(AVS_Value v) { return v.type == 'i'; }
|
|
||||||
AVSC_INLINE int avs_is_float(AVS_Value v) { return v.type == 'f' || v.type == 'i'; }
|
|
||||||
AVSC_INLINE int avs_is_string(AVS_Value v) { return v.type == 's'; }
|
|
||||||
AVSC_INLINE int avs_is_array(AVS_Value v) { return v.type == 'a'; }
|
|
||||||
AVSC_INLINE int avs_is_error(AVS_Value v) { return v.type == 'e'; }
|
|
||||||
|
|
||||||
AVSC_API(AVS_Clip *, avs_take_clip)(AVS_Value, AVS_ScriptEnvironment *);
|
|
||||||
AVSC_API(void, avs_set_to_clip)(AVS_Value *, AVS_Clip *);
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_as_bool(AVS_Value v)
|
|
||||||
{ return v.d.boolean; }
|
|
||||||
AVSC_INLINE int avs_as_int(AVS_Value v)
|
|
||||||
{ return v.d.integer; }
|
|
||||||
AVSC_INLINE const char * avs_as_string(AVS_Value v)
|
|
||||||
{ return avs_is_error(v) || avs_is_string(v) ? v.d.string : 0; }
|
|
||||||
AVSC_INLINE double avs_as_float(AVS_Value v)
|
|
||||||
{ return avs_is_int(v) ? v.d.integer : v.d.floating_pt; }
|
|
||||||
AVSC_INLINE const char * avs_as_error(AVS_Value v)
|
|
||||||
{ return avs_is_error(v) ? v.d.string : 0; }
|
|
||||||
AVSC_INLINE const AVS_Value * avs_as_array(AVS_Value v)
|
|
||||||
{ return v.d.array; }
|
|
||||||
AVSC_INLINE int avs_array_size(AVS_Value v)
|
|
||||||
{ return avs_is_array(v) ? v.array_size : 1; }
|
|
||||||
AVSC_INLINE AVS_Value avs_array_elt(AVS_Value v, int index)
|
|
||||||
{ return avs_is_array(v) ? v.d.array[index] : v; }
|
|
||||||
|
|
||||||
// only use these functions on an AVS_Value that does not already have
|
|
||||||
// an active value. Remember, treat AVS_Value as a fat pointer.
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_bool(int v0)
|
|
||||||
{ AVS_Value v; v.type = 'b'; v.d.boolean = v0 == 0 ? 0 : 1; return v; }
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_int(int v0)
|
|
||||||
{ AVS_Value v; v.type = 'i'; v.d.integer = v0; return v; }
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_string(const char * v0)
|
|
||||||
{ AVS_Value v; v.type = 's'; v.d.string = v0; return v; }
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_float(float v0)
|
|
||||||
{ AVS_Value v; v.type = 'f'; v.d.floating_pt = v0; return v;}
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_error(const char * v0)
|
|
||||||
{ AVS_Value v; v.type = 'e'; v.d.string = v0; return v; }
|
|
||||||
#ifndef AVSC_NO_DECLSPEC
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_clip(AVS_Clip * v0)
|
|
||||||
{ AVS_Value v; avs_set_to_clip(&v, v0); return v; }
|
|
||||||
#endif
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_array(AVS_Value * v0, int size)
|
|
||||||
{ AVS_Value v; v.type = 'a'; v.d.array = v0; v.array_size = size; return v; }
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_Clip
|
|
||||||
//
|
|
||||||
|
|
||||||
AVSC_API(void, avs_release_clip)(AVS_Clip *);
|
|
||||||
AVSC_API(AVS_Clip *, avs_copy_clip)(AVS_Clip *);
|
|
||||||
|
|
||||||
AVSC_API(const char *, avs_clip_get_error)(AVS_Clip *); // return 0 if no error
|
|
||||||
|
|
||||||
AVSC_API(const AVS_VideoInfo *, avs_get_video_info)(AVS_Clip *);
|
|
||||||
|
|
||||||
AVSC_API(int, avs_get_version)(AVS_Clip *);
|
|
||||||
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_get_frame)(AVS_Clip *, int n);
|
|
||||||
// The returned video frame must be released with avs_release_video_frame
|
|
||||||
|
|
||||||
AVSC_API(int, avs_get_parity)(AVS_Clip *, int n);
|
|
||||||
// return field parity if field_based, else parity of first field in frame
|
|
||||||
|
|
||||||
AVSC_API(int, avs_get_audio)(AVS_Clip *, void * buf,
|
|
||||||
INT64 start, INT64 count);
|
|
||||||
// start and count are in samples
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_cache_hints)(AVS_Clip *,
|
|
||||||
int cachehints, int frame_range);
|
|
||||||
|
|
||||||
// This is the callback type used by avs_add_function
|
|
||||||
typedef AVS_Value (AVSC_CC * AVS_ApplyFunc)
|
|
||||||
(AVS_ScriptEnvironment *, AVS_Value args, void * user_data);
|
|
||||||
|
|
||||||
typedef struct AVS_FilterInfo AVS_FilterInfo;
|
|
||||||
struct AVS_FilterInfo
|
|
||||||
{
|
|
||||||
// these members should not be modified outside of the AVS_ApplyFunc callback
|
|
||||||
AVS_Clip * child;
|
|
||||||
AVS_VideoInfo vi;
|
|
||||||
AVS_ScriptEnvironment * env;
|
|
||||||
AVS_VideoFrame * (AVSC_CC * get_frame)(AVS_FilterInfo *, int n);
|
|
||||||
int (AVSC_CC * get_parity)(AVS_FilterInfo *, int n);
|
|
||||||
int (AVSC_CC * get_audio)(AVS_FilterInfo *, void * buf,
|
|
||||||
INT64 start, INT64 count);
|
|
||||||
int (AVSC_CC * set_cache_hints)(AVS_FilterInfo *, int cachehints,
|
|
||||||
int frame_range);
|
|
||||||
void (AVSC_CC * free_filter)(AVS_FilterInfo *);
|
|
||||||
|
|
||||||
// Should be set when ever there is an error to report.
|
|
||||||
// It is cleared before any of the above methods are called
|
|
||||||
const char * error;
|
|
||||||
// this is to store whatever and may be modified at will
|
|
||||||
void * user_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Create a new filter
|
|
||||||
// fi is set to point to the AVS_FilterInfo so that you can
|
|
||||||
// modify it once it is initilized.
|
|
||||||
// store_child should generally be set to true. If it is not
|
|
||||||
// set than ALL methods (the function pointers) must be defined
|
|
||||||
// If it is set than you do not need to worry about freeing the child
|
|
||||||
// clip.
|
|
||||||
AVSC_API(AVS_Clip *, avs_new_c_filter)(AVS_ScriptEnvironment * e,
|
|
||||||
AVS_FilterInfo * * fi,
|
|
||||||
AVS_Value child, int store_child);
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_ScriptEnvironment
|
|
||||||
//
|
|
||||||
|
|
||||||
// For GetCPUFlags. These are backwards-compatible with those in VirtualDub.
|
|
||||||
enum {
|
|
||||||
/* slowest CPU to support extension */
|
|
||||||
AVS_CPU_FORCE = 0x01, // N/A
|
|
||||||
AVS_CPU_FPU = 0x02, // 386/486DX
|
|
||||||
AVS_CPU_MMX = 0x04, // P55C, K6, PII
|
|
||||||
AVS_CPU_INTEGER_SSE = 0x08, // PIII, Athlon
|
|
||||||
AVS_CPU_SSE = 0x10, // PIII, Athlon XP/MP
|
|
||||||
AVS_CPU_SSE2 = 0x20, // PIV, Hammer
|
|
||||||
AVS_CPU_3DNOW = 0x40, // K6-2
|
|
||||||
AVS_CPU_3DNOW_EXT = 0x80, // Athlon
|
|
||||||
AVS_CPU_X86_64 = 0xA0, // Hammer (note: equiv. to 3DNow + SSE2,
|
|
||||||
// which only Hammer will have anyway)
|
|
||||||
AVS_CPUF_SSE3 = 0x100, // PIV+, K8 Venice
|
|
||||||
AVS_CPUF_SSSE3 = 0x200, // Core 2
|
|
||||||
AVS_CPUF_SSE4 = 0x400, // Penryn, Wolfdale, Yorkfield
|
|
||||||
AVS_CPUF_SSE4_1 = 0x400,
|
|
||||||
AVS_CPUF_SSE4_2 = 0x800, // Nehalem
|
|
||||||
};
|
|
||||||
|
|
||||||
AVSC_API(const char *, avs_get_error)(AVS_ScriptEnvironment *); // return 0 if no error
|
|
||||||
|
|
||||||
AVSC_API(long, avs_get_cpu_flags)(AVS_ScriptEnvironment *);
|
|
||||||
AVSC_API(int, avs_check_version)(AVS_ScriptEnvironment *, int version);
|
|
||||||
|
|
||||||
AVSC_API(char *, avs_save_string)(AVS_ScriptEnvironment *, const char* s, int length);
|
|
||||||
AVSC_API(char *, avs_sprintf)(AVS_ScriptEnvironment *, const char * fmt, ...);
|
|
||||||
|
|
||||||
AVSC_API(char *, avs_vsprintf)(AVS_ScriptEnvironment *, const char * fmt, void* val);
|
|
||||||
// note: val is really a va_list; I hope everyone typedefs va_list to a pointer
|
|
||||||
|
|
||||||
AVSC_API(int, avs_add_function)(AVS_ScriptEnvironment *,
|
|
||||||
const char * name, const char * params,
|
|
||||||
AVS_ApplyFunc apply, void * user_data);
|
|
||||||
|
|
||||||
AVSC_API(int, avs_function_exists)(AVS_ScriptEnvironment *, const char * name);
|
|
||||||
|
|
||||||
AVSC_API(AVS_Value, avs_invoke)(AVS_ScriptEnvironment *, const char * name,
|
|
||||||
AVS_Value args, const char** arg_names);
|
|
||||||
// The returned value must be be released with avs_release_value
|
|
||||||
|
|
||||||
AVSC_API(AVS_Value, avs_get_var)(AVS_ScriptEnvironment *, const char* name);
|
|
||||||
// The returned value must be be released with avs_release_value
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_var)(AVS_ScriptEnvironment *, const char* name, AVS_Value val);
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_global_var)(AVS_ScriptEnvironment *, const char* name, const AVS_Value val);
|
|
||||||
|
|
||||||
//void avs_push_context(AVS_ScriptEnvironment *, int level=0);
|
|
||||||
//void avs_pop_context(AVS_ScriptEnvironment *);
|
|
||||||
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_new_video_frame_a)(AVS_ScriptEnvironment *,
|
|
||||||
const AVS_VideoInfo * vi, int align);
|
|
||||||
// align should be at least 16
|
|
||||||
|
|
||||||
#ifndef AVSC_NO_DECLSPEC
|
|
||||||
AVSC_INLINE
|
|
||||||
AVS_VideoFrame * avs_new_video_frame(AVS_ScriptEnvironment * env,
|
|
||||||
const AVS_VideoInfo * vi)
|
|
||||||
{return avs_new_video_frame_a(env,vi,AVS_FRAME_ALIGN);}
|
|
||||||
|
|
||||||
AVSC_INLINE
|
|
||||||
AVS_VideoFrame * avs_new_frame(AVS_ScriptEnvironment * env,
|
|
||||||
const AVS_VideoInfo * vi)
|
|
||||||
{return avs_new_video_frame_a(env,vi,AVS_FRAME_ALIGN);}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
AVSC_API(int, avs_make_writable)(AVS_ScriptEnvironment *, AVS_VideoFrame * * pvf);
|
|
||||||
|
|
||||||
AVSC_API(void, avs_bit_blt)(AVS_ScriptEnvironment *, BYTE* dstp, int dst_pitch, const BYTE* srcp, int src_pitch, int row_size, int height);
|
|
||||||
|
|
||||||
typedef void (AVSC_CC *AVS_ShutdownFunc)(void* user_data, AVS_ScriptEnvironment * env);
|
|
||||||
AVSC_API(void, avs_at_exit)(AVS_ScriptEnvironment *, AVS_ShutdownFunc function, void * user_data);
|
|
||||||
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_subframe)(AVS_ScriptEnvironment *, AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int new_height);
|
|
||||||
// The returned video frame must be be released
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_memory_max)(AVS_ScriptEnvironment *, int mem);
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_working_dir)(AVS_ScriptEnvironment *, const char * newdir);
|
|
||||||
|
|
||||||
// avisynth.dll exports this; it's a way to use it as a library, without
|
|
||||||
// writing an AVS script or without going through AVIFile.
|
|
||||||
AVSC_API(AVS_ScriptEnvironment *, avs_create_script_environment)(int version);
|
|
||||||
|
|
||||||
// this symbol is the entry point for the plugin and must
|
|
||||||
// be defined
|
|
||||||
AVSC_EXPORT
|
|
||||||
const char * AVSC_CC avisynth_c_plugin_init(AVS_ScriptEnvironment* env);
|
|
||||||
|
|
||||||
|
|
||||||
AVSC_API(void, avs_delete_script_environment)(AVS_ScriptEnvironment *);
|
|
||||||
|
|
||||||
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_subframe_planar)(AVS_ScriptEnvironment *, AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV);
|
|
||||||
// The returned video frame must be be released
|
|
||||||
|
|
||||||
#ifdef AVSC_NO_DECLSPEC
|
|
||||||
// use LoadLibrary and related functions to dynamically load Avisynth instead of declspec(dllimport)
|
|
||||||
/*
|
|
||||||
The following functions needs to have been declared, probably from windows.h
|
|
||||||
|
|
||||||
void* malloc(size_t)
|
|
||||||
void free(void*);
|
|
||||||
|
|
||||||
HMODULE LoadLibrary(const char*);
|
|
||||||
void* GetProcAddress(HMODULE, const char*);
|
|
||||||
FreeLibrary(HMODULE);
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct AVS_Library AVS_Library;
|
|
||||||
|
|
||||||
#define AVSC_DECLARE_FUNC(name) name##_func name
|
|
||||||
|
|
||||||
struct AVS_Library {
|
|
||||||
HMODULE handle;
|
|
||||||
|
|
||||||
AVSC_DECLARE_FUNC(avs_add_function);
|
|
||||||
AVSC_DECLARE_FUNC(avs_at_exit);
|
|
||||||
AVSC_DECLARE_FUNC(avs_bit_blt);
|
|
||||||
AVSC_DECLARE_FUNC(avs_check_version);
|
|
||||||
AVSC_DECLARE_FUNC(avs_clip_get_error);
|
|
||||||
AVSC_DECLARE_FUNC(avs_copy_clip);
|
|
||||||
AVSC_DECLARE_FUNC(avs_copy_value);
|
|
||||||
AVSC_DECLARE_FUNC(avs_copy_video_frame);
|
|
||||||
AVSC_DECLARE_FUNC(avs_create_script_environment);
|
|
||||||
AVSC_DECLARE_FUNC(avs_delete_script_environment);
|
|
||||||
AVSC_DECLARE_FUNC(avs_function_exists);
|
|
||||||
AVSC_DECLARE_FUNC(avs_get_audio);
|
|
||||||
AVSC_DECLARE_FUNC(avs_get_cpu_flags);
|
|
||||||
AVSC_DECLARE_FUNC(avs_get_error);
|
|
||||||
AVSC_DECLARE_FUNC(avs_get_frame);
|
|
||||||
AVSC_DECLARE_FUNC(avs_get_parity);
|
|
||||||
AVSC_DECLARE_FUNC(avs_get_var);
|
|
||||||
AVSC_DECLARE_FUNC(avs_get_version);
|
|
||||||
AVSC_DECLARE_FUNC(avs_get_video_info);
|
|
||||||
AVSC_DECLARE_FUNC(avs_invoke);
|
|
||||||
AVSC_DECLARE_FUNC(avs_make_writable);
|
|
||||||
AVSC_DECLARE_FUNC(avs_new_c_filter);
|
|
||||||
AVSC_DECLARE_FUNC(avs_new_video_frame_a);
|
|
||||||
AVSC_DECLARE_FUNC(avs_release_clip);
|
|
||||||
AVSC_DECLARE_FUNC(avs_release_value);
|
|
||||||
AVSC_DECLARE_FUNC(avs_release_video_frame);
|
|
||||||
AVSC_DECLARE_FUNC(avs_save_string);
|
|
||||||
AVSC_DECLARE_FUNC(avs_set_cache_hints);
|
|
||||||
AVSC_DECLARE_FUNC(avs_set_global_var);
|
|
||||||
AVSC_DECLARE_FUNC(avs_set_memory_max);
|
|
||||||
AVSC_DECLARE_FUNC(avs_set_to_clip);
|
|
||||||
AVSC_DECLARE_FUNC(avs_set_var);
|
|
||||||
AVSC_DECLARE_FUNC(avs_set_working_dir);
|
|
||||||
AVSC_DECLARE_FUNC(avs_sprintf);
|
|
||||||
AVSC_DECLARE_FUNC(avs_subframe);
|
|
||||||
AVSC_DECLARE_FUNC(avs_subframe_planar);
|
|
||||||
AVSC_DECLARE_FUNC(avs_take_clip);
|
|
||||||
AVSC_DECLARE_FUNC(avs_vsprintf);
|
|
||||||
};
|
|
||||||
|
|
||||||
#undef AVSC_DECLARE_FUNC
|
|
||||||
|
|
||||||
|
|
||||||
AVSC_INLINE AVS_Library * avs_load_library() {
|
|
||||||
AVS_Library *library = (AVS_Library *)malloc(sizeof(AVS_Library));
|
|
||||||
if (library == NULL)
|
|
||||||
return NULL;
|
|
||||||
library->handle = LoadLibrary("avisynth");
|
|
||||||
if (library->handle == NULL)
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
#define __AVSC_STRINGIFY(x) #x
|
|
||||||
#define AVSC_STRINGIFY(x) __AVSC_STRINGIFY(x)
|
|
||||||
#define AVSC_LOAD_FUNC(name) {\
|
|
||||||
library->name = (name##_func) GetProcAddress(library->handle, AVSC_STRINGIFY(name));\
|
|
||||||
if (library->name == NULL)\
|
|
||||||
goto fail;\
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_LOAD_FUNC(avs_add_function);
|
|
||||||
AVSC_LOAD_FUNC(avs_at_exit);
|
|
||||||
AVSC_LOAD_FUNC(avs_bit_blt);
|
|
||||||
AVSC_LOAD_FUNC(avs_check_version);
|
|
||||||
AVSC_LOAD_FUNC(avs_clip_get_error);
|
|
||||||
AVSC_LOAD_FUNC(avs_copy_clip);
|
|
||||||
AVSC_LOAD_FUNC(avs_copy_value);
|
|
||||||
AVSC_LOAD_FUNC(avs_copy_video_frame);
|
|
||||||
AVSC_LOAD_FUNC(avs_create_script_environment);
|
|
||||||
AVSC_LOAD_FUNC(avs_delete_script_environment);
|
|
||||||
AVSC_LOAD_FUNC(avs_function_exists);
|
|
||||||
AVSC_LOAD_FUNC(avs_get_audio);
|
|
||||||
AVSC_LOAD_FUNC(avs_get_cpu_flags);
|
|
||||||
AVSC_LOAD_FUNC(avs_get_error);
|
|
||||||
AVSC_LOAD_FUNC(avs_get_frame);
|
|
||||||
AVSC_LOAD_FUNC(avs_get_parity);
|
|
||||||
AVSC_LOAD_FUNC(avs_get_var);
|
|
||||||
AVSC_LOAD_FUNC(avs_get_version);
|
|
||||||
AVSC_LOAD_FUNC(avs_get_video_info);
|
|
||||||
AVSC_LOAD_FUNC(avs_invoke);
|
|
||||||
AVSC_LOAD_FUNC(avs_make_writable);
|
|
||||||
AVSC_LOAD_FUNC(avs_new_c_filter);
|
|
||||||
AVSC_LOAD_FUNC(avs_new_video_frame_a);
|
|
||||||
AVSC_LOAD_FUNC(avs_release_clip);
|
|
||||||
AVSC_LOAD_FUNC(avs_release_value);
|
|
||||||
AVSC_LOAD_FUNC(avs_release_video_frame);
|
|
||||||
AVSC_LOAD_FUNC(avs_save_string);
|
|
||||||
AVSC_LOAD_FUNC(avs_set_cache_hints);
|
|
||||||
AVSC_LOAD_FUNC(avs_set_global_var);
|
|
||||||
AVSC_LOAD_FUNC(avs_set_memory_max);
|
|
||||||
AVSC_LOAD_FUNC(avs_set_to_clip);
|
|
||||||
AVSC_LOAD_FUNC(avs_set_var);
|
|
||||||
AVSC_LOAD_FUNC(avs_set_working_dir);
|
|
||||||
AVSC_LOAD_FUNC(avs_sprintf);
|
|
||||||
AVSC_LOAD_FUNC(avs_subframe);
|
|
||||||
AVSC_LOAD_FUNC(avs_subframe_planar);
|
|
||||||
AVSC_LOAD_FUNC(avs_take_clip);
|
|
||||||
AVSC_LOAD_FUNC(avs_vsprintf);
|
|
||||||
|
|
||||||
#undef __AVSC_STRINGIFY
|
|
||||||
#undef AVSC_STRINGIFY
|
|
||||||
#undef AVSC_LOAD_FUNC
|
|
||||||
|
|
||||||
return library;
|
|
||||||
|
|
||||||
fail:
|
|
||||||
free(library);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE void avs_free_library(AVS_Library *library) {
|
|
||||||
if (library == NULL)
|
|
||||||
return;
|
|
||||||
FreeLibrary(library->handle);
|
|
||||||
free(library);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
// Copyright (c) 2011 FFmpegSource Project
|
|
||||||
//
|
|
||||||
// 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.
|
|
||||||
|
|
||||||
/* these are defines/functions that are used and were changed in the switch to 2.6
|
|
||||||
* and are needed to maintain full compatility with 2.5 */
|
|
||||||
|
|
||||||
enum {
|
|
||||||
AVS_CS_YV12_25 = 1<<3 | AVS_CS_YUV | AVS_CS_PLANAR, // y-v-u, planar
|
|
||||||
AVS_CS_I420_25 = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR, // y-u-v, planar
|
|
||||||
};
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_height_p_25(const AVS_VideoFrame * p, int plane) {
|
|
||||||
switch (plane)
|
|
||||||
{
|
|
||||||
case AVS_PLANAR_U: case AVS_PLANAR_V:
|
|
||||||
if (p->pitchUV)
|
|
||||||
return p->height>>1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return p->height;}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_row_size_p_25(const AVS_VideoFrame * p, int plane) {
|
|
||||||
int r;
|
|
||||||
switch (plane)
|
|
||||||
{
|
|
||||||
case AVS_PLANAR_U: case AVS_PLANAR_V:
|
|
||||||
if (p->pitchUV)
|
|
||||||
return p->row_size>>1;
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
case AVS_PLANAR_U_ALIGNED: case AVS_PLANAR_V_ALIGNED:
|
|
||||||
if (p->pitchUV)
|
|
||||||
{
|
|
||||||
r = ((p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)) )>>1; // Aligned rowsize
|
|
||||||
if (r < p->pitchUV)
|
|
||||||
return r;
|
|
||||||
return p->row_size>>1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return 0;
|
|
||||||
case AVS_PLANAR_Y_ALIGNED:
|
|
||||||
r = (p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize
|
|
||||||
if (r <= p->pitch)
|
|
||||||
return r;
|
|
||||||
return p->row_size;
|
|
||||||
}
|
|
||||||
return p->row_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yv12_25(const AVS_VideoInfo * p)
|
|
||||||
{ return ((p->pixel_type & AVS_CS_YV12_25) == AVS_CS_YV12_25)||((p->pixel_type & AVS_CS_I420_25) == AVS_CS_I420_25); }
|
|
||||||
@@ -1,727 +0,0 @@
|
|||||||
// Avisynth C Interface Version 0.20
|
|
||||||
// Copyright 2003 Kevin Atkinson
|
|
||||||
|
|
||||||
// This program is free software; you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation; either version 2 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program 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 General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
|
|
||||||
// http://www.gnu.org/copyleft/gpl.html .
|
|
||||||
//
|
|
||||||
// As a special exception, I give you permission to link to the
|
|
||||||
// Avisynth C interface with independent modules that communicate with
|
|
||||||
// the Avisynth C interface solely through the interfaces defined in
|
|
||||||
// avisynth_c.h, regardless of the license terms of these independent
|
|
||||||
// modules, and to copy and distribute the resulting combined work
|
|
||||||
// under terms of your choice, provided that every copy of the
|
|
||||||
// combined work is accompanied by a complete copy of the source code
|
|
||||||
// of the Avisynth C interface and Avisynth itself (with the version
|
|
||||||
// used to produce the combined work), being distributed under the
|
|
||||||
// terms of the GNU General Public License plus this exception. An
|
|
||||||
// independent module is a module which is not derived from or based
|
|
||||||
// on Avisynth C Interface, such as 3rd-party filters, import and
|
|
||||||
// export plugins, or graphical user interfaces.
|
|
||||||
|
|
||||||
#ifndef __AVXSYNTH_C__
|
|
||||||
#define __AVXSYNTH_C__
|
|
||||||
|
|
||||||
#include "windowsPorts/windows2linux.h"
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
# define EXTERN_C extern "C"
|
|
||||||
#else
|
|
||||||
# define EXTERN_C
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define AVSC_USE_STDCALL 1
|
|
||||||
|
|
||||||
#ifndef AVSC_USE_STDCALL
|
|
||||||
# define AVSC_CC __cdecl
|
|
||||||
#else
|
|
||||||
# define AVSC_CC __stdcall
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define AVSC_INLINE static __inline
|
|
||||||
|
|
||||||
#ifdef AVISYNTH_C_EXPORTS
|
|
||||||
# define AVSC_EXPORT EXTERN_C
|
|
||||||
# define AVSC_API(ret, name) EXTERN_C __declspec(dllexport) ret AVSC_CC name
|
|
||||||
#else
|
|
||||||
# define AVSC_EXPORT EXTERN_C __declspec(dllexport)
|
|
||||||
# ifndef AVSC_NO_DECLSPEC
|
|
||||||
# define AVSC_API(ret, name) EXTERN_C __declspec(dllimport) ret AVSC_CC name
|
|
||||||
# else
|
|
||||||
# define AVSC_API(ret, name) typedef ret (AVSC_CC *name##_func)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
typedef long long int INT64;
|
|
||||||
#else
|
|
||||||
typedef __int64 INT64;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Constants
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef __AVXSYNTH_H__
|
|
||||||
enum { AVISYNTH_INTERFACE_VERSION = 3 };
|
|
||||||
#endif
|
|
||||||
|
|
||||||
enum {AVS_SAMPLE_INT8 = 1<<0,
|
|
||||||
AVS_SAMPLE_INT16 = 1<<1,
|
|
||||||
AVS_SAMPLE_INT24 = 1<<2,
|
|
||||||
AVS_SAMPLE_INT32 = 1<<3,
|
|
||||||
AVS_SAMPLE_FLOAT = 1<<4};
|
|
||||||
|
|
||||||
enum {AVS_PLANAR_Y=1<<0,
|
|
||||||
AVS_PLANAR_U=1<<1,
|
|
||||||
AVS_PLANAR_V=1<<2,
|
|
||||||
AVS_PLANAR_ALIGNED=1<<3,
|
|
||||||
AVS_PLANAR_Y_ALIGNED=AVS_PLANAR_Y|AVS_PLANAR_ALIGNED,
|
|
||||||
AVS_PLANAR_U_ALIGNED=AVS_PLANAR_U|AVS_PLANAR_ALIGNED,
|
|
||||||
AVS_PLANAR_V_ALIGNED=AVS_PLANAR_V|AVS_PLANAR_ALIGNED};
|
|
||||||
|
|
||||||
// Colorspace properties.
|
|
||||||
enum {AVS_CS_BGR = 1<<28,
|
|
||||||
AVS_CS_YUV = 1<<29,
|
|
||||||
AVS_CS_INTERLEAVED = 1<<30,
|
|
||||||
AVS_CS_PLANAR = 1<<31};
|
|
||||||
|
|
||||||
// Specific colorformats
|
|
||||||
enum {
|
|
||||||
AVS_CS_UNKNOWN = 0,
|
|
||||||
AVS_CS_BGR24 = 1<<0 | AVS_CS_BGR | AVS_CS_INTERLEAVED,
|
|
||||||
AVS_CS_BGR32 = 1<<1 | AVS_CS_BGR | AVS_CS_INTERLEAVED,
|
|
||||||
AVS_CS_YUY2 = 1<<2 | AVS_CS_YUV | AVS_CS_INTERLEAVED,
|
|
||||||
AVS_CS_YV12 = 1<<3 | AVS_CS_YUV | AVS_CS_PLANAR, // y-v-u, planar
|
|
||||||
AVS_CS_I420 = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR, // y-u-v, planar
|
|
||||||
AVS_CS_IYUV = 1<<4 | AVS_CS_YUV | AVS_CS_PLANAR // same as above
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
AVS_IT_BFF = 1<<0,
|
|
||||||
AVS_IT_TFF = 1<<1,
|
|
||||||
AVS_IT_FIELDBASED = 1<<2};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
AVS_FILTER_TYPE=1,
|
|
||||||
AVS_FILTER_INPUT_COLORSPACE=2,
|
|
||||||
AVS_FILTER_OUTPUT_TYPE=9,
|
|
||||||
AVS_FILTER_NAME=4,
|
|
||||||
AVS_FILTER_AUTHOR=5,
|
|
||||||
AVS_FILTER_VERSION=6,
|
|
||||||
AVS_FILTER_ARGS=7,
|
|
||||||
AVS_FILTER_ARGS_INFO=8,
|
|
||||||
AVS_FILTER_ARGS_DESCRIPTION=10,
|
|
||||||
AVS_FILTER_DESCRIPTION=11};
|
|
||||||
|
|
||||||
enum { //SUBTYPES
|
|
||||||
AVS_FILTER_TYPE_AUDIO=1,
|
|
||||||
AVS_FILTER_TYPE_VIDEO=2,
|
|
||||||
AVS_FILTER_OUTPUT_TYPE_SAME=3,
|
|
||||||
AVS_FILTER_OUTPUT_TYPE_DIFFERENT=4};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
AVS_CACHE_NOTHING=0,
|
|
||||||
AVS_CACHE_RANGE=1,
|
|
||||||
AVS_CACHE_ALL=2,
|
|
||||||
AVS_CACHE_AUDIO=3,
|
|
||||||
AVS_CACHE_AUDIO_NONE=4,
|
|
||||||
AVS_CACHE_AUDIO_AUTO=5
|
|
||||||
};
|
|
||||||
|
|
||||||
#define AVS_FRAME_ALIGN 16
|
|
||||||
|
|
||||||
typedef struct AVS_Clip AVS_Clip;
|
|
||||||
typedef struct AVS_ScriptEnvironment AVS_ScriptEnvironment;
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_VideoInfo
|
|
||||||
//
|
|
||||||
|
|
||||||
// AVS_VideoInfo is layed out identicly to VideoInfo
|
|
||||||
typedef struct AVS_VideoInfo {
|
|
||||||
int width, height; // width=0 means no video
|
|
||||||
unsigned fps_numerator, fps_denominator;
|
|
||||||
int num_frames;
|
|
||||||
|
|
||||||
int pixel_type;
|
|
||||||
|
|
||||||
int audio_samples_per_second; // 0 means no audio
|
|
||||||
int sample_type;
|
|
||||||
INT64 num_audio_samples;
|
|
||||||
int nchannels;
|
|
||||||
|
|
||||||
// Imagetype properties
|
|
||||||
|
|
||||||
int image_type;
|
|
||||||
} AVS_VideoInfo;
|
|
||||||
|
|
||||||
// useful functions of the above
|
|
||||||
AVSC_INLINE int avs_has_video(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->width!=0); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_has_audio(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->audio_samples_per_second!=0); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_rgb(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->pixel_type&AVS_CS_BGR); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_rgb24(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type&AVS_CS_BGR24)==AVS_CS_BGR24; } // Clear out additional properties
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_rgb32(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type & AVS_CS_BGR32) == AVS_CS_BGR32 ; }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yuv(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->pixel_type&AVS_CS_YUV ); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yuy2(const AVS_VideoInfo * p)
|
|
||||||
{ return (p->pixel_type & AVS_CS_YUY2) == AVS_CS_YUY2; }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_yv12(const AVS_VideoInfo * p)
|
|
||||||
{ return ((p->pixel_type & AVS_CS_YV12) == AVS_CS_YV12)||((p->pixel_type & AVS_CS_I420) == AVS_CS_I420); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_color_space(const AVS_VideoInfo * p, int c_space)
|
|
||||||
{ return ((p->pixel_type & c_space) == c_space); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_property(const AVS_VideoInfo * p, int property)
|
|
||||||
{ return ((p->pixel_type & property)==property ); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_planar(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->pixel_type & AVS_CS_PLANAR); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_field_based(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->image_type & AVS_IT_FIELDBASED); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_parity_known(const AVS_VideoInfo * p)
|
|
||||||
{ return ((p->image_type & AVS_IT_FIELDBASED)&&(p->image_type & (AVS_IT_BFF | AVS_IT_TFF))); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_bff(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->image_type & AVS_IT_BFF); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_tff(const AVS_VideoInfo * p)
|
|
||||||
{ return !!(p->image_type & AVS_IT_TFF); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_bits_per_pixel(const AVS_VideoInfo * p)
|
|
||||||
{
|
|
||||||
switch (p->pixel_type) {
|
|
||||||
case AVS_CS_BGR24: return 24;
|
|
||||||
case AVS_CS_BGR32: return 32;
|
|
||||||
case AVS_CS_YUY2: return 16;
|
|
||||||
case AVS_CS_YV12:
|
|
||||||
case AVS_CS_I420: return 12;
|
|
||||||
default: return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
AVSC_INLINE int avs_bytes_from_pixels(const AVS_VideoInfo * p, int pixels)
|
|
||||||
{ return pixels * (avs_bits_per_pixel(p)>>3); } // Will work on planar images, but will return only luma planes
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_row_size(const AVS_VideoInfo * p)
|
|
||||||
{ return avs_bytes_from_pixels(p,p->width); } // Also only returns first plane on planar images
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_bmp_size(const AVS_VideoInfo * vi)
|
|
||||||
{ if (avs_is_planar(vi)) {int p = vi->height * ((avs_row_size(vi)+3) & ~3); p+=p>>1; return p; } return vi->height * ((avs_row_size(vi)+3) & ~3); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_samples_per_second(const AVS_VideoInfo * p)
|
|
||||||
{ return p->audio_samples_per_second; }
|
|
||||||
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_bytes_per_channel_sample(const AVS_VideoInfo * p)
|
|
||||||
{
|
|
||||||
switch (p->sample_type) {
|
|
||||||
case AVS_SAMPLE_INT8: return sizeof(signed char);
|
|
||||||
case AVS_SAMPLE_INT16: return sizeof(signed short);
|
|
||||||
case AVS_SAMPLE_INT24: return 3;
|
|
||||||
case AVS_SAMPLE_INT32: return sizeof(signed int);
|
|
||||||
case AVS_SAMPLE_FLOAT: return sizeof(float);
|
|
||||||
default: return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
AVSC_INLINE int avs_bytes_per_audio_sample(const AVS_VideoInfo * p)
|
|
||||||
{ return p->nchannels*avs_bytes_per_channel_sample(p);}
|
|
||||||
|
|
||||||
AVSC_INLINE INT64 avs_audio_samples_from_frames(const AVS_VideoInfo * p, INT64 frames)
|
|
||||||
{ return ((INT64)(frames) * p->audio_samples_per_second * p->fps_denominator / p->fps_numerator); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_frames_from_audio_samples(const AVS_VideoInfo * p, INT64 samples)
|
|
||||||
{ return (int)(samples * (INT64)p->fps_numerator / (INT64)p->fps_denominator / (INT64)p->audio_samples_per_second); }
|
|
||||||
|
|
||||||
AVSC_INLINE INT64 avs_audio_samples_from_bytes(const AVS_VideoInfo * p, INT64 bytes)
|
|
||||||
{ return bytes / avs_bytes_per_audio_sample(p); }
|
|
||||||
|
|
||||||
AVSC_INLINE INT64 avs_bytes_from_audio_samples(const AVS_VideoInfo * p, INT64 samples)
|
|
||||||
{ return samples * avs_bytes_per_audio_sample(p); }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_audio_channels(const AVS_VideoInfo * p)
|
|
||||||
{ return p->nchannels; }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_sample_type(const AVS_VideoInfo * p)
|
|
||||||
{ return p->sample_type;}
|
|
||||||
|
|
||||||
// useful mutator
|
|
||||||
AVSC_INLINE void avs_set_property(AVS_VideoInfo * p, int property)
|
|
||||||
{ p->image_type|=property; }
|
|
||||||
|
|
||||||
AVSC_INLINE void avs_clear_property(AVS_VideoInfo * p, int property)
|
|
||||||
{ p->image_type&=~property; }
|
|
||||||
|
|
||||||
AVSC_INLINE void avs_set_field_based(AVS_VideoInfo * p, int isfieldbased)
|
|
||||||
{ if (isfieldbased) p->image_type|=AVS_IT_FIELDBASED; else p->image_type&=~AVS_IT_FIELDBASED; }
|
|
||||||
|
|
||||||
AVSC_INLINE void avs_set_fps(AVS_VideoInfo * p, unsigned numerator, unsigned denominator)
|
|
||||||
{
|
|
||||||
unsigned x=numerator, y=denominator;
|
|
||||||
while (y) { // find gcd
|
|
||||||
unsigned t = x%y; x = y; y = t;
|
|
||||||
}
|
|
||||||
p->fps_numerator = numerator/x;
|
|
||||||
p->fps_denominator = denominator/x;
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_same_colorspace(AVS_VideoInfo * x, AVS_VideoInfo * y)
|
|
||||||
{
|
|
||||||
return (x->pixel_type == y->pixel_type)
|
|
||||||
|| (avs_is_yv12(x) && avs_is_yv12(y));
|
|
||||||
}
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_VideoFrame
|
|
||||||
//
|
|
||||||
|
|
||||||
// VideoFrameBuffer holds information about a memory block which is used
|
|
||||||
// for video data. For efficiency, instances of this class are not deleted
|
|
||||||
// when the refcount reaches zero; instead they're stored in a linked list
|
|
||||||
// to be reused. The instances are deleted when the corresponding AVS
|
|
||||||
// file is closed.
|
|
||||||
|
|
||||||
// AVS_VideoFrameBuffer is layed out identicly to VideoFrameBuffer
|
|
||||||
// DO NOT USE THIS STRUCTURE DIRECTLY
|
|
||||||
typedef struct AVS_VideoFrameBuffer {
|
|
||||||
unsigned char * data;
|
|
||||||
int data_size;
|
|
||||||
// sequence_number is incremented every time the buffer is changed, so
|
|
||||||
// that stale views can tell they're no longer valid.
|
|
||||||
long sequence_number;
|
|
||||||
|
|
||||||
long refcount;
|
|
||||||
} AVS_VideoFrameBuffer;
|
|
||||||
|
|
||||||
// VideoFrame holds a "window" into a VideoFrameBuffer.
|
|
||||||
|
|
||||||
// AVS_VideoFrame is layed out identicly to IVideoFrame
|
|
||||||
// DO NOT USE THIS STRUCTURE DIRECTLY
|
|
||||||
typedef struct AVS_VideoFrame {
|
|
||||||
int refcount;
|
|
||||||
AVS_VideoFrameBuffer * vfb;
|
|
||||||
int offset, pitch, row_size, height, offsetU, offsetV, pitchUV; // U&V offsets are from top of picture.
|
|
||||||
} AVS_VideoFrame;
|
|
||||||
|
|
||||||
// Access functions for AVS_VideoFrame
|
|
||||||
AVSC_INLINE int avs_get_pitch(const AVS_VideoFrame * p) {
|
|
||||||
return p->pitch;}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_pitch_p(const AVS_VideoFrame * p, int plane) {
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: case AVS_PLANAR_V: return p->pitchUV;}
|
|
||||||
return p->pitch;}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_row_size(const AVS_VideoFrame * p) {
|
|
||||||
return p->row_size; }
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_row_size_p(const AVS_VideoFrame * p, int plane) {
|
|
||||||
int r;
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: case AVS_PLANAR_V:
|
|
||||||
if (p->pitchUV) return p->row_size>>1;
|
|
||||||
else return 0;
|
|
||||||
case AVS_PLANAR_U_ALIGNED: case AVS_PLANAR_V_ALIGNED:
|
|
||||||
if (p->pitchUV) {
|
|
||||||
r = ((p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)) )>>1; // Aligned rowsize
|
|
||||||
if (r < p->pitchUV)
|
|
||||||
return r;
|
|
||||||
return p->row_size>>1;
|
|
||||||
} else return 0;
|
|
||||||
case AVS_PLANAR_Y_ALIGNED:
|
|
||||||
r = (p->row_size+AVS_FRAME_ALIGN-1)&(~(AVS_FRAME_ALIGN-1)); // Aligned rowsize
|
|
||||||
if (r <= p->pitch)
|
|
||||||
return r;
|
|
||||||
return p->row_size;
|
|
||||||
}
|
|
||||||
return p->row_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_height(const AVS_VideoFrame * p) {
|
|
||||||
return p->height;}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_get_height_p(const AVS_VideoFrame * p, int plane) {
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: case AVS_PLANAR_V:
|
|
||||||
if (p->pitchUV) return p->height>>1;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return p->height;}
|
|
||||||
|
|
||||||
AVSC_INLINE const unsigned char* avs_get_read_ptr(const AVS_VideoFrame * p) {
|
|
||||||
return p->vfb->data + p->offset;}
|
|
||||||
|
|
||||||
AVSC_INLINE const unsigned char* avs_get_read_ptr_p(const AVS_VideoFrame * p, int plane)
|
|
||||||
{
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: return p->vfb->data + p->offsetU;
|
|
||||||
case AVS_PLANAR_V: return p->vfb->data + p->offsetV;
|
|
||||||
default: return p->vfb->data + p->offset;}
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_is_writable(const AVS_VideoFrame * p) {
|
|
||||||
return (p->refcount == 1 && p->vfb->refcount == 1);}
|
|
||||||
|
|
||||||
AVSC_INLINE unsigned char* avs_get_write_ptr(const AVS_VideoFrame * p)
|
|
||||||
{
|
|
||||||
if (avs_is_writable(p)) {
|
|
||||||
++p->vfb->sequence_number;
|
|
||||||
return p->vfb->data + p->offset;
|
|
||||||
} else
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
AVSC_INLINE unsigned char* avs_get_write_ptr_p(const AVS_VideoFrame * p, int plane)
|
|
||||||
{
|
|
||||||
if (plane==AVS_PLANAR_Y && avs_is_writable(p)) {
|
|
||||||
++p->vfb->sequence_number;
|
|
||||||
return p->vfb->data + p->offset;
|
|
||||||
} else if (plane==AVS_PLANAR_Y) {
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
switch (plane) {
|
|
||||||
case AVS_PLANAR_U: return p->vfb->data + p->offsetU;
|
|
||||||
case AVS_PLANAR_V: return p->vfb->data + p->offsetV;
|
|
||||||
default: return p->vfb->data + p->offset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif // __cplusplus
|
|
||||||
AVSC_API(void, avs_release_video_frame)(AVS_VideoFrame *);
|
|
||||||
// makes a shallow copy of a video frame
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_copy_video_frame)(AVS_VideoFrame *);
|
|
||||||
#if defined __cplusplus
|
|
||||||
}
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
#ifndef AVSC_NO_DECLSPEC
|
|
||||||
AVSC_INLINE void avs_release_frame(AVS_VideoFrame * f)
|
|
||||||
{avs_release_video_frame(f);}
|
|
||||||
AVSC_INLINE AVS_VideoFrame * avs_copy_frame(AVS_VideoFrame * f)
|
|
||||||
{return avs_copy_video_frame(f);}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_Value
|
|
||||||
//
|
|
||||||
|
|
||||||
// Treat AVS_Value as a fat pointer. That is use avs_copy_value
|
|
||||||
// and avs_release_value appropiaty as you would if AVS_Value was
|
|
||||||
// a pointer.
|
|
||||||
|
|
||||||
// To maintain source code compatibility with future versions of the
|
|
||||||
// avisynth_c API don't use the AVS_Value directly. Use the helper
|
|
||||||
// functions below.
|
|
||||||
|
|
||||||
// AVS_Value is layed out identicly to AVSValue
|
|
||||||
typedef struct AVS_Value AVS_Value;
|
|
||||||
struct AVS_Value {
|
|
||||||
short type; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or 'l'ong
|
|
||||||
// for some function e'rror
|
|
||||||
short array_size;
|
|
||||||
union {
|
|
||||||
void * clip; // do not use directly, use avs_take_clip
|
|
||||||
char boolean;
|
|
||||||
int integer;
|
|
||||||
INT64 integer64; // match addition of __int64 to avxplugin.h
|
|
||||||
float floating_pt;
|
|
||||||
const char * string;
|
|
||||||
const AVS_Value * array;
|
|
||||||
} d;
|
|
||||||
};
|
|
||||||
|
|
||||||
// AVS_Value should be initilized with avs_void.
|
|
||||||
// Should also set to avs_void after the value is released
|
|
||||||
// with avs_copy_value. Consider it the equalvent of setting
|
|
||||||
// a pointer to NULL
|
|
||||||
static const AVS_Value avs_void = {'v'};
|
|
||||||
|
|
||||||
AVSC_API(void, avs_copy_value)(AVS_Value * dest, AVS_Value src);
|
|
||||||
AVSC_API(void, avs_release_value)(AVS_Value);
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_defined(AVS_Value v) { return v.type != 'v'; }
|
|
||||||
AVSC_INLINE int avs_is_clip(AVS_Value v) { return v.type == 'c'; }
|
|
||||||
AVSC_INLINE int avs_is_bool(AVS_Value v) { return v.type == 'b'; }
|
|
||||||
AVSC_INLINE int avs_is_int(AVS_Value v) { return v.type == 'i'; }
|
|
||||||
AVSC_INLINE int avs_is_float(AVS_Value v) { return v.type == 'f' || v.type == 'i'; }
|
|
||||||
AVSC_INLINE int avs_is_string(AVS_Value v) { return v.type == 's'; }
|
|
||||||
AVSC_INLINE int avs_is_array(AVS_Value v) { return v.type == 'a'; }
|
|
||||||
AVSC_INLINE int avs_is_error(AVS_Value v) { return v.type == 'e'; }
|
|
||||||
|
|
||||||
#if defined __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif // __cplusplus
|
|
||||||
AVSC_API(AVS_Clip *, avs_take_clip)(AVS_Value, AVS_ScriptEnvironment *);
|
|
||||||
AVSC_API(void, avs_set_to_clip)(AVS_Value *, AVS_Clip *);
|
|
||||||
#if defined __cplusplus
|
|
||||||
}
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
AVSC_INLINE int avs_as_bool(AVS_Value v)
|
|
||||||
{ return v.d.boolean; }
|
|
||||||
AVSC_INLINE int avs_as_int(AVS_Value v)
|
|
||||||
{ return v.d.integer; }
|
|
||||||
AVSC_INLINE const char * avs_as_string(AVS_Value v)
|
|
||||||
{ return avs_is_error(v) || avs_is_string(v) ? v.d.string : 0; }
|
|
||||||
AVSC_INLINE double avs_as_float(AVS_Value v)
|
|
||||||
{ return avs_is_int(v) ? v.d.integer : v.d.floating_pt; }
|
|
||||||
AVSC_INLINE const char * avs_as_error(AVS_Value v)
|
|
||||||
{ return avs_is_error(v) ? v.d.string : 0; }
|
|
||||||
AVSC_INLINE const AVS_Value * avs_as_array(AVS_Value v)
|
|
||||||
{ return v.d.array; }
|
|
||||||
AVSC_INLINE int avs_array_size(AVS_Value v)
|
|
||||||
{ return avs_is_array(v) ? v.array_size : 1; }
|
|
||||||
AVSC_INLINE AVS_Value avs_array_elt(AVS_Value v, int index)
|
|
||||||
{ return avs_is_array(v) ? v.d.array[index] : v; }
|
|
||||||
|
|
||||||
// only use these functions on am AVS_Value that does not already have
|
|
||||||
// an active value. Remember, treat AVS_Value as a fat pointer.
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_bool(int v0)
|
|
||||||
{ AVS_Value v; v.type = 'b'; v.d.boolean = v0 == 0 ? 0 : 1; return v; }
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_int(int v0)
|
|
||||||
{ AVS_Value v; v.type = 'i'; v.d.integer = v0; return v; }
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_string(const char * v0)
|
|
||||||
{ AVS_Value v; v.type = 's'; v.d.string = v0; return v; }
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_float(float v0)
|
|
||||||
{ AVS_Value v; v.type = 'f'; v.d.floating_pt = v0; return v;}
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_error(const char * v0)
|
|
||||||
{ AVS_Value v; v.type = 'e'; v.d.string = v0; return v; }
|
|
||||||
#ifndef AVSC_NO_DECLSPEC
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_clip(AVS_Clip * v0)
|
|
||||||
{ AVS_Value v; avs_set_to_clip(&v, v0); return v; }
|
|
||||||
#endif
|
|
||||||
AVSC_INLINE AVS_Value avs_new_value_array(AVS_Value * v0, int size)
|
|
||||||
{ AVS_Value v; v.type = 'a'; v.d.array = v0; v.array_size = size; return v; }
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_Clip
|
|
||||||
//
|
|
||||||
#if defined __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif // __cplusplus
|
|
||||||
AVSC_API(void, avs_release_clip)(AVS_Clip *);
|
|
||||||
AVSC_API(AVS_Clip *, avs_copy_clip)(AVS_Clip *);
|
|
||||||
|
|
||||||
AVSC_API(const char *, avs_clip_get_error)(AVS_Clip *); // return 0 if no error
|
|
||||||
|
|
||||||
AVSC_API(const AVS_VideoInfo *, avs_get_video_info)(AVS_Clip *);
|
|
||||||
|
|
||||||
AVSC_API(int, avs_get_version)(AVS_Clip *);
|
|
||||||
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_get_frame)(AVS_Clip *, int n);
|
|
||||||
// The returned video frame must be released with avs_release_video_frame
|
|
||||||
|
|
||||||
AVSC_API(int, avs_get_parity)(AVS_Clip *, int n);
|
|
||||||
// return field parity if field_based, else parity of first field in frame
|
|
||||||
|
|
||||||
AVSC_API(int, avs_get_audio)(AVS_Clip *, void * buf,
|
|
||||||
INT64 start, INT64 count);
|
|
||||||
// start and count are in samples
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_cache_hints)(AVS_Clip *,
|
|
||||||
int cachehints, size_t frame_range);
|
|
||||||
#if defined __cplusplus
|
|
||||||
}
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
// This is the callback type used by avs_add_function
|
|
||||||
typedef AVS_Value (AVSC_CC * AVS_ApplyFunc)
|
|
||||||
(AVS_ScriptEnvironment *, AVS_Value args, void * user_data);
|
|
||||||
|
|
||||||
typedef struct AVS_FilterInfo AVS_FilterInfo;
|
|
||||||
struct AVS_FilterInfo
|
|
||||||
{
|
|
||||||
// these members should not be modified outside of the AVS_ApplyFunc callback
|
|
||||||
AVS_Clip * child;
|
|
||||||
AVS_VideoInfo vi;
|
|
||||||
AVS_ScriptEnvironment * env;
|
|
||||||
AVS_VideoFrame * (AVSC_CC * get_frame)(AVS_FilterInfo *, int n);
|
|
||||||
int (AVSC_CC * get_parity)(AVS_FilterInfo *, int n);
|
|
||||||
int (AVSC_CC * get_audio)(AVS_FilterInfo *, void * buf,
|
|
||||||
INT64 start, INT64 count);
|
|
||||||
int (AVSC_CC * set_cache_hints)(AVS_FilterInfo *, int cachehints,
|
|
||||||
int frame_range);
|
|
||||||
void (AVSC_CC * free_filter)(AVS_FilterInfo *);
|
|
||||||
|
|
||||||
// Should be set when ever there is an error to report.
|
|
||||||
// It is cleared before any of the above methods are called
|
|
||||||
const char * error;
|
|
||||||
// this is to store whatever and may be modified at will
|
|
||||||
void * user_data;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Create a new filter
|
|
||||||
// fi is set to point to the AVS_FilterInfo so that you can
|
|
||||||
// modify it once it is initilized.
|
|
||||||
// store_child should generally be set to true. If it is not
|
|
||||||
// set than ALL methods (the function pointers) must be defined
|
|
||||||
// If it is set than you do not need to worry about freeing the child
|
|
||||||
// clip.
|
|
||||||
#if defined __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif // __cplusplus
|
|
||||||
AVSC_API(AVS_Clip *, avs_new_c_filter)(AVS_ScriptEnvironment * e,
|
|
||||||
AVS_FilterInfo * * fi,
|
|
||||||
AVS_Value child, int store_child);
|
|
||||||
#if defined __cplusplus
|
|
||||||
}
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// AVS_ScriptEnvironment
|
|
||||||
//
|
|
||||||
|
|
||||||
// For GetCPUFlags. These are backwards-compatible with those in VirtualDub.
|
|
||||||
enum {
|
|
||||||
/* slowest CPU to support extension */
|
|
||||||
AVS_CPU_FORCE = 0x01, // N/A
|
|
||||||
AVS_CPU_FPU = 0x02, // 386/486DX
|
|
||||||
AVS_CPU_MMX = 0x04, // P55C, K6, PII
|
|
||||||
AVS_CPU_INTEGER_SSE = 0x08, // PIII, Athlon
|
|
||||||
AVS_CPU_SSE = 0x10, // PIII, Athlon XP/MP
|
|
||||||
AVS_CPU_SSE2 = 0x20, // PIV, Hammer
|
|
||||||
AVS_CPU_3DNOW = 0x40, // K6-2
|
|
||||||
AVS_CPU_3DNOW_EXT = 0x80, // Athlon
|
|
||||||
AVS_CPU_X86_64 = 0xA0, // Hammer (note: equiv. to 3DNow + SSE2,
|
|
||||||
// which only Hammer will have anyway)
|
|
||||||
};
|
|
||||||
|
|
||||||
#if defined __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif // __cplusplus
|
|
||||||
AVSC_API(const char *, avs_get_error)(AVS_ScriptEnvironment *); // return 0 if no error
|
|
||||||
|
|
||||||
AVSC_API(long, avs_get_cpu_flags)(AVS_ScriptEnvironment *);
|
|
||||||
AVSC_API(int, avs_check_version)(AVS_ScriptEnvironment *, int version);
|
|
||||||
|
|
||||||
AVSC_API(char *, avs_save_string)(AVS_ScriptEnvironment *, const char* s, int length);
|
|
||||||
AVSC_API(char *, avs_sprintf)(AVS_ScriptEnvironment *, const char * fmt, ...);
|
|
||||||
|
|
||||||
AVSC_API(char *, avs_vsprintf)(AVS_ScriptEnvironment *, const char * fmt, va_list val);
|
|
||||||
// note: val is really a va_list; I hope everyone typedefs va_list to a pointer
|
|
||||||
|
|
||||||
AVSC_API(int, avs_add_function)(AVS_ScriptEnvironment *,
|
|
||||||
const char * name, const char * params,
|
|
||||||
AVS_ApplyFunc apply, void * user_data);
|
|
||||||
|
|
||||||
AVSC_API(int, avs_function_exists)(AVS_ScriptEnvironment *, const char * name);
|
|
||||||
|
|
||||||
AVSC_API(AVS_Value, avs_invoke)(AVS_ScriptEnvironment *, const char * name,
|
|
||||||
AVS_Value args, const char** arg_names);
|
|
||||||
// The returned value must be be released with avs_release_value
|
|
||||||
|
|
||||||
AVSC_API(AVS_Value, avs_get_var)(AVS_ScriptEnvironment *, const char* name);
|
|
||||||
// The returned value must be be released with avs_release_value
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_var)(AVS_ScriptEnvironment *, const char* name, AVS_Value val);
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_global_var)(AVS_ScriptEnvironment *, const char* name, const AVS_Value val);
|
|
||||||
|
|
||||||
//void avs_push_context(AVS_ScriptEnvironment *, int level=0);
|
|
||||||
//void avs_pop_context(AVS_ScriptEnvironment *);
|
|
||||||
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_new_video_frame_a)(AVS_ScriptEnvironment *,
|
|
||||||
const AVS_VideoInfo * vi, int align);
|
|
||||||
// align should be at least 16
|
|
||||||
#if defined __cplusplus
|
|
||||||
}
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
#ifndef AVSC_NO_DECLSPEC
|
|
||||||
AVSC_INLINE
|
|
||||||
AVS_VideoFrame * avs_new_video_frame(AVS_ScriptEnvironment * env,
|
|
||||||
const AVS_VideoInfo * vi)
|
|
||||||
{return avs_new_video_frame_a(env,vi,AVS_FRAME_ALIGN);}
|
|
||||||
|
|
||||||
AVSC_INLINE
|
|
||||||
AVS_VideoFrame * avs_new_frame(AVS_ScriptEnvironment * env,
|
|
||||||
const AVS_VideoInfo * vi)
|
|
||||||
{return avs_new_video_frame_a(env,vi,AVS_FRAME_ALIGN);}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif // __cplusplus
|
|
||||||
AVSC_API(int, avs_make_writable)(AVS_ScriptEnvironment *, AVS_VideoFrame * * pvf);
|
|
||||||
|
|
||||||
AVSC_API(void, avs_bit_blt)(AVS_ScriptEnvironment *, unsigned char* dstp, int dst_pitch, const unsigned char* srcp, int src_pitch, int row_size, int height);
|
|
||||||
|
|
||||||
typedef void (AVSC_CC *AVS_ShutdownFunc)(void* user_data, AVS_ScriptEnvironment * env);
|
|
||||||
AVSC_API(void, avs_at_exit)(AVS_ScriptEnvironment *, AVS_ShutdownFunc function, void * user_data);
|
|
||||||
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_subframe)(AVS_ScriptEnvironment *, AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int new_height);
|
|
||||||
// The returned video frame must be be released
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_memory_max)(AVS_ScriptEnvironment *, int mem);
|
|
||||||
|
|
||||||
AVSC_API(int, avs_set_working_dir)(AVS_ScriptEnvironment *, const char * newdir);
|
|
||||||
|
|
||||||
// avisynth.dll exports this; it's a way to use it as a library, without
|
|
||||||
// writing an AVS script or without going through AVIFile.
|
|
||||||
AVSC_API(AVS_ScriptEnvironment *, avs_create_script_environment)(int version);
|
|
||||||
#if defined __cplusplus
|
|
||||||
}
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
// this symbol is the entry point for the plugin and must
|
|
||||||
// be defined
|
|
||||||
AVSC_EXPORT
|
|
||||||
const char * AVSC_CC avisynth_c_plugin_init(AVS_ScriptEnvironment* env);
|
|
||||||
|
|
||||||
|
|
||||||
#if defined __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif // __cplusplus
|
|
||||||
AVSC_API(void, avs_delete_script_environment)(AVS_ScriptEnvironment *);
|
|
||||||
|
|
||||||
|
|
||||||
AVSC_API(AVS_VideoFrame *, avs_subframe_planar)(AVS_ScriptEnvironment *, AVS_VideoFrame * src, int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV);
|
|
||||||
// The returned video frame must be be released
|
|
||||||
#if defined __cplusplus
|
|
||||||
}
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
#endif //__AVXSYNTH_C__
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
#ifndef __DATA_TYPE_CONVERSIONS_H__
|
|
||||||
#define __DATA_TYPE_CONVERSIONS_H__
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <wchar.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
namespace avxsynth {
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
typedef int64_t __int64;
|
|
||||||
typedef int32_t __int32;
|
|
||||||
#ifdef __cplusplus
|
|
||||||
typedef bool BOOL;
|
|
||||||
#else
|
|
||||||
typedef uint32_t BOOL;
|
|
||||||
#endif // __cplusplus
|
|
||||||
typedef void* HMODULE;
|
|
||||||
typedef void* LPVOID;
|
|
||||||
typedef void* PVOID;
|
|
||||||
typedef PVOID HANDLE;
|
|
||||||
typedef HANDLE HWND;
|
|
||||||
typedef HANDLE HINSTANCE;
|
|
||||||
typedef void* HDC;
|
|
||||||
typedef void* HBITMAP;
|
|
||||||
typedef void* HICON;
|
|
||||||
typedef void* HFONT;
|
|
||||||
typedef void* HGDIOBJ;
|
|
||||||
typedef void* HBRUSH;
|
|
||||||
typedef void* HMMIO;
|
|
||||||
typedef void* HACMSTREAM;
|
|
||||||
typedef void* HACMDRIVER;
|
|
||||||
typedef void* HIC;
|
|
||||||
typedef void* HACMOBJ;
|
|
||||||
typedef HACMSTREAM* LPHACMSTREAM;
|
|
||||||
typedef void* HACMDRIVERID;
|
|
||||||
typedef void* LPHACMDRIVER;
|
|
||||||
typedef unsigned char BYTE;
|
|
||||||
typedef BYTE* LPBYTE;
|
|
||||||
typedef char TCHAR;
|
|
||||||
typedef TCHAR* LPTSTR;
|
|
||||||
typedef const TCHAR* LPCTSTR;
|
|
||||||
typedef char* LPSTR;
|
|
||||||
typedef LPSTR LPOLESTR;
|
|
||||||
typedef const char* LPCSTR;
|
|
||||||
typedef LPCSTR LPCOLESTR;
|
|
||||||
typedef wchar_t WCHAR;
|
|
||||||
typedef unsigned short WORD;
|
|
||||||
typedef unsigned int UINT;
|
|
||||||
typedef UINT MMRESULT;
|
|
||||||
typedef uint32_t DWORD;
|
|
||||||
typedef DWORD COLORREF;
|
|
||||||
typedef DWORD FOURCC;
|
|
||||||
typedef DWORD HRESULT;
|
|
||||||
typedef DWORD* LPDWORD;
|
|
||||||
typedef DWORD* DWORD_PTR;
|
|
||||||
typedef int32_t LONG;
|
|
||||||
typedef int32_t* LONG_PTR;
|
|
||||||
typedef LONG_PTR LRESULT;
|
|
||||||
typedef uint32_t ULONG;
|
|
||||||
typedef uint32_t* ULONG_PTR;
|
|
||||||
//typedef __int64_t intptr_t;
|
|
||||||
typedef uint64_t _fsize_t;
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Structures
|
|
||||||
//
|
|
||||||
|
|
||||||
typedef struct _GUID {
|
|
||||||
DWORD Data1;
|
|
||||||
WORD Data2;
|
|
||||||
WORD Data3;
|
|
||||||
BYTE Data4[8];
|
|
||||||
} GUID;
|
|
||||||
|
|
||||||
typedef GUID REFIID;
|
|
||||||
typedef GUID CLSID;
|
|
||||||
typedef CLSID* LPCLSID;
|
|
||||||
typedef GUID IID;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}; // namespace avxsynth
|
|
||||||
#endif // __cplusplus
|
|
||||||
#endif // __DATA_TYPE_CONVERSIONS_H__
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
#ifndef __WINDOWS2LINUX_H__
|
|
||||||
#define __WINDOWS2LINUX_H__
|
|
||||||
|
|
||||||
/*
|
|
||||||
* LINUX SPECIFIC DEFINITIONS
|
|
||||||
*/
|
|
||||||
//
|
|
||||||
// Data types conversions
|
|
||||||
//
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include "basicDataTypeConversions.h"
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
namespace avxsynth {
|
|
||||||
#endif // __cplusplus
|
|
||||||
//
|
|
||||||
// purposefully define the following MSFT definitions
|
|
||||||
// to mean nothing (as they do not mean anything on Linux)
|
|
||||||
//
|
|
||||||
#define __stdcall
|
|
||||||
#define __cdecl
|
|
||||||
#define noreturn
|
|
||||||
#define __declspec(x)
|
|
||||||
#define STDAPI extern "C" HRESULT
|
|
||||||
#define STDMETHODIMP HRESULT __stdcall
|
|
||||||
#define STDMETHODIMP_(x) x __stdcall
|
|
||||||
|
|
||||||
#define STDMETHOD(x) virtual HRESULT x
|
|
||||||
#define STDMETHOD_(a, x) virtual a x
|
|
||||||
|
|
||||||
#ifndef TRUE
|
|
||||||
#define TRUE true
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef FALSE
|
|
||||||
#define FALSE false
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define S_OK (0x00000000)
|
|
||||||
#define S_FALSE (0x00000001)
|
|
||||||
#define E_NOINTERFACE (0X80004002)
|
|
||||||
#define E_POINTER (0x80004003)
|
|
||||||
#define E_FAIL (0x80004005)
|
|
||||||
#define E_OUTOFMEMORY (0x8007000E)
|
|
||||||
|
|
||||||
#define INVALID_HANDLE_VALUE ((HANDLE)((LONG_PTR)-1))
|
|
||||||
#define FAILED(hr) ((hr) & 0x80000000)
|
|
||||||
#define SUCCEEDED(hr) (!FAILED(hr))
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Functions
|
|
||||||
//
|
|
||||||
#define MAKEDWORD(a,b,c,d) ((a << 24) | (b << 16) | (c << 8) | (d))
|
|
||||||
#define MAKEWORD(a,b) ((a << 8) | (b))
|
|
||||||
|
|
||||||
#define lstrlen strlen
|
|
||||||
#define lstrcpy strcpy
|
|
||||||
#define lstrcmpi strcasecmp
|
|
||||||
#define _stricmp strcasecmp
|
|
||||||
#define InterlockedIncrement(x) __sync_fetch_and_add((x), 1)
|
|
||||||
#define InterlockedDecrement(x) __sync_fetch_and_sub((x), 1)
|
|
||||||
// Windows uses (new, old) ordering but GCC has (old, new)
|
|
||||||
#define InterlockedCompareExchange(x,y,z) __sync_val_compare_and_swap(x,z,y)
|
|
||||||
|
|
||||||
#define UInt32x32To64(a, b) ( (uint64_t) ( ((uint64_t)((uint32_t)(a))) * ((uint32_t)(b)) ) )
|
|
||||||
#define Int64ShrlMod32(a, b) ( (uint64_t) ( (uint64_t)(a) >> (b) ) )
|
|
||||||
#define Int32x32To64(a, b) ((__int64)(((__int64)((long)(a))) * ((long)(b))))
|
|
||||||
|
|
||||||
#define MulDiv(nNumber, nNumerator, nDenominator) (int32_t) (((int64_t) (nNumber) * (int64_t) (nNumerator) + (int64_t) ((nDenominator)/2)) / (int64_t) (nDenominator))
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}; // namespace avxsynth
|
|
||||||
#endif // __cplusplus
|
|
||||||
|
|
||||||
#endif // __WINDOWS2LINUX_H__
|
|
||||||
@@ -1,24 +1,3 @@
|
|||||||
/*
|
|
||||||
* This file is part of FFmpeg.
|
|
||||||
*
|
|
||||||
* FFmpeg 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.
|
|
||||||
*
|
|
||||||
* FFmpeg 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 FFmpeg; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FFMPEG_COMPAT_TMS470_MATH_H
|
|
||||||
#define FFMPEG_COMPAT_TMS470_MATH_H
|
|
||||||
|
|
||||||
#include_next <math.h>
|
#include_next <math.h>
|
||||||
|
|
||||||
#undef INFINITY
|
#undef INFINITY
|
||||||
@@ -26,5 +5,3 @@
|
|||||||
|
|
||||||
#define INFINITY (*(const float*)((const unsigned []){ 0x7f800000 }))
|
#define INFINITY (*(const float*)((const unsigned []){ 0x7f800000 }))
|
||||||
#define NAN (*(const float*)((const unsigned []){ 0x7fc00000 }))
|
#define NAN (*(const float*)((const unsigned []){ 0x7fc00000 }))
|
||||||
|
|
||||||
#endif /* FFMPEG_COMPAT_TMS470_MATH_H */
|
|
||||||
|
|||||||
+12
-228
@@ -2,10 +2,10 @@ Never assume the API of libav* to be stable unless at least 1 month has passed
|
|||||||
since the last major version increase or the API was added.
|
since the last major version increase or the API was added.
|
||||||
|
|
||||||
The last version increases were:
|
The last version increases were:
|
||||||
libavcodec: 2013-03-xx
|
libavcodec: 2012-01-27
|
||||||
libavdevice: 2013-03-xx
|
libavdevice: 2011-04-18
|
||||||
libavfilter: 2012-06-22
|
libavfilter: 2012-06-22
|
||||||
libavformat: 2013-03-xx
|
libavformat: 2012-01-27
|
||||||
libavresample: 2012-10-05
|
libavresample: 2012-10-05
|
||||||
libpostproc: 2011-04-18
|
libpostproc: 2011-04-18
|
||||||
libswresample: 2011-09-19
|
libswresample: 2011-09-19
|
||||||
@@ -15,154 +15,10 @@ libavutil: 2012-10-22
|
|||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
2013-10-27 - xxxxxxx - lavc 55.39.100 - avcodec.h
|
2013-03-07 - xxxxxx - lavu 52.18.100 - avstring.h,bprint.h
|
||||||
Add CODEC_CAP_DELAY support to avcodec_decode_subtitle2.
|
|
||||||
|
|
||||||
2013-10-27 - xxxxxxx - lavu 52.48.100 - parseutils.h
|
|
||||||
Add av_get_known_color_name().
|
|
||||||
|
|
||||||
2013-10-17 - xxxxxxx - lavu 52.47.100 - opt.h
|
|
||||||
Add AV_OPT_TYPE_CHANNEL_LAYOUT and channel layout option handlers
|
|
||||||
av_opt_get_channel_layout() and av_opt_set_channel_layout().
|
|
||||||
|
|
||||||
2013-10-xx - xxxxxxx -libswscale 2.5.101 - options.c
|
|
||||||
Change default scaler to bicubic
|
|
||||||
|
|
||||||
2013-10-03 - xxxxxxx - lavc 55.34.100 - avcodec.h
|
|
||||||
Add av_codec_get_max_lowres()
|
|
||||||
|
|
||||||
2013-10-02 - xxxxxxx - lavf 55.19.100 - avformat.h
|
|
||||||
Add audio/video/subtitle AVCodec fields to AVFormatContext to force specific
|
|
||||||
decoders
|
|
||||||
|
|
||||||
2013-08-xx - xxxxxxx - lavfi 3.11.0 - avfilter.h
|
|
||||||
Add AVFilterGraph.execute and AVFilterGraph.opaque for custom slice threading
|
|
||||||
implementations.
|
|
||||||
|
|
||||||
2013-09-21 - xxxxxxx - lavu 52.16.0 - pixfmt.h
|
|
||||||
Add interleaved 4:2:2 8/10-bit formats AV_PIX_FMT_NV16 and
|
|
||||||
AV_PIX_FMT_NV20.
|
|
||||||
|
|
||||||
2013-09-16 - c74c3fb / 3feb3d6 - lavu 52.44.100 / 52.15.0 - mem.h
|
|
||||||
Add av_reallocp.
|
|
||||||
|
|
||||||
2013-09-04 - 3e1f507 - lavc 55.31.101 - avcodec.h
|
|
||||||
avcodec_close() argument can be NULL.
|
|
||||||
|
|
||||||
2013-09-04 - 36cd017 - lavf 55.16.101 - avformat.h
|
|
||||||
avformat_close_input() argument can be NULL and point on NULL.
|
|
||||||
|
|
||||||
2013-08-29 - e31db62 - lavf 55.15.100 - avformat.h
|
|
||||||
Add av_format_get_probe_score().
|
|
||||||
|
|
||||||
2013-08-15 - 1e0e193 - lsws 2.5.100 -
|
|
||||||
Add a sws_dither AVOption, allowing to set the dither algorithm used
|
|
||||||
|
|
||||||
2013-08-xx - xxxxxxx - lavc 55.27.100 - vdpau.h
|
|
||||||
Add a render2 alternative to the render callback function.
|
|
||||||
|
|
||||||
2013-08-xx - xxxxxxx - lavc 55.26.100 - vdpau.h
|
|
||||||
Add allocation function for AVVDPAUContext, allowing
|
|
||||||
to extend it in the future without breaking ABI/API.
|
|
||||||
|
|
||||||
2013-08-10 - 67a580f / 5a9a9d4 - lavc 55.25.100 / 55.16.0 - avcodec.h
|
|
||||||
Extend AVPacket API with av_packet_unref, av_packet_ref,
|
|
||||||
av_packet_move_ref, av_packet_copy_props, av_packet_free_side_data.
|
|
||||||
|
|
||||||
2013-08-05 - 9547e3e / f824535 - lavc 55.22.100 / 55.13.0 - avcodec.h
|
|
||||||
Deprecate the bitstream-related members from struct AVVDPAUContext.
|
|
||||||
The bistream buffers no longer need to be explicitly freed.
|
|
||||||
|
|
||||||
2013-08-05 - 3b805dc / 549294f - lavc 55.21.100 / 55.12.0 - avcodec.h
|
|
||||||
Deprecate the CODEC_CAP_HWACCEL_VDPAU codec capability. Use CODEC_CAP_HWACCEL
|
|
||||||
and select the AV_PIX_FMT_VDPAU format with get_format() instead.
|
|
||||||
|
|
||||||
2013-08-05 - 4ee0984 / a0ad5d0 - lavu 52.41.100 / 52.14.0 - pixfmt.h
|
|
||||||
Deprecate AV_PIX_FMT_VDPAU_*. Use AV_PIX_FMT_VDPAU instead.
|
|
||||||
|
|
||||||
2013-08-02 - 82fdfe8 / a8b1927 - lavc 55.20.100 / 55.11.0 - avcodec.h
|
|
||||||
Add output_picture_number to AVCodecParserContext.
|
|
||||||
|
|
||||||
2013-07-23 - abc8110 - lavc 55.19.100 - avcodec.h
|
|
||||||
Add avcodec_chroma_pos_to_enum()
|
|
||||||
Add avcodec_enum_to_chroma_pos()
|
|
||||||
|
|
||||||
2013-07-03 - 838bd73 - lavfi 3.78.100 - avfilter.h
|
|
||||||
Deprecate avfilter_graph_parse() in favor of the equivalent
|
|
||||||
avfilter_graph_parse_ptr().
|
|
||||||
|
|
||||||
2013-06-24 - af5f9c0 / 95d5246 - lavc 55.17.100 / 55.10.0 - avcodec.h
|
|
||||||
Add MPEG-2 AAC profiles
|
|
||||||
|
|
||||||
2013-06-25 - af5f9c0 / 95d5246 - lavf 55.10.100 - avformat.h
|
|
||||||
Add AV_DISPOSITION_* flags to indicate text track kind.
|
|
||||||
|
|
||||||
2013-06-15 - 99b8cd0 - lavu 52.36.100
|
|
||||||
Add AVRIPEMD:
|
|
||||||
av_ripemd_alloc()
|
|
||||||
av_ripemd_init()
|
|
||||||
av_ripemd_update()
|
|
||||||
av_ripemd_final()
|
|
||||||
|
|
||||||
2013-06-04 - 30b491f / fc962d4 - lavu 52.35.100 / 52.13.0 - mem.h
|
|
||||||
Add av_realloc_array and av_reallocp_array
|
|
||||||
|
|
||||||
2013-05-30 - 682b227 - lavu 52.35.100
|
|
||||||
Add AVSHA512:
|
|
||||||
av_sha512_alloc()
|
|
||||||
av_sha512_init()
|
|
||||||
av_sha512_update()
|
|
||||||
av_sha512_final()
|
|
||||||
|
|
||||||
2013-05-24 - 8d4e969 / 129bb23 - lavfi 3.10.0 / 3.70.100 - avfilter.h
|
|
||||||
Add support for slice multithreading to lavfi. Filters supporting threading
|
|
||||||
are marked with AVFILTER_FLAG_SLICE_THREADS.
|
|
||||||
New fields AVFilterContext.thread_type, AVFilterGraph.thread_type and
|
|
||||||
AVFilterGraph.nb_threads (accessible directly or through AVOptions) may be
|
|
||||||
used to configure multithreading.
|
|
||||||
|
|
||||||
2013-05-24 - fe40a9f / 2a6eaea - lavu 52.12.0 / 52.34.100 - cpu.h
|
|
||||||
Add av_cpu_count() function for getting the number of logical CPUs.
|
|
||||||
|
|
||||||
2013-05-24 - 0c25c39 / b493847 - lavc 55.7.0 / 55.12.100 - avcodec.h
|
|
||||||
Add picture_structure to AVCodecParserContext.
|
|
||||||
|
|
||||||
2013-05-17 - 3a751ea - lavu 52.33.100 - opt.h
|
|
||||||
Add AV_OPT_TYPE_COLOR value to AVOptionType enum.
|
|
||||||
|
|
||||||
2013-05-13 - e398416 - lavu 52.31.100 - mem.h
|
|
||||||
Add av_dynarray2_add().
|
|
||||||
|
|
||||||
2013-05-12 - 1776177 - lavfi 3.65.100
|
|
||||||
Add AVFILTER_FLAG_SUPPORT_TIMELINE* filter flags.
|
|
||||||
|
|
||||||
2013-04-19 - 380cfce - lavc 55.4.100
|
|
||||||
Add AV_CODEC_PROP_TEXT_SUB property for text based subtitles codec.
|
|
||||||
|
|
||||||
2013-04-18 - 7c1a002 - lavf 55.3.100
|
|
||||||
The matroska demuxer can now output proper verbatim ASS packets. It will
|
|
||||||
become the default starting lavf 56.0.100.
|
|
||||||
|
|
||||||
2013-04-10 - af0d270 - lavu 25.26.100 - avutil.h,opt.h
|
|
||||||
Add av_int_list_length()
|
|
||||||
and av_opt_set_int_list().
|
|
||||||
|
|
||||||
2013-03-30 - 5c73645 - lavu 52.24.100 - samplefmt.h
|
|
||||||
Add av_samples_alloc_array_and_samples().
|
|
||||||
|
|
||||||
2013-03-29 - ef7b6b4 - lavf 55.1.100 - avformat.h
|
|
||||||
Add av_guess_frame_rate()
|
|
||||||
|
|
||||||
2013-03-20 - 8d928a9 - lavu 52.22.100 - opt.h
|
|
||||||
Add AV_OPT_TYPE_DURATION value to AVOptionType enum.
|
|
||||||
|
|
||||||
2013-03-17 - 7aa9af5 - lavu 52.20.100 - opt.h
|
|
||||||
Add AV_OPT_TYPE_VIDEO_RATE value to AVOptionType enum.
|
|
||||||
|
|
||||||
2013-03-07 - 9767ec6 - lavu 52.18.100 - avstring.h,bprint.h
|
|
||||||
Add av_escape() and av_bprint_escape() API.
|
Add av_escape() and av_bprint_escape() API.
|
||||||
|
|
||||||
2013-02-24 - b59cd08 - lavfi 3.41.100 - buffersink.h
|
2013-02-24 - xxxxxx - lavfi 3.41.100 - buffersink.h
|
||||||
Add sample_rates field to AVABufferSinkParams.
|
Add sample_rates field to AVABufferSinkParams.
|
||||||
|
|
||||||
2013-01-17 - a1a707f - lavf 54.61.100
|
2013-01-17 - a1a707f - lavf 54.61.100
|
||||||
@@ -175,7 +31,7 @@ API changes, most recent first:
|
|||||||
Add AVFilterLink.channels, avfilter_link_get_channels()
|
Add AVFilterLink.channels, avfilter_link_get_channels()
|
||||||
and avfilter_ref_get_channels().
|
and avfilter_ref_get_channels().
|
||||||
|
|
||||||
2012-12-15 - 96d815fc - lavc 54.80.100 - avcodec.h
|
2012-12-15 - 2ada584d - lavc 54.80.100 - avcodec.h
|
||||||
Add pkt_size field to AVFrame.
|
Add pkt_size field to AVFrame.
|
||||||
|
|
||||||
2012-11-25 - c70ec631 - lavu 52.9.100 - opt.h
|
2012-11-25 - c70ec631 - lavu 52.9.100 - opt.h
|
||||||
@@ -288,93 +144,21 @@ API changes, most recent first:
|
|||||||
2012-03-26 - a67d9cf - lavfi 2.66.100
|
2012-03-26 - a67d9cf - lavfi 2.66.100
|
||||||
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
|
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
|
||||||
|
|
||||||
2013-05-15 - ff46809 / e6c4ac7 - lavu 52.32.100 / 52.11.0 - pixdesc.h
|
2013-xx-xx - xxxxxxx - lavfi 3.4.0 - avfiltergraph.h
|
||||||
Replace PIX_FMT_* flags with AV_PIX_FMT_FLAG_*.
|
|
||||||
|
|
||||||
2013-04-03 - 6fc58a8 / 507b1e4 - lavc 55.7.100 / 55.4.0 - avcodec.h
|
|
||||||
Add field_order to AVCodecParserContext.
|
|
||||||
|
|
||||||
2013-04-19 - f4b05cd / 5e83d9a - lavc 55.5.100 / 55.2.0 - avcodec.h
|
|
||||||
Add CODEC_FLAG_UNALIGNED to allow decoders to produce unaligned output.
|
|
||||||
|
|
||||||
2013-04-11 - lavfi 3.53.100 / 3.8.0
|
|
||||||
231fd44 / 38f0c07 - Move all content from avfiltergraph.h to avfilter.h. Deprecate
|
|
||||||
avfilterhraph.h, user applications should include just avfilter.h
|
|
||||||
86070b8 / bc1a985 - Add avfilter_graph_alloc_filter(), deprecate avfilter_open() and
|
|
||||||
avfilter_graph_add_filter().
|
|
||||||
4fde705 / 1113672 - Add AVFilterContext.graph pointing to the AVFilterGraph that contains the
|
|
||||||
filter.
|
|
||||||
710b0aa / 48a5ada - Add avfilter_init_str(), deprecate avfilter_init_filter().
|
|
||||||
46de9ba / 1ba95a9 - Add avfilter_init_dict().
|
|
||||||
16fc24b / 7cdd737 - Add AVFilter.flags field and AVFILTER_FLAG_DYNAMIC_{INPUTS,OUTPUTS} flags.
|
|
||||||
f4db6bf / 7e8fe4b - Add avfilter_pad_count() for counting filter inputs/outputs.
|
|
||||||
835cc0f / fa2a34c - Add avfilter_next(), deprecate av_filter_next().
|
|
||||||
Deprecate avfilter_uninit().
|
|
||||||
|
|
||||||
2013-04-09 - lavfi 3.51.100 / 3.7.0 - avfilter.h
|
|
||||||
0594ef0 / b439c99 - Add AVFilter.priv_class for exporting filter options through the
|
|
||||||
AVOptions API in the similar way private options work in lavc and lavf.
|
|
||||||
44d4488 / 8114c10 - Add avfilter_get_class().
|
|
||||||
Switch all filters to use AVOptions.
|
|
||||||
|
|
||||||
2013-03-19 - 17ebef2 / 2c328a9 - lavu 52.20.100 / 52.9.0 - pixdesc.h
|
|
||||||
Add av_pix_fmt_count_planes() function for counting planes in a pixel format.
|
|
||||||
|
|
||||||
2013-03-16 - ecade98 / 42c7c61 - lavfi 3.47.100 / 3.6.0
|
|
||||||
Add AVFilterGraph.nb_filters, deprecate AVFilterGraph.filter_count.
|
|
||||||
|
|
||||||
2013-03-08 - Reference counted buffers - lavu 52.8.0, lavc 55.0.100 / 55.0.0, lavf 55.0.100 / 55.0.0,
|
|
||||||
lavd 54.4.100 / 54.0.0, lavfi 3.5.0
|
|
||||||
36099df / 8e401db, 532f31a / 1cec062 - add a new API for reference counted buffers and buffer
|
|
||||||
pools (new header libavutil/buffer.h).
|
|
||||||
2653e12 / 1afddbe - add AVPacket.buf to allow reference counting for the AVPacket data.
|
|
||||||
Add av_packet_from_data() function for constructing packets from
|
|
||||||
av_malloc()ed data.
|
|
||||||
c4e8821 / 7ecc2d4 - move AVFrame from lavc to lavu (new header libavutil/frame.h), add
|
|
||||||
AVFrame.buf/extended_buf to allow reference counting for the AVFrame
|
|
||||||
data. Add new API for working with reference-counted AVFrames.
|
|
||||||
80e9e63 / 759001c - add the refcounted_frames field to AVCodecContext to make audio and
|
|
||||||
video decoders return reference-counted frames. Add get_buffer2()
|
|
||||||
callback to AVCodecContext which allocates reference-counted frames.
|
|
||||||
Add avcodec_default_get_buffer2() as the default get_buffer2()
|
|
||||||
implementation.
|
|
||||||
Deprecate AVCodecContext.get_buffer() / release_buffer() /
|
|
||||||
reget_buffer(), avcodec_default_get_buffer(),
|
|
||||||
avcodec_default_reget_buffer(), avcodec_default_release_buffer().
|
|
||||||
Remove avcodec_default_free_buffers(), which should not have ever
|
|
||||||
been called from outside of lavc.
|
|
||||||
Deprecate the following AVFrame fields:
|
|
||||||
* base -- is now stored in AVBufferRef
|
|
||||||
* reference, type, buffer_hints -- are unnecessary in the new API
|
|
||||||
* hwaccel_picture_private, owner, thread_opaque -- should not
|
|
||||||
have been acessed from outside of lavc
|
|
||||||
* qscale_table, qstride, qscale_type, mbskip_table, motion_val,
|
|
||||||
mb_type, dct_coeff, ref_index -- mpegvideo-specific tables,
|
|
||||||
which are not exported anymore.
|
|
||||||
a05a44e / 7e35037 - switch libavfilter to use AVFrame instead of AVFilterBufferRef. Add
|
|
||||||
av_buffersrc_add_frame(), deprecate av_buffersrc_buffer().
|
|
||||||
Add av_buffersink_get_frame() and av_buffersink_get_samples(),
|
|
||||||
deprecate av_buffersink_read() and av_buffersink_read_samples().
|
|
||||||
Deprecate AVFilterBufferRef and all functions for working with it.
|
|
||||||
|
|
||||||
2013-03-17 - 6c17ff8 / 12c5c1d - lavu 52.19.100 / 52.8.0 - avstring.h
|
|
||||||
Add av_isdigit, av_isgraph, av_isspace, av_isxdigit.
|
|
||||||
|
|
||||||
2013-02-23 - 71cf094 / 9f12235 - lavfi 3.40.100 / 3.4.0 - avfiltergraph.h
|
|
||||||
Add resample_lavr_opts to AVFilterGraph for setting libavresample options
|
Add resample_lavr_opts to AVFilterGraph for setting libavresample options
|
||||||
for auto-inserted resample filters.
|
for auto-inserted resample filters.
|
||||||
|
|
||||||
2013-01-25 - e7e14bc / 38c1466 - lavu 52.17.100 / 52.7.0 - dict.h
|
2013-xx-xx - xxxxxxx - lavu 52.7.0 - dict.h
|
||||||
Add av_dict_parse_string() to set multiple key/value pairs at once from a
|
Add av_dict_parse_string() to set multiple key/value pairs at once from a
|
||||||
string.
|
string.
|
||||||
|
|
||||||
2013-01-25 - 25be630 / b85a5e8 - lavu 52.16.100 / 52.6.0 - avstring.h
|
2013-01-xx - xxxxxxx - lavu 52.6.0 - avstring.h
|
||||||
Add av_strnstr()
|
Add av_strnstr()
|
||||||
|
|
||||||
2013-01-15 - e7e0186 / 8ee288d - lavu 52.15.100 / 52.5.0 - hmac.h
|
2013-01-xx - xxxxxxx - lavu 52.5.0 - hmac.h
|
||||||
Add AVHMAC.
|
Add AVHMAC.
|
||||||
|
|
||||||
2013-01-13 - 8ee7b38 / 44e065d - lavc 54.87.100 / 54.36.0 - vdpau.h
|
2013-01-13 - xxxxxxx - lavc 54.87.100 / 54.36.0 - vdpau.h
|
||||||
Add AVVDPAUContext struct for VDPAU hardware-accelerated decoding.
|
Add AVVDPAUContext struct for VDPAU hardware-accelerated decoding.
|
||||||
|
|
||||||
2013-01-12 - dae382b / 169fb94 - lavu 52.14.100 / 52.4.0 - pixdesc.h
|
2013-01-12 - dae382b / 169fb94 - lavu 52.14.100 / 52.4.0 - pixdesc.h
|
||||||
@@ -462,7 +246,7 @@ lavd 54.4.100 / 54.0.0, lavfi 3.5.0
|
|||||||
2012-07-29 - 7c26761 / 681ed00 - lavf 54.22.100 / 54.13.0 - avformat.h
|
2012-07-29 - 7c26761 / 681ed00 - lavf 54.22.100 / 54.13.0 - avformat.h
|
||||||
Add AVFMT_FLAG_NOBUFFER for low latency use cases.
|
Add AVFMT_FLAG_NOBUFFER for low latency use cases.
|
||||||
|
|
||||||
2012-07-10 - fbe0245 / f3e5e6f - lavu 51.65.100 / 51.37.0
|
2012-07-10 - 5fade8a - lavu 51.37.0
|
||||||
Add av_malloc_array() and av_mallocz_array()
|
Add av_malloc_array() and av_mallocz_array()
|
||||||
|
|
||||||
2012-06-22 - e847f41 / d3d3a32 - lavu 51.61.100 / 51.34.0
|
2012-06-22 - e847f41 / d3d3a32 - lavu 51.61.100 / 51.34.0
|
||||||
|
|||||||
+5
-5
@@ -31,9 +31,9 @@ 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 =
|
PROJECT_NUMBER = 1.2.12
|
||||||
|
|
||||||
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
|
# 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
|
# 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
|
# pixels and the maximum width should not exceed 200 pixels. Doxygen will
|
||||||
# copy the logo to the output directory.
|
# copy the logo to the output directory.
|
||||||
@@ -277,7 +277,7 @@ SUBGROUPING = YES
|
|||||||
# be useful for C code in case the coding convention dictates that all compound
|
# be useful for C code in case the coding convention dictates that all compound
|
||||||
# types are typedef'ed and only the typedef is referenced, never the tag name.
|
# types are typedef'ed and only the typedef is referenced, never the tag name.
|
||||||
|
|
||||||
TYPEDEF_HIDES_STRUCT = YES
|
TYPEDEF_HIDES_STRUCT = NO
|
||||||
|
|
||||||
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
|
# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
|
||||||
# determine which symbols to keep in memory and which to flush to disk.
|
# determine which symbols to keep in memory and which to flush to disk.
|
||||||
@@ -409,7 +409,7 @@ INLINE_INFO = YES
|
|||||||
# alphabetically by member name. If set to NO the members will appear in
|
# alphabetically by member name. If set to NO the members will appear in
|
||||||
# declaration order.
|
# declaration order.
|
||||||
|
|
||||||
SORT_MEMBER_DOCS = NO
|
SORT_MEMBER_DOCS = YES
|
||||||
|
|
||||||
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
|
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
|
||||||
# brief documentation of file, namespace and class members alphabetically
|
# brief documentation of file, namespace and class members alphabetically
|
||||||
@@ -709,7 +709,7 @@ INLINE_SOURCES = NO
|
|||||||
# doxygen to hide any special comment blocks from generated source code
|
# doxygen to hide any special comment blocks from generated source code
|
||||||
# fragments. Normal C and C++ comments will always remain visible.
|
# fragments. Normal C and C++ comments will always remain visible.
|
||||||
|
|
||||||
STRIP_CODE_COMMENTS = NO
|
STRIP_CODE_COMMENTS = YES
|
||||||
|
|
||||||
# If the REFERENCED_BY_RELATION tag is set to YES
|
# If the REFERENCED_BY_RELATION tag is set to YES
|
||||||
# then for each documented function all documented
|
# then for each documented function all documented
|
||||||
|
|||||||
+9
-43
@@ -6,6 +6,7 @@ LIBRARIES-$(CONFIG_AVFORMAT) += libavformat
|
|||||||
LIBRARIES-$(CONFIG_AVDEVICE) += libavdevice
|
LIBRARIES-$(CONFIG_AVDEVICE) += libavdevice
|
||||||
LIBRARIES-$(CONFIG_AVFILTER) += libavfilter
|
LIBRARIES-$(CONFIG_AVFILTER) += libavfilter
|
||||||
|
|
||||||
|
COMPONENTS-yes = $(PROGS-yes)
|
||||||
COMPONENTS-$(CONFIG_AVUTIL) += ffmpeg-utils
|
COMPONENTS-$(CONFIG_AVUTIL) += ffmpeg-utils
|
||||||
COMPONENTS-$(CONFIG_SWSCALE) += ffmpeg-scaler
|
COMPONENTS-$(CONFIG_SWSCALE) += ffmpeg-scaler
|
||||||
COMPONENTS-$(CONFIG_SWRESAMPLE) += ffmpeg-resampler
|
COMPONENTS-$(CONFIG_SWRESAMPLE) += ffmpeg-resampler
|
||||||
@@ -14,11 +15,9 @@ COMPONENTS-$(CONFIG_AVFORMAT) += ffmpeg-formats ffmpeg-protocols
|
|||||||
COMPONENTS-$(CONFIG_AVDEVICE) += ffmpeg-devices
|
COMPONENTS-$(CONFIG_AVDEVICE) += ffmpeg-devices
|
||||||
COMPONENTS-$(CONFIG_AVFILTER) += ffmpeg-filters
|
COMPONENTS-$(CONFIG_AVFILTER) += ffmpeg-filters
|
||||||
|
|
||||||
MANPAGES1 = $(PROGS-yes:%=doc/%.1) $(PROGS-yes:%=doc/%-all.1) $(COMPONENTS-yes:%=doc/%.1)
|
MANPAGES = $(COMPONENTS-yes:%=doc/%.1) $(LIBRARIES-yes:%=doc/%.3)
|
||||||
MANPAGES3 = $(LIBRARIES-yes:%=doc/%.3)
|
PODPAGES = $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod)
|
||||||
MANPAGES = $(MANPAGES1) $(MANPAGES3)
|
HTMLPAGES = $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \
|
||||||
PODPAGES = $(PROGS-yes:%=doc/%.pod) $(PROGS-yes:%=doc/%-all.pod) $(COMPONENTS-yes:%=doc/%.pod) $(LIBRARIES-yes:%=doc/%.pod)
|
|
||||||
HTMLPAGES = $(PROGS-yes:%=doc/%.html) $(PROGS-yes:%=doc/%-all.html) $(COMPONENTS-yes:%=doc/%.html) $(LIBRARIES-yes:%=doc/%.html) \
|
|
||||||
doc/developer.html \
|
doc/developer.html \
|
||||||
doc/faq.html \
|
doc/faq.html \
|
||||||
doc/fate.html \
|
doc/fate.html \
|
||||||
@@ -60,22 +59,12 @@ $(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
|
|||||||
doc/%.html: TAG = HTML
|
doc/%.html: TAG = HTML
|
||||||
doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
|
doc/%.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
|
||||||
$(Q)$(TEXIDEP)
|
$(Q)$(TEXIDEP)
|
||||||
$(M)texi2html -I doc -monolithic --D=config-not-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
|
$(M)texi2html -I doc -monolithic --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
|
||||||
|
|
||||||
doc/%-all.html: TAG = HTML
|
|
||||||
doc/%-all.html: doc/%.texi $(SRC_PATH)/doc/t2h.init $(GENTEXI)
|
|
||||||
$(Q)$(TEXIDEP)
|
|
||||||
$(M)texi2html -I doc -monolithic --D=config-all --init-file $(SRC_PATH)/doc/t2h.init --output $@ $<
|
|
||||||
|
|
||||||
doc/%.pod: TAG = POD
|
doc/%.pod: TAG = POD
|
||||||
doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
|
doc/%.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
|
||||||
$(Q)$(TEXIDEP)
|
$(Q)$(TEXIDEP)
|
||||||
$(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-not-all=yes -Idoc $< $@
|
$(M)perl $(SRC_PATH)/doc/texi2pod.pl -Idoc $< $@
|
||||||
|
|
||||||
doc/%-all.pod: TAG = POD
|
|
||||||
doc/%-all.pod: doc/%.texi $(SRC_PATH)/doc/texi2pod.pl $(GENTEXI)
|
|
||||||
$(Q)$(TEXIDEP)
|
|
||||||
$(M)perl $(SRC_PATH)/doc/texi2pod.pl -Dconfig-all=yes -Idoc $< $@
|
|
||||||
|
|
||||||
doc/%.1 doc/%.3: TAG = MAN
|
doc/%.1 doc/%.3: TAG = MAN
|
||||||
doc/%.1: doc/%.pod $(GENTEXI)
|
doc/%.1: doc/%.pod $(GENTEXI)
|
||||||
@@ -88,46 +77,23 @@ $(DOCS) doc/doxy/html: | doc/
|
|||||||
doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
|
doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS)
|
||||||
$(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
|
$(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^
|
||||||
|
|
||||||
install-doc: install-html install-man
|
|
||||||
|
|
||||||
install-html:
|
|
||||||
|
|
||||||
install-man:
|
install-man:
|
||||||
|
|
||||||
ifdef CONFIG_HTMLPAGES
|
|
||||||
install-progs-$(CONFIG_DOC): install-html
|
|
||||||
|
|
||||||
install-html: $(HTMLPAGES)
|
|
||||||
$(Q)mkdir -p "$(DOCDIR)"
|
|
||||||
$(INSTALL) -m 644 $(HTMLPAGES) "$(DOCDIR)"
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifdef CONFIG_MANPAGES
|
ifdef CONFIG_MANPAGES
|
||||||
install-progs-$(CONFIG_DOC): install-man
|
install-progs-$(CONFIG_DOC): install-man
|
||||||
|
|
||||||
install-man: $(MANPAGES)
|
install-man: $(MANPAGES)
|
||||||
$(Q)mkdir -p "$(MANDIR)/man1"
|
$(Q)mkdir -p "$(MANDIR)/man1"
|
||||||
$(INSTALL) -m 644 $(MANPAGES1) "$(MANDIR)/man1"
|
$(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1"
|
||||||
$(Q)mkdir -p "$(MANDIR)/man3"
|
|
||||||
$(INSTALL) -m 644 $(MANPAGES3) "$(MANDIR)/man3"
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
uninstall: uninstall-doc
|
uninstall: uninstall-man
|
||||||
|
|
||||||
uninstall-doc: uninstall-html uninstall-man
|
|
||||||
|
|
||||||
uninstall-html:
|
|
||||||
$(RM) -r "$(DOCDIR)"
|
|
||||||
|
|
||||||
uninstall-man:
|
uninstall-man:
|
||||||
$(RM) $(addprefix "$(MANDIR)/man1/",$(PROGS-yes:%=%.1) $(PROGS-yes:%=%-all.1) $(COMPONENTS-yes:%=%.1))
|
$(RM) $(addprefix "$(MANDIR)/man1/",$(ALLMANPAGES))
|
||||||
$(RM) $(addprefix "$(MANDIR)/man3/",$(LIBRARIES-yes:%=%.3))
|
|
||||||
|
|
||||||
clean:: docclean
|
clean:: docclean
|
||||||
|
|
||||||
distclean:: docclean
|
|
||||||
$(RM) doc/config.texi
|
|
||||||
|
|
||||||
docclean:
|
docclean:
|
||||||
$(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
|
$(RM) $(TXTPAGES) doc/*.html doc/*.pod doc/*.1 doc/*.3 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi
|
||||||
$(RM) -r doc/doxy/html
|
$(RM) -r doc/doxy/html
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
Release Notes
|
Release Notes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
* 2.1 "Fourier" October, 2013
|
* 1.2 "Magic" March, 2013
|
||||||
|
|
||||||
|
|
||||||
General notes
|
General notes
|
||||||
|
|||||||
@@ -1,33 +1,32 @@
|
|||||||
All the numerical options, if not specified otherwise, accept a string
|
All the numerical options, if not specified otherwise, accept in input
|
||||||
representing a number as input, which may be followed by one of the SI
|
a string representing a number, which may contain one of the
|
||||||
unit prefixes, for example: 'K', 'M', or 'G'.
|
SI unit prefixes, for example 'K', 'M', 'G'.
|
||||||
|
If 'i' is appended after the prefix, binary prefixes are used,
|
||||||
If 'i' is appended to the SI unit prefix, the complete prefix will be
|
which are based on powers of 1024 instead of powers of 1000.
|
||||||
interpreted as a unit prefix for binary multiplies, which are based on
|
The 'B' postfix multiplies the value by 8, and can be
|
||||||
powers of 1024 instead of powers of 1000. Appending 'B' to the SI unit
|
appended after a unit prefix or used alone. This allows using for
|
||||||
prefix multiplies the value by 8. This allows using, for example:
|
example 'KB', 'MiB', 'G' and 'B' as number postfix.
|
||||||
'KB', 'MiB', 'G' and 'B' as number suffixes.
|
|
||||||
|
|
||||||
Options which do not take arguments are boolean options, and set the
|
Options which do not take arguments are boolean options, and set the
|
||||||
corresponding value to true. They can be set to false by prefixing
|
corresponding value to true. They can be set to false by prefixing
|
||||||
the option name with "no". For example using "-nofoo"
|
with "no" the option name, for example using "-nofoo" in the
|
||||||
will set the boolean option with name "foo" to false.
|
command line will set to false the boolean option with name "foo".
|
||||||
|
|
||||||
@anchor{Stream specifiers}
|
@anchor{Stream specifiers}
|
||||||
@section Stream specifiers
|
@section Stream specifiers
|
||||||
Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
|
Some options are applied per-stream, e.g. bitrate or codec. Stream specifiers
|
||||||
are used to precisely specify which stream(s) a given option belongs to.
|
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
|
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} contains the
|
separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains
|
||||||
@code{a:1} stream specifier, which matches the second audio stream. Therefore, it
|
@code{a:1} stream specifier, which matches the second audio stream. Therefore it
|
||||||
would select the ac3 codec for the second audio stream.
|
would select the ac3 codec for the second audio stream.
|
||||||
|
|
||||||
A stream specifier can match several streams, so that the option is applied to all
|
A stream specifier can match several streams, the option is then applied to all
|
||||||
of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio
|
of them. E.g. the stream specifier in @code{-b:a 128k} matches all audio
|
||||||
streams.
|
streams.
|
||||||
|
|
||||||
An empty stream specifier matches all streams. For example, @code{-codec copy}
|
An empty stream specifier matches all streams, for example @code{-codec copy}
|
||||||
or @code{-codec: copy} would copy all the streams without reencoding.
|
or @code{-codec: copy} would copy all the streams without reencoding.
|
||||||
|
|
||||||
Possible forms of stream specifiers are:
|
Possible forms of stream specifiers are:
|
||||||
@@ -36,21 +35,20 @@ Possible forms of stream specifiers are:
|
|||||||
Matches the stream with this index. E.g. @code{-threads:1 4} would set the
|
Matches the stream with this index. E.g. @code{-threads:1 4} would set the
|
||||||
thread count for the second stream to 4.
|
thread count for the second stream to 4.
|
||||||
@item @var{stream_type}[:@var{stream_index}]
|
@item @var{stream_type}[:@var{stream_index}]
|
||||||
@var{stream_type} is one of following: 'v' for video, 'a' for audio, 's' for subtitle,
|
@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 it matches
|
'd' for data and 't' for attachments. If @var{stream_index} is given, then
|
||||||
stream number @var{stream_index} of this type. Otherwise, it matches all
|
matches stream number @var{stream_index} of this type. Otherwise matches all
|
||||||
streams of this type.
|
streams of this type.
|
||||||
@item p:@var{program_id}[:@var{stream_index}]
|
@item p:@var{program_id}[:@var{stream_index}]
|
||||||
If @var{stream_index} is given, then it matches the stream with number @var{stream_index}
|
If @var{stream_index} is given, then matches stream number @var{stream_index} in
|
||||||
in the program with the id @var{program_id}. Otherwise, it matches all streams in the
|
program with id @var{program_id}. Otherwise matches all streams in this program.
|
||||||
program.
|
|
||||||
@item #@var{stream_id}
|
@item #@var{stream_id}
|
||||||
Matches the stream by a format-specific ID.
|
Matches the stream by format-specific ID.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section Generic options
|
@section Generic options
|
||||||
|
|
||||||
These options are shared amongst the ff* tools.
|
These options are shared amongst the av* tools.
|
||||||
|
|
||||||
@table @option
|
@table @option
|
||||||
|
|
||||||
@@ -59,18 +57,10 @@ Show license.
|
|||||||
|
|
||||||
@item -h, -?, -help, --help [@var{arg}]
|
@item -h, -?, -help, --help [@var{arg}]
|
||||||
Show help. An optional parameter may be specified to print help about a specific
|
Show help. An optional parameter may be specified to print help about a specific
|
||||||
item. If no argument is specified, only basic (non advanced) tool
|
item.
|
||||||
options are shown.
|
|
||||||
|
|
||||||
Possible values of @var{arg} are:
|
Possible values of @var{arg} are:
|
||||||
@table @option
|
@table @option
|
||||||
@item long
|
|
||||||
Print advanced tool options in addition to the basic tool options.
|
|
||||||
|
|
||||||
@item full
|
|
||||||
Print complete list of options, including shared and private options
|
|
||||||
for encoders, decoders, demuxers, muxers, filters, etc.
|
|
||||||
|
|
||||||
@item decoder=@var{decoder_name}
|
@item decoder=@var{decoder_name}
|
||||||
Print detailed information about the decoder named @var{decoder_name}. Use the
|
Print detailed information about the decoder named @var{decoder_name}. Use the
|
||||||
@option{-decoders} option to get a list of all decoders.
|
@option{-decoders} option to get a list of all decoders.
|
||||||
@@ -87,9 +77,6 @@ Print detailed information about the demuxer named @var{demuxer_name}. Use the
|
|||||||
Print detailed information about the muxer named @var{muxer_name}. Use the
|
Print detailed information about the muxer named @var{muxer_name}. Use the
|
||||||
@option{-formats} option to get a list of all muxers and demuxers.
|
@option{-formats} option to get a list of all muxers and demuxers.
|
||||||
|
|
||||||
@item filter=@var{filter_name}
|
|
||||||
Print detailed information about the filter name @var{filter_name}. Use the
|
|
||||||
@option{-filters} option to get a list of all filters.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@item -version
|
@item -version
|
||||||
@@ -98,6 +85,14 @@ Show version.
|
|||||||
@item -formats
|
@item -formats
|
||||||
Show available 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
|
@item -codecs
|
||||||
Show all codecs known to libavcodec.
|
Show all codecs known to libavcodec.
|
||||||
|
|
||||||
@@ -128,39 +123,18 @@ Show available sample formats.
|
|||||||
@item -layouts
|
@item -layouts
|
||||||
Show channel names and standard channel layouts.
|
Show channel names and standard channel layouts.
|
||||||
|
|
||||||
@item -colors
|
@item -loglevel @var{loglevel} | -v @var{loglevel}
|
||||||
Show recognized color names.
|
|
||||||
|
|
||||||
@item -loglevel [repeat+]@var{loglevel} | -v [repeat+]@var{loglevel}
|
|
||||||
Set the logging level used by the library.
|
Set the logging level used by the library.
|
||||||
Adding "repeat+" indicates that repeated log output should not be compressed
|
|
||||||
to the first line and the "Last message repeated n times" line will be
|
|
||||||
omitted. "repeat" can also be used alone.
|
|
||||||
If "repeat" is used alone, and with no prior loglevel set, the default
|
|
||||||
loglevel will be used. If multiple loglevel parameters are given, using
|
|
||||||
'repeat' will not change the loglevel.
|
|
||||||
@var{loglevel} is a number or a string containing one of the following values:
|
@var{loglevel} is a number or a string containing one of the following values:
|
||||||
@table @samp
|
@table @samp
|
||||||
@item quiet
|
@item quiet
|
||||||
Show nothing at all; be silent.
|
|
||||||
@item panic
|
@item panic
|
||||||
Only show fatal errors which could lead the process to crash, such as
|
|
||||||
and assert failure. This is not currently used for anything.
|
|
||||||
@item fatal
|
@item fatal
|
||||||
Only show fatal errors. These are errors after which the process absolutely
|
|
||||||
cannot continue after.
|
|
||||||
@item error
|
@item error
|
||||||
Show all errors, including ones which can be recovered from.
|
|
||||||
@item warning
|
@item warning
|
||||||
Show all warnings and errors. Any message related to possibly
|
|
||||||
incorrect or unexpected events will be shown.
|
|
||||||
@item info
|
@item info
|
||||||
Show informative messages during processing. This is in addition to
|
|
||||||
warnings and errors. This is the default value.
|
|
||||||
@item verbose
|
@item verbose
|
||||||
Same as @code{info}, except more verbose.
|
|
||||||
@item debug
|
@item debug
|
||||||
Show everything, including debugging information.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
By default the program logs to stderr, if coloring is supported by the
|
By default the program logs to stderr, if coloring is supported by the
|
||||||
@@ -202,61 +176,7 @@ ffmpeg -cpuflags -sse+mmx ...
|
|||||||
ffmpeg -cpuflags mmx ...
|
ffmpeg -cpuflags mmx ...
|
||||||
ffmpeg -cpuflags 0 ...
|
ffmpeg -cpuflags 0 ...
|
||||||
@end example
|
@end example
|
||||||
Possible flags for this option are:
|
|
||||||
@table @samp
|
|
||||||
@item x86
|
|
||||||
@table @samp
|
|
||||||
@item mmx
|
|
||||||
@item mmxext
|
|
||||||
@item sse
|
|
||||||
@item sse2
|
|
||||||
@item sse2slow
|
|
||||||
@item sse3
|
|
||||||
@item sse3slow
|
|
||||||
@item ssse3
|
|
||||||
@item atom
|
|
||||||
@item sse4.1
|
|
||||||
@item sse4.2
|
|
||||||
@item avx
|
|
||||||
@item xop
|
|
||||||
@item fma4
|
|
||||||
@item 3dnow
|
|
||||||
@item 3dnowext
|
|
||||||
@item cmov
|
|
||||||
@end table
|
|
||||||
@item ARM
|
|
||||||
@table @samp
|
|
||||||
@item armv5te
|
|
||||||
@item armv6
|
|
||||||
@item armv6t2
|
|
||||||
@item vfp
|
|
||||||
@item vfpv3
|
|
||||||
@item neon
|
|
||||||
@end table
|
|
||||||
@item PowerPC
|
|
||||||
@table @samp
|
|
||||||
@item altivec
|
|
||||||
@end table
|
|
||||||
@item Specific Processors
|
|
||||||
@table @samp
|
|
||||||
@item pentium2
|
|
||||||
@item pentium3
|
|
||||||
@item pentium4
|
|
||||||
@item k6
|
|
||||||
@item k62
|
|
||||||
@item athlon
|
|
||||||
@item athlonxp
|
|
||||||
@item k8
|
|
||||||
@end table
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item -opencl_options options (@emph{global})
|
|
||||||
Set OpenCL environment options. This option is only available when
|
|
||||||
FFmpeg has been compiled with @code{--enable-opencl}.
|
|
||||||
|
|
||||||
@var{options} must be a list of @var{key}=@var{value} option pairs
|
|
||||||
separated by ':'. See the ``OpenCL Options'' section in the
|
|
||||||
ffmpeg-utils manual for the list of supported options.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section AVOptions
|
@section AVOptions
|
||||||
@@ -281,12 +201,11 @@ muxer:
|
|||||||
ffmpeg -i input.flac -id3v2_version 3 out.mp3
|
ffmpeg -i input.flac -id3v2_version 3 out.mp3
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
All codec AVOptions are per-stream, and thus a stream specifier
|
All codec AVOptions are obviously per-stream, so the chapter on stream
|
||||||
should be attached to them.
|
specifiers applies to them
|
||||||
|
|
||||||
Note: the @option{-nooption} syntax cannot be used for boolean
|
Note @option{-nooption} syntax cannot be used for boolean AVOptions,
|
||||||
AVOptions, use @option{-option 0}/@option{-option 1}.
|
use @option{-option 0}/@option{-option 1}.
|
||||||
|
|
||||||
Note: the old undocumented way of specifying per-stream AVOptions by
|
Note2 old undocumented way of specifying per-stream AVOptions by prepending
|
||||||
prepending v/a/s to the options name is now obsolete and will be
|
v/a/s to the options name is now obsolete and will be removed soon.
|
||||||
removed soon.
|
|
||||||
@@ -17,46 +17,9 @@ Below is a description of the currently available bitstream filters.
|
|||||||
|
|
||||||
@section aac_adtstoasc
|
@section aac_adtstoasc
|
||||||
|
|
||||||
Convert MPEG-2/4 AAC ADTS to MPEG-4 Audio Specific Configuration
|
|
||||||
bitstream filter.
|
|
||||||
|
|
||||||
This filter creates an MPEG-4 AudioSpecificConfig from an MPEG-2/4
|
|
||||||
ADTS header and removes the ADTS header.
|
|
||||||
|
|
||||||
This is required for example when copying an AAC stream from a raw
|
|
||||||
ADTS AAC container to a FLV or a MOV/MP4 file.
|
|
||||||
|
|
||||||
@section chomp
|
@section chomp
|
||||||
|
|
||||||
Remove zero padding at the end of a packet.
|
@section dump_extradata
|
||||||
|
|
||||||
@section dump_extra
|
|
||||||
|
|
||||||
Add extradata to the beginning of the filtered packets.
|
|
||||||
|
|
||||||
The additional argument specifies which packets should be filtered.
|
|
||||||
It accepts the values:
|
|
||||||
@table @samp
|
|
||||||
@item a
|
|
||||||
add extradata to all key packets, but only if @var{local_header} is
|
|
||||||
set in the @option{flags2} codec context field
|
|
||||||
|
|
||||||
@item k
|
|
||||||
add extradata to all key packets
|
|
||||||
|
|
||||||
@item e
|
|
||||||
add extradata to all packets
|
|
||||||
@end table
|
|
||||||
|
|
||||||
If not specified it is assumed @samp{k}.
|
|
||||||
|
|
||||||
For example the following @command{ffmpeg} command forces a global
|
|
||||||
header (thus disabling individual packet headers) in the H.264 packets
|
|
||||||
generated by the @code{libx264} encoder, but corrects them by adding
|
|
||||||
the header stored in extradata to the key packets:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra out.ts
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section h264_mp4toannexb
|
@section h264_mp4toannexb
|
||||||
|
|
||||||
@@ -123,6 +86,6 @@ ffmpeg -i frame_%d.jpg -c:v copy rotated.avi
|
|||||||
|
|
||||||
@section noise
|
@section noise
|
||||||
|
|
||||||
@section remove_extra
|
@section remove_extradata
|
||||||
|
|
||||||
@c man end BITSTREAM FILTERS
|
@c man end BITSTREAM FILTERS
|
||||||
|
|||||||
-1087
File diff suppressed because it is too large
Load Diff
+4
-45
@@ -62,7 +62,7 @@ documented.
|
|||||||
|
|
||||||
@section libcelt
|
@section libcelt
|
||||||
|
|
||||||
libcelt decoder wrapper.
|
libcelt decoder wrapper
|
||||||
|
|
||||||
libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
|
libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
|
||||||
Requires the presence of the libcelt headers and library during configuration.
|
Requires the presence of the libcelt headers and library during configuration.
|
||||||
@@ -70,7 +70,7 @@ You need to explicitly configure the build with @code{--enable-libcelt}.
|
|||||||
|
|
||||||
@section libgsm
|
@section libgsm
|
||||||
|
|
||||||
libgsm decoder wrapper.
|
libgsm decoder wrapper
|
||||||
|
|
||||||
libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
|
libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
|
||||||
the presence of the libgsm headers and library during configuration. You need
|
the presence of the libgsm headers and library during configuration. You need
|
||||||
@@ -80,7 +80,7 @@ This decoder supports both the ordinary GSM and the Microsoft variant.
|
|||||||
|
|
||||||
@section libilbc
|
@section libilbc
|
||||||
|
|
||||||
libilbc decoder wrapper.
|
libilbc decoder wrapper
|
||||||
|
|
||||||
libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
|
libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
|
||||||
audio codec. Requires the presence of the libilbc headers and library during
|
audio codec. Requires the presence of the libilbc headers and library during
|
||||||
@@ -101,7 +101,7 @@ value is 0 (disabled).
|
|||||||
|
|
||||||
@section libopencore-amrnb
|
@section libopencore-amrnb
|
||||||
|
|
||||||
libopencore-amrnb decoder wrapper.
|
libopencore-amrnb decoder wrapper
|
||||||
|
|
||||||
libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
|
libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
|
||||||
Narrowband audio codec. Using it requires the presence of the
|
Narrowband audio codec. Using it requires the presence of the
|
||||||
@@ -158,45 +158,4 @@ ee450d, 101010, eaeaea, 0ce60b, ec14ed, ebff0b, 0d617a, 7b7b7b, d1d1d1,
|
|||||||
7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
|
7b2a0e, 0d950c, 0f007b, cf0dec, cfa80c, 7c127b}.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section libzvbi-teletext
|
|
||||||
|
|
||||||
Libzvbi allows libavcodec to decode DVB teletext pages and DVB teletext
|
|
||||||
subtitles. Requires the presence of the libzvbi headers and library during
|
|
||||||
configuration. You need to explicitly configure the build with
|
|
||||||
@code{--enable-libzvbi}.
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item txt_page
|
|
||||||
List of teletext page numbers to decode. You may use the special * string to
|
|
||||||
match all pages. Pages that do not match the specified list are dropped.
|
|
||||||
Default value is *.
|
|
||||||
@item txt_chop_top
|
|
||||||
Discards the top teletext line. Default value is 1.
|
|
||||||
@item txt_format
|
|
||||||
Specifies the format of the decoded subtitles. The teletext decoder is capable
|
|
||||||
of decoding the teletext pages to bitmaps or to simple text, you should use
|
|
||||||
"bitmap" for teletext pages, because certain graphics and colors cannot be
|
|
||||||
expressed in simple text. You might use "text" for teletext based subtitles if
|
|
||||||
your application can handle simple text based subtitles. Default value is
|
|
||||||
bitmap.
|
|
||||||
@item txt_left
|
|
||||||
X offset of generated bitmaps, default is 0.
|
|
||||||
@item txt_top
|
|
||||||
Y offset of generated bitmaps, default is 0.
|
|
||||||
@item txt_chop_spaces
|
|
||||||
Chops leading and trailing spaces and removes empty lines from the generated
|
|
||||||
text. This option is useful for teletext based subtitles where empty spaces may
|
|
||||||
be present at the start or at the end of the lines or empty lines may be
|
|
||||||
present between the subtitle lines because of double-sized teletext charactes.
|
|
||||||
Default value is 1.
|
|
||||||
@item txt_duration
|
|
||||||
Sets the display duration of the decoded teletext pages or subtitles in
|
|
||||||
miliseconds. Default value is 30000 which is 30 seconds.
|
|
||||||
@item txt_transparent
|
|
||||||
Force transparent background of the generated teletext bitmaps. Default value
|
|
||||||
is 0 which means an opaque (black) background.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@c man end SUBTILES DECODERS
|
@c man end SUBTILES DECODERS
|
||||||
|
|||||||
+5
-21
@@ -1,7 +1,3 @@
|
|||||||
a.summary-letter {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #2D6198;
|
color: #2D6198;
|
||||||
}
|
}
|
||||||
@@ -49,16 +45,11 @@ body {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 a, h2 a, h3 a, h4 a {
|
h1, h2, h3 {
|
||||||
text-decoration: inherit;
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4 {
|
|
||||||
padding-left: 0.4em;
|
padding-left: 0.4em;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding-bottom: 0.25em;
|
padding-bottom: 0.2em;
|
||||||
padding-top: 0.25em;
|
padding-top: 0.2em;
|
||||||
border: 1px solid #6A996A;
|
border: 1px solid #6A996A;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,22 +63,15 @@ h1 {
|
|||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
color: #313131;
|
color: #313131;
|
||||||
font-size: 1.0em;
|
font-size: 0.9em;
|
||||||
background-color: #ABE3AB;
|
background-color: #ABE3AB;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
color: #313131;
|
|
||||||
font-size: 0.9em;
|
|
||||||
margin-bottom: -6px;
|
|
||||||
background-color: #BBF3BB;
|
|
||||||
}
|
|
||||||
|
|
||||||
h4 {
|
|
||||||
color: #313131;
|
color: #313131;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
margin-bottom: -8px;
|
margin-bottom: -8px;
|
||||||
background-color: #D1FDD1;
|
background-color: #BBF3BB;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|||||||
+5
-72
@@ -1,7 +1,7 @@
|
|||||||
@chapter Demuxers
|
@chapter Demuxers
|
||||||
@c man begin DEMUXERS
|
@c man begin DEMUXERS
|
||||||
|
|
||||||
Demuxers are configured elements in FFmpeg that can read the
|
Demuxers are configured elements in FFmpeg which allow to read the
|
||||||
multimedia streams from a particular type of file.
|
multimedia streams from a particular type of file.
|
||||||
|
|
||||||
When you configure your FFmpeg build, all the supported demuxers
|
When you configure your FFmpeg build, all the supported demuxers
|
||||||
@@ -29,17 +29,6 @@ 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 asf
|
|
||||||
|
|
||||||
Advanced Systems Format demuxer.
|
|
||||||
|
|
||||||
This demuxer is used to demux ASF files and MMS network streams.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item -no_resync_search @var{bool}
|
|
||||||
Do not try to resynchronize by looking for a certain optional start code.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@anchor{concat}
|
@anchor{concat}
|
||||||
@section concat
|
@section concat
|
||||||
|
|
||||||
@@ -89,9 +78,6 @@ Duration of the file. This information can be specified from the file;
|
|||||||
specifying it here may be more efficient or help if the information from the
|
specifying it here may be more efficient or help if the information from the
|
||||||
file is not available or accurate.
|
file is not available or accurate.
|
||||||
|
|
||||||
If the duration is set for all files, then it is possible to seek in the
|
|
||||||
whole concatenated video.
|
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@subsection Options
|
@subsection Options
|
||||||
@@ -114,42 +100,6 @@ probed and 0 otherwise.
|
|||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section flv
|
|
||||||
|
|
||||||
Adobe Flash Video Format demuxer.
|
|
||||||
|
|
||||||
This demuxer is used to demux FLV files and RTMP network streams.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item -flv_metadata @var{bool}
|
|
||||||
Allocate the streams according to the onMetaData array content.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section libgme
|
|
||||||
|
|
||||||
The Game Music Emu library is a collection of video game music file emulators.
|
|
||||||
|
|
||||||
See @url{http://code.google.com/p/game-music-emu/} for more information.
|
|
||||||
|
|
||||||
Some files have multiple tracks. The demuxer will pick the first track by
|
|
||||||
default. The @option{track_index} option can be used to select a different
|
|
||||||
track. Track indexes start at 0. The demuxer exports the number of tracks as
|
|
||||||
@var{tracks} meta data entry.
|
|
||||||
|
|
||||||
For very large files, the @option{max_size} option may have to be adjusted.
|
|
||||||
|
|
||||||
@section libquvi
|
|
||||||
|
|
||||||
Play media from Internet services using the quvi project.
|
|
||||||
|
|
||||||
The demuxer accepts a @option{format} option to request a specific quality. It
|
|
||||||
is by default set to @var{best}.
|
|
||||||
|
|
||||||
See @url{http://quvi.sourceforge.net/} for more information.
|
|
||||||
|
|
||||||
FFmpeg needs to be built with @code{--enable-libquvi} for this demuxer to be
|
|
||||||
enabled.
|
|
||||||
|
|
||||||
@section image2
|
@section image2
|
||||||
|
|
||||||
Image file demuxer.
|
Image file demuxer.
|
||||||
@@ -167,7 +117,7 @@ same for all the files in the sequence.
|
|||||||
This demuxer accepts the following options:
|
This demuxer accepts the following options:
|
||||||
@table @option
|
@table @option
|
||||||
@item framerate
|
@item framerate
|
||||||
Set the frame rate for the video stream. It defaults to 25.
|
Set the framerate for the video stream. It defaults to 25.
|
||||||
@item loop
|
@item loop
|
||||||
If set to 1, loop over the input. Default value is 0.
|
If set to 1, loop over the input. Default value is 0.
|
||||||
@item pattern_type
|
@item pattern_type
|
||||||
@@ -245,10 +195,6 @@ to read from. Default value is 0.
|
|||||||
Set the index interval range to check when looking for the first image
|
Set the index interval range to check when looking for the first image
|
||||||
file in the sequence, starting from @var{start_number}. Default value
|
file in the sequence, starting from @var{start_number}. Default value
|
||||||
is 5.
|
is 5.
|
||||||
@item ts_from_file
|
|
||||||
If set to 1, will set frame timestamp to modification time of image file. Note
|
|
||||||
that monotonity of timestamps is not provided: images go in the same order as
|
|
||||||
without this option. Default value is 0.
|
|
||||||
@item video_size
|
@item video_size
|
||||||
Set the video size of the images to read. If not specified the video
|
Set the video size of the images to read. If not specified the video
|
||||||
size is guessed from the first image file in the sequence.
|
size is guessed from the first image file in the sequence.
|
||||||
@@ -262,36 +208,23 @@ Use @command{ffmpeg} for creating a video from the images in the file
|
|||||||
sequence @file{img-001.jpeg}, @file{img-002.jpeg}, ..., assuming an
|
sequence @file{img-001.jpeg}, @file{img-002.jpeg}, ..., assuming an
|
||||||
input frame rate of 10 frames per second:
|
input frame rate of 10 frames per second:
|
||||||
@example
|
@example
|
||||||
ffmpeg -framerate 10 -i 'img-%03d.jpeg' out.mkv
|
ffmpeg -i 'img-%03d.jpeg' -r 10 out.mkv
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item
|
@item
|
||||||
As above, but start by reading from a file with index 100 in the sequence:
|
As above, but start by reading from a file with index 100 in the sequence:
|
||||||
@example
|
@example
|
||||||
ffmpeg -framerate 10 -start_number 100 -i 'img-%03d.jpeg' out.mkv
|
ffmpeg -start_number 100 -i 'img-%03d.jpeg' -r 10 out.mkv
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Read images matching the "*.png" glob pattern , that is all the files
|
Read images matching the "*.png" glob pattern , that is all the files
|
||||||
terminating with the ".png" suffix:
|
terminating with the ".png" suffix:
|
||||||
@example
|
@example
|
||||||
ffmpeg -framerate 10 -pattern_type glob -i "*.png" out.mkv
|
ffmpeg -pattern_type glob -i "*.png" -r 10 out.mkv
|
||||||
@end example
|
@end example
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@section mpegts
|
|
||||||
|
|
||||||
MPEG-2 transport stream demuxer.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item fix_teletext_pts
|
|
||||||
Overrides teletext packet PTS and DTS values with the timestamps calculated
|
|
||||||
from the PCR of the first program which the teletext stream is part of and is
|
|
||||||
not discarded. Default value is 1, set this option to 0 if you want your
|
|
||||||
teletext packet PTS and DTS values untouched.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section rawvideo
|
@section rawvideo
|
||||||
|
|
||||||
Raw video demuxer.
|
Raw video demuxer.
|
||||||
|
|||||||
+201
-418
@@ -11,23 +11,29 @@
|
|||||||
|
|
||||||
@chapter Developers Guide
|
@chapter Developers Guide
|
||||||
|
|
||||||
@section Notes for external developers
|
@section API
|
||||||
|
@itemize @bullet
|
||||||
|
@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
|
||||||
|
it.
|
||||||
|
|
||||||
This document is mostly useful for internal FFmpeg developers.
|
@item libavformat is the library containing the file format handling (mux and
|
||||||
External developers who need to use the API in their application should
|
demux code for several formats). Look at @file{ffplay.c} to use it in a
|
||||||
refer to the API doxygen documentation in the public headers, and
|
player. See @file{doc/examples/muxing.c} to use it to generate audio or video
|
||||||
check the examples in @file{doc/examples} and in the source code to
|
streams.
|
||||||
see how the public API is employed.
|
|
||||||
|
|
||||||
You can use the FFmpeg libraries in your commercial program, but you
|
@end itemize
|
||||||
are encouraged to @emph{publish any patch you make}. In this case the
|
|
||||||
best way to proceed is to send your patches to the ffmpeg-devel
|
|
||||||
mailing list following the guidelines illustrated in the remainder of
|
|
||||||
this document.
|
|
||||||
|
|
||||||
For more detailed legal information about the use of FFmpeg in
|
@section Integrating libavcodec or libavformat in your program
|
||||||
external programs read the @file{LICENSE} file in the source tree and
|
|
||||||
consult @url{http://ffmpeg.org/legal.html}.
|
You can integrate all the source code of the libraries to link them
|
||||||
|
statically to avoid any version problem. All you need is to provide a
|
||||||
|
'config.mak' and a 'config.h' in the parent directory. See the defines
|
||||||
|
generated by ./configure to understand what is needed.
|
||||||
|
|
||||||
|
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
|
||||||
|
to send your patches to the FFmpeg mailing list.
|
||||||
|
|
||||||
@section Contributing
|
@section Contributing
|
||||||
|
|
||||||
@@ -51,16 +57,13 @@ and should try to fix issues their commit causes.
|
|||||||
@subsection Code formatting conventions
|
@subsection Code formatting conventions
|
||||||
|
|
||||||
There are the following guidelines regarding the indentation in files:
|
There are the following guidelines regarding the indentation in files:
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
Indent size is 4.
|
Indent size is 4.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
The TAB character is forbidden outside of Makefiles as is any
|
The TAB character is forbidden outside of Makefiles as is any
|
||||||
form of trailing whitespace. Commits containing either will be
|
form of trailing whitespace. Commits containing either will be
|
||||||
rejected by the git repository.
|
rejected by the git repository.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
You should try to limit your code lines to 80 characters; however, do so if
|
You should try to limit your code lines to 80 characters; however, do so if
|
||||||
and only if this improves readability.
|
and only if this improves readability.
|
||||||
@@ -114,17 +117,13 @@ int myfunc(int my_parameter)
|
|||||||
|
|
||||||
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
|
||||||
@item
|
@item
|
||||||
the @samp{inline} keyword;
|
the @samp{inline} keyword;
|
||||||
|
|
||||||
@item
|
@item
|
||||||
@samp{//} comments;
|
@samp{//} comments;
|
||||||
|
|
||||||
@item
|
@item
|
||||||
designated struct initializers (@samp{struct s x = @{ .i = 17 @};})
|
designated struct initializers (@samp{struct s x = @{ .i = 17 @};})
|
||||||
|
|
||||||
@item
|
@item
|
||||||
compound literals (@samp{x = (struct s) @{ 17, 23 @};})
|
compound literals (@samp{x = (struct s) @{ 17, 23 @};})
|
||||||
@end itemize
|
@end itemize
|
||||||
@@ -136,17 +135,13 @@ clarity and performance.
|
|||||||
All code must compile with recent versions of GCC and a number of other
|
All code must compile with recent versions of GCC and a number of other
|
||||||
currently supported compilers. To ensure compatibility, please do not use
|
currently supported compilers. To ensure compatibility, please do not use
|
||||||
additional C99 features or GCC extensions. Especially watch out for:
|
additional C99 features or GCC extensions. Especially watch out for:
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
mixing statements and declarations;
|
mixing statements and declarations;
|
||||||
|
|
||||||
@item
|
@item
|
||||||
@samp{long long} (use @samp{int64_t} instead);
|
@samp{long long} (use @samp{int64_t} instead);
|
||||||
|
|
||||||
@item
|
@item
|
||||||
@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar;
|
@samp{__attribute__} not protected by @samp{#ifdef __GNUC__} or similar;
|
||||||
|
|
||||||
@item
|
@item
|
||||||
GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
|
GCC statement expressions (@samp{(x = (@{ int y = 4; y; @})}).
|
||||||
@end itemize
|
@end itemize
|
||||||
@@ -158,25 +153,17 @@ All names should be composed with underscores (_), not CamelCase. For example,
|
|||||||
for example structs and enums; they should always be in the CamelCase
|
for example structs and enums; they should always be in the CamelCase
|
||||||
|
|
||||||
There are the following conventions for naming variables and functions:
|
There are the following conventions for naming variables and functions:
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
For local variables no prefix is required.
|
For local variables no prefix is required.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
For file-scope variables and functions declared as @code{static}, no prefix
|
For variables and functions declared as @code{static} no prefix is required.
|
||||||
is required.
|
|
||||||
|
|
||||||
@item
|
@item
|
||||||
For variables and functions visible outside of file scope, but only used
|
For variables and functions used internally by a library an @code{ff_}
|
||||||
internally by a library, an @code{ff_} prefix should be used,
|
prefix should be used, e.g. @samp{ff_w64_demuxer}.
|
||||||
e.g. @samp{ff_w64_demuxer}.
|
|
||||||
|
|
||||||
@item
|
@item
|
||||||
For variables and functions visible outside of file scope, used internally
|
For variables and functions used internally across multiple libraries, use
|
||||||
across multiple libraries, use @code{avpriv_} as prefix, for example,
|
@code{avpriv_}. For example, @samp{avpriv_aac_parse_header}.
|
||||||
@samp{avpriv_aac_parse_header}.
|
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Each library has its own prefix for public symbols, in addition to the
|
Each library has its own prefix for public symbols, in addition to the
|
||||||
commonly used @code{av_} (@code{avformat_} for libavformat,
|
commonly used @code{av_} (@code{avformat_} for libavformat,
|
||||||
@@ -196,12 +183,10 @@ are reserved at the file level and may not be used for externally visible
|
|||||||
symbols. If in doubt, just avoid names starting with @code{_} altogether.
|
symbols. If in doubt, just avoid names starting with @code{_} altogether.
|
||||||
|
|
||||||
@subsection Miscellaneous conventions
|
@subsection Miscellaneous conventions
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@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
|
@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.
|
||||||
@@ -244,154 +229,131 @@ For Emacs, add these roughly equivalent lines to your @file{.emacs.d/init.el}:
|
|||||||
|
|
||||||
@enumerate
|
@enumerate
|
||||||
@item
|
@item
|
||||||
Contributions should be licensed under the
|
Contributions should be licensed under the
|
||||||
@uref{http://www.gnu.org/licenses/lgpl-2.1.html, LGPL 2.1},
|
@uref{http://www.gnu.org/licenses/lgpl-2.1.html, LGPL 2.1},
|
||||||
including an "or any later version" clause, or, if you prefer
|
including an "or any later version" clause, or, if you prefer
|
||||||
a gift-style license, the
|
a gift-style license, the
|
||||||
@uref{http://www.isc.org/software/license/, ISC} or
|
@uref{http://www.isc.org/software/license/, ISC} or
|
||||||
@uref{http://mit-license.org/, MIT} license.
|
@uref{http://mit-license.org/, MIT} license.
|
||||||
@uref{http://www.gnu.org/licenses/gpl-2.0.html, GPL 2} including
|
@uref{http://www.gnu.org/licenses/gpl-2.0.html, GPL 2} including
|
||||||
an "or any later version" clause is also acceptable, but LGPL is
|
an "or any later version" clause is also acceptable, but LGPL is
|
||||||
preferred.
|
preferred.
|
||||||
If you add a new file, give it a proper license header. Do not copy and
|
|
||||||
paste it from a random place, use an existing file as template.
|
|
||||||
|
|
||||||
@item
|
@item
|
||||||
You must not commit code which breaks FFmpeg! (Meaning unfinished but
|
You must not commit code which breaks FFmpeg! (Meaning unfinished but
|
||||||
enabled code which breaks compilation or compiles but does not work or
|
enabled code which breaks compilation or compiles but does not work or
|
||||||
breaks the regression tests)
|
breaks the regression tests)
|
||||||
You can commit unfinished stuff (for testing etc), but it must be disabled
|
You can commit unfinished stuff (for testing etc), but it must be disabled
|
||||||
(#ifdef etc) by default so it does not interfere with other developers'
|
(#ifdef etc) by default so it does not interfere with other developers'
|
||||||
work.
|
work.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
The commit message should have a short first line in the form of
|
The commit message should have a short first line in the form of
|
||||||
a @samp{topic: short description} as a header, separated by a newline
|
a @samp{topic: short description} as a header, separated by a newline
|
||||||
from the body consisting of an explanation of why the change is necessary.
|
from the body consisting of an explanation of why the change is necessary.
|
||||||
If the commit fixes a known bug on the bug tracker, the commit message
|
If the commit fixes a known bug on the bug tracker, the commit message
|
||||||
should include its bug ID. Referring to the issue on the bug tracker does
|
should include its bug ID. Referring to the issue on the bug tracker does
|
||||||
not exempt you from writing an excerpt of the bug in the commit message.
|
not exempt you from writing an excerpt of the bug in the commit message.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
You do not have to over-test things. If it works for you, and you think it
|
You do not have to over-test things. If it works for you, and you think it
|
||||||
should work for others, then commit. If your code has problems
|
should work for others, then commit. If your code has problems
|
||||||
(portability, triggers compiler bugs, unusual environment etc) they will be
|
(portability, triggers compiler bugs, unusual environment etc) they will be
|
||||||
reported and eventually fixed.
|
reported and eventually fixed.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Do not commit unrelated changes together, split them into self-contained
|
Do not commit unrelated changes together, split them into self-contained
|
||||||
pieces. Also do not forget that if part B depends on part A, but A does not
|
pieces. Also do not forget that if part B depends on part A, but A does not
|
||||||
depend on B, then A can and should be committed first and separate from B.
|
depend on B, then A can and should be committed first and separate from B.
|
||||||
Keeping changes well split into self-contained parts makes reviewing and
|
Keeping changes well split into self-contained parts makes reviewing and
|
||||||
understanding them on the commit log mailing list easier. This also helps
|
understanding them on the commit log mailing list easier. This also helps
|
||||||
in case of debugging later on.
|
in case of debugging later on.
|
||||||
Also if you have doubts about splitting or not splitting, do not hesitate to
|
Also if you have doubts about splitting or not splitting, do not hesitate to
|
||||||
ask/discuss it on the developer mailing list.
|
ask/discuss it on the developer mailing list.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Do not change behavior of the programs (renaming options etc) or public
|
Do not change behavior of the programs (renaming options etc) or public
|
||||||
API or ABI without first discussing it on the ffmpeg-devel mailing list.
|
API or ABI without first discussing it on the ffmpeg-devel mailing list.
|
||||||
Do not remove functionality from the code. Just improve!
|
Do not remove functionality from the code. Just improve!
|
||||||
|
|
||||||
Note: Redundant code can be removed.
|
|
||||||
|
|
||||||
|
Note: Redundant code can be removed.
|
||||||
@item
|
@item
|
||||||
Do not commit changes to the build system (Makefiles, configure script)
|
Do not commit changes to the build system (Makefiles, configure script)
|
||||||
which change behavior, defaults etc, without asking first. The same
|
which change behavior, defaults etc, without asking first. The same
|
||||||
applies to compiler warning fixes, trivial looking fixes and to code
|
applies to compiler warning fixes, trivial looking fixes and to code
|
||||||
maintained by other developers. We usually have a reason for doing things
|
maintained by other developers. We usually have a reason for doing things
|
||||||
the way we do. Send your changes as patches to the ffmpeg-devel mailing
|
the way we do. Send your changes as patches to the ffmpeg-devel mailing
|
||||||
list, and if the code maintainers say OK, you may commit. This does not
|
list, and if the code maintainers say OK, you may commit. This does not
|
||||||
apply to files you wrote and/or maintain.
|
apply to files you wrote and/or maintain.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
We refuse source indentation and other cosmetic changes if they are mixed
|
We refuse source indentation and other cosmetic changes if they are mixed
|
||||||
with functional changes, such commits will be rejected and removed. Every
|
with functional changes, such commits will be rejected and removed. Every
|
||||||
developer has his own indentation style, you should not change it. Of course
|
developer has his own indentation style, you should not change it. Of course
|
||||||
if you (re)write something, you can use your own style, even though we would
|
if you (re)write something, you can use your own style, even though we would
|
||||||
prefer if the indentation throughout FFmpeg was consistent (Many projects
|
prefer if the indentation throughout FFmpeg was consistent (Many projects
|
||||||
force a given indentation style - we do not.). If you really need to make
|
force a given indentation style - we do not.). If you really need to make
|
||||||
indentation changes (try to avoid this), separate them strictly from real
|
indentation changes (try to avoid this), separate them strictly from real
|
||||||
changes.
|
changes.
|
||||||
|
|
||||||
NOTE: If you had to put if()@{ .. @} over a large (> 5 lines) chunk of code,
|
|
||||||
then either do NOT change the indentation of the inner part within (do not
|
|
||||||
move it to the right)! or do so in a separate commit
|
|
||||||
|
|
||||||
|
NOTE: If you had to put if()@{ .. @} over a large (> 5 lines) chunk of code,
|
||||||
|
then either do NOT change the indentation of the inner part within (do not
|
||||||
|
move it to the right)! or do so in a separate commit
|
||||||
@item
|
@item
|
||||||
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:
|
Recommended 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.
|
||||||
@item
|
@item
|
||||||
Make sure the author of the commit is set correctly. (see git commit --author)
|
Make sure the author of the commit is set correctly. (see git commit --author)
|
||||||
If you apply a patch, send an
|
If you apply a patch, send an
|
||||||
answer to ffmpeg-devel (or wherever you got the patch from) saying that
|
answer to ffmpeg-devel (or wherever you got the patch from) saying that
|
||||||
you applied the patch.
|
you applied the patch.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
When applying patches that have been discussed (at length) on the mailing
|
When applying patches that have been discussed (at length) on the mailing
|
||||||
list, reference the thread in the log message.
|
list, reference the thread in the log message.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Do NOT commit to code actively maintained by others without permission.
|
Do NOT commit to code actively maintained by others without permission.
|
||||||
Send a patch to ffmpeg-devel instead. If no one answers within a reasonable
|
Send a patch to ffmpeg-devel instead. If no one answers within a reasonable
|
||||||
timeframe (12h for build failures and security fixes, 3 days small changes,
|
timeframe (12h for build failures and security fixes, 3 days small changes,
|
||||||
1 week for big patches) then commit your patch if you think it is OK.
|
1 week for big patches) then commit your patch if you think it is OK.
|
||||||
Also note, the maintainer can simply ask for more time to review!
|
Also note, the maintainer can simply ask for more time to review!
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Subscribe to the ffmpeg-cvslog mailing list. The diffs of all commits
|
Subscribe to the ffmpeg-cvslog mailing list. The diffs of all commits
|
||||||
are sent there and reviewed by all the other developers. Bugs and possible
|
are sent there and reviewed by all the other developers. Bugs and possible
|
||||||
improvements or general questions regarding commits are discussed there. We
|
improvements or general questions regarding commits are discussed there. We
|
||||||
expect you to react if problems with your code are uncovered.
|
expect you to react if problems with your code are uncovered.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Update the documentation if you change behavior or add features. If you are
|
Update the documentation if you change behavior or add features. If you are
|
||||||
unsure how best to do this, send a patch to ffmpeg-devel, the documentation
|
unsure how best to do this, send a patch to ffmpeg-devel, the documentation
|
||||||
maintainer(s) will review and commit your stuff.
|
maintainer(s) will review and commit your stuff.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Try to keep important discussions and requests (also) on the public
|
Try to keep important discussions and requests (also) on the public
|
||||||
developer mailing list, so that all developers can benefit from them.
|
developer mailing list, so that all developers can benefit from them.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Never write to unallocated memory, never write over the end of arrays,
|
Never write to unallocated memory, never write over the end of arrays,
|
||||||
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
|
||||||
previous versions (e.g. removal of a function from the public API).
|
previous versions (e.g. removal of a function from the public API).
|
||||||
Incrementing the second component means backward compatible change
|
Incrementing the second component means backward compatible change
|
||||||
(e.g. addition of a function to the public API or extension of an
|
(e.g. addition of a function to the public API or extension of an
|
||||||
existing data structure).
|
existing data structure).
|
||||||
Incrementing the third component means a noteworthy binary compatible
|
Incrementing the third component means a noteworthy binary compatible
|
||||||
change (e.g. encoder bug fix that matters for the decoder). The third
|
change (e.g. encoder bug fix that matters for the decoder). The third
|
||||||
component always starts at 100 to distinguish FFmpeg from Libav.
|
component always starts at 100 to distinguish FFmpeg from Libav.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Compiler warnings indicate potential bugs or code with bad style. If a type of
|
Compiler warnings indicate potential bugs or code with bad style. If a type of
|
||||||
warning always points to correct and clean code, that warning should
|
warning always points to correct and clean code, that warning should
|
||||||
be disabled, not the code changed.
|
be disabled, not the code changed.
|
||||||
Thus the remaining warnings can either be bugs or correct code.
|
Thus the remaining warnings can either be bugs or correct code.
|
||||||
If it is a bug, the bug has to be fixed. If it is not, the code should
|
If it is a bug, the bug has to be fixed. If it is not, the code should
|
||||||
be changed to not generate a warning unless that causes a slowdown
|
be changed to not generate a warning unless that causes a slowdown
|
||||||
or obfuscates the code.
|
or obfuscates the code.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Make sure that no parts of the codebase that you maintain are missing from the
|
If you add a new file, give it a proper license header. Do not copy and
|
||||||
@file{MAINTAINERS} file. If something that you want to maintain is missing add it with
|
paste it from a random place, use an existing file as template.
|
||||||
your name after it.
|
|
||||||
If at some point you no longer want to maintain some code, then please help
|
|
||||||
finding a new maintainer and also don't forget updating the @file{MAINTAINERS} file.
|
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
We think our rules are not too hard. If you have comments, contact us.
|
We think our rules are not too hard. If you have comments, contact us.
|
||||||
@@ -446,51 +408,40 @@ send a reminder by email. Your patch should eventually be dealt with.
|
|||||||
|
|
||||||
@enumerate
|
@enumerate
|
||||||
@item
|
@item
|
||||||
Did you use av_cold for codec initialization and close functions?
|
Did you use av_cold for codec initialization and close functions?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you add a long_name under NULL_IF_CONFIG_SMALL to the AVCodec or
|
Did you add a long_name under NULL_IF_CONFIG_SMALL to the AVCodec or
|
||||||
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{libavcodec/version.h} or @file{libavformat/version.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 AVCodecID to @file{avcodec.h}?
|
Did you add the AVCodecID to @file{avcodec.h}?
|
||||||
When adding new codec IDs, also add an entry to the codec descriptor
|
When adding new codec IDs, also add an entry to the codec descriptor
|
||||||
list in @file{libavcodec/codec_desc.c}.
|
list in @file{libavcodec/codec_desc.c}.
|
||||||
|
|
||||||
@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?
|
||||||
Remember to do this even if you're just adding a format to a file that is
|
Remember to do this even if you're just adding a format to a file that is
|
||||||
already being compiled by some other rule, like a raw demuxer.
|
already being compiled by some other rule, like a raw demuxer.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you add an entry to the table of supported formats or codecs in
|
Did you add an entry to the table of supported formats or codecs in
|
||||||
@file{doc/general.texi}?
|
@file{doc/general.texi}?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you add an entry in the Changelog?
|
Did you add an entry in the Changelog?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
If it depends on a parser or a library, did you add that dependency in
|
If it depends on a parser or a library, did you add that dependency in
|
||||||
configure?
|
configure?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you @code{git add} the appropriate files before committing?
|
Did you @code{git add} the appropriate files before committing?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you make sure it compiles standalone, i.e. with
|
Did you make sure it compiles standalone, i.e. with
|
||||||
@code{configure --disable-everything --enable-decoder=foo}
|
@code{configure --disable-everything --enable-decoder=foo}
|
||||||
(or @code{--enable-demuxer} or whatever your component is)?
|
(or @code{--enable-demuxer} or whatever your component is)?
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
|
|
||||||
@@ -498,109 +449,82 @@ Did you make sure it compiles standalone, i.e. with
|
|||||||
|
|
||||||
@enumerate
|
@enumerate
|
||||||
@item
|
@item
|
||||||
Does @code{make fate} pass with the patch applied?
|
Does @code{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
|
||||||
Did you sign off your patch? (git commit -s)
|
Did you sign off your patch? (git commit -s)
|
||||||
See @url{http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/SubmittingPatches} for the meaning
|
See @url{http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob_plain;f=Documentation/SubmittingPatches} for the meaning
|
||||||
of sign off.
|
of sign off.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you provide a clear git commit log message?
|
Did you provide a clear git commit log message?
|
||||||
|
|
||||||
@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-devel?
|
||||||
(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
|
||||||
achieved with a smaller patch and/or simpler final code?
|
achieved with a smaller patch and/or simpler final code?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
If the change is to speed critical code, did you benchmark it?
|
If the change is to speed critical code, did you benchmark it?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
If you did any benchmarks, did you provide them in the mail?
|
If you did any benchmarks, did you provide them in the mail?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Have you checked that the patch does not introduce buffer overflows or
|
Have you checked that the patch does not introduce buffer overflows or
|
||||||
other security issues?
|
other security issues?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you test your decoder or demuxer against damaged data? If no, see
|
Did you test your decoder or demuxer against damaged data? If no, see
|
||||||
tools/trasher, the noise bitstream filter, and
|
tools/trasher, the noise bitstream filter, and
|
||||||
@uref{http://caca.zoy.org/wiki/zzuf, zzuf}. Your decoder or demuxer
|
@uref{http://caca.zoy.org/wiki/zzuf, zzuf}. Your decoder or demuxer
|
||||||
should not crash, end in a (near) infinite loop, or allocate ridiculous
|
should not crash, end in a (near) infinite loop, or allocate ridiculous
|
||||||
amounts of memory when fed damaged data.
|
amounts of memory when fed damaged data.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Does the patch not mix functional and cosmetic changes?
|
Does the patch not mix functional and cosmetic changes?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you add tabs or trailing whitespace to the code? Both are forbidden.
|
Did you add tabs or trailing whitespace to the code? Both are forbidden.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Is the patch attached to the email you send?
|
Is the patch attached to the email you send?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Is the mime type of the patch correct? It should be text/x-diff or
|
Is the mime type of the patch correct? It should be text/x-diff or
|
||||||
text/x-patch or at least text/plain and not application/octet-stream.
|
text/x-patch or at least text/plain and not application/octet-stream.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
If the patch fixes a bug, did you provide a verbose analysis of the bug?
|
If the patch fixes a bug, did you provide a verbose analysis of the bug?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
If the patch fixes a bug, did you provide enough information, including
|
If the patch fixes a bug, did you provide enough information, including
|
||||||
a sample, so the bug can be reproduced and the fix can be verified?
|
a sample, so the bug can be reproduced and the fix can be verified?
|
||||||
Note please do not attach samples >100k to mails but rather provide a
|
Note please do not attach samples >100k to mails but rather provide a
|
||||||
URL, you can upload to ftp://upload.ffmpeg.org
|
URL, you can upload to ftp://upload.ffmpeg.org
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you provide a verbose summary about what the patch does change?
|
Did you provide a verbose summary about what the patch does change?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you provide a verbose explanation why it changes things like it does?
|
Did you provide a verbose explanation why it changes things like it does?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you provide a verbose summary of the user visible advantages and
|
Did you provide a verbose summary of the user visible advantages and
|
||||||
disadvantages if the patch is applied?
|
disadvantages if the patch is applied?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Did you provide an example so we can verify the new feature added by the
|
Did you provide an example so we can verify the new feature added by the
|
||||||
patch easily?
|
patch easily?
|
||||||
|
|
||||||
@item
|
@item
|
||||||
If you added a new file, did you insert a license header? It should be
|
If you added a new file, did you insert a license header? It should be
|
||||||
taken from FFmpeg, not randomly copied and pasted from somewhere else.
|
taken from FFmpeg, not randomly copied and pasted from somewhere else.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
You should maintain alphabetical order in alphabetically ordered lists as
|
You should maintain alphabetical order in alphabetically ordered lists as
|
||||||
long as doing so does not break API/ABI compatibility.
|
long as doing so does not break API/ABI compatibility.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Lines with similar content should be aligned vertically when doing so
|
Lines with similar content should be aligned vertically when doing so
|
||||||
improves readability.
|
improves readability.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Consider to add a regression test for your code.
|
Consider to add a regression test for your code.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
If you added YASM code please check that things still work with --disable-yasm
|
If you added YASM code please check that things still work with --disable-yasm
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Make sure you check the return values of function and return appropriate
|
Make sure you check the return values of function and return appropriate
|
||||||
error codes. Especially memory allocation functions like @code{av_malloc()}
|
error codes. Especially memory allocation functions like @code{av_malloc()}
|
||||||
are notoriously left unchecked, which is a serious problem.
|
are notoriously left unchecked, which is a serious problem.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Test your code with valgrind and or Address Sanitizer to ensure it's free
|
Test your code with valgrind and or Address Sanitizer to ensure it's free
|
||||||
of leaks, out of array accesses, etc.
|
of leaks, out of array accesses, etc.
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
@section Patch review process
|
@section Patch review process
|
||||||
@@ -653,145 +577,4 @@ message or introductionary message for the patch series that you post to
|
|||||||
the ffmpeg-devel mailing list, a direct link to download the sample media.
|
the ffmpeg-devel mailing list, a direct link to download the sample media.
|
||||||
|
|
||||||
|
|
||||||
@subsection Visualizing Test Coverage
|
|
||||||
|
|
||||||
The FFmpeg build system allows visualizing the test coverage in an easy
|
|
||||||
manner with the coverage tools @code{gcov}/@code{lcov}. This involves
|
|
||||||
the following steps:
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
@item
|
|
||||||
Configure to compile with instrumentation enabled:
|
|
||||||
@code{configure --toolchain=gcov}.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Run your test case, either manually or via FATE. This can be either
|
|
||||||
the full FATE regression suite, or any arbitrary invocation of any
|
|
||||||
front-end tool provided by FFmpeg, in any combination.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Run @code{make lcov} to generate coverage data in HTML format.
|
|
||||||
|
|
||||||
@item
|
|
||||||
View @code{lcov/index.html} in your preferred HTML viewer.
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
You can use the command @code{make lcov-reset} to reset the coverage
|
|
||||||
measurements. You will need to rerun @code{make lcov} after running a
|
|
||||||
new test.
|
|
||||||
|
|
||||||
@subsection Using Valgrind
|
|
||||||
|
|
||||||
The configure script provides a shortcut for using valgrind to spot bugs
|
|
||||||
related to memory handling. Just add the option
|
|
||||||
@code{--toolchain=valgrind-memcheck} or @code{--toolchain=valgrind-massif}
|
|
||||||
to your configure line, and reasonable defaults will be set for running
|
|
||||||
FATE under the supervision of either the @strong{memcheck} or the
|
|
||||||
@strong{massif} tool of the valgrind suite.
|
|
||||||
|
|
||||||
In case you need finer control over how valgrind is invoked, use the
|
|
||||||
@code{--target-exec='valgrind <your_custom_valgrind_options>} option in
|
|
||||||
your configure line instead.
|
|
||||||
|
|
||||||
@anchor{Release process}
|
|
||||||
@section Release process
|
|
||||||
|
|
||||||
FFmpeg maintains a set of @strong{release branches}, which are the
|
|
||||||
recommended deliverable for system integrators and distributors (such as
|
|
||||||
Linux distributions, etc.). At regular times, a @strong{release
|
|
||||||
manager} prepares, tests and publishes tarballs on the
|
|
||||||
@url{http://ffmpeg.org} website.
|
|
||||||
|
|
||||||
There are two kinds of releases:
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
@item
|
|
||||||
@strong{Major releases} always include the latest and greatest
|
|
||||||
features and functionality.
|
|
||||||
|
|
||||||
@item
|
|
||||||
@strong{Point releases} are cut from @strong{release} branches,
|
|
||||||
which are named @code{release/X}, with @code{X} being the release
|
|
||||||
version number.
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
Note that we promise to our users that shared libraries from any FFmpeg
|
|
||||||
release never break programs that have been @strong{compiled} against
|
|
||||||
previous versions of @strong{the same release series} in any case!
|
|
||||||
|
|
||||||
However, from time to time, we do make API changes that require adaptations
|
|
||||||
in applications. Such changes are only allowed in (new) major releases and
|
|
||||||
require further steps such as bumping library version numbers and/or
|
|
||||||
adjustments to the symbol versioning file. Please discuss such changes
|
|
||||||
on the @strong{ffmpeg-devel} mailing list in time to allow forward planning.
|
|
||||||
|
|
||||||
@anchor{Criteria for Point Releases}
|
|
||||||
@subsection Criteria for Point Releases
|
|
||||||
|
|
||||||
Changes that match the following criteria are valid candidates for
|
|
||||||
inclusion into a point release:
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
@item
|
|
||||||
Fixes a security issue, preferably identified by a @strong{CVE
|
|
||||||
number} issued by @url{http://cve.mitre.org/}.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Fixes a documented bug in @url{https://trac.ffmpeg.org}.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Improves the included documentation.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Retains both source code and binary compatibility with previous
|
|
||||||
point releases of the same release branch.
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
The order for checking the rules is (1 OR 2 OR 3) AND 4.
|
|
||||||
|
|
||||||
|
|
||||||
@subsection Release Checklist
|
|
||||||
|
|
||||||
The release process involves the following steps:
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
@item
|
|
||||||
Ensure that the @file{RELEASE} file contains the version number for
|
|
||||||
the upcoming release.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Add the release at @url{https://trac.ffmpeg.org/admin/ticket/versions}.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Announce the intent to do a release to the mailing list.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Make sure all relevant security fixes have been backported. See
|
|
||||||
@url{https://ffmpeg.org/security.html}.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Ensure that the FATE regression suite still passes in the release
|
|
||||||
branch on at least @strong{i386} and @strong{amd64}
|
|
||||||
(cf. @ref{Regression tests}).
|
|
||||||
|
|
||||||
@item
|
|
||||||
Prepare the release tarballs in @code{bz2} and @code{gz} formats, and
|
|
||||||
supplementing files that contain @code{gpg} signatures
|
|
||||||
|
|
||||||
@item
|
|
||||||
Publish the tarballs at @url{http://ffmpeg.org/releases}. Create and
|
|
||||||
push an annotated tag in the form @code{nX}, with @code{X}
|
|
||||||
containing the version number.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Propose and send a patch to the @strong{ffmpeg-devel} mailing list
|
|
||||||
with a news entry for the website.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Publish the news entry.
|
|
||||||
|
|
||||||
@item
|
|
||||||
Send announcement to the mailing list.
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
@bye
|
@bye
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
@chapter Device Options
|
|
||||||
@c man begin DEVICE OPTIONS
|
|
||||||
|
|
||||||
The libavdevice library provides the same interface as
|
|
||||||
libavformat. Namely, an input device is considered like a demuxer, and
|
|
||||||
an output device like a muxer, and the interface and generic device
|
|
||||||
options are the same provided by libavformat (see the ffmpeg-formats
|
|
||||||
manual).
|
|
||||||
|
|
||||||
In addition each input or output device may support so-called private
|
|
||||||
options, which are specific for that component.
|
|
||||||
|
|
||||||
Options may be set by specifying -@var{option} @var{value} in the
|
|
||||||
FFmpeg tools, or by setting the value explicitly in the device
|
|
||||||
@code{AVFormatContext} options or using the @file{libavutil/opt.h} API
|
|
||||||
for programmatic use.
|
|
||||||
|
|
||||||
@c man end DEVICE OPTIONS
|
|
||||||
|
|
||||||
@include indevs.texi
|
|
||||||
@include outdevs.texi
|
|
||||||
+17
-269
@@ -71,7 +71,7 @@ Force middle/side encoding.
|
|||||||
Set AAC encoder coding method. Possible values:
|
Set AAC encoder coding method. Possible values:
|
||||||
|
|
||||||
@table @samp
|
@table @samp
|
||||||
@item faac
|
@item 0
|
||||||
FAAC-inspired method.
|
FAAC-inspired method.
|
||||||
|
|
||||||
This method is a simplified reimplementation of the method used in FAAC, which
|
This method is a simplified reimplementation of the method used in FAAC, which
|
||||||
@@ -82,13 +82,13 @@ distortion below threshold band by band.
|
|||||||
The quality of this method is comparable to the two loop searching method
|
The quality of this method is comparable to the two loop searching method
|
||||||
descibed below, but somewhat a little better and slower.
|
descibed below, but somewhat a little better and slower.
|
||||||
|
|
||||||
@item anmr
|
@item 1
|
||||||
Average noise to mask ratio (ANMR) trellis-based solution.
|
Average noise to mask ratio (ANMR) trellis-based solution.
|
||||||
|
|
||||||
This has a theoretic best quality out of all the coding methods, but at the
|
This has a theoretic best quality out of all the coding methods, but at the
|
||||||
cost of the slowest speed.
|
cost of the slowest speed.
|
||||||
|
|
||||||
@item twoloop
|
@item 2
|
||||||
Two loop searching (TLS) method.
|
Two loop searching (TLS) method.
|
||||||
|
|
||||||
This method first sets quantizers depending on band thresholds and then tries
|
This method first sets quantizers depending on band thresholds and then tries
|
||||||
@@ -97,7 +97,7 @@ all quantizers and adjusting some individual quantizer a little.
|
|||||||
|
|
||||||
This method produces similar quality with the FAAC method and is the default.
|
This method produces similar quality with the FAAC method and is the default.
|
||||||
|
|
||||||
@item fast
|
@item 3
|
||||||
Constant quantizer method.
|
Constant quantizer method.
|
||||||
|
|
||||||
This method sets a constant quantizer for all bands. This is the fastest of all
|
This method sets a constant quantizer for all bands. This is the fastest of all
|
||||||
@@ -107,6 +107,13 @@ the methods, yet produces the worst quality.
|
|||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@subsection Tips and Tricks
|
||||||
|
|
||||||
|
According to some reports
|
||||||
|
(e.g. @url{http://d.hatena.ne.jp/kamedo2/20120729/1343545890}), setting the
|
||||||
|
@option{cutoff} option to 15000 Hz greatly improves the quality of the output
|
||||||
|
quality. As a result, we encourage you to do the same.
|
||||||
|
|
||||||
@section ac3 and ac3_fixed
|
@section ac3 and ac3_fixed
|
||||||
|
|
||||||
AC-3 audio encoders.
|
AC-3 audio encoders.
|
||||||
@@ -494,18 +501,14 @@ Selected by Encoder (default)
|
|||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@anchor{libmp3lame}
|
|
||||||
@section libmp3lame
|
@section libmp3lame
|
||||||
|
|
||||||
LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper.
|
LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper
|
||||||
|
|
||||||
Requires the presence of the libmp3lame headers and library during
|
Requires the presence of the libmp3lame headers and library during
|
||||||
configuration. You need to explicitly configure the build with
|
configuration. You need to explicitly configure the build with
|
||||||
@code{--enable-libmp3lame}.
|
@code{--enable-libmp3lame}.
|
||||||
|
|
||||||
See @ref{libshine} for a fixed-point MP3 encoder, although with a
|
|
||||||
lower quality.
|
|
||||||
|
|
||||||
@subsection Options
|
@subsection Options
|
||||||
|
|
||||||
The following options are supported by the libmp3lame wrapper. The
|
The following options are supported by the libmp3lame wrapper. The
|
||||||
@@ -531,10 +534,6 @@ Enable use of bit reservoir when set to 1. Default value is 1. LAME
|
|||||||
has this enabled by default, but can be overriden by use
|
has this enabled by default, but can be overriden by use
|
||||||
@option{--nores} option.
|
@option{--nores} option.
|
||||||
|
|
||||||
@item joint_stereo (@emph{-m j})
|
|
||||||
Enable the encoder to use (on a frame by frame basis) either L/R
|
|
||||||
stereo or mid/side stereo. Default value is 1.
|
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section libopencore-amrnb
|
@section libopencore-amrnb
|
||||||
@@ -574,45 +573,9 @@ default value is 0 (disabled).
|
|||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@anchor{libshine}
|
|
||||||
@section libshine
|
|
||||||
|
|
||||||
Shine Fixed-Point MP3 encoder wrapper.
|
|
||||||
|
|
||||||
Shine is a fixed-point MP3 encoder. It has a far better performance on
|
|
||||||
platforms without an FPU, e.g. armel CPUs, and some phones and tablets.
|
|
||||||
However, as it is more targeted on performance than quality, it is not on par
|
|
||||||
with LAME and other production-grade encoders quality-wise. Also, according to
|
|
||||||
the project's homepage, this encoder may not be free of bugs as the code was
|
|
||||||
written a long time ago and the project was dead for at least 5 years.
|
|
||||||
|
|
||||||
This encoder only supports stereo and mono input. This is also CBR-only.
|
|
||||||
|
|
||||||
The original project (last updated in early 2007) is at
|
|
||||||
@url{http://sourceforge.net/projects/libshine-fxp/}. We only support the
|
|
||||||
updated fork by the Savonet/Liquidsoap project at @url{https://github.com/savonet/shine}.
|
|
||||||
|
|
||||||
Requires the presence of the libshine headers and library during
|
|
||||||
configuration. You need to explicitly configure the build with
|
|
||||||
@code{--enable-libshine}.
|
|
||||||
|
|
||||||
See also @ref{libmp3lame}.
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
|
|
||||||
The following options are supported by the libshine wrapper. The
|
|
||||||
@command{shineenc}-equivalent of the options are listed in parentheses.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item b (@emph{-b})
|
|
||||||
Set bitrate expressed in bits/s for CBR. @command{shineenc} @option{-b} option
|
|
||||||
is expressed in kilobits/s.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section libtwolame
|
@section libtwolame
|
||||||
|
|
||||||
TwoLAME MP2 encoder wrapper.
|
TwoLAME MP2 encoder wrapper
|
||||||
|
|
||||||
Requires the presence of the libtwolame headers and library during
|
Requires the presence of the libtwolame headers and library during
|
||||||
configuration. You need to explicitly configure the build with
|
configuration. You need to explicitly configure the build with
|
||||||
@@ -678,7 +641,7 @@ Set MPEG audio original flag when set to 1. The default value is 0
|
|||||||
@anchor{libvo-aacenc}
|
@anchor{libvo-aacenc}
|
||||||
@section libvo-aacenc
|
@section libvo-aacenc
|
||||||
|
|
||||||
VisualOn AAC encoder.
|
VisualOn AAC encoder
|
||||||
|
|
||||||
Requires the presence of the libvo-aacenc headers and library during
|
Requires the presence of the libvo-aacenc headers and library during
|
||||||
configuration. You need to explicitly configure the build with
|
configuration. You need to explicitly configure the build with
|
||||||
@@ -702,7 +665,7 @@ Set bit rate in bits/s.
|
|||||||
|
|
||||||
@section libvo-amrwbenc
|
@section libvo-amrwbenc
|
||||||
|
|
||||||
VisualOn Adaptive Multi-Rate Wideband encoder.
|
VisualOn Adaptive Multi-Rate Wideband encoder
|
||||||
|
|
||||||
Requires the presence of the libvo-amrwbenc headers and library during
|
Requires the presence of the libvo-amrwbenc headers and library during
|
||||||
configuration. You need to explicitly configure the build with
|
configuration. You need to explicitly configure the build with
|
||||||
@@ -786,7 +749,7 @@ Set maximum frame size, or duration of a frame in milliseconds. The
|
|||||||
argument must be exactly the following: 2.5, 5, 10, 20, 40, 60. Smaller
|
argument must be exactly the following: 2.5, 5, 10, 20, 40, 60. Smaller
|
||||||
frame sizes achieve lower latency but less quality at a given bitrate.
|
frame sizes achieve lower latency but less quality at a given bitrate.
|
||||||
Sizes greater than 20ms are only interesting at fairly low bitrates.
|
Sizes greater than 20ms are only interesting at fairly low bitrates.
|
||||||
The default of FFmpeg is 10ms, but is 20ms in @command{opusenc}.
|
The default is 20ms.
|
||||||
|
|
||||||
@item packet_loss (@emph{expect-loss})
|
@item packet_loss (@emph{expect-loss})
|
||||||
Set expected packet loss percentage. The default is 0.
|
Set expected packet loss percentage. The default is 0.
|
||||||
@@ -811,87 +774,6 @@ respectively. The default is 0 (cutoff disabled).
|
|||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section libvorbis
|
|
||||||
|
|
||||||
libvorbis encoder wrapper.
|
|
||||||
|
|
||||||
Requires the presence of the libvorbisenc headers and library during
|
|
||||||
configuration. You need to explicitly configure the build with
|
|
||||||
@code{--enable-libvorbis}.
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
|
|
||||||
The following options are supported by the libvorbis wrapper. The
|
|
||||||
@command{oggenc}-equivalent of the options are listed in parentheses.
|
|
||||||
|
|
||||||
To get a more accurate and extensive documentation of the libvorbis
|
|
||||||
options, consult the libvorbisenc's and @command{oggenc}'s documentations.
|
|
||||||
See @url{http://xiph.org/vorbis/},
|
|
||||||
@url{http://wiki.xiph.org/Vorbis-tools}, and oggenc(1).
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item b (@emph{-b})
|
|
||||||
Set bitrate expressed in bits/s for ABR. @command{oggenc} @option{-b} is
|
|
||||||
expressed in kilobits/s.
|
|
||||||
|
|
||||||
@item q (@emph{-q})
|
|
||||||
Set constant quality setting for VBR. The value should be a float
|
|
||||||
number in the range of -1.0 to 10.0. The higher the value, the better
|
|
||||||
the quality. The default value is @samp{3.0}.
|
|
||||||
|
|
||||||
This option is valid only using the @command{ffmpeg} command-line tool.
|
|
||||||
For library interface users, use @option{global_quality}.
|
|
||||||
|
|
||||||
@item cutoff (@emph{--advanced-encode-option lowpass_frequency=N})
|
|
||||||
Set cutoff bandwidth in Hz, a value of 0 disables cutoff. @command{oggenc}'s
|
|
||||||
related option is expressed in kHz. The default value is @samp{0} (cutoff
|
|
||||||
disabled).
|
|
||||||
|
|
||||||
@item minrate (@emph{-m})
|
|
||||||
Set minimum bitrate expressed in bits/s. @command{oggenc} @option{-m} is
|
|
||||||
expressed in kilobits/s.
|
|
||||||
|
|
||||||
@item maxrate (@emph{-M})
|
|
||||||
Set maximum bitrate expressed in bits/s. @command{oggenc} @option{-M} is
|
|
||||||
expressed in kilobits/s. This only has effect on ABR mode.
|
|
||||||
|
|
||||||
@item iblock (@emph{--advanced-encode-option impulse_noisetune=N})
|
|
||||||
Set noise floor bias for impulse blocks. The value is a float number from
|
|
||||||
-15.0 to 0.0. A negative bias instructs the encoder to pay special attention
|
|
||||||
to the crispness of transients in the encoded audio. The tradeoff for better
|
|
||||||
transient response is a higher bitrate.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section libwavpack
|
|
||||||
|
|
||||||
A wrapper providing WavPack encoding through libwavpack.
|
|
||||||
|
|
||||||
Only lossless mode using 32-bit integer samples is supported currently.
|
|
||||||
The @option{compression_level} option can be used to control speed vs.
|
|
||||||
compression tradeoff, with the values mapped to libwavpack as follows:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item 0
|
|
||||||
Fast mode - corresponding to the wavpack @option{-f} option.
|
|
||||||
|
|
||||||
@item 1
|
|
||||||
Normal (default) settings.
|
|
||||||
|
|
||||||
@item 2
|
|
||||||
High quality - corresponding to the wavpack @option{-h} option.
|
|
||||||
|
|
||||||
@item 3
|
|
||||||
Very high quality - corresponding to the wavpack @option{-hh} option.
|
|
||||||
|
|
||||||
@item 4-8
|
|
||||||
Same as 3, but with extra processing enabled - corresponding to the wavpack
|
|
||||||
@option{-x} option. I.e. 4 is the same as @option{-x2} and 8 is the same as
|
|
||||||
@option{-x6}.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@c man end AUDIO ENCODERS
|
@c man end AUDIO ENCODERS
|
||||||
|
|
||||||
@chapter Video Encoders
|
@chapter Video Encoders
|
||||||
@@ -1061,7 +943,7 @@ For more information about libvpx see:
|
|||||||
|
|
||||||
@section libx264
|
@section libx264
|
||||||
|
|
||||||
x264 H.264/MPEG-4 AVC encoder wrapper.
|
x264 H.264/MPEG-4 AVC encoder wrapper
|
||||||
|
|
||||||
This encoder requires the presence of the libx264 headers and library
|
This encoder requires the presence of the libx264 headers and library
|
||||||
during configuration. You need to explicitly configure the build with
|
during configuration. You need to explicitly configure the build with
|
||||||
@@ -1269,10 +1151,6 @@ Enable calculation and printing SSIM stats after the encoding.
|
|||||||
Enable the use of Periodic Intra Refresh instead of IDR frames when set
|
Enable the use of Periodic Intra Refresh instead of IDR frames when set
|
||||||
to 1.
|
to 1.
|
||||||
|
|
||||||
@item bluray-compat (@emph{bluray-compat})
|
|
||||||
Configure the encoder to be compatible with the bluray standard.
|
|
||||||
It is a shorthand for setting "bluray-compat=1 force-cfr=1".
|
|
||||||
|
|
||||||
@item b-bias (@emph{b-bias})
|
@item b-bias (@emph{b-bias})
|
||||||
Set the influence on how often B-frames are used.
|
Set the influence on how often B-frames are used.
|
||||||
|
|
||||||
@@ -1517,136 +1395,6 @@ half pixel and quarter pixel refinement for 8x8 blocks, and rate
|
|||||||
distortion-based search using square pattern.
|
distortion-based search using square pattern.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@item lumi_aq
|
|
||||||
Enable lumi masking adaptive quantization when set to 1. Default is 0
|
|
||||||
(disabled).
|
|
||||||
|
|
||||||
@item variance_aq
|
|
||||||
Enable variance adaptive quantization when set to 1. Default is 0
|
|
||||||
(disabled).
|
|
||||||
|
|
||||||
When combined with @option{lumi_aq}, the resulting quality will not
|
|
||||||
be better than any of the two specified individually. In other
|
|
||||||
words, the resulting quality will be the worse one of the two
|
|
||||||
effects.
|
|
||||||
|
|
||||||
@item ssim
|
|
||||||
Set structural similarity (SSIM) displaying method. Possible values:
|
|
||||||
|
|
||||||
@table @samp
|
|
||||||
@item off
|
|
||||||
Disable displaying of SSIM information.
|
|
||||||
|
|
||||||
@item avg
|
|
||||||
Output average SSIM at the end of encoding to stdout. The format of
|
|
||||||
showing the average SSIM is:
|
|
||||||
|
|
||||||
@example
|
|
||||||
Average SSIM: %f
|
|
||||||
@end example
|
|
||||||
|
|
||||||
For users who are not familiar with C, %f means a float number, or
|
|
||||||
a decimal (e.g. 0.939232).
|
|
||||||
|
|
||||||
@item frame
|
|
||||||
Output both per-frame SSIM data during encoding and average SSIM at
|
|
||||||
the end of encoding to stdout. The format of per-frame information
|
|
||||||
is:
|
|
||||||
|
|
||||||
@example
|
|
||||||
SSIM: avg: %1.3f min: %1.3f max: %1.3f
|
|
||||||
@end example
|
|
||||||
|
|
||||||
For users who are not familiar with C, %1.3f means a float number
|
|
||||||
rounded to 3 digits after the dot (e.g. 0.932).
|
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@item ssim_acc
|
|
||||||
Set SSIM accuracy. Valid options are integers within the range of
|
|
||||||
0-4, while 0 gives the most accurate result and 4 computes the
|
|
||||||
fastest.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section png
|
|
||||||
|
|
||||||
PNG image encoder.
|
|
||||||
|
|
||||||
@subsection Private options
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item dpi @var{integer}
|
|
||||||
Set physical density of pixels, in dots per inch, unset by default
|
|
||||||
@item dpm @var{integer}
|
|
||||||
Set physical density of pixels, in dots per meter, unset by default
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section ProRes
|
|
||||||
|
|
||||||
Apple ProRes encoder.
|
|
||||||
|
|
||||||
FFmpeg contains 2 ProRes encoders, the prores-aw and prores-ks encoder.
|
|
||||||
The used encoder can be choosen with the @code{-vcodec} option.
|
|
||||||
|
|
||||||
@subsection Private Options for prores-ks
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item profile @var{integer}
|
|
||||||
Select the ProRes profile to encode
|
|
||||||
@table @samp
|
|
||||||
@item proxy
|
|
||||||
@item lt
|
|
||||||
@item standard
|
|
||||||
@item hq
|
|
||||||
@item 4444
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item quant_mat @var{integer}
|
|
||||||
Select quantization matrix.
|
|
||||||
@table @samp
|
|
||||||
@item auto
|
|
||||||
@item default
|
|
||||||
@item proxy
|
|
||||||
@item lt
|
|
||||||
@item standard
|
|
||||||
@item hq
|
|
||||||
@end table
|
|
||||||
If set to @var{auto}, the matrix matching the profile will be picked.
|
|
||||||
If not set, the matrix providing the highest quality, @var{default}, will be
|
|
||||||
picked.
|
|
||||||
|
|
||||||
@item bits_per_mb @var{integer}
|
|
||||||
How many bits to allot for coding one macroblock. Different profiles use
|
|
||||||
between 200 and 2400 bits per macroblock, the maximum is 8000.
|
|
||||||
|
|
||||||
@item mbs_per_slice @var{integer}
|
|
||||||
Number of macroblocks in each slice (1-8); the default value (8)
|
|
||||||
should be good in almost all situations.
|
|
||||||
|
|
||||||
@item vendor @var{string}
|
|
||||||
Override the 4-byte vendor ID.
|
|
||||||
A custom vendor ID like @var{apl0} would claim the stream was produced by
|
|
||||||
the Apple encoder.
|
|
||||||
|
|
||||||
@item alpha_bits @var{integer}
|
|
||||||
Specify number of bits for alpha component.
|
|
||||||
Possible values are @var{0}, @var{8} and @var{16}.
|
|
||||||
Use @var{0} to disable alpha plane coding.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@subsection Speed considerations
|
|
||||||
|
|
||||||
In the default mode of operation the encoder has to honor frame constraints
|
|
||||||
(i.e. not produc frames with size bigger than requested) while still making
|
|
||||||
output picture as good as possible.
|
|
||||||
A frame containing a lot of small details is harder to compress and the encoder
|
|
||||||
would spend more time searching for appropriate quantizers for each slice.
|
|
||||||
|
|
||||||
Setting a higher @option{bits_per_mb} limit will improve the speed.
|
|
||||||
|
|
||||||
For the fastest encoding speed set the @option{qscale} parameter (4 is the
|
|
||||||
recommended value) and do not set a size constraint.
|
|
||||||
|
|
||||||
@c man end VIDEO ENCODERS
|
@c man end VIDEO ENCODERS
|
||||||
|
|||||||
+288
@@ -0,0 +1,288 @@
|
|||||||
|
@chapter Expression Evaluation
|
||||||
|
@c man begin EXPRESSION EVALUATION
|
||||||
|
|
||||||
|
When evaluating an arithmetic expression, FFmpeg uses an internal
|
||||||
|
formula evaluator, implemented through the @file{libavutil/eval.h}
|
||||||
|
interface.
|
||||||
|
|
||||||
|
An expression may contain unary, binary operators, constants, and
|
||||||
|
functions.
|
||||||
|
|
||||||
|
Two expressions @var{expr1} and @var{expr2} can be combined to form
|
||||||
|
another expression "@var{expr1};@var{expr2}".
|
||||||
|
@var{expr1} and @var{expr2} are evaluated in turn, and the new
|
||||||
|
expression evaluates to the value of @var{expr2}.
|
||||||
|
|
||||||
|
The following binary operators are available: @code{+}, @code{-},
|
||||||
|
@code{*}, @code{/}, @code{^}.
|
||||||
|
|
||||||
|
The following unary operators are available: @code{+}, @code{-}.
|
||||||
|
|
||||||
|
The following functions are available:
|
||||||
|
@table @option
|
||||||
|
@item abs(x)
|
||||||
|
Compute absolute value of @var{x}.
|
||||||
|
|
||||||
|
@item acos(x)
|
||||||
|
Compute arccosine of @var{x}.
|
||||||
|
|
||||||
|
@item asin(x)
|
||||||
|
Compute arcsine of @var{x}.
|
||||||
|
|
||||||
|
@item atan(x)
|
||||||
|
Compute arctangent of @var{x}.
|
||||||
|
|
||||||
|
@item ceil(expr)
|
||||||
|
Round the value of expression @var{expr} upwards to the nearest
|
||||||
|
integer. For example, "ceil(1.5)" is "2.0".
|
||||||
|
|
||||||
|
@item cos(x)
|
||||||
|
Compute cosine of @var{x}.
|
||||||
|
|
||||||
|
@item cosh(x)
|
||||||
|
Compute hyperbolic cosine of @var{x}.
|
||||||
|
|
||||||
|
@item eq(x, y)
|
||||||
|
Return 1 if @var{x} and @var{y} are equivalent, 0 otherwise.
|
||||||
|
|
||||||
|
@item exp(x)
|
||||||
|
Compute exponential of @var{x} (with base @code{e}, the Euler's number).
|
||||||
|
|
||||||
|
@item floor(expr)
|
||||||
|
Round the value of expression @var{expr} downwards to the nearest
|
||||||
|
integer. For example, "floor(-1.5)" is "-2.0".
|
||||||
|
|
||||||
|
@item gauss(x)
|
||||||
|
Compute Gauss function of @var{x}, corresponding to
|
||||||
|
@code{exp(-x*x/2) / sqrt(2*PI)}.
|
||||||
|
|
||||||
|
@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 gt(x, y)
|
||||||
|
Return 1 if @var{x} is greater than @var{y}, 0 otherwise.
|
||||||
|
|
||||||
|
@item gte(x, y)
|
||||||
|
Return 1 if @var{x} is greater than or equal to @var{y}, 0 otherwise.
|
||||||
|
|
||||||
|
@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 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 if(x, y, z)
|
||||||
|
Evaluate @var{x}, and if the result is non-zero return the evaluation
|
||||||
|
result of @var{y}, otherwise the evaluation result of @var{z}.
|
||||||
|
|
||||||
|
@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 ifnot(x, y, z)
|
||||||
|
Evaluate @var{x}, and if the result is zero return the evaluation
|
||||||
|
result of @var{y}, otherwise the evaluation result of @var{z}.
|
||||||
|
|
||||||
|
@item isinf(x)
|
||||||
|
Return 1.0 if @var{x} is +/-INFINITY, 0.0 otherwise.
|
||||||
|
|
||||||
|
@item isnan(x)
|
||||||
|
Return 1.0 if @var{x} is NAN, 0.0 otherwise.
|
||||||
|
|
||||||
|
@item ld(var)
|
||||||
|
Allow to load the value of the internal variable with number
|
||||||
|
@var{var}, which was previously stored with st(@var{var}, @var{expr}).
|
||||||
|
The function returns the loaded value.
|
||||||
|
|
||||||
|
@item log(x)
|
||||||
|
Compute natural logarithm of @var{x}.
|
||||||
|
|
||||||
|
@item lt(x, y)
|
||||||
|
Return 1 if @var{x} is lesser than @var{y}, 0 otherwise.
|
||||||
|
|
||||||
|
@item lte(x, y)
|
||||||
|
Return 1 if @var{x} is lesser than or equal to @var{y}, 0 otherwise.
|
||||||
|
|
||||||
|
@item max(x, y)
|
||||||
|
Return the maximum between @var{x} and @var{y}.
|
||||||
|
|
||||||
|
@item min(x, y)
|
||||||
|
Return the maximum between @var{x} and @var{y}.
|
||||||
|
|
||||||
|
@item mod(x, y)
|
||||||
|
Compute the remainder of division of @var{x} by @var{y}.
|
||||||
|
|
||||||
|
@item not(expr)
|
||||||
|
Return 1.0 if @var{expr} is zero, 0.0 otherwise.
|
||||||
|
|
||||||
|
@item pow(x, y)
|
||||||
|
Compute the power of @var{x} elevated @var{y}, it is equivalent to
|
||||||
|
"(@var{x})^(@var{y})".
|
||||||
|
|
||||||
|
@item print(t)
|
||||||
|
@item print(t, l)
|
||||||
|
Print the value of expression @var{t} with loglevel @var{l}. If
|
||||||
|
@var{l} is not specified then a default log level is used.
|
||||||
|
Returns the value of the expression printed.
|
||||||
|
|
||||||
|
Prints t with loglevel l
|
||||||
|
|
||||||
|
@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 root(expr, max)
|
||||||
|
Find an input value for which the function represented by @var{expr}
|
||||||
|
with argument @var{ld(0)} is 0 in the interval 0..@var{max}.
|
||||||
|
|
||||||
|
The expression in @var{expr} must denote a continuous function or the
|
||||||
|
result is undefined.
|
||||||
|
|
||||||
|
@var{ld(0)} is used to represent the function input value, which means
|
||||||
|
that the given expression will be evaluated multiple times with
|
||||||
|
various input values that the expression can access through
|
||||||
|
@code{ld(0)}. When the expression evaluates to 0 then the
|
||||||
|
corresponding input value will be returned.
|
||||||
|
|
||||||
|
@item sin(x)
|
||||||
|
Compute sine of @var{x}.
|
||||||
|
|
||||||
|
@item sinh(x)
|
||||||
|
Compute hyperbolic sine of @var{x}.
|
||||||
|
|
||||||
|
@item sqrt(expr)
|
||||||
|
Compute the square root of @var{expr}. This is equivalent to
|
||||||
|
"(@var{expr})^.5".
|
||||||
|
|
||||||
|
@item squish(x)
|
||||||
|
Compute expression @code{1/(1 + exp(4*x))}.
|
||||||
|
|
||||||
|
@item st(var, expr)
|
||||||
|
Allow to store the value of the expression @var{expr} in an internal
|
||||||
|
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
|
||||||
|
returns the value stored in the internal variable.
|
||||||
|
Note, Variables are currently not shared between expressions.
|
||||||
|
|
||||||
|
@item tan(x)
|
||||||
|
Compute tangent of @var{x}.
|
||||||
|
|
||||||
|
@item tanh(x)
|
||||||
|
Compute hyperbolic tangent of @var{x}.
|
||||||
|
|
||||||
|
@item taylor(expr, x)
|
||||||
|
@item taylor(expr, x, id)
|
||||||
|
Evaluate a Taylor series at @var{x}, given an expression representing
|
||||||
|
the @code{ld(id)}-th derivative of a function at 0.
|
||||||
|
|
||||||
|
When the series does not converge the result is undefined.
|
||||||
|
|
||||||
|
@var{ld(id)} is used to represent the derivative order in @var{expr},
|
||||||
|
which means that the given expression will be evaluated multiple times
|
||||||
|
with various input values that the expression can access through
|
||||||
|
@code{ld(id)}. If @var{id} is not specified then 0 is assumed.
|
||||||
|
|
||||||
|
Note, when you have the derivatives at y instead of 0,
|
||||||
|
@code{taylor(expr, x-y)} can be used.
|
||||||
|
|
||||||
|
@item time(0)
|
||||||
|
Return the current (wallclock) time in seconds.
|
||||||
|
|
||||||
|
@item trunc(expr)
|
||||||
|
Round the value of expression @var{expr} towards zero to the nearest
|
||||||
|
integer. For example, "trunc(-1.5)" is "-1.0".
|
||||||
|
|
||||||
|
@item while(cond, expr)
|
||||||
|
Evaluate expression @var{expr} while the expression @var{cond} is
|
||||||
|
non-zero, and returns the value of the last @var{expr} evaluation, or
|
||||||
|
NAN if @var{cond} was always false.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
The following constants are available:
|
||||||
|
@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 OR
|
||||||
|
|
||||||
|
For example the construct:
|
||||||
|
@example
|
||||||
|
if (A AND B) then C
|
||||||
|
@end example
|
||||||
|
is equivalent to:
|
||||||
|
@example
|
||||||
|
if(A*B, C)
|
||||||
|
@end example
|
||||||
|
|
||||||
|
In your C code, you can extend the list of unary and binary functions,
|
||||||
|
and define recognized constants, so that they are available for your
|
||||||
|
expressions.
|
||||||
|
|
||||||
|
The evaluator also recognizes the International System unit prefixes.
|
||||||
|
If 'i' is appended after the prefix, binary prefixes are used, which
|
||||||
|
are based on powers of 1024 instead of powers of 1000.
|
||||||
|
The 'B' postfix multiplies the value by 8, and can be appended after a
|
||||||
|
unit prefix or used alone. This allows using for example 'KB', 'MiB',
|
||||||
|
'G' and 'B' as number postfix.
|
||||||
|
|
||||||
|
The list of available International System prefixes follows, with
|
||||||
|
indication of the corresponding powers of 10 and of 2.
|
||||||
|
@table @option
|
||||||
|
@item y
|
||||||
|
10^-24 / 2^-80
|
||||||
|
@item z
|
||||||
|
10^-21 / 2^-70
|
||||||
|
@item a
|
||||||
|
10^-18 / 2^-60
|
||||||
|
@item f
|
||||||
|
10^-15 / 2^-50
|
||||||
|
@item p
|
||||||
|
10^-12 / 2^-40
|
||||||
|
@item n
|
||||||
|
10^-9 / 2^-30
|
||||||
|
@item u
|
||||||
|
10^-6 / 2^-20
|
||||||
|
@item m
|
||||||
|
10^-3 / 2^-10
|
||||||
|
@item c
|
||||||
|
10^-2
|
||||||
|
@item d
|
||||||
|
10^-1
|
||||||
|
@item h
|
||||||
|
10^2
|
||||||
|
@item k
|
||||||
|
10^3 / 2^10
|
||||||
|
@item K
|
||||||
|
10^3 / 2^10
|
||||||
|
@item M
|
||||||
|
10^6 / 2^20
|
||||||
|
@item G
|
||||||
|
10^9 / 2^30
|
||||||
|
@item T
|
||||||
|
10^12 / 2^40
|
||||||
|
@item P
|
||||||
|
10^15 / 2^40
|
||||||
|
@item E
|
||||||
|
10^18 / 2^50
|
||||||
|
@item Z
|
||||||
|
10^21 / 2^60
|
||||||
|
@item Y
|
||||||
|
10^24 / 2^70
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@c man end
|
||||||
@@ -7,7 +7,7 @@ FFMPEG_LIBS= libavdevice \
|
|||||||
libswscale \
|
libswscale \
|
||||||
libavutil \
|
libavutil \
|
||||||
|
|
||||||
CFLAGS += -Wall -g
|
CFLAGS += -Wall -O2 -g
|
||||||
CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
|
CFLAGS := $(shell pkg-config --cflags $(FFMPEG_LIBS)) $(CFLAGS)
|
||||||
LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)
|
LDLIBS := $(shell pkg-config --libs $(FFMPEG_LIBS)) $(LDLIBS)
|
||||||
|
|
||||||
@@ -25,7 +25,6 @@ OBJS=$(addsuffix .o,$(EXAMPLES))
|
|||||||
# the following examples make explicit use of the math library
|
# the following examples make explicit use of the math library
|
||||||
decoding_encoding: LDLIBS += -lm
|
decoding_encoding: LDLIBS += -lm
|
||||||
muxing: LDLIBS += -lm
|
muxing: LDLIBS += -lm
|
||||||
resampling_audio: LDLIBS += -lm
|
|
||||||
|
|
||||||
.phony: all clean-test clean
|
.phony: all clean-test clean
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -14,5 +14,5 @@ correctly configured.
|
|||||||
2) Build the examples in-tree
|
2) Build the examples in-tree
|
||||||
|
|
||||||
Assuming you are in the source FFmpeg checkout directory, you need to build
|
Assuming you are in the source FFmpeg checkout directory, you need to build
|
||||||
FFmpeg (no need to make install in any prefix). Then you can go into
|
FFmpeg (no need to make install in any prefix). Then you can go into the
|
||||||
doc/examples and run a command such as PKG_CONFIG_PATH=pc-uninstalled make.
|
doc/examples and run a command such as PKG_CONFIG_PATH=pc-uninstalled make.
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ static int select_channel_layout(AVCodec *codec)
|
|||||||
{
|
{
|
||||||
const uint64_t *p;
|
const uint64_t *p;
|
||||||
uint64_t best_ch_layout = 0;
|
uint64_t best_ch_layout = 0;
|
||||||
int best_nb_channels = 0;
|
int best_nb_channells = 0;
|
||||||
|
|
||||||
if (!codec->channel_layouts)
|
if (!codec->channel_layouts)
|
||||||
return AV_CH_LAYOUT_STEREO;
|
return AV_CH_LAYOUT_STEREO;
|
||||||
@@ -88,9 +88,9 @@ static int select_channel_layout(AVCodec *codec)
|
|||||||
while (*p) {
|
while (*p) {
|
||||||
int nb_channels = av_get_channel_layout_nb_channels(*p);
|
int nb_channels = av_get_channel_layout_nb_channels(*p);
|
||||||
|
|
||||||
if (nb_channels > best_nb_channels) {
|
if (nb_channels > best_nb_channells) {
|
||||||
best_ch_layout = *p;
|
best_ch_layout = *p;
|
||||||
best_nb_channels = nb_channels;
|
best_nb_channells = nb_channels;
|
||||||
}
|
}
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|||||||
+41
-40
@@ -47,6 +47,10 @@ static uint8_t *video_dst_data[4] = {NULL};
|
|||||||
static int video_dst_linesize[4];
|
static int video_dst_linesize[4];
|
||||||
static int video_dst_bufsize;
|
static int video_dst_bufsize;
|
||||||
|
|
||||||
|
static uint8_t **audio_dst_data = NULL;
|
||||||
|
static int audio_dst_linesize;
|
||||||
|
static int audio_dst_bufsize;
|
||||||
|
|
||||||
static int video_stream_idx = -1, audio_stream_idx = -1;
|
static int video_stream_idx = -1, audio_stream_idx = -1;
|
||||||
static AVFrame *frame = NULL;
|
static AVFrame *frame = NULL;
|
||||||
static AVPacket pkt;
|
static AVPacket pkt;
|
||||||
@@ -56,7 +60,6 @@ static int audio_frame_count = 0;
|
|||||||
static int decode_packet(int *got_frame, int cached)
|
static int decode_packet(int *got_frame, int cached)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int decoded = pkt.size;
|
|
||||||
|
|
||||||
if (pkt.stream_index == video_stream_idx) {
|
if (pkt.stream_index == video_stream_idx) {
|
||||||
/* decode video frame */
|
/* decode video frame */
|
||||||
@@ -88,32 +91,37 @@ static int decode_packet(int *got_frame, int cached)
|
|||||||
fprintf(stderr, "Error decoding audio frame\n");
|
fprintf(stderr, "Error decoding audio frame\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/* Some audio decoders decode only part of the packet, and have to be
|
|
||||||
* called again with the remainder of the packet data.
|
|
||||||
* Sample: fate-suite/lossless-audio/luckynight-partial.shn
|
|
||||||
* Also, some decoders might over-read the packet. */
|
|
||||||
decoded = FFMIN(ret, pkt.size);
|
|
||||||
|
|
||||||
if (*got_frame) {
|
if (*got_frame) {
|
||||||
size_t unpadded_linesize = frame->nb_samples * av_get_bytes_per_sample(frame->format);
|
|
||||||
printf("audio_frame%s n:%d nb_samples:%d pts:%s\n",
|
printf("audio_frame%s n:%d nb_samples:%d pts:%s\n",
|
||||||
cached ? "(cached)" : "",
|
cached ? "(cached)" : "",
|
||||||
audio_frame_count++, frame->nb_samples,
|
audio_frame_count++, frame->nb_samples,
|
||||||
av_ts2timestr(frame->pts, &audio_dec_ctx->time_base));
|
av_ts2timestr(frame->pts, &audio_dec_ctx->time_base));
|
||||||
|
|
||||||
/* Write the raw audio data samples of the first plane. This works
|
ret = av_samples_alloc(audio_dst_data, &audio_dst_linesize, av_frame_get_channels(frame),
|
||||||
* fine for packed formats (e.g. AV_SAMPLE_FMT_S16). However,
|
frame->nb_samples, frame->format, 1);
|
||||||
* most audio decoders output planar audio, which uses a separate
|
if (ret < 0) {
|
||||||
* plane of audio samples for each channel (e.g. AV_SAMPLE_FMT_S16P).
|
fprintf(stderr, "Could not allocate audio buffer\n");
|
||||||
* In other words, this code will write only the first audio channel
|
return AVERROR(ENOMEM);
|
||||||
* in these cases.
|
}
|
||||||
* You should use libswresample or libavfilter to convert the frame
|
|
||||||
* to packed data. */
|
/* TODO: extend return code of the av_samples_* functions so that this call is not needed */
|
||||||
fwrite(frame->extended_data[0], 1, unpadded_linesize, audio_dst_file);
|
audio_dst_bufsize =
|
||||||
|
av_samples_get_buffer_size(NULL, av_frame_get_channels(frame),
|
||||||
|
frame->nb_samples, frame->format, 1);
|
||||||
|
|
||||||
|
/* copy audio data to destination buffer:
|
||||||
|
* this is required since rawaudio expects non aligned data */
|
||||||
|
av_samples_copy(audio_dst_data, frame->data, 0, 0,
|
||||||
|
frame->nb_samples, av_frame_get_channels(frame), frame->format);
|
||||||
|
|
||||||
|
/* write to rawaudio file */
|
||||||
|
fwrite(audio_dst_data[0], 1, audio_dst_bufsize, audio_dst_file);
|
||||||
|
av_freep(&audio_dst_data[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return decoded;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int open_codec_context(int *stream_idx,
|
static int open_codec_context(int *stream_idx,
|
||||||
@@ -236,6 +244,8 @@ int main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (open_codec_context(&audio_stream_idx, fmt_ctx, AVMEDIA_TYPE_AUDIO) >= 0) {
|
if (open_codec_context(&audio_stream_idx, fmt_ctx, AVMEDIA_TYPE_AUDIO) >= 0) {
|
||||||
|
int nb_planes;
|
||||||
|
|
||||||
audio_stream = fmt_ctx->streams[audio_stream_idx];
|
audio_stream = fmt_ctx->streams[audio_stream_idx];
|
||||||
audio_dec_ctx = audio_stream->codec;
|
audio_dec_ctx = audio_stream->codec;
|
||||||
audio_dst_file = fopen(audio_dst_filename, "wb");
|
audio_dst_file = fopen(audio_dst_filename, "wb");
|
||||||
@@ -244,6 +254,15 @@ int main (int argc, char **argv)
|
|||||||
ret = 1;
|
ret = 1;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nb_planes = av_sample_fmt_is_planar(audio_dec_ctx->sample_fmt) ?
|
||||||
|
audio_dec_ctx->channels : 1;
|
||||||
|
audio_dst_data = av_mallocz(sizeof(uint8_t *) * nb_planes);
|
||||||
|
if (!audio_dst_data) {
|
||||||
|
fprintf(stderr, "Could not allocate audio data buffers\n");
|
||||||
|
ret = AVERROR(ENOMEM);
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dump input information to stderr */
|
/* dump input information to stderr */
|
||||||
@@ -274,15 +293,8 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
/* read frames from the file */
|
/* read frames from the file */
|
||||||
while (av_read_frame(fmt_ctx, &pkt) >= 0) {
|
while (av_read_frame(fmt_ctx, &pkt) >= 0) {
|
||||||
AVPacket orig_pkt = pkt;
|
decode_packet(&got_frame, 0);
|
||||||
do {
|
av_free_packet(&pkt);
|
||||||
ret = decode_packet(&got_frame, 0);
|
|
||||||
if (ret < 0)
|
|
||||||
break;
|
|
||||||
pkt.data += ret;
|
|
||||||
pkt.size -= ret;
|
|
||||||
} while (pkt.size > 0);
|
|
||||||
av_free_packet(&orig_pkt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* flush cached frames */
|
/* flush cached frames */
|
||||||
@@ -302,25 +314,13 @@ int main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (audio_stream) {
|
if (audio_stream) {
|
||||||
enum AVSampleFormat sfmt = audio_dec_ctx->sample_fmt;
|
|
||||||
int n_channels = audio_dec_ctx->channels;
|
|
||||||
const char *fmt;
|
const char *fmt;
|
||||||
|
|
||||||
if (av_sample_fmt_is_planar(sfmt)) {
|
if ((ret = get_format_from_sample_fmt(&fmt, audio_dec_ctx->sample_fmt)) < 0)
|
||||||
const char *packed = av_get_sample_fmt_name(sfmt);
|
|
||||||
printf("Warning: the sample format the decoder produced is planar "
|
|
||||||
"(%s). This example will output the first channel only.\n",
|
|
||||||
packed ? packed : "?");
|
|
||||||
sfmt = av_get_packed_sample_fmt(sfmt);
|
|
||||||
n_channels = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((ret = get_format_from_sample_fmt(&fmt, sfmt)) < 0)
|
|
||||||
goto end;
|
goto end;
|
||||||
|
|
||||||
printf("Play the output audio file with the command:\n"
|
printf("Play the output audio file with the command:\n"
|
||||||
"ffplay -f %s -ac %d -ar %d %s\n",
|
"ffplay -f %s -ac %d -ar %d %s\n",
|
||||||
fmt, n_channels, audio_dec_ctx->sample_rate,
|
fmt, audio_dec_ctx->channels, audio_dec_ctx->sample_rate,
|
||||||
audio_dst_filename);
|
audio_dst_filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,6 +336,7 @@ end:
|
|||||||
fclose(audio_dst_file);
|
fclose(audio_dst_file);
|
||||||
av_free(frame);
|
av_free(frame);
|
||||||
av_free(video_dst_data[0]);
|
av_free(video_dst_data[0]);
|
||||||
|
av_free(audio_dst_data);
|
||||||
|
|
||||||
return ret < 0;
|
return ret < 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,10 +36,9 @@
|
|||||||
#include <libavfilter/avcodec.h>
|
#include <libavfilter/avcodec.h>
|
||||||
#include <libavfilter/buffersink.h>
|
#include <libavfilter/buffersink.h>
|
||||||
#include <libavfilter/buffersrc.h>
|
#include <libavfilter/buffersrc.h>
|
||||||
#include <libavutil/opt.h>
|
|
||||||
|
|
||||||
static const char *filter_descr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono";
|
const char *filter_descr = "aresample=8000,aconvert=s16:mono";
|
||||||
static const char *player = "ffplay -f s16le -ar 8000 -ac 1 -";
|
const char *player = "ffplay -f s16le -ar 8000 -ac 1 -";
|
||||||
|
|
||||||
static AVFormatContext *fmt_ctx;
|
static AVFormatContext *fmt_ctx;
|
||||||
static AVCodecContext *dec_ctx;
|
static AVCodecContext *dec_ctx;
|
||||||
@@ -71,7 +70,6 @@ static int open_input_file(const char *filename)
|
|||||||
}
|
}
|
||||||
audio_stream_index = ret;
|
audio_stream_index = ret;
|
||||||
dec_ctx = fmt_ctx->streams[audio_stream_index]->codec;
|
dec_ctx = fmt_ctx->streams[audio_stream_index]->codec;
|
||||||
av_opt_set_int(dec_ctx, "refcounted_frames", 1, 0);
|
|
||||||
|
|
||||||
/* init the audio decoder */
|
/* init the audio decoder */
|
||||||
if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0) {
|
if ((ret = avcodec_open2(dec_ctx, dec, NULL)) < 0) {
|
||||||
@@ -87,12 +85,11 @@ static int init_filters(const char *filters_descr)
|
|||||||
char args[512];
|
char args[512];
|
||||||
int ret;
|
int ret;
|
||||||
AVFilter *abuffersrc = avfilter_get_by_name("abuffer");
|
AVFilter *abuffersrc = avfilter_get_by_name("abuffer");
|
||||||
AVFilter *abuffersink = avfilter_get_by_name("abuffersink");
|
AVFilter *abuffersink = avfilter_get_by_name("ffabuffersink");
|
||||||
AVFilterInOut *outputs = avfilter_inout_alloc();
|
AVFilterInOut *outputs = avfilter_inout_alloc();
|
||||||
AVFilterInOut *inputs = avfilter_inout_alloc();
|
AVFilterInOut *inputs = avfilter_inout_alloc();
|
||||||
static const enum AVSampleFormat out_sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 };
|
const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 };
|
||||||
static const int64_t out_channel_layouts[] = { AV_CH_LAYOUT_MONO, -1 };
|
AVABufferSinkParams *abuffersink_params;
|
||||||
static const int out_sample_rates[] = { 8000, -1 };
|
|
||||||
const AVFilterLink *outlink;
|
const AVFilterLink *outlink;
|
||||||
AVRational time_base = fmt_ctx->streams[audio_stream_index]->time_base;
|
AVRational time_base = fmt_ctx->streams[audio_stream_index]->time_base;
|
||||||
|
|
||||||
@@ -113,34 +110,16 @@ static int init_filters(const char *filters_descr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* buffer audio sink: to terminate the filter chain. */
|
/* buffer audio sink: to terminate the filter chain. */
|
||||||
|
abuffersink_params = av_abuffersink_params_alloc();
|
||||||
|
abuffersink_params->sample_fmts = sample_fmts;
|
||||||
ret = avfilter_graph_create_filter(&buffersink_ctx, abuffersink, "out",
|
ret = avfilter_graph_create_filter(&buffersink_ctx, abuffersink, "out",
|
||||||
NULL, NULL, filter_graph);
|
NULL, abuffersink_params, filter_graph);
|
||||||
|
av_free(abuffersink_params);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot create audio buffer sink\n");
|
av_log(NULL, AV_LOG_ERROR, "Cannot create audio buffer sink\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = av_opt_set_int_list(buffersink_ctx, "sample_fmts", out_sample_fmts, -1,
|
|
||||||
AV_OPT_SEARCH_CHILDREN);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot set output sample format\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = av_opt_set_int_list(buffersink_ctx, "channel_layouts", out_channel_layouts, -1,
|
|
||||||
AV_OPT_SEARCH_CHILDREN);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot set output channel layout\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = av_opt_set_int_list(buffersink_ctx, "sample_rates", out_sample_rates, -1,
|
|
||||||
AV_OPT_SEARCH_CHILDREN);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot set output sample rate\n");
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Endpoints for the filter graph. */
|
/* Endpoints for the filter graph. */
|
||||||
outputs->name = av_strdup("in");
|
outputs->name = av_strdup("in");
|
||||||
outputs->filter_ctx = buffersrc_ctx;
|
outputs->filter_ctx = buffersrc_ctx;
|
||||||
@@ -152,7 +131,7 @@ static int init_filters(const char *filters_descr)
|
|||||||
inputs->pad_idx = 0;
|
inputs->pad_idx = 0;
|
||||||
inputs->next = NULL;
|
inputs->next = NULL;
|
||||||
|
|
||||||
if ((ret = avfilter_graph_parse_ptr(filter_graph, filters_descr,
|
if ((ret = avfilter_graph_parse(filter_graph, filters_descr,
|
||||||
&inputs, &outputs, NULL)) < 0)
|
&inputs, &outputs, NULL)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@@ -171,10 +150,11 @@ static int init_filters(const char *filters_descr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_frame(const AVFrame *frame)
|
static void print_samplesref(AVFilterBufferRef *samplesref)
|
||||||
{
|
{
|
||||||
const int n = frame->nb_samples * av_get_channel_layout_nb_channels(av_frame_get_channel_layout(frame));
|
const AVFilterBufferRefAudioProps *props = samplesref->audio;
|
||||||
const uint16_t *p = (uint16_t*)frame->data[0];
|
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;
|
const uint16_t *p_end = p + n;
|
||||||
|
|
||||||
while (p < p_end) {
|
while (p < p_end) {
|
||||||
@@ -189,11 +169,10 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
AVPacket packet;
|
AVPacket packet;
|
||||||
AVFrame *frame = av_frame_alloc();
|
AVFrame *frame = avcodec_alloc_frame();
|
||||||
AVFrame *filt_frame = av_frame_alloc();
|
|
||||||
int got_frame;
|
int got_frame;
|
||||||
|
|
||||||
if (!frame || !filt_frame) {
|
if (!frame) {
|
||||||
perror("Could not allocate frame");
|
perror("Could not allocate frame");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -213,6 +192,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* read all packets */
|
/* read all packets */
|
||||||
while (1) {
|
while (1) {
|
||||||
|
AVFilterBufferRef *samplesref;
|
||||||
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
|
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -227,20 +207,22 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (got_frame) {
|
if (got_frame) {
|
||||||
/* push the audio data from decoded frame into the filtergraph */
|
/* push the audio data from decoded frame into the filtergraph */
|
||||||
if (av_buffersrc_add_frame_flags(buffersrc_ctx, frame, 0) < 0) {
|
if (av_buffersrc_add_frame(buffersrc_ctx, frame, 0) < 0) {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Error while feeding the audio filtergraph\n");
|
av_log(NULL, AV_LOG_ERROR, "Error while feeding the audio filtergraph\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pull filtered audio from the filtergraph */
|
/* pull filtered audio from the filtergraph */
|
||||||
while (1) {
|
while (1) {
|
||||||
ret = av_buffersink_get_frame(buffersink_ctx, filt_frame);
|
ret = av_buffersink_get_buffer_ref(buffersink_ctx, &samplesref, 0);
|
||||||
if(ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
|
if(ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
|
||||||
break;
|
break;
|
||||||
if(ret < 0)
|
if(ret < 0)
|
||||||
goto end;
|
goto end;
|
||||||
print_frame(filt_frame);
|
if (samplesref) {
|
||||||
av_frame_unref(filt_frame);
|
print_samplesref(samplesref);
|
||||||
|
avfilter_unref_bufferp(&samplesref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -251,8 +233,7 @@ end:
|
|||||||
if (dec_ctx)
|
if (dec_ctx)
|
||||||
avcodec_close(dec_ctx);
|
avcodec_close(dec_ctx);
|
||||||
avformat_close_input(&fmt_ctx);
|
avformat_close_input(&fmt_ctx);
|
||||||
av_frame_free(&frame);
|
av_freep(&frame);
|
||||||
av_frame_free(&filt_frame);
|
|
||||||
|
|
||||||
if (ret < 0 && ret != AVERROR_EOF) {
|
if (ret < 0 && ret != AVERROR_EOF) {
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ static int init_filters(const char *filters_descr)
|
|||||||
char args[512];
|
char args[512];
|
||||||
int ret;
|
int ret;
|
||||||
AVFilter *buffersrc = avfilter_get_by_name("buffer");
|
AVFilter *buffersrc = avfilter_get_by_name("buffer");
|
||||||
AVFilter *buffersink = avfilter_get_by_name("buffersink");
|
AVFilter *buffersink = avfilter_get_by_name("ffbuffersink");
|
||||||
AVFilterInOut *outputs = avfilter_inout_alloc();
|
AVFilterInOut *outputs = avfilter_inout_alloc();
|
||||||
AVFilterInOut *inputs = avfilter_inout_alloc();
|
AVFilterInOut *inputs = avfilter_inout_alloc();
|
||||||
enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE };
|
enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE };
|
||||||
@@ -129,7 +129,7 @@ static int init_filters(const char *filters_descr)
|
|||||||
inputs->pad_idx = 0;
|
inputs->pad_idx = 0;
|
||||||
inputs->next = NULL;
|
inputs->next = NULL;
|
||||||
|
|
||||||
if ((ret = avfilter_graph_parse_ptr(filter_graph, filters_descr,
|
if ((ret = avfilter_graph_parse(filter_graph, filters_descr,
|
||||||
&inputs, &outputs, NULL)) < 0)
|
&inputs, &outputs, NULL)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@@ -138,33 +138,33 @@ static int init_filters(const char *filters_descr)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void display_frame(const AVFrame *frame, AVRational time_base)
|
static void display_picref(AVFilterBufferRef *picref, AVRational time_base)
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
uint8_t *p0, *p;
|
uint8_t *p0, *p;
|
||||||
int64_t delay;
|
int64_t delay;
|
||||||
|
|
||||||
if (frame->pts != AV_NOPTS_VALUE) {
|
if (picref->pts != AV_NOPTS_VALUE) {
|
||||||
if (last_pts != AV_NOPTS_VALUE) {
|
if (last_pts != AV_NOPTS_VALUE) {
|
||||||
/* sleep roughly the right amount of time;
|
/* sleep roughly the right amount of time;
|
||||||
* usleep is in microseconds, just like AV_TIME_BASE. */
|
* usleep is in microseconds, just like AV_TIME_BASE. */
|
||||||
delay = av_rescale_q(frame->pts - last_pts,
|
delay = av_rescale_q(picref->pts - last_pts,
|
||||||
time_base, AV_TIME_BASE_Q);
|
time_base, AV_TIME_BASE_Q);
|
||||||
if (delay > 0 && delay < 1000000)
|
if (delay > 0 && delay < 1000000)
|
||||||
usleep(delay);
|
usleep(delay);
|
||||||
}
|
}
|
||||||
last_pts = frame->pts;
|
last_pts = picref->pts;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Trivial ASCII grayscale display. */
|
/* Trivial ASCII grayscale display. */
|
||||||
p0 = frame->data[0];
|
p0 = picref->data[0];
|
||||||
puts("\033c");
|
puts("\033c");
|
||||||
for (y = 0; y < frame->height; y++) {
|
for (y = 0; y < picref->video->h; y++) {
|
||||||
p = p0;
|
p = p0;
|
||||||
for (x = 0; x < frame->width; x++)
|
for (x = 0; x < picref->video->w; x++)
|
||||||
putchar(" .-+#"[*(p++) / 52]);
|
putchar(" .-+#"[*(p++) / 52]);
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
p0 += frame->linesize[0];
|
p0 += picref->linesize[0];
|
||||||
}
|
}
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
@@ -173,11 +173,10 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
AVPacket packet;
|
AVPacket packet;
|
||||||
AVFrame *frame = av_frame_alloc();
|
AVFrame *frame = avcodec_alloc_frame();
|
||||||
AVFrame *filt_frame = av_frame_alloc();
|
|
||||||
int got_frame;
|
int got_frame;
|
||||||
|
|
||||||
if (!frame || !filt_frame) {
|
if (!frame) {
|
||||||
perror("Could not allocate frame");
|
perror("Could not allocate frame");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -197,6 +196,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* read all packets */
|
/* read all packets */
|
||||||
while (1) {
|
while (1) {
|
||||||
|
AVFilterBufferRef *picref;
|
||||||
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
|
if ((ret = av_read_frame(fmt_ctx, &packet)) < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -213,20 +213,23 @@ int main(int argc, char **argv)
|
|||||||
frame->pts = av_frame_get_best_effort_timestamp(frame);
|
frame->pts = av_frame_get_best_effort_timestamp(frame);
|
||||||
|
|
||||||
/* push the decoded frame into the filtergraph */
|
/* push the decoded frame into the filtergraph */
|
||||||
if (av_buffersrc_add_frame_flags(buffersrc_ctx, frame, AV_BUFFERSRC_FLAG_KEEP_REF) < 0) {
|
if (av_buffersrc_add_frame(buffersrc_ctx, frame, 0) < 0) {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Error while feeding the filtergraph\n");
|
av_log(NULL, AV_LOG_ERROR, "Error while feeding the filtergraph\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pull filtered frames from the filtergraph */
|
/* pull filtered pictures from the filtergraph */
|
||||||
while (1) {
|
while (1) {
|
||||||
ret = av_buffersink_get_frame(buffersink_ctx, filt_frame);
|
ret = av_buffersink_get_buffer_ref(buffersink_ctx, &picref, 0);
|
||||||
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
|
if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF)
|
||||||
break;
|
break;
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto end;
|
goto end;
|
||||||
display_frame(filt_frame, buffersink_ctx->inputs[0]->time_base);
|
|
||||||
av_frame_unref(filt_frame);
|
if (picref) {
|
||||||
|
display_picref(picref, buffersink_ctx->inputs[0]->time_base);
|
||||||
|
avfilter_unref_bufferp(&picref);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -237,8 +240,7 @@ end:
|
|||||||
if (dec_ctx)
|
if (dec_ctx)
|
||||||
avcodec_close(dec_ctx);
|
avcodec_close(dec_ctx);
|
||||||
avformat_close_input(&fmt_ctx);
|
avformat_close_input(&fmt_ctx);
|
||||||
av_frame_free(&frame);
|
av_freep(&frame);
|
||||||
av_frame_free(&filt_frame);
|
|
||||||
|
|
||||||
if (ret < 0 && ret != AVERROR_EOF) {
|
if (ret < 0 && ret != AVERROR_EOF) {
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|||||||
+56
-106
@@ -34,11 +34,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <libavutil/opt.h>
|
|
||||||
#include <libavutil/mathematics.h>
|
#include <libavutil/mathematics.h>
|
||||||
#include <libavformat/avformat.h>
|
#include <libavformat/avformat.h>
|
||||||
#include <libswscale/swscale.h>
|
#include <libswscale/swscale.h>
|
||||||
#include <libswresample/swresample.h>
|
|
||||||
|
|
||||||
/* 5 seconds stream duration */
|
/* 5 seconds stream duration */
|
||||||
#define STREAM_DURATION 200.0
|
#define STREAM_DURATION 200.0
|
||||||
@@ -48,6 +46,13 @@
|
|||||||
|
|
||||||
static int sws_flags = SWS_BICUBIC;
|
static int sws_flags = SWS_BICUBIC;
|
||||||
|
|
||||||
|
/**************************************************************/
|
||||||
|
/* audio output */
|
||||||
|
|
||||||
|
static float t, tincr, tincr2;
|
||||||
|
static int16_t *samples;
|
||||||
|
static int audio_input_frame_size;
|
||||||
|
|
||||||
/* Add an output stream. */
|
/* Add an output stream. */
|
||||||
static AVStream *add_stream(AVFormatContext *oc, AVCodec **codec,
|
static AVStream *add_stream(AVFormatContext *oc, AVCodec **codec,
|
||||||
enum AVCodecID codec_id)
|
enum AVCodecID codec_id)
|
||||||
@@ -73,7 +78,8 @@ static AVStream *add_stream(AVFormatContext *oc, AVCodec **codec,
|
|||||||
|
|
||||||
switch ((*codec)->type) {
|
switch ((*codec)->type) {
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
c->sample_fmt = AV_SAMPLE_FMT_FLTP;
|
st->id = 1;
|
||||||
|
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;
|
||||||
@@ -121,17 +127,8 @@ static AVStream *add_stream(AVFormatContext *oc, AVCodec **codec,
|
|||||||
/* audio output */
|
/* audio output */
|
||||||
|
|
||||||
static float t, tincr, tincr2;
|
static float t, tincr, tincr2;
|
||||||
|
static int16_t *samples;
|
||||||
static uint8_t **src_samples_data;
|
static int audio_input_frame_size;
|
||||||
static int src_samples_linesize;
|
|
||||||
static int src_nb_samples;
|
|
||||||
|
|
||||||
static int max_dst_nb_samples;
|
|
||||||
uint8_t **dst_samples_data;
|
|
||||||
int dst_samples_linesize;
|
|
||||||
int dst_samples_size;
|
|
||||||
|
|
||||||
struct SwrContext *swr_ctx = NULL;
|
|
||||||
|
|
||||||
static void open_audio(AVFormatContext *oc, AVCodec *codec, AVStream *st)
|
static void open_audio(AVFormatContext *oc, AVCodec *codec, AVStream *st)
|
||||||
{
|
{
|
||||||
@@ -153,51 +150,17 @@ static void open_audio(AVFormatContext *oc, AVCodec *codec, AVStream *st)
|
|||||||
/* 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;
|
||||||
|
|
||||||
src_nb_samples = c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE ?
|
if (c->codec->capabilities & CODEC_CAP_VARIABLE_FRAME_SIZE)
|
||||||
10000 : c->frame_size;
|
audio_input_frame_size = 10000;
|
||||||
|
else
|
||||||
ret = av_samples_alloc_array_and_samples(&src_samples_data, &src_samples_linesize, c->channels,
|
audio_input_frame_size = c->frame_size;
|
||||||
src_nb_samples, c->sample_fmt, 0);
|
samples = av_malloc(audio_input_frame_size *
|
||||||
if (ret < 0) {
|
av_get_bytes_per_sample(c->sample_fmt) *
|
||||||
fprintf(stderr, "Could not allocate source samples\n");
|
c->channels);
|
||||||
|
if (!samples) {
|
||||||
|
fprintf(stderr, "Could not allocate audio samples buffer\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* create resampler context */
|
|
||||||
if (c->sample_fmt != AV_SAMPLE_FMT_S16) {
|
|
||||||
swr_ctx = swr_alloc();
|
|
||||||
if (!swr_ctx) {
|
|
||||||
fprintf(stderr, "Could not allocate resampler context\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* set options */
|
|
||||||
av_opt_set_int (swr_ctx, "in_channel_count", c->channels, 0);
|
|
||||||
av_opt_set_int (swr_ctx, "in_sample_rate", c->sample_rate, 0);
|
|
||||||
av_opt_set_sample_fmt(swr_ctx, "in_sample_fmt", AV_SAMPLE_FMT_S16, 0);
|
|
||||||
av_opt_set_int (swr_ctx, "out_channel_count", c->channels, 0);
|
|
||||||
av_opt_set_int (swr_ctx, "out_sample_rate", c->sample_rate, 0);
|
|
||||||
av_opt_set_sample_fmt(swr_ctx, "out_sample_fmt", c->sample_fmt, 0);
|
|
||||||
|
|
||||||
/* initialize the resampling context */
|
|
||||||
if ((ret = swr_init(swr_ctx)) < 0) {
|
|
||||||
fprintf(stderr, "Failed to initialize the resampling context\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* compute the number of converted samples: buffering is avoided
|
|
||||||
* ensuring that the output buffer will contain at least all the
|
|
||||||
* converted input samples */
|
|
||||||
max_dst_nb_samples = src_nb_samples;
|
|
||||||
ret = av_samples_alloc_array_and_samples(&dst_samples_data, &dst_samples_linesize, c->channels,
|
|
||||||
max_dst_nb_samples, c->sample_fmt, 0);
|
|
||||||
if (ret < 0) {
|
|
||||||
fprintf(stderr, "Could not allocate destination samples\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
dst_samples_size = av_samples_get_buffer_size(NULL, c->channels, max_dst_nb_samples,
|
|
||||||
c->sample_fmt, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Prepare a 16 bit dummy audio frame of 'frame_size' samples and
|
/* Prepare a 16 bit dummy audio frame of 'frame_size' samples and
|
||||||
@@ -222,45 +185,18 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
|
|||||||
AVCodecContext *c;
|
AVCodecContext *c;
|
||||||
AVPacket pkt = { 0 }; // data and size must be 0;
|
AVPacket pkt = { 0 }; // data and size must be 0;
|
||||||
AVFrame *frame = avcodec_alloc_frame();
|
AVFrame *frame = avcodec_alloc_frame();
|
||||||
int got_packet, ret, dst_nb_samples;
|
int got_packet, ret;
|
||||||
|
|
||||||
av_init_packet(&pkt);
|
av_init_packet(&pkt);
|
||||||
c = st->codec;
|
c = st->codec;
|
||||||
|
|
||||||
get_audio_frame((int16_t *)src_samples_data[0], src_nb_samples, c->channels);
|
get_audio_frame(samples, audio_input_frame_size, c->channels);
|
||||||
|
frame->nb_samples = audio_input_frame_size;
|
||||||
/* convert samples from native format to destination codec format, using the resampler */
|
|
||||||
if (swr_ctx) {
|
|
||||||
/* compute destination number of samples */
|
|
||||||
dst_nb_samples = av_rescale_rnd(swr_get_delay(swr_ctx, c->sample_rate) + src_nb_samples,
|
|
||||||
c->sample_rate, c->sample_rate, AV_ROUND_UP);
|
|
||||||
if (dst_nb_samples > max_dst_nb_samples) {
|
|
||||||
av_free(dst_samples_data[0]);
|
|
||||||
ret = av_samples_alloc(dst_samples_data, &dst_samples_linesize, c->channels,
|
|
||||||
dst_nb_samples, c->sample_fmt, 0);
|
|
||||||
if (ret < 0)
|
|
||||||
exit(1);
|
|
||||||
max_dst_nb_samples = dst_nb_samples;
|
|
||||||
dst_samples_size = av_samples_get_buffer_size(NULL, c->channels, dst_nb_samples,
|
|
||||||
c->sample_fmt, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* convert to destination format */
|
|
||||||
ret = swr_convert(swr_ctx,
|
|
||||||
dst_samples_data, dst_nb_samples,
|
|
||||||
(const uint8_t **)src_samples_data, src_nb_samples);
|
|
||||||
if (ret < 0) {
|
|
||||||
fprintf(stderr, "Error while converting\n");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dst_samples_data[0] = src_samples_data[0];
|
|
||||||
dst_nb_samples = src_nb_samples;
|
|
||||||
}
|
|
||||||
|
|
||||||
frame->nb_samples = dst_nb_samples;
|
|
||||||
avcodec_fill_audio_frame(frame, c->channels, c->sample_fmt,
|
avcodec_fill_audio_frame(frame, c->channels, c->sample_fmt,
|
||||||
dst_samples_data[0], dst_samples_size, 0);
|
(uint8_t *)samples,
|
||||||
|
audio_input_frame_size *
|
||||||
|
av_get_bytes_per_sample(c->sample_fmt) *
|
||||||
|
c->channels, 1);
|
||||||
|
|
||||||
ret = avcodec_encode_audio2(c, &pkt, frame, &got_packet);
|
ret = avcodec_encode_audio2(c, &pkt, frame, &got_packet);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
@@ -286,8 +222,8 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
|
|||||||
static void close_audio(AVFormatContext *oc, AVStream *st)
|
static void close_audio(AVFormatContext *oc, AVStream *st)
|
||||||
{
|
{
|
||||||
avcodec_close(st->codec);
|
avcodec_close(st->codec);
|
||||||
av_free(src_samples_data[0]);
|
|
||||||
av_free(dst_samples_data[0]);
|
av_free(samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************/
|
/**************************************************************/
|
||||||
@@ -406,19 +342,25 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st)
|
|||||||
|
|
||||||
ret = av_interleaved_write_frame(oc, &pkt);
|
ret = av_interleaved_write_frame(oc, &pkt);
|
||||||
} else {
|
} else {
|
||||||
AVPacket pkt = { 0 };
|
|
||||||
int got_packet;
|
|
||||||
av_init_packet(&pkt);
|
|
||||||
|
|
||||||
/* encode the image */
|
/* encode the image */
|
||||||
ret = avcodec_encode_video2(c, &pkt, frame, &got_packet);
|
AVPacket pkt;
|
||||||
|
int got_output;
|
||||||
|
|
||||||
|
av_init_packet(&pkt);
|
||||||
|
pkt.data = NULL; // packet data will be allocated by the encoder
|
||||||
|
pkt.size = 0;
|
||||||
|
|
||||||
|
ret = avcodec_encode_video2(c, &pkt, frame, &got_output);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
fprintf(stderr, "Error encoding video frame: %s\n", av_err2str(ret));
|
fprintf(stderr, "Error encoding video frame: %s\n", av_err2str(ret));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
/* If size is zero, it means the image was buffered. */
|
|
||||||
|
|
||||||
if (!ret && got_packet && pkt.size) {
|
/* If size is zero, it means the image was buffered. */
|
||||||
|
if (got_output) {
|
||||||
|
if (c->coded_frame->key_frame)
|
||||||
|
pkt.flags |= AV_PKT_FLAG_KEY;
|
||||||
|
|
||||||
pkt.stream_index = st->index;
|
pkt.stream_index = st->index;
|
||||||
|
|
||||||
/* Write the compressed frame to the media file. */
|
/* Write the compressed frame to the media file. */
|
||||||
@@ -452,7 +394,7 @@ int main(int argc, char **argv)
|
|||||||
AVFormatContext *oc;
|
AVFormatContext *oc;
|
||||||
AVStream *audio_st, *video_st;
|
AVStream *audio_st, *video_st;
|
||||||
AVCodec *audio_codec, *video_codec;
|
AVCodec *audio_codec, *video_codec;
|
||||||
double audio_time, video_time;
|
double audio_pts, video_pts;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Initialize libavcodec, and register all codecs and formats. */
|
/* Initialize libavcodec, and register all codecs and formats. */
|
||||||
@@ -525,15 +467,23 @@ int main(int argc, char **argv)
|
|||||||
frame->pts = 0;
|
frame->pts = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* Compute current audio and video time. */
|
/* Compute current audio and video time. */
|
||||||
audio_time = audio_st ? audio_st->pts.val * av_q2d(audio_st->time_base) : 0.0;
|
if (audio_st)
|
||||||
video_time = video_st ? video_st->pts.val * av_q2d(video_st->time_base) : 0.0;
|
audio_pts = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;
|
||||||
|
else
|
||||||
|
audio_pts = 0.0;
|
||||||
|
|
||||||
if ((!audio_st || audio_time >= STREAM_DURATION) &&
|
if (video_st)
|
||||||
(!video_st || video_time >= STREAM_DURATION))
|
video_pts = (double)video_st->pts.val * video_st->time_base.num /
|
||||||
|
video_st->time_base.den;
|
||||||
|
else
|
||||||
|
video_pts = 0.0;
|
||||||
|
|
||||||
|
if ((!audio_st || audio_pts >= STREAM_DURATION) &&
|
||||||
|
(!video_st || video_pts >= STREAM_DURATION))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* write interleaved audio and video frames */
|
/* write interleaved audio and video frames */
|
||||||
if (!video_st || (video_st && audio_st && audio_time < video_time)) {
|
if (!video_st || (video_st && audio_st && audio_pts < video_pts)) {
|
||||||
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);
|
||||||
|
|||||||
@@ -78,6 +78,18 @@ void fill_samples(double *dst, int nb_samples, int nb_channels, int sample_rate,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int alloc_samples_array_and_data(uint8_t ***data, int *linesize, int nb_channels,
|
||||||
|
int nb_samples, enum AVSampleFormat sample_fmt, int align)
|
||||||
|
{
|
||||||
|
int nb_planes = av_sample_fmt_is_planar(sample_fmt) ? nb_channels : 1;
|
||||||
|
|
||||||
|
*data = av_malloc(sizeof(*data) * nb_planes);
|
||||||
|
if (!*data)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
return av_samples_alloc(*data, linesize, nb_channels,
|
||||||
|
nb_samples, sample_fmt, align);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int64_t src_ch_layout = AV_CH_LAYOUT_STEREO, dst_ch_layout = AV_CH_LAYOUT_SURROUND;
|
int64_t src_ch_layout = AV_CH_LAYOUT_STEREO, dst_ch_layout = AV_CH_LAYOUT_SURROUND;
|
||||||
@@ -137,8 +149,8 @@ int main(int argc, char **argv)
|
|||||||
/* allocate source and destination samples buffers */
|
/* allocate source and destination samples buffers */
|
||||||
|
|
||||||
src_nb_channels = av_get_channel_layout_nb_channels(src_ch_layout);
|
src_nb_channels = av_get_channel_layout_nb_channels(src_ch_layout);
|
||||||
ret = av_samples_alloc_array_and_samples(&src_data, &src_linesize, src_nb_channels,
|
ret = alloc_samples_array_and_data(&src_data, &src_linesize, src_nb_channels,
|
||||||
src_nb_samples, src_sample_fmt, 0);
|
src_nb_samples, src_sample_fmt, 0);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
fprintf(stderr, "Could not allocate source samples\n");
|
fprintf(stderr, "Could not allocate source samples\n");
|
||||||
goto end;
|
goto end;
|
||||||
@@ -152,8 +164,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* buffer is going to be directly written to a rawaudio file, no alignment */
|
/* buffer is going to be directly written to a rawaudio file, no alignment */
|
||||||
dst_nb_channels = av_get_channel_layout_nb_channels(dst_ch_layout);
|
dst_nb_channels = av_get_channel_layout_nb_channels(dst_ch_layout);
|
||||||
ret = av_samples_alloc_array_and_samples(&dst_data, &dst_linesize, dst_nb_channels,
|
ret = alloc_samples_array_and_data(&dst_data, &dst_linesize, dst_nb_channels,
|
||||||
dst_nb_samples, dst_sample_fmt, 0);
|
dst_nb_samples, dst_sample_fmt, 0);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
fprintf(stderr, "Could not allocate destination samples\n");
|
fprintf(stderr, "Could not allocate destination samples\n");
|
||||||
goto end;
|
goto end;
|
||||||
|
|||||||
+25
-23
@@ -105,7 +105,7 @@ For example, img1.jpg, img2.jpg, img3.jpg,...
|
|||||||
Then you may run:
|
Then you may run:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
|
ffmpeg -f image2 -i img%d.jpg /tmp/a.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Notice that @samp{%d} is replaced by the image number.
|
Notice that @samp{%d} is replaced by the image number.
|
||||||
@@ -118,7 +118,7 @@ the sequence. This is useful if your sequence does not start with
|
|||||||
example will start with @file{img100.jpg}:
|
example will start with @file{img100.jpg}:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -f image2 -start_number 100 -i img%d.jpg /tmp/a.mpg
|
ffmpeg -f image2 -start_number 100 -i img%d.jpg /tmp/a.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
If you have large number of pictures to rename, you can use the
|
If you have large number of pictures to rename, you can use the
|
||||||
@@ -128,7 +128,7 @@ that match @code{*jpg} to the @file{/tmp} directory in the sequence of
|
|||||||
@file{img001.jpg}, @file{img002.jpg} and so on.
|
@file{img001.jpg}, @file{img002.jpg} and so on.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
|
x=1; for i in *jpg; do counter=$(printf %03d $x); ln -s "$i" /tmp/img"$counter".jpg; x=$(($x+1)); done
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
If you want to sequence them by oldest modified first, substitute
|
If you want to sequence them by oldest modified first, substitute
|
||||||
@@ -137,7 +137,7 @@ If you want to sequence them by oldest modified first, substitute
|
|||||||
Then run:
|
Then run:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
|
ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The same logic is used for any image format that ffmpeg reads.
|
The same logic is used for any image format that ffmpeg reads.
|
||||||
@@ -145,7 +145,7 @@ The same logic is used for any image format that ffmpeg reads.
|
|||||||
You can also use @command{cat} to pipe images to ffmpeg:
|
You can also use @command{cat} to pipe images to ffmpeg:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg
|
cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section How do I encode movie to single pictures?
|
@section How do I encode movie to single pictures?
|
||||||
@@ -153,7 +153,7 @@ cat *.jpg | ffmpeg -f image2pipe -c:v mjpeg -i - output.mpg
|
|||||||
Use:
|
Use:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -i movie.mpg movie%d.jpg
|
ffmpeg -i movie.mpg movie%d.jpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The @file{movie.mpg} used as input will be converted to
|
The @file{movie.mpg} used as input will be converted to
|
||||||
@@ -169,7 +169,7 @@ 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 -c:v 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.
|
||||||
@@ -227,15 +227,15 @@ then you may use any file that DirectShow can read as input.
|
|||||||
|
|
||||||
Just create an "input.avs" text file with this single line ...
|
Just create an "input.avs" text file with this single line ...
|
||||||
@example
|
@example
|
||||||
DirectShowSource("C:\path to your file\yourfile.asf")
|
DirectShowSource("C:\path to your file\yourfile.asf")
|
||||||
@end example
|
@end example
|
||||||
... and then feed that text file to ffmpeg:
|
... and then feed that text file to ffmpeg:
|
||||||
@example
|
@example
|
||||||
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 the
|
||||||
@uref{http://www.avisynth.org/, AviSynth homepage}.
|
@uref{http://www.avisynth.org/, Avisynth homepage}.
|
||||||
|
|
||||||
@section How can I join video files?
|
@section How can I join video files?
|
||||||
|
|
||||||
@@ -393,17 +393,17 @@ Appending @code{:v} to it will do exactly that.
|
|||||||
Use @option{-dumpgraph -} to find out exactly where the channel layout is
|
Use @option{-dumpgraph -} to find out exactly where the channel layout is
|
||||||
lost.
|
lost.
|
||||||
|
|
||||||
Most likely, it is through @code{auto-inserted aresample}. Try to understand
|
Most likely, it is through @code{auto-inserted aconvert}. Try to understand
|
||||||
why the converting filter was needed at that place.
|
why the converting filter was needed at that place.
|
||||||
|
|
||||||
Just before the output is a likely place, as @option{-f lavfi} currently
|
Just before the output is a likely place, as @option{-f lavfi} currently
|
||||||
only support packed S16.
|
only support packed S16.
|
||||||
|
|
||||||
Then insert the correct @code{aformat} explicitly in the filtergraph,
|
Then insert the correct @code{aconvert} explicitly in the filter graph,
|
||||||
specifying the exact format.
|
specifying the exact format.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
aformat=sample_fmts=s16:channel_layouts=stereo
|
aconvert=s16:stereo:packed
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section Why does FFmpeg not see the subtitles in my VOB file?
|
@section Why does FFmpeg not see the subtitles in my VOB file?
|
||||||
@@ -475,10 +475,9 @@ read @uref{http://www.tux.org/lkml/#s15, "Programming Religion"}.
|
|||||||
|
|
||||||
@section Why are the ffmpeg programs devoid of debugging symbols?
|
@section Why are the ffmpeg programs devoid of debugging symbols?
|
||||||
|
|
||||||
The build process creates @command{ffmpeg_g}, @command{ffplay_g}, etc. which
|
The build process creates ffmpeg_g, ffplay_g, etc. which contain full debug
|
||||||
contain full debug information. Those binaries are stripped to create
|
information. Those binaries are stripped to create ffmpeg, ffplay, etc. If
|
||||||
@command{ffmpeg}, @command{ffplay}, etc. If you need the debug information, use
|
you need the debug information, use the *_g versions.
|
||||||
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?
|
||||||
|
|
||||||
@@ -498,7 +497,7 @@ An easy way to get the full list of required libraries in dependency order
|
|||||||
is to use @code{pkg-config}.
|
is to use @code{pkg-config}.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
c99 -o program program.c $(pkg-config --cflags --libs libavformat libavcodec)
|
c99 -o program program.c $(pkg-config --cflags --libs libavformat libavcodec)
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
See @file{doc/example/Makefile} and @file{doc/example/pc-uninstalled} for
|
See @file{doc/example/Makefile} and @file{doc/example/pc-uninstalled} for
|
||||||
@@ -522,6 +521,10 @@ to use them you have to append -D__STDC_CONSTANT_MACROS to your CXXFLAGS
|
|||||||
You have to create a custom AVIOContext using @code{avio_alloc_context},
|
You have to create a custom AVIOContext using @code{avio_alloc_context},
|
||||||
see @file{libavformat/aviobuf.c} in FFmpeg and @file{libmpdemux/demux_lavf.c} in MPlayer or MPlayer2 sources.
|
see @file{libavformat/aviobuf.c} in FFmpeg and @file{libmpdemux/demux_lavf.c} in MPlayer or MPlayer2 sources.
|
||||||
|
|
||||||
|
@section Where can I find libav* headers for Pascal/Delphi?
|
||||||
|
|
||||||
|
see @url{http://www.iversenit.dk/dev/ffmpeg-headers/}
|
||||||
|
|
||||||
@section Where is the documentation about ffv1, msmpeg4, asv1, 4xm?
|
@section Where is the documentation about ffv1, msmpeg4, asv1, 4xm?
|
||||||
|
|
||||||
see @url{http://www.ffmpeg.org/~michael/}
|
see @url{http://www.ffmpeg.org/~michael/}
|
||||||
@@ -534,12 +537,11 @@ 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 frame rate.
|
||||||
|
|
||||||
@code{r_frame_rate} is NOT the average frame rate, it is the smallest frame rate
|
r_frame_rate is NOT the average frame rate, it is the smallest frame rate
|
||||||
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 @code{r_frame_rate}
|
For example, if you have mixed 25 and 30 fps content, then r_frame_rate
|
||||||
will be 150 (it is the least common multiple).
|
will be 150.
|
||||||
If you are looking for the average frame rate, see @code{AVStream.avg_frame_rate}.
|
|
||||||
|
|
||||||
@section Why is @code{make fate} not running all tests?
|
@section Why is @code{make fate} not running all tests?
|
||||||
|
|
||||||
|
|||||||
+17
-28
@@ -27,7 +27,7 @@ by visiting this website:
|
|||||||
|
|
||||||
This is especially recommended for all people contributing source
|
This is especially recommended for all people contributing source
|
||||||
code to FFmpeg, as it can be seen if some test on some platform broke
|
code to FFmpeg, as it can be seen if some test on some platform broke
|
||||||
with their recent contribution. This usually happens on the platforms
|
with there recent contribution. This usually happens on the platforms
|
||||||
the developers could not test on.
|
the developers could not test on.
|
||||||
|
|
||||||
The second part of this document describes how you can run FATE to
|
The second part of this document describes how you can run FATE to
|
||||||
@@ -131,12 +131,7 @@ 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.
|
running your SSH client manually and killing it after you accepted the key.
|
||||||
The FATE server's fingerprint is:
|
The FATE server's fingerprint is:
|
||||||
|
|
||||||
@table @option
|
b1:31:c8:79:3f:04:1d:f8:f2:23:26:5a:fd:55:fa:92
|
||||||
@item RSA
|
|
||||||
d3:f1:83:97:a4:75:2b:a6:fb:d6:e8:aa:81:93:97:51
|
|
||||||
@item ECDSA
|
|
||||||
76:9f:68:32:04:1e:d5:d4:ec:47:3f:dc:fc:18:17:86
|
|
||||||
@end table
|
|
||||||
|
|
||||||
If you have problems connecting to the FATE server, it may help to try out
|
If you have problems connecting to the FATE server, it may help to try out
|
||||||
the @command{ssh} command with one or more @option{-v} options. You should
|
the @command{ssh} command with one or more @option{-v} options. You should
|
||||||
@@ -153,20 +148,20 @@ the synchronisation of the samples directory.
|
|||||||
|
|
||||||
@table @option
|
@table @option
|
||||||
@item fate-rsync
|
@item fate-rsync
|
||||||
Download/synchronize sample files to the configured samples directory.
|
Download/synchronize sample files to the configured samples directory.
|
||||||
|
|
||||||
@item fate-list
|
@item fate-list
|
||||||
Will list all fate/regression test targets.
|
Will list all fate/regression test targets.
|
||||||
|
|
||||||
@item fate
|
@item fate
|
||||||
Run the FATE test suite (requires the fate-suite dataset).
|
Run the FATE test suite (requires the fate-suite dataset).
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section Makefile variables
|
@section Makefile variables
|
||||||
|
|
||||||
@table @option
|
@table @option
|
||||||
@item V
|
@item V
|
||||||
Verbosity level, can be set to 0, 1 or 2.
|
Verbosity level, can be set to 0, 1 or 2.
|
||||||
@itemize
|
@itemize
|
||||||
@item 0: show just the test arguments
|
@item 0: show just the test arguments
|
||||||
@item 1: show just the command used in the test
|
@item 1: show just the command used in the test
|
||||||
@@ -174,28 +169,22 @@ Verbosity level, can be set to 0, 1 or 2.
|
|||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@item SAMPLES
|
@item SAMPLES
|
||||||
Specify or override the path to the FATE samples at make time, it has a
|
Specify or override the path to the FATE samples at make time, it has a
|
||||||
meaning only while running the regression tests.
|
meaning only while running the regression tests.
|
||||||
|
|
||||||
@item THREADS
|
@item THREADS
|
||||||
Specify how many threads to use while running regression tests, it is
|
Specify how many threads to use while running regression tests, it is
|
||||||
quite useful to detect thread-related regressions.
|
quite useful to detect thread-related regressions.
|
||||||
|
|
||||||
@item THREAD_TYPE
|
@item THREAD_TYPE
|
||||||
Specify which threading strategy test, either @var{slice} or @var{frame},
|
Specify which threading strategy test, either @var{slice} or @var{frame},
|
||||||
by default @var{slice+frame}
|
by default @var{slice+frame}
|
||||||
|
|
||||||
@item CPUFLAGS
|
@item CPUFLAGS
|
||||||
Specify CPU flags.
|
Specify CPU flags.
|
||||||
|
|
||||||
@item TARGET_EXEC
|
@item TARGET_EXEC
|
||||||
Specify or override the wrapper used to run the tests.
|
Specify or override the wrapper used to run the tests.
|
||||||
The @var{TARGET_EXEC} option provides a way to run FATE wrapped in
|
The @var{TARGET_EXEC} option provides a way to run FATE wrapped in
|
||||||
@command{valgrind}, @command{qemu-user} or @command{wine} or on remote targets
|
@command{valgrind}, @command{qemu-user} or @command{wine} or on remote targets
|
||||||
through @command{ssh}.
|
through @command{ssh}.
|
||||||
|
|
||||||
@item GEN
|
|
||||||
Set to @var{1} to generate the missing or mismatched references.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section Examples
|
@section Examples
|
||||||
|
|||||||
@@ -4,20 +4,16 @@ samples= # path to samples directory
|
|||||||
workdir= # directory in which to do all the work
|
workdir= # directory in which to do all the work
|
||||||
#fate_recv="ssh -T fate@fate.ffmpeg.org" # command to submit report
|
#fate_recv="ssh -T fate@fate.ffmpeg.org" # command to submit report
|
||||||
comment= # optional description
|
comment= # optional description
|
||||||
build_only= # set to "yes" for a compile-only instance that skips tests
|
|
||||||
|
|
||||||
# the following are optional and map to configure options
|
# the following are optional and map to configure options
|
||||||
arch=
|
arch=
|
||||||
cpu=
|
cpu=
|
||||||
cross_prefix=
|
cross_prefix=
|
||||||
as=
|
|
||||||
cc=
|
cc=
|
||||||
ld=
|
|
||||||
target_os=
|
target_os=
|
||||||
sysroot=
|
sysroot=
|
||||||
target_exec=
|
target_exec=
|
||||||
target_path=
|
target_path=
|
||||||
target_samples=
|
|
||||||
extra_cflags=
|
extra_cflags=
|
||||||
extra_ldflags=
|
extra_ldflags=
|
||||||
extra_libs=
|
extra_libs=
|
||||||
|
|||||||
+1091
-1
File diff suppressed because it is too large
Load Diff
+21
-1
@@ -17,7 +17,27 @@ libavdevice library.
|
|||||||
|
|
||||||
@c man end DESCRIPTION
|
@c man end DESCRIPTION
|
||||||
|
|
||||||
@include devices.texi
|
@chapter Device Options
|
||||||
|
@c man begin DEVICE OPTIONS
|
||||||
|
|
||||||
|
The libavdevice library provides the same interface as
|
||||||
|
libavformat. Namely, an input device is considered like a demuxer, and
|
||||||
|
an output device like a muxer, and the interface and generic device
|
||||||
|
options are the same provided by libavformat (see the ffmpeg-formats
|
||||||
|
manual).
|
||||||
|
|
||||||
|
In addition each input or output device may support so-called private
|
||||||
|
options, which are specific for that component.
|
||||||
|
|
||||||
|
Options may be set by specifying -@var{option} @var{value} in the
|
||||||
|
FFmpeg tools, or by setting the value explicitly in the device
|
||||||
|
@code{AVFormatContext} options or using the @file{libavutil/opt.h} API
|
||||||
|
for programmatic use.
|
||||||
|
|
||||||
|
@c man end DEVICE OPTIONS
|
||||||
|
|
||||||
|
@include indevs.texi
|
||||||
|
@include outdevs.texi
|
||||||
|
|
||||||
@chapter See Also
|
@chapter See Also
|
||||||
|
|
||||||
|
|||||||
+141
-1
@@ -17,7 +17,147 @@ provided by the libavformat library.
|
|||||||
|
|
||||||
@c man end DESCRIPTION
|
@c man end DESCRIPTION
|
||||||
|
|
||||||
@include formats.texi
|
@chapter Format Options
|
||||||
|
@c man begin FORMAT OPTIONS
|
||||||
|
|
||||||
|
The libavformat library provides some generic global options, which
|
||||||
|
can be set on all the muxers and demuxers. In addition each muxer or
|
||||||
|
demuxer may support so-called private options, which are specific for
|
||||||
|
that component.
|
||||||
|
|
||||||
|
Options may be set by specifying -@var{option} @var{value} in the
|
||||||
|
FFmpeg tools, or by setting the value explicitly in the
|
||||||
|
@code{AVFormatContext} options or using the @file{libavutil/opt.h} API
|
||||||
|
for programmatic use.
|
||||||
|
|
||||||
|
The list of supported options follows:
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
@item avioflags @var{flags} (@emph{input/output})
|
||||||
|
Possible values:
|
||||||
|
@table @samp
|
||||||
|
@item direct
|
||||||
|
Reduce buffering.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item probesize @var{integer} (@emph{input})
|
||||||
|
Set probing size in bytes, i.e. the size of the data to analyze to get
|
||||||
|
stream information. A higher value will allow to detect more
|
||||||
|
information in case it is dispersed into the stream, but will increase
|
||||||
|
latency. Must be an integer not lesser than 32. It is 5000000 by default.
|
||||||
|
|
||||||
|
@item packetsize @var{integer} (@emph{output})
|
||||||
|
Set packet size.
|
||||||
|
|
||||||
|
@item fflags @var{flags} (@emph{input/output})
|
||||||
|
Set format flags.
|
||||||
|
|
||||||
|
Possible values:
|
||||||
|
@table @samp
|
||||||
|
@item ignidx
|
||||||
|
Ignore index.
|
||||||
|
@item genpts
|
||||||
|
Generate PTS.
|
||||||
|
@item nofillin
|
||||||
|
Do not fill in missing values that can be exactly calculated.
|
||||||
|
@item noparse
|
||||||
|
Disable AVParsers, this needs @code{+nofillin} too.
|
||||||
|
@item igndts
|
||||||
|
Ignore DTS.
|
||||||
|
@item discardcorrupt
|
||||||
|
Discard corrupted frames.
|
||||||
|
@item sortdts
|
||||||
|
Try to interleave output packets by DTS.
|
||||||
|
@item keepside
|
||||||
|
Do not merge side data.
|
||||||
|
@item latm
|
||||||
|
Enable RTP MP4A-LATM payload.
|
||||||
|
@item nobuffer
|
||||||
|
Reduce the latency introduced by optional buffering
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item seek2any @var{integer} (@emph{input})
|
||||||
|
Forces seeking to enable seek to any mode if set to 1. Default is 0.
|
||||||
|
|
||||||
|
@item analyzeduration @var{integer} (@emph{input})
|
||||||
|
Specify how many microseconds are analyzed to probe the input. A
|
||||||
|
higher value will allow to detect more accurate information, but will
|
||||||
|
increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
|
||||||
|
|
||||||
|
@item cryptokey @var{hexadecimal string} (@emph{input})
|
||||||
|
Set decryption key.
|
||||||
|
|
||||||
|
@item indexmem @var{integer} (@emph{input})
|
||||||
|
Set max memory used for timestamp index (per stream).
|
||||||
|
|
||||||
|
@item rtbufsize @var{integer} (@emph{input})
|
||||||
|
Set max memory used for buffering real-time frames.
|
||||||
|
|
||||||
|
@item fdebug @var{flags} (@emph{input/output})
|
||||||
|
Print specific debug info.
|
||||||
|
|
||||||
|
Possible values:
|
||||||
|
@table @samp
|
||||||
|
@item ts
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item max_delay @var{integer} (@emph{input/output})
|
||||||
|
Set maximum muxing or demuxing delay in microseconds.
|
||||||
|
|
||||||
|
@item fpsprobesize @var{integer} (@emph{input})
|
||||||
|
Set number of frames used to probe fps.
|
||||||
|
|
||||||
|
@item audio_preload @var{integer} (@emph{output})
|
||||||
|
Set microseconds by which audio packets should be interleaved earlier.
|
||||||
|
|
||||||
|
@item chunk_duration @var{integer} (@emph{output})
|
||||||
|
Set microseconds for each chunk.
|
||||||
|
|
||||||
|
@item chunk_size @var{integer} (@emph{output})
|
||||||
|
Set size in bytes for each chunk.
|
||||||
|
|
||||||
|
@item err_detect, f_err_detect @var{flags} (@emph{input})
|
||||||
|
Set error detection flags. @code{f_err_detect} is deprecated and
|
||||||
|
should be used only via the @command{ffmpeg} tool.
|
||||||
|
|
||||||
|
Possible values:
|
||||||
|
@table @samp
|
||||||
|
@item crccheck
|
||||||
|
Verify embedded CRCs.
|
||||||
|
@item bitstream
|
||||||
|
Detect bitstream specification deviations.
|
||||||
|
@item buffer
|
||||||
|
Detect improper bitstream length.
|
||||||
|
@item explode
|
||||||
|
Abort decoding on minor error detection.
|
||||||
|
@item careful
|
||||||
|
Consider things that violate the spec and have not been seen in the
|
||||||
|
wild as errors.
|
||||||
|
@item compliant
|
||||||
|
Consider all spec non compliancies as errors.
|
||||||
|
@item aggressive
|
||||||
|
Consider things that a sane encoder should not do as an error.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item use_wallclock_as_timestamps @var{integer} (@emph{input})
|
||||||
|
Use wallclock as timestamps.
|
||||||
|
|
||||||
|
@item avoid_negative_ts @var{integer} (@emph{output})
|
||||||
|
Shift timestamps to make them positive. 1 enables, 0 disables, default
|
||||||
|
of -1 enables when required by target format.
|
||||||
|
|
||||||
|
@item skip_initial_bytes @var{integer} (@emph{input})
|
||||||
|
Set number initial bytes to skip. Default is 0.
|
||||||
|
|
||||||
|
@item correct_ts_overflow @var{integer} (@emph{input})
|
||||||
|
Correct single timestamp overflows if set to 1. Default is 1.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@c man end FORMAT OPTIONS
|
||||||
|
|
||||||
|
@include demuxers.texi
|
||||||
|
@include muxers.texi
|
||||||
|
@include metadata.texi
|
||||||
|
|
||||||
@chapter See Also
|
@chapter See Also
|
||||||
|
|
||||||
|
|||||||
+223
-2
@@ -12,14 +12,235 @@
|
|||||||
@chapter Description
|
@chapter Description
|
||||||
@c man begin DESCRIPTION
|
@c man begin DESCRIPTION
|
||||||
|
|
||||||
The FFmpeg resampler provides a high-level interface to the
|
The FFmpeg resampler provides an high-level interface to the
|
||||||
libswresample library audio resampling utilities. In particular it
|
libswresample library audio resampling utilities. In particular it
|
||||||
allows to perform audio resampling, audio channel layout rematrixing,
|
allows to perform audio resampling, audio channel layout rematrixing,
|
||||||
and convert audio format and packing layout.
|
and convert audio format and packing layout.
|
||||||
|
|
||||||
@c man end DESCRIPTION
|
@c man end DESCRIPTION
|
||||||
|
|
||||||
@include resampler.texi
|
@chapter Resampler Options
|
||||||
|
@c man begin RESAMPLER OPTIONS
|
||||||
|
|
||||||
|
The audio resampler supports the following named options.
|
||||||
|
|
||||||
|
Options may be set by specifying -@var{option} @var{value} in the
|
||||||
|
FFmpeg tools, @var{option}=@var{value} for the aresample filter,
|
||||||
|
by setting the value explicitly in the
|
||||||
|
@code{SwrContext} options or using the @file{libavutil/opt.h} API for
|
||||||
|
programmatic use.
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
|
||||||
|
@item ich, in_channel_count
|
||||||
|
Set the number of input channels. Default value is 0. Setting this
|
||||||
|
value is not mandatory if the corresponding channel layout
|
||||||
|
@option{in_channel_layout} is set.
|
||||||
|
|
||||||
|
@item och, out_channel_count
|
||||||
|
Set the number of output channels. Default value is 0. Setting this
|
||||||
|
value is not mandatory if the corresponding channel layout
|
||||||
|
@option{out_channel_layout} is set.
|
||||||
|
|
||||||
|
@item uch, used_channel_count
|
||||||
|
Set the number of used input channels. Default value is 0. This option is
|
||||||
|
only used for special remapping.
|
||||||
|
|
||||||
|
@item isr, in_sample_rate
|
||||||
|
Set the input sample rate. Default value is 0.
|
||||||
|
|
||||||
|
@item osr, out_sample_rate
|
||||||
|
Set the output sample rate. Default value is 0.
|
||||||
|
|
||||||
|
@item isf, in_sample_fmt
|
||||||
|
Specify the input sample format. It is set by default to @code{none}.
|
||||||
|
|
||||||
|
@item osf, out_sample_fmt
|
||||||
|
Specify the output sample format. It is set by default to @code{none}.
|
||||||
|
|
||||||
|
@item tsf, internal_sample_fmt
|
||||||
|
Set the internal sample format. Default value is @code{none}.
|
||||||
|
This will automatically be chosen when it is not explicitly set.
|
||||||
|
|
||||||
|
@item icl, in_channel_layout
|
||||||
|
Set the input channel layout.
|
||||||
|
|
||||||
|
@item ocl, out_channel_layout
|
||||||
|
Set the output channel layout.
|
||||||
|
|
||||||
|
@item clev, center_mix_level
|
||||||
|
Set the center mix level. It is a value expressed in deciBel, and must be
|
||||||
|
in the interval [-32,32].
|
||||||
|
|
||||||
|
@item slev, surround_mix_level
|
||||||
|
Set the surround mix level. It is a value expressed in deciBel, and must
|
||||||
|
be in the interval [-32,32].
|
||||||
|
|
||||||
|
@item lfe_mix_level
|
||||||
|
Set LFE mix into non LFE level. It is used when there is a LFE input but no
|
||||||
|
LFE output. It is a value expressed in deciBel, and must
|
||||||
|
be in the interval [-32,32].
|
||||||
|
|
||||||
|
@item rmvol, rematrix_volume
|
||||||
|
Set rematrix volume. Default value is 1.0.
|
||||||
|
|
||||||
|
@item flags, swr_flags
|
||||||
|
Set flags used by the converter. Default value is 0.
|
||||||
|
|
||||||
|
It supports the following individual flags:
|
||||||
|
@table @option
|
||||||
|
@item res
|
||||||
|
force resampling, this flag forces resampling to be used even when the
|
||||||
|
input and output sample rates match.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item dither_scale
|
||||||
|
Set the dither scale. Default value is 1.
|
||||||
|
|
||||||
|
@item dither_method
|
||||||
|
Set dither method. Default value is 0.
|
||||||
|
|
||||||
|
Supported values:
|
||||||
|
@table @samp
|
||||||
|
@item rectangular
|
||||||
|
select rectangular dither
|
||||||
|
@item triangular
|
||||||
|
select triangular dither
|
||||||
|
@item triangular_hp
|
||||||
|
select triangular dither with high pass
|
||||||
|
@item lipshitz
|
||||||
|
select lipshitz noise shaping dither
|
||||||
|
@item shibata
|
||||||
|
select shibata noise shaping dither
|
||||||
|
@item low_shibata
|
||||||
|
select low shibata noise shaping dither
|
||||||
|
@item high_shibata
|
||||||
|
select high shibata noise shaping dither
|
||||||
|
@item f_weighted
|
||||||
|
select f-weighted noise shaping dither
|
||||||
|
@item modified_e_weighted
|
||||||
|
select modified-e-weighted noise shaping dither
|
||||||
|
@item improved_e_weighted
|
||||||
|
select improved-e-weighted noise shaping dither
|
||||||
|
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item resampler
|
||||||
|
Set resampling engine. Default value is swr.
|
||||||
|
|
||||||
|
Supported values:
|
||||||
|
@table @samp
|
||||||
|
@item swr
|
||||||
|
select the native SW Resampler; filter options precision and cheby are not
|
||||||
|
applicable in this case.
|
||||||
|
@item soxr
|
||||||
|
select the SoX Resampler (where available); compensation, and filter options
|
||||||
|
filter_size, phase_shift, filter_type & kaiser_beta, are not applicable in this
|
||||||
|
case.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item filter_size
|
||||||
|
For swr only, set resampling filter size, default value is 32.
|
||||||
|
|
||||||
|
@item phase_shift
|
||||||
|
For swr only, set resampling phase shift, default value is 10, and must be in
|
||||||
|
the interval [0,30].
|
||||||
|
|
||||||
|
@item linear_interp
|
||||||
|
Use Linear Interpolation if set to 1, default value is 0.
|
||||||
|
|
||||||
|
@item cutoff
|
||||||
|
Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
|
||||||
|
value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
|
||||||
|
(which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
|
||||||
|
|
||||||
|
@item precision
|
||||||
|
For soxr only, the precision in bits to which the resampled signal will be
|
||||||
|
calculated. The default value of 20 (which, with suitable dithering, is
|
||||||
|
appropriate for a destination bit-depth of 16) gives SoX's 'High Quality'; a
|
||||||
|
value of 28 gives SoX's 'Very High Quality'.
|
||||||
|
|
||||||
|
@item cheby
|
||||||
|
For soxr only, selects passband rolloff none (Chebyshev) & higher-precision
|
||||||
|
approximation for 'irrational' ratios. Default value is 0.
|
||||||
|
|
||||||
|
@item async
|
||||||
|
For swr only, simple 1 parameter audio sync to timestamps using stretching,
|
||||||
|
squeezing, filling and trimming. Setting this to 1 will enable filling and
|
||||||
|
trimming, larger values represent the maximum amount in samples that the data
|
||||||
|
may be stretched or squeezed for each second.
|
||||||
|
Default value is 0, thus no compensation is applied to make the samples match
|
||||||
|
the audio timestamps.
|
||||||
|
|
||||||
|
@item first_pts
|
||||||
|
For swr only, assume the first pts should be this value. The time unit is 1 / sample rate.
|
||||||
|
This allows for padding/trimming at the start of stream. By default, no
|
||||||
|
assumption is made about the first frame's expected pts, so no padding or
|
||||||
|
trimming is done. For example, this could be set to 0 to pad the beginning with
|
||||||
|
silence if an audio stream starts after the video stream or to trim any samples
|
||||||
|
with a negative pts due to encoder delay.
|
||||||
|
|
||||||
|
@item min_comp
|
||||||
|
For swr only, set the minimum difference between timestamps and audio data (in
|
||||||
|
seconds) to trigger stretching/squeezing/filling or trimming of the
|
||||||
|
data to make it match the timestamps. The default is that
|
||||||
|
stretching/squeezing/filling and trimming is disabled
|
||||||
|
(@option{min_comp} = @code{FLT_MAX}).
|
||||||
|
|
||||||
|
@item min_hard_comp
|
||||||
|
For swr only, set the minimum difference between timestamps and audio data (in
|
||||||
|
seconds) to trigger adding/dropping samples to make it match the
|
||||||
|
timestamps. This option effectively is a threshold to select between
|
||||||
|
hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
|
||||||
|
all compensation is by default disabled through @option{min_comp}.
|
||||||
|
The default is 0.1.
|
||||||
|
|
||||||
|
@item comp_duration
|
||||||
|
For swr only, set duration (in seconds) over which data is stretched/squeezed
|
||||||
|
to make it match the timestamps. Must be a non-negative double float value,
|
||||||
|
default value is 1.0.
|
||||||
|
|
||||||
|
@item max_soft_comp
|
||||||
|
For swr only, set maximum factor by which data is stretched/squeezed to make it
|
||||||
|
match the timestamps. Must be a non-negative double float value, default value
|
||||||
|
is 0.
|
||||||
|
|
||||||
|
@item matrix_encoding
|
||||||
|
Select matrixed stereo encoding.
|
||||||
|
|
||||||
|
It accepts the following values:
|
||||||
|
@table @samp
|
||||||
|
@item none
|
||||||
|
select none
|
||||||
|
@item dolby
|
||||||
|
select Dolby
|
||||||
|
@item dplii
|
||||||
|
select Dolby Pro Logic II
|
||||||
|
@end table
|
||||||
|
|
||||||
|
Default value is @code{none}.
|
||||||
|
|
||||||
|
@item filter_type
|
||||||
|
For swr only, select resampling filter type. This only affects resampling
|
||||||
|
operations.
|
||||||
|
|
||||||
|
It accepts the following values:
|
||||||
|
@table @samp
|
||||||
|
@item cubic
|
||||||
|
select cubic
|
||||||
|
@item blackman_nuttall
|
||||||
|
select Blackman Nuttall Windowed Sinc
|
||||||
|
@item kaiser
|
||||||
|
select Kaiser Windowed Sinc
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item kaiser_beta
|
||||||
|
For swr only, set Kaiser Window Beta value. Must be an integer in the
|
||||||
|
interval [2,16], default value is 9.
|
||||||
|
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@c man end RESAMPLER OPTIONS
|
||||||
|
|
||||||
@chapter See Also
|
@chapter See Also
|
||||||
|
|
||||||
|
|||||||
+100
-2
@@ -12,13 +12,111 @@
|
|||||||
@chapter Description
|
@chapter Description
|
||||||
@c man begin DESCRIPTION
|
@c man begin DESCRIPTION
|
||||||
|
|
||||||
The FFmpeg rescaler provides a high-level interface to the libswscale
|
The FFmpeg rescaler provides an high-level interface to the libswscale
|
||||||
library image conversion utilities. In particular it allows to perform
|
library image conversion utilities. In particular it allows to perform
|
||||||
image rescaling and pixel format conversion.
|
image rescaling and pixel format conversion.
|
||||||
|
|
||||||
@c man end DESCRIPTION
|
@c man end DESCRIPTION
|
||||||
|
|
||||||
@include scaler.texi
|
@chapter Scaler Options
|
||||||
|
@c man begin SCALER OPTIONS
|
||||||
|
|
||||||
|
The video scaler supports the following named options.
|
||||||
|
|
||||||
|
Options may be set by specifying -@var{option} @var{value} in the
|
||||||
|
FFmpeg tools. For programmatic use, they can be set explicitly in the
|
||||||
|
@code{SwsContext} options or through the @file{libavutil/opt.h} API.
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
|
||||||
|
@item sws_flags
|
||||||
|
Set the scaler flags. This is also used to set the scaling
|
||||||
|
algorithm. Only a single algorithm should be selected.
|
||||||
|
|
||||||
|
It accepts the following values:
|
||||||
|
@table @samp
|
||||||
|
@item fast_bilinear
|
||||||
|
Select fast bilinear scaling algorithm.
|
||||||
|
|
||||||
|
@item bilinear
|
||||||
|
Select bilinear scaling algorithm.
|
||||||
|
|
||||||
|
@item bicubic
|
||||||
|
Select bicubic scaling algorithm.
|
||||||
|
|
||||||
|
@item experimental
|
||||||
|
Select experimental scaling algorithm.
|
||||||
|
|
||||||
|
@item neighbor
|
||||||
|
Select nearest neighbor rescaling algorithm.
|
||||||
|
|
||||||
|
@item area
|
||||||
|
Select averaging area rescaling algorithm.
|
||||||
|
|
||||||
|
@item bicubiclin
|
||||||
|
Select bicubic scaling algorithm for the luma component, bilinear for
|
||||||
|
chroma components.
|
||||||
|
|
||||||
|
@item gauss
|
||||||
|
Select Gaussian rescaling algorithm.
|
||||||
|
|
||||||
|
@item sinc
|
||||||
|
Select sinc rescaling algorithm.
|
||||||
|
|
||||||
|
@item lanczos
|
||||||
|
Select lanczos rescaling algorithm.
|
||||||
|
|
||||||
|
@item spline
|
||||||
|
Select natural bicubic spline rescaling algorithm.
|
||||||
|
|
||||||
|
@item print_info
|
||||||
|
Enable printing/debug logging.
|
||||||
|
|
||||||
|
@item accurate_rnd
|
||||||
|
Enable accurate rounding.
|
||||||
|
|
||||||
|
@item full_chroma_int
|
||||||
|
Enable full chroma interpolation.
|
||||||
|
|
||||||
|
@item full_chroma_inp
|
||||||
|
Select full chroma input.
|
||||||
|
|
||||||
|
@item bitexact
|
||||||
|
Enable bitexact output.
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@item srcw
|
||||||
|
Set source width.
|
||||||
|
|
||||||
|
@item srch
|
||||||
|
Set source height.
|
||||||
|
|
||||||
|
@item dstw
|
||||||
|
Set destination width.
|
||||||
|
|
||||||
|
@item dsth
|
||||||
|
Set destination height.
|
||||||
|
|
||||||
|
@item src_format
|
||||||
|
Set source pixel format (must be expressed as an integer).
|
||||||
|
|
||||||
|
@item dst_format
|
||||||
|
Set destination pixel format (must be expressed as an integer).
|
||||||
|
|
||||||
|
@item src_range
|
||||||
|
Select source range.
|
||||||
|
|
||||||
|
@item dst_range
|
||||||
|
Select destination range.
|
||||||
|
|
||||||
|
@item param0, param1
|
||||||
|
Set scaling algorithm parameters. The specified values are specific of
|
||||||
|
some scaling algorithms and ignored by others. The specified values
|
||||||
|
are floating point number values.
|
||||||
|
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@c man end SCALER OPTIONS
|
||||||
|
|
||||||
@chapter See Also
|
@chapter See Also
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@ by the libavutil library.
|
|||||||
|
|
||||||
@c man end DESCRIPTION
|
@c man end DESCRIPTION
|
||||||
|
|
||||||
@include utils.texi
|
@include syntax.texi
|
||||||
|
@include eval.texi
|
||||||
|
|
||||||
@chapter See Also
|
@chapter See Also
|
||||||
|
|
||||||
|
|||||||
+56
-146
@@ -16,26 +16,26 @@ ffmpeg [@var{global_options}] @{[@var{input_file_options}] -i @file{input_file}@
|
|||||||
@chapter Description
|
@chapter Description
|
||||||
@c man begin DESCRIPTION
|
@c man begin DESCRIPTION
|
||||||
|
|
||||||
@command{ffmpeg} is a very fast video and audio converter that can also grab from
|
ffmpeg is a very fast video and audio converter that can also grab from
|
||||||
a live audio/video source. It can also convert between arbitrary sample
|
a live audio/video source. It can also convert between arbitrary sample
|
||||||
rates and resize video on the fly with a high quality polyphase filter.
|
rates and resize video on the fly with a high quality polyphase filter.
|
||||||
|
|
||||||
@command{ffmpeg} reads from an arbitrary number of input "files" (which can be regular
|
ffmpeg reads from an arbitrary number of input "files" (which can be regular
|
||||||
files, pipes, network streams, grabbing devices, etc.), specified by the
|
files, pipes, network streams, grabbing devices, etc.), specified by the
|
||||||
@code{-i} option, and writes to an arbitrary number of output "files", which are
|
@code{-i} option, and writes to an arbitrary number of output "files", which are
|
||||||
specified by a plain output filename. Anything found on the command line which
|
specified by a plain output filename. Anything found on the command line which
|
||||||
cannot be interpreted as an option is considered to be an output filename.
|
cannot be interpreted as an option is considered to be an output filename.
|
||||||
|
|
||||||
Each input or output file can, in principle, contain any number of streams of
|
Each input or output file can in principle contain any number of streams of
|
||||||
different types (video/audio/subtitle/attachment/data). The allowed number and/or
|
different types (video/audio/subtitle/attachment/data). Allowed number and/or
|
||||||
types of streams may be limited by the container format. Selecting which
|
types of streams can be limited by the container format. Selecting, which
|
||||||
streams from which inputs will go into which output is either done automatically
|
streams from which inputs go into output, is done either automatically or with
|
||||||
or with the @code{-map} option (see the Stream selection chapter).
|
the @code{-map} option (see the Stream selection chapter).
|
||||||
|
|
||||||
To refer to input files in options, you must use their indices (0-based). E.g.
|
To refer to input files in options, you must use their indices (0-based). E.g.
|
||||||
the first input file is @code{0}, the second is @code{1}, etc. Similarly, streams
|
the first input file is @code{0}, the second is @code{1} etc. Similarly, streams
|
||||||
within a file are referred to by their indices. E.g. @code{2:3} refers to the
|
within a file are referred to by their indices. E.g. @code{2:3} refers to the
|
||||||
fourth stream in the third input file. Also see the Stream specifiers chapter.
|
fourth stream in the third input file. See also the Stream specifiers chapter.
|
||||||
|
|
||||||
As a general rule, options are applied to the next specified
|
As a general rule, options are applied to the next specified
|
||||||
file. Therefore, order is important, and you can have the same
|
file. Therefore, order is important, and you can have the same
|
||||||
@@ -50,7 +50,7 @@ options apply ONLY to the next input or output file and are reset between files.
|
|||||||
|
|
||||||
@itemize
|
@itemize
|
||||||
@item
|
@item
|
||||||
To set the video bitrate of the output file to 64 kbit/s:
|
To set the video bitrate of the output file to 64kbit/s:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i input.avi -b:v 64k -bufsize 64k output.avi
|
ffmpeg -i input.avi -b:v 64k -bufsize 64k output.avi
|
||||||
@end example
|
@end example
|
||||||
@@ -96,14 +96,14 @@ tracking lowest timestamp on any active input stream.
|
|||||||
Encoded packets are then passed to the decoder (unless streamcopy is selected
|
Encoded packets are then passed to the decoder (unless streamcopy is selected
|
||||||
for the stream, see further for a description). The decoder produces
|
for the stream, see further for a description). The decoder produces
|
||||||
uncompressed frames (raw video/PCM audio/...) which can be processed further by
|
uncompressed frames (raw video/PCM audio/...) which can be processed further by
|
||||||
filtering (see next section). After filtering, the frames are passed to the
|
filtering (see next section). After filtering the frames are passed to the
|
||||||
encoder, which encodes them and outputs encoded packets. Finally those are
|
encoder, which encodes them and outputs encoded packets again. Finally those are
|
||||||
passed to the muxer, which writes the encoded packets to the output file.
|
passed to the muxer, which writes the encoded packets to the output file.
|
||||||
|
|
||||||
@section Filtering
|
@section Filtering
|
||||||
Before encoding, @command{ffmpeg} can process raw audio and video frames using
|
Before encoding, @command{ffmpeg} can process raw audio and video frames using
|
||||||
filters from the libavfilter library. Several chained filters form a filter
|
filters from the libavfilter library. Several chained filters form a filter
|
||||||
graph. @command{ffmpeg} distinguishes between two types of filtergraphs:
|
graph. @command{ffmpeg} distinguishes between two types of filtergraphs -
|
||||||
simple and complex.
|
simple and complex.
|
||||||
|
|
||||||
@subsection Simple filtergraphs
|
@subsection Simple filtergraphs
|
||||||
@@ -139,7 +139,7 @@ only sets timestamps and otherwise passes the frames unchanged.
|
|||||||
|
|
||||||
@subsection Complex filtergraphs
|
@subsection Complex filtergraphs
|
||||||
Complex filtergraphs are those which cannot be described as simply a linear
|
Complex filtergraphs are those which cannot be described as simply a linear
|
||||||
processing chain applied to one stream. This is the case, for example, when the graph has
|
processing chain applied to one stream. This is the case e.g. when the graph has
|
||||||
more than one input and/or output, or when output stream type is different from
|
more than one input and/or output, or when output stream type is different from
|
||||||
input. They can be represented with the following diagram:
|
input. They can be represented with the following diagram:
|
||||||
|
|
||||||
@@ -164,11 +164,9 @@ input. They can be represented with the following diagram:
|
|||||||
@end example
|
@end example
|
||||||
|
|
||||||
Complex filtergraphs are configured with the @option{-filter_complex} option.
|
Complex filtergraphs are configured with the @option{-filter_complex} option.
|
||||||
Note that this option is global, since a complex filtergraph, by its nature,
|
Note that this option is global, since a complex filtergraph by its nature
|
||||||
cannot be unambiguously associated with a single stream or file.
|
cannot be unambiguously associated with a single stream or file.
|
||||||
|
|
||||||
The @option{-lavfi} option is equivalent to @option{-filter_complex}.
|
|
||||||
|
|
||||||
A trivial example of a complex filtergraph is the @code{overlay} filter, which
|
A trivial example of a complex filtergraph is the @code{overlay} filter, which
|
||||||
has two video inputs and one video output, containing one video overlaid on top
|
has two video inputs and one video output, containing one video overlaid on top
|
||||||
of the other. Its audio counterpart is the @code{amix} filter.
|
of the other. Its audio counterpart is the @code{amix} filter.
|
||||||
@@ -178,7 +176,7 @@ Stream copy is a mode selected by supplying the @code{copy} parameter to the
|
|||||||
@option{-codec} option. It makes @command{ffmpeg} omit the decoding and encoding
|
@option{-codec} option. It makes @command{ffmpeg} omit the decoding and encoding
|
||||||
step for the specified stream, so it does only demuxing and muxing. It is useful
|
step for the specified stream, so it does only demuxing and muxing. It is useful
|
||||||
for changing the container format or modifying container-level metadata. The
|
for changing the container format or modifying container-level metadata. The
|
||||||
diagram above will, in this case, simplify to this:
|
diagram above will in this case simplify to this:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
_______ ______________ ________
|
_______ ______________ ________
|
||||||
@@ -190,7 +188,7 @@ diagram above will, in this case, simplify to this:
|
|||||||
@end example
|
@end example
|
||||||
|
|
||||||
Since there is no decoding or encoding, it is very fast and there is no quality
|
Since there is no decoding or encoding, it is very fast and there is no quality
|
||||||
loss. However, it might not work in some cases because of many factors. Applying
|
loss. However it might not work in some cases because of many factors. Applying
|
||||||
filters is obviously also impossible, since filters work on uncompressed data.
|
filters is obviously also impossible, since filters work on uncompressed data.
|
||||||
|
|
||||||
@c man end DETAILED DESCRIPTION
|
@c man end DETAILED DESCRIPTION
|
||||||
@@ -198,14 +196,14 @@ filters is obviously also impossible, since filters work on uncompressed data.
|
|||||||
@chapter Stream selection
|
@chapter Stream selection
|
||||||
@c man begin STREAM SELECTION
|
@c man begin STREAM SELECTION
|
||||||
|
|
||||||
By default, @command{ffmpeg} includes only one stream of each type (video, audio, subtitle)
|
By default ffmpeg includes only one stream of each type (video, audio, subtitle)
|
||||||
present in the input files and adds them to each output file. It picks the
|
present in the input files and adds them to each output file. It picks the
|
||||||
"best" of each based upon the following criteria: for video, it is the stream
|
"best" of each based upon the following criteria; for video it is the stream
|
||||||
with the highest resolution, for audio, it is the stream with the most channels, for
|
with the highest resolution, for audio the stream with the most channels, for
|
||||||
subtitles, it is the first subtitle stream. In the case where several streams of
|
subtitle it's the first subtitle stream. In the case where several streams of
|
||||||
the same type rate equally, the stream with the lowest index is chosen.
|
the same type rate equally, the lowest numbered stream is chosen.
|
||||||
|
|
||||||
You can disable some of those defaults by using the @code{-vn/-an/-sn} options. For
|
You can disable some of those defaults by using @code{-vn/-an/-sn} options. For
|
||||||
full manual control, use the @code{-map} option, which disables the defaults just
|
full manual control, use the @code{-map} option, which disables the defaults just
|
||||||
described.
|
described.
|
||||||
|
|
||||||
@@ -214,7 +212,7 @@ described.
|
|||||||
@chapter Options
|
@chapter Options
|
||||||
@c man begin OPTIONS
|
@c man begin OPTIONS
|
||||||
|
|
||||||
@include fftools-common-opts.texi
|
@include avtools-common-opts.texi
|
||||||
|
|
||||||
@section Main options
|
@section Main options
|
||||||
|
|
||||||
@@ -222,7 +220,7 @@ described.
|
|||||||
|
|
||||||
@item -f @var{fmt} (@emph{input/output})
|
@item -f @var{fmt} (@emph{input/output})
|
||||||
Force input or output file format. The format is normally auto detected for input
|
Force input or output file format. The format is normally auto detected for input
|
||||||
files and guessed from the file extension for output files, so this option is not
|
files and guessed from file extension for output files, so this option is not
|
||||||
needed in most cases.
|
needed in most cases.
|
||||||
|
|
||||||
@item -i @var{filename} (@emph{input})
|
@item -i @var{filename} (@emph{input})
|
||||||
@@ -232,8 +230,7 @@ input file name
|
|||||||
Overwrite output files without asking.
|
Overwrite output files without asking.
|
||||||
|
|
||||||
@item -n (@emph{global})
|
@item -n (@emph{global})
|
||||||
Do not overwrite output files, and exit immediately if a specified
|
Do not overwrite output files but exit if file exists.
|
||||||
output file already exists.
|
|
||||||
|
|
||||||
@item -c[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
@item -c[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
||||||
@itemx -codec[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
@itemx -codec[:@var{stream_specifier}] @var{codec} (@emph{input/output,per-stream})
|
||||||
@@ -272,15 +269,9 @@ Set the file size limit, expressed in bytes.
|
|||||||
|
|
||||||
@item -ss @var{position} (@emph{input/output})
|
@item -ss @var{position} (@emph{input/output})
|
||||||
When used as an input option (before @code{-i}), seeks in this input file to
|
When used as an input option (before @code{-i}), seeks in this input file to
|
||||||
@var{position}. Note the in most formats it is not possible to seek exactly, so
|
@var{position}. When used as an output option (before an output filename),
|
||||||
@command{ffmpeg} will seek to the closest seek point before @var{position}.
|
decodes but discards input until the timestamps reach @var{position}. This is
|
||||||
When transcoding and @option{-accurate_seek} is enabled (the default), this
|
slower, but more accurate.
|
||||||
extra segment between the seek point and @var{position} will be decoded and
|
|
||||||
discarded. When doing stream copy or when @option{-noaccurate_seek} is used, it
|
|
||||||
will be preserved.
|
|
||||||
|
|
||||||
When used as an output option (before an output filename), decodes but discards
|
|
||||||
input until the timestamps reach @var{position}.
|
|
||||||
|
|
||||||
@var{position} may be either in seconds or in @code{hh:mm:ss[.xxx]} form.
|
@var{position} may be either in seconds or in @code{hh:mm:ss[.xxx]} form.
|
||||||
|
|
||||||
@@ -352,31 +343,25 @@ Use fixed quality scale (VBR). The meaning of @var{q} is
|
|||||||
codec-dependent.
|
codec-dependent.
|
||||||
|
|
||||||
@anchor{filter_option}
|
@anchor{filter_option}
|
||||||
@item -filter[:@var{stream_specifier}] @var{filtergraph} (@emph{output,per-stream})
|
@item -filter[:@var{stream_specifier}] @var{filter_graph} (@emph{output,per-stream})
|
||||||
Create the filtergraph specified by @var{filtergraph} and use it to
|
Create the filter graph specified by @var{filter_graph} and use it to
|
||||||
filter the stream.
|
filter the stream.
|
||||||
|
|
||||||
@var{filtergraph} is a description of the filtergraph to apply to
|
@var{filter_graph} is a description of the filter graph to apply to
|
||||||
the stream, and must have a single input and a single output of the
|
the stream, and must have a single input and a single output of the
|
||||||
same type of the stream. In the filtergraph, the input is associated
|
same type of the stream. In the filter graph, the input is associated
|
||||||
to the label @code{in}, and the output to the label @code{out}. See
|
to the label @code{in}, and the output to the label @code{out}. See
|
||||||
the ffmpeg-filters manual for more information about the filtergraph
|
the ffmpeg-filters manual for more information about the filtergraph
|
||||||
syntax.
|
syntax.
|
||||||
|
|
||||||
See the @ref{filter_complex_option,,-filter_complex option} if you
|
See the @ref{filter_complex_option,,-filter_complex option} if you
|
||||||
want to create filtergraphs with multiple inputs and/or outputs.
|
want to create filter graphs with multiple inputs and/or outputs.
|
||||||
|
|
||||||
@item -filter_script[:@var{stream_specifier}] @var{filename} (@emph{output,per-stream})
|
|
||||||
This option is similar to @option{-filter}, the only difference is that its
|
|
||||||
argument is the name of the file from which a filtergraph description is to be
|
|
||||||
read.
|
|
||||||
|
|
||||||
@item -pre[:@var{stream_specifier}] @var{preset_name} (@emph{output,per-stream})
|
@item -pre[:@var{stream_specifier}] @var{preset_name} (@emph{output,per-stream})
|
||||||
Specify the preset for matching stream(s).
|
Specify the preset for matching stream(s).
|
||||||
|
|
||||||
@item -stats (@emph{global})
|
@item -stats (@emph{global})
|
||||||
Print encoding progress/statistics. It is on by default, to explicitly
|
Print encoding progress/statistics. On by default.
|
||||||
disable it you need to specify @code{-nostats}.
|
|
||||||
|
|
||||||
@item -progress @var{url} (@emph{global})
|
@item -progress @var{url} (@emph{global})
|
||||||
Send program-friendly progress information to @var{url}.
|
Send program-friendly progress information to @var{url}.
|
||||||
@@ -474,10 +459,6 @@ form @var{num}:@var{den}, where @var{num} and @var{den} are the
|
|||||||
numerator and denominator of the aspect ratio. For example "4:3",
|
numerator and denominator of the aspect ratio. For example "4:3",
|
||||||
"16:9", "1.3333", and "1.7777" are valid argument values.
|
"16:9", "1.3333", and "1.7777" are valid argument values.
|
||||||
|
|
||||||
If used together with @option{-vcodec copy}, it will affect the aspect ratio
|
|
||||||
stored at container level, but not the aspect ratio stored in encoded
|
|
||||||
frames, if it exists.
|
|
||||||
|
|
||||||
@item -vn (@emph{output})
|
@item -vn (@emph{output})
|
||||||
Disable video recording.
|
Disable video recording.
|
||||||
|
|
||||||
@@ -506,8 +487,8 @@ stream
|
|||||||
@item -vlang @var{code}
|
@item -vlang @var{code}
|
||||||
Set the ISO 639 language code (3 letters) of the current video stream.
|
Set the ISO 639 language code (3 letters) of the current video stream.
|
||||||
|
|
||||||
@item -vf @var{filtergraph} (@emph{output})
|
@item -vf @var{filter_graph} (@emph{output})
|
||||||
Create the filtergraph specified by @var{filtergraph} and use it to
|
Create the filter graph specified by @var{filter_graph} and use it to
|
||||||
filter the stream.
|
filter the stream.
|
||||||
|
|
||||||
This is an alias for @code{-filter:v}, see the @ref{filter_option,,-filter option}.
|
This is an alias for @code{-filter:v}, see the @ref{filter_option,,-filter option}.
|
||||||
@@ -523,7 +504,7 @@ If the selected pixel format can not be selected, ffmpeg will print a
|
|||||||
warning and select the best pixel format supported by the encoder.
|
warning and select the best pixel format supported by the encoder.
|
||||||
If @var{pix_fmt} is prefixed by a @code{+}, ffmpeg will exit with an error
|
If @var{pix_fmt} is prefixed by a @code{+}, ffmpeg will exit with an error
|
||||||
if the requested pixel format can not be selected, and automatic conversions
|
if the requested pixel format can not be selected, and automatic conversions
|
||||||
inside filtergraphs are disabled.
|
inside filter graphs are disabled.
|
||||||
If @var{pix_fmt} is a single @code{+}, ffmpeg selects the same pixel format
|
If @var{pix_fmt} is a single @code{+}, ffmpeg selects the same pixel format
|
||||||
as the input (or graph output) and automatic conversions are disabled.
|
as the input (or graph output) and automatic conversions are disabled.
|
||||||
|
|
||||||
@@ -538,6 +519,10 @@ list separated with slashes. Two first values are the beginning and
|
|||||||
end frame numbers, last one is quantizer to use if positive, or quality
|
end frame numbers, last one is quantizer to use if positive, or quality
|
||||||
factor if negative.
|
factor if negative.
|
||||||
|
|
||||||
|
@item -deinterlace
|
||||||
|
Deinterlace pictures.
|
||||||
|
This option is deprecated since the deinterlacing is very low quality.
|
||||||
|
Use the yadif filter with @code{-filter:v yadif}.
|
||||||
@item -ilme
|
@item -ilme
|
||||||
Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
|
Force interlacing support in encoder (MPEG-2 and MPEG-4 only).
|
||||||
Use this option if your input file is interlaced and you want
|
Use this option if your input file is interlaced and you want
|
||||||
@@ -643,8 +628,8 @@ Set the audio codec. This is an alias for @code{-codec:a}.
|
|||||||
Set the audio sample format. Use @code{-sample_fmts} to get a list
|
Set the audio sample format. Use @code{-sample_fmts} to get a list
|
||||||
of supported sample formats.
|
of supported sample formats.
|
||||||
|
|
||||||
@item -af @var{filtergraph} (@emph{output})
|
@item -af @var{filter_graph} (@emph{output})
|
||||||
Create the filtergraph specified by @var{filtergraph} and use it to
|
Create the filter graph specified by @var{filter_graph} and use it to
|
||||||
filter the stream.
|
filter the stream.
|
||||||
|
|
||||||
This is an alias for @code{-filter:a}, see the @ref{filter_option,,-filter option}.
|
This is an alias for @code{-filter:a}, see the @ref{filter_option,,-filter option}.
|
||||||
@@ -695,9 +680,6 @@ Note that this option will delay the output of all data until the next
|
|||||||
subtitle packet is decoded: it may increase memory consumption and latency a
|
subtitle packet is decoded: it may increase memory consumption and latency a
|
||||||
lot.
|
lot.
|
||||||
|
|
||||||
@item -canvas_size @var{size}
|
|
||||||
Set the size of the canvas used to render subtitles.
|
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@section Advanced options
|
@section Advanced options
|
||||||
@@ -877,12 +859,13 @@ Dump each input packet to stderr.
|
|||||||
When dumping packets, also dump the payload.
|
When dumping packets, also dump the payload.
|
||||||
@item -re (@emph{input})
|
@item -re (@emph{input})
|
||||||
Read input at native frame rate. Mainly used to simulate a grab device.
|
Read input at native frame rate. Mainly used to simulate a grab device.
|
||||||
or live input stream (e.g. when reading from a file). Should not be used
|
|
||||||
with actual grab devices or live input streams (where it can cause packet
|
|
||||||
loss).
|
|
||||||
By default @command{ffmpeg} attempts to read the input(s) as fast as possible.
|
By default @command{ffmpeg} attempts to read the input(s) as fast as possible.
|
||||||
This option will slow down the reading of the input(s) to the native frame rate
|
This option will slow down the reading of the input(s) to the native frame rate
|
||||||
of the input(s). It is useful for real-time output (e.g. live streaming).
|
of the input(s). It is useful for real-time output (e.g. live streaming). If
|
||||||
|
your input(s) is coming from some other live streaming source (through HTTP or
|
||||||
|
UDP for example) the server might already be in real-time, thus the option will
|
||||||
|
likely not be required. On the other hand, this is meaningful if your input(s)
|
||||||
|
is a file you are trying to push in real-time.
|
||||||
@item -loop_input
|
@item -loop_input
|
||||||
Loop over the input stream. Currently it works only for image
|
Loop over the input stream. Currently it works only for image
|
||||||
streams. This option is used for automatic FFserver testing.
|
streams. This option is used for automatic FFserver testing.
|
||||||
@@ -901,7 +884,7 @@ Newly added values will have to be specified as strings always.
|
|||||||
Each frame is passed with its timestamp from the demuxer to the muxer.
|
Each frame is passed with its timestamp from the demuxer to the muxer.
|
||||||
@item 1, cfr
|
@item 1, cfr
|
||||||
Frames will be duplicated and dropped to achieve exactly the requested
|
Frames will be duplicated and dropped to achieve exactly the requested
|
||||||
constant frame rate.
|
constant framerate.
|
||||||
@item 2, vfr
|
@item 2, vfr
|
||||||
Frames are passed through with their timestamp or dropped so as to
|
Frames are passed through with their timestamp or dropped so as to
|
||||||
prevent 2 frames from having the same timestamp.
|
prevent 2 frames from having the same timestamp.
|
||||||
@@ -913,10 +896,6 @@ Chooses between 1 and 2 depending on muxer capabilities. This is the
|
|||||||
default method.
|
default method.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
Note that the timestamps may be further modified by the muxer, after this.
|
|
||||||
For example, in the case that the format option @option{avoid_negative_ts}
|
|
||||||
is enabled.
|
|
||||||
|
|
||||||
With -map you can select from which stream the timestamps should be
|
With -map you can select from which stream the timestamps should be
|
||||||
taken. You can leave either video or audio unchanged and sync the
|
taken. You can leave either video or audio unchanged and sync the
|
||||||
remaining stream(s) to the unchanged one.
|
remaining stream(s) to the unchanged one.
|
||||||
@@ -926,11 +905,6 @@ Audio sync method. "Stretches/squeezes" the audio stream to match the timestamps
|
|||||||
the parameter is the maximum samples per second by which the audio is changed.
|
the parameter is the maximum samples per second by which the audio is changed.
|
||||||
-async 1 is a special case where only the start of the audio stream is corrected
|
-async 1 is a special case where only the start of the audio stream is corrected
|
||||||
without any later correction.
|
without any later correction.
|
||||||
|
|
||||||
Note that the timestamps may be further modified by the muxer, after this.
|
|
||||||
For example, in the case that the format option @option{avoid_negative_ts}
|
|
||||||
is enabled.
|
|
||||||
|
|
||||||
This option has been deprecated. Use the @code{aresample} audio filter instead.
|
This option has been deprecated. Use the @code{aresample} audio filter instead.
|
||||||
|
|
||||||
@item -copyts
|
@item -copyts
|
||||||
@@ -939,8 +913,7 @@ to sanitize them. In particular, do not remove the initial start time
|
|||||||
offset value.
|
offset value.
|
||||||
|
|
||||||
Note that, depending on the @option{vsync} option or on specific muxer
|
Note that, depending on the @option{vsync} option or on specific muxer
|
||||||
processing (e.g. in case the format option @option{avoid_negative_ts}
|
processing, the output timestamps may mismatch with the input
|
||||||
is enabled) the output timestamps may mismatch with the input
|
|
||||||
timestamps even when this option is selected.
|
timestamps even when this option is selected.
|
||||||
|
|
||||||
@item -copytb @var{mode}
|
@item -copytb @var{mode}
|
||||||
@@ -1010,10 +983,10 @@ ffmpeg -i input.mpg -timecode 01:02:03.04 -r 30000/1001 -s ntsc output.mpg
|
|||||||
|
|
||||||
@anchor{filter_complex_option}
|
@anchor{filter_complex_option}
|
||||||
@item -filter_complex @var{filtergraph} (@emph{global})
|
@item -filter_complex @var{filtergraph} (@emph{global})
|
||||||
Define a complex filtergraph, i.e. one with arbitrary number of inputs and/or
|
Define a complex filter graph, i.e. one with arbitrary number of inputs and/or
|
||||||
outputs. For simple graphs -- those with one input and one output of the same
|
outputs. For simple graphs -- those with one input and one output of the same
|
||||||
type -- see the @option{-filter} options. @var{filtergraph} is a description of
|
type -- see the @option{-filter} options. @var{filtergraph} is a description of
|
||||||
the filtergraph, as described in the ``Filtergraph syntax'' section of the
|
the filter graph, as described in the ``Filtergraph syntax'' section of the
|
||||||
ffmpeg-filters manual.
|
ffmpeg-filters manual.
|
||||||
|
|
||||||
Input link labels must refer to input streams using the
|
Input link labels must refer to input streams using the
|
||||||
@@ -1055,30 +1028,6 @@ To generate 5 seconds of pure red video using lavfi @code{color} source:
|
|||||||
@example
|
@example
|
||||||
ffmpeg -filter_complex 'color=c=red' -t 5 out.mkv
|
ffmpeg -filter_complex 'color=c=red' -t 5 out.mkv
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item -lavfi @var{filtergraph} (@emph{global})
|
|
||||||
Define a complex filtergraph, i.e. one with arbitrary number of inputs and/or
|
|
||||||
outputs. Equivalent to @option{-filter_complex}.
|
|
||||||
|
|
||||||
@item -filter_complex_script @var{filename} (@emph{global})
|
|
||||||
This option is similar to @option{-filter_complex}, the only difference is that
|
|
||||||
its argument is the name of the file from which a complex filtergraph
|
|
||||||
description is to be read.
|
|
||||||
|
|
||||||
@item -accurate_seek (@emph{input})
|
|
||||||
This option enables or disables accurate seeking in input files with the
|
|
||||||
@option{-ss} option. It is enabled by default, so seeking is accurate when
|
|
||||||
transcoding. Use @option{-noaccurate_seek} to disable it, which may be useful
|
|
||||||
e.g. when copying some streams and transcoding the others.
|
|
||||||
|
|
||||||
@item -override_ffserver (@emph{global})
|
|
||||||
Overrides the input specifications from ffserver. Using this option you can
|
|
||||||
map any input stream to ffserver and control many aspects of the encoding from
|
|
||||||
ffmpeg. Without this option ffmpeg will transmit to ffserver what is requested by
|
|
||||||
ffserver.
|
|
||||||
The option is intended for cases where features are needed that cannot be
|
|
||||||
specified to ffserver but can be to ffmpeg.
|
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
As a special exception, you can use a bitmap subtitle stream as input: it
|
As a special exception, you can use a bitmap subtitle stream as input: it
|
||||||
@@ -1136,7 +1085,7 @@ then it will search for the file @file{libvpx-1080p.ffpreset}.
|
|||||||
|
|
||||||
@itemize
|
@itemize
|
||||||
@item
|
@item
|
||||||
For streaming at very low bitrates, use a low frame rate
|
For streaming at very low bitrate application, use a low frame rate
|
||||||
and a small GOP size. This is especially true for RealVideo where
|
and a small GOP size. This is especially true for RealVideo where
|
||||||
the Linux player does not seem to be very fast, so it can miss
|
the Linux player does not seem to be very fast, so it can miss
|
||||||
frames. An example is:
|
frames. An example is:
|
||||||
@@ -1215,14 +1164,14 @@ standard mixer.
|
|||||||
Grab the X11 display with ffmpeg via
|
Grab the X11 display with ffmpeg via
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0 /tmp/out.mpg
|
ffmpeg -f x11grab -s cif -r 25 -i :0.0 /tmp/out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
0.0 is display.screen number of your X11 server, same as
|
0.0 is display.screen number of your X11 server, same as
|
||||||
the DISPLAY environment variable.
|
the DISPLAY environment variable.
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0+10,20 /tmp/out.mpg
|
ffmpeg -f x11grab -s cif -r 25 -i :0.0+10,20 /tmp/out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
0.0 is display.screen number of your X11 server, same as the DISPLAY environment
|
0.0 is display.screen number of your X11 server, same as the DISPLAY environment
|
||||||
@@ -1381,42 +1330,9 @@ ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
|
|||||||
@end itemize
|
@end itemize
|
||||||
@c man end EXAMPLES
|
@c man end EXAMPLES
|
||||||
|
|
||||||
@include config.texi
|
|
||||||
@ifset config-all
|
|
||||||
@ifset config-avutil
|
|
||||||
@include utils.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avcodec
|
|
||||||
@include codecs.texi
|
|
||||||
@include bitstream_filters.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avformat
|
|
||||||
@include formats.texi
|
|
||||||
@include protocols.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avdevice
|
|
||||||
@include devices.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-swresample
|
|
||||||
@include resampler.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-swscale
|
|
||||||
@include scaler.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avfilter
|
|
||||||
@include filters.texi
|
|
||||||
@end ifset
|
|
||||||
@end ifset
|
|
||||||
|
|
||||||
@chapter See Also
|
@chapter See Also
|
||||||
|
|
||||||
@ifhtml
|
@ifhtml
|
||||||
@ifset config-all
|
|
||||||
@url{ffmpeg.html,ffmpeg}
|
|
||||||
@end ifset
|
|
||||||
@ifset config-not-all
|
|
||||||
@url{ffmpeg-all.html,ffmpeg-all},
|
|
||||||
@end ifset
|
|
||||||
@url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
|
@url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
|
||||||
@url{ffmpeg-utils.html,ffmpeg-utils},
|
@url{ffmpeg-utils.html,ffmpeg-utils},
|
||||||
@url{ffmpeg-scaler.html,ffmpeg-scaler},
|
@url{ffmpeg-scaler.html,ffmpeg-scaler},
|
||||||
@@ -1430,12 +1346,6 @@ ffmpeg -i src.ext -lmax 21*QP2LAMBDA dst.ext
|
|||||||
@end ifhtml
|
@end ifhtml
|
||||||
|
|
||||||
@ifnothtml
|
@ifnothtml
|
||||||
@ifset config-all
|
|
||||||
ffmpeg(1),
|
|
||||||
@end ifset
|
|
||||||
@ifset config-not-all
|
|
||||||
ffmpeg-all(1),
|
|
||||||
@end ifset
|
|
||||||
ffplay(1), ffprobe(1), ffserver(1),
|
ffplay(1), ffprobe(1), ffserver(1),
|
||||||
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
|
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
|
||||||
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
|
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
|
||||||
|
|||||||
+9
-61
@@ -24,7 +24,7 @@ various FFmpeg APIs.
|
|||||||
@chapter Options
|
@chapter Options
|
||||||
@c man begin OPTIONS
|
@c man begin OPTIONS
|
||||||
|
|
||||||
@include fftools-common-opts.texi
|
@include avtools-common-opts.texi
|
||||||
|
|
||||||
@section Main options
|
@section Main options
|
||||||
|
|
||||||
@@ -73,23 +73,17 @@ Default value is "video", if video is not present or cannot be played
|
|||||||
You can interactively cycle through the available show modes by
|
You can interactively cycle through the available show modes by
|
||||||
pressing the key @key{w}.
|
pressing the key @key{w}.
|
||||||
|
|
||||||
@item -vf @var{filtergraph}
|
@item -vf @var{filter_graph}
|
||||||
Create the filtergraph specified by @var{filtergraph} and use it to
|
Create the filter graph specified by @var{filter_graph} and use it to
|
||||||
filter the video stream.
|
filter the video stream.
|
||||||
|
|
||||||
@var{filtergraph} is a description of the filtergraph to apply to
|
@var{filter_graph} is a description of the filter graph to apply to
|
||||||
the stream, and must have a single video input and a single video
|
the stream, and must have a single video input and a single video
|
||||||
output. In the filtergraph, the input is associated to the label
|
output. In the filter graph, the input is associated to the label
|
||||||
@code{in}, and the output to the label @code{out}. See the
|
@code{in}, and the output to the label @code{out}. See the
|
||||||
ffmpeg-filters manual for more information about the filtergraph
|
ffmpeg-filters manual for more information about the filtergraph
|
||||||
syntax.
|
syntax.
|
||||||
|
|
||||||
@item -af @var{filtergraph}
|
|
||||||
@var{filtergraph} is a description of the filtergraph to apply to
|
|
||||||
the input audio.
|
|
||||||
Use the option "-filters" to show all the available filters (including
|
|
||||||
sources and sinks).
|
|
||||||
|
|
||||||
@item -i @var{input_file}
|
@item -i @var{input_file}
|
||||||
Read @var{input_file}.
|
Read @var{input_file}.
|
||||||
@end table
|
@end table
|
||||||
@@ -99,13 +93,9 @@ Read @var{input_file}.
|
|||||||
@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.
|
This option has been deprecated in favor of private options, try -pixel_format.
|
||||||
|
|
||||||
@item -stats
|
@item -stats
|
||||||
Print several playback statistics, in particular show the stream
|
Show the stream duration, the codec parameters, the current position in
|
||||||
duration, the codec parameters, the current position in the stream and
|
the stream and the audio/video synchronisation drift.
|
||||||
the audio/video synchronisation drift. It is on by default, to
|
|
||||||
explicitly disable it you need to specify @code{-nostats}.
|
|
||||||
|
|
||||||
@item -bug
|
@item -bug
|
||||||
Work around bugs.
|
Work around bugs.
|
||||||
@item -fast
|
@item -fast
|
||||||
@@ -174,16 +164,13 @@ Toggle full screen.
|
|||||||
Pause.
|
Pause.
|
||||||
|
|
||||||
@item a
|
@item a
|
||||||
Cycle audio channel in the curret program.
|
Cycle audio channel.
|
||||||
|
|
||||||
@item v
|
@item v
|
||||||
Cycle video channel.
|
Cycle video channel.
|
||||||
|
|
||||||
@item t
|
@item t
|
||||||
Cycle subtitle channel in the current program.
|
Cycle subtitle channel.
|
||||||
|
|
||||||
@item c
|
|
||||||
Cycle program.
|
|
||||||
|
|
||||||
@item w
|
@item w
|
||||||
Show audio waves.
|
Show audio waves.
|
||||||
@@ -204,42 +191,9 @@ Seek to percentage in file corresponding to fraction of width.
|
|||||||
|
|
||||||
@c man end
|
@c man end
|
||||||
|
|
||||||
@include config.texi
|
|
||||||
@ifset config-all
|
|
||||||
@ifset config-avutil
|
|
||||||
@include utils.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avcodec
|
|
||||||
@include codecs.texi
|
|
||||||
@include bitstream_filters.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avformat
|
|
||||||
@include formats.texi
|
|
||||||
@include protocols.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avdevice
|
|
||||||
@include devices.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-swresample
|
|
||||||
@include resampler.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-swscale
|
|
||||||
@include scaler.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avfilter
|
|
||||||
@include filters.texi
|
|
||||||
@end ifset
|
|
||||||
@end ifset
|
|
||||||
|
|
||||||
@chapter See Also
|
@chapter See Also
|
||||||
|
|
||||||
@ifhtml
|
@ifhtml
|
||||||
@ifset config-all
|
|
||||||
@url{ffplay.html,ffplay},
|
|
||||||
@end ifset
|
|
||||||
@ifset config-not-all
|
|
||||||
@url{ffplay-all.html,ffmpeg-all},
|
|
||||||
@end ifset
|
|
||||||
@url{ffmpeg.html,ffmpeg}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
|
@url{ffmpeg.html,ffmpeg}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
|
||||||
@url{ffmpeg-utils.html,ffmpeg-utils},
|
@url{ffmpeg-utils.html,ffmpeg-utils},
|
||||||
@url{ffmpeg-scaler.html,ffmpeg-scaler},
|
@url{ffmpeg-scaler.html,ffmpeg-scaler},
|
||||||
@@ -253,12 +207,6 @@ Seek to percentage in file corresponding to fraction of width.
|
|||||||
@end ifhtml
|
@end ifhtml
|
||||||
|
|
||||||
@ifnothtml
|
@ifnothtml
|
||||||
@ifset config-all
|
|
||||||
ffplay(1),
|
|
||||||
@end ifset
|
|
||||||
@ifset config-not-all
|
|
||||||
ffplay-all(1),
|
|
||||||
@end ifset
|
|
||||||
ffmpeg(1), ffprobe(1), ffserver(1),
|
ffmpeg(1), ffprobe(1), ffserver(1),
|
||||||
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
|
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
|
||||||
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
|
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
|
||||||
|
|||||||
+6
-122
@@ -44,15 +44,14 @@ name (which may be shared by other sections), and an unique
|
|||||||
name. See the output of @option{sections}.
|
name. See the output of @option{sections}.
|
||||||
|
|
||||||
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", "STREAM" or "PROGRAM_STREAM"
|
and printed in the corresponding "FORMAT" or "STREAM" section.
|
||||||
section.
|
|
||||||
|
|
||||||
@c man end
|
@c man end
|
||||||
|
|
||||||
@chapter Options
|
@chapter Options
|
||||||
@c man begin OPTIONS
|
@c man begin OPTIONS
|
||||||
|
|
||||||
@include fftools-common-opts.texi
|
@include avtools-common-opts.texi
|
||||||
|
|
||||||
@section Main options
|
@section Main options
|
||||||
|
|
||||||
@@ -113,7 +112,7 @@ ffprobe -show_packets -select_streams v:1 INPUT
|
|||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item -show_data
|
@item -show_data
|
||||||
Show payload data, as a hexadecimal and ASCII dump. Coupled with
|
Show payload data, as an hexadecimal and ASCII dump. Coupled with
|
||||||
@option{-show_packets}, it will dump the packets' data. Coupled with
|
@option{-show_packets}, it will dump the packets' data. Coupled with
|
||||||
@option{-show_streams}, it will dump the codec extradata.
|
@option{-show_streams}, it will dump the codec extradata.
|
||||||
|
|
||||||
@@ -210,18 +209,6 @@ 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 -show_programs
|
|
||||||
Show information about programs and their streams contained in the input
|
|
||||||
multimedia stream.
|
|
||||||
|
|
||||||
Each media stream information is printed within a dedicated section
|
|
||||||
with name "PROGRAM_STREAM".
|
|
||||||
|
|
||||||
@item -show_chapters
|
|
||||||
Show information about chapters stored in the format.
|
|
||||||
|
|
||||||
Each chapter is printed within a dedicated section with name "CHAPTER".
|
|
||||||
|
|
||||||
@item -count_frames
|
@item -count_frames
|
||||||
Count the number of frames per stream and report it in the
|
Count the number of frames per stream and report it in the
|
||||||
corresponding stream section.
|
corresponding stream section.
|
||||||
@@ -230,70 +217,6 @@ corresponding stream section.
|
|||||||
Count the number of packets per stream and report it in the
|
Count the number of packets per stream and report it in the
|
||||||
corresponding stream section.
|
corresponding stream section.
|
||||||
|
|
||||||
@item -read_intervals @var{read_intervals}
|
|
||||||
|
|
||||||
Read only the specified intervals. @var{read_intervals} must be a
|
|
||||||
sequence of interval specifications separated by ",".
|
|
||||||
@command{ffprobe} will seek to the interval starting point, and will
|
|
||||||
continue reading from that.
|
|
||||||
|
|
||||||
Each interval is specified by two optional parts, separated by "%".
|
|
||||||
|
|
||||||
The first part specifies the interval start position. It is
|
|
||||||
interpreted as an abolute position, or as a relative offset from the
|
|
||||||
current position if it is preceded by the "+" character. If this first
|
|
||||||
part is not specified, no seeking will be performed when reading this
|
|
||||||
interval.
|
|
||||||
|
|
||||||
The second part specifies the interval end position. It is interpreted
|
|
||||||
as an absolute position, or as a relative offset from the current
|
|
||||||
position if it is preceded by the "+" character. If the offset
|
|
||||||
specification starts with "#", it is interpreted as the number of
|
|
||||||
packets to read (not including the flushing packets) from the interval
|
|
||||||
start. If no second part is specified, the program will read until the
|
|
||||||
end of the input.
|
|
||||||
|
|
||||||
Note that seeking is not accurate, thus the actual interval start
|
|
||||||
point may be different from the specified position. Also, when an
|
|
||||||
interval duration is specified, the absolute end time will be computed
|
|
||||||
by adding the duration to the interval start point found by seeking
|
|
||||||
the file, rather than to the specified start value.
|
|
||||||
|
|
||||||
The formal syntax is given by:
|
|
||||||
@example
|
|
||||||
@var{INTERVAL} ::= [@var{START}|+@var{START_OFFSET}][%[@var{END}|+@var{END_OFFSET}]]
|
|
||||||
@var{INTERVALS} ::= @var{INTERVAL}[,@var{INTERVALS}]
|
|
||||||
@end example
|
|
||||||
|
|
||||||
A few examples follow.
|
|
||||||
@itemize
|
|
||||||
@item
|
|
||||||
Seek to time 10, read packets until 20 seconds after the found seek
|
|
||||||
point, then seek to position @code{01:30} (1 minute and thirty
|
|
||||||
seconds) and read packets until position @code{01:45}.
|
|
||||||
@example
|
|
||||||
10%+20,01:30%01:45
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Read only 42 packets after seeking to position @code{01:23}:
|
|
||||||
@example
|
|
||||||
01:23%+#42
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Read only the first 20 seconds from the start:
|
|
||||||
@example
|
|
||||||
%+20
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Read from the start until position @code{02:30}:
|
|
||||||
@example
|
|
||||||
%02:30
|
|
||||||
@end example
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@item -show_private_data, -private
|
@item -show_private_data, -private
|
||||||
Show private data, that is data depending on the format of the
|
Show private data, that is data depending on the format of the
|
||||||
particular shown element.
|
particular shown element.
|
||||||
@@ -351,8 +274,8 @@ keyN=valN
|
|||||||
[/SECTION]
|
[/SECTION]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Metadata tags are printed as a line in the corresponding FORMAT, STREAM or
|
Metadata tags are printed as a line in the corresponding FORMAT or
|
||||||
PROGRAM_STREAM section, and are prefixed by the string "TAG:".
|
STREAM section, and are prefixed by the string "TAG:".
|
||||||
|
|
||||||
A description of the accepted options follows.
|
A description of the accepted options follows.
|
||||||
|
|
||||||
@@ -564,43 +487,10 @@ DV, GXF and AVI timecodes are available in format metadata
|
|||||||
@end itemize
|
@end itemize
|
||||||
@c man end TIMECODE
|
@c man end TIMECODE
|
||||||
|
|
||||||
@include config.texi
|
|
||||||
@ifset config-all
|
|
||||||
@ifset config-avutil
|
|
||||||
@include utils.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avcodec
|
|
||||||
@include codecs.texi
|
|
||||||
@include bitstream_filters.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avformat
|
|
||||||
@include formats.texi
|
|
||||||
@include protocols.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avdevice
|
|
||||||
@include devices.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-swresample
|
|
||||||
@include resampler.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-swscale
|
|
||||||
@include scaler.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avfilter
|
|
||||||
@include filters.texi
|
|
||||||
@end ifset
|
|
||||||
@end ifset
|
|
||||||
|
|
||||||
@chapter See Also
|
@chapter See Also
|
||||||
|
|
||||||
@ifhtml
|
@ifhtml
|
||||||
@ifset config-all
|
@url{ffplay.html,ffmpeg}, @url{ffprobe.html,ffprobe}, @url{ffserver.html,ffserver},
|
||||||
@url{ffprobe.html,ffprobe},
|
|
||||||
@end ifset
|
|
||||||
@ifset config-not-all
|
|
||||||
@url{ffprobe-all.html,ffprobe-all},
|
|
||||||
@end ifset
|
|
||||||
@url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffserver.html,ffserver},
|
|
||||||
@url{ffmpeg-utils.html,ffmpeg-utils},
|
@url{ffmpeg-utils.html,ffmpeg-utils},
|
||||||
@url{ffmpeg-scaler.html,ffmpeg-scaler},
|
@url{ffmpeg-scaler.html,ffmpeg-scaler},
|
||||||
@url{ffmpeg-resampler.html,ffmpeg-resampler},
|
@url{ffmpeg-resampler.html,ffmpeg-resampler},
|
||||||
@@ -613,12 +503,6 @@ DV, GXF and AVI timecodes are available in format metadata
|
|||||||
@end ifhtml
|
@end ifhtml
|
||||||
|
|
||||||
@ifnothtml
|
@ifnothtml
|
||||||
@ifset config-all
|
|
||||||
ffprobe(1),
|
|
||||||
@end ifset
|
|
||||||
@ifset config-not-all
|
|
||||||
ffprobe-all(1),
|
|
||||||
@end ifset
|
|
||||||
ffmpeg(1), ffplay(1), ffserver(1),
|
ffmpeg(1), ffplay(1), ffserver(1),
|
||||||
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
|
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
|
||||||
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
|
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
|
||||||
|
|||||||
+2
-48
@@ -11,8 +11,6 @@
|
|||||||
<xsd:element name="packets" type="ffprobe:packetsType" minOccurs="0" maxOccurs="1" />
|
<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="frames" type="ffprobe:framesType" minOccurs="0" maxOccurs="1" />
|
||||||
<xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1" />
|
<xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1" />
|
||||||
<xsd:element name="programs" type="ffprobe:programsType" minOccurs="0" maxOccurs="1" />
|
|
||||||
<xsd:element name="chapters" type="ffprobe:chaptersType" minOccurs="0" maxOccurs="1" />
|
|
||||||
<xsd:element name="format" type="ffprobe:formatType" 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="error" type="ffprobe:errorType" minOccurs="0" maxOccurs="1" />
|
||||||
<xsd:element name="program_version" type="ffprobe:programVersionType" minOccurs="0" maxOccurs="1" />
|
<xsd:element name="program_version" type="ffprobe:programVersionType" minOccurs="0" maxOccurs="1" />
|
||||||
@@ -80,6 +78,7 @@
|
|||||||
<xsd:attribute name="interlaced_frame" type="xsd:int" />
|
<xsd:attribute name="interlaced_frame" type="xsd:int" />
|
||||||
<xsd:attribute name="top_field_first" type="xsd:int" />
|
<xsd:attribute name="top_field_first" type="xsd:int" />
|
||||||
<xsd:attribute name="repeat_pict" type="xsd:int" />
|
<xsd:attribute name="repeat_pict" type="xsd:int" />
|
||||||
|
<xsd:attribute name="reference" type="xsd:int" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="streamsType">
|
<xsd:complexType name="streamsType">
|
||||||
@@ -88,12 +87,6 @@
|
|||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="programsType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="program" type="ffprobe:programType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="streamDispositionType">
|
<xsd:complexType name="streamDispositionType">
|
||||||
<xsd:attribute name="default" type="xsd:int" use="required" />
|
<xsd:attribute name="default" type="xsd:int" use="required" />
|
||||||
<xsd:attribute name="dub" type="xsd:int" use="required" />
|
<xsd:attribute name="dub" type="xsd:int" use="required" />
|
||||||
@@ -110,8 +103,8 @@
|
|||||||
|
|
||||||
<xsd:complexType name="streamType">
|
<xsd:complexType name="streamType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
|
|
||||||
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
<xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
|
|
||||||
<xsd:attribute name="index" type="xsd:int" use="required"/>
|
<xsd:attribute name="index" type="xsd:int" use="required"/>
|
||||||
@@ -138,7 +131,6 @@
|
|||||||
<xsd:attribute name="sample_fmt" type="xsd:string"/>
|
<xsd:attribute name="sample_fmt" type="xsd:string"/>
|
||||||
<xsd:attribute name="sample_rate" type="xsd:int"/>
|
<xsd:attribute name="sample_rate" type="xsd:int"/>
|
||||||
<xsd:attribute name="channels" type="xsd:int"/>
|
<xsd:attribute name="channels" type="xsd:int"/>
|
||||||
<xsd:attribute name="channel_layout" type="xsd:string"/>
|
|
||||||
<xsd:attribute name="bits_per_sample" type="xsd:int"/>
|
<xsd:attribute name="bits_per_sample" type="xsd:int"/>
|
||||||
|
|
||||||
<xsd:attribute name="id" type="xsd:string"/>
|
<xsd:attribute name="id" type="xsd:string"/>
|
||||||
@@ -155,23 +147,6 @@
|
|||||||
<xsd:attribute name="nb_read_packets" type="xsd:int"/>
|
<xsd:attribute name="nb_read_packets" type="xsd:int"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="programType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
<xsd:element name="streams" type="ffprobe:streamsType" minOccurs="0" maxOccurs="1"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
|
|
||||||
<xsd:attribute name="program_id" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="program_num" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="nb_streams" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="start_time" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="start_pts" type="xsd:long"/>
|
|
||||||
<xsd:attribute name="end_time" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="end_pts" type="xsd:long"/>
|
|
||||||
<xsd:attribute name="pmt_pid" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="pcr_pid" type="xsd:int" use="required"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="formatType">
|
<xsd:complexType name="formatType">
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
@@ -179,14 +154,12 @@
|
|||||||
|
|
||||||
<xsd:attribute name="filename" type="xsd:string" use="required"/>
|
<xsd:attribute name="filename" type="xsd:string" use="required"/>
|
||||||
<xsd:attribute name="nb_streams" type="xsd:int" use="required"/>
|
<xsd:attribute name="nb_streams" type="xsd:int" use="required"/>
|
||||||
<xsd:attribute name="nb_programs" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="format_name" type="xsd:string" use="required"/>
|
<xsd:attribute name="format_name" type="xsd:string" use="required"/>
|
||||||
<xsd:attribute name="format_long_name" type="xsd:string"/>
|
<xsd:attribute name="format_long_name" type="xsd:string"/>
|
||||||
<xsd:attribute name="start_time" type="xsd:float"/>
|
<xsd:attribute name="start_time" type="xsd:float"/>
|
||||||
<xsd:attribute name="duration" type="xsd:float"/>
|
<xsd:attribute name="duration" type="xsd:float"/>
|
||||||
<xsd:attribute name="size" type="xsd:long"/>
|
<xsd:attribute name="size" type="xsd:long"/>
|
||||||
<xsd:attribute name="bit_rate" type="xsd:long"/>
|
<xsd:attribute name="bit_rate" type="xsd:long"/>
|
||||||
<xsd:attribute name="probe_score" type="xsd:int"/>
|
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="tagType">
|
<xsd:complexType name="tagType">
|
||||||
@@ -209,25 +182,6 @@
|
|||||||
<xsd:attribute name="configuration" type="xsd:string" use="required"/>
|
<xsd:attribute name="configuration" type="xsd:string" use="required"/>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
|
|
||||||
<xsd:complexType name="chaptersType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="chapter" type="ffprobe:chapterType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="chapterType">
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
|
|
||||||
</xsd:sequence>
|
|
||||||
|
|
||||||
<xsd:attribute name="id" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="time_base" type="xsd:string" use="required"/>
|
|
||||||
<xsd:attribute name="start" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="start_time" type="xsd:float"/>
|
|
||||||
<xsd:attribute name="end" type="xsd:int" use="required"/>
|
|
||||||
<xsd:attribute name="end_time" type="xsd:float" use="required"/>
|
|
||||||
</xsd:complexType>
|
|
||||||
|
|
||||||
<xsd:complexType name="libraryVersionType">
|
<xsd:complexType name="libraryVersionType">
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||||
<xsd:attribute name="major" type="xsd:int" use="required"/>
|
<xsd:attribute name="major" type="xsd:int" use="required"/>
|
||||||
|
|||||||
+3
-42
@@ -229,7 +229,7 @@ differing versions of tools. FFM2 is the default.
|
|||||||
@chapter Options
|
@chapter Options
|
||||||
@c man begin OPTIONS
|
@c man begin OPTIONS
|
||||||
|
|
||||||
@include fftools-common-opts.texi
|
@include avtools-common-opts.texi
|
||||||
|
|
||||||
@section Main options
|
@section Main options
|
||||||
|
|
||||||
@@ -246,43 +246,10 @@ messages to stdout.
|
|||||||
@end table
|
@end table
|
||||||
@c man end
|
@c man end
|
||||||
|
|
||||||
@include config.texi
|
|
||||||
@ifset config-all
|
|
||||||
@ifset config-avutil
|
|
||||||
@include utils.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avcodec
|
|
||||||
@include codecs.texi
|
|
||||||
@include bitstream_filters.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avformat
|
|
||||||
@include formats.texi
|
|
||||||
@include protocols.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avdevice
|
|
||||||
@include devices.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-swresample
|
|
||||||
@include resampler.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-swscale
|
|
||||||
@include scaler.texi
|
|
||||||
@end ifset
|
|
||||||
@ifset config-avfilter
|
|
||||||
@include filters.texi
|
|
||||||
@end ifset
|
|
||||||
@end ifset
|
|
||||||
|
|
||||||
@chapter See Also
|
@chapter See Also
|
||||||
|
|
||||||
@ifhtml
|
@ifhtml
|
||||||
@ifset config-all
|
The @file{doc/ffserver.conf} example,
|
||||||
@url{ffserver.html,ffserver},
|
|
||||||
@end ifset
|
|
||||||
@ifset config-not-all
|
|
||||||
@url{ffserver-all.html,ffserver-all},
|
|
||||||
@end ifset
|
|
||||||
the @file{doc/ffserver.conf} example,
|
|
||||||
@url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe},
|
@url{ffmpeg.html,ffmpeg}, @url{ffplay.html,ffplay}, @url{ffprobe.html,ffprobe},
|
||||||
@url{ffmpeg-utils.html,ffmpeg-utils},
|
@url{ffmpeg-utils.html,ffmpeg-utils},
|
||||||
@url{ffmpeg-scaler.html,ffmpeg-scaler},
|
@url{ffmpeg-scaler.html,ffmpeg-scaler},
|
||||||
@@ -296,13 +263,7 @@ the @file{doc/ffserver.conf} example,
|
|||||||
@end ifhtml
|
@end ifhtml
|
||||||
|
|
||||||
@ifnothtml
|
@ifnothtml
|
||||||
@ifset config-all
|
The @file{doc/ffserver.conf} example, ffmpeg(1), ffplay(1), ffprobe(1),
|
||||||
ffserver(1),
|
|
||||||
@end ifset
|
|
||||||
@ifset config-not-all
|
|
||||||
ffserver-all(1),
|
|
||||||
@end ifset
|
|
||||||
the @file{doc/ffserver.conf} example, ffmpeg(1), ffplay(1), ffprobe(1),
|
|
||||||
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
|
ffmpeg-utils(1), ffmpeg-scaler(1), ffmpeg-resampler(1),
|
||||||
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
|
ffmpeg-codecs(1), ffmpeg-bitstream-filters(1), ffmpeg-formats(1),
|
||||||
ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1)
|
ffmpeg-devices(1), ffmpeg-protocols(1), ffmpeg-filters(1)
|
||||||
|
|||||||
@@ -29,11 +29,6 @@ Format negotiation
|
|||||||
same format amongst a supported list, all it has to do is use a reference
|
same format amongst a supported list, all it has to do is use a reference
|
||||||
to the same list of formats.
|
to the same list of formats.
|
||||||
|
|
||||||
query_formats can leave some formats unset and return AVERROR(EAGAIN) to
|
|
||||||
cause the negotiation mechanism to try again later. That can be used by
|
|
||||||
filters with complex requirements to use the format negotiated on one link
|
|
||||||
to set the formats supported on another.
|
|
||||||
|
|
||||||
|
|
||||||
Buffer references ownership and permissions
|
Buffer references ownership and permissions
|
||||||
===========================================
|
===========================================
|
||||||
@@ -166,7 +161,7 @@ Buffer references ownership and permissions
|
|||||||
WRITE permission.
|
WRITE permission.
|
||||||
|
|
||||||
* Filters that read their input to produce a new frame on output (like
|
* Filters that read their input to produce a new frame on output (like
|
||||||
scale) need the READ permission on input and must request a buffer
|
scale) need the READ permission on input and and must request a buffer
|
||||||
with the WRITE permission.
|
with the WRITE permission.
|
||||||
|
|
||||||
* Filters that intend to keep a reference after the filtering process
|
* Filters that intend to keep a reference after the filtering process
|
||||||
@@ -204,7 +199,7 @@ Frame scheduling
|
|||||||
filter; these buffered frames must be flushed immediately if a new input
|
filter; these buffered frames must be flushed immediately if a new input
|
||||||
produces new output.
|
produces new output.
|
||||||
|
|
||||||
(Example: frame rate-doubling filter: filter_frame must (1) flush the
|
(Example: framerate-doubling filter: filter_frame must (1) flush the
|
||||||
second copy of the previous frame, if it is still there, (2) push 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.)
|
first copy of the incoming frame, (3) keep the second copy for later.)
|
||||||
|
|
||||||
|
|||||||
+1347
-4483
File diff suppressed because it is too large
Load Diff
@@ -1,188 +0,0 @@
|
|||||||
@chapter Format Options
|
|
||||||
@c man begin FORMAT OPTIONS
|
|
||||||
|
|
||||||
The libavformat library provides some generic global options, which
|
|
||||||
can be set on all the muxers and demuxers. In addition each muxer or
|
|
||||||
demuxer may support so-called private options, which are specific for
|
|
||||||
that component.
|
|
||||||
|
|
||||||
Options may be set by specifying -@var{option} @var{value} in the
|
|
||||||
FFmpeg tools, or by setting the value explicitly in the
|
|
||||||
@code{AVFormatContext} options or using the @file{libavutil/opt.h} API
|
|
||||||
for programmatic use.
|
|
||||||
|
|
||||||
The list of supported options follows:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item avioflags @var{flags} (@emph{input/output})
|
|
||||||
Possible values:
|
|
||||||
@table @samp
|
|
||||||
@item direct
|
|
||||||
Reduce buffering.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item probesize @var{integer} (@emph{input})
|
|
||||||
Set probing size in bytes, i.e. the size of the data to analyze to get
|
|
||||||
stream information. A higher value will allow to detect more
|
|
||||||
information in case it is dispersed into the stream, but will increase
|
|
||||||
latency. Must be an integer not lesser than 32. It is 5000000 by default.
|
|
||||||
|
|
||||||
@item packetsize @var{integer} (@emph{output})
|
|
||||||
Set packet size.
|
|
||||||
|
|
||||||
@item fflags @var{flags} (@emph{input/output})
|
|
||||||
Set format flags.
|
|
||||||
|
|
||||||
Possible values:
|
|
||||||
@table @samp
|
|
||||||
@item ignidx
|
|
||||||
Ignore index.
|
|
||||||
@item genpts
|
|
||||||
Generate PTS.
|
|
||||||
@item nofillin
|
|
||||||
Do not fill in missing values that can be exactly calculated.
|
|
||||||
@item noparse
|
|
||||||
Disable AVParsers, this needs @code{+nofillin} too.
|
|
||||||
@item igndts
|
|
||||||
Ignore DTS.
|
|
||||||
@item discardcorrupt
|
|
||||||
Discard corrupted frames.
|
|
||||||
@item sortdts
|
|
||||||
Try to interleave output packets by DTS.
|
|
||||||
@item keepside
|
|
||||||
Do not merge side data.
|
|
||||||
@item latm
|
|
||||||
Enable RTP MP4A-LATM payload.
|
|
||||||
@item nobuffer
|
|
||||||
Reduce the latency introduced by optional buffering
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item seek2any @var{integer} (@emph{input})
|
|
||||||
Allow seeking to non-keyframes on demuxer level when supported if set to 1.
|
|
||||||
Default is 0.
|
|
||||||
|
|
||||||
@item analyzeduration @var{integer} (@emph{input})
|
|
||||||
Specify how many microseconds are analyzed to probe the input. A
|
|
||||||
higher value will allow to detect more accurate information, but will
|
|
||||||
increase latency. It defaults to 5,000,000 microseconds = 5 seconds.
|
|
||||||
|
|
||||||
@item cryptokey @var{hexadecimal string} (@emph{input})
|
|
||||||
Set decryption key.
|
|
||||||
|
|
||||||
@item indexmem @var{integer} (@emph{input})
|
|
||||||
Set max memory used for timestamp index (per stream).
|
|
||||||
|
|
||||||
@item rtbufsize @var{integer} (@emph{input})
|
|
||||||
Set max memory used for buffering real-time frames.
|
|
||||||
|
|
||||||
@item fdebug @var{flags} (@emph{input/output})
|
|
||||||
Print specific debug info.
|
|
||||||
|
|
||||||
Possible values:
|
|
||||||
@table @samp
|
|
||||||
@item ts
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item max_delay @var{integer} (@emph{input/output})
|
|
||||||
Set maximum muxing or demuxing delay in microseconds.
|
|
||||||
|
|
||||||
@item fpsprobesize @var{integer} (@emph{input})
|
|
||||||
Set number of frames used to probe fps.
|
|
||||||
|
|
||||||
@item audio_preload @var{integer} (@emph{output})
|
|
||||||
Set microseconds by which audio packets should be interleaved earlier.
|
|
||||||
|
|
||||||
@item chunk_duration @var{integer} (@emph{output})
|
|
||||||
Set microseconds for each chunk.
|
|
||||||
|
|
||||||
@item chunk_size @var{integer} (@emph{output})
|
|
||||||
Set size in bytes for each chunk.
|
|
||||||
|
|
||||||
@item err_detect, f_err_detect @var{flags} (@emph{input})
|
|
||||||
Set error detection flags. @code{f_err_detect} is deprecated and
|
|
||||||
should be used only via the @command{ffmpeg} tool.
|
|
||||||
|
|
||||||
Possible values:
|
|
||||||
@table @samp
|
|
||||||
@item crccheck
|
|
||||||
Verify embedded CRCs.
|
|
||||||
@item bitstream
|
|
||||||
Detect bitstream specification deviations.
|
|
||||||
@item buffer
|
|
||||||
Detect improper bitstream length.
|
|
||||||
@item explode
|
|
||||||
Abort decoding on minor error detection.
|
|
||||||
@item careful
|
|
||||||
Consider things that violate the spec and have not been seen in the
|
|
||||||
wild as errors.
|
|
||||||
@item compliant
|
|
||||||
Consider all spec non compliancies as errors.
|
|
||||||
@item aggressive
|
|
||||||
Consider things that a sane encoder should not do as an error.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item use_wallclock_as_timestamps @var{integer} (@emph{input})
|
|
||||||
Use wallclock as timestamps.
|
|
||||||
|
|
||||||
@item avoid_negative_ts @var{integer} (@emph{output})
|
|
||||||
Shift timestamps to make them non-negative. A value of 1 enables shifting,
|
|
||||||
a value of 0 disables it, the default value of -1 enables shifting
|
|
||||||
when required by the target format.
|
|
||||||
|
|
||||||
When shifting is enabled, all output timestamps are shifted by the
|
|
||||||
same amount. Audio, video, and subtitles desynching and relative
|
|
||||||
timestamp differences are preserved compared to how they would have
|
|
||||||
been without shifting.
|
|
||||||
|
|
||||||
Also note that this affects only leading negative timestamps, and not
|
|
||||||
non-monotonic negative timestamps.
|
|
||||||
|
|
||||||
@item skip_initial_bytes @var{integer} (@emph{input})
|
|
||||||
Set number of bytes to skip before reading header and frames if set to 1.
|
|
||||||
Default is 0.
|
|
||||||
|
|
||||||
@item correct_ts_overflow @var{integer} (@emph{input})
|
|
||||||
Correct single timestamp overflows if set to 1. Default is 1.
|
|
||||||
|
|
||||||
@item flush_packets @var{integer} (@emph{output})
|
|
||||||
Flush the underlying I/O stream after each packet. Default 1 enables it, and
|
|
||||||
has the effect of reducing the latency; 0 disables it and may slightly
|
|
||||||
increase performance in some cases.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@c man end FORMAT OPTIONS
|
|
||||||
|
|
||||||
@anchor{Format stream specifiers}
|
|
||||||
@section Format stream specifiers
|
|
||||||
|
|
||||||
Format stream specifiers allow selection of one or more streams that
|
|
||||||
match specific properties.
|
|
||||||
|
|
||||||
Possible forms of stream specifiers are:
|
|
||||||
@table @option
|
|
||||||
@item @var{stream_index}
|
|
||||||
Matches the stream with this index.
|
|
||||||
|
|
||||||
@item @var{stream_type}[:@var{stream_index}]
|
|
||||||
@var{stream_type} is one of following: 'v' for video, 'a' for audio,
|
|
||||||
's' for subtitle, 'd' for data, and 't' for attachments. If
|
|
||||||
@var{stream_index} is given, then it matches the stream number
|
|
||||||
@var{stream_index} of this type. Otherwise, it matches all streams of
|
|
||||||
this type.
|
|
||||||
|
|
||||||
@item p:@var{program_id}[:@var{stream_index}]
|
|
||||||
If @var{stream_index} is given, then it matches the stream with number
|
|
||||||
@var{stream_index} in the program with the id
|
|
||||||
@var{program_id}. Otherwise, it matches all streams in the program.
|
|
||||||
|
|
||||||
@item #@var{stream_id}
|
|
||||||
Matches the stream by a format-specific ID.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
The exact semantics of stream specifiers is defined by the
|
|
||||||
@code{avformat_match_stream_specifier()} function declared in the
|
|
||||||
@file{libavformat/avformat.h} header.
|
|
||||||
|
|
||||||
@include demuxers.texi
|
|
||||||
@include muxers.texi
|
|
||||||
@include metadata.texi
|
|
||||||
+14
-50
@@ -94,20 +94,12 @@ Then pass @code{--enable-libtwolame} to configure to enable it.
|
|||||||
|
|
||||||
@section libvpx
|
@section libvpx
|
||||||
|
|
||||||
FFmpeg can make use of the libvpx library for VP8/VP9 encoding.
|
FFmpeg can make use of the libvpx library for VP8 encoding.
|
||||||
|
|
||||||
Go to @url{http://www.webmproject.org/} and follow the instructions for
|
Go to @url{http://www.webmproject.org/} and follow the instructions for
|
||||||
installing the library. Then pass @code{--enable-libvpx} to configure to
|
installing the library. Then pass @code{--enable-libvpx} to configure to
|
||||||
enable it.
|
enable it.
|
||||||
|
|
||||||
@section libwavpack
|
|
||||||
|
|
||||||
FFmpeg can make use of the libwavpack library for WavPack encoding.
|
|
||||||
|
|
||||||
Go to @url{http://www.wavpack.com/} and follow the instructions for
|
|
||||||
installing the library. Then pass @code{--enable-libwavpack} to configure to
|
|
||||||
enable it.
|
|
||||||
|
|
||||||
@section x264
|
@section x264
|
||||||
|
|
||||||
FFmpeg can make use of the x264 library for H.264 encoding.
|
FFmpeg can make use of the x264 library for H.264 encoding.
|
||||||
@@ -133,20 +125,6 @@ Go to @url{https://github.com/dekkers/libilbc} and follow the instructions for
|
|||||||
installing the library. Then pass @code{--enable-libilbc} to configure to
|
installing the library. Then pass @code{--enable-libilbc} to configure to
|
||||||
enable it.
|
enable it.
|
||||||
|
|
||||||
@section libzvbi
|
|
||||||
|
|
||||||
libzvbi is a VBI decoding library which can be used by FFmpeg to decode DVB
|
|
||||||
teletext pages and DVB teletext subtitles.
|
|
||||||
|
|
||||||
Go to @url{http://sourceforge.net/projects/zapping/} and follow the instructions for
|
|
||||||
installing the library. Then pass @code{--enable-libzvbi} to configure to
|
|
||||||
enable it.
|
|
||||||
|
|
||||||
@float NOTE
|
|
||||||
libzvbi is licensed under the GNU General 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, Codecs or Features
|
@chapter Supported File Formats, Codecs or Features
|
||||||
@@ -174,15 +152,13 @@ library:
|
|||||||
@tab Multimedia format used in game Heart Of Darkness.
|
@tab Multimedia format used in game Heart Of Darkness.
|
||||||
@item Apple HTTP Live Streaming @tab @tab X
|
@item Apple HTTP Live Streaming @tab @tab X
|
||||||
@item Artworx Data Format @tab @tab X
|
@item Artworx Data Format @tab @tab X
|
||||||
@item ADP @tab @tab X
|
|
||||||
@tab Audio format used on the Nintendo Gamecube.
|
|
||||||
@item AFC @tab @tab X
|
@item AFC @tab @tab X
|
||||||
@tab Audio format used on the Nintendo Gamecube.
|
@tab Audio format used on the Nintendo Gamecube.
|
||||||
@item ASF @tab X @tab X
|
@item ASF @tab X @tab X
|
||||||
@item AST @tab X @tab X
|
@item AST @tab X @tab X
|
||||||
@tab Audio format used on the Nintendo Wii.
|
@tab Audio format used on the Nintendo Wii.
|
||||||
@item AVI @tab X @tab X
|
@item AVI @tab X @tab X
|
||||||
@item AviSynth @tab @tab X
|
@item AVISynth @tab @tab X
|
||||||
@item AVR @tab @tab X
|
@item AVR @tab @tab X
|
||||||
@tab Audio format used on Mac.
|
@tab Audio format used on Mac.
|
||||||
@item AVS @tab @tab X
|
@item AVS @tab @tab X
|
||||||
@@ -351,7 +327,7 @@ library:
|
|||||||
@item raw Shorten @tab @tab X
|
@item raw Shorten @tab @tab X
|
||||||
@item raw TAK @tab @tab X
|
@item raw TAK @tab @tab X
|
||||||
@item raw TrueHD @tab X @tab X
|
@item raw TrueHD @tab X @tab X
|
||||||
@item raw VC-1 @tab X @tab X
|
@item raw VC-1 @tab @tab X
|
||||||
@item raw PCM A-law @tab X @tab X
|
@item raw PCM A-law @tab X @tab X
|
||||||
@item raw PCM mu-law @tab X @tab X
|
@item raw PCM mu-law @tab X @tab X
|
||||||
@item raw PCM signed 8 bit @tab X @tab X
|
@item raw PCM signed 8 bit @tab X @tab X
|
||||||
@@ -377,13 +353,11 @@ library:
|
|||||||
@tab File format used by RED Digital cameras, contains JPEG 2000 frames and PCM audio.
|
@tab File format used by RED Digital cameras, contains JPEG 2000 frames and PCM audio.
|
||||||
@item RealMedia @tab X @tab X
|
@item RealMedia @tab X @tab X
|
||||||
@item Redirector @tab @tab X
|
@item Redirector @tab @tab X
|
||||||
@item RedSpark @tab @tab X
|
|
||||||
@item Renderware TeXture Dictionary @tab @tab X
|
@item Renderware TeXture Dictionary @tab @tab X
|
||||||
@item RL2 @tab @tab X
|
@item RL2 @tab @tab X
|
||||||
@tab Audio and video format used in some games by Entertainment Software Partners.
|
@tab Audio and video format used in some games by Entertainment Software Partners.
|
||||||
@item RPL/ARMovie @tab @tab X
|
@item RPL/ARMovie @tab @tab X
|
||||||
@item Lego Mindstorms RSO @tab X @tab X
|
@item Lego Mindstorms RSO @tab X @tab X
|
||||||
@item RSD @tab @tab X
|
|
||||||
@item RTMP @tab X @tab X
|
@item RTMP @tab X @tab X
|
||||||
@tab Output is performed by publishing stream to RTMP server
|
@tab Output is performed by publishing stream to RTMP server
|
||||||
@item RTP @tab X @tab X
|
@item RTP @tab X @tab X
|
||||||
@@ -449,6 +423,7 @@ following image formats are supported:
|
|||||||
@item .Y.U.V @tab X @tab X
|
@item .Y.U.V @tab X @tab X
|
||||||
@tab one raw file per component
|
@tab one raw file per component
|
||||||
@item animated GIF @tab X @tab X
|
@item animated GIF @tab X @tab X
|
||||||
|
@tab Only uncompressed GIFs are generated.
|
||||||
@item BMP @tab X @tab X
|
@item BMP @tab X @tab X
|
||||||
@tab Microsoft BMP image
|
@tab Microsoft BMP image
|
||||||
@item PIX @tab @tab X
|
@item PIX @tab @tab X
|
||||||
@@ -488,8 +463,6 @@ following image formats are supported:
|
|||||||
@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 WebP @tab @tab X
|
|
||||||
@tab WebP image format
|
|
||||||
@item XBM @tab X @tab X
|
@item XBM @tab X @tab X
|
||||||
@tab X BitMap image format
|
@tab X BitMap image format
|
||||||
@item XFace @tab X @tab X
|
@item XFace @tab X @tab X
|
||||||
@@ -517,7 +490,6 @@ following image formats are supported:
|
|||||||
@item AMV Video @tab X @tab X
|
@item AMV Video @tab X @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 Intermediate Codec @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 ProRes @tab X @tab X
|
||||||
@item Apple QuickDraw @tab @tab X
|
@item Apple QuickDraw @tab @tab X
|
||||||
@@ -600,13 +572,12 @@ following image formats are supported:
|
|||||||
@tab Sorenson H.263 used in Flash
|
@tab Sorenson H.263 used in Flash
|
||||||
@item Forward Uncompressed @tab @tab X
|
@item Forward Uncompressed @tab @tab X
|
||||||
@item Fraps @tab @tab X
|
@item Fraps @tab @tab X
|
||||||
@item Go2Webinar @tab @tab X
|
|
||||||
@tab fourcc: G2M4
|
|
||||||
@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
|
||||||
@item H.263+ / H.263-1998 / H.263 version 2 @tab X @tab X
|
@item H.263+ / H.263-1998 / H.263 version 2 @tab X @tab X
|
||||||
@item H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 @tab E @tab X
|
@item H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 @tab E @tab X
|
||||||
@tab encoding supported through external library libx264
|
@tab encoding supported through external library libx264
|
||||||
|
@item H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration) @tab E @tab X
|
||||||
@item HuffYUV @tab X @tab X
|
@item HuffYUV @tab X @tab X
|
||||||
@item HuffYUV FFmpeg variant @tab X @tab X
|
@item HuffYUV FFmpeg variant @tab X @tab X
|
||||||
@item IBM Ultimotion @tab @tab X
|
@item IBM Ultimotion @tab @tab X
|
||||||
@@ -659,6 +630,7 @@ following image formats are supported:
|
|||||||
@item Motion Pixels video @tab @tab X
|
@item Motion Pixels video @tab @tab X
|
||||||
@item MPEG-1 video @tab X @tab X
|
@item MPEG-1 video @tab X @tab X
|
||||||
@item MPEG-1/2 video XvMC (X-Video Motion Compensation) @tab @tab X
|
@item MPEG-1/2 video XvMC (X-Video Motion Compensation) @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.
|
@tab libxvidcore can be used alternatively for encoding.
|
||||||
@@ -676,8 +648,6 @@ following image formats are supported:
|
|||||||
@tab fourcc: VP60,VP61,VP62
|
@tab fourcc: VP60,VP61,VP62
|
||||||
@item VP8 @tab E @tab X
|
@item VP8 @tab E @tab X
|
||||||
@tab fourcc: VP80, encoding supported through external library libvpx
|
@tab fourcc: VP80, encoding supported through external library libvpx
|
||||||
@item VP9 @tab E @tab X
|
|
||||||
@tab encoding supported through external library libvpx
|
|
||||||
@item Pinnacle TARGA CineWave YUV16 @tab @tab X
|
@item Pinnacle TARGA CineWave YUV16 @tab @tab X
|
||||||
@tab fourcc: Y216
|
@tab fourcc: Y216
|
||||||
@item Prores @tab @tab X
|
@item Prores @tab @tab X
|
||||||
@@ -804,11 +774,9 @@ following image formats are supported:
|
|||||||
@tab Used in some Sega Saturn console games.
|
@tab Used in some Sega Saturn console games.
|
||||||
@item ADPCM IMA Duck DK4 @tab @tab X
|
@item ADPCM IMA Duck DK4 @tab @tab X
|
||||||
@tab Used in some Sega Saturn console games.
|
@tab Used in some Sega Saturn console games.
|
||||||
@item ADPCM IMA Radical @tab @tab X
|
|
||||||
@item ADPCM Microsoft @tab X @tab X
|
@item ADPCM Microsoft @tab X @tab X
|
||||||
@item ADPCM MS IMA @tab X @tab X
|
@item ADPCM MS IMA @tab X @tab X
|
||||||
@item ADPCM Nintendo Gamecube AFC @tab @tab X
|
@item ADPCM Nintendo Gamecube AFC @tab @tab X
|
||||||
@item ADPCM Nintendo Gamecube DTK @tab @tab X
|
|
||||||
@item ADPCM Nintendo Gamecube THP @tab @tab X
|
@item ADPCM Nintendo Gamecube THP @tab @tab X
|
||||||
@item ADPCM QT IMA @tab X @tab X
|
@item ADPCM QT IMA @tab X @tab X
|
||||||
@item ADPCM SEGA CRI ADX @tab X @tab X
|
@item ADPCM SEGA CRI ADX @tab X @tab X
|
||||||
@@ -827,8 +795,8 @@ following image formats are supported:
|
|||||||
@item Amazing Studio PAF Audio @tab @tab X
|
@item Amazing Studio PAF Audio @tab @tab X
|
||||||
@item Apple lossless audio @tab X @tab X
|
@item Apple lossless audio @tab X @tab X
|
||||||
@tab QuickTime fourcc 'alac'
|
@tab QuickTime fourcc 'alac'
|
||||||
@item ATRAC1 @tab @tab X
|
@item Atrac 1 @tab @tab X
|
||||||
@item ATRAC3 @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 @tab @tab E
|
||||||
@@ -868,6 +836,7 @@ following image formats are supported:
|
|||||||
@item MLP (Meridian Lossless Packing) @tab @tab X
|
@item MLP (Meridian Lossless Packing) @tab @tab X
|
||||||
@tab Used in DVD-Audio discs.
|
@tab Used in DVD-Audio discs.
|
||||||
@item Monkey's Audio @tab @tab X
|
@item Monkey's Audio @tab @tab X
|
||||||
|
@tab Only versions 3.97-3.99 are supported.
|
||||||
@item MP1 (MPEG audio layer 1) @tab @tab IX
|
@item MP1 (MPEG audio layer 1) @tab @tab IX
|
||||||
@item MP2 (MPEG audio layer 2) @tab IX @tab IX
|
@item MP2 (MPEG audio layer 2) @tab IX @tab IX
|
||||||
@tab libtwolame can be used alternatively for encoding.
|
@tab libtwolame can be used alternatively for encoding.
|
||||||
@@ -922,7 +891,7 @@ following image formats are supported:
|
|||||||
@item Sierra VMD audio @tab @tab X
|
@item Sierra VMD audio @tab @tab X
|
||||||
@tab Used in Sierra VMD files.
|
@tab Used in Sierra VMD files.
|
||||||
@item Smacker audio @tab @tab X
|
@item Smacker audio @tab @tab X
|
||||||
@item SMPTE 302M AES3 audio @tab X @tab X
|
@item SMPTE 302M AES3 audio @tab @tab X
|
||||||
@item Sonic @tab X @tab X
|
@item Sonic @tab X @tab X
|
||||||
@tab experimental codec
|
@tab experimental codec
|
||||||
@item Sonic lossless @tab X @tab X
|
@item Sonic lossless @tab X @tab X
|
||||||
@@ -930,7 +899,7 @@ following image formats are supported:
|
|||||||
@item Speex @tab E @tab E
|
@item Speex @tab E @tab E
|
||||||
@tab supported through external library libspeex
|
@tab supported through external library libspeex
|
||||||
@item TAK (Tom's lossless Audio Kompressor) @tab @tab X
|
@item TAK (Tom's lossless Audio Kompressor) @tab @tab X
|
||||||
@item True Audio (TTA) @tab X @tab X
|
@item True Audio (TTA) @tab @tab X
|
||||||
@item TrueHD @tab @tab X
|
@item TrueHD @tab @tab X
|
||||||
@tab Used in HD-DVD and Blu-Ray discs.
|
@tab Used in HD-DVD and Blu-Ray discs.
|
||||||
@item TwinVQ (VQF flavor) @tab @tab X
|
@item TwinVQ (VQF flavor) @tab @tab X
|
||||||
@@ -938,9 +907,7 @@ following image formats are supported:
|
|||||||
@tab Used in LucasArts SMUSH animations.
|
@tab Used in LucasArts SMUSH animations.
|
||||||
@item Vorbis @tab E @tab X
|
@item Vorbis @tab E @tab X
|
||||||
@tab A native but very primitive encoder exists.
|
@tab A native but very primitive encoder exists.
|
||||||
@item Voxware MetaSound @tab @tab X
|
@item WavPack @tab @tab X
|
||||||
@tab imperfect and incomplete support
|
|
||||||
@item WavPack @tab X @tab X
|
|
||||||
@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
|
||||||
@@ -963,7 +930,6 @@ performance on systems without hardware floating point support).
|
|||||||
@item 3GPP Timed Text @tab @tab @tab X @tab X
|
@item 3GPP Timed Text @tab @tab @tab X @tab X
|
||||||
@item AQTitle @tab @tab X @tab @tab X
|
@item AQTitle @tab @tab X @tab @tab X
|
||||||
@item DVB @tab X @tab X @tab X @tab X
|
@item DVB @tab X @tab X @tab X @tab X
|
||||||
@item DVB teletext @tab @tab X @tab @tab E
|
|
||||||
@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 JACOsub @tab X @tab X @tab @tab X
|
||||||
@item MicroDVD @tab X @tab X @tab @tab X
|
@item MicroDVD @tab X @tab X @tab @tab X
|
||||||
@@ -980,14 +946,12 @@ performance on systems without hardware floating point support).
|
|||||||
@item TED Talks captions @tab @tab X @tab @tab X
|
@item TED Talks captions @tab @tab X @tab @tab X
|
||||||
@item VobSub (IDX+SUB) @tab @tab X @tab @tab X
|
@item VobSub (IDX+SUB) @tab @tab X @tab @tab X
|
||||||
@item VPlayer @tab @tab X @tab @tab X
|
@item VPlayer @tab @tab X @tab @tab X
|
||||||
@item WebVTT @tab X @tab X @tab @tab X
|
@item WebVTT @tab @tab X @tab @tab X
|
||||||
@item XSUB @tab @tab @tab X @tab X
|
@item XSUB @tab @tab @tab X @tab X
|
||||||
@end multitable
|
@end multitable
|
||||||
|
|
||||||
@code{X} means that the feature is supported.
|
@code{X} means that the feature is supported.
|
||||||
|
|
||||||
@code{E} means that support is provided through an external library.
|
|
||||||
|
|
||||||
@section Network Protocols
|
@section Network Protocols
|
||||||
|
|
||||||
@multitable @columnfractions .4 .1
|
@multitable @columnfractions .4 .1
|
||||||
@@ -1035,7 +999,7 @@ performance on systems without hardware floating point support).
|
|||||||
@item OSS @tab X @tab X
|
@item OSS @tab X @tab X
|
||||||
@item Pulseaudio @tab X @tab
|
@item Pulseaudio @tab X @tab
|
||||||
@item SDL @tab @tab X
|
@item SDL @tab @tab X
|
||||||
@item Video4Linux2 @tab X @tab X
|
@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
|
||||||
@end multitable
|
@end multitable
|
||||||
|
|||||||
+84
-50
@@ -86,7 +86,7 @@ fail to open.
|
|||||||
Set the video size in the captured video.
|
Set the video size in the captured video.
|
||||||
|
|
||||||
@item framerate
|
@item framerate
|
||||||
Set the frame rate in the captured video.
|
Set the framerate in the captured video.
|
||||||
|
|
||||||
@item sample_rate
|
@item sample_rate
|
||||||
Set the sample rate (in Hz) of the captured audio.
|
Set the sample rate (in Hz) of the captured audio.
|
||||||
@@ -485,52 +485,87 @@ For more information about OSS see:
|
|||||||
|
|
||||||
@section pulse
|
@section pulse
|
||||||
|
|
||||||
PulseAudio input device.
|
pulseaudio input device.
|
||||||
|
|
||||||
To enable this output device you need to configure FFmpeg with @code{--enable-libpulse}.
|
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
|
The filename to provide to the input device is a source device or the
|
||||||
string "default"
|
string "default"
|
||||||
|
|
||||||
To list the PulseAudio source devices and their properties you can invoke
|
To list the pulse source devices and their properties you can invoke
|
||||||
the command @command{pactl list sources}.
|
the command @command{pactl list sources}.
|
||||||
|
|
||||||
More information about PulseAudio can be found on @url{http://www.pulseaudio.org}.
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
@table @option
|
|
||||||
@item server
|
|
||||||
Connect to a specific PulseAudio server, specified by an IP address.
|
|
||||||
Default server is used when not provided.
|
|
||||||
|
|
||||||
@item name
|
|
||||||
Specify the application name PulseAudio will use when showing active clients,
|
|
||||||
by default it is the @code{LIBAVFORMAT_IDENT} string.
|
|
||||||
|
|
||||||
@item stream_name
|
|
||||||
Specify the stream name PulseAudio will use when showing active streams,
|
|
||||||
by default it is "record".
|
|
||||||
|
|
||||||
@item sample_rate
|
|
||||||
Specify the samplerate in Hz, by default 48kHz is used.
|
|
||||||
|
|
||||||
@item channels
|
|
||||||
Specify the channels in use, by default 2 (stereo) is set.
|
|
||||||
|
|
||||||
@item frame_size
|
|
||||||
Specify the number of bytes per frame, by default it is set to 1024.
|
|
||||||
|
|
||||||
@item fragment_size
|
|
||||||
Specify the minimal buffering fragment in PulseAudio, it will affect the
|
|
||||||
audio latency. By default it is unset.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@subsection Examples
|
|
||||||
Record a stream from default device:
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -f pulse -i default /tmp/pulse.wav
|
ffmpeg -f pulse -i default /tmp/pulse.wav
|
||||||
@end example
|
@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.
|
||||||
@@ -555,8 +590,8 @@ Video4Linux2 input video device.
|
|||||||
"v4l2" can be used as alias for "video4linux2".
|
"v4l2" can be used as alias for "video4linux2".
|
||||||
|
|
||||||
If FFmpeg is built with v4l-utils support (by using the
|
If FFmpeg is built with v4l-utils support (by using the
|
||||||
@code{--enable-libv4l2} configure option), it is possible to use it with the
|
@code{--enable-libv4l2} configure option), the device will always rely
|
||||||
@code{-use_libv4l2} input device option.
|
on libv4l2.
|
||||||
|
|
||||||
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
|
||||||
@@ -565,7 +600,7 @@ 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
|
Video4Linux2 devices usually support a limited set of
|
||||||
@var{width}x@var{height} sizes and frame rates. 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 using @command{-list_formats all} for Video4Linux2 devices.
|
||||||
Some devices, like TV cards, support one or more standards. It is possible
|
Some devices, like TV cards, support one or more standards. It is possible
|
||||||
to list all the supported standards using @command{-list_standards all}.
|
to list all the supported standards using @command{-list_standards all}.
|
||||||
@@ -588,7 +623,7 @@ ffplay -f video4linux2 -framerate 30 -video_size hd720 /dev/video0
|
|||||||
|
|
||||||
@item
|
@item
|
||||||
Grab and record the input of a video4linux2 device, leave the
|
Grab and record the input of a video4linux2 device, leave the
|
||||||
frame rate and size as previously set:
|
framerate and size as previously set:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
|
ffmpeg -f video4linux2 -input_format mjpeg -i /dev/video0 out.mpeg
|
||||||
@end example
|
@end example
|
||||||
@@ -605,8 +640,7 @@ list of the supported standards, use the @option{list_standards}
|
|||||||
option.
|
option.
|
||||||
|
|
||||||
@item channel
|
@item channel
|
||||||
Set the input channel number. Default to -1, which means using the
|
Set the input channel number. Default to 0.
|
||||||
previously selected channel.
|
|
||||||
|
|
||||||
@item video_size
|
@item video_size
|
||||||
Set the video frame size. The argument must be a string in the form
|
Set the video frame size. The argument must be a string in the form
|
||||||
@@ -621,7 +655,7 @@ This option allows to select the input format, when several are
|
|||||||
available.
|
available.
|
||||||
|
|
||||||
@item framerate
|
@item framerate
|
||||||
Set the preferred video frame rate.
|
Set the preferred video framerate.
|
||||||
|
|
||||||
@item list_formats
|
@item list_formats
|
||||||
List available formats (supported pixel formats, codecs, and frame
|
List available formats (supported pixel formats, codecs, and frame
|
||||||
@@ -701,12 +735,12 @@ 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 @command{ffmpeg}:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0 out.mpg
|
ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
Grab at position @code{10,20}:
|
Grab at position @code{10,20}:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f x11grab -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
|
ffmpeg -f x11grab -r 25 -s cif -i :0.0+10,20 out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@subsection Options
|
@subsection Options
|
||||||
@@ -727,17 +761,17 @@ zero) to the edge of region.
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f x11grab -follow_mouse centered -framerate 25 -video_size cif -i :0.0 out.mpg
|
ffmpeg -f x11grab -follow_mouse centered -r 25 -s cif -i :0.0 out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
To follow only when the mouse pointer reaches within 100 pixels to edge:
|
To follow only when the mouse pointer reaches within 100 pixels to edge:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f x11grab -follow_mouse 100 -framerate 25 -video_size cif -i :0.0 out.mpg
|
ffmpeg -f x11grab -follow_mouse 100 -r 25 -s cif -i :0.0 out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item framerate
|
@item framerate
|
||||||
Set the grabbing frame rate. Default value is @code{ntsc},
|
Set the grabbing frame rate. Default value is @code{ntsc},
|
||||||
corresponding to a frame rate of @code{30000/1001}.
|
corresponding to a framerate of @code{30000/1001}.
|
||||||
|
|
||||||
@item show_region
|
@item show_region
|
||||||
Show grabbed region on screen.
|
Show grabbed region on screen.
|
||||||
@@ -748,12 +782,12 @@ know what is being grabbed if only a portion of the screen is grabbed.
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f x11grab -show_region 1 -framerate 25 -video_size cif -i :0.0+10,20 out.mpg
|
ffmpeg -f x11grab -show_region 1 -r 25 -s cif -i :0.0+10,20 out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
With @var{follow_mouse}:
|
With @var{follow_mouse}:
|
||||||
@example
|
@example
|
||||||
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -framerate 25 -video_size cif -i :0.0 out.mpg
|
ffmpeg -f x11grab -follow_mouse centered -show_region 1 -r 25 -s cif -i :0.0 out.mpg
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item video_size
|
@item video_size
|
||||||
|
|||||||
+39
-20
@@ -1,4 +1,4 @@
|
|||||||
FFmpeg's bug/feature request tracker manual
|
FFmpeg's bug/patch/feature request tracker manual
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
NOTE: This is a draft.
|
NOTE: This is a draft.
|
||||||
@@ -11,7 +11,7 @@ existing issues can be done through a web interface.
|
|||||||
|
|
||||||
Issues can be different kinds of things we want to keep track of
|
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
|
but that do not belong into the source tree itself. This includes
|
||||||
bug reports, feature requests and license violations. We
|
bug reports, patches, feature requests and license violations. We
|
||||||
might add more items to this list in the future, so feel free to
|
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
|
propose a new `type of issue' on the ffmpeg-devel mailing list if
|
||||||
you feel it is worth tracking.
|
you feel it is worth tracking.
|
||||||
@@ -28,9 +28,6 @@ http(s)://trac.ffmpeg.org
|
|||||||
|
|
||||||
Type:
|
Type:
|
||||||
-----
|
-----
|
||||||
art
|
|
||||||
Artwork such as photos, music, banners, and logos.
|
|
||||||
|
|
||||||
bug / defect
|
bug / defect
|
||||||
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.
|
||||||
@@ -44,18 +41,20 @@ feature request / enhancement
|
|||||||
license violation
|
license violation
|
||||||
ticket to keep track of (L)GPL violations of ffmpeg by others
|
ticket to keep track of (L)GPL violations of ffmpeg by others
|
||||||
|
|
||||||
sponsoring request
|
patch
|
||||||
Developer requests for hardware, software, specifications, money,
|
A patch as generated by diff which conforms to the patch submission and
|
||||||
refunds, etc.
|
development policy.
|
||||||
|
|
||||||
|
|
||||||
Priority:
|
Priority:
|
||||||
---------
|
---------
|
||||||
critical
|
critical
|
||||||
Bugs about data loss and security issues.
|
Bugs and patches which deal with data loss and security issues.
|
||||||
No feature request can be critical.
|
No feature request can be critical.
|
||||||
|
|
||||||
important
|
important
|
||||||
Bugs which make FFmpeg unusable for a significant number of users.
|
Bugs which make FFmpeg unusable for a significant number of users, and
|
||||||
|
patches fixing them.
|
||||||
Examples here might be completely broken MPEG-4 decoding or a build issue
|
Examples here might be completely broken MPEG-4 decoding or a build issue
|
||||||
on Linux.
|
on Linux.
|
||||||
While broken 4xm decoding or a broken OS/2 build would not be important,
|
While broken 4xm decoding or a broken OS/2 build would not be important,
|
||||||
@@ -69,7 +68,7 @@ normal
|
|||||||
|
|
||||||
|
|
||||||
minor
|
minor
|
||||||
Bugs about things like spelling errors, "mp2" instead of
|
Bugs and patches about things like spelling errors, "mp2" instead of
|
||||||
"mp3" being shown and such.
|
"mp3" being shown and such.
|
||||||
Feature requests about things few people want or which do not make a big
|
Feature requests about things few people want or which do not make a big
|
||||||
difference.
|
difference.
|
||||||
@@ -104,13 +103,13 @@ This state implicates that the bug either has been reproduced or that
|
|||||||
reproduction is not needed as the bug is already understood.
|
reproduction is not needed as the bug is already understood.
|
||||||
|
|
||||||
|
|
||||||
Type/Status:
|
Type/Status/Substatus:
|
||||||
----------
|
----------
|
||||||
*/new
|
*/new/new
|
||||||
Initial state of new bugs and feature requests submitted by
|
Initial state of new bugs, patches and feature requests submitted by
|
||||||
users.
|
users.
|
||||||
|
|
||||||
*/open
|
*/open/open
|
||||||
Issues which have been briefly looked at and which did not look outright
|
Issues which have been briefly looked at and which did not look outright
|
||||||
invalid.
|
invalid.
|
||||||
This implicates that no real more detailed state applies yet. Conversely,
|
This implicates that no real more detailed state applies yet. Conversely,
|
||||||
@@ -118,7 +117,9 @@ Type/Status:
|
|||||||
looked at.
|
looked at.
|
||||||
|
|
||||||
*/closed/duplicate
|
*/closed/duplicate
|
||||||
Bugs or feature requests which are duplicates.
|
Bugs, patches or feature requests which are duplicates.
|
||||||
|
Note that patches dealing with the same thing in a different way are not
|
||||||
|
duplicates.
|
||||||
Note, if you mark something as duplicate, do not forget setting the
|
Note, if you mark something as duplicate, do not forget setting the
|
||||||
superseder so bug reports are properly linked.
|
superseder so bug reports are properly linked.
|
||||||
|
|
||||||
@@ -133,7 +134,7 @@ Type/Status:
|
|||||||
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.
|
||||||
|
|
||||||
bug/closed/wontfix
|
bug/closed/wont_fix
|
||||||
Bugs which we will not fix. Possible reasons include legality, high
|
Bugs which we will not fix. Possible reasons include legality, high
|
||||||
complexity for the sake of supporting obscure corner cases, speed loss
|
complexity for the sake of supporting obscure corner cases, speed loss
|
||||||
for similarly esoteric purposes, et cetera.
|
for similarly esoteric purposes, et cetera.
|
||||||
@@ -147,15 +148,33 @@ bug/closed/works_for_me
|
|||||||
reproduction failed - that is the code seems to work correctly to the
|
reproduction failed - that is the code seems to work correctly to the
|
||||||
best of our knowledge.
|
best of our knowledge.
|
||||||
|
|
||||||
feature_request/closed/fixed
|
patch/open/approved
|
||||||
|
Patches which have been reviewed and approved by a developer.
|
||||||
|
Such patches can be applied anytime by any other developer after some
|
||||||
|
reasonable testing (compile + regression tests + does the patch do
|
||||||
|
what the author claimed).
|
||||||
|
|
||||||
|
patch/open/needs_changes
|
||||||
|
Patches which have been reviewed and need changes to be accepted.
|
||||||
|
|
||||||
|
patch/closed/applied
|
||||||
|
Patches which have been applied.
|
||||||
|
|
||||||
|
patch/closed/rejected
|
||||||
|
Patches which have been rejected.
|
||||||
|
|
||||||
|
feature_request/closed/implemented
|
||||||
Feature requests which have been implemented.
|
Feature requests which have been implemented.
|
||||||
|
|
||||||
feature_request/closed/wontfix
|
feature_request/closed/wont_implement
|
||||||
Feature requests which will not be implemented. The reasons here could
|
Feature requests which will not be implemented. The reasons here could
|
||||||
be legal, philosophical or others.
|
be legal, philosophical or others.
|
||||||
|
|
||||||
|
Note, please do not use type-status-substatus combinations other than the
|
||||||
|
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 resolution.
|
needs_more_info substatus.
|
||||||
|
|
||||||
Component:
|
Component:
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Specifically, this library performs the following conversions:
|
|||||||
@itemize
|
@itemize
|
||||||
@item
|
@item
|
||||||
@emph{Resampling}: is the process of changing the audio rate, for
|
@emph{Resampling}: is the process of changing the audio rate, for
|
||||||
example from a high sample rate of 44100Hz to 8000Hz. Audio
|
example from an high sample rate of 44100Hz to 8000Hz. Audio
|
||||||
conversion from high to low sample rate is a lossy process. Several
|
conversion from high to low sample rate is a lossy process. Several
|
||||||
resampling options and algorithms are available.
|
resampling options and algorithms are available.
|
||||||
|
|
||||||
|
|||||||
@@ -65,20 +65,4 @@ title=chapter \#1
|
|||||||
title=multi\
|
title=multi\
|
||||||
line
|
line
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
By using the ffmetadata muxer and demuxer it is possible to extract
|
|
||||||
metadata from an input file to an ffmetadata file, and then transcode
|
|
||||||
the file into an output file with the edited ffmetadata file.
|
|
||||||
|
|
||||||
Extracting an ffmetadata file with @file{ffmpeg} goes as follows:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -f ffmetadata FFMETADATAFILE
|
|
||||||
@end example
|
|
||||||
|
|
||||||
Reinserting edited metadata information from the FFMETADATAFILE file can
|
|
||||||
be done as:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -i FFMETADATAFILE -map_metadata 1 -codec copy OUTPUT
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@c man end METADATA
|
@c man end METADATA
|
||||||
|
|||||||
@@ -47,14 +47,7 @@ Files that have MIPS copyright notice in them:
|
|||||||
* libavutil/mips/
|
* libavutil/mips/
|
||||||
float_dsp_mips.c
|
float_dsp_mips.c
|
||||||
libm_mips.h
|
libm_mips.h
|
||||||
* libavcodec/
|
|
||||||
fft_fixed_32.c
|
|
||||||
fft_init_table.c
|
|
||||||
fft_table.h
|
|
||||||
mdct_fixed_32.c
|
|
||||||
* libavcodec/mips/
|
* libavcodec/mips/
|
||||||
aaccoder_mips.c
|
|
||||||
aacpsy_mips.h
|
|
||||||
ac3dsp_mips.c
|
ac3dsp_mips.c
|
||||||
acelp_filters_mips.c
|
acelp_filters_mips.c
|
||||||
acelp_vectors_mips.c
|
acelp_vectors_mips.c
|
||||||
@@ -70,6 +63,5 @@ Files that have MIPS copyright notice in them:
|
|||||||
fft_table.h
|
fft_table.h
|
||||||
fft_init_table.c
|
fft_init_table.c
|
||||||
fmtconvert_mips.c
|
fmtconvert_mips.c
|
||||||
iirfilter_mips.c
|
|
||||||
mpegaudiodsp_mips_fixed.c
|
mpegaudiodsp_mips_fixed.c
|
||||||
mpegaudiodsp_mips_float.c
|
mpegaudiodsp_mips_float.c
|
||||||
|
|||||||
@@ -57,11 +57,6 @@ which re-allocates them for other threads.
|
|||||||
Add CODEC_CAP_FRAME_THREADS to the codec capabilities. There will be very little
|
Add CODEC_CAP_FRAME_THREADS to the codec capabilities. There will be very little
|
||||||
speed gain at this point but it should work.
|
speed gain at this point but it should work.
|
||||||
|
|
||||||
If there are inter-frame dependencies, so the codec calls
|
|
||||||
ff_thread_report/await_progress(), set AVCodecInternal.allocate_progress. The
|
|
||||||
frames must then be freed with ff_thread_release_buffer().
|
|
||||||
Otherwise leave it at zero and decode directly into the user-supplied frames.
|
|
||||||
|
|
||||||
Call ff_thread_report_progress() after some part of the current picture has decoded.
|
Call ff_thread_report_progress() after some part of the current picture has decoded.
|
||||||
A good place to put this is where draw_horiz_band() is called - add this if it isn't
|
A good place to put this is where draw_horiz_band() is called - add this if it isn't
|
||||||
called anywhere, as it's useful too and the implementation is trivial when you're
|
called anywhere, as it's useful too and the implementation is trivial when you're
|
||||||
|
|||||||
+127
-224
@@ -260,13 +260,11 @@ ffmpeg -i in.avi -f image2 -frames:v 1 img.jpeg
|
|||||||
@table @option
|
@table @option
|
||||||
@item start_number @var{number}
|
@item start_number @var{number}
|
||||||
Start the sequence from @var{number}. Default value is 1. Must be a
|
Start the sequence from @var{number}. Default value is 1. Must be a
|
||||||
non-negative number.
|
positive number.
|
||||||
|
|
||||||
@item -update @var{number}
|
|
||||||
If @var{number} is nonzero, the filename will always be interpreted as just a
|
|
||||||
filename, not a pattern, and this file will be continuously overwritten with new
|
|
||||||
images.
|
|
||||||
|
|
||||||
|
@item updatefirst 1|0
|
||||||
|
If set to 1, update the first written image file again and
|
||||||
|
again. Default value is 0.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
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
|
||||||
@@ -275,90 +273,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.
|
||||||
|
|
||||||
@section matroska
|
|
||||||
|
|
||||||
Matroska container muxer.
|
|
||||||
|
|
||||||
This muxer implements the matroska and webm container specs.
|
|
||||||
|
|
||||||
The recognized metadata settings in this muxer are:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item title=@var{title name}
|
|
||||||
Name provided to a single track
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item language=@var{language name}
|
|
||||||
Specifies the language of the track in the Matroska languages form
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item stereo_mode=@var{mode}
|
|
||||||
Stereo 3D video layout of two views in a single video track
|
|
||||||
@table @option
|
|
||||||
@item mono
|
|
||||||
video is not stereo
|
|
||||||
@item left_right
|
|
||||||
Both views are arranged side by side, Left-eye view is on the left
|
|
||||||
@item bottom_top
|
|
||||||
Both views are arranged in top-bottom orientation, Left-eye view is at bottom
|
|
||||||
@item top_bottom
|
|
||||||
Both views are arranged in top-bottom orientation, Left-eye view is on top
|
|
||||||
@item checkerboard_rl
|
|
||||||
Each view is arranged in a checkerboard interleaved pattern, Left-eye view being first
|
|
||||||
@item checkerboard_lr
|
|
||||||
Each view is arranged in a checkerboard interleaved pattern, Right-eye view being first
|
|
||||||
@item row_interleaved_rl
|
|
||||||
Each view is constituted by a row based interleaving, Right-eye view is first row
|
|
||||||
@item row_interleaved_lr
|
|
||||||
Each view is constituted by a row based interleaving, Left-eye view is first row
|
|
||||||
@item col_interleaved_rl
|
|
||||||
Both views are arranged in a column based interleaving manner, Right-eye view is first column
|
|
||||||
@item col_interleaved_lr
|
|
||||||
Both views are arranged in a column based interleaving manner, Left-eye view is first column
|
|
||||||
@item anaglyph_cyan_red
|
|
||||||
All frames are in anaglyph format viewable through red-cyan filters
|
|
||||||
@item right_left
|
|
||||||
Both views are arranged side by side, Right-eye view is on the left
|
|
||||||
@item anaglyph_green_magenta
|
|
||||||
All frames are in anaglyph format viewable through green-magenta filters
|
|
||||||
@item block_lr
|
|
||||||
Both eyes laced in one Block, Left-eye view is first
|
|
||||||
@item block_rl
|
|
||||||
Both eyes laced in one Block, Right-eye view is first
|
|
||||||
@end table
|
|
||||||
@end table
|
|
||||||
|
|
||||||
For example a 3D WebM clip can be created using the following command line:
|
|
||||||
@example
|
|
||||||
ffmpeg -i sample_left_right_clip.mpg -an -c:v libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
|
|
||||||
@end example
|
|
||||||
|
|
||||||
This muxer supports the following options:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item reserve_index_space
|
|
||||||
By default, this muxer writes the index for seeking (called cues in Matroska
|
|
||||||
terms) at the end of the file, because it cannot know in advance how much space
|
|
||||||
to leave for the index at the beginning of the file. However for some use cases
|
|
||||||
-- e.g. streaming where seeking is possible but slow -- it is useful to put the
|
|
||||||
index at the beginning of the file.
|
|
||||||
|
|
||||||
If this option is set to a non-zero value, the muxer will reserve a given amount
|
|
||||||
of space in the file header and then try to write the cues there when the muxing
|
|
||||||
finishes. If the available space does not suffice, muxing will fail. A safe size
|
|
||||||
for most use cases should be about 50kB per hour of video.
|
|
||||||
|
|
||||||
Note that cues are only written if the output is seekable and this option will
|
|
||||||
have no effect if it is not.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@anchor{md5}
|
@anchor{md5}
|
||||||
@section md5
|
@section md5
|
||||||
|
|
||||||
@@ -451,8 +365,8 @@ pair for each track, making it easier to separate tracks.
|
|||||||
|
|
||||||
This option is implicitly set when writing ismv (Smooth Streaming) files.
|
This option is implicitly set when writing ismv (Smooth Streaming) files.
|
||||||
@item -movflags faststart
|
@item -movflags faststart
|
||||||
Run a second pass moving the index (moov atom) to the beginning of the file.
|
Run a second pass moving the moov atom on top of the file. This
|
||||||
This operation can take a while, and will not work in various situations such
|
operation can take a while, and will not work in various situations such
|
||||||
as fragmented output, thus it is not enabled by default.
|
as fragmented output, thus it is not enabled by default.
|
||||||
@item -movflags rtphint
|
@item -movflags rtphint
|
||||||
Add RTP hinting tracks to the output file.
|
Add RTP hinting tracks to the output file.
|
||||||
@@ -464,42 +378,6 @@ point on IIS with this muxer. Example:
|
|||||||
ffmpeg -re @var{<normal input/transcoding options>} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1)
|
ffmpeg -re @var{<normal input/transcoding options>} -movflags isml+frag_keyframe -f ismv http://server/publishingpoint.isml/Streams(Encoder1)
|
||||||
@end example
|
@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
|
|
||||||
|
|
||||||
To attach a picture to an mp3 file select both the audio and the picture stream
|
|
||||||
with @code{map}:
|
|
||||||
@example
|
|
||||||
ffmpeg -i input.mp3 -i cover.png -c copy -map 0 -map 1
|
|
||||||
-metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section mpegts
|
@section mpegts
|
||||||
|
|
||||||
MPEG transport stream muxer.
|
MPEG transport stream muxer.
|
||||||
@@ -522,40 +400,6 @@ Set the service_id (default 0x0001) also known as program in DVB.
|
|||||||
Set the first PID for PMT (default 0x1000, max 0x1f00).
|
Set the first PID for PMT (default 0x1000, max 0x1f00).
|
||||||
@item -mpegts_start_pid @var{number}
|
@item -mpegts_start_pid @var{number}
|
||||||
Set the first PID for data packets (default 0x0100, max 0x0f00).
|
Set the first PID for data packets (default 0x0100, max 0x0f00).
|
||||||
@item -mpegts_m2ts_mode @var{number}
|
|
||||||
Enable m2ts mode if set to 1. Default value is -1 which disables m2ts mode.
|
|
||||||
@item -muxrate @var{number}
|
|
||||||
Set muxrate.
|
|
||||||
@item -pes_payload_size @var{number}
|
|
||||||
Set minimum PES packet payload in bytes.
|
|
||||||
@item -mpegts_flags @var{flags}
|
|
||||||
Set flags (see below).
|
|
||||||
@item -mpegts_copyts @var{number}
|
|
||||||
Preserve original timestamps, if value is set to 1. Default value is -1, which
|
|
||||||
results in shifting timestamps so that they start from 0.
|
|
||||||
@item -tables_version @var{number}
|
|
||||||
Set PAT, PMT and SDT version (default 0, valid values are from 0 to 31, inclusively).
|
|
||||||
This option allows updating stream structure so that standard consumer may
|
|
||||||
detect the change. To do so, reopen output AVFormatContext (in case of API
|
|
||||||
usage) or restart ffmpeg instance, cyclically changing tables_version value:
|
|
||||||
@example
|
|
||||||
ffmpeg -i source1.ts -codec copy -f mpegts -tables_version 0 udp://1.1.1.1:1111
|
|
||||||
ffmpeg -i source2.ts -codec copy -f mpegts -tables_version 1 udp://1.1.1.1:1111
|
|
||||||
...
|
|
||||||
ffmpeg -i source3.ts -codec copy -f mpegts -tables_version 31 udp://1.1.1.1:1111
|
|
||||||
ffmpeg -i source1.ts -codec copy -f mpegts -tables_version 0 udp://1.1.1.1:1111
|
|
||||||
ffmpeg -i source2.ts -codec copy -f mpegts -tables_version 1 udp://1.1.1.1:1111
|
|
||||||
...
|
|
||||||
@end example
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Option mpegts_flags may take a set of such flags:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item resend_headers
|
|
||||||
Reemit PAT/PMT before writing the next packet.
|
|
||||||
@item latm
|
|
||||||
Use LATM packetization for AAC.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
The recognized metadata settings in mpegts muxer are @code{service_provider}
|
The recognized metadata settings in mpegts muxer are @code{service_provider}
|
||||||
@@ -597,21 +441,69 @@ Alternatively you can write the command as:
|
|||||||
ffmpeg -benchmark -i INPUT -f null -
|
ffmpeg -benchmark -i INPUT -f null -
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section ogg
|
@section matroska
|
||||||
|
|
||||||
Ogg container muxer.
|
Matroska container muxer.
|
||||||
|
|
||||||
|
This muxer implements the matroska and webm container specs.
|
||||||
|
|
||||||
|
The recognized metadata settings in this muxer are:
|
||||||
|
|
||||||
@table @option
|
@table @option
|
||||||
@item -page_duration @var{duration}
|
|
||||||
Preferred page duration, in microseconds. The muxer will attempt to create
|
@item title=@var{title name}
|
||||||
pages that are approximately @var{duration} microseconds long. This allows the
|
Name provided to a single track
|
||||||
user to compromise between seek granularity and container overhead. The default
|
|
||||||
is 1 second. A value of 0 will fill all segments, making pages as large as
|
|
||||||
possible. A value of 1 will effectively use 1 packet-per-page in most
|
|
||||||
situations, giving a small seek granularity at the cost of additional container
|
|
||||||
overhead.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
|
||||||
|
@item language=@var{language name}
|
||||||
|
Specifies the language of the track in the Matroska languages form
|
||||||
|
@end table
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
|
||||||
|
@item stereo_mode=@var{mode}
|
||||||
|
Stereo 3D video layout of two views in a single video track
|
||||||
|
@table @option
|
||||||
|
@item mono
|
||||||
|
video is not stereo
|
||||||
|
@item left_right
|
||||||
|
Both views are arranged side by side, Left-eye view is on the left
|
||||||
|
@item bottom_top
|
||||||
|
Both views are arranged in top-bottom orientation, Left-eye view is at bottom
|
||||||
|
@item top_bottom
|
||||||
|
Both views are arranged in top-bottom orientation, Left-eye view is on top
|
||||||
|
@item checkerboard_rl
|
||||||
|
Each view is arranged in a checkerboard interleaved pattern, Left-eye view being first
|
||||||
|
@item checkerboard_lr
|
||||||
|
Each view is arranged in a checkerboard interleaved pattern, Right-eye view being first
|
||||||
|
@item row_interleaved_rl
|
||||||
|
Each view is constituted by a row based interleaving, Right-eye view is first row
|
||||||
|
@item row_interleaved_lr
|
||||||
|
Each view is constituted by a row based interleaving, Left-eye view is first row
|
||||||
|
@item col_interleaved_rl
|
||||||
|
Both views are arranged in a column based interleaving manner, Right-eye view is first column
|
||||||
|
@item col_interleaved_lr
|
||||||
|
Both views are arranged in a column based interleaving manner, Left-eye view is first column
|
||||||
|
@item anaglyph_cyan_red
|
||||||
|
All frames are in anaglyph format viewable through red-cyan filters
|
||||||
|
@item right_left
|
||||||
|
Both views are arranged side by side, Right-eye view is on the left
|
||||||
|
@item anaglyph_green_magenta
|
||||||
|
All frames are in anaglyph format viewable through green-magenta filters
|
||||||
|
@item block_lr
|
||||||
|
Both eyes laced in one Block, Left-eye view is first
|
||||||
|
@item block_rl
|
||||||
|
Both eyes laced in one Block, Right-eye view is first
|
||||||
|
@end table
|
||||||
|
@end table
|
||||||
|
|
||||||
|
For example a 3D WebM clip can be created using the following command line:
|
||||||
|
@example
|
||||||
|
ffmpeg -i sample_left_right_clip.mpg -an -c:v libvpx -metadata stereo_mode=left_right -y stereo_clip.webm
|
||||||
|
@end example
|
||||||
|
|
||||||
@section segment, stream_segment, ssegment
|
@section segment, stream_segment, ssegment
|
||||||
|
|
||||||
Basic stream segmenter.
|
Basic stream segmenter.
|
||||||
@@ -648,7 +540,7 @@ Set the reference stream, as specified by the string @var{specifier}.
|
|||||||
If @var{specifier} is set to @code{auto}, the reference is choosen
|
If @var{specifier} is set to @code{auto}, the reference is choosen
|
||||||
automatically. Otherwise it must be a stream specifier (see the ``Stream
|
automatically. Otherwise it must be a stream specifier (see the ``Stream
|
||||||
specifiers'' chapter in the ffmpeg manual) which specifies the
|
specifiers'' chapter in the ffmpeg manual) which specifies the
|
||||||
reference stream. The default value is @code{auto}.
|
reference stream. The default value is ``auto''.
|
||||||
|
|
||||||
@item segment_format @var{format}
|
@item segment_format @var{format}
|
||||||
Override the inner container format, by default it is guessed by the filename
|
Override the inner container format, by default it is guessed by the filename
|
||||||
@@ -662,7 +554,7 @@ listfile is generated.
|
|||||||
Set flags affecting the segment list generation.
|
Set flags affecting the segment list generation.
|
||||||
|
|
||||||
It currently supports the following flags:
|
It currently supports the following flags:
|
||||||
@table @samp
|
@table @var
|
||||||
@item cache
|
@item cache
|
||||||
Allow caching (only affects M3U8 list files).
|
Allow caching (only affects M3U8 list files).
|
||||||
|
|
||||||
@@ -670,18 +562,18 @@ Allow caching (only affects M3U8 list files).
|
|||||||
Allow live-friendly file generation.
|
Allow live-friendly file generation.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
Default value is @code{samp}.
|
Default value is @code{cache}.
|
||||||
|
|
||||||
@item segment_list_size @var{size}
|
@item segment_list_size @var{size}
|
||||||
Update the list file so that it contains at most the last @var{size}
|
Update the list file so that it contains at most the last @var{size}
|
||||||
segments. If 0 the list file will contain all the segments. Default
|
segments. If 0 the list file will contain all the segments. Default
|
||||||
value is 0.
|
value is 0.
|
||||||
|
|
||||||
@item segment_list_type @var{type}
|
@item segment_list type @var{type}
|
||||||
Specify the format for the segment list file.
|
Specify the format for the segment list file.
|
||||||
|
|
||||||
The following values are recognized:
|
The following values are recognized:
|
||||||
@table @samp
|
@table @option
|
||||||
@item flat
|
@item flat
|
||||||
Generate a flat list for the created segments, one segment per line.
|
Generate a flat list for the created segments, one segment per line.
|
||||||
|
|
||||||
@@ -702,7 +594,7 @@ the segment start and end time expressed in seconds.
|
|||||||
A list file with the suffix @code{".csv"} or @code{".ext"} will
|
A list file with the suffix @code{".csv"} or @code{".ext"} will
|
||||||
auto-select this format.
|
auto-select this format.
|
||||||
|
|
||||||
@samp{ext} is deprecated in favor or @samp{csv}.
|
@code{ext} is deprecated in favor or @code{csv}.
|
||||||
|
|
||||||
@item ffconcat
|
@item ffconcat
|
||||||
Generate an ffconcat file for the created segments. The resulting file
|
Generate an ffconcat file for the created segments. The resulting file
|
||||||
@@ -775,10 +667,6 @@ Reset timestamps at the begin of each segment, so that each segment
|
|||||||
will start with near-zero timestamps. It is meant to ease the playback
|
will start with near-zero timestamps. It is meant to ease the playback
|
||||||
of the generated segments. May not work with some combinations of
|
of the generated segments. May not work with some combinations of
|
||||||
muxers/codecs. It is set to @code{0} by default.
|
muxers/codecs. It is set to @code{0} by default.
|
||||||
|
|
||||||
@item initial_offset @var{offset}
|
|
||||||
Specify timestamp offset to apply to the output packet timestamps. The
|
|
||||||
argument must be a time duration specification, and defaults to 0.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@subsection Examples
|
@subsection Examples
|
||||||
@@ -800,9 +688,9 @@ ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_ti
|
|||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item
|
@item
|
||||||
As the example above, but use the @command{ffmpeg} @option{force_key_frames}
|
As the example above, but use the @code{ffmpeg} @var{force_key_frames}
|
||||||
option to force key frames in the input at the specified location, together
|
option to force key frames in the input at the specified location, together
|
||||||
with the segment option @option{segment_time_delta} to account for
|
with the segment option @var{segment_time_delta} to account for
|
||||||
possible roundings operated when setting key frame times.
|
possible roundings operated when setting key frame times.
|
||||||
@example
|
@example
|
||||||
ffmpeg -i in.mkv -force_key_frames 1,2,3,5,8,13,21 -codec:v mpeg4 -codec:a pcm_s16le -map 0 \
|
ffmpeg -i in.mkv -force_key_frames 1,2,3,5,8,13,21 -codec:v mpeg4 -codec:a pcm_s16le -map 0 \
|
||||||
@@ -813,7 +701,7 @@ required.
|
|||||||
|
|
||||||
@item
|
@item
|
||||||
Segment the input file by splitting the input file according to the
|
Segment the input file by splitting the input file according to the
|
||||||
frame numbers sequence specified with the @option{segment_frames} option:
|
frame numbers sequence specified with the @var{segment_frames} option:
|
||||||
@example
|
@example
|
||||||
ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_frames 100,200,300,500,800 out%03d.nut
|
ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_frames 100,200,300,500,800 out%03d.nut
|
||||||
@end example
|
@end example
|
||||||
@@ -834,6 +722,57 @@ ffmpeg -re -i in.mkv -codec copy -map 0 -f segment -segment_list playlist.m3u8 \
|
|||||||
@end example
|
@end example
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
|
@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
|
||||||
|
|
||||||
|
To attach a picture to an mp3 file select both the audio and the picture stream
|
||||||
|
with @code{map}:
|
||||||
|
@example
|
||||||
|
ffmpeg -i input.mp3 -i cover.png -c copy -map 0 -map 1
|
||||||
|
-metadata:s:v title="Album cover" -metadata:s:v comment="Cover (Front)" out.mp3
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@section ogg
|
||||||
|
|
||||||
|
Ogg container muxer.
|
||||||
|
|
||||||
|
@table @option
|
||||||
|
@item -page_duration @var{duration}
|
||||||
|
Preferred page duration, in microseconds. The muxer will attempt to create
|
||||||
|
pages that are approximately @var{duration} microseconds long. This allows the
|
||||||
|
user to compromise between seek granularity and container overhead. The default
|
||||||
|
is 1 second. A value of 0 will fill all segments, making pages as large as
|
||||||
|
possible. A value of 1 will effectively use 1 packet-per-page in most
|
||||||
|
situations, giving a small seek granularity at the cost of additional container
|
||||||
|
overhead.
|
||||||
|
@end table
|
||||||
|
|
||||||
@section tee
|
@section tee
|
||||||
|
|
||||||
The tee muxer can be used to write the same data to several files or any
|
The tee muxer can be used to write the same data to several files or any
|
||||||
@@ -852,55 +791,19 @@ leading or trailing spaces or any special character, it must be
|
|||||||
escaped (see the ``Quoting and escaping'' section in the ffmpeg-utils
|
escaped (see the ``Quoting and escaping'' section in the ffmpeg-utils
|
||||||
manual).
|
manual).
|
||||||
|
|
||||||
Muxer options can be specified for each slave by prepending them as a list of
|
Options can be specified for each slave by prepending them as a list of
|
||||||
@var{key}=@var{value} pairs separated by ':', between square brackets. If
|
@var{key}=@var{value} pairs separated by ':', between square brackets. If
|
||||||
the options values contain a special character or the ':' separator, they
|
the options values contain a special character or the ':' separator, they
|
||||||
must be escaped; note that this is a second level escaping.
|
must be escaped; note that this is a second level escaping.
|
||||||
|
|
||||||
The following special options are also recognized:
|
Example: encode something and both archive it in a WebM file and stream it
|
||||||
@table @option
|
|
||||||
@item f
|
|
||||||
Specify the format name. Useful if it cannot be guessed from the
|
|
||||||
output name suffix.
|
|
||||||
|
|
||||||
@item bsfs[/@var{spec}]
|
|
||||||
Specify a list of bitstream filters to apply to the specified
|
|
||||||
output. It is possible to specify to which streams a given bitstream
|
|
||||||
filter applies, by appending a stream specifier to the option
|
|
||||||
separated by @code{/}. If the stream specifier is not specified, the
|
|
||||||
bistream filters will be applied to all streams in the output.
|
|
||||||
|
|
||||||
Several bitstream filters can be specified, separated by ",".
|
|
||||||
|
|
||||||
@item select
|
|
||||||
Select the streams that should be mapped to the slave output,
|
|
||||||
specified by a stream specifier. If not specified, this defaults to
|
|
||||||
all the input streams.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Some examples follow.
|
|
||||||
@itemize
|
|
||||||
@item
|
|
||||||
Encode something and both archive it in a WebM file and stream it
|
|
||||||
as MPEG-TS over UDP (the streams need to be explicitly mapped):
|
as MPEG-TS over UDP (the streams need to be explicitly mapped):
|
||||||
|
|
||||||
@example
|
@example
|
||||||
ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a
|
ffmpeg -i ... -c:v libx264 -c:a mp2 -f tee -map 0:v -map 0:a
|
||||||
"archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/"
|
"archive-20121107.mkv|[f=mpegts]udp://10.0.1.255:1234/"
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item
|
|
||||||
Use @command{ffmpeg} to encode the input, and send the output
|
|
||||||
to three different destinations. The @code{dump_extra} bitstream
|
|
||||||
filter is used to add extradata information to all the output video
|
|
||||||
keyframes packets, as requested by the MPEG-TS format. The select
|
|
||||||
option is applied to @file{out.aac} in order to make it contain only
|
|
||||||
audio packets.
|
|
||||||
@example
|
|
||||||
ffmpeg -i ... -map 0 -flags +global_header -c:v libx264 -c:a aac -strict experimental
|
|
||||||
-f tee "[bsfs/v=dump_extra]out.ts|[movflags=+faststart]out.mp4|[select=a]out.aac"
|
|
||||||
@end example
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
Note: some codecs may need different options depending on the output format;
|
Note: some codecs may need different options depending on the output format;
|
||||||
the auto-detection of this can not work with the tee muxer. The main example
|
the auto-detection of this can not work with the tee muxer. The main example
|
||||||
is the @option{global_header} flag.
|
is the @option{global_header} flag.
|
||||||
|
|||||||
+3
-136
@@ -1,7 +1,7 @@
|
|||||||
@chapter Output Devices
|
@chapter Output Devices
|
||||||
@c man begin OUTPUT DEVICES
|
@c man begin OUTPUT DEVICES
|
||||||
|
|
||||||
Output devices are configured elements in FFmpeg that can write
|
Output devices are configured elements in FFmpeg which allow to write
|
||||||
multimedia data to an output device attached to your system.
|
multimedia data to an output device attached to your system.
|
||||||
|
|
||||||
When you configure your FFmpeg build, all the supported output devices
|
When you configure your FFmpeg build, all the supported output devices
|
||||||
@@ -26,7 +26,7 @@ ALSA (Advanced Linux Sound Architecture) output device.
|
|||||||
|
|
||||||
CACA output device.
|
CACA output device.
|
||||||
|
|
||||||
This output device allows to show a video stream in CACA window.
|
This output devices allows to show a video stream in CACA window.
|
||||||
Only one CACA window is allowed per application, so you can
|
Only one CACA window is allowed per application, so you can
|
||||||
have only one instance of this output device in an application.
|
have only one instance of this output device in an application.
|
||||||
|
|
||||||
@@ -104,79 +104,15 @@ ffmpeg -i INPUT -pix_fmt rgb24 -f caca -list_dither colors -
|
|||||||
@end example
|
@end example
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@section fbdev
|
|
||||||
|
|
||||||
Linux framebuffer output device.
|
|
||||||
|
|
||||||
The Linux framebuffer is a graphic hardware-independent abstraction
|
|
||||||
layer to show graphics on a computer monitor, typically on the
|
|
||||||
console. It is accessed through a file device node, usually
|
|
||||||
@file{/dev/fb0}.
|
|
||||||
|
|
||||||
For more detailed information read the file
|
|
||||||
@file{Documentation/fb/framebuffer.txt} included in the Linux source tree.
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item xoffset
|
|
||||||
@item yoffset
|
|
||||||
Set x/y coordinate of top left corner. Default is 0.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@subsection Examples
|
|
||||||
Play a file on framebuffer device @file{/dev/fb0}.
|
|
||||||
Required pixel format depends on current framebuffer settings.
|
|
||||||
@example
|
|
||||||
ffmpeg -re -i INPUT -vcodec rawvideo -pix_fmt bgra -f fbdev /dev/fb0
|
|
||||||
@end example
|
|
||||||
|
|
||||||
See also @url{http://linux-fbdev.sourceforge.net/}, and fbset(1).
|
|
||||||
|
|
||||||
@section oss
|
@section oss
|
||||||
|
|
||||||
OSS (Open Sound System) output device.
|
OSS (Open Sound System) output device.
|
||||||
|
|
||||||
@section pulse
|
|
||||||
|
|
||||||
PulseAudio output device.
|
|
||||||
|
|
||||||
To enable this output device you need to configure FFmpeg with @code{--enable-libpulse}.
|
|
||||||
|
|
||||||
More information about PulseAudio can be found on @url{http://www.pulseaudio.org}
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item server
|
|
||||||
Connect to a specific PulseAudio server, specified by an IP address.
|
|
||||||
Default server is used when not provided.
|
|
||||||
|
|
||||||
@item name
|
|
||||||
Specify the application name PulseAudio will use when showing active clients,
|
|
||||||
by default it is the @code{LIBAVFORMAT_IDENT} string.
|
|
||||||
|
|
||||||
@item stream_name
|
|
||||||
Specify the stream name PulseAudio will use when showing active streams,
|
|
||||||
by default it is set to the specified output name.
|
|
||||||
|
|
||||||
@item device
|
|
||||||
Specify the device to use. Default device is used when not provided.
|
|
||||||
List of output devices can be obtained with command @command{pactl list sinks}.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@subsection Examples
|
|
||||||
Play a file on default device on default server:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -f pulse "stream name"
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section sdl
|
@section sdl
|
||||||
|
|
||||||
SDL (Simple DirectMedia Layer) output device.
|
SDL (Simple DirectMedia Layer) output device.
|
||||||
|
|
||||||
This output device 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
|
||||||
have only one instance of this output device in an application.
|
have only one instance of this output device in an application.
|
||||||
|
|
||||||
@@ -203,10 +139,6 @@ Set the SDL window size, can be a string of the form
|
|||||||
@var{width}x@var{height} or a video size abbreviation.
|
@var{width}x@var{height} or a video size abbreviation.
|
||||||
If not specified it defaults to the size of the input video,
|
If not specified it defaults to the size of the input video,
|
||||||
downscaled according to the aspect ratio.
|
downscaled according to the aspect ratio.
|
||||||
|
|
||||||
@item window_fullscreen
|
|
||||||
Set fullscreen mode when non-zero value is provided.
|
|
||||||
Zero is a default.
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@subsection Examples
|
@subsection Examples
|
||||||
@@ -221,69 +153,4 @@ ffmpeg -i INPUT -vcodec rawvideo -pix_fmt yuv420p -window_size qcif -f sdl "SDL
|
|||||||
|
|
||||||
sndio audio output device.
|
sndio audio output device.
|
||||||
|
|
||||||
@section xv
|
|
||||||
|
|
||||||
XV (XVideo) output device.
|
|
||||||
|
|
||||||
This output device allows to show a video stream in a X Window System
|
|
||||||
window.
|
|
||||||
|
|
||||||
@subsection Options
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item display_name
|
|
||||||
Specify the hardware display name, which determines the display and
|
|
||||||
communications domain to be used.
|
|
||||||
|
|
||||||
The display name or DISPLAY environment variable can be a string in
|
|
||||||
the format @var{hostname}[:@var{number}[.@var{screen_number}]].
|
|
||||||
|
|
||||||
@var{hostname} specifies the name of the host machine on which the
|
|
||||||
display is physically attached. @var{number} specifies the number of
|
|
||||||
the display server on that host machine. @var{screen_number} specifies
|
|
||||||
the screen to be used on that server.
|
|
||||||
|
|
||||||
If unspecified, it defaults to the value of the DISPLAY environment
|
|
||||||
variable.
|
|
||||||
|
|
||||||
For example, @code{dual-headed:0.1} would specify screen 1 of display
|
|
||||||
0 on the machine named ``dual-headed''.
|
|
||||||
|
|
||||||
Check the X11 specification for more detailed information about the
|
|
||||||
display name format.
|
|
||||||
|
|
||||||
@item window_size
|
|
||||||
Set the created window size, can be a string of the form
|
|
||||||
@var{width}x@var{height} or a video size abbreviation. If not
|
|
||||||
specified it defaults to the size of the input video.
|
|
||||||
|
|
||||||
@item window_x
|
|
||||||
@item window_y
|
|
||||||
Set the X and Y window offsets for the created window. They are both
|
|
||||||
set to 0 by default. The values may be ignored by the window manager.
|
|
||||||
|
|
||||||
@item window_title
|
|
||||||
Set the window title, if not specified default to the filename
|
|
||||||
specified for the output device.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
For more information about XVideo see @url{http://www.x.org/}.
|
|
||||||
|
|
||||||
@subsection Examples
|
|
||||||
|
|
||||||
@itemize
|
|
||||||
@item
|
|
||||||
Decode, display and encode video input with @command{ffmpeg} at the
|
|
||||||
same time:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT OUTPUT -f xv display
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@item
|
|
||||||
Decode and display the input video to multiple X11 windows:
|
|
||||||
@example
|
|
||||||
ffmpeg -i INPUT -f xv normal -vf negate -f xv negated
|
|
||||||
@end example
|
|
||||||
@end itemize
|
|
||||||
|
|
||||||
@c man end OUTPUT DEVICES
|
@c man end OUTPUT DEVICES
|
||||||
|
|||||||
+19
-20
@@ -106,10 +106,10 @@ libavformat) as DLLs.
|
|||||||
|
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@section Microsoft Visual C++ or Intel C++ Compiler for Windows
|
@section Microsoft Visual C++
|
||||||
|
|
||||||
FFmpeg can be built with MSVC or ICL using a C99-to-C89 conversion utility and
|
FFmpeg can be built with MSVC using a C99-to-C89 conversion utility and
|
||||||
wrapper. For ICL, only the wrapper is used, since ICL supports C99.
|
wrapper.
|
||||||
|
|
||||||
You will need the following prerequisites:
|
You will need the following prerequisites:
|
||||||
|
|
||||||
@@ -122,33 +122,28 @@ You will need the following prerequisites:
|
|||||||
you want to run @uref{fate.html, FATE}.
|
you want to run @uref{fate.html, FATE}.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
To set up a proper environment in MSYS, you need to run @code{msys.bat} from
|
To set up a proper MSVC environment in MSYS, you simply need to run
|
||||||
the Visual Studio or Intel Compiler command prompt.
|
@code{msys.bat} from the Visual Studio command prompt.
|
||||||
|
|
||||||
Place @code{makedef}, @code{c99wrap.exe}, @code{c99conv.exe}, and @code{yasm.exe}
|
Place @code{makedef}, @code{c99wrap.exe}, @code{c99conv.exe}, and @code{yasm.exe}
|
||||||
somewhere in your @code{PATH}.
|
somewhere in your @code{PATH}.
|
||||||
|
|
||||||
Next, make sure @code{inttypes.h} and any other headers and libs you want to use
|
Next, make sure @code{inttypes.h} and any other headers and libs you want to use
|
||||||
are located in a spot that the compiler can see. Do so by modifying the @code{LIB}
|
are located in a spot that MSVC can see. Do so by modifying the @code{LIB} and
|
||||||
and @code{INCLUDE} environment variables to include the @strong{Windows} paths to
|
@code{INCLUDE} environment variables to include the @strong{Windows} paths to
|
||||||
these directories. Alternatively, you can try and use the
|
these directories. Alternatively, you can try and use the
|
||||||
@code{--extra-cflags}/@code{--extra-ldflags} configure options.
|
@code{--extra-cflags}/@code{--extra-ldflags} configure options.
|
||||||
|
|
||||||
Finally, run:
|
Finally, run:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
For MSVC:
|
|
||||||
./configure --toolchain=msvc
|
./configure --toolchain=msvc
|
||||||
|
|
||||||
For ICL:
|
|
||||||
./configure --toolchain=icl
|
|
||||||
|
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
If you wish to compile shared libraries, add @code{--enable-shared} to your
|
If you wish to compile shared libraries, add @code{--enable-shared} to your
|
||||||
configure options. Note that due to the way MSVC and ICL handle DLL imports and
|
configure options. Note that due to the way MSVC handles DLL imports and
|
||||||
exports, you cannot compile static and shared libraries at the same time, and
|
exports, you cannot compile static and shared libraries at the same time, and
|
||||||
enabling shared libraries will automatically disable the static ones.
|
enabling shared libraries will automatically disable the static ones.
|
||||||
|
|
||||||
@@ -178,12 +173,7 @@ erroneously included when building FFmpeg.
|
|||||||
can see.
|
can see.
|
||||||
@end enumerate
|
@end enumerate
|
||||||
|
|
||||||
@item FFmpeg has been tested with the following on i686 and x86_64:
|
@item FFmpeg has been tested with Visual Studio 2010 and 2012, Pro and Express.
|
||||||
@itemize
|
|
||||||
@item Visual Studio 2010 Pro and Express
|
|
||||||
@item Visual Studio 2012 Pro and Express
|
|
||||||
@item Intel Composer XE 2013
|
|
||||||
@end itemize
|
|
||||||
Anything else is not officially supported.
|
Anything else is not officially supported.
|
||||||
|
|
||||||
@end itemize
|
@end itemize
|
||||||
@@ -194,7 +184,16 @@ If you plan to link with MSVC-built static libraries, you will need
|
|||||||
to make sure you have @code{Runtime Library} set to
|
to make sure you have @code{Runtime Library} set to
|
||||||
@code{Multi-threaded (/MT)} in your project's settings.
|
@code{Multi-threaded (/MT)} in your project's settings.
|
||||||
|
|
||||||
You will need to define @code{inline} to something MSVC understands:
|
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
|
||||||
|
|
||||||
|
You will also need to define @code{inline} to something MSVC understands:
|
||||||
@example
|
@example
|
||||||
#define inline __inline
|
#define inline __inline
|
||||||
@end example
|
@end example
|
||||||
|
|||||||
+10
-11
@@ -1,20 +1,20 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012 Anton Khirnov
|
* Copyright (c) 2012 Anton Khirnov
|
||||||
*
|
*
|
||||||
* This file is part of FFmpeg.
|
* This file is part of Libav.
|
||||||
*
|
*
|
||||||
* FFmpeg is free software; you can redistribute it and/or
|
* Libav is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
* License as published by the Free Software Foundation; either
|
* License as published by the Free Software Foundation; either
|
||||||
* version 2.1 of the License, or (at your option) any later version.
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* FFmpeg is distributed in the hope that it will be useful,
|
* Libav is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* Lesser General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
* License along with FFmpeg; if not, write to the Free Software
|
* License along with Libav; 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
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -27,9 +27,7 @@
|
|||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
#include "libavformat/options_table.h"
|
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
#include "libavcodec/options_table.h"
|
|
||||||
#include "libavutil/opt.h"
|
#include "libavutil/opt.h"
|
||||||
|
|
||||||
static void print_usage(void)
|
static void print_usage(void)
|
||||||
@@ -41,9 +39,6 @@ static void print_usage(void)
|
|||||||
|
|
||||||
static void print_option(const AVOption *opts, const AVOption *o, int per_stream)
|
static void print_option(const AVOption *opts, const AVOption *o, int per_stream)
|
||||||
{
|
{
|
||||||
if (!(o->flags & (AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
printf("@item -%s%s @var{", o->name, per_stream ? "[:stream_specifier]" : "");
|
printf("@item -%s%s @var{", o->name, per_stream ? "[:stream_specifier]" : "");
|
||||||
switch (o->type) {
|
switch (o->type) {
|
||||||
case AV_OPT_TYPE_BINARY: printf("hexadecimal string"); break;
|
case AV_OPT_TYPE_BINARY: printf("hexadecimal string"); break;
|
||||||
@@ -98,14 +93,18 @@ static void show_opts(const AVOption *opts, int per_stream)
|
|||||||
|
|
||||||
static void show_format_opts(void)
|
static void show_format_opts(void)
|
||||||
{
|
{
|
||||||
|
#include "libavformat/options_table.h"
|
||||||
|
|
||||||
printf("@section Format AVOptions\n");
|
printf("@section Format AVOptions\n");
|
||||||
show_opts(avformat_options, 0);
|
show_opts(options, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void show_codec_opts(void)
|
static void show_codec_opts(void)
|
||||||
{
|
{
|
||||||
|
#include "libavcodec/options_table.h"
|
||||||
|
|
||||||
printf("@section Codec AVOptions\n");
|
printf("@section Codec AVOptions\n");
|
||||||
show_opts(avcodec_options, 1);
|
show_opts(options, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
|||||||
+17
-314
@@ -1,8 +1,8 @@
|
|||||||
@chapter Protocols
|
@chapter Protocols
|
||||||
@c man begin PROTOCOLS
|
@c man begin PROTOCOLS
|
||||||
|
|
||||||
Protocols are configured elements in FFmpeg that enable access to
|
Protocols are configured elements in FFmpeg which allow to access
|
||||||
resources that require specific protocols.
|
resources which require the use of a particular protocol.
|
||||||
|
|
||||||
When you configure your FFmpeg build, all the supported protocols are
|
When you configure your FFmpeg build, all the supported protocols are
|
||||||
enabled by default. You can list all available ones using the
|
enabled by default. You can list all available ones using the
|
||||||
@@ -49,16 +49,6 @@ Read angle 2 of playlist 4 from BluRay mounted to /mnt/bluray, start from chapte
|
|||||||
-playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
|
-playlist 4 -angle 2 -chapter 2 bluray:/mnt/bluray
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section cache
|
|
||||||
|
|
||||||
Caching wrapper for input stream.
|
|
||||||
|
|
||||||
Cache the input stream to temporary file. It brings seeking capability to live streams.
|
|
||||||
|
|
||||||
@example
|
|
||||||
cache:@var{URL}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section concat
|
@section concat
|
||||||
|
|
||||||
Physical concatenation protocol.
|
Physical concatenation protocol.
|
||||||
@@ -85,25 +75,6 @@ ffplay concat:split1.mpeg\|split2.mpeg\|split3.mpeg
|
|||||||
Note that you may need to escape the character "|" which is special for
|
Note that you may need to escape the character "|" which is special for
|
||||||
many shells.
|
many shells.
|
||||||
|
|
||||||
@section crypto
|
|
||||||
|
|
||||||
AES-encrypted stream reading protocol.
|
|
||||||
|
|
||||||
The accepted options are:
|
|
||||||
@table @option
|
|
||||||
@item key
|
|
||||||
Set the AES decryption key binary block from given hexadecimal representation.
|
|
||||||
|
|
||||||
@item iv
|
|
||||||
Set the AES decryption initialization vector binary block from given hexadecimal representation.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Accepted URL formats:
|
|
||||||
@example
|
|
||||||
crypto:@var{URL}
|
|
||||||
crypto+@var{URL}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section data
|
@section data
|
||||||
|
|
||||||
Data in-line in the URI. See @url{http://en.wikipedia.org/wiki/Data_URI_scheme}.
|
Data in-line in the URI. See @url{http://en.wikipedia.org/wiki/Data_URI_scheme}.
|
||||||
@@ -129,54 +100,6 @@ The ff* tools default to the file protocol, that is a resource
|
|||||||
specified with the name "FILE.mpeg" is interpreted as the URL
|
specified with the name "FILE.mpeg" is interpreted as the URL
|
||||||
"file:FILE.mpeg".
|
"file:FILE.mpeg".
|
||||||
|
|
||||||
This protocol accepts the following options:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item truncate
|
|
||||||
Truncate existing files on write, if set to 1. A value of 0 prevents
|
|
||||||
truncating. Default value is 1.
|
|
||||||
|
|
||||||
@item blocksize
|
|
||||||
Set I/O operation maximum block size, in bytes. Default value is
|
|
||||||
@code{INT_MAX}, which results in not limiting the requested block size.
|
|
||||||
Setting this value reasonably low improves user termination request reaction
|
|
||||||
time, which is valuable for files on slow medium.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section ftp
|
|
||||||
|
|
||||||
FTP (File Transfer Protocol).
|
|
||||||
|
|
||||||
Allow to read from or write to remote resources using FTP protocol.
|
|
||||||
|
|
||||||
Following syntax is required.
|
|
||||||
@example
|
|
||||||
ftp://[user[:password]@@]server[:port]/path/to/remote/resource.mpeg
|
|
||||||
@end example
|
|
||||||
|
|
||||||
This protocol accepts the following options.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item timeout
|
|
||||||
Set timeout of socket I/O operations used by the underlying low level
|
|
||||||
operation. By default it is set to -1, which means that the timeout is
|
|
||||||
not specified.
|
|
||||||
|
|
||||||
@item ftp-anonymous-password
|
|
||||||
Password used when login as anonymous user. Typically an e-mail address
|
|
||||||
should be used.
|
|
||||||
|
|
||||||
@item ftp-write-seekable
|
|
||||||
Control seekability of connection during encoding. If set to 1 the
|
|
||||||
resource is supposed to be seekable, if set to 0 it is assumed not
|
|
||||||
to be seekable. Default value is 0.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
NOTE: Protocol can be used as output, but it is recommended to not do
|
|
||||||
it, unless special care is taken (tests, customized server configuration
|
|
||||||
etc.). Different FTP servers behave in different way during seek
|
|
||||||
operation. ff* tools may produce incomplete content due to server limitations.
|
|
||||||
|
|
||||||
@section gopher
|
@section gopher
|
||||||
|
|
||||||
Gopher protocol.
|
Gopher protocol.
|
||||||
@@ -242,20 +165,6 @@ not specified.
|
|||||||
@item mime_type
|
@item mime_type
|
||||||
Set MIME type.
|
Set MIME type.
|
||||||
|
|
||||||
@item icy
|
|
||||||
If set to 1 request ICY (SHOUTcast) metadata from the server. If the server
|
|
||||||
supports this, the metadata has to be retrieved by the application by reading
|
|
||||||
the @option{icy_metadata_headers} and @option{icy_metadata_packet} options.
|
|
||||||
The default is 0.
|
|
||||||
|
|
||||||
@item icy_metadata_headers
|
|
||||||
If the server supports ICY metadata, this contains the ICY specific HTTP reply
|
|
||||||
headers, separated with newline characters.
|
|
||||||
|
|
||||||
@item icy_metadata_packet
|
|
||||||
If the server supports ICY metadata, and @option{icy} was set to 1, this
|
|
||||||
contains the last non-empty metadata packet sent by the server.
|
|
||||||
|
|
||||||
@item cookies
|
@item cookies
|
||||||
Set the cookies to be sent in future requests. The format of each cookie is the
|
Set the cookies to be sent in future requests. The format of each cookie is the
|
||||||
same as the value of a Set-Cookie HTTP response field. Multiple cookies can be
|
same as the value of a Set-Cookie HTTP response field. Multiple cookies can be
|
||||||
@@ -339,16 +248,6 @@ ffmpeg -i test.wav -f avi pipe:1 | cat > test.avi
|
|||||||
ffmpeg -i test.wav -f avi pipe: | cat > test.avi
|
ffmpeg -i test.wav -f avi pipe: | cat > test.avi
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
This protocol accepts the following options:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item blocksize
|
|
||||||
Set I/O operation maximum block size, in bytes. Default value is
|
|
||||||
@code{INT_MAX}, which results in not limiting the requested block size.
|
|
||||||
Setting this value reasonably low improves user termination request reaction
|
|
||||||
time, which is valuable if data transmission is slow.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Note that some formats (typically MOV), require the output protocol to
|
Note that some formats (typically MOV), require the output protocol to
|
||||||
be seekable, so they will fail with the pipe output protocol.
|
be seekable, so they will fail with the pipe output protocol.
|
||||||
|
|
||||||
@@ -361,18 +260,12 @@ content across a TCP/IP network.
|
|||||||
|
|
||||||
The required syntax is:
|
The required syntax is:
|
||||||
@example
|
@example
|
||||||
rtmp://[@var{username}:@var{password}@@]@var{server}[:@var{port}][/@var{app}][/@var{instance}][/@var{playpath}]
|
rtmp://@var{server}[:@var{port}][/@var{app}][/@var{instance}][/@var{playpath}]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The accepted parameters are:
|
The accepted parameters are:
|
||||||
@table @option
|
@table @option
|
||||||
|
|
||||||
@item username
|
|
||||||
An optional username (mostly for publishing).
|
|
||||||
|
|
||||||
@item password
|
|
||||||
An optional password (mostly for publishing).
|
|
||||||
|
|
||||||
@item server
|
@item server
|
||||||
The address of the RTMP server.
|
The address of the RTMP server.
|
||||||
|
|
||||||
@@ -423,8 +316,7 @@ times to construct arbitrary AMF sequences.
|
|||||||
|
|
||||||
@item rtmp_flashver
|
@item rtmp_flashver
|
||||||
Version of the Flash plugin used to run the SWF player. The default
|
Version of the Flash plugin used to run the SWF player. The default
|
||||||
is LNX 9,0,124,2. (When publishing, the default is FMLE/3.0 (compatible;
|
is LNX 9,0,124,2.
|
||||||
<libavformat version>).)
|
|
||||||
|
|
||||||
@item rtmp_flush_interval
|
@item rtmp_flush_interval
|
||||||
Number of packets flushed in the same request (RTMPT only). The default
|
Number of packets flushed in the same request (RTMPT only). The default
|
||||||
@@ -474,12 +366,6 @@ For example to read with @command{ffplay} a multimedia resource named
|
|||||||
ffplay rtmp://myserver/vod/sample
|
ffplay rtmp://myserver/vod/sample
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
To publish to a password protected server, passing the playpath and
|
|
||||||
app names separately:
|
|
||||||
@example
|
|
||||||
ffmpeg -re -i <input> -f flv -rtmp_playpath some/long/path -rtmp_app long/app/name rtmp://username:password@@myserver/
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section rtmpe
|
@section rtmpe
|
||||||
|
|
||||||
Encrypted Real-Time Messaging Protocol.
|
Encrypted Real-Time Messaging Protocol.
|
||||||
@@ -520,39 +406,7 @@ The Real-Time Messaging Protocol tunneled through HTTPS (RTMPTS) is used
|
|||||||
for streaming multimedia content within HTTPS requests to traverse
|
for streaming multimedia content within HTTPS requests to traverse
|
||||||
firewalls.
|
firewalls.
|
||||||
|
|
||||||
@section libssh
|
@section rtmp, rtmpe, rtmps, rtmpt, rtmpte
|
||||||
|
|
||||||
Secure File Transfer Protocol via libssh
|
|
||||||
|
|
||||||
Allow to read from or write to remote resources using SFTP protocol.
|
|
||||||
|
|
||||||
Following syntax is required.
|
|
||||||
|
|
||||||
@example
|
|
||||||
sftp://[user[:password]@@]server[:port]/path/to/remote/resource.mpeg
|
|
||||||
@end example
|
|
||||||
|
|
||||||
This protocol accepts the following options.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item timeout
|
|
||||||
Set timeout of socket I/O operations used by the underlying low level
|
|
||||||
operation. By default it is set to -1, which means that the timeout
|
|
||||||
is not specified.
|
|
||||||
|
|
||||||
@item truncate
|
|
||||||
Truncate existing files on write, if set to 1. A value of 0 prevents
|
|
||||||
truncating. Default value is 1.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Example: Play a file stored on remote server.
|
|
||||||
|
|
||||||
@example
|
|
||||||
ffplay sftp://user:password@@server_address:22/home/user/resource.mpeg
|
|
||||||
@end example
|
|
||||||
|
|
||||||
@section librtmp rtmp, rtmpe, rtmps, rtmpt, rtmpte
|
|
||||||
|
|
||||||
Real-Time Messaging Protocol and its variants supported through
|
Real-Time Messaging Protocol and its variants supported through
|
||||||
librtmp.
|
librtmp.
|
||||||
@@ -594,70 +448,7 @@ ffplay "rtmp://myserver/live/mystream live=1"
|
|||||||
|
|
||||||
@section rtp
|
@section rtp
|
||||||
|
|
||||||
Real-time Transport Protocol.
|
Real-Time Protocol.
|
||||||
|
|
||||||
The required syntax for an RTP URL is:
|
|
||||||
rtp://@var{hostname}[:@var{port}][?@var{option}=@var{val}...]
|
|
||||||
|
|
||||||
@var{port} specifies the RTP port to use.
|
|
||||||
|
|
||||||
The following URL options are supported:
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item ttl=@var{n}
|
|
||||||
Set the TTL (Time-To-Live) value (for multicast only).
|
|
||||||
|
|
||||||
@item rtcpport=@var{n}
|
|
||||||
Set the remote RTCP port to @var{n}.
|
|
||||||
|
|
||||||
@item localrtpport=@var{n}
|
|
||||||
Set the local RTP port to @var{n}.
|
|
||||||
|
|
||||||
@item localrtcpport=@var{n}'
|
|
||||||
Set the local RTCP port to @var{n}.
|
|
||||||
|
|
||||||
@item pkt_size=@var{n}
|
|
||||||
Set max packet size (in bytes) to @var{n}.
|
|
||||||
|
|
||||||
@item connect=0|1
|
|
||||||
Do a @code{connect()} on the UDP socket (if set to 1) or not (if set
|
|
||||||
to 0).
|
|
||||||
|
|
||||||
@item sources=@var{ip}[,@var{ip}]
|
|
||||||
List allowed source IP addresses.
|
|
||||||
|
|
||||||
@item block=@var{ip}[,@var{ip}]
|
|
||||||
List disallowed (blocked) source IP addresses.
|
|
||||||
|
|
||||||
@item write_to_source=0|1
|
|
||||||
Send packets to the source address of the latest received packet (if
|
|
||||||
set to 1) or to a default remote address (if set to 0).
|
|
||||||
|
|
||||||
@item localport=@var{n}
|
|
||||||
Set the local RTP port to @var{n}.
|
|
||||||
|
|
||||||
This is a deprecated option. Instead, @option{localrtpport} should be
|
|
||||||
used.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Important notes:
|
|
||||||
|
|
||||||
@enumerate
|
|
||||||
|
|
||||||
@item
|
|
||||||
If @option{rtcpport} is not set the RTCP port will be set to the RTP
|
|
||||||
port value plus 1.
|
|
||||||
|
|
||||||
@item
|
|
||||||
If @option{localrtpport} (the local RTP port) is not set any available
|
|
||||||
port will be used for the local RTP and RTCP ports.
|
|
||||||
|
|
||||||
@item
|
|
||||||
If @option{localrtcpport} (the local RTCP port) is not set it will be
|
|
||||||
set to the the local RTP port value plus 1.
|
|
||||||
@end enumerate
|
|
||||||
|
|
||||||
@section rtsp
|
@section rtsp
|
||||||
|
|
||||||
@@ -747,11 +538,6 @@ To receive a stream in realtime:
|
|||||||
ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp @var{output}
|
ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp @var{output}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item stimeout
|
|
||||||
Socket IO timeout in micro seconds.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section sap
|
@section sap
|
||||||
|
|
||||||
Session Announcement Protocol (RFC 2974). This is not technically a
|
Session Announcement Protocol (RFC 2974). This is not technically a
|
||||||
@@ -844,50 +630,6 @@ To play back the first stream announced on one the default IPv6 SAP multicast ad
|
|||||||
ffplay sap://[ff0e::2:7ffe]
|
ffplay sap://[ff0e::2:7ffe]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section sctp
|
|
||||||
|
|
||||||
Stream Control Transmission Protocol.
|
|
||||||
|
|
||||||
The accepted URL syntax is:
|
|
||||||
@example
|
|
||||||
sctp://@var{host}:@var{port}[?@var{options}]
|
|
||||||
@end example
|
|
||||||
|
|
||||||
The protocol accepts the following options:
|
|
||||||
@table @option
|
|
||||||
@item listen
|
|
||||||
If set to any value, listen for an incoming connection. Outgoing connection is done by default.
|
|
||||||
|
|
||||||
@item max_streams
|
|
||||||
Set the maximum number of streams. By default no limit is set.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section srtp
|
|
||||||
|
|
||||||
Secure Real-time Transport Protocol.
|
|
||||||
|
|
||||||
The accepted options are:
|
|
||||||
@table @option
|
|
||||||
@item srtp_in_suite
|
|
||||||
@item srtp_out_suite
|
|
||||||
Select input and output encoding suites.
|
|
||||||
|
|
||||||
Supported values:
|
|
||||||
@table @samp
|
|
||||||
@item AES_CM_128_HMAC_SHA1_80
|
|
||||||
@item SRTP_AES128_CM_HMAC_SHA1_80
|
|
||||||
@item AES_CM_128_HMAC_SHA1_32
|
|
||||||
@item SRTP_AES128_CM_HMAC_SHA1_32
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item srtp_in_params
|
|
||||||
@item srtp_out_params
|
|
||||||
Set input and output encoding parameters, which are expressed by a
|
|
||||||
base64-encoded representation of a binary block. The first 16 bytes of
|
|
||||||
this binary block are used as master key, the following 14 bytes are
|
|
||||||
used as master salt.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@section tcp
|
@section tcp
|
||||||
|
|
||||||
Trasmission Control Protocol.
|
Trasmission Control Protocol.
|
||||||
@@ -916,48 +658,29 @@ ffplay tcp://@var{hostname}:@var{port}
|
|||||||
|
|
||||||
@section tls
|
@section tls
|
||||||
|
|
||||||
Transport Layer Security (TLS) / Secure Sockets Layer (SSL)
|
Transport Layer Security/Secure Sockets Layer
|
||||||
|
|
||||||
The required syntax for a TLS/SSL url is:
|
The required syntax for a TLS/SSL url is:
|
||||||
@example
|
@example
|
||||||
tls://@var{hostname}:@var{port}[?@var{options}]
|
tls://@var{hostname}:@var{port}[?@var{options}]
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
The following parameters can be set via command line options
|
|
||||||
(or in code via @code{AVOption}s):
|
|
||||||
|
|
||||||
@table @option
|
@table @option
|
||||||
|
|
||||||
@item ca_file, cafile=@var{filename}
|
@item listen
|
||||||
A file containing certificate authority (CA) root certificates to treat
|
Act as a server, listening for an incoming connection.
|
||||||
as trusted. If the linked TLS library contains a default this might not
|
|
||||||
need to be specified for verification to work, but not all libraries and
|
|
||||||
setups have defaults built in.
|
|
||||||
The file must be in OpenSSL PEM format.
|
|
||||||
|
|
||||||
@item tls_verify=@var{1|0}
|
@item cafile=@var{filename}
|
||||||
If enabled, try to verify the peer that we are communicating with.
|
Certificate authority file. The file must be in OpenSSL PEM format.
|
||||||
Note, if using OpenSSL, this currently only makes sure that the
|
|
||||||
peer certificate is signed by one of the root certificates in the CA
|
|
||||||
database, but it does not validate that the certificate actually
|
|
||||||
matches the host name we are trying to connect to. (With GnuTLS,
|
|
||||||
the host name is validated as well.)
|
|
||||||
|
|
||||||
This is disabled by default since it requires a CA database to be
|
@item cert=@var{filename}
|
||||||
provided by the caller in many cases.
|
Certificate file. The file must be in OpenSSL PEM format.
|
||||||
|
|
||||||
@item cert_file, cert=@var{filename}
|
@item key=@var{filename}
|
||||||
A file containing a certificate to use in the handshake with the peer.
|
Private key file.
|
||||||
(When operating as server, in listen mode, this is more often required
|
|
||||||
by the peer, while client certificates only are mandated in certain
|
|
||||||
setups.)
|
|
||||||
|
|
||||||
@item key_file, key=@var{filename}
|
@item verify=@var{0|1}
|
||||||
A file containing the private key for the certificate.
|
Verify the peer's certificate.
|
||||||
|
|
||||||
@item listen=@var{1|0}
|
|
||||||
If enabled, listen for connections on the provided port, and assume
|
|
||||||
the server role in the handshake instead of the client role.
|
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@@ -1064,24 +787,4 @@ To receive over UDP from a remote endpoint:
|
|||||||
ffmpeg -i udp://[@var{multicast-address}]:@var{port}
|
ffmpeg -i udp://[@var{multicast-address}]:@var{port}
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@section unix
|
|
||||||
|
|
||||||
Unix local socket
|
|
||||||
|
|
||||||
The required syntax for a Unix socket URL is:
|
|
||||||
|
|
||||||
@example
|
|
||||||
unix://@var{filepath}
|
|
||||||
@end example
|
|
||||||
|
|
||||||
The following parameters can be set via command line options
|
|
||||||
(or in code via @code{AVOption}s):
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
@item timeout
|
|
||||||
Timeout in ms.
|
|
||||||
@item listen
|
|
||||||
Create the Unix socket in listening mode.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@c man end PROTOCOLS
|
@c man end PROTOCOLS
|
||||||
|
|||||||
@@ -1,232 +0,0 @@
|
|||||||
@chapter Resampler Options
|
|
||||||
@c man begin RESAMPLER OPTIONS
|
|
||||||
|
|
||||||
The audio resampler supports the following named options.
|
|
||||||
|
|
||||||
Options may be set by specifying -@var{option} @var{value} in the
|
|
||||||
FFmpeg tools, @var{option}=@var{value} for the aresample filter,
|
|
||||||
by setting the value explicitly in the
|
|
||||||
@code{SwrContext} options or using the @file{libavutil/opt.h} API for
|
|
||||||
programmatic use.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@item ich, in_channel_count
|
|
||||||
Set the number of input channels. Default value is 0. Setting this
|
|
||||||
value is not mandatory if the corresponding channel layout
|
|
||||||
@option{in_channel_layout} is set.
|
|
||||||
|
|
||||||
@item och, out_channel_count
|
|
||||||
Set the number of output channels. Default value is 0. Setting this
|
|
||||||
value is not mandatory if the corresponding channel layout
|
|
||||||
@option{out_channel_layout} is set.
|
|
||||||
|
|
||||||
@item uch, used_channel_count
|
|
||||||
Set the number of used input channels. Default value is 0. This option is
|
|
||||||
only used for special remapping.
|
|
||||||
|
|
||||||
@item isr, in_sample_rate
|
|
||||||
Set the input sample rate. Default value is 0.
|
|
||||||
|
|
||||||
@item osr, out_sample_rate
|
|
||||||
Set the output sample rate. Default value is 0.
|
|
||||||
|
|
||||||
@item isf, in_sample_fmt
|
|
||||||
Specify the input sample format. It is set by default to @code{none}.
|
|
||||||
|
|
||||||
@item osf, out_sample_fmt
|
|
||||||
Specify the output sample format. It is set by default to @code{none}.
|
|
||||||
|
|
||||||
@item tsf, internal_sample_fmt
|
|
||||||
Set the internal sample format. Default value is @code{none}.
|
|
||||||
This will automatically be chosen when it is not explicitly set.
|
|
||||||
|
|
||||||
@item icl, in_channel_layout
|
|
||||||
@item ocl, out_channel_layout
|
|
||||||
Set the input/output channel layout.
|
|
||||||
|
|
||||||
See @ref{channel layout syntax,,the Channel Layout section in the ffmpeg-utils(1) manual,ffmpeg-utils}
|
|
||||||
for the required syntax.
|
|
||||||
|
|
||||||
@item clev, center_mix_level
|
|
||||||
Set the center mix level. It is a value expressed in deciBel, and must be
|
|
||||||
in the interval [-32,32].
|
|
||||||
|
|
||||||
@item slev, surround_mix_level
|
|
||||||
Set the surround mix level. It is a value expressed in deciBel, and must
|
|
||||||
be in the interval [-32,32].
|
|
||||||
|
|
||||||
@item lfe_mix_level
|
|
||||||
Set LFE mix into non LFE level. It is used when there is a LFE input but no
|
|
||||||
LFE output. It is a value expressed in deciBel, and must
|
|
||||||
be in the interval [-32,32].
|
|
||||||
|
|
||||||
@item rmvol, rematrix_volume
|
|
||||||
Set rematrix volume. Default value is 1.0.
|
|
||||||
|
|
||||||
@item rematrix_maxval
|
|
||||||
Set maximum output value for rematrixing.
|
|
||||||
This can be used to prevent clipping vs. preventing volumn reduction
|
|
||||||
A value of 1.0 prevents cliping.
|
|
||||||
|
|
||||||
@item flags, swr_flags
|
|
||||||
Set flags used by the converter. Default value is 0.
|
|
||||||
|
|
||||||
It supports the following individual flags:
|
|
||||||
@table @option
|
|
||||||
@item res
|
|
||||||
force resampling, this flag forces resampling to be used even when the
|
|
||||||
input and output sample rates match.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item dither_scale
|
|
||||||
Set the dither scale. Default value is 1.
|
|
||||||
|
|
||||||
@item dither_method
|
|
||||||
Set dither method. Default value is 0.
|
|
||||||
|
|
||||||
Supported values:
|
|
||||||
@table @samp
|
|
||||||
@item rectangular
|
|
||||||
select rectangular dither
|
|
||||||
@item triangular
|
|
||||||
select triangular dither
|
|
||||||
@item triangular_hp
|
|
||||||
select triangular dither with high pass
|
|
||||||
@item lipshitz
|
|
||||||
select lipshitz noise shaping dither
|
|
||||||
@item shibata
|
|
||||||
select shibata noise shaping dither
|
|
||||||
@item low_shibata
|
|
||||||
select low shibata noise shaping dither
|
|
||||||
@item high_shibata
|
|
||||||
select high shibata noise shaping dither
|
|
||||||
@item f_weighted
|
|
||||||
select f-weighted noise shaping dither
|
|
||||||
@item modified_e_weighted
|
|
||||||
select modified-e-weighted noise shaping dither
|
|
||||||
@item improved_e_weighted
|
|
||||||
select improved-e-weighted noise shaping dither
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item resampler
|
|
||||||
Set resampling engine. Default value is swr.
|
|
||||||
|
|
||||||
Supported values:
|
|
||||||
@table @samp
|
|
||||||
@item swr
|
|
||||||
select the native SW Resampler; filter options precision and cheby are not
|
|
||||||
applicable in this case.
|
|
||||||
@item soxr
|
|
||||||
select the SoX Resampler (where available); compensation, and filter options
|
|
||||||
filter_size, phase_shift, filter_type & kaiser_beta, are not applicable in this
|
|
||||||
case.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item filter_size
|
|
||||||
For swr only, set resampling filter size, default value is 32.
|
|
||||||
|
|
||||||
@item phase_shift
|
|
||||||
For swr only, set resampling phase shift, default value is 10, and must be in
|
|
||||||
the interval [0,30].
|
|
||||||
|
|
||||||
@item linear_interp
|
|
||||||
Use Linear Interpolation if set to 1, default value is 0.
|
|
||||||
|
|
||||||
@item cutoff
|
|
||||||
Set cutoff frequency (swr: 6dB point; soxr: 0dB point) ratio; must be a float
|
|
||||||
value between 0 and 1. Default value is 0.97 with swr, and 0.91 with soxr
|
|
||||||
(which, with a sample-rate of 44100, preserves the entire audio band to 20kHz).
|
|
||||||
|
|
||||||
@item precision
|
|
||||||
For soxr only, the precision in bits to which the resampled signal will be
|
|
||||||
calculated. The default value of 20 (which, with suitable dithering, is
|
|
||||||
appropriate for a destination bit-depth of 16) gives SoX's 'High Quality'; a
|
|
||||||
value of 28 gives SoX's 'Very High Quality'.
|
|
||||||
|
|
||||||
@item cheby
|
|
||||||
For soxr only, selects passband rolloff none (Chebyshev) & higher-precision
|
|
||||||
approximation for 'irrational' ratios. Default value is 0.
|
|
||||||
|
|
||||||
@item async
|
|
||||||
For swr only, simple 1 parameter audio sync to timestamps using stretching,
|
|
||||||
squeezing, filling and trimming. Setting this to 1 will enable filling and
|
|
||||||
trimming, larger values represent the maximum amount in samples that the data
|
|
||||||
may be stretched or squeezed for each second.
|
|
||||||
Default value is 0, thus no compensation is applied to make the samples match
|
|
||||||
the audio timestamps.
|
|
||||||
|
|
||||||
@item first_pts
|
|
||||||
For swr only, assume the first pts should be this value. The time unit is 1 / sample rate.
|
|
||||||
This allows for padding/trimming at the start of stream. By default, no
|
|
||||||
assumption is made about the first frame's expected pts, so no padding or
|
|
||||||
trimming is done. For example, this could be set to 0 to pad the beginning with
|
|
||||||
silence if an audio stream starts after the video stream or to trim any samples
|
|
||||||
with a negative pts due to encoder delay.
|
|
||||||
|
|
||||||
@item min_comp
|
|
||||||
For swr only, set the minimum difference between timestamps and audio data (in
|
|
||||||
seconds) to trigger stretching/squeezing/filling or trimming of the
|
|
||||||
data to make it match the timestamps. The default is that
|
|
||||||
stretching/squeezing/filling and trimming is disabled
|
|
||||||
(@option{min_comp} = @code{FLT_MAX}).
|
|
||||||
|
|
||||||
@item min_hard_comp
|
|
||||||
For swr only, set the minimum difference between timestamps and audio data (in
|
|
||||||
seconds) to trigger adding/dropping samples to make it match the
|
|
||||||
timestamps. This option effectively is a threshold to select between
|
|
||||||
hard (trim/fill) and soft (squeeze/stretch) compensation. Note that
|
|
||||||
all compensation is by default disabled through @option{min_comp}.
|
|
||||||
The default is 0.1.
|
|
||||||
|
|
||||||
@item comp_duration
|
|
||||||
For swr only, set duration (in seconds) over which data is stretched/squeezed
|
|
||||||
to make it match the timestamps. Must be a non-negative double float value,
|
|
||||||
default value is 1.0.
|
|
||||||
|
|
||||||
@item max_soft_comp
|
|
||||||
For swr only, set maximum factor by which data is stretched/squeezed to make it
|
|
||||||
match the timestamps. Must be a non-negative double float value, default value
|
|
||||||
is 0.
|
|
||||||
|
|
||||||
@item matrix_encoding
|
|
||||||
Select matrixed stereo encoding.
|
|
||||||
|
|
||||||
It accepts the following values:
|
|
||||||
@table @samp
|
|
||||||
@item none
|
|
||||||
select none
|
|
||||||
@item dolby
|
|
||||||
select Dolby
|
|
||||||
@item dplii
|
|
||||||
select Dolby Pro Logic II
|
|
||||||
@end table
|
|
||||||
|
|
||||||
Default value is @code{none}.
|
|
||||||
|
|
||||||
@item filter_type
|
|
||||||
For swr only, select resampling filter type. This only affects resampling
|
|
||||||
operations.
|
|
||||||
|
|
||||||
It accepts the following values:
|
|
||||||
@table @samp
|
|
||||||
@item cubic
|
|
||||||
select cubic
|
|
||||||
@item blackman_nuttall
|
|
||||||
select Blackman Nuttall Windowed Sinc
|
|
||||||
@item kaiser
|
|
||||||
select Kaiser Windowed Sinc
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item kaiser_beta
|
|
||||||
For swr only, set Kaiser Window Beta value. Must be an integer in the
|
|
||||||
interval [2,16], default value is 9.
|
|
||||||
|
|
||||||
@item output_sample_bits
|
|
||||||
For swr only, set number of used output sample bits for dithering. Must be an integer in the
|
|
||||||
interval [0,64], default value is 0, which means it's not used.
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@c man end RESAMPLER OPTIONS
|
|
||||||
-119
@@ -1,119 +0,0 @@
|
|||||||
@anchor{scaler_options}
|
|
||||||
@chapter Scaler Options
|
|
||||||
@c man begin SCALER OPTIONS
|
|
||||||
|
|
||||||
The video scaler supports the following named options.
|
|
||||||
|
|
||||||
Options may be set by specifying -@var{option} @var{value} in the
|
|
||||||
FFmpeg tools. For programmatic use, they can be set explicitly in the
|
|
||||||
@code{SwsContext} options or through the @file{libavutil/opt.h} API.
|
|
||||||
|
|
||||||
@table @option
|
|
||||||
|
|
||||||
@anchor{sws_flags}
|
|
||||||
@item sws_flags
|
|
||||||
Set the scaler flags. This is also used to set the scaling
|
|
||||||
algorithm. Only a single algorithm should be selected.
|
|
||||||
|
|
||||||
It accepts the following values:
|
|
||||||
@table @samp
|
|
||||||
@item fast_bilinear
|
|
||||||
Select fast bilinear scaling algorithm.
|
|
||||||
|
|
||||||
@item bilinear
|
|
||||||
Select bilinear scaling algorithm.
|
|
||||||
|
|
||||||
@item bicubic
|
|
||||||
Select bicubic scaling algorithm.
|
|
||||||
|
|
||||||
@item experimental
|
|
||||||
Select experimental scaling algorithm.
|
|
||||||
|
|
||||||
@item neighbor
|
|
||||||
Select nearest neighbor rescaling algorithm.
|
|
||||||
|
|
||||||
@item area
|
|
||||||
Select averaging area rescaling algorithm.
|
|
||||||
|
|
||||||
@item bicubiclin
|
|
||||||
Select bicubic scaling algorithm for the luma component, bilinear for
|
|
||||||
chroma components.
|
|
||||||
|
|
||||||
@item gauss
|
|
||||||
Select Gaussian rescaling algorithm.
|
|
||||||
|
|
||||||
@item sinc
|
|
||||||
Select sinc rescaling algorithm.
|
|
||||||
|
|
||||||
@item lanczos
|
|
||||||
Select lanczos rescaling algorithm.
|
|
||||||
|
|
||||||
@item spline
|
|
||||||
Select natural bicubic spline rescaling algorithm.
|
|
||||||
|
|
||||||
@item print_info
|
|
||||||
Enable printing/debug logging.
|
|
||||||
|
|
||||||
@item accurate_rnd
|
|
||||||
Enable accurate rounding.
|
|
||||||
|
|
||||||
@item full_chroma_int
|
|
||||||
Enable full chroma interpolation.
|
|
||||||
|
|
||||||
@item full_chroma_inp
|
|
||||||
Select full chroma input.
|
|
||||||
|
|
||||||
@item bitexact
|
|
||||||
Enable bitexact output.
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@item srcw
|
|
||||||
Set source width.
|
|
||||||
|
|
||||||
@item srch
|
|
||||||
Set source height.
|
|
||||||
|
|
||||||
@item dstw
|
|
||||||
Set destination width.
|
|
||||||
|
|
||||||
@item dsth
|
|
||||||
Set destination height.
|
|
||||||
|
|
||||||
@item src_format
|
|
||||||
Set source pixel format (must be expressed as an integer).
|
|
||||||
|
|
||||||
@item dst_format
|
|
||||||
Set destination pixel format (must be expressed as an integer).
|
|
||||||
|
|
||||||
@item src_range
|
|
||||||
Select source range.
|
|
||||||
|
|
||||||
@item dst_range
|
|
||||||
Select destination range.
|
|
||||||
|
|
||||||
@item param0, param1
|
|
||||||
Set scaling algorithm parameters. The specified values are specific of
|
|
||||||
some scaling algorithms and ignored by others. The specified values
|
|
||||||
are floating point number values.
|
|
||||||
|
|
||||||
@item sws_dither
|
|
||||||
Set the dithering algorithm. Accepts one of the following
|
|
||||||
values. Default value is @samp{auto}.
|
|
||||||
|
|
||||||
@table @samp
|
|
||||||
@item auto
|
|
||||||
automatic choice
|
|
||||||
|
|
||||||
@item none
|
|
||||||
no dithering
|
|
||||||
|
|
||||||
@item bayer
|
|
||||||
bayer dither
|
|
||||||
|
|
||||||
@item ed
|
|
||||||
error diffusion dither
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@end table
|
|
||||||
|
|
||||||
@c man end SCALER OPTIONS
|
|
||||||
+8
-16
@@ -50,10 +50,8 @@ header:
|
|||||||
temporal_decomposition_count u header_state
|
temporal_decomposition_count u header_state
|
||||||
spatial_decomposition_count u header_state
|
spatial_decomposition_count u header_state
|
||||||
colorspace_type u header_state
|
colorspace_type u header_state
|
||||||
if (nb_planes > 2) {
|
chroma_h_shift u header_state
|
||||||
chroma_h_shift u header_state
|
chroma_v_shift u header_state
|
||||||
chroma_v_shift u header_state
|
|
||||||
}
|
|
||||||
spatial_scalability b header_state
|
spatial_scalability b header_state
|
||||||
max_ref_frames-1 u header_state
|
max_ref_frames-1 u header_state
|
||||||
qlogs
|
qlogs
|
||||||
@@ -61,7 +59,7 @@ header:
|
|||||||
if(!keyframe){
|
if(!keyframe){
|
||||||
update_mc b header_state
|
update_mc b header_state
|
||||||
if(update_mc){
|
if(update_mc){
|
||||||
for(plane=0; plane<nb_plane_types; plane++){
|
for(plane=0; plane<2; plane++){
|
||||||
diag_mc b header_state
|
diag_mc b header_state
|
||||||
htaps/2-1 u header_state
|
htaps/2-1 u header_state
|
||||||
for(i= p->htaps/2; i; i--)
|
for(i= p->htaps/2; i; i--)
|
||||||
@@ -82,7 +80,7 @@ header:
|
|||||||
block_max_depth s header_state
|
block_max_depth s header_state
|
||||||
|
|
||||||
qlogs:
|
qlogs:
|
||||||
for(plane=0; plane<nb_plane_types; plane++){
|
for(plane=0; plane<2; plane++){
|
||||||
quant_table[plane][0][0] s header_state
|
quant_table[plane][0][0] s header_state
|
||||||
for(level=0; level < spatial_decomposition_count; level++){
|
for(level=0; level < spatial_decomposition_count; level++){
|
||||||
quant_table[plane][level][1]s header_state
|
quant_table[plane][level][1]s header_state
|
||||||
@@ -133,10 +131,8 @@ block(level):
|
|||||||
|
|
||||||
residual:
|
residual:
|
||||||
residual2(luma)
|
residual2(luma)
|
||||||
if (nb_planes > 2) {
|
residual2(chroma_cr)
|
||||||
residual2(chroma_cr)
|
residual2(chroma_cb)
|
||||||
residual2(chroma_cb)
|
|
||||||
}
|
|
||||||
|
|
||||||
residual2:
|
residual2:
|
||||||
for(level=0; level<spatial_decomposition_count; level++){
|
for(level=0; level<spatial_decomposition_count; level++){
|
||||||
@@ -150,7 +146,7 @@ residual2:
|
|||||||
subband:
|
subband:
|
||||||
FIXME
|
FIXME
|
||||||
|
|
||||||
nb_plane_types = gray ? 1 : 2;
|
|
||||||
|
|
||||||
Tag description:
|
Tag description:
|
||||||
----------------
|
----------------
|
||||||
@@ -172,11 +168,7 @@ spatial_decomposition_count
|
|||||||
FIXME
|
FIXME
|
||||||
|
|
||||||
colorspace_type
|
colorspace_type
|
||||||
0 unspecified YcbCr
|
0
|
||||||
1 Gray
|
|
||||||
2 Gray + Alpha
|
|
||||||
3 GBR
|
|
||||||
4 GBRA
|
|
||||||
this MUST NOT change within a bitstream
|
this MUST NOT change within a bitstream
|
||||||
|
|
||||||
chroma_h_shift
|
chroma_h_shift
|
||||||
|
|||||||
+258
@@ -0,0 +1,258 @@
|
|||||||
|
@chapter Syntax
|
||||||
|
@c man begin SYNTAX
|
||||||
|
|
||||||
|
This section documents the syntax and formats employed by the FFmpeg
|
||||||
|
libraries and tools.
|
||||||
|
|
||||||
|
@anchor{quoting_and_escaping}
|
||||||
|
@section Quoting and escaping
|
||||||
|
|
||||||
|
FFmpeg adopts the following quoting and escaping mechanism, unless
|
||||||
|
explicitly specified. The following rules are applied:
|
||||||
|
|
||||||
|
@itemize
|
||||||
|
@item
|
||||||
|
@code{'} and @code{\} are special characters (respectively used for
|
||||||
|
quoting and escaping). In addition to them, there might be other
|
||||||
|
special characters depending on the specific syntax where the escaping
|
||||||
|
and quoting are employed.
|
||||||
|
|
||||||
|
@item
|
||||||
|
A special character is escaped by prefixing it with a '\'.
|
||||||
|
|
||||||
|
@item
|
||||||
|
All characters enclosed between '' are included literally in the
|
||||||
|
parsed string. The quote character @code{'} itself cannot be quoted,
|
||||||
|
so you may need to close the quote and escape it.
|
||||||
|
|
||||||
|
@item
|
||||||
|
Leading and trailing whitespaces, unless escaped or quoted, are
|
||||||
|
removed from the parsed string.
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
Note that you may need to add a second level of escaping when using
|
||||||
|
the command line or a script, which depends on the syntax of the
|
||||||
|
adopted shell language.
|
||||||
|
|
||||||
|
The function @code{av_get_token} defined in
|
||||||
|
@file{libavutil/avstring.h} can be used to parse a token quoted or
|
||||||
|
escaped according to the rules defined above.
|
||||||
|
|
||||||
|
The tool @file{tools/ffescape} in the FFmpeg source tree can be used
|
||||||
|
to automatically quote or escape a string in a script.
|
||||||
|
|
||||||
|
@subsection Examples
|
||||||
|
|
||||||
|
@itemize
|
||||||
|
@item
|
||||||
|
Escape the string @code{Crime d'Amour} containing the @code{'} special
|
||||||
|
character:
|
||||||
|
@example
|
||||||
|
Crime d\'Amour
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@item
|
||||||
|
The string above contains a quote, so the @code{'} needs to be escaped
|
||||||
|
when quoting it:
|
||||||
|
@example
|
||||||
|
'Crime d'\''Amour'
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@item
|
||||||
|
Include leading or trailing whitespaces using quoting:
|
||||||
|
@example
|
||||||
|
' this string starts and ends with whitespaces '
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@item
|
||||||
|
Escaping and quoting can be mixed together:
|
||||||
|
@example
|
||||||
|
' The string '\'string\'' is a string '
|
||||||
|
@end example
|
||||||
|
|
||||||
|
@item
|
||||||
|
To include a literal @code{\} you can use either escaping or quoting:
|
||||||
|
@example
|
||||||
|
'c:\foo' can be written as c:\\foo
|
||||||
|
@end example
|
||||||
|
@end itemize
|
||||||
|
|
||||||
|
@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 ntsc
|
||||||
|
720x480
|
||||||
|
@item pal
|
||||||
|
720x576
|
||||||
|
@item qntsc
|
||||||
|
352x240
|
||||||
|
@item qpal
|
||||||
|
352x288
|
||||||
|
@item sntsc
|
||||||
|
640x480
|
||||||
|
@item spal
|
||||||
|
768x576
|
||||||
|
@item film
|
||||||
|
352x240
|
||||||
|
@item ntsc-film
|
||||||
|
352x240
|
||||||
|
@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
|
||||||
|
@item 2k
|
||||||
|
2048x1080
|
||||||
|
@item 2kflat
|
||||||
|
1998x1080
|
||||||
|
@item 2kscope
|
||||||
|
2048x858
|
||||||
|
@item 4k
|
||||||
|
4096x2160
|
||||||
|
@item 4kflat
|
||||||
|
3996x2160
|
||||||
|
@item 4kscope
|
||||||
|
4096x1716
|
||||||
|
@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/1001
|
||||||
|
@item qpal
|
||||||
|
25/1
|
||||||
|
@item sntsc
|
||||||
|
30000/1001
|
||||||
|
@item spal
|
||||||
|
25/1
|
||||||
|
@item film
|
||||||
|
24/1
|
||||||
|
@item ntsc-film
|
||||||
|
24000/1001
|
||||||
|
@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
|
||||||
+3
-2
@@ -17,7 +17,6 @@ my $TEMPLATE_HEADER = $ENV{"FFMPEG_HEADER"} || <<EOT;
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="container">
|
<div id="container">
|
||||||
<div id="body">
|
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
$PRE_BODY_CLOSE = '</div></div>';
|
$PRE_BODY_CLOSE = '</div></div>';
|
||||||
@@ -33,7 +32,7 @@ sub FFmpeg_print_page_foot($$)
|
|||||||
T2H_DEFAULT_program_string() : program_string();
|
T2H_DEFAULT_program_string() : program_string();
|
||||||
print $fh '<footer class="footer pagination-right">' . "\n";
|
print $fh '<footer class="footer pagination-right">' . "\n";
|
||||||
print $fh '<span class="label label-info">' . $program_string;
|
print $fh '<span class="label label-info">' . $program_string;
|
||||||
print $fh "</span></footer></div></div></body>\n";
|
print $fh "</span></footer></div>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$float = \&FFmpeg_float;
|
$float = \&FFmpeg_float;
|
||||||
@@ -93,6 +92,8 @@ $Texi2HTML::THISDOC{program_authors}
|
|||||||
|
|
||||||
$description
|
$description
|
||||||
<meta name="keywords" content="$longtitle">
|
<meta name="keywords" content="$longtitle">
|
||||||
|
<meta name="resource-type" content="document">
|
||||||
|
<meta name="distribution" content="global">
|
||||||
<meta name="Generator" content="$Texi2HTML::THISDOC{program}">
|
<meta name="Generator" content="$Texi2HTML::THISDOC{program}">
|
||||||
$encoding
|
$encoding
|
||||||
$CSS_LINES
|
$CSS_LINES
|
||||||
|
|||||||
+1
-1
@@ -121,7 +121,7 @@ INF: while(<$inf>) {
|
|||||||
$chapters{$chapter_name} .= postprocess($chapter) if ($chapter_name);
|
$chapters{$chapter_name} .= postprocess($chapter) if ($chapter_name);
|
||||||
|
|
||||||
# start new chapter
|
# start new chapter
|
||||||
$chapter_name = $1, push (@chapters_sequence, $chapter_name) unless $skipping;
|
$chapter_name = $1, push (@chapters_sequence, $chapter_name);
|
||||||
$chapters{$chapter_name} = "" unless exists $chapters{$chapter_name};
|
$chapters{$chapter_name} = "" unless exists $chapters{$chapter_name};
|
||||||
$chapter = "";
|
$chapter = "";
|
||||||
$output = 1;
|
$output = 1;
|
||||||
|
|||||||
-1064
File diff suppressed because it is too large
Load Diff
@@ -37,6 +37,7 @@
|
|||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
|
|
||||||
#include "libavfilter/avfilter.h"
|
#include "libavfilter/avfilter.h"
|
||||||
|
#include "libavfilter/avfiltergraph.h"
|
||||||
|
|
||||||
#include "libavutil/avutil.h"
|
#include "libavutil/avutil.h"
|
||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
@@ -93,7 +94,6 @@ typedef struct OptionsContext {
|
|||||||
/* input options */
|
/* input options */
|
||||||
int64_t input_ts_offset;
|
int64_t input_ts_offset;
|
||||||
int rate_emu;
|
int rate_emu;
|
||||||
int accurate_seek;
|
|
||||||
|
|
||||||
SpecifierOpt *ts_scale;
|
SpecifierOpt *ts_scale;
|
||||||
int nb_ts_scale;
|
int nb_ts_scale;
|
||||||
@@ -165,22 +165,16 @@ typedef struct OptionsContext {
|
|||||||
int nb_copy_prior_start;
|
int nb_copy_prior_start;
|
||||||
SpecifierOpt *filters;
|
SpecifierOpt *filters;
|
||||||
int nb_filters;
|
int nb_filters;
|
||||||
SpecifierOpt *filter_scripts;
|
|
||||||
int nb_filter_scripts;
|
|
||||||
SpecifierOpt *reinit_filters;
|
SpecifierOpt *reinit_filters;
|
||||||
int nb_reinit_filters;
|
int nb_reinit_filters;
|
||||||
SpecifierOpt *fix_sub_duration;
|
SpecifierOpt *fix_sub_duration;
|
||||||
int nb_fix_sub_duration;
|
int nb_fix_sub_duration;
|
||||||
SpecifierOpt *canvas_sizes;
|
|
||||||
int nb_canvas_sizes;
|
|
||||||
SpecifierOpt *pass;
|
SpecifierOpt *pass;
|
||||||
int nb_pass;
|
int nb_pass;
|
||||||
SpecifierOpt *passlogfiles;
|
SpecifierOpt *passlogfiles;
|
||||||
int nb_passlogfiles;
|
int nb_passlogfiles;
|
||||||
SpecifierOpt *guess_layout_max;
|
SpecifierOpt *guess_layout_max;
|
||||||
int nb_guess_layout_max;
|
int nb_guess_layout_max;
|
||||||
SpecifierOpt *apad;
|
|
||||||
int nb_apad;
|
|
||||||
} OptionsContext;
|
} OptionsContext;
|
||||||
|
|
||||||
typedef struct InputFilter {
|
typedef struct InputFilter {
|
||||||
@@ -220,7 +214,6 @@ typedef struct InputStream {
|
|||||||
int decoding_needed; /* true if the packets must be decoded in 'raw_fifo' */
|
int decoding_needed; /* true if the packets must be decoded in 'raw_fifo' */
|
||||||
AVCodec *dec;
|
AVCodec *dec;
|
||||||
AVFrame *decoded_frame;
|
AVFrame *decoded_frame;
|
||||||
AVFrame *filter_frame; /* a ref of decoded_frame, to be sent to filters */
|
|
||||||
|
|
||||||
int64_t start; /* time when read started */
|
int64_t start; /* time when read started */
|
||||||
/* predicted dts of the next packet read for this stream or (when there are
|
/* predicted dts of the next packet read for this stream or (when there are
|
||||||
@@ -262,10 +255,12 @@ typedef struct InputStream {
|
|||||||
struct sub2video {
|
struct sub2video {
|
||||||
int64_t last_pts;
|
int64_t last_pts;
|
||||||
int64_t end_pts;
|
int64_t end_pts;
|
||||||
AVFrame *frame;
|
AVFilterBufferRef *ref;
|
||||||
int w, h;
|
int w, h;
|
||||||
} sub2video;
|
} sub2video;
|
||||||
|
|
||||||
|
/* a pool of free buffers for decoded data */
|
||||||
|
FrameBuffer *buffer_pool;
|
||||||
int dr1;
|
int dr1;
|
||||||
|
|
||||||
/* decoded data from this stream goes into all those filters
|
/* decoded data from this stream goes into all those filters
|
||||||
@@ -282,14 +277,10 @@ typedef struct InputFile {
|
|||||||
int eagain; /* true if last read attempt returned EAGAIN */
|
int eagain; /* true if last read attempt returned EAGAIN */
|
||||||
int ist_index; /* index of first stream in input_streams */
|
int ist_index; /* index of first stream in input_streams */
|
||||||
int64_t ts_offset;
|
int64_t ts_offset;
|
||||||
int64_t last_ts;
|
|
||||||
int64_t start_time; /* user-specified start time in AV_TIME_BASE or AV_NOPTS_VALUE */
|
|
||||||
int64_t recording_time;
|
|
||||||
int nb_streams; /* number of stream that ffmpeg is aware of; may be different
|
int nb_streams; /* number of stream that ffmpeg is aware of; may be different
|
||||||
from ctx.nb_streams if new streams appear during av_read_frame() */
|
from ctx.nb_streams if new streams appear during av_read_frame() */
|
||||||
int nb_streams_warn; /* number of streams that the user was warned of */
|
int nb_streams_warn; /* number of streams that the user was warned of */
|
||||||
int rate_emu;
|
int rate_emu;
|
||||||
int accurate_seek;
|
|
||||||
|
|
||||||
#if HAVE_PTHREADS
|
#if HAVE_PTHREADS
|
||||||
pthread_t thread; /* thread reading from this file */
|
pthread_t thread; /* thread reading from this file */
|
||||||
@@ -326,8 +317,6 @@ typedef struct OutputStream {
|
|||||||
/* pts of the first frame encoded for this stream, used for limiting
|
/* pts of the first frame encoded for this stream, used for limiting
|
||||||
* recording time */
|
* recording time */
|
||||||
int64_t first_pts;
|
int64_t first_pts;
|
||||||
/* dts of the last packet sent to the muxer */
|
|
||||||
int64_t last_mux_dts;
|
|
||||||
AVBitStreamFilterContext *bitstream_filters;
|
AVBitStreamFilterContext *bitstream_filters;
|
||||||
AVCodec *enc;
|
AVCodec *enc;
|
||||||
int64_t max_frames;
|
int64_t max_frames;
|
||||||
@@ -338,7 +327,7 @@ typedef struct OutputStream {
|
|||||||
int force_fps;
|
int force_fps;
|
||||||
int top_field_first;
|
int top_field_first;
|
||||||
|
|
||||||
AVRational frame_aspect_ratio;
|
float frame_aspect_ratio;
|
||||||
|
|
||||||
/* forced key frames */
|
/* forced key frames */
|
||||||
int64_t *forced_kf_pts;
|
int64_t *forced_kf_pts;
|
||||||
@@ -362,7 +351,6 @@ typedef struct OutputStream {
|
|||||||
AVDictionary *opts;
|
AVDictionary *opts;
|
||||||
AVDictionary *swr_opts;
|
AVDictionary *swr_opts;
|
||||||
AVDictionary *resample_opts;
|
AVDictionary *resample_opts;
|
||||||
char *apad;
|
|
||||||
int finished; /* no more packets should be written for this stream */
|
int finished; /* no more packets should be written for this stream */
|
||||||
int unavailable; /* true if the steram is unavailable (possibly temporarily) */
|
int unavailable; /* true if the steram is unavailable (possibly temporarily) */
|
||||||
int stream_copy;
|
int stream_copy;
|
||||||
@@ -420,7 +408,6 @@ extern int qp_hist;
|
|||||||
extern int stdin_interaction;
|
extern int stdin_interaction;
|
||||||
extern int frame_bits_per_raw_sample;
|
extern int frame_bits_per_raw_sample;
|
||||||
extern AVIOContext *progress_avio;
|
extern AVIOContext *progress_avio;
|
||||||
extern float max_error_rate;
|
|
||||||
|
|
||||||
extern const AVIOInterruptCB int_cb;
|
extern const AVIOInterruptCB int_cb;
|
||||||
|
|
||||||
|
|||||||
+80
-189
@@ -21,6 +21,7 @@
|
|||||||
#include "ffmpeg.h"
|
#include "ffmpeg.h"
|
||||||
|
|
||||||
#include "libavfilter/avfilter.h"
|
#include "libavfilter/avfilter.h"
|
||||||
|
#include "libavfilter/avfiltergraph.h"
|
||||||
#include "libavfilter/buffersink.h"
|
#include "libavfilter/buffersink.h"
|
||||||
|
|
||||||
#include "libavresample/avresample.h"
|
#include "libavresample/avresample.h"
|
||||||
@@ -42,12 +43,15 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum AVPixelFo
|
|||||||
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(target);
|
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(target);
|
||||||
int has_alpha = desc ? desc->nb_components % 2 == 0 : 0;
|
int has_alpha = desc ? desc->nb_components % 2 == 0 : 0;
|
||||||
enum AVPixelFormat best= AV_PIX_FMT_NONE;
|
enum AVPixelFormat best= AV_PIX_FMT_NONE;
|
||||||
|
const enum AVPixelFormat mjpeg_formats[] = { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE };
|
||||||
|
const enum AVPixelFormat ljpeg_formats[] = { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUV420P,
|
||||||
|
AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE };
|
||||||
|
|
||||||
if (st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
|
if (st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
|
||||||
if (st->codec->codec_id == AV_CODEC_ID_MJPEG) {
|
if (st->codec->codec_id == AV_CODEC_ID_MJPEG) {
|
||||||
p = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE };
|
p = mjpeg_formats;
|
||||||
} else if (st->codec->codec_id == AV_CODEC_ID_LJPEG) {
|
} else if (st->codec->codec_id == AV_CODEC_ID_LJPEG) {
|
||||||
p = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUV420P,
|
p =ljpeg_formats;
|
||||||
AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE };
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (; *p != AV_PIX_FMT_NONE; p++) {
|
for (; *p != AV_PIX_FMT_NONE; p++) {
|
||||||
@@ -92,11 +96,6 @@ void choose_sample_fmt(AVStream *st, AVCodec *codec)
|
|||||||
|
|
||||||
static char *choose_pix_fmts(OutputStream *ost)
|
static char *choose_pix_fmts(OutputStream *ost)
|
||||||
{
|
{
|
||||||
AVDictionaryEntry *strict_dict = av_dict_get(ost->opts, "strict", NULL, 0);
|
|
||||||
if (strict_dict)
|
|
||||||
// used by choose_pixel_fmt() and below
|
|
||||||
av_opt_set(ost->st->codec, "strict", strict_dict->value, 0);
|
|
||||||
|
|
||||||
if (ost->keep_pix_fmt) {
|
if (ost->keep_pix_fmt) {
|
||||||
if (ost->filter)
|
if (ost->filter)
|
||||||
avfilter_graph_set_auto_convert(ost->filter->graph->graph,
|
avfilter_graph_set_auto_convert(ost->filter->graph->graph,
|
||||||
@@ -114,7 +113,7 @@ static char *choose_pix_fmts(OutputStream *ost)
|
|||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (avio_open_dyn_buf(&s) < 0)
|
if (avio_open_dyn_buf(&s) < 0)
|
||||||
exit_program(1);
|
exit(1);
|
||||||
|
|
||||||
p = ost->enc->pix_fmts;
|
p = ost->enc->pix_fmts;
|
||||||
if (ost->st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
|
if (ost->st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
|
||||||
@@ -128,7 +127,7 @@ static char *choose_pix_fmts(OutputStream *ost)
|
|||||||
|
|
||||||
for (; *p != AV_PIX_FMT_NONE; p++) {
|
for (; *p != AV_PIX_FMT_NONE; p++) {
|
||||||
const char *name = av_get_pix_fmt_name(*p);
|
const char *name = av_get_pix_fmt_name(*p);
|
||||||
avio_printf(s, "%s|", name);
|
avio_printf(s, "%s:", name);
|
||||||
}
|
}
|
||||||
len = avio_close_dyn_buf(s, &ret);
|
len = avio_close_dyn_buf(s, &ret);
|
||||||
ret[len - 1] = 0;
|
ret[len - 1] = 0;
|
||||||
@@ -139,7 +138,7 @@ static char *choose_pix_fmts(OutputStream *ost)
|
|||||||
|
|
||||||
/* Define a function for building a string containing a list of
|
/* Define a function for building a string containing a list of
|
||||||
* allowed formats. */
|
* allowed formats. */
|
||||||
#define DEF_CHOOSE_FORMAT(type, var, supported_list, none, get_name) \
|
#define DEF_CHOOSE_FORMAT(type, var, supported_list, none, get_name, separator)\
|
||||||
static char *choose_ ## var ## s(OutputStream *ost) \
|
static char *choose_ ## var ## s(OutputStream *ost) \
|
||||||
{ \
|
{ \
|
||||||
if (ost->st->codec->var != none) { \
|
if (ost->st->codec->var != none) { \
|
||||||
@@ -152,11 +151,11 @@ static char *choose_ ## var ## s(OutputStream *ost) \
|
|||||||
int len; \
|
int len; \
|
||||||
\
|
\
|
||||||
if (avio_open_dyn_buf(&s) < 0) \
|
if (avio_open_dyn_buf(&s) < 0) \
|
||||||
exit_program(1); \
|
exit(1); \
|
||||||
\
|
\
|
||||||
for (p = ost->enc->supported_list; *p != none; p++) { \
|
for (p = ost->enc->supported_list; *p != none; p++) { \
|
||||||
get_name(*p); \
|
get_name(*p); \
|
||||||
avio_printf(s, "%s|", name); \
|
avio_printf(s, "%s" separator, name); \
|
||||||
} \
|
} \
|
||||||
len = avio_close_dyn_buf(s, &ret); \
|
len = avio_close_dyn_buf(s, &ret); \
|
||||||
ret[len - 1] = 0; \
|
ret[len - 1] = 0; \
|
||||||
@@ -166,28 +165,28 @@ static char *choose_ ## var ## s(OutputStream *ost) \
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DEF_CHOOSE_FORMAT(enum AVPixelFormat, pix_fmt, pix_fmts, AV_PIX_FMT_NONE,
|
// DEF_CHOOSE_FORMAT(enum AVPixelFormat, pix_fmt, pix_fmts, AV_PIX_FMT_NONE,
|
||||||
// GET_PIX_FMT_NAME)
|
// GET_PIX_FMT_NAME, ":")
|
||||||
|
|
||||||
DEF_CHOOSE_FORMAT(enum AVSampleFormat, sample_fmt, sample_fmts,
|
DEF_CHOOSE_FORMAT(enum AVSampleFormat, sample_fmt, sample_fmts,
|
||||||
AV_SAMPLE_FMT_NONE, GET_SAMPLE_FMT_NAME)
|
AV_SAMPLE_FMT_NONE, GET_SAMPLE_FMT_NAME, ",")
|
||||||
|
|
||||||
DEF_CHOOSE_FORMAT(int, sample_rate, supported_samplerates, 0,
|
DEF_CHOOSE_FORMAT(int, sample_rate, supported_samplerates, 0,
|
||||||
GET_SAMPLE_RATE_NAME)
|
GET_SAMPLE_RATE_NAME, ",")
|
||||||
|
|
||||||
DEF_CHOOSE_FORMAT(uint64_t, channel_layout, channel_layouts, 0,
|
DEF_CHOOSE_FORMAT(uint64_t, channel_layout, channel_layouts, 0,
|
||||||
GET_CH_LAYOUT_NAME)
|
GET_CH_LAYOUT_NAME, ",")
|
||||||
|
|
||||||
FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost)
|
FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost)
|
||||||
{
|
{
|
||||||
FilterGraph *fg = av_mallocz(sizeof(*fg));
|
FilterGraph *fg = av_mallocz(sizeof(*fg));
|
||||||
|
|
||||||
if (!fg)
|
if (!fg)
|
||||||
exit_program(1);
|
exit(1);
|
||||||
fg->index = nb_filtergraphs;
|
fg->index = nb_filtergraphs;
|
||||||
|
|
||||||
GROW_ARRAY(fg->outputs, fg->nb_outputs);
|
GROW_ARRAY(fg->outputs, fg->nb_outputs);
|
||||||
if (!(fg->outputs[0] = av_mallocz(sizeof(*fg->outputs[0]))))
|
if (!(fg->outputs[0] = av_mallocz(sizeof(*fg->outputs[0]))))
|
||||||
exit_program(1);
|
exit(1);
|
||||||
fg->outputs[0]->ost = ost;
|
fg->outputs[0]->ost = ost;
|
||||||
fg->outputs[0]->graph = fg;
|
fg->outputs[0]->graph = fg;
|
||||||
|
|
||||||
@@ -195,7 +194,7 @@ FilterGraph *init_simple_filtergraph(InputStream *ist, OutputStream *ost)
|
|||||||
|
|
||||||
GROW_ARRAY(fg->inputs, fg->nb_inputs);
|
GROW_ARRAY(fg->inputs, fg->nb_inputs);
|
||||||
if (!(fg->inputs[0] = av_mallocz(sizeof(*fg->inputs[0]))))
|
if (!(fg->inputs[0] = av_mallocz(sizeof(*fg->inputs[0]))))
|
||||||
exit_program(1);
|
exit(1);
|
||||||
fg->inputs[0]->ist = ist;
|
fg->inputs[0]->ist = ist;
|
||||||
fg->inputs[0]->graph = fg;
|
fg->inputs[0]->graph = fg;
|
||||||
|
|
||||||
@@ -218,7 +217,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO) {
|
if (type != AVMEDIA_TYPE_VIDEO && type != AVMEDIA_TYPE_AUDIO) {
|
||||||
av_log(NULL, AV_LOG_FATAL, "Only video and audio filters supported "
|
av_log(NULL, AV_LOG_FATAL, "Only video and audio filters supported "
|
||||||
"currently.\n");
|
"currently.\n");
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in->name) {
|
if (in->name) {
|
||||||
@@ -230,7 +229,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
if (file_idx < 0 || file_idx >= nb_input_files) {
|
if (file_idx < 0 || file_idx >= nb_input_files) {
|
||||||
av_log(NULL, AV_LOG_FATAL, "Invalid file index %d in filtergraph description %s.\n",
|
av_log(NULL, AV_LOG_FATAL, "Invalid file index %d in filtergraph description %s.\n",
|
||||||
file_idx, fg->graph_desc);
|
file_idx, fg->graph_desc);
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
s = input_files[file_idx]->ctx;
|
s = input_files[file_idx]->ctx;
|
||||||
|
|
||||||
@@ -248,7 +247,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
if (!st) {
|
if (!st) {
|
||||||
av_log(NULL, AV_LOG_FATAL, "Stream specifier '%s' in filtergraph description %s "
|
av_log(NULL, AV_LOG_FATAL, "Stream specifier '%s' in filtergraph description %s "
|
||||||
"matches no streams.\n", p, fg->graph_desc);
|
"matches no streams.\n", p, fg->graph_desc);
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
ist = input_streams[input_files[file_idx]->ist_index + st->index];
|
ist = input_streams[input_files[file_idx]->ist_index + st->index];
|
||||||
} else {
|
} else {
|
||||||
@@ -262,7 +261,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
av_log(NULL, AV_LOG_FATAL, "Cannot find a matching stream for "
|
av_log(NULL, AV_LOG_FATAL, "Cannot find a matching stream for "
|
||||||
"unlabeled input pad %d on filter %s\n", in->pad_idx,
|
"unlabeled input pad %d on filter %s\n", in->pad_idx,
|
||||||
in->filter_ctx->name);
|
in->filter_ctx->name);
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
av_assert0(ist);
|
av_assert0(ist);
|
||||||
@@ -273,7 +272,7 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
|
|
||||||
GROW_ARRAY(fg->inputs, fg->nb_inputs);
|
GROW_ARRAY(fg->inputs, fg->nb_inputs);
|
||||||
if (!(fg->inputs[fg->nb_inputs - 1] = av_mallocz(sizeof(*fg->inputs[0]))))
|
if (!(fg->inputs[fg->nb_inputs - 1] = av_mallocz(sizeof(*fg->inputs[0]))))
|
||||||
exit_program(1);
|
exit(1);
|
||||||
fg->inputs[fg->nb_inputs - 1]->ist = ist;
|
fg->inputs[fg->nb_inputs - 1]->ist = ist;
|
||||||
fg->inputs[fg->nb_inputs - 1]->graph = fg;
|
fg->inputs[fg->nb_inputs - 1]->graph = fg;
|
||||||
|
|
||||||
@@ -281,72 +280,22 @@ static void init_input_filter(FilterGraph *fg, AVFilterInOut *in)
|
|||||||
ist->filters[ist->nb_filters - 1] = fg->inputs[fg->nb_inputs - 1];
|
ist->filters[ist->nb_filters - 1] = fg->inputs[fg->nb_inputs - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
static int insert_trim(int64_t start_time, int64_t duration,
|
|
||||||
AVFilterContext **last_filter, int *pad_idx,
|
|
||||||
const char *filter_name)
|
|
||||||
{
|
|
||||||
AVFilterGraph *graph = (*last_filter)->graph;
|
|
||||||
AVFilterContext *ctx;
|
|
||||||
const AVFilter *trim;
|
|
||||||
enum AVMediaType type = avfilter_pad_get_type((*last_filter)->output_pads, *pad_idx);
|
|
||||||
const char *name = (type == AVMEDIA_TYPE_VIDEO) ? "trim" : "atrim";
|
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
if (duration == INT64_MAX && start_time == AV_NOPTS_VALUE)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
trim = avfilter_get_by_name(name);
|
|
||||||
if (!trim) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "%s filter not present, cannot limit "
|
|
||||||
"recording time.\n", name);
|
|
||||||
return AVERROR_FILTER_NOT_FOUND;
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx = avfilter_graph_alloc_filter(graph, trim, filter_name);
|
|
||||||
if (!ctx)
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
|
|
||||||
if (duration != INT64_MAX) {
|
|
||||||
ret = av_opt_set_int(ctx, "durationi", duration,
|
|
||||||
AV_OPT_SEARCH_CHILDREN);
|
|
||||||
}
|
|
||||||
if (ret >= 0 && start_time != AV_NOPTS_VALUE) {
|
|
||||||
ret = av_opt_set_int(ctx, "starti", start_time,
|
|
||||||
AV_OPT_SEARCH_CHILDREN);
|
|
||||||
}
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(ctx, AV_LOG_ERROR, "Error configuring the %s filter", name);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = avfilter_init_str(ctx, NULL);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = avfilter_link(*last_filter, *pad_idx, ctx, 0);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
*last_filter = ctx;
|
|
||||||
*pad_idx = 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
|
static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
|
||||||
{
|
{
|
||||||
char *pix_fmts;
|
char *pix_fmts;
|
||||||
OutputStream *ost = ofilter->ost;
|
OutputStream *ost = ofilter->ost;
|
||||||
OutputFile *of = output_files[ost->file_index];
|
|
||||||
AVCodecContext *codec = ost->st->codec;
|
AVCodecContext *codec = ost->st->codec;
|
||||||
AVFilterContext *last_filter = out->filter_ctx;
|
AVFilterContext *last_filter = out->filter_ctx;
|
||||||
int pad_idx = out->pad_idx;
|
int pad_idx = out->pad_idx;
|
||||||
int ret;
|
int ret;
|
||||||
char name[255];
|
char name[255];
|
||||||
|
AVBufferSinkParams *buffersink_params = av_buffersink_params_alloc();
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "output stream %d:%d", ost->file_index, ost->index);
|
snprintf(name, sizeof(name), "output stream %d:%d", ost->file_index, ost->index);
|
||||||
ret = avfilter_graph_create_filter(&ofilter->filter,
|
ret = avfilter_graph_create_filter(&ofilter->filter,
|
||||||
avfilter_get_by_name("buffersink"),
|
avfilter_get_by_name("ffbuffersink"),
|
||||||
name, NULL, NULL, fg->graph);
|
name, NULL, NULL, fg->graph);
|
||||||
|
av_freep(&buffersink_params);
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
@@ -355,7 +304,7 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
char args[255];
|
char args[255];
|
||||||
AVFilterContext *filter;
|
AVFilterContext *filter;
|
||||||
|
|
||||||
snprintf(args, sizeof(args), "%d:%d:0x%X",
|
snprintf(args, sizeof(args), "%d:%d:flags=0x%X",
|
||||||
codec->width,
|
codec->width,
|
||||||
codec->height,
|
codec->height,
|
||||||
(unsigned)ost->sws_flags);
|
(unsigned)ost->sws_flags);
|
||||||
@@ -375,18 +324,17 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
AVFilterContext *filter;
|
AVFilterContext *filter;
|
||||||
snprintf(name, sizeof(name), "pixel format for output stream %d:%d",
|
snprintf(name, sizeof(name), "pixel format for output stream %d:%d",
|
||||||
ost->file_index, ost->index);
|
ost->file_index, ost->index);
|
||||||
ret = avfilter_graph_create_filter(&filter,
|
if ((ret = avfilter_graph_create_filter(&filter,
|
||||||
avfilter_get_by_name("format"),
|
avfilter_get_by_name("format"),
|
||||||
"format", pix_fmts, NULL,
|
"format", pix_fmts, NULL,
|
||||||
fg->graph);
|
fg->graph)) < 0)
|
||||||
av_freep(&pix_fmts);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
return ret;
|
||||||
if ((ret = avfilter_link(last_filter, pad_idx, filter, 0)) < 0)
|
if ((ret = avfilter_link(last_filter, pad_idx, filter, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
last_filter = filter;
|
last_filter = filter;
|
||||||
pad_idx = 0;
|
pad_idx = 0;
|
||||||
|
av_freep(&pix_fmts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ost->frame_rate.num && 0) {
|
if (ost->frame_rate.num && 0) {
|
||||||
@@ -409,14 +357,6 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
pad_idx = 0;
|
pad_idx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "trim for output stream %d:%d",
|
|
||||||
ost->file_index, ost->index);
|
|
||||||
ret = insert_trim(of->start_time, of->recording_time,
|
|
||||||
&last_filter, &pad_idx, name);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
|
|
||||||
if ((ret = avfilter_link(last_filter, pad_idx, ofilter->filter, 0)) < 0)
|
if ((ret = avfilter_link(last_filter, pad_idx, ofilter->filter, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@@ -426,22 +366,24 @@ static int configure_output_video_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
|
static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out)
|
||||||
{
|
{
|
||||||
OutputStream *ost = ofilter->ost;
|
OutputStream *ost = ofilter->ost;
|
||||||
OutputFile *of = output_files[ost->file_index];
|
|
||||||
AVCodecContext *codec = ost->st->codec;
|
AVCodecContext *codec = ost->st->codec;
|
||||||
AVFilterContext *last_filter = out->filter_ctx;
|
AVFilterContext *last_filter = out->filter_ctx;
|
||||||
int pad_idx = out->pad_idx;
|
int pad_idx = out->pad_idx;
|
||||||
char *sample_fmts, *sample_rates, *channel_layouts;
|
char *sample_fmts, *sample_rates, *channel_layouts;
|
||||||
char name[255];
|
char name[255];
|
||||||
int ret;
|
int ret;
|
||||||
|
AVABufferSinkParams *params = av_abuffersink_params_alloc();
|
||||||
|
|
||||||
|
if (!params)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
params->all_channel_counts = 1;
|
||||||
snprintf(name, sizeof(name), "output stream %d:%d", ost->file_index, ost->index);
|
snprintf(name, sizeof(name), "output stream %d:%d", ost->file_index, ost->index);
|
||||||
ret = avfilter_graph_create_filter(&ofilter->filter,
|
ret = avfilter_graph_create_filter(&ofilter->filter,
|
||||||
avfilter_get_by_name("abuffersink"),
|
avfilter_get_by_name("ffabuffersink"),
|
||||||
name, NULL, NULL, fg->graph);
|
name, NULL, params, fg->graph);
|
||||||
|
av_freep(¶ms);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
if ((ret = av_opt_set_int(ofilter->filter, "all_channel_counts", 1, AV_OPT_SEARCH_CHILDREN)) < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
#define AUTO_INSERT_FILTER(opt_name, filter_name, arg) do { \
|
#define AUTO_INSERT_FILTER(opt_name, filter_name, arg) do { \
|
||||||
AVFilterContext *filt_ctx; \
|
AVFilterContext *filt_ctx; \
|
||||||
@@ -524,27 +466,6 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
AUTO_INSERT_FILTER("-vol", "volume", args);
|
AUTO_INSERT_FILTER("-vol", "volume", args);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ost->apad && of->shortest) {
|
|
||||||
char args[256];
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i=0; i<of->ctx->nb_streams; i++)
|
|
||||||
if (of->ctx->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (i<of->ctx->nb_streams) {
|
|
||||||
snprintf(args, sizeof(args), "%s", ost->apad);
|
|
||||||
AUTO_INSERT_FILTER("-apad", "apad", args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "trim for output stream %d:%d",
|
|
||||||
ost->file_index, ost->index);
|
|
||||||
ret = insert_trim(of->start_time, of->recording_time,
|
|
||||||
&last_filter, &pad_idx, name);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if ((ret = avfilter_link(last_filter, pad_idx, ofilter->filter, 0)) < 0)
|
if ((ret = avfilter_link(last_filter, pad_idx, ofilter->filter, 0)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@@ -555,11 +476,11 @@ static int configure_output_audio_filter(FilterGraph *fg, OutputFilter *ofilter,
|
|||||||
{ \
|
{ \
|
||||||
AVFilterContext *ctx = inout->filter_ctx; \
|
AVFilterContext *ctx = inout->filter_ctx; \
|
||||||
AVFilterPad *pads = in ? ctx->input_pads : ctx->output_pads; \
|
AVFilterPad *pads = in ? ctx->input_pads : ctx->output_pads; \
|
||||||
int nb_pads = in ? ctx->nb_inputs : ctx->nb_outputs; \
|
int nb_pads = in ? ctx->input_count : ctx->output_count; \
|
||||||
AVIOContext *pb; \
|
AVIOContext *pb; \
|
||||||
\
|
\
|
||||||
if (avio_open_dyn_buf(&pb) < 0) \
|
if (avio_open_dyn_buf(&pb) < 0) \
|
||||||
exit_program(1); \
|
exit(1); \
|
||||||
\
|
\
|
||||||
avio_printf(pb, "%s", ctx->filter->name); \
|
avio_printf(pb, "%s", ctx->filter->name); \
|
||||||
if (nb_pads > 1) \
|
if (nb_pads > 1) \
|
||||||
@@ -583,7 +504,9 @@ int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOu
|
|||||||
static int sub2video_prepare(InputStream *ist)
|
static int sub2video_prepare(InputStream *ist)
|
||||||
{
|
{
|
||||||
AVFormatContext *avf = input_files[ist->file_index]->ctx;
|
AVFormatContext *avf = input_files[ist->file_index]->ctx;
|
||||||
int i, w, h;
|
int i, ret, w, h;
|
||||||
|
uint8_t *image[4];
|
||||||
|
int linesize[4];
|
||||||
|
|
||||||
/* Compute the size of the canvas for the subtitles stream.
|
/* Compute the size of the canvas for the subtitles stream.
|
||||||
If the subtitles codec has set a size, use it. Otherwise use the
|
If the subtitles codec has set a size, use it. Otherwise use the
|
||||||
@@ -610,35 +533,45 @@ static int sub2video_prepare(InputStream *ist)
|
|||||||
palettes for all rectangles are identical or compatible */
|
palettes for all rectangles are identical or compatible */
|
||||||
ist->resample_pix_fmt = ist->st->codec->pix_fmt = AV_PIX_FMT_RGB32;
|
ist->resample_pix_fmt = ist->st->codec->pix_fmt = AV_PIX_FMT_RGB32;
|
||||||
|
|
||||||
ist->sub2video.frame = av_frame_alloc();
|
ret = av_image_alloc(image, linesize, w, h, AV_PIX_FMT_RGB32, 32);
|
||||||
if (!ist->sub2video.frame)
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
memset(image[0], 0, h * linesize[0]);
|
||||||
|
ist->sub2video.ref = avfilter_get_video_buffer_ref_from_arrays(
|
||||||
|
image, linesize, AV_PERM_READ | AV_PERM_PRESERVE,
|
||||||
|
w, h, AV_PIX_FMT_RGB32);
|
||||||
|
if (!ist->sub2video.ref) {
|
||||||
|
av_free(image[0]);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||||
AVFilterInOut *in)
|
AVFilterInOut *in)
|
||||||
{
|
{
|
||||||
AVFilterContext *last_filter;
|
AVFilterContext *first_filter = in->filter_ctx;
|
||||||
const AVFilter *buffer_filt = avfilter_get_by_name("buffer");
|
AVFilter *filter = avfilter_get_by_name("buffer");
|
||||||
InputStream *ist = ifilter->ist;
|
InputStream *ist = ifilter->ist;
|
||||||
InputFile *f = input_files[ist->file_index];
|
|
||||||
AVRational tb = ist->framerate.num ? av_inv_q(ist->framerate) :
|
AVRational tb = ist->framerate.num ? av_inv_q(ist->framerate) :
|
||||||
ist->st->time_base;
|
ist->st->time_base;
|
||||||
AVRational fr = ist->framerate;
|
AVRational fr = ist->framerate.num ? ist->framerate :
|
||||||
|
ist->st->r_frame_rate;
|
||||||
AVRational sar;
|
AVRational sar;
|
||||||
AVBPrint args;
|
AVBPrint args;
|
||||||
char name[255];
|
char name[255];
|
||||||
int ret, pad_idx = 0;
|
int pad_idx = in->pad_idx;
|
||||||
|
int ret;
|
||||||
|
|
||||||
if (ist->st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
|
if (!ist->framerate.num && ist->st->codec->ticks_per_frame>1) {
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot connect video filter to audio input\n");
|
AVRational codec_fr = av_inv_q(ist->st->codec->time_base);
|
||||||
return AVERROR(EINVAL);
|
AVRational avg_fr = ist->st->avg_frame_rate;
|
||||||
|
codec_fr.den *= ist->st->codec->ticks_per_frame;
|
||||||
|
if ( codec_fr.num>0 && codec_fr.den>0 && av_q2d(codec_fr) < av_q2d(fr)*0.7
|
||||||
|
&& fabs(1.0 - av_q2d(av_div_q(avg_fr, fr)))>0.1)
|
||||||
|
fr = codec_fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fr.num)
|
|
||||||
fr = av_guess_frame_rate(input_files[ist->file_index]->ctx, ist->st, NULL);
|
|
||||||
|
|
||||||
if (ist->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
if (ist->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
|
||||||
ret = sub2video_prepare(ist);
|
ret = sub2video_prepare(ist);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@@ -662,10 +595,9 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
|
snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
|
||||||
ist->file_index, ist->st->index);
|
ist->file_index, ist->st->index);
|
||||||
|
|
||||||
if ((ret = avfilter_graph_create_filter(&ifilter->filter, buffer_filt, name,
|
if ((ret = avfilter_graph_create_filter(&ifilter->filter, filter, name,
|
||||||
args.str, NULL, fg->graph)) < 0)
|
args.str, NULL, fg->graph)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
last_filter = ifilter->filter;
|
|
||||||
|
|
||||||
if (ist->framerate.num) {
|
if (ist->framerate.num) {
|
||||||
AVFilterContext *setpts;
|
AVFilterContext *setpts;
|
||||||
@@ -678,37 +610,14 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
fg->graph)) < 0)
|
fg->graph)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if ((ret = avfilter_link(last_filter, 0, setpts, 0)) < 0)
|
if ((ret = avfilter_link(setpts, 0, first_filter, pad_idx)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
last_filter = setpts;
|
first_filter = setpts;
|
||||||
|
pad_idx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_deinterlace) {
|
if ((ret = avfilter_link(ifilter->filter, 0, first_filter, pad_idx)) < 0)
|
||||||
AVFilterContext *yadif;
|
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "deinterlace input from stream %d:%d",
|
|
||||||
ist->file_index, ist->st->index);
|
|
||||||
if ((ret = avfilter_graph_create_filter(&yadif,
|
|
||||||
avfilter_get_by_name("yadif"),
|
|
||||||
name, "", NULL,
|
|
||||||
fg->graph)) < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if ((ret = avfilter_link(last_filter, 0, yadif, 0)) < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
last_filter = yadif;
|
|
||||||
}
|
|
||||||
|
|
||||||
snprintf(name, sizeof(name), "trim for input stream %d:%d",
|
|
||||||
ist->file_index, ist->st->index);
|
|
||||||
ret = insert_trim(((f->start_time == AV_NOPTS_VALUE) || !f->accurate_seek) ?
|
|
||||||
AV_NOPTS_VALUE : 0, f->recording_time, &last_filter, &pad_idx, name);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if ((ret = avfilter_link(last_filter, 0, in->filter_ctx, in->pad_idx)) < 0)
|
|
||||||
return ret;
|
return ret;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -716,18 +625,13 @@ static int configure_input_video_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
||||||
AVFilterInOut *in)
|
AVFilterInOut *in)
|
||||||
{
|
{
|
||||||
AVFilterContext *last_filter;
|
AVFilterContext *first_filter = in->filter_ctx;
|
||||||
const AVFilter *abuffer_filt = avfilter_get_by_name("abuffer");
|
AVFilter *filter = avfilter_get_by_name("abuffer");
|
||||||
InputStream *ist = ifilter->ist;
|
InputStream *ist = ifilter->ist;
|
||||||
InputFile *f = input_files[ist->file_index];
|
int pad_idx = in->pad_idx;
|
||||||
AVBPrint args;
|
AVBPrint args;
|
||||||
char name[255];
|
char name[255];
|
||||||
int ret, pad_idx = 0;
|
int ret;
|
||||||
|
|
||||||
if (ist->st->codec->codec_type != AVMEDIA_TYPE_AUDIO) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Cannot connect audio filter to non audio input\n");
|
|
||||||
return AVERROR(EINVAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC);
|
av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC);
|
||||||
av_bprintf(&args, "time_base=%d/%d:sample_rate=%d:sample_fmt=%s",
|
av_bprintf(&args, "time_base=%d/%d:sample_rate=%d:sample_fmt=%s",
|
||||||
@@ -742,11 +646,10 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
|
snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,
|
||||||
ist->file_index, ist->st->index);
|
ist->file_index, ist->st->index);
|
||||||
|
|
||||||
if ((ret = avfilter_graph_create_filter(&ifilter->filter, abuffer_filt,
|
if ((ret = avfilter_graph_create_filter(&ifilter->filter, filter,
|
||||||
name, args.str, NULL,
|
name, args.str, NULL,
|
||||||
fg->graph)) < 0)
|
fg->graph)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
last_filter = ifilter->filter;
|
|
||||||
|
|
||||||
#define AUTO_INSERT_FILTER_INPUT(opt_name, filter_name, arg) do { \
|
#define AUTO_INSERT_FILTER_INPUT(opt_name, filter_name, arg) do { \
|
||||||
AVFilterContext *filt_ctx; \
|
AVFilterContext *filt_ctx; \
|
||||||
@@ -762,11 +665,11 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
if (ret < 0) \
|
if (ret < 0) \
|
||||||
return ret; \
|
return ret; \
|
||||||
\
|
\
|
||||||
ret = avfilter_link(last_filter, 0, filt_ctx, 0); \
|
ret = avfilter_link(filt_ctx, 0, first_filter, pad_idx); \
|
||||||
if (ret < 0) \
|
if (ret < 0) \
|
||||||
return ret; \
|
return ret; \
|
||||||
\
|
\
|
||||||
last_filter = filt_ctx; \
|
first_filter = filt_ctx; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
if (audio_sync_method > 0) {
|
if (audio_sync_method > 0) {
|
||||||
@@ -802,15 +705,7 @@ static int configure_input_audio_filter(FilterGraph *fg, InputFilter *ifilter,
|
|||||||
snprintf(args, sizeof(args), "%f", audio_volume / 256.);
|
snprintf(args, sizeof(args), "%f", audio_volume / 256.);
|
||||||
AUTO_INSERT_FILTER_INPUT("-vol", "volume", args);
|
AUTO_INSERT_FILTER_INPUT("-vol", "volume", args);
|
||||||
}
|
}
|
||||||
|
if ((ret = avfilter_link(ifilter->filter, 0, first_filter, pad_idx)) < 0)
|
||||||
snprintf(name, sizeof(name), "trim for input stream %d:%d",
|
|
||||||
ist->file_index, ist->st->index);
|
|
||||||
ret = insert_trim(((f->start_time == AV_NOPTS_VALUE) || !f->accurate_seek) ?
|
|
||||||
AV_NOPTS_VALUE : 0, f->recording_time, &last_filter, &pad_idx, name);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
if ((ret = avfilter_link(last_filter, 0, in->filter_ctx, in->pad_idx)) < 0)
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -865,10 +760,6 @@ int configure_filtergraph(FilterGraph *fg)
|
|||||||
if (strlen(args))
|
if (strlen(args))
|
||||||
args[strlen(args) - 1] = '\0';
|
args[strlen(args) - 1] = '\0';
|
||||||
fg->graph->resample_lavr_opts = av_strdup(args);
|
fg->graph->resample_lavr_opts = av_strdup(args);
|
||||||
|
|
||||||
e = av_dict_get(ost->opts, "threads", NULL, 0);
|
|
||||||
if (e)
|
|
||||||
av_opt_set(fg->graph, "threads", e->value, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, &outputs)) < 0)
|
if ((ret = avfilter_graph_parse2(fg->graph, graph_desc, &inputs, &outputs)) < 0)
|
||||||
@@ -902,7 +793,7 @@ int configure_filtergraph(FilterGraph *fg)
|
|||||||
for (cur = outputs; cur;) {
|
for (cur = outputs; cur;) {
|
||||||
GROW_ARRAY(fg->outputs, fg->nb_outputs);
|
GROW_ARRAY(fg->outputs, fg->nb_outputs);
|
||||||
if (!(fg->outputs[fg->nb_outputs - 1] = av_mallocz(sizeof(*fg->outputs[0]))))
|
if (!(fg->outputs[fg->nb_outputs - 1] = av_mallocz(sizeof(*fg->outputs[0]))))
|
||||||
exit_program(1);
|
exit(1);
|
||||||
fg->outputs[fg->nb_outputs - 1]->graph = fg;
|
fg->outputs[fg->nb_outputs - 1]->graph = fg;
|
||||||
fg->outputs[fg->nb_outputs - 1]->out_tmp = cur;
|
fg->outputs[fg->nb_outputs - 1]->out_tmp = cur;
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
|
|||||||
+253
-506
File diff suppressed because it is too large
Load Diff
@@ -37,9 +37,7 @@
|
|||||||
#include "libavutil/pixdesc.h"
|
#include "libavutil/pixdesc.h"
|
||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
#include "libavutil/libm.h"
|
#include "libavutil/libm.h"
|
||||||
#include "libavutil/parseutils.h"
|
|
||||||
#include "libavutil/timecode.h"
|
#include "libavutil/timecode.h"
|
||||||
#include "libavutil/timestamp.h"
|
|
||||||
#include "libavdevice/avdevice.h"
|
#include "libavdevice/avdevice.h"
|
||||||
#include "libswscale/swscale.h"
|
#include "libswscale/swscale.h"
|
||||||
#include "libswresample/swresample.h"
|
#include "libswresample/swresample.h"
|
||||||
@@ -54,12 +52,10 @@ static int do_count_frames = 0;
|
|||||||
static int do_count_packets = 0;
|
static int do_count_packets = 0;
|
||||||
static int do_read_frames = 0;
|
static int do_read_frames = 0;
|
||||||
static int do_read_packets = 0;
|
static int do_read_packets = 0;
|
||||||
static int do_show_chapters = 0;
|
|
||||||
static int do_show_error = 0;
|
static int do_show_error = 0;
|
||||||
static int do_show_format = 0;
|
static int do_show_format = 0;
|
||||||
static int do_show_frames = 0;
|
static int do_show_frames = 0;
|
||||||
static int do_show_packets = 0;
|
static int do_show_packets = 0;
|
||||||
static int do_show_programs = 0;
|
|
||||||
static int do_show_streams = 0;
|
static int do_show_streams = 0;
|
||||||
static int do_show_stream_disposition = 0;
|
static int do_show_stream_disposition = 0;
|
||||||
static int do_show_data = 0;
|
static int do_show_data = 0;
|
||||||
@@ -75,17 +71,6 @@ static int show_private_data = 1;
|
|||||||
static char *print_format;
|
static char *print_format;
|
||||||
static char *stream_specifier;
|
static char *stream_specifier;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
int id; ///< identifier
|
|
||||||
int64_t start, end; ///< start, end in second/AV_TIME_BASE units
|
|
||||||
int has_start, has_end;
|
|
||||||
int start_is_offset, end_is_offset;
|
|
||||||
int duration_frames;
|
|
||||||
} ReadInterval;
|
|
||||||
|
|
||||||
static ReadInterval *read_intervals;
|
|
||||||
static int read_intervals_nb = 0;
|
|
||||||
|
|
||||||
/* section structure definition */
|
/* section structure definition */
|
||||||
|
|
||||||
#define SECTION_MAX_NB_CHILDREN 10
|
#define SECTION_MAX_NB_CHILDREN 10
|
||||||
@@ -108,9 +93,6 @@ struct section {
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SECTION_ID_NONE = -1,
|
SECTION_ID_NONE = -1,
|
||||||
SECTION_ID_CHAPTER,
|
|
||||||
SECTION_ID_CHAPTER_TAGS,
|
|
||||||
SECTION_ID_CHAPTERS,
|
|
||||||
SECTION_ID_ERROR,
|
SECTION_ID_ERROR,
|
||||||
SECTION_ID_FORMAT,
|
SECTION_ID_FORMAT,
|
||||||
SECTION_ID_FORMAT_TAGS,
|
SECTION_ID_FORMAT_TAGS,
|
||||||
@@ -122,14 +104,7 @@ typedef enum {
|
|||||||
SECTION_ID_PACKET,
|
SECTION_ID_PACKET,
|
||||||
SECTION_ID_PACKETS,
|
SECTION_ID_PACKETS,
|
||||||
SECTION_ID_PACKETS_AND_FRAMES,
|
SECTION_ID_PACKETS_AND_FRAMES,
|
||||||
SECTION_ID_PROGRAM_STREAM_DISPOSITION,
|
|
||||||
SECTION_ID_PROGRAM_STREAM_TAGS,
|
|
||||||
SECTION_ID_PROGRAM,
|
|
||||||
SECTION_ID_PROGRAM_STREAMS,
|
|
||||||
SECTION_ID_PROGRAM_STREAM,
|
|
||||||
SECTION_ID_PROGRAM_TAGS,
|
|
||||||
SECTION_ID_PROGRAM_VERSION,
|
SECTION_ID_PROGRAM_VERSION,
|
||||||
SECTION_ID_PROGRAMS,
|
|
||||||
SECTION_ID_ROOT,
|
SECTION_ID_ROOT,
|
||||||
SECTION_ID_STREAM,
|
SECTION_ID_STREAM,
|
||||||
SECTION_ID_STREAM_DISPOSITION,
|
SECTION_ID_STREAM_DISPOSITION,
|
||||||
@@ -138,9 +113,6 @@ typedef enum {
|
|||||||
} SectionID;
|
} SectionID;
|
||||||
|
|
||||||
static struct section sections[] = {
|
static struct section sections[] = {
|
||||||
[SECTION_ID_CHAPTERS] = { SECTION_ID_CHAPTERS, "chapters", SECTION_FLAG_IS_ARRAY, { SECTION_ID_CHAPTER, -1 } },
|
|
||||||
[SECTION_ID_CHAPTER] = { SECTION_ID_CHAPTER, "chapter", 0, { SECTION_ID_CHAPTER_TAGS, -1 } },
|
|
||||||
[SECTION_ID_CHAPTER_TAGS] = { SECTION_ID_CHAPTER_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "chapter_tags" },
|
|
||||||
[SECTION_ID_ERROR] = { SECTION_ID_ERROR, "error", 0, { -1 } },
|
[SECTION_ID_ERROR] = { SECTION_ID_ERROR, "error", 0, { -1 } },
|
||||||
[SECTION_ID_FORMAT] = { SECTION_ID_FORMAT, "format", 0, { SECTION_ID_FORMAT_TAGS, -1 } },
|
[SECTION_ID_FORMAT] = { SECTION_ID_FORMAT, "format", 0, { SECTION_ID_FORMAT_TAGS, -1 } },
|
||||||
[SECTION_ID_FORMAT_TAGS] = { SECTION_ID_FORMAT_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "format_tags" },
|
[SECTION_ID_FORMAT_TAGS] = { SECTION_ID_FORMAT_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "format_tags" },
|
||||||
@@ -152,17 +124,10 @@ static struct section sections[] = {
|
|||||||
[SECTION_ID_PACKETS] = { SECTION_ID_PACKETS, "packets", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} },
|
[SECTION_ID_PACKETS] = { SECTION_ID_PACKETS, "packets", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} },
|
||||||
[SECTION_ID_PACKETS_AND_FRAMES] = { SECTION_ID_PACKETS_AND_FRAMES, "packets_and_frames", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} },
|
[SECTION_ID_PACKETS_AND_FRAMES] = { SECTION_ID_PACKETS_AND_FRAMES, "packets_and_frames", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET, -1} },
|
||||||
[SECTION_ID_PACKET] = { SECTION_ID_PACKET, "packet", 0, { -1 } },
|
[SECTION_ID_PACKET] = { SECTION_ID_PACKET, "packet", 0, { -1 } },
|
||||||
[SECTION_ID_PROGRAM_STREAM_DISPOSITION] = { SECTION_ID_PROGRAM_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "program_stream_disposition" },
|
|
||||||
[SECTION_ID_PROGRAM_STREAM_TAGS] = { SECTION_ID_PROGRAM_STREAM_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "program_stream_tags" },
|
|
||||||
[SECTION_ID_PROGRAM] = { SECTION_ID_PROGRAM, "program", 0, { SECTION_ID_PROGRAM_TAGS, SECTION_ID_PROGRAM_STREAMS, -1 } },
|
|
||||||
[SECTION_ID_PROGRAM_STREAMS] = { SECTION_ID_PROGRAM_STREAMS, "streams", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PROGRAM_STREAM, -1 }, .unique_name = "program_streams" },
|
|
||||||
[SECTION_ID_PROGRAM_STREAM] = { SECTION_ID_PROGRAM_STREAM, "stream", 0, { SECTION_ID_PROGRAM_STREAM_DISPOSITION, SECTION_ID_PROGRAM_STREAM_TAGS, -1 }, .unique_name = "program_stream" },
|
|
||||||
[SECTION_ID_PROGRAM_TAGS] = { SECTION_ID_PROGRAM_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "program_tags" },
|
|
||||||
[SECTION_ID_PROGRAM_VERSION] = { SECTION_ID_PROGRAM_VERSION, "program_version", 0, { -1 } },
|
[SECTION_ID_PROGRAM_VERSION] = { SECTION_ID_PROGRAM_VERSION, "program_version", 0, { -1 } },
|
||||||
[SECTION_ID_PROGRAMS] = { SECTION_ID_PROGRAMS, "programs", SECTION_FLAG_IS_ARRAY, { SECTION_ID_PROGRAM, -1 } },
|
|
||||||
[SECTION_ID_ROOT] = { SECTION_ID_ROOT, "root", SECTION_FLAG_IS_WRAPPER,
|
[SECTION_ID_ROOT] = { SECTION_ID_ROOT, "root", SECTION_FLAG_IS_WRAPPER,
|
||||||
{ SECTION_ID_CHAPTERS, SECTION_ID_FORMAT, SECTION_ID_FRAMES, SECTION_ID_PROGRAMS, SECTION_ID_STREAMS,
|
{ SECTION_ID_FORMAT, SECTION_ID_FRAMES, SECTION_ID_STREAMS, SECTION_ID_PACKETS,
|
||||||
SECTION_ID_PACKETS, SECTION_ID_ERROR, SECTION_ID_PROGRAM_VERSION, SECTION_ID_LIBRARY_VERSIONS, -1} },
|
SECTION_ID_ERROR, SECTION_ID_PROGRAM_VERSION, SECTION_ID_LIBRARY_VERSIONS, -1} },
|
||||||
[SECTION_ID_STREAMS] = { SECTION_ID_STREAMS, "streams", SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM, -1 } },
|
[SECTION_ID_STREAMS] = { SECTION_ID_STREAMS, "streams", SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM, -1 } },
|
||||||
[SECTION_ID_STREAM] = { SECTION_ID_STREAM, "stream", 0, { SECTION_ID_STREAM_DISPOSITION, SECTION_ID_STREAM_TAGS, -1 } },
|
[SECTION_ID_STREAM] = { SECTION_ID_STREAM, "stream", 0, { SECTION_ID_STREAM_DISPOSITION, SECTION_ID_STREAM_TAGS, -1 } },
|
||||||
[SECTION_ID_STREAM_DISPOSITION] = { SECTION_ID_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_disposition" },
|
[SECTION_ID_STREAM_DISPOSITION] = { SECTION_ID_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_disposition" },
|
||||||
@@ -187,7 +152,7 @@ static uint64_t *nb_streams_packets;
|
|||||||
static uint64_t *nb_streams_frames;
|
static uint64_t *nb_streams_frames;
|
||||||
static int *selected_streams;
|
static int *selected_streams;
|
||||||
|
|
||||||
static void ffprobe_cleanup(int ret)
|
static void exit_program(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < FF_ARRAY_ELEMS(sections); i++)
|
for (i = 0; i < FF_ARRAY_ELEMS(sections); i++)
|
||||||
@@ -238,6 +203,7 @@ static char *value_string(char *buf, int buf_size, struct unit_value uv)
|
|||||||
vald /= pow(10, index * 3);
|
vald /= pow(10, index * 3);
|
||||||
prefix_string = decimal_unit_prefixes[index];
|
prefix_string = decimal_unit_prefixes[index];
|
||||||
}
|
}
|
||||||
|
vali = vald;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (show_float || (use_value_prefix && vald != (long long int)vald))
|
if (show_float || (use_value_prefix && vald != (long long int)vald))
|
||||||
@@ -335,7 +301,7 @@ static int writer_open(WriterContext **wctx, const Writer *writer, const char *a
|
|||||||
{
|
{
|
||||||
int i, ret = 0;
|
int i, ret = 0;
|
||||||
|
|
||||||
if (!(*wctx = av_mallocz(sizeof(WriterContext)))) {
|
if (!(*wctx = av_malloc(sizeof(WriterContext)))) {
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@@ -703,8 +669,6 @@ typedef struct CompactContext {
|
|||||||
char *escape_mode_str;
|
char *escape_mode_str;
|
||||||
const char * (*escape_str)(AVBPrint *dst, const char *src, const char sep, void *log_ctx);
|
const char * (*escape_str)(AVBPrint *dst, const char *src, const char sep, void *log_ctx);
|
||||||
int nested_section[SECTION_MAX_NB_LEVELS];
|
int nested_section[SECTION_MAX_NB_LEVELS];
|
||||||
int has_nested_elems[SECTION_MAX_NB_LEVELS];
|
|
||||||
int terminate_line[SECTION_MAX_NB_LEVELS];
|
|
||||||
} CompactContext;
|
} CompactContext;
|
||||||
|
|
||||||
#undef OFFSET
|
#undef OFFSET
|
||||||
@@ -752,28 +716,18 @@ static void compact_print_section_header(WriterContext *wctx)
|
|||||||
const struct section *section = wctx->section[wctx->level];
|
const struct section *section = wctx->section[wctx->level];
|
||||||
const struct section *parent_section = wctx->level ?
|
const struct section *parent_section = wctx->level ?
|
||||||
wctx->section[wctx->level-1] : NULL;
|
wctx->section[wctx->level-1] : NULL;
|
||||||
compact->terminate_line[wctx->level] = 1;
|
|
||||||
compact->has_nested_elems[wctx->level] = 0;
|
|
||||||
|
|
||||||
av_bprint_clear(&wctx->section_pbuf[wctx->level]);
|
av_bprint_clear(&wctx->section_pbuf[wctx->level]);
|
||||||
if (!(section->flags & SECTION_FLAG_IS_ARRAY) && parent_section &&
|
if (parent_section &&
|
||||||
!(parent_section->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY))) {
|
!(parent_section->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY))) {
|
||||||
compact->nested_section[wctx->level] = 1;
|
compact->nested_section[wctx->level] = 1;
|
||||||
compact->has_nested_elems[wctx->level-1] = 1;
|
|
||||||
av_bprintf(&wctx->section_pbuf[wctx->level], "%s%s:",
|
av_bprintf(&wctx->section_pbuf[wctx->level], "%s%s:",
|
||||||
wctx->section_pbuf[wctx->level-1].str,
|
wctx->section_pbuf[wctx->level-1].str,
|
||||||
(char *)av_x_if_null(section->element_name, section->name));
|
(char *)av_x_if_null(section->element_name, section->name));
|
||||||
wctx->nb_item[wctx->level] = wctx->nb_item[wctx->level-1];
|
wctx->nb_item[wctx->level] = wctx->nb_item[wctx->level-1];
|
||||||
} else {
|
} else if (compact->print_section &&
|
||||||
if (parent_section && compact->has_nested_elems[wctx->level-1] &&
|
!(section->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY)))
|
||||||
(section->flags & SECTION_FLAG_IS_ARRAY)) {
|
printf("%s%c", section->name, compact->item_sep);
|
||||||
compact->terminate_line[wctx->level-1] = 0;
|
|
||||||
printf("\n");
|
|
||||||
}
|
|
||||||
if (compact->print_section &&
|
|
||||||
!(section->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY)))
|
|
||||||
printf("%s%c", section->name, compact->item_sep);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void compact_print_section_footer(WriterContext *wctx)
|
static void compact_print_section_footer(WriterContext *wctx)
|
||||||
@@ -781,7 +735,6 @@ static void compact_print_section_footer(WriterContext *wctx)
|
|||||||
CompactContext *compact = wctx->priv;
|
CompactContext *compact = wctx->priv;
|
||||||
|
|
||||||
if (!compact->nested_section[wctx->level] &&
|
if (!compact->nested_section[wctx->level] &&
|
||||||
compact->terminate_line[wctx->level] &&
|
|
||||||
!(wctx->section[wctx->level]->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY)))
|
!(wctx->section[wctx->level]->flags & (SECTION_FLAG_IS_WRAPPER|SECTION_FLAG_IS_ARRAY)))
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
@@ -1548,6 +1501,7 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
|
|||||||
print_int("interlaced_frame", frame->interlaced_frame);
|
print_int("interlaced_frame", frame->interlaced_frame);
|
||||||
print_int("top_field_first", frame->top_field_first);
|
print_int("top_field_first", frame->top_field_first);
|
||||||
print_int("repeat_pict", frame->repeat_pict);
|
print_int("repeat_pict", frame->repeat_pict);
|
||||||
|
print_int("reference", frame->reference);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AVMEDIA_TYPE_AUDIO:
|
case AVMEDIA_TYPE_AUDIO:
|
||||||
@@ -1606,93 +1560,16 @@ static av_always_inline int process_frame(WriterContext *w,
|
|||||||
return got_frame;
|
return got_frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void log_read_interval(const ReadInterval *interval, void *log_ctx, int log_level)
|
static void read_packets(WriterContext *w, AVFormatContext *fmt_ctx)
|
||||||
{
|
|
||||||
av_log(log_ctx, log_level, "id:%d", interval->id);
|
|
||||||
|
|
||||||
if (interval->has_start) {
|
|
||||||
av_log(log_ctx, log_level, " start:%s%s", interval->start_is_offset ? "+" : "",
|
|
||||||
av_ts2timestr(interval->start, &AV_TIME_BASE_Q));
|
|
||||||
} else {
|
|
||||||
av_log(log_ctx, log_level, " start:N/A");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interval->has_end) {
|
|
||||||
av_log(log_ctx, log_level, " end:%s", interval->end_is_offset ? "+" : "");
|
|
||||||
if (interval->duration_frames)
|
|
||||||
av_log(log_ctx, log_level, "#%"PRId64, interval->end);
|
|
||||||
else
|
|
||||||
av_log(log_ctx, log_level, "%s", av_ts2timestr(interval->end, &AV_TIME_BASE_Q));
|
|
||||||
} else {
|
|
||||||
av_log(log_ctx, log_level, " end:N/A");
|
|
||||||
}
|
|
||||||
|
|
||||||
av_log(log_ctx, log_level, "\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int read_interval_packets(WriterContext *w, AVFormatContext *fmt_ctx,
|
|
||||||
const ReadInterval *interval, int64_t *cur_ts)
|
|
||||||
{
|
{
|
||||||
AVPacket pkt, pkt1;
|
AVPacket pkt, pkt1;
|
||||||
AVFrame frame;
|
AVFrame frame;
|
||||||
int ret = 0, i = 0, frame_count = 0;
|
int i = 0;
|
||||||
int64_t start = -INT64_MAX, end = interval->end;
|
|
||||||
int has_start = 0, has_end = interval->has_end && !interval->end_is_offset;
|
|
||||||
|
|
||||||
av_init_packet(&pkt);
|
av_init_packet(&pkt);
|
||||||
|
|
||||||
av_log(NULL, AV_LOG_VERBOSE, "Processing read interval ");
|
|
||||||
log_read_interval(interval, NULL, AV_LOG_VERBOSE);
|
|
||||||
|
|
||||||
if (interval->has_start) {
|
|
||||||
int64_t target;
|
|
||||||
if (interval->start_is_offset) {
|
|
||||||
if (*cur_ts == AV_NOPTS_VALUE) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR,
|
|
||||||
"Could not seek to relative position since current "
|
|
||||||
"timestamp is not defined\n");
|
|
||||||
ret = AVERROR(EINVAL);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
target = *cur_ts + interval->start;
|
|
||||||
} else {
|
|
||||||
target = interval->start;
|
|
||||||
}
|
|
||||||
|
|
||||||
av_log(NULL, AV_LOG_VERBOSE, "Seeking to read interval start point %s\n",
|
|
||||||
av_ts2timestr(target, &AV_TIME_BASE_Q));
|
|
||||||
if ((ret = avformat_seek_file(fmt_ctx, -1, -INT64_MAX, target, INT64_MAX, 0)) < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Could not seek to position %"PRId64": %s\n",
|
|
||||||
interval->start, av_err2str(ret));
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while (!av_read_frame(fmt_ctx, &pkt)) {
|
while (!av_read_frame(fmt_ctx, &pkt)) {
|
||||||
if (selected_streams[pkt.stream_index]) {
|
if (selected_streams[pkt.stream_index]) {
|
||||||
AVRational tb = fmt_ctx->streams[pkt.stream_index]->time_base;
|
|
||||||
|
|
||||||
if (pkt.pts != AV_NOPTS_VALUE)
|
|
||||||
*cur_ts = av_rescale_q(pkt.pts, tb, AV_TIME_BASE_Q);
|
|
||||||
|
|
||||||
if (!has_start && *cur_ts != AV_NOPTS_VALUE) {
|
|
||||||
start = *cur_ts;
|
|
||||||
has_start = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (has_start && !has_end && interval->end_is_offset) {
|
|
||||||
end = start + interval->end;
|
|
||||||
has_end = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interval->end_is_offset && interval->duration_frames) {
|
|
||||||
if (frame_count >= interval->end)
|
|
||||||
break;
|
|
||||||
} else if (has_end && *cur_ts != AV_NOPTS_VALUE && *cur_ts >= end) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
frame_count++;
|
|
||||||
if (do_read_packets) {
|
if (do_read_packets) {
|
||||||
if (do_show_packets)
|
if (do_show_packets)
|
||||||
show_packet(w, fmt_ctx, &pkt, i++);
|
show_packet(w, fmt_ctx, &pkt, i++);
|
||||||
@@ -1714,33 +1591,9 @@ static int read_interval_packets(WriterContext *w, AVFormatContext *fmt_ctx,
|
|||||||
if (do_read_frames)
|
if (do_read_frames)
|
||||||
while (process_frame(w, fmt_ctx, &frame, &pkt) > 0);
|
while (process_frame(w, fmt_ctx, &frame, &pkt) > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
end:
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Could not read packets in interval ");
|
|
||||||
log_read_interval(interval, NULL, AV_LOG_ERROR);
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void read_packets(WriterContext *w, AVFormatContext *fmt_ctx)
|
static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx)
|
||||||
{
|
|
||||||
int i, ret = 0;
|
|
||||||
int64_t cur_ts = fmt_ctx->start_time;
|
|
||||||
|
|
||||||
if (read_intervals_nb == 0) {
|
|
||||||
ReadInterval interval = (ReadInterval) { .has_start = 0, .has_end = 0 };
|
|
||||||
ret = read_interval_packets(w, fmt_ctx, &interval, &cur_ts);
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < read_intervals_nb; i++) {
|
|
||||||
ret = read_interval_packets(w, fmt_ctx, &read_intervals[i], &cur_ts);
|
|
||||||
if (ret < 0)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_idx, int in_program)
|
|
||||||
{
|
{
|
||||||
AVStream *stream = fmt_ctx->streams[stream_idx];
|
AVStream *stream = fmt_ctx->streams[stream_idx];
|
||||||
AVCodecContext *dec_ctx;
|
AVCodecContext *dec_ctx;
|
||||||
@@ -1752,7 +1605,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
|||||||
|
|
||||||
av_bprint_init(&pbuf, 1, AV_BPRINT_SIZE_UNLIMITED);
|
av_bprint_init(&pbuf, 1, AV_BPRINT_SIZE_UNLIMITED);
|
||||||
|
|
||||||
writer_print_section_header(w, in_program ? SECTION_ID_PROGRAM_STREAM : SECTION_ID_STREAM);
|
writer_print_section_header(w, SECTION_ID_STREAM);
|
||||||
|
|
||||||
print_int("index", stream->index);
|
print_int("index", stream->index);
|
||||||
|
|
||||||
@@ -1823,28 +1676,8 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
|||||||
else print_str_opt("sample_fmt", "unknown");
|
else print_str_opt("sample_fmt", "unknown");
|
||||||
print_val("sample_rate", dec_ctx->sample_rate, unit_hertz_str);
|
print_val("sample_rate", dec_ctx->sample_rate, unit_hertz_str);
|
||||||
print_int("channels", dec_ctx->channels);
|
print_int("channels", dec_ctx->channels);
|
||||||
|
|
||||||
if (dec_ctx->channel_layout) {
|
|
||||||
av_bprint_clear(&pbuf);
|
|
||||||
av_bprint_channel_layout(&pbuf, dec_ctx->channels, dec_ctx->channel_layout);
|
|
||||||
print_str ("channel_layout", pbuf.str);
|
|
||||||
} else {
|
|
||||||
print_str_opt("channel_layout", "unknown");
|
|
||||||
}
|
|
||||||
|
|
||||||
print_int("bits_per_sample", av_get_bits_per_sample(dec_ctx->codec_id));
|
print_int("bits_per_sample", av_get_bits_per_sample(dec_ctx->codec_id));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case AVMEDIA_TYPE_SUBTITLE:
|
|
||||||
if (dec_ctx->width)
|
|
||||||
print_int("width", dec_ctx->width);
|
|
||||||
else
|
|
||||||
print_str_opt("width", "N/A");
|
|
||||||
if (dec_ctx->height)
|
|
||||||
print_int("height", dec_ctx->height);
|
|
||||||
else
|
|
||||||
print_str_opt("height", "N/A");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print_str_opt("codec_type", "unknown");
|
print_str_opt("codec_type", "unknown");
|
||||||
@@ -1888,7 +1721,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
|||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
if (do_show_stream_disposition) {
|
if (do_show_stream_disposition) {
|
||||||
writer_print_section_header(w, in_program ? SECTION_ID_PROGRAM_STREAM_DISPOSITION : SECTION_ID_STREAM_DISPOSITION);
|
writer_print_section_header(w, SECTION_ID_STREAM_DISPOSITION);
|
||||||
PRINT_DISPOSITION(DEFAULT, "default");
|
PRINT_DISPOSITION(DEFAULT, "default");
|
||||||
PRINT_DISPOSITION(DUB, "dub");
|
PRINT_DISPOSITION(DUB, "dub");
|
||||||
PRINT_DISPOSITION(ORIGINAL, "original");
|
PRINT_DISPOSITION(ORIGINAL, "original");
|
||||||
@@ -1903,7 +1736,7 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
|
|||||||
writer_print_section_footer(w);
|
writer_print_section_footer(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
show_tags(w, stream->metadata, in_program ? SECTION_ID_PROGRAM_STREAM_TAGS : SECTION_ID_STREAM_TAGS);
|
show_tags(w, stream->metadata, SECTION_ID_STREAM_TAGS);
|
||||||
|
|
||||||
writer_print_section_footer(w);
|
writer_print_section_footer(w);
|
||||||
av_bprint_finalize(&pbuf, NULL);
|
av_bprint_finalize(&pbuf, NULL);
|
||||||
@@ -1916,68 +1749,7 @@ static void show_streams(WriterContext *w, AVFormatContext *fmt_ctx)
|
|||||||
writer_print_section_header(w, SECTION_ID_STREAMS);
|
writer_print_section_header(w, SECTION_ID_STREAMS);
|
||||||
for (i = 0; i < fmt_ctx->nb_streams; i++)
|
for (i = 0; i < fmt_ctx->nb_streams; i++)
|
||||||
if (selected_streams[i])
|
if (selected_streams[i])
|
||||||
show_stream(w, fmt_ctx, i, 0);
|
show_stream(w, fmt_ctx, i);
|
||||||
writer_print_section_footer(w);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void show_program(WriterContext *w, AVFormatContext *fmt_ctx, AVProgram *program)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
writer_print_section_header(w, SECTION_ID_PROGRAM);
|
|
||||||
print_int("program_id", program->id);
|
|
||||||
print_int("program_num", program->program_num);
|
|
||||||
print_int("nb_streams", program->nb_stream_indexes);
|
|
||||||
print_int("pmt_pid", program->pmt_pid);
|
|
||||||
print_int("pcr_pid", program->pcr_pid);
|
|
||||||
print_ts("start_pts", program->start_time);
|
|
||||||
print_time("start_time", program->start_time, &AV_TIME_BASE_Q);
|
|
||||||
print_ts("end_pts", program->end_time);
|
|
||||||
print_time("end_time", program->end_time, &AV_TIME_BASE_Q);
|
|
||||||
show_tags(w, program->metadata, SECTION_ID_PROGRAM_TAGS);
|
|
||||||
|
|
||||||
writer_print_section_header(w, SECTION_ID_PROGRAM_STREAMS);
|
|
||||||
for (i = 0; i < program->nb_stream_indexes; i++) {
|
|
||||||
if (selected_streams[program->stream_index[i]])
|
|
||||||
show_stream(w, fmt_ctx, program->stream_index[i], 1);
|
|
||||||
}
|
|
||||||
writer_print_section_footer(w);
|
|
||||||
|
|
||||||
writer_print_section_footer(w);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void show_programs(WriterContext *w, AVFormatContext *fmt_ctx)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
writer_print_section_header(w, SECTION_ID_PROGRAMS);
|
|
||||||
for (i = 0; i < fmt_ctx->nb_programs; i++) {
|
|
||||||
AVProgram *program = fmt_ctx->programs[i];
|
|
||||||
if (!program)
|
|
||||||
continue;
|
|
||||||
show_program(w, fmt_ctx, program);
|
|
||||||
}
|
|
||||||
writer_print_section_footer(w);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void show_chapters(WriterContext *w, AVFormatContext *fmt_ctx)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
|
|
||||||
writer_print_section_header(w, SECTION_ID_CHAPTERS);
|
|
||||||
for (i = 0; i < fmt_ctx->nb_chapters; i++) {
|
|
||||||
AVChapter *chapter = fmt_ctx->chapters[i];
|
|
||||||
|
|
||||||
writer_print_section_header(w, SECTION_ID_CHAPTER);
|
|
||||||
print_int("id", chapter->id);
|
|
||||||
print_q ("time_base", chapter->time_base, '/');
|
|
||||||
print_int("start", chapter->start);
|
|
||||||
print_time("start_time", chapter->start, &chapter->time_base);
|
|
||||||
print_int("end", chapter->end);
|
|
||||||
print_time("end_time", chapter->end, &chapter->time_base);
|
|
||||||
show_tags(w, chapter->metadata, SECTION_ID_CHAPTER_TAGS);
|
|
||||||
writer_print_section_footer(w);
|
|
||||||
}
|
|
||||||
writer_print_section_footer(w);
|
writer_print_section_footer(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1989,7 +1761,6 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
|||||||
writer_print_section_header(w, SECTION_ID_FORMAT);
|
writer_print_section_header(w, SECTION_ID_FORMAT);
|
||||||
print_str("filename", fmt_ctx->filename);
|
print_str("filename", fmt_ctx->filename);
|
||||||
print_int("nb_streams", fmt_ctx->nb_streams);
|
print_int("nb_streams", fmt_ctx->nb_streams);
|
||||||
print_int("nb_programs", fmt_ctx->nb_programs);
|
|
||||||
print_str("format_name", fmt_ctx->iformat->name);
|
print_str("format_name", fmt_ctx->iformat->name);
|
||||||
if (!do_bitexact) {
|
if (!do_bitexact) {
|
||||||
if (fmt_ctx->iformat->long_name) print_str ("format_long_name", fmt_ctx->iformat->long_name);
|
if (fmt_ctx->iformat->long_name) print_str ("format_long_name", fmt_ctx->iformat->long_name);
|
||||||
@@ -2001,7 +1772,6 @@ static void show_format(WriterContext *w, AVFormatContext *fmt_ctx)
|
|||||||
else print_str_opt("size", "N/A");
|
else print_str_opt("size", "N/A");
|
||||||
if (fmt_ctx->bit_rate > 0) print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str);
|
if (fmt_ctx->bit_rate > 0) print_val ("bit_rate", fmt_ctx->bit_rate, unit_bit_per_second_str);
|
||||||
else print_str_opt("bit_rate", "N/A");
|
else print_str_opt("bit_rate", "N/A");
|
||||||
print_int("probe_score", av_format_get_probe_score(fmt_ctx));
|
|
||||||
show_tags(w, fmt_ctx->metadata, SECTION_ID_FORMAT_TAGS);
|
show_tags(w, fmt_ctx->metadata, SECTION_ID_FORMAT_TAGS);
|
||||||
|
|
||||||
writer_print_section_footer(w);
|
writer_print_section_footer(w);
|
||||||
@@ -2024,10 +1794,9 @@ static void show_error(WriterContext *w, int err)
|
|||||||
|
|
||||||
static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
||||||
{
|
{
|
||||||
int err, i, orig_nb_streams;
|
int err, i;
|
||||||
AVFormatContext *fmt_ctx = NULL;
|
AVFormatContext *fmt_ctx = NULL;
|
||||||
AVDictionaryEntry *t;
|
AVDictionaryEntry *t;
|
||||||
AVDictionary **opts;
|
|
||||||
|
|
||||||
if ((err = avformat_open_input(&fmt_ctx, filename,
|
if ((err = avformat_open_input(&fmt_ctx, filename,
|
||||||
iformat, &format_opts)) < 0) {
|
iformat, &format_opts)) < 0) {
|
||||||
@@ -2039,17 +1808,12 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
|||||||
return AVERROR_OPTION_NOT_FOUND;
|
return AVERROR_OPTION_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fill the streams in the format context */
|
|
||||||
opts = setup_find_stream_info_opts(fmt_ctx, codec_opts);
|
|
||||||
orig_nb_streams = fmt_ctx->nb_streams;
|
|
||||||
|
|
||||||
if ((err = avformat_find_stream_info(fmt_ctx, opts)) < 0) {
|
/* fill the streams in the format context */
|
||||||
|
if ((err = avformat_find_stream_info(fmt_ctx, NULL)) < 0) {
|
||||||
print_error(filename, err);
|
print_error(filename, err);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
for (i = 0; i < orig_nb_streams; i++)
|
|
||||||
av_dict_free(&opts[i]);
|
|
||||||
av_freep(&opts);
|
|
||||||
|
|
||||||
av_dump_format(fmt_ctx, 0, filename, 0);
|
av_dump_format(fmt_ctx, 0, filename, 0);
|
||||||
|
|
||||||
@@ -2059,25 +1823,16 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
|
|||||||
AVCodec *codec;
|
AVCodec *codec;
|
||||||
|
|
||||||
if (stream->codec->codec_id == AV_CODEC_ID_PROBE) {
|
if (stream->codec->codec_id == AV_CODEC_ID_PROBE) {
|
||||||
av_log(NULL, AV_LOG_WARNING,
|
av_log(NULL, AV_LOG_ERROR,
|
||||||
"Failed to probe codec for input stream %d\n",
|
"Failed to probe codec for input stream %d\n",
|
||||||
stream->index);
|
stream->index);
|
||||||
} else if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {
|
} else if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {
|
||||||
av_log(NULL, AV_LOG_WARNING,
|
av_log(NULL, AV_LOG_ERROR,
|
||||||
"Unsupported codec with id %d for input stream %d\n",
|
"Unsupported codec with id %d for input stream %d\n",
|
||||||
stream->codec->codec_id, stream->index);
|
stream->codec->codec_id, stream->index);
|
||||||
} else {
|
} else if (avcodec_open2(stream->codec, codec, NULL) < 0) {
|
||||||
AVDictionary *opts = filter_codec_opts(codec_opts, stream->codec->codec_id,
|
av_log(NULL, AV_LOG_ERROR, "Error while opening codec for input stream %d\n",
|
||||||
fmt_ctx, stream, codec);
|
stream->index);
|
||||||
if (avcodec_open2(stream->codec, codec, &opts) < 0) {
|
|
||||||
av_log(NULL, AV_LOG_WARNING, "Could not open codec for input stream %d\n",
|
|
||||||
stream->index);
|
|
||||||
}
|
|
||||||
if ((t = av_dict_get(opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Option %s for input stream %d not found\n",
|
|
||||||
t->key, stream->index);
|
|
||||||
return AVERROR_OPTION_NOT_FOUND;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2108,57 +1863,50 @@ static int probe_file(WriterContext *wctx, const char *filename)
|
|||||||
do_read_packets = do_show_packets || do_count_packets;
|
do_read_packets = do_show_packets || do_count_packets;
|
||||||
|
|
||||||
ret = open_input_file(&fmt_ctx, filename);
|
ret = open_input_file(&fmt_ctx, filename);
|
||||||
if (ret < 0)
|
if (ret >= 0) {
|
||||||
return ret;
|
nb_streams_frames = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_frames));
|
||||||
|
nb_streams_packets = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_packets));
|
||||||
|
selected_streams = av_calloc(fmt_ctx->nb_streams, sizeof(*selected_streams));
|
||||||
|
|
||||||
nb_streams_frames = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_frames));
|
for (i = 0; i < fmt_ctx->nb_streams; i++) {
|
||||||
nb_streams_packets = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_packets));
|
if (stream_specifier) {
|
||||||
selected_streams = av_calloc(fmt_ctx->nb_streams, sizeof(*selected_streams));
|
ret = avformat_match_stream_specifier(fmt_ctx,
|
||||||
|
fmt_ctx->streams[i],
|
||||||
for (i = 0; i < fmt_ctx->nb_streams; i++) {
|
stream_specifier);
|
||||||
if (stream_specifier) {
|
if (ret < 0)
|
||||||
ret = avformat_match_stream_specifier(fmt_ctx,
|
goto end;
|
||||||
fmt_ctx->streams[i],
|
else
|
||||||
stream_specifier);
|
selected_streams[i] = ret;
|
||||||
if (ret < 0)
|
} else {
|
||||||
goto end;
|
selected_streams[i] = 1;
|
||||||
else
|
}
|
||||||
selected_streams[i] = ret;
|
|
||||||
ret = 0;
|
|
||||||
} else {
|
|
||||||
selected_streams[i] = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (do_read_frames || do_read_packets) {
|
||||||
|
if (do_show_frames && do_show_packets &&
|
||||||
|
wctx->writer->flags & WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER)
|
||||||
|
section_id = SECTION_ID_PACKETS_AND_FRAMES;
|
||||||
|
else if (do_show_packets && !do_show_frames)
|
||||||
|
section_id = SECTION_ID_PACKETS;
|
||||||
|
else // (!do_show_packets && do_show_frames)
|
||||||
|
section_id = SECTION_ID_FRAMES;
|
||||||
|
if (do_show_frames || do_show_packets)
|
||||||
|
writer_print_section_header(wctx, section_id);
|
||||||
|
read_packets(wctx, fmt_ctx);
|
||||||
|
if (do_show_frames || do_show_packets)
|
||||||
|
writer_print_section_footer(wctx);
|
||||||
|
}
|
||||||
|
if (do_show_streams)
|
||||||
|
show_streams(wctx, fmt_ctx);
|
||||||
|
if (do_show_format)
|
||||||
|
show_format(wctx, fmt_ctx);
|
||||||
|
|
||||||
|
end:
|
||||||
|
close_input_file(&fmt_ctx);
|
||||||
|
av_freep(&nb_streams_frames);
|
||||||
|
av_freep(&nb_streams_packets);
|
||||||
|
av_freep(&selected_streams);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (do_read_frames || do_read_packets) {
|
|
||||||
if (do_show_frames && do_show_packets &&
|
|
||||||
wctx->writer->flags & WRITER_FLAG_PUT_PACKETS_AND_FRAMES_IN_SAME_CHAPTER)
|
|
||||||
section_id = SECTION_ID_PACKETS_AND_FRAMES;
|
|
||||||
else if (do_show_packets && !do_show_frames)
|
|
||||||
section_id = SECTION_ID_PACKETS;
|
|
||||||
else // (!do_show_packets && do_show_frames)
|
|
||||||
section_id = SECTION_ID_FRAMES;
|
|
||||||
if (do_show_frames || do_show_packets)
|
|
||||||
writer_print_section_header(wctx, section_id);
|
|
||||||
read_packets(wctx, fmt_ctx);
|
|
||||||
if (do_show_frames || do_show_packets)
|
|
||||||
writer_print_section_footer(wctx);
|
|
||||||
}
|
|
||||||
if (do_show_programs)
|
|
||||||
show_programs(wctx, fmt_ctx);
|
|
||||||
if (do_show_streams)
|
|
||||||
show_streams(wctx, fmt_ctx);
|
|
||||||
if (do_show_chapters)
|
|
||||||
show_chapters(wctx, fmt_ctx);
|
|
||||||
if (do_show_format)
|
|
||||||
show_format(wctx, fmt_ctx);
|
|
||||||
|
|
||||||
end:
|
|
||||||
close_input_file(&fmt_ctx);
|
|
||||||
av_freep(&nb_streams_frames);
|
|
||||||
av_freep(&nb_streams_packets);
|
|
||||||
av_freep(&selected_streams);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2329,7 +2077,7 @@ static void opt_input_file(void *optctx, const char *arg)
|
|||||||
av_log(NULL, AV_LOG_ERROR,
|
av_log(NULL, AV_LOG_ERROR,
|
||||||
"Argument '%s' provided as input filename, but '%s' was already specified.\n",
|
"Argument '%s' provided as input filename, but '%s' was already specified.\n",
|
||||||
arg, input_filename);
|
arg, input_filename);
|
||||||
exit_program(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (!strcmp(arg, "-"))
|
if (!strcmp(arg, "-"))
|
||||||
arg = "pipe:";
|
arg = "pipe:";
|
||||||
@@ -2352,145 +2100,6 @@ void show_help_default(const char *opt, const char *arg)
|
|||||||
show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
|
show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Parse interval specification, according to the format:
|
|
||||||
* INTERVAL ::= [START|+START_OFFSET][%[END|+END_OFFSET]]
|
|
||||||
* INTERVALS ::= INTERVAL[,INTERVALS]
|
|
||||||
*/
|
|
||||||
static int parse_read_interval(const char *interval_spec,
|
|
||||||
ReadInterval *interval)
|
|
||||||
{
|
|
||||||
int ret = 0;
|
|
||||||
char *next, *p, *spec = av_strdup(interval_spec);
|
|
||||||
if (!spec)
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
|
|
||||||
if (!*spec) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Invalid empty interval specification\n");
|
|
||||||
ret = AVERROR(EINVAL);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
|
|
||||||
p = spec;
|
|
||||||
next = strchr(spec, '%');
|
|
||||||
if (next)
|
|
||||||
*next++ = 0;
|
|
||||||
|
|
||||||
/* parse first part */
|
|
||||||
if (*p) {
|
|
||||||
interval->has_start = 1;
|
|
||||||
|
|
||||||
if (*p == '+') {
|
|
||||||
interval->start_is_offset = 1;
|
|
||||||
p++;
|
|
||||||
} else {
|
|
||||||
interval->start_is_offset = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = av_parse_time(&interval->start, p, 1);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Invalid interval start specification '%s'\n", p);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
interval->has_start = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* parse second part */
|
|
||||||
p = next;
|
|
||||||
if (p && *p) {
|
|
||||||
int64_t us;
|
|
||||||
interval->has_end = 1;
|
|
||||||
|
|
||||||
if (*p == '+') {
|
|
||||||
interval->end_is_offset = 1;
|
|
||||||
p++;
|
|
||||||
} else {
|
|
||||||
interval->end_is_offset = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interval->end_is_offset && *p == '#') {
|
|
||||||
long long int lli;
|
|
||||||
char *tail;
|
|
||||||
interval->duration_frames = 1;
|
|
||||||
p++;
|
|
||||||
lli = strtoll(p, &tail, 10);
|
|
||||||
if (*tail || lli < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR,
|
|
||||||
"Invalid or negative value '%s' for duration number of frames\n", p);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
interval->end = lli;
|
|
||||||
} else {
|
|
||||||
ret = av_parse_time(&us, p, 1);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Invalid interval end/duration specification '%s'\n", p);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
interval->end = us;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
interval->has_end = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
end:
|
|
||||||
av_free(spec);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int parse_read_intervals(const char *intervals_spec)
|
|
||||||
{
|
|
||||||
int ret, n, i;
|
|
||||||
char *p, *spec = av_strdup(intervals_spec);
|
|
||||||
if (!spec)
|
|
||||||
return AVERROR(ENOMEM);
|
|
||||||
|
|
||||||
/* preparse specification, get number of intervals */
|
|
||||||
for (n = 0, p = spec; *p; p++)
|
|
||||||
if (*p == ',')
|
|
||||||
n++;
|
|
||||||
n++;
|
|
||||||
|
|
||||||
read_intervals = av_malloc(n * sizeof(*read_intervals));
|
|
||||||
if (!read_intervals) {
|
|
||||||
ret = AVERROR(ENOMEM);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
read_intervals_nb = n;
|
|
||||||
|
|
||||||
/* parse intervals */
|
|
||||||
p = spec;
|
|
||||||
for (i = 0; p; i++) {
|
|
||||||
char *next;
|
|
||||||
|
|
||||||
av_assert0(i < read_intervals_nb);
|
|
||||||
next = strchr(p, ',');
|
|
||||||
if (next)
|
|
||||||
*next++ = 0;
|
|
||||||
|
|
||||||
read_intervals[i].id = i;
|
|
||||||
ret = parse_read_interval(p, &read_intervals[i]);
|
|
||||||
if (ret < 0) {
|
|
||||||
av_log(NULL, AV_LOG_ERROR, "Error parsing read interval #%d '%s'\n",
|
|
||||||
i, p);
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
av_log(NULL, AV_LOG_VERBOSE, "Parsed log interval ");
|
|
||||||
log_read_interval(&read_intervals[i], NULL, AV_LOG_VERBOSE);
|
|
||||||
p = next;
|
|
||||||
}
|
|
||||||
av_assert0(i == read_intervals_nb);
|
|
||||||
|
|
||||||
end:
|
|
||||||
av_free(spec);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int opt_read_intervals(void *optctx, const char *opt, const char *arg)
|
|
||||||
{
|
|
||||||
return parse_read_intervals(arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
static int opt_pretty(void *optctx, const char *opt, const char *arg)
|
static int opt_pretty(void *optctx, const char *opt, const char *arg)
|
||||||
{
|
{
|
||||||
show_value_unit = 1;
|
show_value_unit = 1;
|
||||||
@@ -2543,7 +2152,6 @@ static int opt_show_versions(const char *opt, const char *arg)
|
|||||||
return 0; \
|
return 0; \
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFINE_OPT_SHOW_SECTION(chapters, CHAPTERS);
|
|
||||||
DEFINE_OPT_SHOW_SECTION(error, ERROR);
|
DEFINE_OPT_SHOW_SECTION(error, ERROR);
|
||||||
DEFINE_OPT_SHOW_SECTION(format, FORMAT);
|
DEFINE_OPT_SHOW_SECTION(format, FORMAT);
|
||||||
DEFINE_OPT_SHOW_SECTION(frames, FRAMES);
|
DEFINE_OPT_SHOW_SECTION(frames, FRAMES);
|
||||||
@@ -2551,7 +2159,6 @@ DEFINE_OPT_SHOW_SECTION(library_versions, LIBRARY_VERSIONS);
|
|||||||
DEFINE_OPT_SHOW_SECTION(packets, PACKETS);
|
DEFINE_OPT_SHOW_SECTION(packets, PACKETS);
|
||||||
DEFINE_OPT_SHOW_SECTION(program_version, PROGRAM_VERSION);
|
DEFINE_OPT_SHOW_SECTION(program_version, PROGRAM_VERSION);
|
||||||
DEFINE_OPT_SHOW_SECTION(streams, STREAMS);
|
DEFINE_OPT_SHOW_SECTION(streams, STREAMS);
|
||||||
DEFINE_OPT_SHOW_SECTION(programs, PROGRAMS);
|
|
||||||
|
|
||||||
static const OptionDef real_options[] = {
|
static const OptionDef real_options[] = {
|
||||||
#include "cmdutils_common_opts.h"
|
#include "cmdutils_common_opts.h"
|
||||||
@@ -2578,9 +2185,7 @@ static const OptionDef real_options[] = {
|
|||||||
{ "show_entries", HAS_ARG, {.func_arg = opt_show_entries},
|
{ "show_entries", HAS_ARG, {.func_arg = opt_show_entries},
|
||||||
"show a set of specified entries", "entry_list" },
|
"show a set of specified entries", "entry_list" },
|
||||||
{ "show_packets", 0, {(void*)&opt_show_packets}, "show packets info" },
|
{ "show_packets", 0, {(void*)&opt_show_packets}, "show packets info" },
|
||||||
{ "show_programs", 0, {(void*)&opt_show_programs}, "show programs info" },
|
|
||||||
{ "show_streams", 0, {(void*)&opt_show_streams}, "show streams info" },
|
{ "show_streams", 0, {(void*)&opt_show_streams}, "show streams info" },
|
||||||
{ "show_chapters", 0, {(void*)&opt_show_chapters}, "show chapters info" },
|
|
||||||
{ "count_frames", OPT_BOOL, {(void*)&do_count_frames}, "count the number of frames per stream" },
|
{ "count_frames", OPT_BOOL, {(void*)&do_count_frames}, "count the number of frames per stream" },
|
||||||
{ "count_packets", OPT_BOOL, {(void*)&do_count_packets}, "count the number of packets per stream" },
|
{ "count_packets", OPT_BOOL, {(void*)&do_count_packets}, "count the number of packets per stream" },
|
||||||
{ "show_program_version", 0, {(void*)&opt_show_program_version}, "show ffprobe version" },
|
{ "show_program_version", 0, {(void*)&opt_show_program_version}, "show ffprobe version" },
|
||||||
@@ -2589,7 +2194,6 @@ static const OptionDef real_options[] = {
|
|||||||
{ "show_private_data", OPT_BOOL, {(void*)&show_private_data}, "show private data" },
|
{ "show_private_data", OPT_BOOL, {(void*)&show_private_data}, "show private data" },
|
||||||
{ "private", OPT_BOOL, {(void*)&show_private_data}, "same as show_private_data" },
|
{ "private", OPT_BOOL, {(void*)&show_private_data}, "same as show_private_data" },
|
||||||
{ "bitexact", OPT_BOOL, {&do_bitexact}, "force bitexact output" },
|
{ "bitexact", OPT_BOOL, {&do_bitexact}, "force bitexact output" },
|
||||||
{ "read_intervals", HAS_ARG, {.func_arg = opt_read_intervals}, "set read intervals", "read_intervals" },
|
|
||||||
{ "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {.func_arg = opt_default}, "generic catch all option", "" },
|
{ "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {.func_arg = opt_default}, "generic catch all option", "" },
|
||||||
{ "i", HAS_ARG, {.func_arg = opt_input_file_i}, "read specified file", "input_file"},
|
{ "i", HAS_ARG, {.func_arg = opt_input_file_i}, "read specified file", "input_file"},
|
||||||
{ NULL, },
|
{ NULL, },
|
||||||
@@ -2621,7 +2225,7 @@ int main(int argc, char **argv)
|
|||||||
int ret, i;
|
int ret, i;
|
||||||
|
|
||||||
av_log_set_flags(AV_LOG_SKIP_REPEATED);
|
av_log_set_flags(AV_LOG_SKIP_REPEATED);
|
||||||
register_exit(ffprobe_cleanup);
|
atexit(exit_program);
|
||||||
|
|
||||||
options = real_options;
|
options = real_options;
|
||||||
parse_loglevel(argc, argv, options);
|
parse_loglevel(argc, argv, options);
|
||||||
@@ -2636,17 +2240,14 @@ int main(int argc, char **argv)
|
|||||||
parse_options(NULL, argc, argv, options, opt_input_file);
|
parse_options(NULL, argc, argv, options, opt_input_file);
|
||||||
|
|
||||||
/* mark things to show, based on -show_entries */
|
/* mark things to show, based on -show_entries */
|
||||||
SET_DO_SHOW(CHAPTERS, chapters);
|
|
||||||
SET_DO_SHOW(ERROR, error);
|
SET_DO_SHOW(ERROR, error);
|
||||||
SET_DO_SHOW(FORMAT, format);
|
SET_DO_SHOW(FORMAT, format);
|
||||||
SET_DO_SHOW(FRAMES, frames);
|
SET_DO_SHOW(FRAMES, frames);
|
||||||
SET_DO_SHOW(LIBRARY_VERSIONS, library_versions);
|
SET_DO_SHOW(LIBRARY_VERSIONS, library_versions);
|
||||||
SET_DO_SHOW(PACKETS, packets);
|
SET_DO_SHOW(PACKETS, packets);
|
||||||
SET_DO_SHOW(PROGRAM_VERSION, program_version);
|
SET_DO_SHOW(PROGRAM_VERSION, program_version);
|
||||||
SET_DO_SHOW(PROGRAMS, programs);
|
|
||||||
SET_DO_SHOW(STREAMS, streams);
|
SET_DO_SHOW(STREAMS, streams);
|
||||||
SET_DO_SHOW(STREAM_DISPOSITION, stream_disposition);
|
SET_DO_SHOW(STREAM_DISPOSITION, stream_disposition);
|
||||||
SET_DO_SHOW(PROGRAM_STREAM_DISPOSITION, stream_disposition);
|
|
||||||
|
|
||||||
if (do_bitexact && (do_show_program_version || do_show_library_versions)) {
|
if (do_bitexact && (do_show_program_version || do_show_library_versions)) {
|
||||||
av_log(NULL, AV_LOG_ERROR,
|
av_log(NULL, AV_LOG_ERROR,
|
||||||
@@ -2684,7 +2285,7 @@ int main(int argc, char **argv)
|
|||||||
ffprobe_show_library_versions(wctx);
|
ffprobe_show_library_versions(wctx);
|
||||||
|
|
||||||
if (!input_filename &&
|
if (!input_filename &&
|
||||||
((do_show_format || do_show_programs || do_show_streams || do_show_chapters || do_show_packets || do_show_error) ||
|
((do_show_format || do_show_streams || do_show_packets || do_show_error) ||
|
||||||
(!do_show_program_version && !do_show_library_versions))) {
|
(!do_show_program_version && !do_show_library_versions))) {
|
||||||
show_usage();
|
show_usage();
|
||||||
av_log(NULL, AV_LOG_ERROR, "You have to specify one input file.\n");
|
av_log(NULL, AV_LOG_ERROR, "You have to specify one input file.\n");
|
||||||
@@ -2702,7 +2303,6 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
end:
|
end:
|
||||||
av_freep(&print_format);
|
av_freep(&print_format);
|
||||||
av_freep(&read_intervals);
|
|
||||||
|
|
||||||
uninit_opts();
|
uninit_opts();
|
||||||
for (i = 0; i < FF_ARRAY_ELEMS(sections); i++)
|
for (i = 0; i < FF_ARRAY_ELEMS(sections); i++)
|
||||||
@@ -2710,5 +2310,5 @@ end:
|
|||||||
|
|
||||||
avformat_network_deinit();
|
avformat_network_deinit();
|
||||||
|
|
||||||
return ret < 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
+49
-20
@@ -36,7 +36,6 @@
|
|||||||
#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/rtpproto.h"
|
|
||||||
#include "libavformat/rtsp.h"
|
#include "libavformat/rtsp.h"
|
||||||
#include "libavformat/avio_internal.h"
|
#include "libavformat/avio_internal.h"
|
||||||
#include "libavformat/internal.h"
|
#include "libavformat/internal.h"
|
||||||
@@ -48,7 +47,6 @@
|
|||||||
#include "libavutil/dict.h"
|
#include "libavutil/dict.h"
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "libavutil/mathematics.h"
|
#include "libavutil/mathematics.h"
|
||||||
#include "libavutil/pixdesc.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"
|
||||||
@@ -65,6 +63,9 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#if HAVE_DLFCN_H
|
||||||
|
#include <dlfcn.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "cmdutils.h"
|
#include "cmdutils.h"
|
||||||
|
|
||||||
@@ -307,7 +308,7 @@ static int rtp_new_av_stream(HTTPContext *c,
|
|||||||
|
|
||||||
static const char *my_program_name;
|
static const char *my_program_name;
|
||||||
|
|
||||||
static const char *config_filename;
|
static const char *config_filename = "/etc/ffserver.conf";
|
||||||
|
|
||||||
static int ffserver_debug;
|
static int ffserver_debug;
|
||||||
static int no_launch;
|
static int no_launch;
|
||||||
@@ -403,14 +404,14 @@ static int resolve_host(struct in_addr *sin_addr, const char *hostname)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *ctime1(char *buf2, int buf_size)
|
static char *ctime1(char *buf2)
|
||||||
{
|
{
|
||||||
time_t ti;
|
time_t ti;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
ti = time(NULL);
|
ti = time(NULL);
|
||||||
p = ctime(&ti);
|
p = ctime(&ti);
|
||||||
av_strlcpy(buf2, p, buf_size);
|
strcpy(buf2, p);
|
||||||
p = buf2 + strlen(p) - 1;
|
p = buf2 + strlen(p) - 1;
|
||||||
if (*p == '\n')
|
if (*p == '\n')
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
@@ -423,7 +424,7 @@ static void http_vlog(const char *fmt, va_list vargs)
|
|||||||
if (logfile) {
|
if (logfile) {
|
||||||
if (print_prefix) {
|
if (print_prefix) {
|
||||||
char buf[32];
|
char buf[32];
|
||||||
ctime1(buf, sizeof(buf));
|
ctime1(buf);
|
||||||
fprintf(logfile, "%s ", buf);
|
fprintf(logfile, "%s ", buf);
|
||||||
}
|
}
|
||||||
print_prefix = strstr(fmt, "\n") != NULL;
|
print_prefix = strstr(fmt, "\n") != NULL;
|
||||||
@@ -3914,7 +3915,7 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
|
|||||||
av->rc_buffer_aggressivity = 1.0;
|
av->rc_buffer_aggressivity = 1.0;
|
||||||
|
|
||||||
if (!av->rc_eq)
|
if (!av->rc_eq)
|
||||||
av->rc_eq = av_strdup("tex^qComp");
|
av->rc_eq = "tex^qComp";
|
||||||
if (!av->i_quant_factor)
|
if (!av->i_quant_factor)
|
||||||
av->i_quant_factor = -0.8;
|
av->i_quant_factor = -0.8;
|
||||||
if (!av->b_quant_factor)
|
if (!av->b_quant_factor)
|
||||||
@@ -3962,6 +3963,32 @@ static enum AVCodecID opt_video_codec(const char *arg)
|
|||||||
return p->id;
|
return p->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* simplistic plugin support */
|
||||||
|
|
||||||
|
#if HAVE_DLOPEN
|
||||||
|
static void load_module(const char *filename)
|
||||||
|
{
|
||||||
|
void *dll;
|
||||||
|
void (*init_func)(void);
|
||||||
|
dll = dlopen(filename, RTLD_NOW);
|
||||||
|
if (!dll) {
|
||||||
|
fprintf(stderr, "Could not load module '%s' - %s\n",
|
||||||
|
filename, dlerror());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
init_func = dlsym(dll, "ffserver_module_init");
|
||||||
|
if (!init_func) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s: init function 'ffserver_module_init()' not found\n",
|
||||||
|
filename);
|
||||||
|
dlclose(dll);
|
||||||
|
}
|
||||||
|
|
||||||
|
init_func();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static int ffserver_opt_default(const char *opt, const char *arg,
|
static int ffserver_opt_default(const char *opt, const char *arg,
|
||||||
AVCodecContext *avctx, int type)
|
AVCodecContext *avctx, int type)
|
||||||
{
|
{
|
||||||
@@ -4133,7 +4160,7 @@ static int parse_ffconfig(const char *filename)
|
|||||||
} else if (!av_strcasecmp(cmd, "MaxBandwidth")) {
|
} else if (!av_strcasecmp(cmd, "MaxBandwidth")) {
|
||||||
int64_t llval;
|
int64_t llval;
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
llval = strtoll(arg, NULL, 10);
|
llval = atoll(arg);
|
||||||
if (llval < 10 || llval > 10000000) {
|
if (llval < 10 || llval > 10000000) {
|
||||||
ERROR("Invalid MaxBandwidth: %s\n", arg);
|
ERROR("Invalid MaxBandwidth: %s\n", arg);
|
||||||
} else
|
} else
|
||||||
@@ -4435,14 +4462,6 @@ 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, "PixelFormat")) {
|
|
||||||
get_arg(arg, sizeof(arg), &p);
|
|
||||||
if (stream) {
|
|
||||||
video_enc.pix_fmt = av_get_pix_fmt(arg);
|
|
||||||
if (video_enc.pix_fmt == AV_PIX_FMT_NONE) {
|
|
||||||
ERROR("Unknown pixel format: %s\n", arg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (!av_strcasecmp(cmd, "VideoGopSize")) {
|
} else if (!av_strcasecmp(cmd, "VideoGopSize")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
@@ -4535,6 +4554,14 @@ 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")) {
|
||||||
|
get_arg(arg, sizeof(arg), &p);
|
||||||
|
if (stream)
|
||||||
|
video_enc.luma_elim_threshold = atoi(arg);
|
||||||
|
} else if (!av_strcasecmp(cmd, "ChromaElim")) {
|
||||||
|
get_arg(arg, sizeof(arg), &p);
|
||||||
|
if (stream)
|
||||||
|
video_enc.chroma_elim_threshold = atoi(arg);
|
||||||
} else if (!av_strcasecmp(cmd, "LumiMask")) {
|
} else if (!av_strcasecmp(cmd, "LumiMask")) {
|
||||||
get_arg(arg, sizeof(arg), &p);
|
get_arg(arg, sizeof(arg), &p);
|
||||||
if (stream)
|
if (stream)
|
||||||
@@ -4626,7 +4653,12 @@ static int parse_ffconfig(const char *filename)
|
|||||||
redirect = NULL;
|
redirect = NULL;
|
||||||
}
|
}
|
||||||
} else if (!av_strcasecmp(cmd, "LoadModule")) {
|
} else if (!av_strcasecmp(cmd, "LoadModule")) {
|
||||||
ERROR("Loadable modules no longer supported\n");
|
get_arg(arg, sizeof(arg), &p);
|
||||||
|
#if HAVE_DLOPEN
|
||||||
|
load_module(arg);
|
||||||
|
#else
|
||||||
|
ERROR("Module support not compiled into this version: '%s'\n", arg);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
ERROR("Incorrect keyword: '%s'\n", cmd);
|
ERROR("Incorrect keyword: '%s'\n", cmd);
|
||||||
}
|
}
|
||||||
@@ -4691,8 +4723,6 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
struct sigaction sigact = { { 0 } };
|
struct sigaction sigact = { { 0 } };
|
||||||
|
|
||||||
config_filename = av_strdup("/etc/ffserver.conf");
|
|
||||||
|
|
||||||
parse_loglevel(argc, argv, options);
|
parse_loglevel(argc, argv, options);
|
||||||
av_register_all();
|
av_register_all();
|
||||||
avformat_network_init();
|
avformat_network_init();
|
||||||
@@ -4715,7 +4745,6 @@ int main(int argc, char **argv)
|
|||||||
fprintf(stderr, "Incorrect config file - exiting.\n");
|
fprintf(stderr, "Incorrect config file - exiting.\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
av_freep(&config_filename);
|
|
||||||
|
|
||||||
/* open log file if needed */
|
/* open log file if needed */
|
||||||
if (logfilename[0] != '\0') {
|
if (logfilename[0] != '\0') {
|
||||||
|
|||||||
+28
-15
@@ -26,12 +26,18 @@
|
|||||||
|
|
||||||
static av_cold int zero12v_decode_init(AVCodecContext *avctx)
|
static av_cold int zero12v_decode_init(AVCodecContext *avctx)
|
||||||
{
|
{
|
||||||
avctx->pix_fmt = AV_PIX_FMT_YUV422P16;
|
avctx->pix_fmt = PIX_FMT_YUV422P16;
|
||||||
avctx->bits_per_raw_sample = 10;
|
avctx->bits_per_raw_sample = 10;
|
||||||
|
|
||||||
if (avctx->codec_tag == MKTAG('a', '1', '2', 'v'))
|
avctx->coded_frame = avcodec_alloc_frame();
|
||||||
avpriv_request_sample(avctx, "transparency");
|
if (!avctx->coded_frame)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
if (avctx->codec_tag == MKTAG('a', '1', '2', 'v'))
|
||||||
|
av_log_ask_for_sample(avctx, "Samples with actual transparency needed\n");
|
||||||
|
|
||||||
|
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
|
||||||
|
avctx->coded_frame->key_frame = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,33 +46,28 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
{
|
{
|
||||||
int line = 0, ret;
|
int line = 0, ret;
|
||||||
const int width = avctx->width;
|
const int width = avctx->width;
|
||||||
AVFrame *pic = data;
|
AVFrame *pic = avctx->coded_frame;
|
||||||
uint16_t *y, *u, *v;
|
uint16_t *y, *u, *v;
|
||||||
const uint8_t *line_end, *src = avpkt->data;
|
const uint8_t *line_end, *src = avpkt->data;
|
||||||
int stride = avctx->width * 8 / 3;
|
int stride = avctx->width * 8 / 3;
|
||||||
|
|
||||||
|
if (pic->data[0])
|
||||||
|
avctx->release_buffer(avctx, pic);
|
||||||
|
|
||||||
if (width == 1) {
|
if (width == 1) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Width 1 not supported.\n");
|
av_log(avctx, AV_LOG_ERROR, "Width 1 not supported.\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( avctx->codec_tag == MKTAG('0', '1', '2', 'v')
|
|
||||||
&& avpkt->size % avctx->height == 0
|
|
||||||
&& avpkt->size / avctx->height * 3 >= width * 8)
|
|
||||||
stride = avpkt->size / avctx->height;
|
|
||||||
|
|
||||||
if (avpkt->size < avctx->height * stride) {
|
if (avpkt->size < avctx->height * stride) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Packet too small: %d instead of %d\n",
|
av_log(avctx, AV_LOG_ERROR, "Packet too small: %d instead of %d\n",
|
||||||
avpkt->size, avctx->height * stride);
|
avpkt->size, avctx->height * stride);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = ff_get_buffer(avctx, pic, 0)) < 0)
|
pic->reference = 0;
|
||||||
|
if ((ret = ff_get_buffer(avctx, pic)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
pic->pict_type = AV_PICTURE_TYPE_I;
|
|
||||||
pic->key_frame = 1;
|
|
||||||
|
|
||||||
y = (uint16_t *)pic->data[0];
|
y = (uint16_t *)pic->data[0];
|
||||||
u = (uint16_t *)pic->data[1];
|
u = (uint16_t *)pic->data[1];
|
||||||
v = (uint16_t *)pic->data[2];
|
v = (uint16_t *)pic->data[2];
|
||||||
@@ -144,16 +145,28 @@ static int zero12v_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
*got_frame = 1;
|
*got_frame = 1;
|
||||||
|
*(AVFrame*)data= *avctx->coded_frame;
|
||||||
|
|
||||||
return avpkt->size;
|
return avpkt->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static av_cold int zero12v_decode_close(AVCodecContext *avctx)
|
||||||
|
{
|
||||||
|
AVFrame *pic = avctx->coded_frame;
|
||||||
|
if (pic->data[0])
|
||||||
|
avctx->release_buffer(avctx, pic);
|
||||||
|
av_freep(&avctx->coded_frame);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
AVCodec ff_zero12v_decoder = {
|
AVCodec ff_zero12v_decoder = {
|
||||||
.name = "012v",
|
.name = "012v",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
|
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_012V,
|
.id = AV_CODEC_ID_012V,
|
||||||
.init = zero12v_decode_init,
|
.init = zero12v_decode_init,
|
||||||
|
.close = zero12v_decode_close,
|
||||||
.decode = zero12v_decode_frame,
|
.decode = zero12v_decode_frame,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"),
|
||||||
};
|
};
|
||||||
|
|||||||
+122
-145
@@ -24,8 +24,6 @@
|
|||||||
* 4XM codec.
|
* 4XM codec.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libavutil/avassert.h"
|
|
||||||
#include "libavutil/frame.h"
|
|
||||||
#include "libavutil/intreadwrite.h"
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "bytestream.h"
|
#include "bytestream.h"
|
||||||
@@ -33,6 +31,7 @@
|
|||||||
#include "get_bits.h"
|
#include "get_bits.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
|
#include "libavutil/avassert.h"
|
||||||
|
|
||||||
#define BLOCK_TYPE_VLC_BITS 5
|
#define BLOCK_TYPE_VLC_BITS 5
|
||||||
#define ACDC_VLC_BITS 9
|
#define ACDC_VLC_BITS 9
|
||||||
@@ -256,15 +255,15 @@ static av_cold void init_vlcs(FourXContext *f)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_mv(FourXContext *f, int linesize)
|
static void init_mv(FourXContext *f)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
if (f->version > 1)
|
if (f->version > 1)
|
||||||
f->mv[i] = mv[i][0] + mv[i][1] * linesize / 2;
|
f->mv[i] = mv[i][0] + mv[i][1] * f->current_picture->linesize[0] / 2;
|
||||||
else
|
else
|
||||||
f->mv[i] = (i & 15) - 8 + ((i >> 4) - 8) * linesize / 2;
|
f->mv[i] = (i & 15) - 8 + ((i >> 4) - 8) * f->current_picture->linesize[0] / 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -329,12 +328,12 @@ static inline void mcdc(uint16_t *dst, const uint16_t *src, int log2w,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
av_assert0(0);
|
av_assert2(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src,
|
static void decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src,
|
||||||
int log2w, int log2h, int stride)
|
int log2w, int log2h, int stride)
|
||||||
{
|
{
|
||||||
const int index = size2index[log2h][log2w];
|
const int index = size2index[log2h][log2w];
|
||||||
const int h = 1 << log2h;
|
const int h = 1 << log2h;
|
||||||
@@ -343,30 +342,57 @@ static int decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src,
|
|||||||
BLOCK_TYPE_VLC_BITS, 1);
|
BLOCK_TYPE_VLC_BITS, 1);
|
||||||
uint16_t *start = (uint16_t *)f->last_picture->data[0];
|
uint16_t *start = (uint16_t *)f->last_picture->data[0];
|
||||||
uint16_t *end = start + stride * (f->avctx->height - h + 1) - (1 << log2w);
|
uint16_t *end = start + stride * (f->avctx->height - h + 1) - (1 << log2w);
|
||||||
int ret;
|
|
||||||
int scale = 1;
|
|
||||||
unsigned dc = 0;
|
|
||||||
|
|
||||||
av_assert0(code >= 0 && code <= 6 && log2w >= 0);
|
av_assert2(code >= 0 && code <= 6);
|
||||||
|
|
||||||
if (code == 1) {
|
if (code == 0) {
|
||||||
|
if (bytestream2_get_bytes_left(&f->g) < 1) {
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
src += f->mv[bytestream2_get_byteu(&f->g)];
|
||||||
|
if (start > src || src > end) {
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mcdc(dst, src, log2w, h, stride, 1, 0);
|
||||||
|
} else if (code == 1) {
|
||||||
log2h--;
|
log2h--;
|
||||||
if ((ret = decode_p_block(f, dst, src, log2w, log2h, stride)) < 0)
|
decode_p_block(f, dst, src, log2w, log2h, stride);
|
||||||
return ret;
|
decode_p_block(f, dst + (stride << log2h),
|
||||||
return decode_p_block(f, dst + (stride << log2h),
|
src + (stride << log2h), log2w, log2h, stride);
|
||||||
src + (stride << log2h),
|
|
||||||
log2w, log2h, stride);
|
|
||||||
} else if (code == 2) {
|
} else if (code == 2) {
|
||||||
log2w--;
|
log2w--;
|
||||||
if ((ret = decode_p_block(f, dst , src, log2w, log2h, stride)) < 0)
|
decode_p_block(f, dst , src, log2w, log2h, stride);
|
||||||
return ret;
|
decode_p_block(f, dst + (1 << log2w),
|
||||||
return decode_p_block(f, dst + (1 << log2w),
|
src + (1 << log2w), log2w, log2h, stride);
|
||||||
src + (1 << log2w),
|
} else if (code == 3 && f->version < 2) {
|
||||||
log2w, log2h, stride);
|
mcdc(dst, src, log2w, h, stride, 1, 0);
|
||||||
|
} else if (code == 4) {
|
||||||
|
if (bytestream2_get_bytes_left(&f->g) < 1) {
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
src += f->mv[bytestream2_get_byteu(&f->g)];
|
||||||
|
if (start > src || src > end) {
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (bytestream2_get_bytes_left(&f->g2) < 2){
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mcdc(dst, src, log2w, h, stride, 1, bytestream2_get_le16u(&f->g2));
|
||||||
|
} else if (code == 5) {
|
||||||
|
if (bytestream2_get_bytes_left(&f->g2) < 2) {
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
mcdc(dst, src, log2w, h, stride, 0, bytestream2_get_le16u(&f->g2));
|
||||||
} else if (code == 6) {
|
} else if (code == 6) {
|
||||||
if (bytestream2_get_bytes_left(&f->g2) < 4) {
|
if (bytestream2_get_bytes_left(&f->g2) < 4) {
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return;
|
||||||
}
|
}
|
||||||
if (log2w) {
|
if (log2w) {
|
||||||
dst[0] = bytestream2_get_le16u(&f->g2);
|
dst[0] = bytestream2_get_le16u(&f->g2);
|
||||||
@@ -375,73 +401,24 @@ static int decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src,
|
|||||||
dst[0] = bytestream2_get_le16u(&f->g2);
|
dst[0] = bytestream2_get_le16u(&f->g2);
|
||||||
dst[stride] = bytestream2_get_le16u(&f->g2);
|
dst[stride] = bytestream2_get_le16u(&f->g2);
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((code&3)==0 && bytestream2_get_bytes_left(&f->g) < 1) {
|
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n");
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (code == 0) {
|
|
||||||
src += f->mv[bytestream2_get_byte(&f->g)];
|
|
||||||
} else if (code == 3 && f->version >= 2) {
|
|
||||||
return 0;
|
|
||||||
} else if (code == 4) {
|
|
||||||
src += f->mv[bytestream2_get_byte(&f->g)];
|
|
||||||
if (bytestream2_get_bytes_left(&f->g2) < 2){
|
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
dc = bytestream2_get_le16(&f->g2);
|
|
||||||
} else if (code == 5) {
|
|
||||||
if (bytestream2_get_bytes_left(&f->g2) < 2){
|
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n");
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
av_assert0(start <= src && src <= end);
|
|
||||||
scale = 0;
|
|
||||||
dc = bytestream2_get_le16(&f->g2);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (start > src || src > end) {
|
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n");
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
|
|
||||||
mcdc(dst, src, log2w, h, stride, scale, dc);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decode_p_frame(FourXContext *f, AVFrame *frame,
|
static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length)
|
||||||
const uint8_t *buf, int length)
|
|
||||||
{
|
{
|
||||||
int x, y;
|
int x, y;
|
||||||
const int width = f->avctx->width;
|
const int width = f->avctx->width;
|
||||||
const int height = f->avctx->height;
|
const int height = f->avctx->height;
|
||||||
uint16_t *dst = (uint16_t *)frame->data[0];
|
uint16_t *src = (uint16_t *)f->last_picture->data[0];
|
||||||
const int stride = frame->linesize[0] >> 1;
|
uint16_t *dst = (uint16_t *)f->current_picture->data[0];
|
||||||
uint16_t *src;
|
const int stride = f->current_picture->linesize[0] >> 1;
|
||||||
unsigned int bitstream_size, bytestream_size, wordstream_size, extra,
|
unsigned int bitstream_size, bytestream_size, wordstream_size, extra,
|
||||||
bytestream_offset, wordstream_offset;
|
bytestream_offset, wordstream_offset;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!f->last_picture->data[0]) {
|
|
||||||
if ((ret = ff_get_buffer(f->avctx, f->last_picture,
|
|
||||||
AV_GET_BUFFER_FLAG_REF)) < 0) {
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
for (y=0; y<f->avctx->height; y++)
|
|
||||||
memset(f->last_picture->data[0] + y*f->last_picture->linesize[0], 0, 2*f->avctx->width);
|
|
||||||
}
|
|
||||||
|
|
||||||
src = (uint16_t *)f->last_picture->data[0];
|
|
||||||
|
|
||||||
if (f->version > 1) {
|
if (f->version > 1) {
|
||||||
extra = 20;
|
extra = 20;
|
||||||
if (length < extra)
|
if (length < extra)
|
||||||
return AVERROR_INVALIDDATA;
|
return -1;
|
||||||
bitstream_size = AV_RL32(buf + 8);
|
bitstream_size = AV_RL32(buf + 8);
|
||||||
wordstream_size = AV_RL32(buf + 12);
|
wordstream_size = AV_RL32(buf + 12);
|
||||||
bytestream_size = AV_RL32(buf + 16);
|
bytestream_size = AV_RL32(buf + 16);
|
||||||
@@ -478,12 +455,11 @@ static int decode_p_frame(FourXContext *f, AVFrame *frame,
|
|||||||
bytestream2_init(&f->g, buf + bytestream_offset,
|
bytestream2_init(&f->g, buf + bytestream_offset,
|
||||||
length - bytestream_offset);
|
length - bytestream_offset);
|
||||||
|
|
||||||
init_mv(f, frame->linesize[0]);
|
init_mv(f);
|
||||||
|
|
||||||
for (y = 0; y < height; y += 8) {
|
for (y = 0; y < height; y += 8) {
|
||||||
for (x = 0; x < width; x += 8)
|
for (x = 0; x < width; x += 8)
|
||||||
if ((ret = decode_p_block(f, dst + x, src + x, 3, 3, stride)) < 0)
|
decode_p_block(f, dst + x, src + x, 3, 3, stride);
|
||||||
return ret;
|
|
||||||
src += 8 * stride;
|
src += 8 * stride;
|
||||||
dst += 8 * stride;
|
dst += 8 * stride;
|
||||||
}
|
}
|
||||||
@@ -506,10 +482,8 @@ static int decode_i_block(FourXContext *f, int16_t *block)
|
|||||||
|
|
||||||
/* DC coef */
|
/* DC coef */
|
||||||
val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
|
val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
|
||||||
if (val >> 4) {
|
if (val >> 4)
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "error dc run != 0\n");
|
av_log(f->avctx, AV_LOG_ERROR, "error dc run != 0\n");
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (val)
|
if (val)
|
||||||
val = get_xbits(&f->gb, val);
|
val = get_xbits(&f->gb, val);
|
||||||
@@ -527,12 +501,7 @@ static int decode_i_block(FourXContext *f, int16_t *block)
|
|||||||
if (code == 0xf0) {
|
if (code == 0xf0) {
|
||||||
i += 16;
|
i += 16;
|
||||||
} else {
|
} else {
|
||||||
if (code & 0xf) {
|
level = get_xbits(&f->gb, code & 0xf);
|
||||||
level = get_xbits(&f->gb, code & 0xf);
|
|
||||||
} else {
|
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "0 coeff\n");
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
i += code >> 4;
|
i += code >> 4;
|
||||||
if (i >= 64) {
|
if (i >= 64) {
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "run %d oveflow\n", i);
|
av_log(f->avctx, AV_LOG_ERROR, "run %d oveflow\n", i);
|
||||||
@@ -550,12 +519,12 @@ static int decode_i_block(FourXContext *f, int16_t *block)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void idct_put(FourXContext *f, AVFrame *frame, int x, int y)
|
static inline void idct_put(FourXContext *f, int x, int y)
|
||||||
{
|
{
|
||||||
int16_t (*block)[64] = f->block;
|
int16_t (*block)[64] = f->block;
|
||||||
int stride = frame->linesize[0] >> 1;
|
int stride = f->current_picture->linesize[0] >> 1;
|
||||||
int i;
|
int i;
|
||||||
uint16_t *dst = ((uint16_t*)frame->data[0]) + y * stride + x;
|
uint16_t *dst = ((uint16_t*)f->current_picture->data[0]) + y * stride + x;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
block[i][0] += 0x80 * 8 * 8;
|
block[i][0] += 0x80 * 8 * 8;
|
||||||
@@ -611,8 +580,7 @@ static int decode_i_mb(FourXContext *f)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const uint8_t *read_huffman_tables(FourXContext *f,
|
static const uint8_t *read_huffman_tables(FourXContext *f,
|
||||||
const uint8_t * const buf,
|
const uint8_t * const buf, int buf_size)
|
||||||
int buf_size)
|
|
||||||
{
|
{
|
||||||
int frequency[512] = { 0 };
|
int frequency[512] = { 0 };
|
||||||
uint8_t flag[512];
|
uint8_t flag[512];
|
||||||
@@ -635,7 +603,6 @@ static const uint8_t *read_huffman_tables(FourXContext *f,
|
|||||||
av_log(f->avctx, AV_LOG_ERROR, "invalid data in read_huffman_tables\n");
|
av_log(f->avctx, AV_LOG_ERROR, "invalid data in read_huffman_tables\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = start; i <= end; i++)
|
for (i = start; i <= end; i++)
|
||||||
frequency[i] = *ptr++;
|
frequency[i] = *ptr++;
|
||||||
start = *ptr++;
|
start = *ptr++;
|
||||||
@@ -715,14 +682,14 @@ static int mix(int c0, int c1)
|
|||||||
return red / 3 * 1024 + green / 3 * 32 + blue / 3;
|
return red / 3 * 1024 + green / 3 * 32 + blue / 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decode_i2_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf, int length)
|
static int decode_i2_frame(FourXContext *f, const uint8_t *buf, int length)
|
||||||
{
|
{
|
||||||
int x, y, x2, y2;
|
int x, y, x2, y2;
|
||||||
const int width = f->avctx->width;
|
const int width = f->avctx->width;
|
||||||
const int height = f->avctx->height;
|
const int height = f->avctx->height;
|
||||||
const int mbs = (FFALIGN(width, 16) >> 4) * (FFALIGN(height, 16) >> 4);
|
const int mbs = (FFALIGN(width, 16) >> 4) * (FFALIGN(height, 16) >> 4);
|
||||||
uint16_t *dst = (uint16_t*)frame->data[0];
|
uint16_t *dst = (uint16_t*)f->current_picture->data[0];
|
||||||
const int stride = frame->linesize[0]>>1;
|
const int stride = f->current_picture->linesize[0]>>1;
|
||||||
const uint8_t *buf_end = buf + length;
|
const uint8_t *buf_end = buf + length;
|
||||||
GetByteContext g3;
|
GetByteContext g3;
|
||||||
|
|
||||||
@@ -742,9 +709,9 @@ static int decode_i2_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf,
|
|||||||
color[1] = bytestream2_get_le16u(&g3);
|
color[1] = bytestream2_get_le16u(&g3);
|
||||||
|
|
||||||
if (color[0] & 0x8000)
|
if (color[0] & 0x8000)
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "unk bit 1\n");
|
av_log(NULL, AV_LOG_ERROR, "unk bit 1\n");
|
||||||
if (color[1] & 0x8000)
|
if (color[1] & 0x8000)
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "unk bit 2\n");
|
av_log(NULL, AV_LOG_ERROR, "unk bit 2\n");
|
||||||
|
|
||||||
color[2] = mix(color[0], color[1]);
|
color[2] = mix(color[0], color[1]);
|
||||||
color[3] = mix(color[1], color[0]);
|
color[3] = mix(color[1], color[0]);
|
||||||
@@ -764,7 +731,7 @@ static int decode_i2_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int decode_i_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf, int length)
|
static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length)
|
||||||
{
|
{
|
||||||
int x, y, ret;
|
int x, y, ret;
|
||||||
const int width = f->avctx->width;
|
const int width = f->avctx->width;
|
||||||
@@ -773,10 +740,7 @@ static int decode_i_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf, i
|
|||||||
unsigned int prestream_size;
|
unsigned int prestream_size;
|
||||||
const uint8_t *prestream;
|
const uint8_t *prestream;
|
||||||
|
|
||||||
if (bitstream_size > (1 << 26))
|
if (bitstream_size > (1<<26) || length < bitstream_size + 12) {
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
|
|
||||||
if (length < bitstream_size + 12) {
|
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "packet size too small\n");
|
av_log(f->avctx, AV_LOG_ERROR, "packet size too small\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
@@ -785,13 +749,14 @@ static int decode_i_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf, i
|
|||||||
prestream = buf + bitstream_size + 12;
|
prestream = buf + bitstream_size + 12;
|
||||||
|
|
||||||
if (prestream_size + bitstream_size + 12 != length
|
if (prestream_size + bitstream_size + 12 != length
|
||||||
|
|| bitstream_size > (1 << 26)
|
||||||
|| prestream_size > (1 << 26)) {
|
|| prestream_size > (1 << 26)) {
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d %d\n",
|
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d %d\n",
|
||||||
prestream_size, bitstream_size, length);
|
prestream_size, bitstream_size, length);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
prestream = read_huffman_tables(f, prestream, prestream_size);
|
prestream = read_huffman_tables(f, prestream, buf + length - prestream);
|
||||||
if (!prestream) {
|
if (!prestream) {
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "Error reading Huffman tables.\n");
|
av_log(f->avctx, AV_LOG_ERROR, "Error reading Huffman tables.\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
@@ -820,7 +785,7 @@ static int decode_i_frame(FourXContext *f, AVFrame *frame, const uint8_t *buf, i
|
|||||||
if ((ret = decode_i_mb(f)) < 0)
|
if ((ret = decode_i_mb(f)) < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
idct_put(f, frame, x, y);
|
idct_put(f, x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -837,40 +802,33 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
int buf_size = avpkt->size;
|
int buf_size = avpkt->size;
|
||||||
FourXContext *const f = avctx->priv_data;
|
FourXContext *const f = avctx->priv_data;
|
||||||
AVFrame *picture = data;
|
AVFrame *picture = data;
|
||||||
|
AVFrame *p;
|
||||||
int i, frame_4cc, frame_size, ret;
|
int i, frame_4cc, frame_size, ret;
|
||||||
|
|
||||||
if (buf_size < 20)
|
if (buf_size < 12)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
frame_4cc = AV_RL32(buf);
|
||||||
av_assert0(avctx->width % 16 == 0 && avctx->height % 16 == 0);
|
if (buf_size != AV_RL32(buf + 4) + 8 || buf_size < 20)
|
||||||
|
|
||||||
if (buf_size < AV_RL32(buf + 4) + 8) {
|
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n",
|
av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d\n",
|
||||||
buf_size, AV_RL32(buf + 4));
|
buf_size, AV_RL32(buf + 4));
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
|
|
||||||
frame_4cc = AV_RL32(buf);
|
|
||||||
|
|
||||||
if (frame_4cc == AV_RL32("cfrm")) {
|
if (frame_4cc == AV_RL32("cfrm")) {
|
||||||
int free_index = -1;
|
int free_index = -1;
|
||||||
int id, whole_size;
|
|
||||||
const int data_size = buf_size - 20;
|
const int data_size = buf_size - 20;
|
||||||
|
const int id = AV_RL32(buf + 12);
|
||||||
|
const int whole_size = AV_RL32(buf + 16);
|
||||||
CFrameBuffer *cfrm;
|
CFrameBuffer *cfrm;
|
||||||
|
|
||||||
if (f->version <= 1) {
|
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "cfrm in version %d\n", f->version);
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
}
|
|
||||||
|
|
||||||
id = AV_RL32(buf + 12);
|
|
||||||
whole_size = AV_RL32(buf + 16);
|
|
||||||
|
|
||||||
if (data_size < 0 || whole_size < 0) {
|
if (data_size < 0 || whole_size < 0) {
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "sizes invalid\n");
|
av_log(f->avctx, AV_LOG_ERROR, "sizes invalid\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (f->version <= 1) {
|
||||||
|
av_log(f->avctx, AV_LOG_ERROR, "cfrm in version %d\n", f->version);
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < CFRAME_BUFFER_COUNT; i++)
|
for (i = 0; i < CFRAME_BUFFER_COUNT; i++)
|
||||||
if (f->cfrm[i].id && f->cfrm[i].id < avctx->frame_number)
|
if (f->cfrm[i].id && f->cfrm[i].id < avctx->frame_number)
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "lost c frame %d\n",
|
av_log(f->avctx, AV_LOG_ERROR, "lost c frame %d\n",
|
||||||
@@ -911,9 +869,6 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
av_log(f->avctx, AV_LOG_ERROR, "cframe id mismatch %d %d\n",
|
av_log(f->avctx, AV_LOG_ERROR, "cframe id mismatch %d %d\n",
|
||||||
id, avctx->frame_number);
|
id, avctx->frame_number);
|
||||||
|
|
||||||
if (f->version <= 1)
|
|
||||||
return AVERROR_INVALIDDATA;
|
|
||||||
|
|
||||||
cfrm->size = cfrm->id = 0;
|
cfrm->size = cfrm->id = 0;
|
||||||
frame_4cc = AV_RL32("pfrm");
|
frame_4cc = AV_RL32("pfrm");
|
||||||
} else
|
} else
|
||||||
@@ -925,27 +880,43 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
|
|
||||||
FFSWAP(AVFrame*, f->current_picture, f->last_picture);
|
FFSWAP(AVFrame*, f->current_picture, f->last_picture);
|
||||||
|
|
||||||
|
p = f->current_picture;
|
||||||
|
avctx->coded_frame = p;
|
||||||
|
|
||||||
// alternatively we would have to use our own buffer management
|
// alternatively we would have to use our own buffer management
|
||||||
avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
avctx->flags |= CODEC_FLAG_EMU_EDGE;
|
||||||
|
|
||||||
if ((ret = ff_reget_buffer(avctx, f->current_picture)) < 0)
|
p->reference= 3;
|
||||||
|
if ((ret = avctx->reget_buffer(avctx, p)) < 0) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
if (frame_4cc == AV_RL32("ifr2")) {
|
if (frame_4cc == AV_RL32("ifr2")) {
|
||||||
f->current_picture->pict_type = AV_PICTURE_TYPE_I;
|
p->pict_type= AV_PICTURE_TYPE_I;
|
||||||
if ((ret = decode_i2_frame(f, f->current_picture, buf - 4, frame_size + 4)) < 0) {
|
if ((ret = decode_i2_frame(f, buf - 4, frame_size + 4)) < 0) {
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "decode i2 frame failed\n");
|
av_log(f->avctx, AV_LOG_ERROR, "decode i2 frame failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
} else if (frame_4cc == AV_RL32("ifrm")) {
|
} else if (frame_4cc == AV_RL32("ifrm")) {
|
||||||
f->current_picture->pict_type = AV_PICTURE_TYPE_I;
|
p->pict_type= AV_PICTURE_TYPE_I;
|
||||||
if ((ret = decode_i_frame(f, f->current_picture, buf, frame_size)) < 0) {
|
if ((ret = decode_i_frame(f, buf, frame_size)) < 0) {
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "decode i frame failed\n");
|
av_log(f->avctx, AV_LOG_ERROR, "decode i frame failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
} else if (frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")) {
|
} else if (frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")) {
|
||||||
f->current_picture->pict_type = AV_PICTURE_TYPE_P;
|
if (!f->last_picture->data[0]) {
|
||||||
if ((ret = decode_p_frame(f, f->current_picture, buf, frame_size)) < 0) {
|
f->last_picture->reference = 3;
|
||||||
|
if ((ret = ff_get_buffer(avctx, f->last_picture)) < 0) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
for (i=0; i<avctx->height; i++)
|
||||||
|
memset(f->last_picture->data[0] + i*f->last_picture->linesize[0], 0, 2*avctx->width);
|
||||||
|
}
|
||||||
|
|
||||||
|
p->pict_type = AV_PICTURE_TYPE_P;
|
||||||
|
if ((ret = decode_p_frame(f, buf, frame_size)) < 0) {
|
||||||
av_log(f->avctx, AV_LOG_ERROR, "decode p frame failed\n");
|
av_log(f->avctx, AV_LOG_ERROR, "decode p frame failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -957,10 +928,9 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
buf_size);
|
buf_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
f->current_picture->key_frame = f->current_picture->pict_type == AV_PICTURE_TYPE_I;
|
p->key_frame = p->pict_type == AV_PICTURE_TYPE_I;
|
||||||
|
|
||||||
if ((ret = av_frame_ref(picture, f->current_picture)) < 0)
|
*picture = *p;
|
||||||
return ret;
|
|
||||||
*got_frame = 1;
|
*got_frame = 1;
|
||||||
|
|
||||||
emms_c();
|
emms_c();
|
||||||
@@ -991,10 +961,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
else
|
else
|
||||||
avctx->pix_fmt = AV_PIX_FMT_BGR555;
|
avctx->pix_fmt = AV_PIX_FMT_BGR555;
|
||||||
|
|
||||||
f->current_picture = av_frame_alloc();
|
f->current_picture = avcodec_alloc_frame();
|
||||||
f->last_picture = av_frame_alloc();
|
f->last_picture = avcodec_alloc_frame();
|
||||||
if (!f->current_picture || !f->last_picture)
|
if (!f->current_picture || !f->last_picture) {
|
||||||
|
avcodec_free_frame(&f->current_picture);
|
||||||
|
avcodec_free_frame(&f->last_picture);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1012,15 +985,18 @@ static av_cold int decode_end(AVCodecContext *avctx)
|
|||||||
f->cfrm[i].allocated_size = 0;
|
f->cfrm[i].allocated_size = 0;
|
||||||
}
|
}
|
||||||
ff_free_vlc(&f->pre_vlc);
|
ff_free_vlc(&f->pre_vlc);
|
||||||
av_frame_free(&f->current_picture);
|
if (f->current_picture->data[0])
|
||||||
av_frame_free(&f->last_picture);
|
avctx->release_buffer(avctx, f->current_picture);
|
||||||
|
if (f->last_picture->data[0])
|
||||||
|
avctx->release_buffer(avctx, f->last_picture);
|
||||||
|
avcodec_free_frame(&f->current_picture);
|
||||||
|
avcodec_free_frame(&f->last_picture);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_fourxm_decoder = {
|
AVCodec ff_fourxm_decoder = {
|
||||||
.name = "4xm",
|
.name = "4xm",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_4XM,
|
.id = AV_CODEC_ID_4XM,
|
||||||
.priv_data_size = sizeof(FourXContext),
|
.priv_data_size = sizeof(FourXContext),
|
||||||
@@ -1028,4 +1004,5 @@ AVCodec ff_fourxm_decoder = {
|
|||||||
.close = decode_end,
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("4X Movie"),
|
||||||
};
|
};
|
||||||
|
|||||||
+46
-23
@@ -46,6 +46,7 @@ static const enum AVPixelFormat pixfmt_rgb24[] = {
|
|||||||
|
|
||||||
typedef struct EightBpsContext {
|
typedef struct EightBpsContext {
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
|
AVFrame pic;
|
||||||
|
|
||||||
unsigned char planes;
|
unsigned char planes;
|
||||||
unsigned char planemap[4];
|
unsigned char planemap[4];
|
||||||
@@ -56,7 +57,6 @@ typedef struct EightBpsContext {
|
|||||||
static int decode_frame(AVCodecContext *avctx, void *data,
|
static int decode_frame(AVCodecContext *avctx, void *data,
|
||||||
int *got_frame, AVPacket *avpkt)
|
int *got_frame, AVPacket *avpkt)
|
||||||
{
|
{
|
||||||
AVFrame *frame = data;
|
|
||||||
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;
|
||||||
@@ -64,16 +64,21 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
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, *ep;
|
const unsigned char *lp, *dp;
|
||||||
unsigned char count;
|
unsigned char count;
|
||||||
unsigned int planes = c->planes;
|
unsigned int planes = c->planes;
|
||||||
unsigned char *planemap = c->planemap;
|
unsigned char *planemap = c->planemap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
if (c->pic.data[0])
|
||||||
return ret;
|
avctx->release_buffer(avctx, &c->pic);
|
||||||
|
|
||||||
ep = encoded + buf_size;
|
c->pic.reference = 0;
|
||||||
|
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
|
||||||
|
if ((ret = ff_get_buffer(avctx, &c->pic)) < 0) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
/* Set data pointer after line lengths */
|
/* Set data pointer after line lengths */
|
||||||
dp = encoded + planes * (height << 1);
|
dp = encoded + planes * (height << 1);
|
||||||
@@ -84,21 +89,21 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
|
|
||||||
/* Decode a plane */
|
/* Decode a plane */
|
||||||
for (row = 0; row < height; row++) {
|
for (row = 0; row < height; row++) {
|
||||||
pixptr = frame->data[0] + row * frame->linesize[0] + planemap[p];
|
pixptr = c->pic.data[0] + row * c->pic.linesize[0] + planemap[p];
|
||||||
pixptr_end = pixptr + frame->linesize[0];
|
pixptr_end = pixptr + c->pic.linesize[0];
|
||||||
if (ep - lp < row * 2 + 2)
|
if(lp - encoded + row*2 + 1 >= buf_size)
|
||||||
return AVERROR_INVALIDDATA;
|
return -1;
|
||||||
dlen = av_be2ne16(*(const unsigned short *)(lp + row * 2));
|
dlen = av_be2ne16(*(const unsigned short *)(lp + row * 2));
|
||||||
/* Decode a row of this plane */
|
/* Decode a row of this plane */
|
||||||
while (dlen > 0) {
|
while (dlen > 0) {
|
||||||
if (ep - dp <= 1)
|
if (dp + 1 >= buf + buf_size)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
if ((count = *dp++) <= 127) {
|
if ((count = *dp++) <= 127) {
|
||||||
count++;
|
count++;
|
||||||
dlen -= count + 1;
|
dlen -= count + 1;
|
||||||
if (pixptr_end - pixptr < count * planes)
|
if (pixptr + count * planes > pixptr_end)
|
||||||
break;
|
break;
|
||||||
if (ep - dp < count)
|
if (dp + count > buf + buf_size)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
while (count--) {
|
while (count--) {
|
||||||
*pixptr = *dp++;
|
*pixptr = *dp++;
|
||||||
@@ -106,7 +111,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
count = 257 - count;
|
count = 257 - count;
|
||||||
if (pixptr_end - pixptr < count * planes)
|
if (pixptr + count * planes > pixptr_end)
|
||||||
break;
|
break;
|
||||||
while (count--) {
|
while (count--) {
|
||||||
*pixptr = *dp;
|
*pixptr = *dp;
|
||||||
@@ -124,14 +129,15 @@ static int decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
AV_PKT_DATA_PALETTE,
|
AV_PKT_DATA_PALETTE,
|
||||||
NULL);
|
NULL);
|
||||||
if (pal) {
|
if (pal) {
|
||||||
frame->palette_has_changed = 1;
|
c->pic.palette_has_changed = 1;
|
||||||
memcpy(c->pal, pal, AVPALETTE_SIZE);
|
memcpy(c->pal, pal, AVPALETTE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (frame->data[1], c->pal, AVPALETTE_SIZE);
|
memcpy (c->pic.data[1], c->pal, AVPALETTE_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
*got_frame = 1;
|
*got_frame = 1;
|
||||||
|
*(AVFrame*)data = c->pic;
|
||||||
|
|
||||||
/* always report that the buffer was completely consumed */
|
/* always report that the buffer was completely consumed */
|
||||||
return buf_size;
|
return buf_size;
|
||||||
@@ -142,7 +148,9 @@ 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);
|
||||||
switch (avctx->bits_per_coded_sample) {
|
switch (avctx->bits_per_coded_sample) {
|
||||||
case 8:
|
case 8:
|
||||||
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||||
@@ -159,7 +167,17 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
case 32:
|
case 32:
|
||||||
avctx->pix_fmt = AV_PIX_FMT_RGB32;
|
avctx->pix_fmt = AV_PIX_FMT_RGB32;
|
||||||
c->planes = 4;
|
c->planes = 4;
|
||||||
/* handle planemap setup later for decoding rgb24 data as rbg32 */
|
#if HAVE_BIGENDIAN
|
||||||
|
c->planemap[0] = 1; // 1st plane is red
|
||||||
|
c->planemap[1] = 2; // 2nd plane is green
|
||||||
|
c->planemap[2] = 3; // 3rd plane is blue
|
||||||
|
c->planemap[3] = 0; // 4th plane is alpha
|
||||||
|
#else
|
||||||
|
c->planemap[0] = 2; // 1st plane is red
|
||||||
|
c->planemap[1] = 1; // 2nd plane is green
|
||||||
|
c->planemap[2] = 0; // 3rd plane is blue
|
||||||
|
c->planemap[3] = 3; // 4th plane is alpha
|
||||||
|
#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",
|
||||||
@@ -167,22 +185,27 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avctx->pix_fmt == AV_PIX_FMT_RGB32) {
|
return 0;
|
||||||
c->planemap[0] = HAVE_BIGENDIAN ? 1 : 2; // 1st plane is red
|
}
|
||||||
c->planemap[1] = HAVE_BIGENDIAN ? 2 : 1; // 2nd plane is green
|
|
||||||
c->planemap[2] = HAVE_BIGENDIAN ? 3 : 0; // 3rd plane is blue
|
static av_cold int decode_end(AVCodecContext *avctx)
|
||||||
c->planemap[3] = HAVE_BIGENDIAN ? 0 : 3; // 4th plane is alpha
|
{
|
||||||
}
|
EightBpsContext * const c = avctx->priv_data;
|
||||||
|
|
||||||
|
if (c->pic.data[0])
|
||||||
|
avctx->release_buffer(avctx, &c->pic);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AVCodec ff_eightbps_decoder = {
|
AVCodec ff_eightbps_decoder = {
|
||||||
.name = "8bps",
|
.name = "8bps",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_8BPS,
|
.id = AV_CODEC_ID_8BPS,
|
||||||
.priv_data_size = sizeof(EightBpsContext),
|
.priv_data_size = sizeof(EightBpsContext),
|
||||||
.init = decode_init,
|
.init = decode_init,
|
||||||
|
.close = decode_end,
|
||||||
.decode = decode_frame,
|
.decode = decode_frame,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("QuickTime 8BPS video"),
|
||||||
};
|
};
|
||||||
|
|||||||
+5
-3
@@ -136,8 +136,10 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
|
|
||||||
/* get output buffer */
|
/* get output buffer */
|
||||||
frame->nb_samples = buf_size * 2;
|
frame->nb_samples = buf_size * 2;
|
||||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
if ((ret = ff_get_buffer(avctx, frame)) < 0) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||||
return ret;
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
for (ch = 0; ch < avctx->channels; ch++) {
|
for (ch = 0; ch < avctx->channels; ch++) {
|
||||||
delta_decode(frame->data[ch], &esc->data[ch][esc->data_idx],
|
delta_decode(frame->data[ch], &esc->data[ch][esc->data_idx],
|
||||||
@@ -187,7 +189,6 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
|
|||||||
#if CONFIG_EIGHTSVX_FIB_DECODER
|
#if CONFIG_EIGHTSVX_FIB_DECODER
|
||||||
AVCodec ff_eightsvx_fib_decoder = {
|
AVCodec ff_eightsvx_fib_decoder = {
|
||||||
.name = "8svx_fib",
|
.name = "8svx_fib",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_8SVX_FIB,
|
.id = AV_CODEC_ID_8SVX_FIB,
|
||||||
.priv_data_size = sizeof (EightSvxContext),
|
.priv_data_size = sizeof (EightSvxContext),
|
||||||
@@ -195,6 +196,7 @@ AVCodec ff_eightsvx_fib_decoder = {
|
|||||||
.decode = eightsvx_decode_frame,
|
.decode = eightsvx_decode_frame,
|
||||||
.close = eightsvx_decode_close,
|
.close = eightsvx_decode_close,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("8SVX fibonacci"),
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
};
|
};
|
||||||
@@ -202,7 +204,6 @@ AVCodec ff_eightsvx_fib_decoder = {
|
|||||||
#if CONFIG_EIGHTSVX_EXP_DECODER
|
#if CONFIG_EIGHTSVX_EXP_DECODER
|
||||||
AVCodec ff_eightsvx_exp_decoder = {
|
AVCodec ff_eightsvx_exp_decoder = {
|
||||||
.name = "8svx_exp",
|
.name = "8svx_exp",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_8SVX_EXP,
|
.id = AV_CODEC_ID_8SVX_EXP,
|
||||||
.priv_data_size = sizeof (EightSvxContext),
|
.priv_data_size = sizeof (EightSvxContext),
|
||||||
@@ -210,6 +211,7 @@ AVCodec ff_eightsvx_exp_decoder = {
|
|||||||
.decode = eightsvx_decode_frame,
|
.decode = eightsvx_decode_frame,
|
||||||
.close = eightsvx_decode_close,
|
.close = eightsvx_decode_close,
|
||||||
.capabilities = CODEC_CAP_DR1,
|
.capabilities = CODEC_CAP_DR1,
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("8SVX exponential"),
|
||||||
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
};
|
};
|
||||||
|
|||||||
+61
-93
@@ -20,8 +20,11 @@ OBJS = allcodecs.o \
|
|||||||
bitstream.o \
|
bitstream.o \
|
||||||
bitstream_filter.o \
|
bitstream_filter.o \
|
||||||
codec_desc.o \
|
codec_desc.o \
|
||||||
|
dsputil.o \
|
||||||
|
faanidct.o \
|
||||||
fmtconvert.o \
|
fmtconvert.o \
|
||||||
imgconvert.o \
|
imgconvert.o \
|
||||||
|
jrevdct.o \
|
||||||
mathtables.o \
|
mathtables.o \
|
||||||
options.o \
|
options.o \
|
||||||
parser.o \
|
parser.o \
|
||||||
@@ -29,10 +32,9 @@ OBJS = allcodecs.o \
|
|||||||
rawdec.o \
|
rawdec.o \
|
||||||
resample.o \
|
resample.o \
|
||||||
resample2.o \
|
resample2.o \
|
||||||
|
simple_idct.o \
|
||||||
utils.o \
|
utils.o \
|
||||||
|
|
||||||
OBJS-$(HAVE_MSVCRT) += file_open.o
|
|
||||||
|
|
||||||
# parts needed for many different codecs
|
# parts needed for many different codecs
|
||||||
OBJS-$(CONFIG_AANDCTTABLES) += aandcttab.o
|
OBJS-$(CONFIG_AANDCTTABLES) += aandcttab.o
|
||||||
OBJS-$(CONFIG_AC3DSP) += ac3dsp.o
|
OBJS-$(CONFIG_AC3DSP) += ac3dsp.o
|
||||||
@@ -40,26 +42,21 @@ OBJS-$(CONFIG_AUDIO_FRAME_QUEUE) += audio_frame_queue.o
|
|||||||
OBJS-$(CONFIG_CRYSTALHD) += crystalhd.o
|
OBJS-$(CONFIG_CRYSTALHD) += crystalhd.o
|
||||||
OBJS-$(CONFIG_DCT) += dct.o dct32_fixed.o dct32_float.o
|
OBJS-$(CONFIG_DCT) += dct.o dct32_fixed.o dct32_float.o
|
||||||
OBJS-$(CONFIG_DXVA2) += dxva2.o
|
OBJS-$(CONFIG_DXVA2) += dxva2.o
|
||||||
OBJS-$(CONFIG_DSPUTIL) += dsputil.o faanidct.o \
|
|
||||||
simple_idct.o jrevdct.o
|
|
||||||
OBJS-$(CONFIG_ENCODERS) += faandct.o jfdctfst.o jfdctint.o
|
OBJS-$(CONFIG_ENCODERS) += faandct.o jfdctfst.o jfdctint.o
|
||||||
OBJS-$(CONFIG_ERROR_RESILIENCE) += error_resilience.o
|
OBJS-$(CONFIG_ERROR_RESILIENCE) += error_resilience.o
|
||||||
OBJS-$(CONFIG_EXIF) += exif.o tiff_common.o
|
|
||||||
FFT-OBJS-$(CONFIG_HARDCODED_TABLES) += cos_tables.o cos_fixed_tables.o
|
FFT-OBJS-$(CONFIG_HARDCODED_TABLES) += cos_tables.o cos_fixed_tables.o
|
||||||
OBJS-$(CONFIG_FFT) += avfft.o fft_fixed.o fft_float.o \
|
OBJS-$(CONFIG_FFT) += avfft.o fft_fixed.o fft_float.o \
|
||||||
fft_fixed_32.o fft_init_table.o \
|
|
||||||
$(FFT-OBJS-yes)
|
$(FFT-OBJS-yes)
|
||||||
OBJS-$(CONFIG_GOLOMB) += golomb.o
|
OBJS-$(CONFIG_GOLOMB) += golomb.o
|
||||||
OBJS-$(CONFIG_H264CHROMA) += h264chroma.o
|
OBJS-$(CONFIG_H264CHROMA) += h264chroma.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_H264QPEL) += h264qpel.o
|
OBJS-$(CONFIG_H264QPEL) += h264qpel.o
|
||||||
OBJS-$(CONFIG_HPELDSP) += hpeldsp.o
|
|
||||||
OBJS-$(CONFIG_HUFFMAN) += huffman.o
|
OBJS-$(CONFIG_HUFFMAN) += huffman.o
|
||||||
OBJS-$(CONFIG_LIBXVID) += libxvid_rc.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 mdct_fixed_32.o
|
OBJS-$(CONFIG_MDCT) += mdct_fixed.o mdct_float.o
|
||||||
OBJS-$(CONFIG_MPEGAUDIO) += mpegaudio.o mpegaudiodata.o \
|
OBJS-$(CONFIG_MPEGAUDIO) += mpegaudio.o mpegaudiodata.o \
|
||||||
mpegaudiodecheader.o
|
mpegaudiodecheader.o
|
||||||
OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \
|
OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \
|
||||||
@@ -79,7 +76,7 @@ OBJS-$(CONFIG_VDPAU) += vdpau.o
|
|||||||
OBJS-$(CONFIG_VIDEODSP) += videodsp.o
|
OBJS-$(CONFIG_VIDEODSP) += videodsp.o
|
||||||
OBJS-$(CONFIG_VP3DSP) += vp3dsp.o
|
OBJS-$(CONFIG_VP3DSP) += vp3dsp.o
|
||||||
|
|
||||||
# decoders/encoders
|
# decoders/encoders/hardware accelerators
|
||||||
OBJS-$(CONFIG_ZERO12V_DECODER) += 012v.o
|
OBJS-$(CONFIG_ZERO12V_DECODER) += 012v.o
|
||||||
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
|
||||||
@@ -95,7 +92,6 @@ 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_float.o ac3enc.o ac3tab.o \
|
||||||
ac3.o kbdwin.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 ac3enc.o ac3tab.o ac3.o
|
||||||
OBJS-$(CONFIG_AIC_DECODER) += aic.o
|
|
||||||
OBJS-$(CONFIG_ALAC_DECODER) += alac.o alac_data.o
|
OBJS-$(CONFIG_ALAC_DECODER) += alac.o alac_data.o
|
||||||
OBJS-$(CONFIG_ALAC_ENCODER) += alacenc.o alac_data.o
|
OBJS-$(CONFIG_ALAC_ENCODER) += alacenc.o alac_data.o
|
||||||
OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mpeg4audio.o
|
OBJS-$(CONFIG_ALS_DECODER) += alsdec.o bgmc.o mpeg4audio.o
|
||||||
@@ -115,8 +111,6 @@ OBJS-$(CONFIG_AMV_ENCODER) += mjpegenc.o mjpeg.o \
|
|||||||
OBJS-$(CONFIG_ANM_DECODER) += anm.o
|
OBJS-$(CONFIG_ANM_DECODER) += anm.o
|
||||||
OBJS-$(CONFIG_ANSI_DECODER) += ansi.o cga_data.o
|
OBJS-$(CONFIG_ANSI_DECODER) += ansi.o cga_data.o
|
||||||
OBJS-$(CONFIG_APE_DECODER) += apedec.o
|
OBJS-$(CONFIG_APE_DECODER) += apedec.o
|
||||||
OBJS-$(CONFIG_SSA_DECODER) += assdec.o ass.o ass_split.o
|
|
||||||
OBJS-$(CONFIG_SSA_ENCODER) += assenc.o ass.o
|
|
||||||
OBJS-$(CONFIG_ASS_DECODER) += assdec.o ass.o ass_split.o
|
OBJS-$(CONFIG_ASS_DECODER) += assdec.o ass.o ass_split.o
|
||||||
OBJS-$(CONFIG_ASS_ENCODER) += assenc.o ass.o
|
OBJS-$(CONFIG_ASS_ENCODER) += assenc.o ass.o
|
||||||
OBJS-$(CONFIG_ASV1_DECODER) += asvdec.o asv.o mpeg12data.o
|
OBJS-$(CONFIG_ASV1_DECODER) += asvdec.o asv.o mpeg12data.o
|
||||||
@@ -162,7 +156,7 @@ OBJS-$(CONFIG_CPIA_DECODER) += cpia.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) += dcadec.o dca.o dcadsp.o \
|
OBJS-$(CONFIG_DCA_DECODER) += dcadec.o dca.o dcadsp.o \
|
||||||
synth_filter.o
|
dca_parser.o synth_filter.o
|
||||||
OBJS-$(CONFIG_DCA_ENCODER) += dcaenc.o dca.o
|
OBJS-$(CONFIG_DCA_ENCODER) += dcaenc.o dca.o
|
||||||
OBJS-$(CONFIG_DIRAC_DECODER) += diracdec.o dirac.o diracdsp.o \
|
OBJS-$(CONFIG_DIRAC_DECODER) += diracdec.o dirac.o diracdsp.o \
|
||||||
dirac_arith.o mpeg12data.o dirac_dwt.o
|
dirac_arith.o mpeg12data.o dirac_dwt.o
|
||||||
@@ -188,8 +182,8 @@ OBJS-$(CONFIG_EAMAD_DECODER) += eamad.o eaidct.o mpeg12.o \
|
|||||||
mpeg12data.o
|
mpeg12data.o
|
||||||
OBJS-$(CONFIG_EATGQ_DECODER) += eatgq.o eaidct.o
|
OBJS-$(CONFIG_EATGQ_DECODER) += eatgq.o eaidct.o
|
||||||
OBJS-$(CONFIG_EATGV_DECODER) += eatgv.o
|
OBJS-$(CONFIG_EATGV_DECODER) += eatgv.o
|
||||||
OBJS-$(CONFIG_EATQI_DECODER) += eatqi.o eaidct.o mpeg12dec.o \
|
OBJS-$(CONFIG_EATQI_DECODER) += eatqi.o eaidct.o mpeg12.o \
|
||||||
mpeg12.o mpeg12data.o
|
mpeg12data.o
|
||||||
OBJS-$(CONFIG_EIGHTBPS_DECODER) += 8bps.o
|
OBJS-$(CONFIG_EIGHTBPS_DECODER) += 8bps.o
|
||||||
OBJS-$(CONFIG_EIGHTSVX_EXP_DECODER) += 8svx.o
|
OBJS-$(CONFIG_EIGHTSVX_EXP_DECODER) += 8svx.o
|
||||||
OBJS-$(CONFIG_EIGHTSVX_FIB_DECODER) += 8svx.o
|
OBJS-$(CONFIG_EIGHTSVX_FIB_DECODER) += 8svx.o
|
||||||
@@ -212,7 +206,6 @@ 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_G2M_DECODER) += g2meet.o mjpeg.o
|
|
||||||
OBJS-$(CONFIG_G723_1_DECODER) += g723_1.o acelp_vectors.o \
|
OBJS-$(CONFIG_G723_1_DECODER) += g723_1.o acelp_vectors.o \
|
||||||
celp_filters.o celp_math.o
|
celp_filters.o celp_math.o
|
||||||
OBJS-$(CONFIG_G723_1_ENCODER) += g723_1.o acelp_vectors.o celp_math.o
|
OBJS-$(CONFIG_G723_1_ENCODER) += g723_1.o acelp_vectors.o celp_math.o
|
||||||
@@ -221,22 +214,24 @@ 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 h261data.o h261.o
|
OBJS-$(CONFIG_H261_DECODER) += h261dec.o h261.o h261data.o
|
||||||
OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261data.o h261.o
|
OBJS-$(CONFIG_H261_ENCODER) += h261enc.o h261.o h261data.o
|
||||||
OBJS-$(CONFIG_H263_DECODER) += h263dec.o h263.o ituh263dec.o \
|
OBJS-$(CONFIG_H263_DECODER) += h263dec.o h263.o ituh263dec.o \
|
||||||
mpeg4video.o mpeg4videodec.o flvdec.o\
|
mpeg4video.o mpeg4videodec.o flvdec.o\
|
||||||
intelh263dec.o
|
intelh263dec.o
|
||||||
|
OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o
|
||||||
|
OBJS-$(CONFIG_H263_VDPAU_HWACCEL) += vdpau_mpeg4.o
|
||||||
OBJS-$(CONFIG_H263_ENCODER) += mpeg4videoenc.o mpeg4video.o \
|
OBJS-$(CONFIG_H263_ENCODER) += mpeg4videoenc.o mpeg4video.o \
|
||||||
h263.o ituh263enc.o flvenc.o
|
h263.o ituh263enc.o flvenc.o
|
||||||
OBJS-$(CONFIG_H264_DECODER) += h264.o \
|
OBJS-$(CONFIG_H264_DECODER) += h264.o \
|
||||||
h264_loopfilter.o h264_direct.o \
|
h264_loopfilter.o h264_direct.o \
|
||||||
cabac.o h264_sei.o h264_ps.o \
|
cabac.o h264_sei.o h264_ps.o \
|
||||||
h264_refs.o h264_cavlc.o h264_cabac.o
|
h264_refs.o h264_cavlc.o h264_cabac.o
|
||||||
|
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
|
||||||
|
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
|
||||||
|
OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o
|
||||||
OBJS-$(CONFIG_H264_VDA_DECODER) += vda_h264_dec.o
|
OBJS-$(CONFIG_H264_VDA_DECODER) += vda_h264_dec.o
|
||||||
OBJS-$(CONFIG_HEVC_DECODER) += hevc.o hevc_mvs.o hevc_ps.o hevc_sei.o \
|
OBJS-$(CONFIG_H264_VDPAU_HWACCEL) += vdpau_h264.o
|
||||||
hevc_cabac.o hevc_refs.o hevcpred.o \
|
|
||||||
hevcdsp.o hevc_filter.o cabac.o
|
|
||||||
|
|
||||||
OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o huffyuvdec.o
|
OBJS-$(CONFIG_HUFFYUV_DECODER) += huffyuv.o huffyuvdec.o
|
||||||
OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o huffyuvenc.o
|
OBJS-$(CONFIG_HUFFYUV_ENCODER) += huffyuv.o huffyuvenc.o
|
||||||
OBJS-$(CONFIG_IAC_DECODER) += imc.o
|
OBJS-$(CONFIG_IAC_DECODER) += imc.o
|
||||||
@@ -252,10 +247,8 @@ 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_JACOSUB_DECODER) += jacosubdec.o ass.o
|
||||||
OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o jpeg2000.o \
|
OBJS-$(CONFIG_JPEG2000_DECODER) += j2kdec.o mqcdec.o mqc.o j2k.o j2k_dwt.o
|
||||||
jpeg2000dwt.o
|
OBJS-$(CONFIG_JPEG2000_ENCODER) += j2kenc.o mqcenc.o mqc.o j2k.o j2k_dwt.o
|
||||||
OBJS-$(CONFIG_JPEG2000_DECODER) += jpeg2000dec.o jpeg2000.o \
|
|
||||||
jpeg2000dwt.o mqcdec.o mqc.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
|
||||||
@@ -268,8 +261,6 @@ OBJS-$(CONFIG_LOCO_DECODER) += loco.o
|
|||||||
OBJS-$(CONFIG_MACE3_DECODER) += mace.o
|
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
|
||||||
OBJS-$(CONFIG_METASOUND_DECODER) += metasound.o metasound_data.o \
|
|
||||||
twinvq.o
|
|
||||||
OBJS-$(CONFIG_MICRODVD_DECODER) += microdvddec.o ass.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
|
||||||
@@ -297,23 +288,30 @@ OBJS-$(CONFIG_MPC8_DECODER) += mpc8.o mpc.o
|
|||||||
OBJS-$(CONFIG_MPEGVIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
OBJS-$(CONFIG_MPEGVIDEO_DECODER) += mpeg12.o mpeg12data.o \
|
||||||
mpegvideo.o error_resilience.o
|
mpegvideo.o error_resilience.o
|
||||||
OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o
|
OBJS-$(CONFIG_MPEG_XVMC_DECODER) += mpegvideo_xvmc.o
|
||||||
OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12dec.o mpeg12.o mpeg12data.o
|
OBJS-$(CONFIG_MPEG1_VDPAU_HWACCEL) += vdpau_mpeg12.o
|
||||||
OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpeg12.o
|
OBJS-$(CONFIG_MPEG1VIDEO_DECODER) += mpeg12.o mpeg12data.o
|
||||||
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12dec.o mpeg12.o mpeg12data.o
|
OBJS-$(CONFIG_MPEG1VIDEO_ENCODER) += mpeg12enc.o mpeg12.o \
|
||||||
|
timecode.o
|
||||||
|
OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL) += dxva2_mpeg2.o
|
||||||
|
OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL) += vaapi_mpeg2.o
|
||||||
|
OBJS-$(CONFIG_MPEG2_VDPAU_HWACCEL) += vdpau_mpeg12.o
|
||||||
|
OBJS-$(CONFIG_MPEG2VIDEO_DECODER) += mpeg12.o mpeg12data.o
|
||||||
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpeg12.o \
|
OBJS-$(CONFIG_MPEG2VIDEO_ENCODER) += mpeg12enc.o mpeg12.o \
|
||||||
timecode.o
|
timecode.o
|
||||||
|
OBJS-$(CONFIG_MPEG4_VAAPI_HWACCEL) += vaapi_mpeg4.o
|
||||||
|
OBJS-$(CONFIG_MPEG4_VDPAU_HWACCEL) += vdpau_mpeg4.o
|
||||||
OBJS-$(CONFIG_MPL2_DECODER) += mpl2dec.o ass.o
|
OBJS-$(CONFIG_MPL2_DECODER) += mpl2dec.o ass.o
|
||||||
OBJS-$(CONFIG_MSMPEG4V1_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o
|
OBJS-$(CONFIG_MSMPEG4V1_DECODER) += msmpeg4.o msmpeg4data.o
|
||||||
OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o \
|
OBJS-$(CONFIG_MSMPEG4V2_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||||
h263dec.o h263.o ituh263dec.o \
|
h263.o ituh263dec.o mpeg4videodec.o
|
||||||
mpeg4videodec.o
|
|
||||||
OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4.o msmpeg4enc.o msmpeg4data.o \
|
OBJS-$(CONFIG_MSMPEG4V2_ENCODER) += msmpeg4.o msmpeg4enc.o msmpeg4data.o \
|
||||||
h263.o
|
h263dec.o h263.o ituh263dec.o \
|
||||||
OBJS-$(CONFIG_MSMPEG4V3_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o \
|
|
||||||
h263dec.o h263.o ituh263dec.o \
|
|
||||||
mpeg4videodec.o
|
mpeg4videodec.o
|
||||||
|
OBJS-$(CONFIG_MSMPEG4V3_DECODER) += msmpeg4.o msmpeg4data.o h263dec.o \
|
||||||
|
h263.o ituh263dec.o mpeg4videodec.o
|
||||||
OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4.o msmpeg4enc.o msmpeg4data.o \
|
OBJS-$(CONFIG_MSMPEG4V3_ENCODER) += msmpeg4.o msmpeg4enc.o msmpeg4data.o \
|
||||||
h263.o
|
h263dec.o h263.o ituh263dec.o \
|
||||||
|
mpeg4videodec.o
|
||||||
OBJS-$(CONFIG_MSRLE_DECODER) += msrle.o msrledec.o
|
OBJS-$(CONFIG_MSRLE_DECODER) += msrle.o msrledec.o
|
||||||
OBJS-$(CONFIG_MSA1_DECODER) += mss3.o mss34dsp.o
|
OBJS-$(CONFIG_MSA1_DECODER) += mss3.o mss34dsp.o
|
||||||
OBJS-$(CONFIG_MSS1_DECODER) += mss1.o mss12.o
|
OBJS-$(CONFIG_MSS1_DECODER) += mss1.o mss12.o
|
||||||
@@ -347,11 +345,11 @@ OBJS-$(CONFIG_PNG_DECODER) += png.o pngdec.o pngdsp.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 proresdata.o
|
OBJS-$(CONFIG_PRORES_DECODER) += proresdec2.o proresdsp.o
|
||||||
OBJS-$(CONFIG_PRORES_LGPL_DECODER) += proresdec_lgpl.o proresdsp.o proresdata.o
|
OBJS-$(CONFIG_PRORES_LGPL_DECODER) += proresdec_lgpl.o proresdsp.o proresdata.o
|
||||||
OBJS-$(CONFIG_PRORES_ENCODER) += proresenc_anatoliy.o
|
OBJS-$(CONFIG_PRORES_ENCODER) += proresenc_anatoliy.o
|
||||||
OBJS-$(CONFIG_PRORES_AW_ENCODER) += proresenc_anatoliy.o
|
OBJS-$(CONFIG_PRORES_ANATOLIY_ENCODER) += proresenc_anatoliy.o
|
||||||
OBJS-$(CONFIG_PRORES_KS_ENCODER) += proresenc_kostya.o proresdata.o proresdsp.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 \
|
OBJS-$(CONFIG_QCELP_DECODER) += qcelpdec.o \
|
||||||
celp_filters.o acelp_vectors.o \
|
celp_filters.o acelp_vectors.o \
|
||||||
@@ -386,7 +384,6 @@ OBJS-$(CONFIG_RV30_DECODER) += rv30.o rv34.o rv30dsp.o rv34dsp.o
|
|||||||
OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv34dsp.o rv40dsp.o
|
OBJS-$(CONFIG_RV40_DECODER) += rv40.o rv34.o rv34dsp.o rv40dsp.o
|
||||||
OBJS-$(CONFIG_SAMI_DECODER) += samidec.o ass.o
|
OBJS-$(CONFIG_SAMI_DECODER) += samidec.o ass.o
|
||||||
OBJS-$(CONFIG_S302M_DECODER) += s302m.o
|
OBJS-$(CONFIG_S302M_DECODER) += s302m.o
|
||||||
OBJS-$(CONFIG_S302M_ENCODER) += s302menc.o
|
|
||||||
OBJS-$(CONFIG_SANM_DECODER) += sanm.o
|
OBJS-$(CONFIG_SANM_DECODER) += sanm.o
|
||||||
OBJS-$(CONFIG_SGI_DECODER) += sgidec.o
|
OBJS-$(CONFIG_SGI_DECODER) += sgidec.o
|
||||||
OBJS-$(CONFIG_SGI_ENCODER) += sgienc.o rle.o
|
OBJS-$(CONFIG_SGI_ENCODER) += sgienc.o rle.o
|
||||||
@@ -399,7 +396,6 @@ 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_SMVJPEG_DECODER) += smvjpegdec.o
|
|
||||||
OBJS-$(CONFIG_SNOW_DECODER) += snowdec.o snow.o snow_dwt.o
|
OBJS-$(CONFIG_SNOW_DECODER) += snowdec.o snow.o snow_dwt.o
|
||||||
OBJS-$(CONFIG_SNOW_ENCODER) += snowenc.o snow.o snow_dwt.o \
|
OBJS-$(CONFIG_SNOW_ENCODER) += snowenc.o snow.o snow_dwt.o \
|
||||||
h263.o ituh263enc.o
|
h263.o ituh263enc.o
|
||||||
@@ -431,7 +427,7 @@ OBJS-$(CONFIG_TARGA_Y216_DECODER) += targa_y216dec.o
|
|||||||
OBJS-$(CONFIG_THEORA_DECODER) += xiph.o
|
OBJS-$(CONFIG_THEORA_DECODER) += xiph.o
|
||||||
OBJS-$(CONFIG_THP_DECODER) += mjpegdec.o mjpeg.o
|
OBJS-$(CONFIG_THP_DECODER) += mjpegdec.o mjpeg.o
|
||||||
OBJS-$(CONFIG_TIERTEXSEQVIDEO_DECODER) += tiertexseqv.o
|
OBJS-$(CONFIG_TIERTEXSEQVIDEO_DECODER) += tiertexseqv.o
|
||||||
OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o faxcompr.o tiff_data.o tiff_common.o
|
OBJS-$(CONFIG_TIFF_DECODER) += tiff.o lzw.o faxcompr.o tiff_data.o
|
||||||
OBJS-$(CONFIG_TIFF_ENCODER) += tiffenc.o rle.o lzwenc.o tiff_data.o
|
OBJS-$(CONFIG_TIFF_ENCODER) += tiffenc.o rle.o lzwenc.o tiff_data.o
|
||||||
OBJS-$(CONFIG_TMV_DECODER) += tmv.o cga_data.o
|
OBJS-$(CONFIG_TMV_DECODER) += tmv.o cga_data.o
|
||||||
OBJS-$(CONFIG_TRUEHD_DECODER) += mlpdec.o mlpdsp.o
|
OBJS-$(CONFIG_TRUEHD_DECODER) += mlpdec.o mlpdsp.o
|
||||||
@@ -440,9 +436,8 @@ OBJS-$(CONFIG_TRUEMOTION2_DECODER) += truemotion2.o
|
|||||||
OBJS-$(CONFIG_TRUESPEECH_DECODER) += truespeech.o
|
OBJS-$(CONFIG_TRUESPEECH_DECODER) += truespeech.o
|
||||||
OBJS-$(CONFIG_TSCC_DECODER) += tscc.o msrledec.o
|
OBJS-$(CONFIG_TSCC_DECODER) += tscc.o msrledec.o
|
||||||
OBJS-$(CONFIG_TSCC2_DECODER) += tscc2.o
|
OBJS-$(CONFIG_TSCC2_DECODER) += tscc2.o
|
||||||
OBJS-$(CONFIG_TTA_DECODER) += tta.o ttadata.o
|
OBJS-$(CONFIG_TTA_DECODER) += tta.o
|
||||||
OBJS-$(CONFIG_TTA_ENCODER) += ttaenc.o ttadata.o
|
OBJS-$(CONFIG_TWINVQ_DECODER) += twinvq.o
|
||||||
OBJS-$(CONFIG_TWINVQ_DECODER) += twinvqdec.o twinvq.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) += utvideodec.o utvideo.o
|
OBJS-$(CONFIG_UTVIDEO_DECODER) += utvideodec.o utvideo.o
|
||||||
@@ -459,8 +454,11 @@ 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_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 \
|
||||||
msmpeg4dec.o msmpeg4.o msmpeg4data.o \
|
msmpeg4.o msmpeg4data.o \
|
||||||
intrax8.o intrax8dsp.o wmv2dsp.o
|
intrax8.o intrax8dsp.o
|
||||||
|
OBJS-$(CONFIG_VC1_DXVA2_HWACCEL) += dxva2_vc1.o
|
||||||
|
OBJS-$(CONFIG_VC1_VAAPI_HWACCEL) += vaapi_vc1.o
|
||||||
|
OBJS-$(CONFIG_VC1_VDPAU_HWACCEL) += vdpau_vc1.o
|
||||||
OBJS-$(CONFIG_VCR1_DECODER) += vcr1.o
|
OBJS-$(CONFIG_VCR1_DECODER) += vcr1.o
|
||||||
OBJS-$(CONFIG_VMDAUDIO_DECODER) += vmdav.o
|
OBJS-$(CONFIG_VMDAUDIO_DECODER) += vmdav.o
|
||||||
OBJS-$(CONFIG_VMDVIDEO_DECODER) += vmdav.o
|
OBJS-$(CONFIG_VMDVIDEO_DECODER) += vmdav.o
|
||||||
@@ -475,13 +473,9 @@ OBJS-$(CONFIG_VP5_DECODER) += vp5.o vp56.o vp56data.o vp56dsp.o \
|
|||||||
OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o vp56dsp.o \
|
OBJS-$(CONFIG_VP6_DECODER) += vp6.o vp56.o vp56data.o vp56dsp.o \
|
||||||
vp6dsp.o vp56rac.o
|
vp6dsp.o vp56rac.o
|
||||||
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8dsp.o vp56rac.o
|
OBJS-$(CONFIG_VP8_DECODER) += vp8.o vp8dsp.o vp56rac.o
|
||||||
OBJS-$(CONFIG_VP9_DECODER) += vp9.o vp9dsp.o vp56rac.o
|
|
||||||
OBJS-$(CONFIG_VPLAYER_DECODER) += textdec.o ass.o
|
OBJS-$(CONFIG_VPLAYER_DECODER) += textdec.o ass.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_WAVPACK_ENCODER) += wavpackenc.o
|
|
||||||
OBJS-$(CONFIG_WEBP_DECODER) += vp8.o vp8dsp.o vp56rac.o
|
|
||||||
OBJS-$(CONFIG_WEBP_DECODER) += webp.o
|
|
||||||
OBJS-$(CONFIG_WEBVTT_DECODER) += webvttdec.o
|
OBJS-$(CONFIG_WEBVTT_DECODER) += webvttdec.o
|
||||||
OBJS-$(CONFIG_WMALOSSLESS_DECODER) += wmalosslessdec.o wma_common.o
|
OBJS-$(CONFIG_WMALOSSLESS_DECODER) += wmalosslessdec.o wma_common.o
|
||||||
OBJS-$(CONFIG_WMAPRO_DECODER) += wmaprodec.o wma.o wma_common.o
|
OBJS-$(CONFIG_WMAPRO_DECODER) += wmaprodec.o wma.o wma_common.o
|
||||||
@@ -492,12 +486,13 @@ 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_filters.o \
|
celp_filters.o \
|
||||||
acelp_vectors.o acelp_filters.o
|
acelp_vectors.o acelp_filters.o
|
||||||
OBJS-$(CONFIG_WMV1_DECODER) += msmpeg4dec.o msmpeg4.o msmpeg4data.o
|
OBJS-$(CONFIG_WMV1_DECODER) += msmpeg4.o msmpeg4data.o
|
||||||
OBJS-$(CONFIG_WMV2_DECODER) += wmv2dec.o wmv2.o wmv2dsp.o \
|
OBJS-$(CONFIG_WMV2_DECODER) += wmv2dec.o wmv2.o wmv2dsp.o \
|
||||||
msmpeg4dec.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 wmv2dsp.o \
|
OBJS-$(CONFIG_WMV2_ENCODER) += wmv2enc.o wmv2.o wmv2dsp.o \
|
||||||
msmpeg4.o msmpeg4enc.o msmpeg4data.o
|
msmpeg4.o msmpeg4enc.o msmpeg4data.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
|
||||||
@@ -527,8 +522,8 @@ OBJS-$(CONFIG_ZMBV_ENCODER) += zmbvenc.o
|
|||||||
# (AD)PCM decoders/encoders
|
# (AD)PCM decoders/encoders
|
||||||
OBJS-$(CONFIG_PCM_ALAW_DECODER) += pcm.o
|
OBJS-$(CONFIG_PCM_ALAW_DECODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_ALAW_ENCODER) += pcm.o
|
OBJS-$(CONFIG_PCM_ALAW_ENCODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_BLURAY_DECODER) += pcm-bluray.o
|
OBJS-$(CONFIG_PCM_BLURAY_DECODER) += pcm-mpeg.o
|
||||||
OBJS-$(CONFIG_PCM_DVD_DECODER) += pcm-dvd.o
|
OBJS-$(CONFIG_PCM_DVD_DECODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_F32BE_DECODER) += pcm.o
|
OBJS-$(CONFIG_PCM_F32BE_DECODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_F32BE_ENCODER) += pcm.o
|
OBJS-$(CONFIG_PCM_F32BE_ENCODER) += pcm.o
|
||||||
OBJS-$(CONFIG_PCM_F32LE_DECODER) += pcm.o
|
OBJS-$(CONFIG_PCM_F32LE_DECODER) += pcm.o
|
||||||
@@ -587,7 +582,6 @@ OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o adx.o
|
|||||||
OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o adx.o
|
OBJS-$(CONFIG_ADPCM_ADX_ENCODER) += adxenc.o adx.o
|
||||||
OBJS-$(CONFIG_ADPCM_AFC_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_AFC_DECODER) += adpcm.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_CT_DECODER) += adpcm.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_ADPCM_DTK_DECODER) += adpcm.o adpcm_data.o
|
|
||||||
OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_EA_DECODER) += adpcm.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_EA_MAXIS_XA_DECODER) += adpcm.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_EA_R1_DECODER) += adpcm.o adpcm_data.o
|
||||||
@@ -608,7 +602,6 @@ OBJS-$(CONFIG_ADPCM_IMA_ISS_DECODER) += adpcm.o adpcm_data.o
|
|||||||
OBJS-$(CONFIG_ADPCM_IMA_OKI_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_OKI_DECODER) += adpcm.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_QT_DECODER) += adpcm.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_QT_ENCODER) += adpcmenc.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_QT_ENCODER) += adpcmenc.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_RAD_DECODER) += adpcm.o adpcm_data.o
|
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_SMJPEG_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_SMJPEG_DECODER) += adpcm.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_WAV_DECODER) += adpcm.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_WAV_DECODER) += adpcm.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcmenc.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_IMA_WAV_ENCODER) += adpcmenc.o adpcm_data.o
|
||||||
@@ -626,23 +619,6 @@ OBJS-$(CONFIG_ADPCM_YAMAHA_DECODER) += adpcm.o adpcm_data.o
|
|||||||
OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o
|
OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o
|
||||||
OBJS-$(CONFIG_VIMA_DECODER) += vima.o adpcm_data.o
|
OBJS-$(CONFIG_VIMA_DECODER) += vima.o adpcm_data.o
|
||||||
|
|
||||||
# hardware accelerators
|
|
||||||
OBJS-$(CONFIG_H263_VAAPI_HWACCEL) += vaapi_mpeg4.o vaapi_mpeg.o
|
|
||||||
OBJS-$(CONFIG_H263_VDPAU_HWACCEL) += vdpau_mpeg4.o
|
|
||||||
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
|
|
||||||
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
|
|
||||||
OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o
|
|
||||||
OBJS-$(CONFIG_H264_VDPAU_HWACCEL) += vdpau_h264.o
|
|
||||||
OBJS-$(CONFIG_MPEG1_VDPAU_HWACCEL) += vdpau_mpeg12.o
|
|
||||||
OBJS-$(CONFIG_MPEG2_DXVA2_HWACCEL) += dxva2_mpeg2.o
|
|
||||||
OBJS-$(CONFIG_MPEG2_VAAPI_HWACCEL) += vaapi_mpeg2.o vaapi_mpeg.o
|
|
||||||
OBJS-$(CONFIG_MPEG2_VDPAU_HWACCEL) += vdpau_mpeg12.o
|
|
||||||
OBJS-$(CONFIG_MPEG4_VAAPI_HWACCEL) += vaapi_mpeg4.o vaapi_mpeg.o
|
|
||||||
OBJS-$(CONFIG_MPEG4_VDPAU_HWACCEL) += vdpau_mpeg4.o
|
|
||||||
OBJS-$(CONFIG_VC1_DXVA2_HWACCEL) += dxva2_vc1.o
|
|
||||||
OBJS-$(CONFIG_VC1_VAAPI_HWACCEL) += vaapi_vc1.o vaapi_mpeg.o
|
|
||||||
OBJS-$(CONFIG_VC1_VDPAU_HWACCEL) += vdpau_vc1.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_ADX_DEMUXER) += adx.o
|
||||||
@@ -690,7 +666,6 @@ OBJS-$(CONFIG_WTV_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
|||||||
OBJS-$(CONFIG_LIBAACPLUS_ENCODER) += libaacplus.o
|
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
|
OBJS-$(CONFIG_LIBFAAC_ENCODER) += libfaac.o
|
||||||
OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o
|
|
||||||
OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.o
|
OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.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
|
||||||
@@ -712,7 +687,6 @@ OBJS-$(CONFIG_LIBSCHROEDINGER_DECODER) += libschroedingerdec.o \
|
|||||||
libschroedinger.o
|
libschroedinger.o
|
||||||
OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \
|
OBJS-$(CONFIG_LIBSCHROEDINGER_ENCODER) += libschroedingerenc.o \
|
||||||
libschroedinger.o
|
libschroedinger.o
|
||||||
OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o
|
|
||||||
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
|
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
|
||||||
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
|
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
|
||||||
OBJS-$(CONFIG_LIBSTAGEFRIGHT_H264_DECODER)+= libstagefright.o
|
OBJS-$(CONFIG_LIBSTAGEFRIGHT_H264_DECODER)+= libstagefright.o
|
||||||
@@ -729,11 +703,9 @@ OBJS-$(CONFIG_LIBVPX_VP8_DECODER) += libvpxdec.o
|
|||||||
OBJS-$(CONFIG_LIBVPX_VP8_ENCODER) += libvpxenc.o
|
OBJS-$(CONFIG_LIBVPX_VP8_ENCODER) += libvpxenc.o
|
||||||
OBJS-$(CONFIG_LIBVPX_VP9_DECODER) += libvpxdec.o
|
OBJS-$(CONFIG_LIBVPX_VP9_DECODER) += libvpxdec.o
|
||||||
OBJS-$(CONFIG_LIBVPX_VP9_ENCODER) += libvpxenc.o
|
OBJS-$(CONFIG_LIBVPX_VP9_ENCODER) += libvpxenc.o
|
||||||
OBJS-$(CONFIG_LIBWAVPACK_ENCODER) += libwavpackenc.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_ENCODER) += libxvid.o
|
||||||
OBJS-$(CONFIG_LIBZVBI_TELETEXT_DECODER) += libzvbi-teletextdec.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 \
|
||||||
@@ -748,9 +720,7 @@ OBJS-$(CONFIG_COOK_PARSER) += cook_parser.o
|
|||||||
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o dca.o
|
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o dca.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
|
||||||
OBJS-$(CONFIG_DPX_PARSER) += dpx_parser.o
|
|
||||||
OBJS-$(CONFIG_DVBSUB_PARSER) += dvbsub_parser.o
|
OBJS-$(CONFIG_DVBSUB_PARSER) += dvbsub_parser.o
|
||||||
OBJS-$(CONFIG_DVD_NAV_PARSER) += dvd_nav_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
|
||||||
@@ -762,7 +732,6 @@ OBJS-$(CONFIG_H264_PARSER) += h264_parser.o h264.o \
|
|||||||
h264_refs.o h264_sei.o h264_direct.o \
|
h264_refs.o h264_sei.o h264_direct.o \
|
||||||
h264_loopfilter.o h264_cabac.o \
|
h264_loopfilter.o h264_cabac.o \
|
||||||
h264_cavlc.o h264_ps.o
|
h264_cavlc.o h264_ps.o
|
||||||
OBJS-$(CONFIG_HEVC_PARSER) += hevc_parser.o
|
|
||||||
OBJS-$(CONFIG_MJPEG_PARSER) += mjpeg_parser.o
|
OBJS-$(CONFIG_MJPEG_PARSER) += mjpeg_parser.o
|
||||||
OBJS-$(CONFIG_MLP_PARSER) += mlp_parser.o mlp.o
|
OBJS-$(CONFIG_MLP_PARSER) += mlp_parser.o mlp.o
|
||||||
OBJS-$(CONFIG_MPEG4VIDEO_PARSER) += mpeg4video_parser.o h263.o \
|
OBJS-$(CONFIG_MPEG4VIDEO_PARSER) += mpeg4video_parser.o h263.o \
|
||||||
@@ -802,11 +771,9 @@ OBJS-$(CONFIG_REMOVE_EXTRADATA_BSF) += remove_extradata_bsf.o
|
|||||||
OBJS-$(CONFIG_TEXT2MOVSUB_BSF) += movsub_bsf.o
|
OBJS-$(CONFIG_TEXT2MOVSUB_BSF) += movsub_bsf.o
|
||||||
|
|
||||||
# thread libraries
|
# thread libraries
|
||||||
OBJS-$(HAVE_PTHREADS) += pthread.o
|
OBJS-$(HAVE_PTHREADS) += pthread.o frame_thread_encoder.o
|
||||||
OBJS-$(HAVE_W32THREADS) += pthread.o
|
OBJS-$(HAVE_W32THREADS) += pthread.o frame_thread_encoder.o
|
||||||
OBJS-$(HAVE_OS2THREADS) += pthread.o
|
OBJS-$(HAVE_OS2THREADS) += pthread.o frame_thread_encoder.o
|
||||||
|
|
||||||
OBJS-$(CONFIG_FRAME_THREAD_ENCODER) += frame_thread_encoder.o
|
|
||||||
|
|
||||||
SKIPHEADERS += %_tablegen.h \
|
SKIPHEADERS += %_tablegen.h \
|
||||||
%_tables.h \
|
%_tables.h \
|
||||||
@@ -822,19 +789,20 @@ SKIPHEADERS-$(CONFIG_LIBUTVIDEO) += libutvideo.h
|
|||||||
SKIPHEADERS-$(CONFIG_MPEG_XVMC_DECODER) += xvmc.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
|
SKIPHEADERS-$(CONFIG_VDA) += vda.h
|
||||||
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h
|
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h
|
||||||
|
SKIPHEADERS-$(HAVE_OS2THREADS) += os2threads.h
|
||||||
|
SKIPHEADERS-$(HAVE_W32THREADS) += w32pthreads.h
|
||||||
|
|
||||||
TESTPROGS = cabac \
|
TESTPROGS = cabac \
|
||||||
|
dct \
|
||||||
fft \
|
fft \
|
||||||
fft-fixed \
|
fft-fixed \
|
||||||
fft-fixed32 \
|
|
||||||
golomb \
|
golomb \
|
||||||
iirfilter \
|
iirfilter \
|
||||||
imgconvert \
|
imgconvert \
|
||||||
rangecoder \
|
rangecoder \
|
||||||
snowenc \
|
snowenc \
|
||||||
|
|
||||||
TESTPROGS-$(CONFIG_DCT) += dct
|
|
||||||
TESTPROGS-$(HAVE_MMX) += motion
|
TESTPROGS-$(HAVE_MMX) += motion
|
||||||
TESTOBJS = dctref.o
|
TESTOBJS = dctref.o
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Video Acceleration API (video decoding)
|
* a64 video encoder - basic headers
|
||||||
* HW decode acceleration for MPEG-2, MPEG-4, H.264 and VC-1
|
* Copyright (c) 2009 Tobias Bindhammer
|
||||||
*
|
|
||||||
* Copyright (C) 2013 Anton Khirnov
|
|
||||||
*
|
*
|
||||||
* This file is part of FFmpeg.
|
* This file is part of FFmpeg.
|
||||||
*
|
*
|
||||||
@@ -21,28 +19,40 @@
|
|||||||
* 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
|
||||||
|
* a64 video encoder - basic headers
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef AVCODEC_A64ENC_H
|
||||||
|
#define AVCODEC_A64ENC_H
|
||||||
|
|
||||||
|
#include "libavutil/lfg.h"
|
||||||
#include "avcodec.h"
|
#include "avcodec.h"
|
||||||
#include "vaapi_internal.h"
|
|
||||||
|
|
||||||
int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)
|
#define C64XRES 320
|
||||||
{
|
#define C64YRES 200
|
||||||
struct vaapi_context * const vactx = avctx->hwaccel_context;
|
|
||||||
MpegEncContext *s = avctx->priv_data;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = ff_vaapi_commit_slices(vactx);
|
typedef struct A64Context {
|
||||||
if (ret < 0)
|
/* general variables */
|
||||||
goto finish;
|
AVFrame picture;
|
||||||
|
|
||||||
ret = ff_vaapi_render_picture(vactx,
|
/* variables for multicolor modes */
|
||||||
ff_vaapi_get_surface_id(s->current_picture_ptr));
|
AVLFG randctx;
|
||||||
if (ret < 0)
|
int mc_lifetime;
|
||||||
goto finish;
|
int mc_use_5col;
|
||||||
|
unsigned mc_frame_counter;
|
||||||
|
int *mc_meta_charset;
|
||||||
|
int *mc_charmap;
|
||||||
|
int *mc_best_cb;
|
||||||
|
int mc_luma_vals[5];
|
||||||
|
uint8_t *mc_charset;
|
||||||
|
uint8_t *mc_colram;
|
||||||
|
uint8_t *mc_palette;
|
||||||
|
int mc_pal_size;
|
||||||
|
|
||||||
ff_mpeg_draw_horiz_band(s, 0, s->avctx->height);
|
/* pts of the next packet that will be output */
|
||||||
|
int64_t next_pts;
|
||||||
finish:
|
} A64Context;
|
||||||
ff_vaapi_common_end_frame(avctx);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#endif /* AVCODEC_A64ENC_H */
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
* a64 video encoder - multicolor modes
|
* a64 video encoder - multicolor modes
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "a64enc.h"
|
||||||
#include "a64colors.h"
|
#include "a64colors.h"
|
||||||
#include "a64tables.h"
|
#include "a64tables.h"
|
||||||
#include "elbg.h"
|
#include "elbg.h"
|
||||||
@@ -36,31 +37,6 @@
|
|||||||
#define INTERLACED 1
|
#define INTERLACED 1
|
||||||
#define CROP_SCREENS 1
|
#define CROP_SCREENS 1
|
||||||
|
|
||||||
#define C64XRES 320
|
|
||||||
#define C64YRES 200
|
|
||||||
|
|
||||||
typedef struct A64Context {
|
|
||||||
/* general variables */
|
|
||||||
AVFrame picture;
|
|
||||||
|
|
||||||
/* variables for multicolor modes */
|
|
||||||
AVLFG randctx;
|
|
||||||
int mc_lifetime;
|
|
||||||
int mc_use_5col;
|
|
||||||
unsigned mc_frame_counter;
|
|
||||||
int *mc_meta_charset;
|
|
||||||
int *mc_charmap;
|
|
||||||
int *mc_best_cb;
|
|
||||||
int mc_luma_vals[5];
|
|
||||||
uint8_t *mc_charset;
|
|
||||||
uint8_t *mc_colram;
|
|
||||||
uint8_t *mc_palette;
|
|
||||||
int mc_pal_size;
|
|
||||||
|
|
||||||
/* pts of the next packet that will be output */
|
|
||||||
int64_t next_pts;
|
|
||||||
} A64Context;
|
|
||||||
|
|
||||||
/* gray gradient */
|
/* gray gradient */
|
||||||
static const int mc_colors[5]={0x0,0xb,0xc,0xf,0x1};
|
static const int mc_colors[5]={0x0,0xb,0xc,0xf,0x1};
|
||||||
|
|
||||||
@@ -396,7 +372,6 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
|||||||
#if CONFIG_A64MULTI_ENCODER
|
#if CONFIG_A64MULTI_ENCODER
|
||||||
AVCodec ff_a64multi_encoder = {
|
AVCodec ff_a64multi_encoder = {
|
||||||
.name = "a64multi",
|
.name = "a64multi",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
|
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_A64_MULTI,
|
.id = AV_CODEC_ID_A64_MULTI,
|
||||||
.priv_data_size = sizeof(A64Context),
|
.priv_data_size = sizeof(A64Context),
|
||||||
@@ -404,13 +379,13 @@ AVCodec ff_a64multi_encoder = {
|
|||||||
.encode2 = a64multi_encode_frame,
|
.encode2 = a64multi_encode_frame,
|
||||||
.close = a64multi_close_encoder,
|
.close = a64multi_close_encoder,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
|
||||||
.capabilities = CODEC_CAP_DELAY,
|
.capabilities = CODEC_CAP_DELAY,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_A64MULTI5_ENCODER
|
#if CONFIG_A64MULTI5_ENCODER
|
||||||
AVCodec ff_a64multi5_encoder = {
|
AVCodec ff_a64multi5_encoder = {
|
||||||
.name = "a64multi5",
|
.name = "a64multi5",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
|
|
||||||
.type = AVMEDIA_TYPE_VIDEO,
|
.type = AVMEDIA_TYPE_VIDEO,
|
||||||
.id = AV_CODEC_ID_A64_MULTI5,
|
.id = AV_CODEC_ID_A64_MULTI5,
|
||||||
.priv_data_size = sizeof(A64Context),
|
.priv_data_size = sizeof(A64Context),
|
||||||
@@ -418,6 +393,7 @@ AVCodec ff_a64multi5_encoder = {
|
|||||||
.encode2 = a64multi_encode_frame,
|
.encode2 = a64multi_encode_frame,
|
||||||
.close = a64multi_close_encoder,
|
.close = a64multi_close_encoder,
|
||||||
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
|
||||||
.capabilities = CODEC_CAP_DELAY,
|
.capabilities = CODEC_CAP_DELAY,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+3
-4
@@ -81,7 +81,7 @@ enum BandType {
|
|||||||
INTENSITY_BT = 15, ///< Scalefactor data are intensity stereo positions.
|
INTENSITY_BT = 15, ///< Scalefactor data are intensity stereo positions.
|
||||||
};
|
};
|
||||||
|
|
||||||
#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_OFF = 0,
|
||||||
@@ -157,7 +157,7 @@ typedef struct LongTermPrediction {
|
|||||||
typedef struct IndividualChannelStream {
|
typedef struct IndividualChannelStream {
|
||||||
uint8_t max_sfb; ///< number of scalefactor bands per group
|
uint8_t max_sfb; ///< number of scalefactor bands per group
|
||||||
enum WindowSequence window_sequence[2];
|
enum WindowSequence window_sequence[2];
|
||||||
uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sine window.
|
uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sinus window.
|
||||||
int num_window_groups;
|
int num_window_groups;
|
||||||
uint8_t group_len[8];
|
uint8_t group_len[8];
|
||||||
LongTermPrediction ltp;
|
LongTermPrediction ltp;
|
||||||
@@ -234,7 +234,7 @@ typedef struct SingleChannelElement {
|
|||||||
int sf_idx[128]; ///< scalefactor indices (used by encoder)
|
int sf_idx[128]; ///< scalefactor indices (used by encoder)
|
||||||
uint8_t zeroes[128]; ///< band is not coded (used by encoder)
|
uint8_t zeroes[128]; ///< band is not coded (used by encoder)
|
||||||
DECLARE_ALIGNED(32, float, coeffs)[1024]; ///< coefficients for IMDCT
|
DECLARE_ALIGNED(32, float, coeffs)[1024]; ///< coefficients for IMDCT
|
||||||
DECLARE_ALIGNED(32, float, saved)[1536]; ///< overlap
|
DECLARE_ALIGNED(32, float, saved)[1024]; ///< overlap
|
||||||
DECLARE_ALIGNED(32, float, ret_buf)[2048]; ///< PCM output buffer
|
DECLARE_ALIGNED(32, float, ret_buf)[2048]; ///< PCM output buffer
|
||||||
DECLARE_ALIGNED(16, float, ltp_state)[3072]; ///< time signal for LTP
|
DECLARE_ALIGNED(16, float, ltp_state)[3072]; ///< time signal for LTP
|
||||||
PredictorState predictor_state[MAX_PREDICTORS];
|
PredictorState predictor_state[MAX_PREDICTORS];
|
||||||
@@ -290,7 +290,6 @@ struct AACContext {
|
|||||||
*/
|
*/
|
||||||
FFTContext mdct;
|
FFTContext mdct;
|
||||||
FFTContext mdct_small;
|
FFTContext mdct_small;
|
||||||
FFTContext mdct_ld;
|
|
||||||
FFTContext mdct_ltp;
|
FFTContext mdct_ltp;
|
||||||
FmtConvertContext fmt_conv;
|
FmtConvertContext fmt_conv;
|
||||||
AVFloatDSPContext fdsp;
|
AVFloatDSPContext fdsp;
|
||||||
|
|||||||
@@ -28,13 +28,13 @@
|
|||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AAC_AC3_PARSE_ERROR_SYNC = -0x1030c0a,
|
AAC_AC3_PARSE_ERROR_SYNC = -1,
|
||||||
AAC_AC3_PARSE_ERROR_BSID = -0x2030c0a,
|
AAC_AC3_PARSE_ERROR_BSID = -2,
|
||||||
AAC_AC3_PARSE_ERROR_SAMPLE_RATE = -0x3030c0a,
|
AAC_AC3_PARSE_ERROR_SAMPLE_RATE = -3,
|
||||||
AAC_AC3_PARSE_ERROR_FRAME_SIZE = -0x4030c0a,
|
AAC_AC3_PARSE_ERROR_FRAME_SIZE = -4,
|
||||||
AAC_AC3_PARSE_ERROR_FRAME_TYPE = -0x5030c0a,
|
AAC_AC3_PARSE_ERROR_FRAME_TYPE = -5,
|
||||||
AAC_AC3_PARSE_ERROR_CRC = -0x6030c0a,
|
AAC_AC3_PARSE_ERROR_CRC = -6,
|
||||||
AAC_AC3_PARSE_ERROR_CHANNEL_CFG = -0x7030c0a,
|
AAC_AC3_PARSE_ERROR_CHANNEL_CFG = -7,
|
||||||
} AACAC3ParseError;
|
} AACAC3ParseError;
|
||||||
|
|
||||||
typedef struct AACAC3ParseContext {
|
typedef struct AACAC3ParseContext {
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!hdr.crc_absent && hdr.num_aac_frames > 1) {
|
if (!hdr.crc_absent && hdr.num_aac_frames > 1) {
|
||||||
avpriv_report_missing_feature(avctx,
|
av_log_missing_feature(avctx, "Multiple RDBs per frame with CRC", 0);
|
||||||
"Multiple RDBs per frame with CRC");
|
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,10 +74,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
if (!hdr.chan_config) {
|
if (!hdr.chan_config) {
|
||||||
init_get_bits(&gb, buf, buf_size * 8);
|
init_get_bits(&gb, buf, buf_size * 8);
|
||||||
if (get_bits(&gb, 3) != 5) {
|
if (get_bits(&gb, 3) != 5) {
|
||||||
avpriv_report_missing_feature(avctx,
|
av_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element", 0);
|
||||||
"PCE-based channel configuration "
|
|
||||||
"without PCE as first syntax "
|
|
||||||
"element");
|
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
init_put_bits(&pb, pce_data, MAX_PCE_SIZE);
|
init_put_bits(&pb, pce_data, MAX_PCE_SIZE);
|
||||||
@@ -112,7 +108,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
AVBitStreamFilter ff_aac_adtstoasc_bsf = {
|
AVBitStreamFilter ff_aac_adtstoasc_bsf = {
|
||||||
.name = "aac_adtstoasc",
|
"aac_adtstoasc",
|
||||||
.priv_data_size = sizeof(AACBSFContext),
|
sizeof(AACBSFContext),
|
||||||
.filter = aac_adtstoasc_filter,
|
aac_adtstoasc_filter,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static int aac_sync(uint64_t state, AACAC3ParseContext *hdr_info,
|
|||||||
int size;
|
int size;
|
||||||
union {
|
union {
|
||||||
uint64_t u64;
|
uint64_t u64;
|
||||||
uint8_t u8[8];
|
uint8_t u8[8 + FF_INPUT_BUFFER_PADDING_SIZE];
|
||||||
} tmp;
|
} tmp;
|
||||||
|
|
||||||
tmp.u64 = av_be2ne64(state);
|
tmp.u64 = av_be2ne64(state);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ void ff_aac_tableinit(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 428; i++)
|
for (i = 0; i < 428; i++)
|
||||||
ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.0);
|
ff_aac_pow2sf_tab[i] = pow(2, (i - POW_SF2_ZERO) / 4.);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_HARDCODED_TABLES */
|
#endif /* CONFIG_HARDCODED_TABLES */
|
||||||
|
|
||||||
|
|||||||
@@ -1113,25 +1113,25 @@ static void search_for_ms(AACEncContext *s, ChannelElement *cpe,
|
|||||||
}
|
}
|
||||||
|
|
||||||
AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
|
AACCoefficientsEncoder ff_aac_coders[AAC_CODER_NB] = {
|
||||||
[AAC_CODER_FAAC] = {
|
{
|
||||||
search_for_quantizers_faac,
|
search_for_quantizers_faac,
|
||||||
encode_window_bands_info,
|
encode_window_bands_info,
|
||||||
quantize_and_encode_band,
|
quantize_and_encode_band,
|
||||||
search_for_ms,
|
search_for_ms,
|
||||||
},
|
},
|
||||||
[AAC_CODER_ANMR] = {
|
{
|
||||||
search_for_quantizers_anmr,
|
search_for_quantizers_anmr,
|
||||||
encode_window_bands_info,
|
encode_window_bands_info,
|
||||||
quantize_and_encode_band,
|
quantize_and_encode_band,
|
||||||
search_for_ms,
|
search_for_ms,
|
||||||
},
|
},
|
||||||
[AAC_CODER_TWOLOOP] = {
|
{
|
||||||
search_for_quantizers_twoloop,
|
search_for_quantizers_twoloop,
|
||||||
codebook_trellis_rate,
|
codebook_trellis_rate,
|
||||||
quantize_and_encode_band,
|
quantize_and_encode_band,
|
||||||
search_for_ms,
|
search_for_ms,
|
||||||
},
|
},
|
||||||
[AAC_CODER_FAST] = {
|
{
|
||||||
search_for_quantizers_fast,
|
search_for_quantizers_fast,
|
||||||
encode_window_bands_info,
|
encode_window_bands_info,
|
||||||
quantize_and_encode_band,
|
quantize_and_encode_band,
|
||||||
|
|||||||
+192
-564
File diff suppressed because it is too large
Load Diff
+12
-11
@@ -593,7 +593,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
coeffs[ch] = cpe->ch[ch].coeffs;
|
coeffs[ch] = cpe->ch[ch].coeffs;
|
||||||
s->psy.model->analyze(&s->psy, start_ch, coeffs, wi);
|
s->psy.model->analyze(&s->psy, start_ch, coeffs, wi);
|
||||||
for (ch = 0; ch < chans; ch++) {
|
for (ch = 0; ch < chans; ch++) {
|
||||||
s->cur_channel = start_ch + ch;
|
s->cur_channel = start_ch * 2 + ch;
|
||||||
s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda);
|
s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda);
|
||||||
}
|
}
|
||||||
cpe->common_window = 0;
|
cpe->common_window = 0;
|
||||||
@@ -609,7 +609,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
s->cur_channel = start_ch;
|
s->cur_channel = start_ch * 2;
|
||||||
if (s->options.stereo_mode && cpe->common_window) {
|
if (s->options.stereo_mode && cpe->common_window) {
|
||||||
if (s->options.stereo_mode > 0) {
|
if (s->options.stereo_mode > 0) {
|
||||||
IndividualChannelStream *ics = &cpe->ch[0].ics;
|
IndividualChannelStream *ics = &cpe->ch[0].ics;
|
||||||
@@ -679,6 +679,9 @@ static av_cold int aac_encode_end(AVCodecContext *avctx)
|
|||||||
av_freep(&s->buffer.samples);
|
av_freep(&s->buffer.samples);
|
||||||
av_freep(&s->cpe);
|
av_freep(&s->cpe);
|
||||||
ff_af_queue_close(&s->afq);
|
ff_af_queue_close(&s->afq);
|
||||||
|
#if FF_API_OLD_ENCODE_AUDIO
|
||||||
|
av_freep(&avctx->coded_frame);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -712,6 +715,11 @@ static av_cold int alloc_buffers(AVCodecContext *avctx, AACEncContext *s)
|
|||||||
for(ch = 0; ch < s->channels; ch++)
|
for(ch = 0; ch < s->channels; ch++)
|
||||||
s->planar_samples[ch] = s->buffer.samples + 3 * 1024 * ch;
|
s->planar_samples[ch] = s->buffer.samples + 3 * 1024 * ch;
|
||||||
|
|
||||||
|
#if FF_API_OLD_ENCODE_AUDIO
|
||||||
|
if (!(avctx->coded_frame = avcodec_alloc_frame()))
|
||||||
|
goto alloc_fail;
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
alloc_fail:
|
alloc_fail:
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
@@ -766,9 +774,6 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
|
|||||||
s->psypp = ff_psy_preprocess_init(avctx);
|
s->psypp = ff_psy_preprocess_init(avctx);
|
||||||
s->coder = &ff_aac_coders[s->options.aac_coder];
|
s->coder = &ff_aac_coders[s->options.aac_coder];
|
||||||
|
|
||||||
if (HAVE_MIPSDSPR1)
|
|
||||||
ff_aac_coder_init_mips(s);
|
|
||||||
|
|
||||||
s->lambda = avctx->global_quality ? avctx->global_quality : 120;
|
s->lambda = avctx->global_quality ? avctx->global_quality : 120;
|
||||||
|
|
||||||
ff_aac_tableinit();
|
ff_aac_tableinit();
|
||||||
@@ -791,11 +796,7 @@ static const AVOption aacenc_options[] = {
|
|||||||
{"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.i64 = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
{"auto", "Selected by the Encoder", 0, AV_OPT_TYPE_CONST, {.i64 = -1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||||
{"ms_off", "Disable Mid/Side coding", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
{"ms_off", "Disable Mid/Side coding", 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||||
{"ms_force", "Force Mid/Side for the whole frame if possible", 0, AV_OPT_TYPE_CONST, {.i64 = 1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
{"ms_force", "Force Mid/Side for the whole frame if possible", 0, AV_OPT_TYPE_CONST, {.i64 = 1 }, INT_MIN, INT_MAX, AACENC_FLAGS, "stereo_mode"},
|
||||||
{"aac_coder", "", offsetof(AACEncContext, options.aac_coder), AV_OPT_TYPE_INT, {.i64 = AAC_CODER_TWOLOOP}, 0, AAC_CODER_NB-1, AACENC_FLAGS, "aac_coder"},
|
{"aac_coder", "", offsetof(AACEncContext, options.aac_coder), AV_OPT_TYPE_INT, {.i64 = 2}, 0, AAC_CODER_NB-1, AACENC_FLAGS},
|
||||||
{"faac", "FAAC-inspired method", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_FAAC}, INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
|
|
||||||
{"anmr", "ANMR method", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_ANMR}, INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
|
|
||||||
{"twoloop", "Two loop searching method", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_TWOLOOP}, INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
|
|
||||||
{"fast", "Constant quantizer", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_FAST}, INT_MIN, INT_MAX, AACENC_FLAGS, "aac_coder"},
|
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -815,7 +816,6 @@ static const int mpeg4audio_sample_rates[16] = {
|
|||||||
|
|
||||||
AVCodec ff_aac_encoder = {
|
AVCodec ff_aac_encoder = {
|
||||||
.name = "aac",
|
.name = "aac",
|
||||||
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
|
||||||
.type = AVMEDIA_TYPE_AUDIO,
|
.type = AVMEDIA_TYPE_AUDIO,
|
||||||
.id = AV_CODEC_ID_AAC,
|
.id = AV_CODEC_ID_AAC,
|
||||||
.priv_data_size = sizeof(AACEncContext),
|
.priv_data_size = sizeof(AACEncContext),
|
||||||
@@ -827,5 +827,6 @@ AVCodec ff_aac_encoder = {
|
|||||||
CODEC_CAP_EXPERIMENTAL,
|
CODEC_CAP_EXPERIMENTAL,
|
||||||
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP,
|
||||||
AV_SAMPLE_FMT_NONE },
|
AV_SAMPLE_FMT_NONE },
|
||||||
|
.long_name = NULL_IF_CONFIG_SMALL("AAC (Advanced Audio Coding)"),
|
||||||
.priv_class = &aacenc_class,
|
.priv_class = &aacenc_class,
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-10
@@ -30,14 +30,7 @@
|
|||||||
#include "audio_frame_queue.h"
|
#include "audio_frame_queue.h"
|
||||||
#include "psymodel.h"
|
#include "psymodel.h"
|
||||||
|
|
||||||
typedef enum AACCoder {
|
#define AAC_CODER_NB 4
|
||||||
AAC_CODER_FAAC = 0,
|
|
||||||
AAC_CODER_ANMR,
|
|
||||||
AAC_CODER_TWOLOOP,
|
|
||||||
AAC_CODER_FAST,
|
|
||||||
|
|
||||||
AAC_CODER_NB,
|
|
||||||
}AACCoder;
|
|
||||||
|
|
||||||
typedef struct AACEncOptions {
|
typedef struct AACEncOptions {
|
||||||
int stereo_mode;
|
int stereo_mode;
|
||||||
@@ -92,6 +85,4 @@ typedef struct AACEncContext {
|
|||||||
|
|
||||||
extern float ff_aac_pow34sf_tab[428];
|
extern float ff_aac_pow34sf_tab[428];
|
||||||
|
|
||||||
void ff_aac_coder_init_mips(AACEncContext *c);
|
|
||||||
|
|
||||||
#endif /* AVCODEC_AACENC_H */
|
#endif /* AVCODEC_AACENC_H */
|
||||||
|
|||||||
+2
-1
@@ -429,6 +429,7 @@ static void hybrid_synthesis(PSDSPContext *dsp, float out[2][38][64],
|
|||||||
#define DECAY_SLOPE 0.05f
|
#define DECAY_SLOPE 0.05f
|
||||||
/// Number of frequency bands that can be addressed by the parameter index, b(k)
|
/// Number of frequency bands that can be addressed by the parameter index, b(k)
|
||||||
static const int NR_PAR_BANDS[] = { 20, 34 };
|
static const int NR_PAR_BANDS[] = { 20, 34 };
|
||||||
|
static const int NR_IPDOPD_BANDS[] = { 11, 17 };
|
||||||
/// Number of frequency bands that can be addressed by the sub subband index, k
|
/// Number of frequency bands that can be addressed by the sub subband index, k
|
||||||
static const int NR_BANDS[] = { 71, 91 };
|
static const int NR_BANDS[] = { 71, 91 };
|
||||||
/// Start frequency band for the all-pass filter decay slope
|
/// Start frequency band for the all-pass filter decay slope
|
||||||
@@ -824,7 +825,7 @@ static void stereo_processing(PSContext *ps, float (*l)[32][2], float (*r)[32][2
|
|||||||
h21 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][2];
|
h21 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][2];
|
||||||
h22 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][3];
|
h22 = H_LUT[iid_mapped[e][b] + 7 + 23 * ps->iid_quant][icc_mapped[e][b]][3];
|
||||||
|
|
||||||
if (!PS_BASELINE && ps->enable_ipdopd && 2*b <= NR_PAR_BANDS[is34]) {
|
if (!PS_BASELINE && ps->enable_ipdopd && b < NR_IPDOPD_BANDS[is34]) {
|
||||||
//The spec say says to only run this smoother when enable_ipdopd
|
//The spec say says to only run this smoother when enable_ipdopd
|
||||||
//is set but the reference decoder appears to run it constantly
|
//is set but the reference decoder appears to run it constantly
|
||||||
float h11i, h12i, h21i, h22i;
|
float h11i, h12i, h21i, h22i;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user