summaryrefslogtreecommitdiff
path: root/ffmpeg_opt.c
Commit message (Collapse)AuthorAge
* ffmpeg: Support setting the hardware device to use when filteringMark Thompson2017-06-14
| | | | | | | | 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-14
| | | | (cherry picked from commit aa6b2e081c504cb99f5e2e0ceb45295ef24bdac2)
* ffmpeg: Enable generic hwaccel support for VAAPIMark Thompson2017-06-14
| | | | (cherry picked from commit 62a1ef9f26c654a3e988aa465c4ac1d776c4c356)
* ffmpeg: Generic device setupMark Thompson2017-06-14
| | | | | | | Not yet enabled for any hwaccels. (cherry picked from commit d2e6dd32a445b5744a51d090c0822dbd7e434592) (cherry picked from commit 9203aac22874c7259e155b7d00f1f33bb1355129)
* ffmpeg: remove bsf extradata propagation hackJames Almer2017-05-24
| | | | | | 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-10
| | | | | | | | | | | 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>
* Merge commit '122de16dd8108a59a55d30543c9f28b5f61b02d1'Clément Bœsch2017-05-05
| | | | | | | * commit '122de16dd8108a59a55d30543c9f28b5f61b02d1': Replace cmdutils_common_opts.h by a macro Merged-by: Clément Bœsch <cboesch@gopro.com>
* ffmpeg: check for unconnected outputswm42017-05-05
| | | | | | Fixes e.g.: ffmpeg -f lavfi -i testsrc -f lavfi -i testsrc -filter_complex "[0:v][1:v]psnr[out]" -f null none
* Merge commit '01348e411f962f5e4605d649fc9a47a54587ba8e'James Almer2017-03-31
| | | | | | | * commit '01348e411f962f5e4605d649fc9a47a54587ba8e': avconv_opt: Consistently iterate through hwaccels array in all cases Merged-by: James Almer <jamrial@gmail.com>
* avformat, ffmpeg: deprecate old rotation APIwm42017-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ffmpeg, ffprobe: don't "merge" side data into packet data by defaultwm42017-03-14
| | | | | | | | Preparation for potentially disabling merged side data by default in the libs. Do this in particular because it affects fate tests. The changed tests either reflect added packet side data, or the changed packet size due to merged side data removal reducing the packet size.
* ffmpeg: init filtergraphs only after we have a frame on each inputAnton Khirnov2017-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.c: Add output file index and stream index to vstats file.Sasi Inguva2017-01-27
| | | | | Signed-off-by: Sasi Inguva <isasi@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg_opt.c: Introduce a -vstats_version option and document the existing ↵Sasi Inguva2017-01-25
| | | | | | | -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-14
| | | | | 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-11
| | | | | | | | | | | | | | | | | 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>
* Avoid using the term "file" and prefer "url" in some docs and commentsMichael Niedermayer2016-12-05
| | | | | | This should make it less ambigous that these are URLs Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg_opt: Fix starttime with ffm in bitexact modeMichael Niedermayer2016-11-28
| | | | | | | | This fixes some differences between runs of the ffserver tests (in my local tree 2 runs gave the same result with this but i had other changes too) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg_filter: fix several logic failuresPaul B Mahol2016-11-24
| | | | | | | | | Move global thread variables to better place. Use correct variable for simple and complex filtergraphs. This makes number of threads set per filter work again. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '50722b4f0cbc5940e9e6e21d113888436cc89ff5'Hendrik Leppkes2016-11-13
| | | | | | | * 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-06
| | | | | | Enables specifying how many threads are available to each filtergraph. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '722ec3eb35bc152ce91d0a4502eca0df1c0086d0'Hendrik Leppkes2016-11-03
| | | | | | | * commit '722ec3eb35bc152ce91d0a4502eca0df1c0086d0': avconv: decouple configuring filtergraphs and setting input parameters Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* Merge commit '398f015f077c6a2406deffd9e37ff34b9c7bb3bc'Hendrik Leppkes2016-10-08
| | | | | | | * commit '398f015f077c6a2406deffd9e37ff34b9c7bb3bc': avconv: buffer the packets written while the muxer is not initialized Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* ffmpeg: don't reconfigure terminal if we're not taking input from stdinRodger Combs2016-10-06
|
* ffmpeg: stop using AVStream.codec on stream copyJames Almer2016-09-27
| | | | | | | | | | | | 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: fix memleak of bitstream filter context on failureJames Almer2016-09-25
| | | | | | | | Increase the nb_bitstream_filters value as soon as the context is allocated, so if option parsing fails the last context is actually freed. Reviewed-by: Josh de Kock <josh@itanimul.li> Signed-off-by: James Almer <jamrial@gmail.com>
* ffmpeg: Fix bistream typosMichael Niedermayer2016-09-25
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: switch to the new BSF APIClément Bœsch2016-09-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-21
| | | | | | | | | | | | | | | | | | | | 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>
* ffmpeg_opt: Suggest to use "file:..." if a protocol was not found.Carl Eugen Hoyos2016-09-07
| | | | Fixes Debian bug 785690.
* Merge commit '90944ee3ab79081845ea1bd97eea475031ce0842'James Almer2016-08-06
| | | | | | | | | | | * commit '90944ee3ab79081845ea1bd97eea475031ce0842': avconv: refactor selecting an encoder Conflicts: ffmpeg.c ffmpeg_opt.c Merged-by: James Almer <jamrial@gmail.com>
* ffmpeg_opt: Remove duplicated initialization of attachment streamTimothy Gu2016-08-03
| | | | | These two fields are already initialized to the same values in new_attachment_stream().
* Merge commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee' into mergeTimothy Gu2016-08-03
| | | | | | | * commit '73c6ec6d659bab11ac424a4ba6ce3a56246295ee': avconv: create simple filtergraphs earlier Merged-by: Timothy Gu <timothygu99@gmail.com>
* ffmpeg_opt: Delete duplicate “hwaccel_output_format” option.Jun Zhao2016-07-20
| | | | | | | Delete duplicate “hwaccel_output_format” option. Signed-off-by: Jun Zhao <mypopydev@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: Add cuvid hwaccel supportTimo Rothenpieler2016-06-10
|
* Merge commit '5d273d3efac340ef8de445c955ff44c7abed4e8f'Derek Buitenhuis2016-05-08
| | | | | | | * commit '5d273d3efac340ef8de445c955ff44c7abed4e8f': avconv: VAAPI hwcontext initialisation and hwaccel helper Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* ffmpeg: remove hardcoded 'now' creation_time supportMarton Balint2016-03-03
| | | | | | | | Every date parsing routine now uses av_parse_time which handles 'now' and provides greater precision as well. This change also enables the segmenter muxer to set the proper 'now' creation time at the beginning of each segment. Signed-off-by: Marton Balint <cus@passwd.hu>
* Merge commit 'bd49be885e9ad6bae599c54473ba2fa2957eb140'Derek Buitenhuis2016-02-17
| | | | | | | | * commit 'bd49be885e9ad6bae599c54473ba2fa2957eb140': avconv_vdpau: use the hwcontext API to simplify code Tested-by: wm4 Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* ffmpeg_opt: Fix memleaks in "manually set programs" loopMichael Niedermayer2016-02-08
| | | | | | Fixes CID1351356, CID1351357 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg_opt: Allow -metadata option to set metadata on programs.Vittorio Gambaletta (VittGam)2016-01-26
| | | | | Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg_opt: Move the 'process manually set programs' block above 'process ↵Vittorio Gambaletta (VittGam)2016-01-26
| | | | | | | manually set metadata' in open_output_file(). Signed-off-by: Vittorio Gambaletta <ffmpeg-dev@vittgam.net> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: use lavf API for applying bitstream filtersRodger Combs2015-12-28
|
* ffmpeg: Allow specifying the program number for created programsMichael Niedermayer2015-12-16
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffmpeg: Add basic support to mux multiple programsMichael Niedermayer2015-12-11
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* all: remove some casts of function pointer to void *Ganesh Ajjanagadde2015-10-24
| | | | | | | | | | These casts are unnecessary, and may safely be removed. Found by enabling -Wpedantic on clang 3.7. Tested with FATE. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* ffmpeg: add abort_on option to allow aborting on empty outputMarton Balint2015-10-22
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Marton Balint <cus@passwd.hu>
* Merge commit 'fb472e1a11a4e0caed2c3c91da01ea8e35d9e3f8'Hendrik Leppkes2015-10-22
| | | | | | | * commit 'fb472e1a11a4e0caed2c3c91da01ea8e35d9e3f8': avconv: add support for Intel QSV-accelerated transcoding Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* ffmpeg_opt: rename loop option to stream_loopMichael Niedermayer2015-10-14
| | | | | | | | | | | | | The "loop" option is used in several demuxers (like img2dec) and muxers, using the same name in ffmpeg_opt breaks them. Feel free to revert this and replace by any other solution or rename both as preferred This is just as a quick fix to avoid the regression with existing command lines and to have both named the same (which does not work) Example: ./ffmpeg -loop 1 -i fate-suite/png1/lena-rgb24.png -t 1 test.avi will produce 25 frames with the img2dec loop but only 1 frame at 25fps with the ffmpeg loop option Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '16b0c929621f84983b83b9735ce973acb12723bc'Hendrik Leppkes2015-10-14
| | | | | | | * commit '16b0c929621f84983b83b9735ce973acb12723bc': avconv: Add loop option. Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
* Merge commit 'b5e4f393b6757629281f58c3f3f6d55ca522ab60'Hendrik Leppkes2015-09-29
| | | | | | | * commit 'b5e4f393b6757629281f58c3f3f6d55ca522ab60': avconv: Make the private options discovery more manifest Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>