The key benefits are:
- Different to other graph printing methods, this is outputting:
- all graphs with runtime state
(including auto-inserted filters)
- each graph with its inputs and outputs
- all filters with their in- and output pads
- all connections between all input- and output pads
- for each connection:
- the runtime-negotiated format and media type
- the hw context
- if video hw context, both: hw pixfmt + sw pixfmt
- Output can either be printed to stdout or written to specified file
- Output is machine-readable
- Use the same output implementation as ffprobe, supporting multiple
formats
Signed-off-by: softworkz <softworkz@hotmail.com>
Compression requires zlib to be available, otherwise resources will
be included uncompressed - in either case via BIN2C.
It can also be disabled via
./configure --disable-resource-compression
Size figures:
graph.css 7752
graph.css.min 6655 (css is always minified)
graph.html 2153
No Compression
graph.css.c 40026
graph.css.o 9344 (6688)
graph.html.c 13016
graph.html.o 4848 (2186)
With Compression
graph.css.c 10206
graph.css.o 4368 (1718)
graph.html.c 5725
graph.html.o 3632 (971)
Numbers in brackets: .rodata size from 'size -Ax -d *.o'
Signed-off-by: softworkz <softworkz@hotmail.com>
Also change writer_printf signature in AVTextWriter to use va_list,
so that it can be called by the new function writer_printf()
in tf_internal.h.
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
This allows future addition of options without
changes to the signature of avtext_context_open().
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Instead of initializing a new BPrint in case of UTF decode error,
re-use the same BPrint struct and just clear it
for each iteration.
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: softworkz <softworkz@hotmail.com>
Up until now if avcodec_send_packet() returned an error,
no attempt to receive a frame from the decoder would be made.
Instead the decoder was presumed to be drained, so that more
packets could be sent to it. Yet this need not be so:
It can happen that a packet would decode to multiple frames
and that decoding the first of these (the one that is decoded
during the avcodec_send_packet() call) returns an error,
in which case the decoder is not yet ready to receive more
input as the remaining parts of the packet have not been decoded
yet. In this case, an AERROR_BUG is triggered.
This happens in ticket #11553 with VP9 (which uses a BSF
to split VP9 superframes and is therefore affected by this).
Fix this by always calling avcodec_receive_frame() unless
xerror is set.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Elapsed time is much less important than the actual progress, and I am guessing
several ffmpeg CLI frontends use the existing status line for showing progress,
so putting a new field in the beginning is less optimal anyway.
Related to ticket #11582.
Signed-off-by: Marton Balint <cus@passwd.hu>
An identical call exists in ffmpeg.c
With POSIX/glibc, stderr is already unbuffered (or line-buffered when
a terminal is connected), but not in case of MSVCRT.
Explicitly calling setvbuf() like in this commit, makes the Windows
runtime behave like POSIX, giving the same “print immediately” behavior.
Signed-off-by: softworkz <softworkz@hotmail.com>
When viewing logs, there are situations where it is not entirely
clear whether ffmpeg CLI has exited gracefully. The two primary cases
are
- A crash/segfault has occured
Windows for example doesn't output any message to the calling shell
- The process has been terminated (e.g. killed externally)
Printing a message on exit provides a reliable indication that the
process has exited normally.
Printing the exit code is useful as it usually remains invisible
and unnoticed by users running FFmpeg from a shell.
Signed-off-by: softworkz <softworkz@hotmail.com>
Just like normal close functions.
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
avtext_context_close() calls av_opt_free() on an AVTextFormatContext
as well as av_bprint_finalize() on the containing section_pbuf
AvBPrints, yet it can happen that the AVBPrints have not been
initialized (only zeroed) and that av_opt_set_defaults() has
not been called. This works, but it is not really documented to do so.
So ensure that the options and the AVBPrints have been initialized
when avtext_context_close() is called.
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Would happen if an AVTextFormatContext's private context
could not be allocated.
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
avtextwriter_create_file() creates an AVIOContext whose pointer
resides in its private context. If it were not always closed on
uninit, the AVIOContext would leak, so it makes no sense
to have this parameter.
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This AVTextWriter does not have any options.
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Use snprintf() directly instead of initializing an AVBPrint
just for this.
Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
It can't really happen, because no currently used pixel format
has a name exceeding the size of the buffer.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
When running 'ffmpeg -init_hw_device list' to display available hardware
devices, it incorrectly shows an error message:
"Failed to set value 'list' for option 'init_hw_device': Immediate exit requested"
This is a regression introduced by commit a50f90f1c23. The command is
actually working as intended - it should exit after listing devices, but
shouldn't display an error message.
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
It is currently not due to endianness. This forced to add
workarounds with sed in fate/mxf.mak (which are removed
in this commit).
This is supposed to fix the enhanced-flv-hevc-hdr10 test
on big endian systems.
Reviewed-by: Zhao Zhili <quinkblack-at-foxmail.com@ffmpeg.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This is a replacement in ffmpeg for the deprecated avcodec flag AV_CODEC_FLAG_DROPCHANGED.
This option is meant to be used when the filtergraph should not be
reinited upon input parameter changes as that leads to loss of state
in the filtergraph potentially leading to broken or aborted output,
e.g. inserting of silence with first_pts specified in aresample.
Generally useful to avoid corrupted yet decodable packets in live
streaming inputs.
This option when enabled takes precedence over reinit_filters
The existing default value is the same as the primary readrate.
This maintains the flow rate as best as possible but does not
reduce the lag. This new value allows catchup to gradually happen
without overwhelming the receiver.
Addresses a concern brought up in #11469
The ///< or /**< form of doxygen comments are only to be used
when the documentation follows the member and the comment
block starts on the same line as the member. This commit
fixes wrong uses of them; in particular, this fixes the comment
for mb_height in H.264 SPS's structure which was wrongly added
to mb_width.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Forgotten in 6325aede08d5c7086b3798cb7041299e1d07f93a.
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Some frames may be buffered before a complex filtergraph can be configured.
This change ensures the side data removal in the cases where autorotation is
enabled also applies to them.
Fixes ticket #11487
Signed-off-by: James Almer <jamrial@gmail.com>