summaryrefslogtreecommitdiff
path: root/fftools
Commit message (Collapse)AuthorAge
...
* ffmpeg: Print an error instead of a debug message on exit.Carl Eugen Hoyos2020-03-31
| | | | Reported-by: Forum user NewPlaza
* ffplay, avcodec, avformat: Don't initialize before av_packet_ref()Andreas Rheinhardt2020-03-28
| | | | | | | 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-19
| | | | | | | | | | | 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-17
| | | | It is not needed at all.
* ffmpeg: explicitly handle sub2video subpicture initializationJan Ekström2020-03-16
| | | | | | | | 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-08
| | | | | | 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-08
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay: fix possible memory leak in decoderMarton Balint2020-03-08
| | | | | | Fixes ticket #8549. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg: default hwaccel_output_format to cuda when hwaccel is cuvidTimo Rothenpieler2020-03-07
| | | | | 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-03
| | | | | | | 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-29
| | | | | | | | 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-16
| | | | | | | | | 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-14
| | | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Integrate two checksAndreas Rheinhardt2020-02-13
| | | | | | | | | 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-30
| | | | | | | | | | 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-30
| | | | | 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-27
| | | | Fixes ticket #7068.
* cmdutils: Fix compilation on cygwin wrt SetDllDirectory and GetModuleHandleMartin Storsjö2020-01-08
| | | | | | | | | | | | 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-05
| | | | | 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-05
| | | | | 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-31
| | | | The option is deprecated and ignored by buffersrc.
* fftools/ffmpeg_opt: Add a missing closing brackets.Carl Eugen Hoyos2019-12-28
| | | | Fixes ticket #8447.
* fftools/cmdutils: Fix break command dump for -map optionJun Zhao2019-12-23
| | | | | | | | | | | | | | 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-21
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: Fix forward CPB props in to outNicolas Gaullier2019-12-21
| | | | | | | 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-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-13
| | | | | | | | | | | | 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-06
| | | | | | | 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-25
| | | | | | | | | | 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>
* fftools/ffmpeg_opt: add error handle if av_asprintf return nullJun Zhao2019-10-18
| | | | | | | add error handle if av_asprintf return null. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* ffprobe: fix output of packets_and_frames section in JSON formatJames Almer2019-10-14
| | | | | | | | | The "type" entry was hardcoded with an trailing comma, even if it was the only entry in the section. Fixes ticket #8228. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg: Improve streamcopyAndreas Rheinhardt2019-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | do_streamcopy() has a packet that gets zero-initialized first, then gets initialized via av_init_packet() after which some of its fields are oerwritten again with the actually desired values (unless it's EOF): The side data is copied into the packet with av_copy_packet_side_data() and if the source packet is refcounted, the packet will get a new reference to the source packet's data. Furthermore, the flags are copied and the timestamp related fields are overwritten with new values. This commit replaces this by using av_packet_ref() to both initialize the packet as well as populate its fields with the right values (unless it's EOF again in which case the packet will still be initialized). The differences to the current approach are as follows: a) There is no call to a deprecated function (av_copy_packet_side_data()) any more. b) Several fields that weren't copied before are now copied from the source packet to the new packet (e.g. pos). Some of them (the timestamp related fields) may be immediately overwritten again and some don't seem to be used at all (e.g. pos), but in return using av_packet_ref() allows to forgo the initializations. c) There was no check for whether copying side data fails or not. This has been changed: Now the program is exited in this case. Using av_packet_ref() does not lead to unnecessary copying of data, because the source packets are already always refcounted (they originate from av_read_frame()). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cmdutils: trailing options may be ignoredLou Logan2019-10-01
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: mypopy <mypopy@gmail.com>
* ffmpeg_opt: remove errant spaceLou Logan2019-09-27
| | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* doc/ffmpeg: -timelimit is in user timeLou Logan2019-09-27
| | | | | Signed-off-by: Lou Logan <lou@lrcd.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg_opt: Fix signed integer overflowAndreas Rheinhardt2019-09-17
| | | | | | | Fixes ticket #8154. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* cmdutils: promote report level if loglevel is higherGyan Doshi2019-09-13
|
* ffmpeg: switch to avformat_seek_file for stream_loopGyan Doshi2019-09-05
| | | | | Fixes stream_loop with very short files where seeking is generic index search
* avcodec/videotoolbox: add support for full range pixel formatsAkemi2019-09-04
| | | | Signed-off-by: Aman Gupta <aman@tmm1.net>
* fftools: Use right function signature and pointersAndreas Rheinhardt2019-08-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option tables of the various fftools (in particular ffprobe) are arrays of OptionDef; said type contains a union of a pointer to void and a function pointer of type int (*)(void *, const char *, const char *) as well as a size_t. Some entries (namely the common entry for writing a report as well as several more of ffprobe's entries) used the pointer to void to store a pointer to functions of type int (*)(const char *) or type int (*)(const char *, const char *); nevertheless, when the functions are actually called in write_option (in cmdutils.c), it is done via a pointer of the first type. There are two things wrong here: 1. Pointer to void can be converted to any pointer to incomplete or object type and back; but they are nevertheless not completely generic pointers: There is no provision in the C standard that guarantees their convertibility with function pointers. C90 lacks a generic function pointer, C99 made every function pointer a generic function pointer and still disallows the convertibility with void *. 2. The signature of the called function differs from the signature of the pointed-to type. This is undefined behaviour in C99 (given that C90 lacks a way to convert function pointers at all, it doesn't say anything about such a situation). It only works because none of the functions this patch is about make any use of their parameters at all. Therefore this commit changes the type of the relevant functions to match the type used for the call and uses the union's function pointer to store it. This is legal even in C90. 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>
* ffplay: properly detect all window size changesMarton Balint2019-08-14
| | | | | | | | | | | | | | SDL_WINDOWEVENT_SIZE_CHANGED should be used instead of SDL_WINDOWEVENT_RESIZED because SDL_WINDOWEVENT_RESIZED is only emitted if the resize happened due to an external event. Fixes ticket #8072. Additional references: https://bugzilla.libsdl.org/show_bug.cgi?id=4760 https://wiki.libsdl.org/SDL_WindowEventID Signed-off-by: Marton Balint <cus@passwd.hu>
* ffmpeg_opt: Respect default disposition when select audio/videoJun Zhao2019-07-03
| | | | | | | Respect default disposition when select audio/video Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
* ffprobe: Fix memory leakDerek Buitenhuis2019-06-21
| | | | | | This packet was not necessarily unreferenced. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* ffmpeg_hw: Treat empty device string as no device settingMark Thompson2019-06-02
| | | | | | | The implementation will use some default in this case. The empty string is not a meaningful device for any existing hardware type, and indeed OpenCL treats it identically to no device already to work around the lack of this setting on the command line.
* ffmpeg_hw: Mark some strings as constMark Thompson2019-06-02
|
* fftools/ffprobe: Add S12M Timecode output as side data (such as SEI TC)Antonin Gouzer2019-05-27
| | | | | | Slightly modified by Marton Balint to produce valid json as well. Signed-off-by: Marton Balint <cus@passwd.hu>
* ffplay: added option always on top for video windowDaniel Kucera2019-05-20
| | | | | Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Daniel Kucera <github@danman.eu>
* libavformat: improve logs with cur_dtsAndreas Hakon2019-04-19
| | | | | | | | | | | This patch improves the logs when the message "cur_dts is invalid" appears. If helps to identify which stream generates the trouble, and the status of the stream. A lot of users suffers with the message, and the origin varies. The improved message can help to discover the cause. Signed-off-by: Andreas Hakon <andreas.hakon@protonmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/videotoolbox: add support for 10bit pixel formatfumoboy0072019-04-16
| | | | | this patch was originally posted on issue #7704 and was slightly adjusted to check for the availability of the pixel format.
* fftools/ffmpeg: Check if we do have also a filter_complex filter.Thierry Foucu2019-03-28
| | | | | | | | | | | | | | | | | Right now, the code check for no filter description, but if we use a filter_complex, the code will use the AVFrame.duration which could be wrong in case of using fps filter. How to reproduce the problem: ffmpeg -f lavfi -i testsrc=duration=1 -vf fps=fps=50 -vsync 1 -f null - output 50 frames ffmpeg -f lavfi -i testsrc=duration=1 -filter_complex fps=fps=50 -vsync 1 -f null - output 51 frames With this commit, the same command will always output 50 frames. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>