summaryrefslogtreecommitdiff
path: root/fftools
Commit message (Collapse)AuthorAgeFilesLines
* Stop hardcoding align=32 in av_frame_get_buffer() calls.Anton Khirnov2020-05-222-2/+2
| | | | Use 0, which selects the alignment automatically.
* cmdutils: drop libavformat/network.h includeAnton Khirnov2020-05-221-3/+0
| | | | | It is not a public header and has not been used since 10173c0e58e557582dbd659f42c6aa164a8682db
* fftools/cmdutils: remove lossless and intra only capability entries from ↵James Almer2020-05-211-4/+0
| | | | | | | | print_codec() They are codec properties, not encoder capabilities. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg_filter: check the codec's descriptor to see if it's losslessJames Almer2020-05-211-1/+2
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg: use local variable with same contents directlyLimin Wang2020-05-061-13/+18
| | | | Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
* ffmpeg: Don't require a known device to pass a frames context to an encoderMark Thompson2020-05-031-33/+42
| | | | | | | | | | | | | | The previous code here did not handle passing a frames context when ffmpeg itself did not know about the device it came from (for example, because it was created by device derivation inside a filter graph), which would break encoders requiring that input. Fix that by checking for HW frames and device context methods independently, and prefer to use a frames context method if possible. At the same time, revert the encoding additions to the device matching function because the additional complexity was not relevant to decoding. Also fixes #8637, which is the same case but with the device creation hidden in the ad-hoc libmfx setup code.
* fftools/ffmpeg: use a bsf list instead of individual bsfsMarton Balint2020-05-023-101/+24
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffprobe: show closed caption info in the stream dumpvectronic2020-05-021-0/+2
| | | | | Signed-off-by: vectronic <hello.vectronic@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: Remove the hw_device_ctx globalMark Thompson2020-04-264-11/+3
| | | | | The ad-hoc libmfx setup code is the only place its still used, so move it into that file.
* ffmpeg: Use hardware config metadata with encodersMark Thompson2020-04-262-21/+46
| | | | | | | This can support encoders which want frames and/or device contexts. For the device case, it currently picks the first initialised device of the desired type to give to the encoder - a new option would be needed if it were necessary to choose between multiple devices of the same type.
* ffmpeg: Make filter hardware device selection clearerMark Thompson2020-04-263-11/+32
| | | | Also move it into a dedicated function in the hardware file.
* ffplay: set stream_index to -1 earlier to prevent segfaultPeter Ross2020-04-251-3/+3
| | | | | Signed-off-by: Peter Ross <pross@xvid.org> Reviewed-by: Marton Balint <cus@passwd.hu>
* fftools/ffprobe: support DOVI sidedataJun Zhao2020-04-231-0/+11
| | | | | | support DOVI sidedata. Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* cmdutils: stop using deprecated av_codec_next()Anton Khirnov2020-04-201-14/+19
| | | | Signed-off-by: Josh de Kock <josh@itanimul.li>
* fftools/ffmpeg_opt: Check attachment filesizeAndreas Rheinhardt2020-04-171-2/+4
| | | | | | | | | | | | | | | | | The data of an attachment file is put into an AVCodecParameter's extradata. The corresponding size field has type int, yet there was no check for the size to fit into an int. As a consequence, it was possible to create extradata with negative size (by using a big enough max_alloc). Other errors were also possible: If SIZE_MAX < INT64_MAX (e.g. on 32bit systems) then the file size might be truncated before the allocation; and avio_read() takes an int, too, so one would not have read as much as one desired. Furthermore, the extradata is now padded as is required. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* ffmpeg: Do not clip timestamps at LONG_MAX.Carl Eugen Hoyos2020-04-151-4/+4
| | | | Fixes ticket #8612.
* fftools: fix hwaccels option dump redundancyJun Zhao2020-04-141-5/+0
| | | | | | | | | | | | | | | When QSV is enabled in FFmpeg, the command "ffmpeg -hwaccels" shows a duplicate entry in acceleration methods for QSV: Hardware acceleration methods: vaapi qsv drm opencl qsv Reviewed-by: Mark Thompson <sw@jkqxz.net> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* fftools/ffmpeg: also flush encoders which have a variable frame sizeMarton Balint2020-04-131-3/+0
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffmpeg: Disable copy_ts on timestamp wraparoundMichael Niedermayer2020-04-041-1/+12
| | | | | | | | This allows handling more than 26.5h of mpeg* input Fixes: Ticket 7876 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffplay: flush correct stream after stats updateGyan Doshi2020-04-041-1/+1
| | | | Stats and logs are written to stderr, not stdout.
* ffplay: always show stats at all log levels if requested by userGyan Doshi2020-04-041-12/+24
| | | | | | | Since 3b491c5a500, stats would be hidden if loglevel was lower than info, even if -stats was set. Fixes #6962
* ffmpeg: Print an error instead of a debug message on exit.Carl Eugen Hoyos2020-03-311-0/+2
| | | | Reported-by: Forum user NewPlaza
* ffplay, avcodec, avformat: Don't initialize before av_packet_ref()Andreas Rheinhardt2020-03-281-1/+1
| | | | | | | It already initializes the packet. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* fftools/ffmpeg_opt: Fix [u]int64_t specifier stringAndreas Rheinhardt2020-03-191-2/+2
| | | | | | | | | | | PRId64 and PRIu64 already expand to the complete specifier; adding another 'd' at the end is wrong and just leads to warnings that say that only an option like '-frames:v 2d' will be used, although said option won't be accepted at all ('Expected int64 for frames:v but found 2d'). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
* remove CHAR_MIN/CHAR_MAX usagePaul B Mahol2020-03-171-10/+10
| | | | It is not needed at all.
* ffmpeg: explicitly handle sub2video subpicture initializationJan Ekström2020-03-163-9/+24
| | | | | | | | Each time the sub2video structure is initialized, the sub2video subpicture is initialized together with the first received heartbeat. The heartbeat's PTS is utilized as the subpicture start time. Additionally, add some documentation on the stages.
* fftools/ffmpeg_opt: remove bogus warning of multiple -af and -vf usageMarton Balint2020-03-081-4/+0
| | | | | | This is redundant after the last patch and also fixes ticket #7712. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffmpeg_opt: warn about overwritten parsed optionsMarton Balint2020-03-081-3/+67
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: fix possible memory leak in decoderMarton Balint2020-03-081-1/+4
| | | | | | Fixes ticket #8549. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: default hwaccel_output_format to cuda when hwaccel is cuvidTimo Rothenpieler2020-03-071-12/+19
| | | | | This ensures old commandlines using -hwaccel cuvid don't break due to the recent removal of the the cuvid-specific hwaccel bringup.
* ffmpeg: remove superfluous custom cuvid hwaccelJames Almer2020-03-034-80/+1
| | | | | | | It's a duplicate of the properly implemented nvdec libavcodec hwaccel Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org> Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg_opt: Fix leak of options when parsing options failsAndreas Rheinhardt2020-02-291-0/+1
| | | | | | | | Fixes #8094. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Fix integer overflow in duration computation in seek_to_start()Michael Niedermayer2020-02-161-1/+2
| | | | | | | | | Fixes: signed integer overflow: -9223372036854775808 - 9223372036854775807 cannot be represented in type 'long' Fixes: Ticket8142 Found-by: Suhwan Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffprobe: Remove unneeded castsAndreas Rheinhardt2020-02-141-10/+10
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Integrate two checksAndreas Rheinhardt2020-02-131-10/+10
| | | | | | | | | For audio packets with dts != AV_NOPTS_VALUEs the dts was converted twice to the muxer's timebase during streamcopy, once as a normal packet and once specifically as an audio packet. This has been changed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cmdutils: fix crash if no name for "ffmpeg -h protocol"Jun Zhao2020-01-301-1/+7
| | | | | | | | | | fix crash when used the command like: - ffmpeg -h protocol - ffmpeg -h protocol= Signed-off-by: Jun Zhao <barryjzhao@tencent.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* cmdutils: add show_help_protocol for get protocol optionsSteven Liu2020-01-302-1/+15
| | | | | Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
* ffmpeg: Do not print "SDP:" on top of sdp files.Carl Eugen Hoyos2020-01-271-1/+1
| | | | Fixes ticket #7068.
* cmdutils: Fix compilation on cygwin wrt SetDllDirectory and GetModuleHandleMartin Storsjö2020-01-081-2/+2
| | | | | | | | | | | | After 06ec9c4746ebc1d3b613c1847e434bbd0b4407b4 we check for these functions in configure (which will succeed in cygwin), but cmdutils.c only includes windows.h if _WIN32 is defined (which it isn't in cygwin). Retain the old intent from before 06ec9c4746ebc1d3b613c1847e434bbd0b4407b4, that these functions only would be used when _WIN32 is defined, while only using them if configure has agreed that they do exist. Signed-off-by: Martin Storsjö <martin@martin.st>
* ffmpeg: don't force source-tracked keyframes for duplicatesGyan Doshi2020-01-051-1/+2
| | | | | Prevents a run of consecutive duplicate frames from all being encoded as keyframes, when force_key_frames is set to source.
* ffmpeg: remove premature rescaling of forced_keyframe timesGyan Doshi2020-01-051-4/+0
| | | | | The user-set forced KF times are parsed *after* this deleted loop and rescaled right after parsing.
* fftools/ffmpeg_filter: remove sws_param option from buffersrcZhao Zhili2019-12-311-3/+2
| | | | The option is deprecated and ignored by buffersrc.
* fftools/ffmpeg_opt: Add a missing closing brackets.Carl Eugen Hoyos2019-12-281-1/+1
| | | | Fixes ticket #8447.
* fftools/cmdutils: Fix break command dump for -map optionJun Zhao2019-12-231-1/+1
| | | | | | | | | | | | | | Before this fix, ffmpeg -h full | grep map get the command dump like: -map [-]input_file_id[:stream_specifier][,sync_file_id[:stream_s set input stream mapping ^ | truncated after this fix, we can get full option dump. Found-by: vacingfang <vacingfang@tencent.com> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* fftools/ffmpeg: Reindent after last commitNicolas Gaullier2019-12-211-6/+6
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Fix forward CPB props in to outNicolas Gaullier2019-12-211-0/+2
| | | | | | | CPB side_data is copied when stream-copying (see init_output_stream_streamcopy()), but it shall not be copied when the stream is decoded. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* ffprobe: Fix fate tests for ffprobe in cases where TARGET_PATH differs from ↵Martin Storsjö2019-12-181-4/+18
| | | | | | | | | | | | | | | | | | | the current path In these cases, we must pass the full path of the file to ffprobe (as the current working dir on the remote system, e.g. when invoked with "ssh remote ffprobe ..." isn't the wanted one). The input filename passed to ffprobe is also included in the output, which is part of the reference test data. Add a new option to ffprobe to allow overriding what path is printed, to keep the original relative path in the tests. An alternative approach could be an option to allow requesting omitting the file name from the dumped data, and updating the test references accordingly. Signed-off-by: Martin Storsjö <martin@martin.st>
* configure: Check for the SetDllDirectory and GetModuleHandle functionsMartin Storsjö2019-12-131-2/+2
| | | | | | | | | | | | These functions aren't available when building for the restricted UWP/WinRT/WinStore API subsets. Normally when building in this mode, one is probably only building the libraries, but being able to build ffmpeg.exe still is useful (and a ffmpeg.exe targeting these API subsets still can be run e.g. in wine, for testing). Signed-off-by: Martin Storsjö <martin@martin.st>
* fftools/ffmpeg_opt: Fix mixed declarations and codeAndreas Rheinhardt2019-11-061-2/+4
| | | | | | | Introduced in ed3c317d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Free swresample dictionary during cleanupAndreas Rheinhardt2019-10-251-0/+1
| | | | | | | | | | Freeing this was forgotten in ad899522. Fixes #8315 and #8316. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>