aboutsummaryrefslogtreecommitdiffstats
path: root/fftools
Commit message (Collapse)AuthorAgeFilesLines
* fftools/ffmpeg_enc: don't ignore user selected chroma locationNiklas Haas13 hours1-1/+16
| | | | | | | | | | | | | | | | This code always ignored the user-provided enc_ctx->chroma_sample_location in favor of the location tagged on the frame. This leads to a very (IMHO) unexpected outcome where -chroma_sample_location works differently from the related options like -colorspace and -color_range, the latter of which override the frame properties as a consequence of being configured on the filter graph output. The discrepancy comes from the fact that the chroma sample location does not itself participate in filter graph negotiation. Solve the situation by only overriding the enc_ctx option if it was left unspecified by the user, and otherwise printing a warning if the requested parameter does not match the frame parameter.
* ffprobe: add -codec:<media_spec> option and -c:<media_spec> variantMaryla Ustarroz-Calonge via ffmpeg-devel36 hours1-12/+106
| | | | | | | | | opt_codec() is mostly copied over from ffplay.c. This is useful when different decoders have different capabilities, or to test a specific decoder. Signed-off-by: Maryla Ustarroz-Calonge <maryla@google.com>
* all: fix typos found by codespellTimo Rothenpieler8 days5-7/+7
|
* fftools/cmdutils: Add av_freep() to avoid memory leakJiasheng Jiang2025-07-201-2/+5
| | | | | | | | Add av_freep() to free new_elem to avoid memory leak. Fixes: 3ca1e31e63 ("fftools/cmdutils: Atomically add elements to list of pointers, fix crash") Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/ffmpeg: add support for setting maximum buffered frames in a filtergraphMarton Balint2025-07-143-0/+11
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffmpeg_demux: don't flag timestamps as unreliable if they are generatedJames Almer2025-07-101-1/+10
| | | | | | | | | | Regardless of the source being an AVFMT_NOTIMESTAMPS format, if the timestamps are generated like when using the use_wallclock_as_timestamps demuxer option, then they are reliable. Fixes ticket #11268 Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/cmdutils: don't try to load arguments from file if not neededKacper Michajłow2025-07-051-2/+3
| | | | | | | | | | | | CLI option parser checks if argument exists when needed, but in this case only OPT_TYPE_BOOL where checked, so OPT_TYPE_FUNC without argument where trying to load a file from `arg` which is NULL in this case. Fixes crash on `ffmpeg -/version` Fixes: 6d17991b7e1bf1a5d104c8a6261709f7e6640d97 Signed-off-by: Kacper Michajłow <kasper93@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* fftools/textformat: remove unreachable code in tf_mermaidMarvin Scholz2025-07-051-4/+1
| | | | | | | | | Integer writing is impossible here as the first branch was dead code, so remove it completely. Fix CID 1646948 Reviewed-by: softworkz <softworkz@hotmail.com>
* fftools/ffmpeg_filter: always reap all available frames before requesting ↵Marton Balint2025-07-031-15/+16
| | | | | | | | | | | | | new ones alfilter_graph_request_oldest() might return EAGAIN and produce a frame on not the oldest sink. Fixes ticket #11597. Fixes excessive frame buffering in #10959. Fixes excessive frame buffering in #11366. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/textformat: renamings in print_unit_int for consistency (cosmetic)Nicolas Gaullier2025-06-274-5/+5
| | | | | Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris> Reviewed-by: softworkz <softworkz@hotmail.com>
* fftools/textformat: fix print 64 bit integersNicolas Gaullier2025-06-272-2/+2
| | | | | | | | | | | Regression in ffprobe since textformat introduction in d7a3f68feae0b1c3718f9d2671c6d41c60a40680. Fixes #11638 Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris> Reviewed-by: Marvin Scholz <epirat07@gmail.com> Reviewed-by: softworkz <softworkz@hotmail.com>
* fftools/textformat: do not return earlyMarvin Scholz2025-06-261-1/+0
| | | | | | | | | This would make the goto dead code and also would not properly call avtext_context_close. Fix CID 1646939 Reviewed-by: softworkz <softworkz@hotmail.com>
* fftools/textformat: remove noop freeMarvin Scholz2025-06-261-2/+0
| | | | | | The tctx->hash was freed already right before. Reviewed-by: softworkz <softworkz@hotmail.com>
* fftools/textformat: narrow variable scopesMarvin Scholz2025-06-261-9/+6
| | | | Reviewed-by: softworkz <softworkz@hotmail.com>
* fftools/textformat: remove leftover comments in mermaid_print_valueMarvin Scholz2025-06-261-4/+1
| | | | | | Remove some leftover commented code and an extraneous semicolon. Reviewed-by: softworkz <softworkz@hotmail.com>
* fftools/textformat: exit early in mermaid_print_valueMarvin Scholz2025-06-261-10/+2
| | | | | | | Doesn't change the logic, instead of exiting in each of the two branches below, just exit before. Reviewed-by: softworkz <softworkz@hotmail.com>
* fftools/ffmpeg_filter: simplify control flow in read_framesMarton Balint2025-06-211-2/+2
| | | | | | No functional change. Signed-off-by: Marton Balint <cus@passwd.hu>
* fftools/ffplay_renderer: Use new vulkan queue APIZhao Zhili2025-06-201-19/+54
| | | | | | Fixes deprecation warning. Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
* ffmpeg_demux: init resume_warn variableMarvin Scholz2025-06-111-1/+1
| | | | | | | Fixes an uninitialized read introduced with 6232f416b172358c9dd82462037953f02743df27 Fix CID 1643162 Uninitialized scalar variable
* fftools/Makefile: clean files from fftools/{graph,textformat}/Ramiro Polla2025-06-031-1/+1
|
* fftools/graph/graphprint: Remove redundant avio_flush()Andreas Rheinhardt2025-06-021-1/+0
| | | | | | | The AVIOContext will be automatically flushed upon closure. Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: Fix indentationAndreas Rheinhardt2025-06-021-92/+92
| | | | | | | Forgotten after d76b0c4a3530005ce59ec1dcaefcb8dd03c4e0ce. Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffprobe: Factor writing common side data types outAndreas Rheinhardt2025-06-021-52/+43
| | | | | Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/textformat/avtextformat: Fix races when initializing formattersAndreas Rheinhardt2025-06-021-21/+12
| | | | | Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/resources/resman: Use proper logcontextAndreas Rheinhardt2025-06-021-4/+4
| | | | | Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/resources/resman: Use assert for always-false conditionAndreas Rheinhardt2025-06-021-4/+1
| | | | | Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/resources/resman: Don't alloc ResourceManager, fix raceAndreas Rheinhardt2025-06-021-34/+3
| | | | | | | | | | The resman_ctx pointer was accessed outside of its guarding mutex. Also make the ResourceManager static. Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/textformat/avtextformat: Avoid relocationsAndreas Rheinhardt2025-06-021-2/+2
| | | | | Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/graph/graphprint: Fix races when initializing graphprintAndreas Rheinhardt2025-06-022-17/+9
| | | | | | | | | | | | | Setting print_graphs_format (in case no -print_graphs_format option was specified) is racy, as is using av_strtok() to split it. Both have been removed. Notice that using av_strtok() was destructive: In the absence of races the options would only have been applied for the first initialization. Reviewed-by: softworkz . <softworkz-at-hotmail.com@ffmpeg.org> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* fftools/ffmpeg_filter: make InputFilterPriv and OutputFilterPriv private againJames Almer2025-06-015-291/+256
| | | | | | | | As the names imply, they are structs meant to be internal and private to the filter handling code. If a field is required in other modules, then it can be moved to the public facing structs, which is done in this commit. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg_filter: make FilterGraphPriv private againJames Almer2025-06-014-60/+53
| | | | | | | | As the name implies, it's a struct meant to be internal and private to the filter handling code. If a field is required in other modules, then it can be moved to the public facing struct, which is done in this commit. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/tf_mermaid: Add missing uninit and fix leakssoftworkz2025-05-281-8/+37
| | | | | | | | - merge forgotten uninit from work branch - add set_str() function to free before overwriting - fix some other leaks Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/graphprint: Fix memory leakssoftworkz2025-05-281-1/+4
| | | | | | | | - uninit resource manager - free strings before overwriting - unref hw_frames_context Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/ffmpeg: Free print_graph option variablessoftworkz2025-05-281-0/+3
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/makefile: Remove resources from ffprobesoftworkz2025-05-281-1/+0
| | | | | | Even though it doesn't have any effect, that line is not needed (yet). Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/resources: add missing extensions to .gitignoreTimo Rothenpieler2025-05-281-0/+2
| | | | Reviewed-by: softworkz <softworkz@hotmail.com>
* ffmpeg: Don't print graphs if there are no outputs yetMark Thompson2025-05-181-1/+1
| | | | Avoids writing an empty json blob in setup error cases.
* fftools/graphprint: Fix leak of graph section header stringMark Thompson2025-05-181-0/+2
|
* fftools/graphprint: Fix leak of graphprint objectMark Thompson2025-05-181-0/+2
|
* fftools/textformat: correctly propagate uninit error codesMarton Balint2025-05-164-6/+8
| | | | | | This allows catching IO errors occuring at file close. Signed-off-by: Marton Balint <cus@passwd.hu>
* Revert "fftools/textformat/avtextformat: Make close functions return void"Marton Balint2025-05-164-9/+21
| | | | | This reverts commit 7684243fbe6e84fecb4a039195d5fda8a006a2a4 and a888975a3c25760027cd59932f5c1ad04368db8b.
* Revert "fftools/graphprint: Now, make it a Killer-Feature!"softworkz2025-05-168-292/+3
| | | | This reverts commit 1f2b8d7238eff4ab8a4d8d6177e250b8180d51f4.
* fftools/graphprint: Now, make it a Killer-Feature!softworkz2025-05-158-3/+292
| | | | | | remember this: -sg <= means Show Graph Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/graphprint: Add execution graph printingsoftworkz2025-05-1511-2/+1912
| | | | | | | | | | | | | | | | | | | | | 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>
* fftools/ffmpeg_mux: Make ms_from_ost() inlinesoftworkz2025-05-151-1/+1
| | | | Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/resources: Add resource manager files with build-time compressionsoftworkz2025-05-157-1/+739
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* fftools/ffmpeg_filter: Move some declaration to new header filesoftworkz2025-05-152-189/+235
| | | | | | to allow filtergraph printing to access the information. Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/textformat: Add flags param to function avtext_print_integer()softworkz2025-05-153-8/+20
| | | | | | | Make this function work analog to avtext_print_string() which already has a flags parameter. Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/tf_internal: Use av_default_item_namesoftworkz2025-05-151-5/+1
| | | | | Reviewed-by: Stefano Sabatini <stefasab@gmail.com> Signed-off-by: softworkz <softworkz@hotmail.com>
* fftools/textformat: Introduce common header and deduplicate codesoftworkz2025-05-1511-141/+160
| | | | | | | | | 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>