summaryrefslogtreecommitdiff
path: root/ffmpeg.h
Commit message (Collapse)AuthorAgeFilesLines
* dxva: add support for new dxva2 and d3d11 hwaccel APIswm42017-06-271-1/+1
| | | | | | | | | | | | | | | This also adds support to avconv (which is trivial due to the new hwaccel API being generic enough). The new decoder setup code in dxva2.c is significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Merges Libav commit f9e7a2f95a7194a8736cc1416a03a1a0155a3e9f. Also adds untested VP9 support. The check for DXVA2 COBJs is removed. Just update your MinGW to something newer than a 5 year old release. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* ffmpeg: Support setting the hardware device to use when filteringMark Thompson2017-06-141-0/+1
| | | | | | | | This only supports one device globally, but more can be used by passing them with input streams in hw_frames_ctx or by deriving new devices inside a filter graph with hwmap. (cherry picked from commit e669db76108de8d7a36c2274c99da82cc94d1dd1)
* ffmpeg: Enable generic hwaccel support for VDPAUMark Thompson2017-06-141-1/+0
| | | | (cherry picked from commit aa6b2e081c504cb99f5e2e0ceb45295ef24bdac2)
* ffmpeg: Enable generic hwaccel support for VAAPIMark Thompson2017-06-141-2/+0
| | | | (cherry picked from commit 62a1ef9f26c654a3e988aa465c4ac1d776c4c356)
* ffmpeg: Generic device setupMark Thompson2017-06-141-0/+17
| | | | | | | Not yet enabled for any hwaccels. (cherry picked from commit d2e6dd32a445b5744a51d090c0822dbd7e434592) (cherry picked from commit 9203aac22874c7259e155b7d00f1f33bb1355129)
* ffmpeg: remove bsf extradata propagation hackJames Almer2017-05-241-1/+0
| | | | | | The offending bitstream filter was fixed, so this is no longer needed. Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: add enc_time_base optionerankor2017-05-101-0/+3
| | | | | | | | | | | add a per-stream option for setting the encoder timebase. the following values are allowed: 0 - for video, use 1/frame_rate, for audio use 1/sample_rate (this is the default) -1 - match the input timebase (when possible) >0 - set the timebase to provided number Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: check for unconnected outputswm42017-05-051-0/+1
| | | | | | Fixes e.g.: ffmpeg -f lavfi -i testsrc -f lavfi -i testsrc -filter_complex "[0:v][1:v]psnr[out]" -f null none
* avformat, ffmpeg: deprecate old rotation APIwm42017-03-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old "API" that signaled rotation as a metadata value has been replaced by DISPLAYMATRIX side data quite a while ago. There is no reason to make muxers/demuxers/API users support both. In addition, the metadata API is dangerous, as user tags could "leak" into it, creating unintended features or bugs. ffmpeg CLI has to be updated to use the new API. In particular, we must not allow to leak the "rotate" tag into the muxer. Some muxers will catch this properly (like mov), but others (like mkv) can add it as generic tag. Note applications, which use libavformat and assume the old rotate API, will interpret such "rotate" user tags as rotate metadata (which it is not), and incorrectly rotate the video. The ffmpeg/ffplay tools drop the use of the old API for muxing and demuxing, as all muxers/demuxers support the new API. This will mean that the tools will not mistakenly interpret per-track "rotate" user tags as rotate metadata. It will _not_ be treated as regression. Unfortunately, hacks have been added, that allow the user to override rotation by setting metadata explicitly, e.g. via -metadata:s:v:0 rotate=0 See references to trac #4560. fate-filter-meta-4560-rotate0 tests this. It's easier to adjust the hack for supporting it than arguing for its removal, so ffmpeg CLI now explicitly catches this case, and essentially replaces the "rotate" value with a display matrix side data. (It would be easier for both user and implementation to create an explicit option for rotation.) When the code under FF_API_OLD_ROTATE_API is disabled, one FATE reference file has to be updated (because "rotate" is not exported anymore). Tested-by: Michael Niedermayer <michael@niedermayer.cc> Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit 'b0f36a0043d76436cc7ab8ff92ab99c94595d3c0'Clément Bœsch2017-03-121-0/+5
| | | | | | | * commit 'b0f36a0043d76436cc7ab8ff92ab99c94595d3c0': avconv: stop using setpts for input framerate forced with -r Merged-by: Clément Bœsch <u@pkh.me>
* ffmpeg: delay processing of subtitles before filters are initializedwm42017-03-031-0/+3
| | | | | | | If a subtitle packet came before the first video frame could be fully decoded, the subtitle packet would get discarded. This puts the subtitle into a queue instead, and processes it once the attached filter graph is initialized.
* ffmpeg_cuvid: adapt for recent filter graph initialization changesTimo Rothenpieler2017-03-031-1/+0
|
* ffmpeg: restructure sending EOF to filtersAnton Khirnov2017-03-031-0/+2
| | | | | | | | | | | | | | | | | | Be more careful when an input stream encounters EOF when its filtergraph has not been configured yet. The current code would immediately mark the corresponding output streams as finished, while there may still be buffered frames waiting for frames to appear on other filtergraph inputs. This should fix the random FATE failures for complex filtergraph tests after a3a0230a9870b9018dc7415ae5872784d524cfe5 This merges Libav commit 94ebf55. It was previously skipped. This is the last filter init related Libav commit that was skipped, so this also removes the commits from doc/libav-merge.txt. Signed-off-by: wm4 <nfxjfg@googlemail.com>
* ffmpeg: init filtergraphs only after we have a frame on each inputAnton Khirnov2017-03-031-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure the actual stream parameters are used, which is important mainly for hardware decoding+filtering cases, which would previously require various weird workarounds to handle the fact that a fake software graph has to be constructed, but never used. This should also improve behaviour in rare cases where avformat_find_stream_info() does not provide accurate information. This merges Libav commit a3a0230. It was previously skipped. The code in flush_encoders() which sets up a "fake" format wasn't in Libav. I'm not sure if it's a good idea, but it tends to give behavior closer to the old one in certain corner cases. The vp8-size-change gives different result, because now the size of the first frame is used. libavformat reported the size of the largest frame for some reason. The exr tests now use the sample aspect ratio of the first frame. For some reason libavformat determines 0/1 as aspect ratio, while the decoder returns the correct one. The ffm and mxf tests change the field_order values. I'm assuming another libavformat/decoding mismatch. Signed-off-by: wm4 <nfxjfg@googlemail.com>
* ffmpeg: do packet ts rescaling in write_packet()Anton Khirnov2017-03-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This will be useful in the following commit, after which the muxer timebase is not always available when encoding. This merges Libav commit 3e265ca. It was previously skipped. There are some changes with how/when the mux_timebase field is set, because the Libav approach often causes a too imprecise time base to be set. This is hard, because the muxer's write_header function can readjust the timebase, at which point we might already have encoded packets buffered. (It might be better to buffer them after the encoder, instead of after all the timestamp handling logic before muxing.) The two FATE tests change because the output time base is raised for subtitles. (Needed to avoid certain rounding issues in other cases.) Includes a minor merge fix by Mark Thompson, and avconv: Move rescale to stream timebase before monotonisation also by Mark Thompson <sw@jkqxz.net>. Signed-off-by: wm4 <nfxjfg@googlemail.com>
* ffmpeg_opt.c: Introduce a -vstats_version option and document the existing ↵Sasi Inguva2017-01-251-0/+1
| | | | | | | -vstats format. Signed-off-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: Add -time_base option to hint the time baseMichael Bradshaw2017-01-141-0/+2
| | | | | Signed-off-by: Michael Bradshaw <mjbshaw@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: Add an option "qsv_device" to choose proper node for QSV child ↵Zhengxu2017-01-111-0/+3
| | | | | | | | | | | | | | | | | device (vaapi or dxva2) Reason: For some cases, such as 2 or more graphics cards existing, the default command line may fail because ffmpeg does not open the correct device node: ffmpeg -hwaccel qsv -c:v h264_qsv -i test.264 -c:v h264_qsv out.264 Let user choose the proper one by running like below: ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -c:v h264_qsv \ -i test.264 -c:v h264_qsv out.264 Signed-off-by: ChaoX A Liu <chaox.a.liu@gmail.com> Signed-off-by: Huang, Zhengxu <zhengxu.maxwell@gmail.com> Signed-off-by: Andrew, Zhang <huazh407@gmail.com> Signed-off-by: Mark Thompson <sw@jkqxz.net>
* Merge commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5'Hendrik Leppkes2016-11-131-0/+12
| | | | | | | * commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5': avconv: decouple configuring filtergraphs and setting output parameters Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* ffmpeg: parameters for filter thread countsDeHackEd2016-11-061-0/+3
| | | | | | Enables specifying how many threads are available to each filtergraph. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '722ec3eb35bc152ce91d0a4502eca0df1c0086d0'Hendrik Leppkes2016-11-031-0/+15
| | | | | | | * commit '722ec3eb35bc152ce91d0a4502eca0df1c0086d0': avconv: decouple configuring filtergraphs and setting input parameters Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* Merge commit '398f015f077c6a2406deffd9e37ff34b9c7bb3bc'Hendrik Leppkes2016-10-081-0/+7
| | | | | | | * commit '398f015f077c6a2406deffd9e37ff34b9c7bb3bc': avconv: buffer the packets written while the muxer is not initialized Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* ffmpeg: Fix bitstream typoMichael Niedermayer2016-10-071-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '1c169782cae6c5c430ff62e7d7272dc9d0e8d527'Hendrik Leppkes2016-10-071-0/+8
| | | | | | | * commit '1c169782cae6c5c430ff62e7d7272dc9d0e8d527': avconv: explicitly postpone writing the header until all streams are initialized Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* ffmpeg: use new decode APIwm42016-10-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This is a bit messy, mainly due to timestamp handling. decode_video() relied on the fact that it could set dts on a flush/drain packet. This is not possible with the old API, and won't be. (I think doing this was very questionable with the old API. Flush packets should not contain any information; they just cause a FIFO to be emptied.) This is replaced with checking the best_effort_timestamp for AV_NOPTS_VALUE, and using the suggested DTS in the drain case. The modified tests (fate-cavs and others) still fails due to dropping the last frame. This happens because the timestamp of the last frame goes backwards (ffprobe -show_frames shows the same thing). I suspect that this "worked" due to the best effort timestamp logic picking the DTS over the decreasing PTS. Since this logic is in libavcodec (where it probably shouldn't be), this can't be easily fixed. The timestamps of the cavs samples are weird anyway, so I chose not to fix it. Another strange thing is the timestamp handling in the video path of process_input_packet (after the decode_video() call). It looks like the code to increase next_dts and next_pts should be run every time a frame is decoded - but it's needed even if output is skipped.
* ffmpeg: move subframe warning to libavcodecwm42016-10-011-1/+0
| | | | | | | | | | | With the new decode API, doing this in ffmpeg.c is impractical. There was resistance against removing the warning, so put it into libavcodec. Not bothering with reducing the warning to verbose log level for subsequent wanrings. The warning should be rare, and only happen when developing new codecs for the old API. Includes a change suggested by Michael Niedermayer.
* ffmpeg: stop using AVStream.codec on stream copyJames Almer2016-09-271-0/+1
| | | | | | | | | | | | This commit is based on commit 35c8580 from Anton Khirnov <anton@khirnov.net> which was skipped in b8945c4. The avcodec_copy_context() call in the encode path is left in place for now as AVStream.codec is apparently still required even after porting ffmpeg to the new bsf API. Tested-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: switch to the new BSF APIClément Bœsch2016-09-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is initially largely based on commit 4426540 from Anton Khirnov <anton@khirnov.net> and two following fixes (80fb19b and fe7b21c) which were previously skipped respectively in 98e3153, c9ee36e, and 7fe7cdc. mpeg4-bsf-unpack-bframes FATE reference is updated because the bsf filter now actually fixes the extradata (mpeg4_unpack_bframes_init() changing one byte is now honored on the output extradata). The FATE references for remove_extra change because the packet flags were wrong and the keyframes weren't marked, causing the bsf relying on these proprieties to not actually work as intended. The following was fixed by James Almer: The filter option arguments are now also parsed correctly. A hack to propagate extradata changed by bitstream filters after the first av_bsf_receive_packet() call is added to maintain the current behavior. This was previously done by av_bitstream_filter_filter() and is needed for the aac_adtstoasc bsf. The exit_on_error was not being checked anymore, and led to an exit error in the last frame of h264_mp4toannexb test. Restoring this behaviour prevents erroring out. The test is still changed as a result due to the badly filtered frame now not being written after the failure. Signed-off-by: Clément Bœsch <u@pkh.me> Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: switch to codecparClément Bœsch2016-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | This commit is largely based on commit 15e84ed3 from Anton Khirnov <anton@khirnov.net> which was previously skipped in bbf5ef9d. There are still a bunch of things raising codecpar related warnings that need fixing, such as: - the use of codec->debug in the interactive debug mode - read_ffserver_streams(): it's probably broken now but there is no test - lowres stuff - codec copy apparently required by bitstream filters The matroska references are updated because they now properly forward the field_order (previously unknown, now progressive). Thanks to James Almer for fixing a bunch of FATE issues in this commit. Signed-off-by: Clément Bœsch <clement@stupeflix.com> Signed-off-by: James Almer <jamrial@gmail.com>
* Merge commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee' into mergeTimothy Gu2016-08-031-1/+1
| | | | | | | * commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee': avconv: create simple filtergraphs earlier Merged-by: Timothy Gu <timothygu99@gmail.com>
* Merge commit '49670e4218d34899a1c37abb7a11615efc16f757'Timothy Gu2016-08-031-0/+1
| | | | | | | | | | * commit '49670e4218d34899a1c37abb7a11615efc16f757': avconv: add a function for determining whether a filtergraph is simple Conflicts: avconv.c Merged-by: Timothy Gu <timothygu99@gmail.com>
* ffmpeg: Add cuvid hwaccel supportTimo Rothenpieler2016-06-101-0/+3
|
* Merge commit '5d273d3efac340ef8de445c955ff44c7abed4e8f'Derek Buitenhuis2016-05-081-0/+9
| | | | | | | * commit '5d273d3efac340ef8de445c955ff44c7abed4e8f': avconv: VAAPI hwcontext initialisation and hwaccel helper Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Merge commit 'bd49be885e9ad6bae599c54473ba2fa2957eb140'Derek Buitenhuis2016-02-171-1/+0
| | | | | | | | * commit 'bd49be885e9ad6bae599c54473ba2fa2957eb140': avconv_vdpau: use the hwcontext API to simplify code Tested-by: wm4 Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* ffmpeg: use lavf API for applying bitstream filtersRodger Combs2015-12-281-1/+0
|
* ffmpeg: Add basic support to mux multiple programsMichael Niedermayer2015-12-111-0/+2
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: Fixing typos and adding comments to fps codeBryan Huh2015-11-161-1/+1
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: set muxer packet duration based on framerate only for CFRMichael Niedermayer2015-11-111-0/+1
| | | | | | | | | | | a set ost->frame_rate does not imply CFR in ffmpeg The changed fate tests had all wrong packet durations (like 1/1000 or 1/90000) There might be more cases in which is_cfr could be set Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: add abort_on option to allow aborting on empty outputMarton Balint2015-10-221-0/+3
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: fix ffmpeg.h trailing whitespaceMarton Balint2015-10-221-2/+2
| | | | | | | How this passed through the commit hook? Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* Merge commit 'fb472e1a11a4e0caed2c3c91da01ea8e35d9e3f8'Hendrik Leppkes2015-10-221-0/+5
| | | | | | | * commit 'fb472e1a11a4e0caed2c3c91da01ea8e35d9e3f8': avconv: add support for Intel QSV-accelerated transcoding Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* Merge commit '16b0c929621f84983b83b9735ce973acb12723bc'Hendrik Leppkes2015-10-141-0/+10
| | | | | | | * commit '16b0c929621f84983b83b9735ce973acb12723bc': avconv: Add loop option. Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* ffmpeg: switch swscale option handling to AVDictionary similar to what the ↵Michael Niedermayer2015-08-081-1/+1
| | | | | | other subsystems use Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: add new Videotoolbox hwaccel.Sebastien Zwickert2015-08-031-0/+3
|
* ffmpeg: Implement support for seeking relative to EOFMichael Niedermayer2015-07-291-0/+1
| | | | | | Fixes Ticket227 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg.c: remove all remaining coded_frame usesMichael Niedermayer2015-07-281-0/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: Use side data instead of coded_frame for error[] valuesMichael Niedermayer2015-07-281-0/+3
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '5d3addb937946eca5391e40b5e6308e74ac6f77b'Michael Niedermayer2015-07-211-0/+3
| | | | | | | | | | | | | | * commit '5d3addb937946eca5391e40b5e6308e74ac6f77b': Add a quality factor packet side data Conflicts: doc/APIchanges ffmpeg.c libavcodec/avcodec.h libavcodec/mpegvideo_enc.c libavcodec/version.h Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '6d592fbd0d8e89ecade3fc93b36ea200213dc01c'Michael Niedermayer2015-07-191-0/+2
| | | | | | | | | | | * commit '6d592fbd0d8e89ecade3fc93b36ea200213dc01c': avconv: split creating and (re-)configuring complex filtergraphs Conflicts: ffmpeg_filter.c ffmpeg_opt.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: Do not copy the display matrix if rotation meta-data is manually addedMichael Niedermayer2015-05-181-0/+1
| | | | | | Fixes Ticket4560 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>