FFmpeg
ffprobe.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007-2010 Stefano Sabatini
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /**
22  * @file
23  * simple media prober based on the FFmpeg libraries
24  */
25 
26 #include "config.h"
27 #include "libavutil/ffversion.h"
28 
29 #include <string.h>
30 #include <math.h>
31 
32 #include "libavformat/avformat.h"
33 #include "libavformat/version.h"
34 #include "libavcodec/avcodec.h"
35 #include "libavcodec/version.h"
37 #include "libavutil/avassert.h"
38 #include "libavutil/avstring.h"
39 #include "libavutil/avutil.h"
40 #include "libavutil/bprint.h"
42 #include "libavutil/display.h"
45 #include "libavutil/iamf.h"
48 #include "libavutil/dovi_meta.h"
49 #include "libavutil/mem.h"
50 #include "libavutil/opt.h"
51 #include "libavutil/pixdesc.h"
52 #include "libavutil/spherical.h"
53 #include "libavutil/stereo3d.h"
54 #include "libavutil/dict.h"
55 #include "libavutil/intreadwrite.h"
56 #include "libavutil/libm.h"
57 #include "libavutil/parseutils.h"
58 #include "libavutil/timecode.h"
59 #include "libavutil/timestamp.h"
60 #include "libavdevice/avdevice.h"
61 #include "libavdevice/version.h"
62 #include "libswscale/swscale.h"
63 #include "libswscale/version.h"
65 #include "libswresample/version.h"
66 #include "libavfilter/version.h"
68 #include "cmdutils.h"
69 #include "opt_common.h"
70 
71 #include "libavutil/thread.h"
72 
73 // attached as opaque_ref to packets/frames
74 typedef struct FrameData {
76  int pkt_size;
77 } FrameData;
78 
79 typedef struct InputStream {
80  AVStream *st;
81 
83 } InputStream;
84 
85 typedef struct InputFile {
87 
89  int nb_streams;
90 } InputFile;
91 
92 const char program_name[] = "ffprobe";
93 const int program_birth_year = 2007;
94 
95 static int do_analyze_frames = 0;
96 static int do_bitexact = 0;
97 static int do_count_frames = 0;
98 static int do_count_packets = 0;
99 static int do_read_frames = 0;
100 static int do_read_packets = 0;
101 static int do_show_chapters = 0;
102 static int do_show_error = 0;
103 static int do_show_format = 0;
104 static int do_show_frames = 0;
105 static int do_show_packets = 0;
106 static int do_show_programs = 0;
107 static int do_show_stream_groups = 0;
109 static int do_show_streams = 0;
112 static int do_show_data = 0;
113 static int do_show_program_version = 0;
115 static int do_show_pixel_formats = 0;
118 static int do_show_log = 0;
119 
120 static int do_show_chapter_tags = 0;
121 static int do_show_format_tags = 0;
122 static int do_show_frame_tags = 0;
123 static int do_show_program_tags = 0;
125 static int do_show_stream_tags = 0;
126 static int do_show_packet_tags = 0;
127 
128 static int show_value_unit = 0;
129 static int use_value_prefix = 0;
132 static int show_private_data = 1;
133 
134 static const char *audio_codec_name = NULL;
135 static const char *data_codec_name = NULL;
136 static const char *subtitle_codec_name = NULL;
137 static const char *video_codec_name = NULL;
138 
139 #define SHOW_OPTIONAL_FIELDS_AUTO -1
140 #define SHOW_OPTIONAL_FIELDS_NEVER 0
141 #define SHOW_OPTIONAL_FIELDS_ALWAYS 1
143 
144 static char *output_format;
145 static char *stream_specifier;
146 static char *show_data_hash;
147 static char *data_dump_format;
148 
149 typedef struct ReadInterval {
150  int id; ///< identifier
151  int64_t start, end; ///< start, end in second/AV_TIME_BASE units
155 } ReadInterval;
156 
158 static int read_intervals_nb = 0;
159 
160 static int find_stream_info = 1;
161 
162 /* section structure definition */
163 
164 typedef enum {
231 } SectionID;
232 
233 static const char *get_packet_side_data_type(const void *data)
234 {
235  const AVPacketSideData *sd = (const AVPacketSideData *)data;
236  return av_x_if_null(av_packet_side_data_name(sd->type), "unknown");
237 }
238 
239 static const char *get_frame_side_data_type(const void *data)
240 {
241  const AVFrameSideData *sd = (const AVFrameSideData *)data;
242  return av_x_if_null(av_frame_side_data_name(sd->type), "unknown");
243 }
244 
245 static const char *get_raw_string_type(const void *data)
246 {
247  return data;
248 }
249 
250 static const char *get_stream_group_type(const void *data)
251 {
252  const AVStreamGroup *stg = (const AVStreamGroup *)data;
253  return av_x_if_null(avformat_stream_group_name(stg->type), "unknown");
254 }
255 
256 static const AVTextFormatSection sections[] = {
258  [SECTION_ID_CHAPTER] = { SECTION_ID_CHAPTER, "chapter", 0, { SECTION_ID_CHAPTER_TAGS, -1 } },
259  [SECTION_ID_CHAPTER_TAGS] = { SECTION_ID_CHAPTER_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "chapter_tags" },
260  [SECTION_ID_ERROR] = { SECTION_ID_ERROR, "error", 0, { -1 } },
261  [SECTION_ID_FORMAT] = { SECTION_ID_FORMAT, "format", 0, { SECTION_ID_FORMAT_TAGS, -1 } },
262  [SECTION_ID_FORMAT_TAGS] = { SECTION_ID_FORMAT_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "format_tags" },
265  [SECTION_ID_FRAME_TAGS] = { SECTION_ID_FRAME_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "frame_tags" },
266  [SECTION_ID_FRAME_SIDE_DATA_LIST] ={ SECTION_ID_FRAME_SIDE_DATA_LIST, "side_data_list", AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA, -1 }, .element_name = "side_data", .unique_name = "frame_side_data_list" },
270  [SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST] = { SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST, "components", AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_COMPONENT, -1 }, .element_name = "component", .unique_name = "frame_side_data_components" },
272  [SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST] = { SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST, "pieces", AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY, { SECTION_ID_FRAME_SIDE_DATA_PIECE, -1 }, .element_name = "piece", .unique_name = "frame_side_data_pieces" },
273  [SECTION_ID_FRAME_SIDE_DATA_PIECE] = { SECTION_ID_FRAME_SIDE_DATA_PIECE, "piece", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS|AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE, { -1 }, .element_name = "piece_entry", .unique_name = "frame_side_data_piece", .get_type = get_raw_string_type },
275  [SECTION_ID_FRAME_LOG] = { SECTION_ID_FRAME_LOG, "log", 0, { -1 }, },
277  [SECTION_ID_LIBRARY_VERSION] = { SECTION_ID_LIBRARY_VERSION, "library_version", 0, { -1 } },
281  [SECTION_ID_PACKET_TAGS] = { SECTION_ID_PACKET_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "packet_tags" },
282  [SECTION_ID_PACKET_SIDE_DATA_LIST] ={ SECTION_ID_PACKET_SIDE_DATA_LIST, "side_data_list", AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY, { SECTION_ID_PACKET_SIDE_DATA, -1 }, .element_name = "side_data", .unique_name = "packet_side_data_list" },
283  [SECTION_ID_PACKET_SIDE_DATA] = { SECTION_ID_PACKET_SIDE_DATA, "side_data", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS|AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE, { -1 }, .unique_name = "packet_side_data", .element_name = "side_datum", .get_type = get_packet_side_data_type },
286  [SECTION_ID_PIXEL_FORMAT_FLAGS] = { SECTION_ID_PIXEL_FORMAT_FLAGS, "flags", 0, { -1 }, .unique_name = "pixel_format_flags" },
289  [SECTION_ID_PROGRAM_STREAM_DISPOSITION] = { SECTION_ID_PROGRAM_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "program_stream_disposition" },
290  [SECTION_ID_PROGRAM_STREAM_TAGS] = { SECTION_ID_PROGRAM_STREAM_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "program_stream_tags" },
294  [SECTION_ID_PROGRAM_TAGS] = { SECTION_ID_PROGRAM_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "program_tags" },
295  [SECTION_ID_PROGRAM_VERSION] = { SECTION_ID_PROGRAM_VERSION, "program_version", 0, { -1 } },
297  [SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION] = { SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_group_stream_disposition" },
298  [SECTION_ID_STREAM_GROUP_STREAM_TAGS] = { SECTION_ID_STREAM_GROUP_STREAM_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "stream_group_stream_tags" },
300  [SECTION_ID_STREAM_GROUP_COMPONENTS] = { SECTION_ID_STREAM_GROUP_COMPONENTS, "components", AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM_GROUP_COMPONENT, -1 }, .element_name = "component", .unique_name = "stream_group_components" },
304  [SECTION_ID_STREAM_GROUP_PIECES] = { SECTION_ID_STREAM_GROUP_PIECES, "pieces", AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM_GROUP_PIECE, -1 }, .element_name = "piece", .unique_name = "stream_group_pieces" },
312  [SECTION_ID_STREAM_GROUP_DISPOSITION] = { SECTION_ID_STREAM_GROUP_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_group_disposition" },
313  [SECTION_ID_STREAM_GROUP_TAGS] = { SECTION_ID_STREAM_GROUP_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "stream_group_tags" },
321  [SECTION_ID_STREAM_DISPOSITION] = { SECTION_ID_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_disposition" },
322  [SECTION_ID_STREAM_TAGS] = { SECTION_ID_STREAM_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "stream_tags" },
323  [SECTION_ID_STREAM_SIDE_DATA_LIST] ={ SECTION_ID_STREAM_SIDE_DATA_LIST, "side_data_list", AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY, { SECTION_ID_STREAM_SIDE_DATA, -1 }, .element_name = "side_data", .unique_name = "stream_side_data_list" },
324  [SECTION_ID_STREAM_SIDE_DATA] = { SECTION_ID_STREAM_SIDE_DATA, "side_data", AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE|AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .unique_name = "stream_side_data", .element_name = "side_datum", .get_type = get_packet_side_data_type },
325  [SECTION_ID_SUBTITLE] = { SECTION_ID_SUBTITLE, "subtitle", 0, { -1 } },
326 };
327 
328 typedef struct EntrySelection {
332 
334 
335 static const OptionDef *options;
336 
337 /* FFprobe context */
338 static const char *input_filename;
339 static const char *print_input_filename;
340 static const AVInputFormat *iformat = NULL;
341 static const char *output_filename = NULL;
342 
343 static const char unit_second_str[] = "s" ;
344 static const char unit_hertz_str[] = "Hz" ;
345 static const char unit_byte_str[] = "byte" ;
346 static const char unit_bit_per_second_str[] = "bit/s";
347 
348 static int nb_streams;
349 static uint64_t *nb_streams_packets;
350 static uint64_t *nb_streams_frames;
351 static int *selected_streams;
354 
356 
357 typedef struct LogBuffer {
360  char *log_message;
362  char *parent_name;
364 }LogBuffer;
365 
367 static int log_buffer_size;
368 
369 static int is_key_selected_callback(AVTextFormatContext *tctx, const char *key)
370 {
371  const AVTextFormatSection *section = tctx->section[tctx->level];
372  const EntrySelection *selection = &selected_entries[section - sections];
373 
374  return selection->show_all_entries || av_dict_get(selection->entries_to_show, key, NULL, 0);
375 }
376 
377 static void log_callback(void *ptr, int level, const char *fmt, va_list vl)
378 {
379  AVClass* avc = ptr ? *(AVClass **) ptr : NULL;
380  va_list vl2;
381  char line[1024];
382  static int print_prefix = 1;
383  void *new_log_buffer;
384 
385  va_copy(vl2, vl);
386  av_log_default_callback(ptr, level, fmt, vl);
387  av_log_format_line(ptr, level, fmt, vl2, line, sizeof(line), &print_prefix);
388  va_end(vl2);
389 
390 #if HAVE_THREADS
392 
393  new_log_buffer = av_realloc_array(log_buffer, log_buffer_size + 1, sizeof(*log_buffer));
394  if (new_log_buffer) {
395  char *msg;
396  int i;
397 
398  log_buffer = new_log_buffer;
399  memset(&log_buffer[log_buffer_size], 0, sizeof(log_buffer[log_buffer_size]));
401  if (avc) {
404  }
407  for (i=strlen(msg) - 1; i>=0 && msg[i] == '\n'; i--) {
408  msg[i] = 0;
409  }
410  if (avc && avc->parent_log_context_offset) {
411  AVClass** parent = *(AVClass ***) (((uint8_t *) ptr) +
413  if (parent && *parent) {
414  log_buffer[log_buffer_size].parent_name = av_strdup((*parent)->item_name(parent));
416  (*parent)->get_category ? (*parent)->get_category(parent) :(*parent)->category;
417  }
418  }
419  log_buffer_size ++;
420  }
421 
423 #endif
424 }
425 
426 
427 #define print_fmt(k, f, ...) do { \
428  av_bprint_clear(&pbuf); \
429  av_bprintf(&pbuf, f, __VA_ARGS__); \
430  avtext_print_string(tfc, k, pbuf.str, 0); \
431 } while (0)
432 
433 #define print_list_fmt(k, f, n, m, ...) do { \
434  av_bprint_clear(&pbuf); \
435  for (int idx = 0; idx < n; idx++) { \
436  for (int idx2 = 0; idx2 < m; idx2++) { \
437  if (idx > 0 || idx2 > 0) \
438  av_bprint_chars(&pbuf, ' ', 1); \
439  av_bprintf(&pbuf, f, __VA_ARGS__); \
440  } \
441  } \
442  avtext_print_string(tfc, k, pbuf.str, 0); \
443 } while (0)
444 
445 #define print_int(k, v) avtext_print_integer(tfc, k, v, 0)
446 #define print_q(k, v, s) avtext_print_rational(tfc, k, v, s)
447 #define print_str(k, v) avtext_print_string(tfc, k, v, 0)
448 #define print_str_opt(k, v) avtext_print_string(tfc, k, v, AV_TEXTFORMAT_PRINT_STRING_OPTIONAL)
449 #define print_str_validate(k, v) avtext_print_string(tfc, k, v, AV_TEXTFORMAT_PRINT_STRING_VALIDATE)
450 #define print_time(k, v, tb) avtext_print_time(tfc, k, v, tb, 0)
451 #define print_ts(k, v) avtext_print_ts(tfc, k, v, 0)
452 #define print_duration_time(k, v, tb) avtext_print_time(tfc, k, v, tb, 1)
453 #define print_duration_ts(k, v) avtext_print_ts(tfc, k, v, 1)
454 #define print_val(k, v, u) avtext_print_unit_integer(tfc, k, v, u)
455 
456 static void print_integers(AVTextFormatContext *tfc, const char *key,
457  const void *data, int size, const char *format,
458  int columns, int bytes, int offset_add)
459 {
460  AVBPrint bp;
461  unsigned offset = 0;
462 
464  av_bprint_chars(&bp, '\n', 1);
465  while (size) {
466  av_bprintf(&bp, "%08x: ", offset);
467  for (int i = 0, l = FFMIN(size, columns); i < l; i++) {
468  if (bytes == 1) av_bprintf(&bp, format, *(const uint8_t*)data);
469  else if (bytes == 2) av_bprintf(&bp, format, AV_RN16(data));
470  else if (bytes == 4) av_bprintf(&bp, format, AV_RN32(data));
471  data = (const char*)data + bytes;
472  size--;
473  }
474  av_bprint_chars(&bp, '\n', 1);
475  offset += offset_add;
476  }
477  avtext_print_string(tfc, key, bp.str, 0);
478 }
479 
480 #define REALLOCZ_ARRAY_STREAM(ptr, cur_n, new_n) \
481 { \
482  ret = av_reallocp_array(&(ptr), (new_n), sizeof(*(ptr))); \
483  if (ret < 0) \
484  goto end; \
485  memset( (ptr) + (cur_n), 0, ((new_n) - (cur_n)) * sizeof(*(ptr)) ); \
486 }
487 
488 static inline int show_tags(AVTextFormatContext *tfc, AVDictionary *tags, int section_id)
489 {
490  const AVDictionaryEntry *tag = NULL;
491  int ret = 0;
492 
493  if (!tags)
494  return 0;
495  avtext_print_section_header(tfc, NULL, section_id);
496 
497  while ((tag = av_dict_iterate(tags, tag))) {
498  if ((ret = print_str_validate(tag->key, tag->value)) < 0)
499  break;
500  }
502 
503  return ret;
504 }
505 
507 {
508  double rotation = av_display_rotation_get(matrix);
509  if (isnan(rotation))
510  rotation = 0;
511  print_integers(tfc, "displaymatrix", matrix, 9, " %11d", 3, 4, 1);
512  print_int("rotation", rotation);
513 }
514 
517 {
518  if (metadata->has_primaries) {
519  print_q("red_x", metadata->display_primaries[0][0], '/');
520  print_q("red_y", metadata->display_primaries[0][1], '/');
521  print_q("green_x", metadata->display_primaries[1][0], '/');
522  print_q("green_y", metadata->display_primaries[1][1], '/');
523  print_q("blue_x", metadata->display_primaries[2][0], '/');
524  print_q("blue_y", metadata->display_primaries[2][1], '/');
525 
526  print_q("white_point_x", metadata->white_point[0], '/');
527  print_q("white_point_y", metadata->white_point[1], '/');
528  }
529 
530  if (metadata->has_luminance) {
531  print_q("min_luminance", metadata->min_luminance, '/');
532  print_q("max_luminance", metadata->max_luminance, '/');
533  }
534 }
535 
538 {
539  print_int("max_content", metadata->MaxCLL);
540  print_int("max_average", metadata->MaxFALL);
541 }
542 
544 {
545  if (!dovi)
546  return;
547 
548  {
549  const AVDOVIRpuDataHeader *hdr = av_dovi_get_header(dovi);
550  const AVDOVIDataMapping *mapping = av_dovi_get_mapping(dovi);
552  AVBPrint pbuf;
553 
555 
556  // header
557  print_int("rpu_type", hdr->rpu_type);
558  print_int("rpu_format", hdr->rpu_format);
559  print_int("vdr_rpu_profile", hdr->vdr_rpu_profile);
560  print_int("vdr_rpu_level", hdr->vdr_rpu_level);
561  print_int("chroma_resampling_explicit_filter_flag",
563  print_int("coef_data_type", hdr->coef_data_type);
564  print_int("coef_log2_denom", hdr->coef_log2_denom);
565  print_int("vdr_rpu_normalized_idc", hdr->vdr_rpu_normalized_idc);
566  print_int("bl_video_full_range_flag", hdr->bl_video_full_range_flag);
567  print_int("bl_bit_depth", hdr->bl_bit_depth);
568  print_int("el_bit_depth", hdr->el_bit_depth);
569  print_int("vdr_bit_depth", hdr->vdr_bit_depth);
570  print_int("spatial_resampling_filter_flag",
572  print_int("el_spatial_resampling_filter_flag",
574  print_int("disable_residual_flag", hdr->disable_residual_flag);
575 
576  // data mapping values
577  print_int("vdr_rpu_id", mapping->vdr_rpu_id);
578  print_int("mapping_color_space", mapping->mapping_color_space);
579  print_int("mapping_chroma_format_idc",
580  mapping->mapping_chroma_format_idc);
581 
582  print_int("nlq_method_idc", mapping->nlq_method_idc);
583  switch (mapping->nlq_method_idc) {
584  case AV_DOVI_NLQ_NONE:
585  print_str("nlq_method_idc_name", "none");
586  break;
588  print_str("nlq_method_idc_name", "linear_dz");
589  break;
590  default:
591  print_str("nlq_method_idc_name", "unknown");
592  break;
593  }
594 
595  print_int("num_x_partitions", mapping->num_x_partitions);
596  print_int("num_y_partitions", mapping->num_y_partitions);
597 
599 
600  for (int c = 0; c < 3; c++) {
601  const AVDOVIReshapingCurve *curve = &mapping->curves[c];
603 
604  print_list_fmt("pivots", "%"PRIu16, curve->num_pivots, 1, curve->pivots[idx]);
605 
607  for (int i = 0; i < curve->num_pivots - 1; i++) {
608  AVBPrint piece_buf;
609 
611  switch (curve->mapping_idc[i]) {
613  av_bprintf(&piece_buf, "Polynomial");
614  break;
615  case AV_DOVI_MAPPING_MMR:
616  av_bprintf(&piece_buf, "MMR");
617  break;
618  default:
619  av_bprintf(&piece_buf, "Unknown");
620  break;
621  }
622  av_bprintf(&piece_buf, " mapping");
623 
625  print_int("mapping_idc", curve->mapping_idc[i]);
626  switch (curve->mapping_idc[i]) {
628  print_str("mapping_idc_name", "polynomial");
629  print_int("poly_order", curve->poly_order[i]);
630  print_list_fmt("poly_coef", "%"PRIi64,
631  curve->poly_order[i] + 1, 1,
632  curve->poly_coef[i][idx]);
633  break;
634  case AV_DOVI_MAPPING_MMR:
635  print_str("mapping_idc_name", "mmr");
636  print_int("mmr_order", curve->mmr_order[i]);
637  print_int("mmr_constant", curve->mmr_constant[i]);
638  print_list_fmt("mmr_coef", "%"PRIi64,
639  curve->mmr_order[i], 7,
640  curve->mmr_coef[i][idx][idx2]);
641  break;
642  default:
643  print_str("mapping_idc_name", "unknown");
644  break;
645  }
646 
647  // SECTION_ID_FRAME_SIDE_DATA_PIECE
649  }
650 
651  // SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST
653 
654  if (mapping->nlq_method_idc != AV_DOVI_NLQ_NONE) {
655  const AVDOVINLQParams *nlq = &mapping->nlq[c];
656  print_int("nlq_offset", nlq->nlq_offset);
657  print_int("vdr_in_max", nlq->vdr_in_max);
658 
659  switch (mapping->nlq_method_idc) {
661  print_int("linear_deadzone_slope", nlq->linear_deadzone_slope);
662  print_int("linear_deadzone_threshold", nlq->linear_deadzone_threshold);
663  break;
664  }
665  }
666 
667  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT
669  }
670 
671  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
673 
674  // color metadata
675  print_int("dm_metadata_id", color->dm_metadata_id);
676  print_int("scene_refresh_flag", color->scene_refresh_flag);
677  print_list_fmt("ycc_to_rgb_matrix", "%d/%d",
678  FF_ARRAY_ELEMS(color->ycc_to_rgb_matrix), 1,
679  color->ycc_to_rgb_matrix[idx].num,
680  color->ycc_to_rgb_matrix[idx].den);
681  print_list_fmt("ycc_to_rgb_offset", "%d/%d",
682  FF_ARRAY_ELEMS(color->ycc_to_rgb_offset), 1,
683  color->ycc_to_rgb_offset[idx].num,
684  color->ycc_to_rgb_offset[idx].den);
685  print_list_fmt("rgb_to_lms_matrix", "%d/%d",
686  FF_ARRAY_ELEMS(color->rgb_to_lms_matrix), 1,
687  color->rgb_to_lms_matrix[idx].num,
688  color->rgb_to_lms_matrix[idx].den);
689  print_int("signal_eotf", color->signal_eotf);
690  print_int("signal_eotf_param0", color->signal_eotf_param0);
691  print_int("signal_eotf_param1", color->signal_eotf_param1);
692  print_int("signal_eotf_param2", color->signal_eotf_param2);
693  print_int("signal_bit_depth", color->signal_bit_depth);
694  print_int("signal_color_space", color->signal_color_space);
695  print_int("signal_chroma_format", color->signal_chroma_format);
696  print_int("signal_full_range_flag", color->signal_full_range_flag);
697  print_int("source_min_pq", color->source_min_pq);
698  print_int("source_max_pq", color->source_max_pq);
699  print_int("source_diagonal", color->source_diagonal);
700 
701  av_bprint_finalize(&pbuf, NULL);
702  }
703 }
704 
706 {
707  if (!metadata)
708  return;
709  print_int("application version", metadata->application_version);
710  print_int("num_windows", metadata->num_windows);
711  for (int n = 1; n < metadata->num_windows; n++) {
712  const AVHDRPlusColorTransformParams *params = &metadata->params[n];
713  print_q("window_upper_left_corner_x",
714  params->window_upper_left_corner_x,'/');
715  print_q("window_upper_left_corner_y",
716  params->window_upper_left_corner_y,'/');
717  print_q("window_lower_right_corner_x",
718  params->window_lower_right_corner_x,'/');
719  print_q("window_lower_right_corner_y",
720  params->window_lower_right_corner_y,'/');
721  print_q("window_upper_left_corner_x",
722  params->window_upper_left_corner_x,'/');
723  print_q("window_upper_left_corner_y",
724  params->window_upper_left_corner_y,'/');
725  print_int("center_of_ellipse_x",
726  params->center_of_ellipse_x ) ;
727  print_int("center_of_ellipse_y",
728  params->center_of_ellipse_y );
729  print_int("rotation_angle",
730  params->rotation_angle);
731  print_int("semimajor_axis_internal_ellipse",
733  print_int("semimajor_axis_external_ellipse",
735  print_int("semiminor_axis_external_ellipse",
737  print_int("overlap_process_option",
738  params->overlap_process_option);
739  }
740  print_q("targeted_system_display_maximum_luminance",
741  metadata->targeted_system_display_maximum_luminance,'/');
742  if (metadata->targeted_system_display_actual_peak_luminance_flag) {
743  print_int("num_rows_targeted_system_display_actual_peak_luminance",
744  metadata->num_rows_targeted_system_display_actual_peak_luminance);
745  print_int("num_cols_targeted_system_display_actual_peak_luminance",
746  metadata->num_cols_targeted_system_display_actual_peak_luminance);
747  for (int i = 0; i < metadata->num_rows_targeted_system_display_actual_peak_luminance; i++) {
748  for (int j = 0; j < metadata->num_cols_targeted_system_display_actual_peak_luminance; j++) {
749  print_q("targeted_system_display_actual_peak_luminance",
750  metadata->targeted_system_display_actual_peak_luminance[i][j],'/');
751  }
752  }
753  }
754  for (int n = 0; n < metadata->num_windows; n++) {
755  const AVHDRPlusColorTransformParams *params = &metadata->params[n];
756  for (int i = 0; i < 3; i++) {
757  print_q("maxscl",params->maxscl[i],'/');
758  }
759  print_q("average_maxrgb",
760  params->average_maxrgb,'/');
761  print_int("num_distribution_maxrgb_percentiles",
763  for (int i = 0; i < params->num_distribution_maxrgb_percentiles; i++) {
764  print_int("distribution_maxrgb_percentage",
765  params->distribution_maxrgb[i].percentage);
766  print_q("distribution_maxrgb_percentile",
767  params->distribution_maxrgb[i].percentile,'/');
768  }
769  print_q("fraction_bright_pixels",
770  params->fraction_bright_pixels,'/');
771  }
772  if (metadata->mastering_display_actual_peak_luminance_flag) {
773  print_int("num_rows_mastering_display_actual_peak_luminance",
774  metadata->num_rows_mastering_display_actual_peak_luminance);
775  print_int("num_cols_mastering_display_actual_peak_luminance",
776  metadata->num_cols_mastering_display_actual_peak_luminance);
777  for (int i = 0; i < metadata->num_rows_mastering_display_actual_peak_luminance; i++) {
778  for (int j = 0; j < metadata->num_cols_mastering_display_actual_peak_luminance; j++) {
779  print_q("mastering_display_actual_peak_luminance",
780  metadata->mastering_display_actual_peak_luminance[i][j],'/');
781  }
782  }
783  }
784 
785  for (int n = 0; n < metadata->num_windows; n++) {
786  const AVHDRPlusColorTransformParams *params = &metadata->params[n];
787  if (params->tone_mapping_flag) {
788  print_q("knee_point_x", params->knee_point_x,'/');
789  print_q("knee_point_y", params->knee_point_y,'/');
790  print_int("num_bezier_curve_anchors",
791  params->num_bezier_curve_anchors );
792  for (int i = 0; i < params->num_bezier_curve_anchors; i++) {
793  print_q("bezier_curve_anchors",
794  params->bezier_curve_anchors[i],'/');
795  }
796  }
797  if (params->color_saturation_mapping_flag) {
798  print_q("color_saturation_weight",
799  params->color_saturation_weight,'/');
800  }
801  }
802 }
803 
805 {
806  if (!metadata)
807  return;
808  print_int("system_start_code", metadata->system_start_code);
809  print_int("num_windows", metadata->num_windows);
810 
811  for (int n = 0; n < metadata->num_windows; n++) {
812  const AVHDRVividColorTransformParams *params = &metadata->params[n];
813 
814  print_q("minimum_maxrgb", params->minimum_maxrgb, '/');
815  print_q("average_maxrgb", params->average_maxrgb, '/');
816  print_q("variance_maxrgb", params->variance_maxrgb, '/');
817  print_q("maximum_maxrgb", params->maximum_maxrgb, '/');
818  }
819 
820  for (int n = 0; n < metadata->num_windows; n++) {
821  const AVHDRVividColorTransformParams *params = &metadata->params[n];
822 
823  print_int("tone_mapping_mode_flag", params->tone_mapping_mode_flag);
824  if (params->tone_mapping_mode_flag) {
825  print_int("tone_mapping_param_num", params->tone_mapping_param_num);
826  for (int i = 0; i < params->tone_mapping_param_num; i++) {
827  const AVHDRVividColorToneMappingParams *tm_params = &params->tm_params[i];
828 
829  print_q("targeted_system_display_maximum_luminance",
831  print_int("base_enable_flag", tm_params->base_enable_flag);
832  if (tm_params->base_enable_flag) {
833  print_q("base_param_m_p", tm_params->base_param_m_p, '/');
834  print_q("base_param_m_m", tm_params->base_param_m_m, '/');
835  print_q("base_param_m_a", tm_params->base_param_m_a, '/');
836  print_q("base_param_m_b", tm_params->base_param_m_b, '/');
837  print_q("base_param_m_n", tm_params->base_param_m_n, '/');
838 
839  print_int("base_param_k1", tm_params->base_param_k1);
840  print_int("base_param_k2", tm_params->base_param_k2);
841  print_int("base_param_k3", tm_params->base_param_k3);
842  print_int("base_param_Delta_enable_mode",
843  tm_params->base_param_Delta_enable_mode);
844  print_q("base_param_Delta", tm_params->base_param_Delta, '/');
845  }
846  print_int("3Spline_enable_flag", tm_params->three_Spline_enable_flag);
847  if (tm_params->three_Spline_enable_flag) {
848  print_int("3Spline_num", tm_params->three_Spline_num);
849 
850  for (int j = 0; j < tm_params->three_Spline_num; j++) {
851  const AVHDRVivid3SplineParams *three_spline = &tm_params->three_spline[j];
852  print_int("3Spline_TH_mode", three_spline->th_mode);
853  if (three_spline->th_mode == 0 || three_spline->th_mode == 2)
854  print_q("3Spline_TH_enable_MB", three_spline->th_enable_mb, '/');
855  print_q("3Spline_TH_enable", three_spline->th_enable, '/');
856  print_q("3Spline_TH_Delta1", three_spline->th_delta1, '/');
857  print_q("3Spline_TH_Delta2", three_spline->th_delta2, '/');
858  print_q("3Spline_enable_Strength", three_spline->enable_strength, '/');
859  }
860  }
861  }
862  }
863 
864  print_int("color_saturation_mapping_flag", params->color_saturation_mapping_flag);
865  if (params->color_saturation_mapping_flag) {
866  print_int("color_saturation_num", params->color_saturation_num);
867  for (int i = 0; i < params->color_saturation_num; i++) {
868  print_q("color_saturation_gain", params->color_saturation_gain[i], '/');
869  }
870  }
871  }
872 }
873 
875  const AVAmbientViewingEnvironment *env)
876 {
877  if (!env)
878  return;
879 
880  print_q("ambient_illuminance", env->ambient_illuminance, '/');
881  print_q("ambient_light_x", env->ambient_light_x, '/');
882  print_q("ambient_light_y", env->ambient_light_y, '/');
883 }
884 
886  const AVFilmGrainParams *fgp)
887 {
888  const char *color_range, *color_primaries, *color_trc, *color_space;
889  const char *const film_grain_type_names[] = {
890  [AV_FILM_GRAIN_PARAMS_NONE] = "none",
891  [AV_FILM_GRAIN_PARAMS_AV1] = "av1",
892  [AV_FILM_GRAIN_PARAMS_H274] = "h274",
893  };
894 
895  AVBPrint pbuf;
896  if (!fgp || fgp->type >= FF_ARRAY_ELEMS(film_grain_type_names))
897  return;
898 
901  color_trc = av_color_transfer_name(fgp->color_trc);
902  color_space = av_color_space_name(fgp->color_space);
903 
905  print_str("type", film_grain_type_names[fgp->type]);
906  print_fmt("seed", "%"PRIu64, fgp->seed);
907  print_int("width", fgp->width);
908  print_int("height", fgp->height);
909  print_int("subsampling_x", fgp->subsampling_x);
910  print_int("subsampling_y", fgp->subsampling_y);
911  print_str("color_range", color_range ? color_range : "unknown");
912  print_str("color_primaries", color_primaries ? color_primaries : "unknown");
913  print_str("color_trc", color_trc ? color_trc : "unknown");
914  print_str("color_space", color_space ? color_space : "unknown");
915 
916  switch (fgp->type) {
918  break;
920  const AVFilmGrainAOMParams *aom = &fgp->codec.aom;
921  const int num_ar_coeffs_y = 2 * aom->ar_coeff_lag * (aom->ar_coeff_lag + 1);
922  const int num_ar_coeffs_uv = num_ar_coeffs_y + !!aom->num_y_points;
923  print_int("chroma_scaling_from_luma", aom->chroma_scaling_from_luma);
924  print_int("scaling_shift", aom->scaling_shift);
925  print_int("ar_coeff_lag", aom->ar_coeff_lag);
926  print_int("ar_coeff_shift", aom->ar_coeff_shift);
927  print_int("grain_scale_shift", aom->grain_scale_shift);
928  print_int("overlap_flag", aom->overlap_flag);
929  print_int("limit_output_range", aom->limit_output_range);
930 
932 
933  if (aom->num_y_points) {
935 
936  print_int("bit_depth_luma", fgp->bit_depth_luma);
937  print_list_fmt("y_points_value", "%"PRIu8, aom->num_y_points, 1, aom->y_points[idx][0]);
938  print_list_fmt("y_points_scaling", "%"PRIu8, aom->num_y_points, 1, aom->y_points[idx][1]);
939  print_list_fmt("ar_coeffs_y", "%"PRId8, num_ar_coeffs_y, 1, aom->ar_coeffs_y[idx]);
940 
941  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT
943  }
944 
945  for (int uv = 0; uv < 2; uv++) {
946  if (!aom->num_uv_points[uv] && !aom->chroma_scaling_from_luma)
947  continue;
948 
950 
951  print_int("bit_depth_chroma", fgp->bit_depth_chroma);
952  print_list_fmt("uv_points_value", "%"PRIu8, aom->num_uv_points[uv], 1, aom->uv_points[uv][idx][0]);
953  print_list_fmt("uv_points_scaling", "%"PRIu8, aom->num_uv_points[uv], 1, aom->uv_points[uv][idx][1]);
954  print_list_fmt("ar_coeffs_uv", "%"PRId8, num_ar_coeffs_uv, 1, aom->ar_coeffs_uv[uv][idx]);
955  print_int("uv_mult", aom->uv_mult[uv]);
956  print_int("uv_mult_luma", aom->uv_mult_luma[uv]);
957  print_int("uv_offset", aom->uv_offset[uv]);
958 
959  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT
961  }
962 
963  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
965  break;
966  }
968  const AVFilmGrainH274Params *h274 = &fgp->codec.h274;
969  print_int("model_id", h274->model_id);
970  print_int("blending_mode_id", h274->blending_mode_id);
971  print_int("log2_scale_factor", h274->log2_scale_factor);
972 
974 
975  for (int c = 0; c < 3; c++) {
976  if (!h274->component_model_present[c])
977  continue;
978 
980  print_int(c ? "bit_depth_chroma" : "bit_depth_luma", c ? fgp->bit_depth_chroma : fgp->bit_depth_luma);
981 
983  for (int i = 0; i < h274->num_intensity_intervals[c]; i++) {
984 
986  print_int("intensity_interval_lower_bound", h274->intensity_interval_lower_bound[c][i]);
987  print_int("intensity_interval_upper_bound", h274->intensity_interval_upper_bound[c][i]);
988  print_list_fmt("comp_model_value", "%"PRId16, h274->num_model_values[c], 1, h274->comp_model_value[c][i][idx]);
989 
990  // SECTION_ID_FRAME_SIDE_DATA_PIECE
992  }
993 
994  // SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST
996 
997  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT
999  }
1000 
1001  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
1003  break;
1004  }
1005  }
1006 
1007  av_bprint_finalize(&pbuf, NULL);
1008 }
1009 
1011  AVCodecParameters *par,
1012  const AVPacketSideData *sd,
1013  SectionID id_data)
1014 {
1015  const char *name = av_packet_side_data_name(sd->type);
1016 
1017  avtext_print_section_header(tfc, sd, id_data);
1018  print_str("side_data_type", name ? name : "unknown");
1019  if (sd->type == AV_PKT_DATA_DISPLAYMATRIX && sd->size >= 9*4) {
1020  print_displaymatrix(tfc, (const int32_t*)sd->data);
1021  } else if (sd->type == AV_PKT_DATA_STEREO3D) {
1022  const AVStereo3D *stereo = (AVStereo3D *)sd->data;
1023  print_str("type", av_stereo3d_type_name(stereo->type));
1024  print_int("inverted", !!(stereo->flags & AV_STEREO3D_FLAG_INVERT));
1025  print_str("view", av_stereo3d_view_name(stereo->view));
1026  print_str("primary_eye", av_stereo3d_primary_eye_name(stereo->primary_eye));
1027  print_int("baseline", stereo->baseline);
1028  print_q("horizontal_disparity_adjustment", stereo->horizontal_disparity_adjustment, '/');
1029  print_q("horizontal_field_of_view", stereo->horizontal_field_of_view, '/');
1030  } else if (sd->type == AV_PKT_DATA_SPHERICAL) {
1031  const AVSphericalMapping *spherical = (AVSphericalMapping *)sd->data;
1032  print_str("projection", av_spherical_projection_name(spherical->projection));
1033  if (spherical->projection == AV_SPHERICAL_CUBEMAP) {
1034  print_int("padding", spherical->padding);
1035  } else if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE) {
1036  size_t l, t, r, b;
1037  av_spherical_tile_bounds(spherical, par->width, par->height,
1038  &l, &t, &r, &b);
1039  print_int("bound_left", l);
1040  print_int("bound_top", t);
1041  print_int("bound_right", r);
1042  print_int("bound_bottom", b);
1043  }
1044 
1045  print_int("yaw", (double) spherical->yaw / (1 << 16));
1046  print_int("pitch", (double) spherical->pitch / (1 << 16));
1047  print_int("roll", (double) spherical->roll / (1 << 16));
1048  } else if (sd->type == AV_PKT_DATA_SKIP_SAMPLES && sd->size == 10) {
1049  print_int("skip_samples", AV_RL32(sd->data));
1050  print_int("discard_padding", AV_RL32(sd->data + 4));
1051  print_int("skip_reason", AV_RL8(sd->data + 8));
1052  print_int("discard_reason", AV_RL8(sd->data + 9));
1053  } else if (sd->type == AV_PKT_DATA_MASTERING_DISPLAY_METADATA) {
1055  } else if (sd->type == AV_PKT_DATA_CONTENT_LIGHT_LEVEL) {
1057  } else if (sd->type == AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT) {
1059  tfc, (const AVAmbientViewingEnvironment *)sd->data);
1060  } else if (sd->type == AV_PKT_DATA_DYNAMIC_HDR10_PLUS) {
1063  } else if (sd->type == AV_PKT_DATA_DOVI_CONF) {
1065  const char *comp = "unknown";
1066  print_int("dv_version_major", dovi->dv_version_major);
1067  print_int("dv_version_minor", dovi->dv_version_minor);
1068  print_int("dv_profile", dovi->dv_profile);
1069  print_int("dv_level", dovi->dv_level);
1070  print_int("rpu_present_flag", dovi->rpu_present_flag);
1071  print_int("el_present_flag", dovi->el_present_flag);
1072  print_int("bl_present_flag", dovi->bl_present_flag);
1073  print_int("dv_bl_signal_compatibility_id", dovi->dv_bl_signal_compatibility_id);
1074  switch (dovi->dv_md_compression)
1075  {
1076  case AV_DOVI_COMPRESSION_NONE: comp = "none"; break;
1077  case AV_DOVI_COMPRESSION_LIMITED: comp = "limited"; break;
1078  case AV_DOVI_COMPRESSION_RESERVED: comp = "reserved"; break;
1079  case AV_DOVI_COMPRESSION_EXTENDED: comp = "extended"; break;
1080  }
1081  print_str("dv_md_compression", comp);
1082  } else if (sd->type == AV_PKT_DATA_AUDIO_SERVICE_TYPE) {
1083  enum AVAudioServiceType *t = (enum AVAudioServiceType *)sd->data;
1084  print_int("service_type", *t);
1085  } else if (sd->type == AV_PKT_DATA_MPEGTS_STREAM_ID) {
1086  print_int("id", *sd->data);
1087  } else if (sd->type == AV_PKT_DATA_CPB_PROPERTIES) {
1088  const AVCPBProperties *prop = (AVCPBProperties *)sd->data;
1089  print_int("max_bitrate", prop->max_bitrate);
1090  print_int("min_bitrate", prop->min_bitrate);
1091  print_int("avg_bitrate", prop->avg_bitrate);
1092  print_int("buffer_size", prop->buffer_size);
1093  print_int("vbv_delay", prop->vbv_delay);
1094  } else if (sd->type == AV_PKT_DATA_WEBVTT_IDENTIFIER ||
1096  if (do_show_data)
1097  avtext_print_data(tfc, "data", sd->data, sd->size);
1098  avtext_print_data_hash(tfc, "data_hash", sd->data, sd->size);
1099  } else if (sd->type == AV_PKT_DATA_FRAME_CROPPING && sd->size >= sizeof(uint32_t) * 4) {
1100  print_int("crop_top", AV_RL32(sd->data));
1101  print_int("crop_bottom", AV_RL32(sd->data + 4));
1102  print_int("crop_left", AV_RL32(sd->data + 8));
1103  print_int("crop_right", AV_RL32(sd->data + 12));
1104  } else if (sd->type == AV_PKT_DATA_AFD && sd->size > 0) {
1105  print_int("active_format", *sd->data);
1106  } else if (sd->type == AV_PKT_DATA_EXIF) {
1107  print_int("size", sd->size);
1108  } else if (sd->type == AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL && sd->size >= 8) {
1109  print_int("block_additional_id", AV_RB64(sd->data));
1110  if (do_show_data)
1111  avtext_print_data(tfc, "block_additional_data", sd->data + 8, sd->size - 8);
1112  }
1113 }
1114 
1115 static void print_private_data(AVTextFormatContext *tfc, void *priv_data)
1116 {
1117  const AVOption *opt = NULL;
1118  while (opt = av_opt_next(priv_data, opt)) {
1119  uint8_t *str;
1120  if (!(opt->flags & AV_OPT_FLAG_EXPORT)) continue;
1121  if (av_opt_get(priv_data, opt->name, 0, &str) >= 0) {
1122  print_str(opt->name, str);
1123  av_free(str);
1124  }
1125  }
1126 }
1127 
1129 {
1130  const char *s = av_get_pix_fmt_name(pix_fmt);
1131  enum AVPixelFormat swapped_pix_fmt;
1132 
1133  if (!s) {
1134  print_str_opt("pix_fmt", "unknown");
1135  } else if (!do_bitexact ||
1136  (swapped_pix_fmt = av_pix_fmt_swap_endianness(pix_fmt)) == AV_PIX_FMT_NONE) {
1137  print_str ("pix_fmt", s);
1138  } else {
1139  const char *s2 = av_get_pix_fmt_name(swapped_pix_fmt);
1140  char buf[128];
1141  size_t i = 0;
1142 
1143  while (s[i] && s[i] == s2[i] && i < sizeof(buf) - 1) {
1144  buf[i] = s[i];
1145  i++;
1146  }
1147  buf[i] = '\0';
1148 
1149  print_str ("pix_fmt", buf);
1150  }
1151 }
1152 
1154 {
1155  const char *val = av_color_range_name(color_range);
1157  print_str_opt("color_range", "unknown");
1158  } else {
1159  print_str("color_range", val);
1160  }
1161 }
1162 
1163 static void print_color_space(AVTextFormatContext *tfc, enum AVColorSpace color_space)
1164 {
1165  const char *val = av_color_space_name(color_space);
1166  if (!val || color_space == AVCOL_SPC_UNSPECIFIED) {
1167  print_str_opt("color_space", "unknown");
1168  } else {
1169  print_str("color_space", val);
1170  }
1171 }
1172 
1174 {
1177  print_str_opt("color_primaries", "unknown");
1178  } else {
1179  print_str("color_primaries", val);
1180  }
1181 }
1182 
1184 {
1185  const char *val = av_color_transfer_name(color_trc);
1186  if (!val || color_trc == AVCOL_TRC_UNSPECIFIED) {
1187  print_str_opt("color_transfer", "unknown");
1188  } else {
1189  print_str("color_transfer", val);
1190  }
1191 }
1192 
1193 static void print_chroma_location(AVTextFormatContext *tfc, enum AVChromaLocation chroma_location)
1194 {
1195  const char *val = av_chroma_location_name(chroma_location);
1196  if (!val || chroma_location == AVCHROMA_LOC_UNSPECIFIED) {
1197  print_str_opt("chroma_location", "unspecified");
1198  } else {
1199  print_str("chroma_location", val);
1200  }
1201 }
1202 
1203 static void print_alpha_mode(AVTextFormatContext *tfc, enum AVAlphaMode alpha_mode)
1204 {
1205  const char *val = av_alpha_mode_name(alpha_mode);
1206  if (!val || alpha_mode == AVALPHA_MODE_UNSPECIFIED) {
1207  print_str_opt("alpha_mode", "unspecified");
1208  } else {
1209  print_str("alpha_mode", val);
1210  }
1211 }
1212 
1213 static void clear_log(int need_lock)
1214 {
1215  int i;
1216 
1217  if (need_lock)
1219  for (i=0; i<log_buffer_size; i++) {
1220  av_freep(&log_buffer[i].context_name);
1221  av_freep(&log_buffer[i].parent_name);
1222  av_freep(&log_buffer[i].log_message);
1223  }
1224  log_buffer_size = 0;
1225  if(need_lock)
1227 }
1228 
1229 static int show_log(AVTextFormatContext *tfc, int section_ids, int section_id, int log_level)
1230 {
1231  int i;
1233  if (!log_buffer_size) {
1235  return 0;
1236  }
1237  avtext_print_section_header(tfc, NULL, section_ids);
1238 
1239  for (i=0; i<log_buffer_size; i++) {
1240  if (log_buffer[i].log_level <= log_level) {
1241  avtext_print_section_header(tfc, NULL, section_id);
1242  print_str("context", log_buffer[i].context_name);
1243  print_int("level", log_buffer[i].log_level);
1244  print_int("category", log_buffer[i].category);
1245  if (log_buffer[i].parent_name) {
1246  print_str("parent_context", log_buffer[i].parent_name);
1247  print_int("parent_category", log_buffer[i].parent_category);
1248  } else {
1249  print_str_opt("parent_context", "N/A");
1250  print_str_opt("parent_category", "N/A");
1251  }
1252  print_str("message", log_buffer[i].log_message);
1254  }
1255  }
1256  clear_log(0);
1258 
1260 
1261  return 0;
1262 }
1263 
1264 static void show_packet(AVTextFormatContext *tfc, InputFile *ifile, AVPacket *pkt, int packet_idx)
1265 {
1266  AVStream *st = ifile->streams[pkt->stream_index].st;
1267  AVBPrint pbuf;
1268  const char *s;
1269 
1271 
1273 
1275  if (s) print_str ("codec_type", s);
1276  else print_str_opt("codec_type", "unknown");
1277  print_int("stream_index", pkt->stream_index);
1278  print_ts ("pts", pkt->pts);
1279  print_time("pts_time", pkt->pts, &st->time_base);
1280  print_ts ("dts", pkt->dts);
1281  print_time("dts_time", pkt->dts, &st->time_base);
1282  print_duration_ts("duration", pkt->duration);
1283  print_duration_time("duration_time", pkt->duration, &st->time_base);
1284  print_val("size", pkt->size, unit_byte_str);
1285  if (pkt->pos != -1) print_fmt ("pos", "%"PRId64, pkt->pos);
1286  else print_str_opt("pos", "N/A");
1287  print_fmt("flags", "%c%c%c", pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_',
1288  pkt->flags & AV_PKT_FLAG_DISCARD ? 'D' : '_',
1289  pkt->flags & AV_PKT_FLAG_CORRUPT ? 'C' : '_');
1290  if (do_show_data)
1291  avtext_print_data(tfc, "data", pkt->data, pkt->size);
1292  avtext_print_data_hash(tfc, "data_hash", pkt->data, pkt->size);
1293 
1294  if (pkt->side_data_elems) {
1295  size_t size;
1296  const uint8_t *side_metadata;
1297 
1299  if (side_metadata && size && do_show_packet_tags) {
1300  AVDictionary *dict = NULL;
1301  if (av_packet_unpack_dictionary(side_metadata, size, &dict) >= 0)
1302  show_tags(tfc, dict, SECTION_ID_PACKET_TAGS);
1303  av_dict_free(&dict);
1304  }
1305 
1307  for (int i = 0; i < pkt->side_data_elems; i++) {
1311  }
1313  }
1314 
1316 
1317  av_bprint_finalize(&pbuf, NULL);
1318  fflush(stdout);
1319 }
1320 
1321 static void show_subtitle(AVTextFormatContext *tfc, AVSubtitle *sub, AVStream *stream,
1323 {
1324  AVBPrint pbuf;
1325 
1327 
1329 
1330  print_str ("media_type", "subtitle");
1331  print_ts ("pts", sub->pts);
1332  print_time("pts_time", sub->pts, &AV_TIME_BASE_Q);
1333  print_int ("format", sub->format);
1334  print_int ("start_display_time", sub->start_display_time);
1335  print_int ("end_display_time", sub->end_display_time);
1336  print_int ("num_rects", sub->num_rects);
1337 
1339 
1340  av_bprint_finalize(&pbuf, NULL);
1341  fflush(stdout);
1342 }
1343 
1345  const AVFrame *frame,
1346  const AVStream *stream)
1347 {
1349 
1350  for (int i = 0; i < frame->nb_side_data; i++) {
1351  const AVFrameSideData *sd = frame->side_data[i];
1352  const char *name;
1353 
1356  print_str("side_data_type", name ? name : "unknown");
1357  if (sd->type == AV_FRAME_DATA_DISPLAYMATRIX && sd->size >= 9*4) {
1358  print_displaymatrix(tfc, (const int32_t*)sd->data);
1359  } else if (sd->type == AV_FRAME_DATA_AFD && sd->size > 0) {
1360  print_int("active_format", *sd->data);
1361  } else if (sd->type == AV_FRAME_DATA_GOP_TIMECODE && sd->size >= 8) {
1362  char tcbuf[AV_TIMECODE_STR_SIZE];
1363  av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data));
1364  print_str("timecode", tcbuf);
1365  } else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size == 16) {
1366  uint32_t *tc = (uint32_t*)sd->data;
1367  int m = FFMIN(tc[0],3);
1369  for (int j = 1; j <= m ; j++) {
1370  char tcbuf[AV_TIMECODE_STR_SIZE];
1371  av_timecode_make_smpte_tc_string2(tcbuf, stream->avg_frame_rate, tc[j], 0, 0);
1373  print_str("value", tcbuf);
1375  }
1377  } else if (sd->type == AV_FRAME_DATA_MASTERING_DISPLAY_METADATA) {
1379  } else if (sd->type == AV_FRAME_DATA_DYNAMIC_HDR_PLUS) {
1382  } else if (sd->type == AV_FRAME_DATA_CONTENT_LIGHT_LEVEL) {
1384  } else if (sd->type == AV_FRAME_DATA_ICC_PROFILE) {
1386  if (tag)
1387  print_str(tag->key, tag->value);
1388  print_int("size", sd->size);
1389  } else if (sd->type == AV_FRAME_DATA_DOVI_METADATA) {
1390  print_dovi_metadata(tfc, (const AVDOVIMetadata *)sd->data);
1391  } else if (sd->type == AV_FRAME_DATA_DYNAMIC_HDR_VIVID) {
1394  } else if (sd->type == AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT) {
1396  } else if (sd->type == AV_FRAME_DATA_FILM_GRAIN_PARAMS) {
1398  print_film_grain_params(tfc, fgp);
1399  } else if (sd->type == AV_FRAME_DATA_VIEW_ID) {
1400  print_int("view_id", *(int*)sd->data);
1401  } else if (sd->type == AV_FRAME_DATA_EXIF) {
1402  print_int("size", sd->size);
1403  }
1405  }
1407 }
1408 
1411 {
1412  FrameData *fd = frame->opaque_ref ? (FrameData*)frame->opaque_ref->data : NULL;
1413  AVBPrint pbuf;
1414  char val_str[128];
1415  const char *s;
1416 
1418 
1420 
1422  if (s) print_str ("media_type", s);
1423  else print_str_opt("media_type", "unknown");
1424  print_int("stream_index", stream->index);
1425  print_int("key_frame", !!(frame->flags & AV_FRAME_FLAG_KEY));
1426  print_ts ("pts", frame->pts);
1427  print_time("pts_time", frame->pts, &stream->time_base);
1428  print_ts ("pkt_dts", frame->pkt_dts);
1429  print_time("pkt_dts_time", frame->pkt_dts, &stream->time_base);
1430  print_ts ("best_effort_timestamp", frame->best_effort_timestamp);
1431  print_time("best_effort_timestamp_time", frame->best_effort_timestamp, &stream->time_base);
1432  print_duration_ts ("duration", frame->duration);
1433  print_duration_time("duration_time", frame->duration, &stream->time_base);
1434  if (fd && fd->pkt_pos != -1) print_fmt ("pkt_pos", "%"PRId64, fd->pkt_pos);
1435  else print_str_opt("pkt_pos", "N/A");
1436  if (fd && fd->pkt_size != -1) print_val ("pkt_size", fd->pkt_size, unit_byte_str);
1437  else print_str_opt("pkt_size", "N/A");
1438 
1439  switch (stream->codecpar->codec_type) {
1440  AVRational sar;
1441 
1442  case AVMEDIA_TYPE_VIDEO:
1443  print_int("width", frame->width);
1444  print_int("height", frame->height);
1445  print_int("crop_top", frame->crop_top);
1446  print_int("crop_bottom", frame->crop_bottom);
1447  print_int("crop_left", frame->crop_left);
1448  print_int("crop_right", frame->crop_right);
1449  print_pixel_format(tfc, frame->format);
1450  sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, frame);
1451  if (sar.num) {
1452  print_q("sample_aspect_ratio", sar, ':');
1453  } else {
1454  print_str_opt("sample_aspect_ratio", "N/A");
1455  }
1456  print_fmt("pict_type", "%c", av_get_picture_type_char(frame->pict_type));
1457  print_int("interlaced_frame", !!(frame->flags & AV_FRAME_FLAG_INTERLACED));
1458  print_int("top_field_first", !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST));
1459  print_int("lossless", !!(frame->flags & AV_FRAME_FLAG_LOSSLESS));
1460  print_int("repeat_pict", frame->repeat_pict);
1461 
1462  print_color_range(tfc, frame->color_range);
1463  print_color_space(tfc, frame->colorspace);
1464  print_primaries(tfc, frame->color_primaries);
1465  print_color_trc(tfc, frame->color_trc);
1466  print_chroma_location(tfc, frame->chroma_location);
1467  print_alpha_mode(tfc, frame->alpha_mode);
1468  break;
1469 
1470  case AVMEDIA_TYPE_AUDIO:
1471  s = av_get_sample_fmt_name(frame->format);
1472  if (s) print_str ("sample_fmt", s);
1473  else print_str_opt("sample_fmt", "unknown");
1474  print_int("nb_samples", frame->nb_samples);
1475  print_int("channels", frame->ch_layout.nb_channels);
1476  if (frame->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC) {
1477  av_channel_layout_describe(&frame->ch_layout, val_str, sizeof(val_str));
1478  print_str ("channel_layout", val_str);
1479  } else
1480  print_str_opt("channel_layout", "unknown");
1481  break;
1482  }
1483  if (do_show_frame_tags)
1484  show_tags(tfc, frame->metadata, SECTION_ID_FRAME_TAGS);
1485  if (do_show_log)
1487  if (frame->nb_side_data)
1488  print_frame_side_data(tfc, frame, stream);
1489 
1491 
1492  av_bprint_finalize(&pbuf, NULL);
1493  fflush(stdout);
1494 }
1495 
1497  InputFile *ifile,
1498  AVFrame *frame, const AVPacket *pkt,
1499  int *packet_new)
1500 {
1501  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1504  AVSubtitle sub;
1505  int ret = 0, got_frame = 0;
1506 
1507  clear_log(1);
1508  if (dec_ctx) {
1509  switch (par->codec_type) {
1510  case AVMEDIA_TYPE_VIDEO:
1511  case AVMEDIA_TYPE_AUDIO:
1512  if (*packet_new) {
1514  if (ret == AVERROR(EAGAIN)) {
1515  ret = 0;
1516  } else if (ret >= 0 || ret == AVERROR_EOF) {
1517  ret = 0;
1518  *packet_new = 0;
1519  }
1520  }
1521  if (ret >= 0) {
1523  if (ret >= 0) {
1524  got_frame = 1;
1525  } else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
1526  ret = 0;
1527  }
1528  }
1529  break;
1530 
1531  case AVMEDIA_TYPE_SUBTITLE:
1532  if (*packet_new)
1533  ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_frame, pkt);
1534  *packet_new = 0;
1535  break;
1536  default:
1537  *packet_new = 0;
1538  }
1539  } else {
1540  *packet_new = 0;
1541  }
1542 
1543  if (ret < 0)
1544  return ret;
1545  if (got_frame) {
1546  int is_sub = (par->codec_type == AVMEDIA_TYPE_SUBTITLE);
1548  if (do_show_frames)
1549  if (is_sub)
1550  show_subtitle(tfc, &sub, ifile->streams[pkt->stream_index].st, fmt_ctx);
1551  else
1552  show_frame(tfc, frame, ifile->streams[pkt->stream_index].st, fmt_ctx);
1553 
1554  if (!is_sub && do_analyze_frames) {
1555  for (int i = 0; i < frame->nb_side_data; i++) {
1556  if (frame->side_data[i]->type == AV_FRAME_DATA_A53_CC)
1558  else if (frame->side_data[i]->type == AV_FRAME_DATA_FILM_GRAIN_PARAMS)
1560  }
1561  }
1562 
1563  if (is_sub)
1564  avsubtitle_free(&sub);
1565  }
1566  return got_frame || *packet_new;
1567 }
1568 
1569 static void log_read_interval(const ReadInterval *interval, void *log_ctx, int log_level)
1570 {
1571  av_log(log_ctx, log_level, "id:%d", interval->id);
1572 
1573  if (interval->has_start) {
1574  av_log(log_ctx, log_level, " start:%s%s", interval->start_is_offset ? "+" : "",
1575  av_ts2timestr(interval->start, &AV_TIME_BASE_Q));
1576  } else {
1577  av_log(log_ctx, log_level, " start:N/A");
1578  }
1579 
1580  if (interval->has_end) {
1581  av_log(log_ctx, log_level, " end:%s", interval->end_is_offset ? "+" : "");
1582  if (interval->duration_frames)
1583  av_log(log_ctx, log_level, "#%"PRId64, interval->end);
1584  else
1585  av_log(log_ctx, log_level, "%s", av_ts2timestr(interval->end, &AV_TIME_BASE_Q));
1586  } else {
1587  av_log(log_ctx, log_level, " end:N/A");
1588  }
1589 
1590  av_log(log_ctx, log_level, "\n");
1591 }
1592 
1594  const ReadInterval *interval, int64_t *cur_ts)
1595 {
1596  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1597  AVPacket *pkt = NULL;
1598  AVFrame *frame = NULL;
1599  int ret = 0, i = 0, frame_count = 0;
1600  int64_t start = -INT64_MAX, end = interval->end;
1601  int has_start = 0, has_end = interval->has_end && !interval->end_is_offset;
1602 
1603  av_log(NULL, AV_LOG_VERBOSE, "Processing read interval ");
1605 
1606  if (interval->has_start) {
1607  int64_t target;
1608  if (interval->start_is_offset) {
1609  if (*cur_ts == AV_NOPTS_VALUE) {
1611  "Could not seek to relative position since current "
1612  "timestamp is not defined\n");
1613  ret = AVERROR(EINVAL);
1614  goto end;
1615  }
1616  target = *cur_ts + interval->start;
1617  } else {
1618  target = interval->start;
1619  }
1620 
1621  av_log(NULL, AV_LOG_VERBOSE, "Seeking to read interval start point %s\n",
1622  av_ts2timestr(target, &AV_TIME_BASE_Q));
1623  if ((ret = avformat_seek_file(fmt_ctx, -1, -INT64_MAX, target, INT64_MAX, 0)) < 0) {
1624  av_log(NULL, AV_LOG_ERROR, "Could not seek to position %"PRId64": %s\n",
1625  interval->start, av_err2str(ret));
1626  goto end;
1627  }
1628  }
1629 
1630  frame = av_frame_alloc();
1631  if (!frame) {
1632  ret = AVERROR(ENOMEM);
1633  goto end;
1634  }
1635  pkt = av_packet_alloc();
1636  if (!pkt) {
1637  ret = AVERROR(ENOMEM);
1638  goto end;
1639  }
1640  while (!av_read_frame(fmt_ctx, pkt)) {
1641  if (fmt_ctx->nb_streams > nb_streams) {
1648  }
1650  AVRational tb = ifile->streams[pkt->stream_index].st->time_base;
1651  int64_t pts = pkt->pts != AV_NOPTS_VALUE ? pkt->pts : pkt->dts;
1652 
1653  if (pts != AV_NOPTS_VALUE)
1654  *cur_ts = av_rescale_q(pts, tb, AV_TIME_BASE_Q);
1655 
1656  if (!has_start && *cur_ts != AV_NOPTS_VALUE) {
1657  start = *cur_ts;
1658  has_start = 1;
1659  }
1660 
1661  if (has_start && !has_end && interval->end_is_offset) {
1662  end = start + interval->end;
1663  has_end = 1;
1664  }
1665 
1666  if (interval->end_is_offset && interval->duration_frames) {
1667  if (frame_count >= interval->end)
1668  break;
1669  } else if (has_end && *cur_ts != AV_NOPTS_VALUE && *cur_ts >= end) {
1670  break;
1671  }
1672 
1673  frame_count++;
1674  if (do_read_packets) {
1675  if (do_show_packets)
1676  show_packet(tfc, ifile, pkt, i++);
1678  }
1679  if (do_read_frames) {
1680  int packet_new = 1;
1681  FrameData *fd;
1682 
1683  pkt->opaque_ref = av_buffer_allocz(sizeof(*fd));
1684  if (!pkt->opaque_ref) {
1685  ret = AVERROR(ENOMEM);
1686  goto end;
1687  }
1688  fd = (FrameData*)pkt->opaque_ref->data;
1689  fd->pkt_pos = pkt->pos;
1690  fd->pkt_size = pkt->size;
1691 
1692  while (process_frame(tfc, ifile, frame, pkt, &packet_new) > 0);
1693  }
1694  }
1696  }
1698  //Flush remaining frames that are cached in the decoder
1699  for (i = 0; i < ifile->nb_streams; i++) {
1700  pkt->stream_index = i;
1701  if (do_read_frames) {
1702  while (process_frame(tfc, ifile, frame, pkt, &(int){1}) > 0);
1703  if (ifile->streams[i].dec_ctx)
1705  }
1706  }
1707 
1708 end:
1709  av_frame_free(&frame);
1710  av_packet_free(&pkt);
1711  if (ret < 0) {
1712  av_log(NULL, AV_LOG_ERROR, "Could not read packets in interval ");
1713  log_read_interval(interval, NULL, AV_LOG_ERROR);
1714  }
1715  return ret;
1716 }
1717 
1719 {
1720  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1721  int i, ret = 0;
1722  int64_t cur_ts = fmt_ctx->start_time;
1723 
1724  if (read_intervals_nb == 0) {
1725  ReadInterval interval = (ReadInterval) { .has_start = 0, .has_end = 0 };
1726  ret = read_interval_packets(tfc, ifile, &interval, &cur_ts);
1727  } else {
1728  for (i = 0; i < read_intervals_nb; i++) {
1729  ret = read_interval_packets(tfc, ifile, &read_intervals[i], &cur_ts);
1730  if (ret < 0)
1731  break;
1732  }
1733  }
1734 
1735  return ret;
1736 }
1737 
1738 static void print_dispositions(AVTextFormatContext *tfc, uint32_t disposition, SectionID section_id)
1739 {
1740  avtext_print_section_header(tfc, NULL, section_id);
1741  for (int i = 0; i < sizeof(disposition) * CHAR_BIT; i++) {
1742  const char *disposition_str = av_disposition_to_string(1U << i);
1743 
1744  if (disposition_str)
1745  print_int(disposition_str, !!(disposition & (1U << i)));
1746  }
1748 }
1749 
1750 #define IN_PROGRAM 1
1751 #define IN_STREAM_GROUP 2
1752 
1753 static int show_stream(AVTextFormatContext *tfc, AVFormatContext *fmt_ctx, int stream_idx, InputStream *ist, int container)
1754 {
1755  AVStream *stream = ist->st;
1756  AVCodecParameters *par;
1758  char val_str[128];
1759  const char *s;
1760  AVRational sar, dar;
1761  AVBPrint pbuf;
1762  const AVCodecDescriptor *cd;
1763  const SectionID section_header[] = {
1767  };
1768  const SectionID section_disposition[] = {
1772  };
1773  const SectionID section_tags[] = {
1777  };
1778  int ret = 0;
1779  const char *profile = NULL;
1780 
1781  av_assert0(container < FF_ARRAY_ELEMS(section_header));
1782 
1784 
1785  avtext_print_section_header(tfc, NULL, section_header[container]);
1786 
1787  print_int("index", stream->index);
1788 
1789  par = stream->codecpar;
1790  dec_ctx = ist->dec_ctx;
1791  if (cd = avcodec_descriptor_get(par->codec_id)) {
1792  print_str("codec_name", cd->name);
1793  if (!do_bitexact) {
1794  print_str("codec_long_name",
1795  cd->long_name ? cd->long_name : "unknown");
1796  }
1797  } else {
1798  print_str_opt("codec_name", "unknown");
1799  if (!do_bitexact) {
1800  print_str_opt("codec_long_name", "unknown");
1801  }
1802  }
1803 
1804  if (!do_bitexact && (profile = avcodec_profile_name(par->codec_id, par->profile)))
1805  print_str("profile", profile);
1806  else {
1807  if (par->profile != AV_PROFILE_UNKNOWN) {
1808  char profile_num[12];
1809  snprintf(profile_num, sizeof(profile_num), "%d", par->profile);
1810  print_str("profile", profile_num);
1811  } else
1812  print_str_opt("profile", "unknown");
1813  }
1814 
1816  if (s) print_str ("codec_type", s);
1817  else print_str_opt("codec_type", "unknown");
1818 
1819  /* print AVI/FourCC tag */
1820  print_str("codec_tag_string", av_fourcc2str(par->codec_tag));
1821  print_fmt("codec_tag", "0x%04"PRIx32, par->codec_tag);
1822 
1823  av_bprint_clear(&pbuf);
1824  if (!av_mime_codec_str(par, stream->avg_frame_rate, &pbuf))
1825  print_str("mime_codec_string", pbuf.str);
1826 
1827  switch (par->codec_type) {
1828  case AVMEDIA_TYPE_VIDEO:
1829  print_int("width", par->width);
1830  print_int("height", par->height);
1831  if (dec_ctx) {
1832  print_int("coded_width", dec_ctx->coded_width);
1833  print_int("coded_height", dec_ctx->coded_height);
1834 
1835  if (do_analyze_frames) {
1836  print_int("closed_captions", streams_with_closed_captions[stream->index]);
1837  print_int("film_grain", streams_with_film_grain[stream->index]);
1838  }
1839  }
1840  print_int("has_b_frames", par->video_delay);
1841  sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL);
1842  if (sar.num) {
1843  print_q("sample_aspect_ratio", sar, ':');
1844  av_reduce(&dar.num, &dar.den,
1845  (int64_t) par->width * sar.num,
1846  (int64_t) par->height * sar.den,
1847  1024*1024);
1848  print_q("display_aspect_ratio", dar, ':');
1849  } else {
1850  print_str_opt("sample_aspect_ratio", "N/A");
1851  print_str_opt("display_aspect_ratio", "N/A");
1852  }
1853  print_pixel_format(tfc, par->format);
1854  print_int("level", par->level);
1855 
1856  print_color_range(tfc, par->color_range);
1857  print_color_space(tfc, par->color_space);
1858  print_color_trc(tfc, par->color_trc);
1859  print_primaries(tfc, par->color_primaries);
1861 
1862  if (par->field_order == AV_FIELD_PROGRESSIVE)
1863  print_str("field_order", "progressive");
1864  else if (par->field_order == AV_FIELD_TT)
1865  print_str("field_order", "tt");
1866  else if (par->field_order == AV_FIELD_BB)
1867  print_str("field_order", "bb");
1868  else if (par->field_order == AV_FIELD_TB)
1869  print_str("field_order", "tb");
1870  else if (par->field_order == AV_FIELD_BT)
1871  print_str("field_order", "bt");
1872  else
1873  print_str_opt("field_order", "unknown");
1874 
1875  if (dec_ctx)
1876  print_int("refs", dec_ctx->refs);
1877  break;
1878 
1879  case AVMEDIA_TYPE_AUDIO:
1881  if (s) print_str ("sample_fmt", s);
1882  else print_str_opt("sample_fmt", "unknown");
1883  print_val("sample_rate", par->sample_rate, unit_hertz_str);
1884  print_int("channels", par->ch_layout.nb_channels);
1885 
1886  if (par->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC) {
1887  av_channel_layout_describe(&par->ch_layout, val_str, sizeof(val_str));
1888  print_str ("channel_layout", val_str);
1889  } else {
1890  print_str_opt("channel_layout", "unknown");
1891  }
1892 
1893  print_int("bits_per_sample", av_get_bits_per_sample(par->codec_id));
1894 
1895  print_int("initial_padding", par->initial_padding);
1896  break;
1897 
1898  case AVMEDIA_TYPE_SUBTITLE:
1899  if (par->width)
1900  print_int("width", par->width);
1901  else
1902  print_str_opt("width", "N/A");
1903  if (par->height)
1904  print_int("height", par->height);
1905  else
1906  print_str_opt("height", "N/A");
1907  break;
1908  }
1909 
1910  if (show_private_data) {
1911  if (dec_ctx && dec_ctx->codec->priv_class)
1913  if (fmt_ctx->iformat->priv_class)
1915  }
1916 
1917  if (fmt_ctx->iformat->flags & AVFMT_SHOW_IDS) print_fmt ("id", "0x%x", stream->id);
1918  else print_str_opt("id", "N/A");
1919  print_q("r_frame_rate", stream->r_frame_rate, '/');
1920  print_q("avg_frame_rate", stream->avg_frame_rate, '/');
1921  print_q("time_base", stream->time_base, '/');
1922  print_ts ("start_pts", stream->start_time);
1923  print_time("start_time", stream->start_time, &stream->time_base);
1924  print_ts ("duration_ts", stream->duration);
1925  print_time("duration", stream->duration, &stream->time_base);
1926  if (par->bit_rate > 0) print_val ("bit_rate", par->bit_rate, unit_bit_per_second_str);
1927  else print_str_opt("bit_rate", "N/A");
1928  if (dec_ctx && dec_ctx->rc_max_rate > 0)
1930  else
1931  print_str_opt("max_bit_rate", "N/A");
1932  if (dec_ctx && dec_ctx->bits_per_raw_sample > 0) print_fmt("bits_per_raw_sample", "%d", dec_ctx->bits_per_raw_sample);
1933  else print_str_opt("bits_per_raw_sample", "N/A");
1934  if (stream->nb_frames) print_fmt ("nb_frames", "%"PRId64, stream->nb_frames);
1935  else print_str_opt("nb_frames", "N/A");
1936  if (nb_streams_frames[stream_idx]) print_fmt ("nb_read_frames", "%"PRIu64, nb_streams_frames[stream_idx]);
1937  else print_str_opt("nb_read_frames", "N/A");
1938  if (nb_streams_packets[stream_idx]) print_fmt ("nb_read_packets", "%"PRIu64, nb_streams_packets[stream_idx]);
1939  else print_str_opt("nb_read_packets", "N/A");
1940  if (do_show_data)
1941  avtext_print_data(tfc, "extradata", par->extradata,
1942  par->extradata_size);
1943 
1944  if (par->extradata_size > 0) {
1945  print_int("extradata_size", par->extradata_size);
1946  avtext_print_data_hash(tfc, "extradata_hash", par->extradata,
1947  par->extradata_size);
1948  }
1949 
1950  /* Print disposition information */
1952  av_assert0(container < FF_ARRAY_ELEMS(section_disposition));
1953  print_dispositions(tfc, stream->disposition, section_disposition[container]);
1954  }
1955 
1956  if (do_show_stream_tags) {
1957  av_assert0(container < FF_ARRAY_ELEMS(section_tags));
1958  ret = show_tags(tfc, stream->metadata, section_tags[container]);
1959  }
1960 
1961  if (stream->codecpar->nb_coded_side_data) {
1963  for (int i = 0; i < stream->codecpar->nb_coded_side_data; i++) {
1964  print_pkt_side_data(tfc, stream->codecpar, &stream->codecpar->coded_side_data[i],
1967  }
1969  }
1970 
1972  av_bprint_finalize(&pbuf, NULL);
1973  fflush(stdout);
1974 
1975  return ret;
1976 }
1977 
1979 {
1980  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1981  int i, ret = 0;
1982 
1984  for (i = 0; i < ifile->nb_streams; i++)
1985  if (selected_streams[i]) {
1986  ret = show_stream(tfc, fmt_ctx, i, &ifile->streams[i], 0);
1987  if (ret < 0)
1988  break;
1989  }
1991 
1992  return ret;
1993 }
1994 
1996 {
1997  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1998  int i, ret = 0;
1999 
2001  print_int("program_id", program->id);
2002  print_int("program_num", program->program_num);
2003  print_int("nb_streams", program->nb_stream_indexes);
2004  print_int("pmt_pid", program->pmt_pid);
2005  print_int("pcr_pid", program->pcr_pid);
2007  ret = show_tags(tfc, program->metadata, SECTION_ID_PROGRAM_TAGS);
2008  if (ret < 0)
2009  goto end;
2010 
2012  for (i = 0; i < program->nb_stream_indexes; i++) {
2013  if (selected_streams[program->stream_index[i]]) {
2014  ret = show_stream(tfc, fmt_ctx, program->stream_index[i], &ifile->streams[program->stream_index[i]], IN_PROGRAM);
2015  if (ret < 0)
2016  break;
2017  }
2018  }
2020 
2021 end:
2023  return ret;
2024 }
2025 
2027 {
2028  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2029  int i, ret = 0;
2030 
2032  for (i = 0; i < fmt_ctx->nb_programs; i++) {
2034  if (!program)
2035  continue;
2036  ret = show_program(tfc, ifile, program);
2037  if (ret < 0)
2038  break;
2039  }
2041  return ret;
2042 }
2043 
2045  const AVStreamGroupTileGrid *tile_grid)
2046 {
2048  print_int("nb_tiles", tile_grid->nb_tiles);
2049  print_int("coded_width", tile_grid->coded_width);
2050  print_int("coded_height", tile_grid->coded_height);
2051  print_int("horizontal_offset", tile_grid->horizontal_offset);
2052  print_int("vertical_offset", tile_grid->vertical_offset);
2053  print_int("width", tile_grid->width);
2054  print_int("height", tile_grid->height);
2056  for (int i = 0; i < tile_grid->nb_tiles; i++) {
2058  print_int("stream_index", tile_grid->offsets[i].idx);
2059  print_int("tile_horizontal_offset", tile_grid->offsets[i].horizontal);
2060  print_int("tile_vertical_offset", tile_grid->offsets[i].vertical);
2062  }
2065 }
2066 
2068  const AVIAMFParamDefinition *param, SectionID section_id)
2069 {
2070  SectionID subsection_id, parameter_section_id;
2071  subsection_id = sections[section_id].children_ids[0];
2072  av_assert0(subsection_id != -1);
2073  parameter_section_id = sections[subsection_id].children_ids[0];
2074  av_assert0(parameter_section_id != -1);
2075  avtext_print_section_header(tfc, "IAMF Param Definition", section_id);
2076  print_str("name", name);
2077  print_int("nb_subblocks", param->nb_subblocks);
2078  print_int("type", param->type);
2079  print_int("parameter_id", param->parameter_id);
2080  print_int("parameter_rate", param->parameter_rate);
2081  print_int("duration", param->duration);
2082  print_int("constant_subblock_duration", param->constant_subblock_duration);
2083  if (param->nb_subblocks > 0)
2084  avtext_print_section_header(tfc, NULL, subsection_id);
2085  for (int i = 0; i < param->nb_subblocks; i++) {
2086  const void *subblock = av_iamf_param_definition_get_subblock(param, i);
2087  switch(param->type) {
2089  const AVIAMFMixGain *mix = subblock;
2090  avtext_print_section_header(tfc, "IAMF Mix Gain Parameters", parameter_section_id);
2091  print_int("subblock_duration", mix->subblock_duration);
2092  print_int("animation_type", mix->animation_type);
2093  print_q("start_point_value", mix->start_point_value, '/');
2094  print_q("end_point_value", mix->end_point_value, '/');
2095  print_q("control_point_value", mix->control_point_value, '/');
2096  print_q("control_point_relative_time", mix->control_point_relative_time, '/');
2097  avtext_print_section_footer(tfc); // parameter_section_id
2098  break;
2099  }
2101  const AVIAMFDemixingInfo *demix = subblock;
2102  avtext_print_section_header(tfc, "IAMF Demixing Info", parameter_section_id);
2103  print_int("subblock_duration", demix->subblock_duration);
2104  print_int("dmixp_mode", demix->dmixp_mode);
2105  avtext_print_section_footer(tfc); // parameter_section_id
2106  break;
2107  }
2109  const AVIAMFReconGain *recon = subblock;
2110  avtext_print_section_header(tfc, "IAMF Recon Gain", parameter_section_id);
2111  print_int("subblock_duration", recon->subblock_duration);
2112  avtext_print_section_footer(tfc); // parameter_section_id
2113  break;
2114  }
2115  }
2116  }
2117  if (param->nb_subblocks > 0)
2118  avtext_print_section_footer(tfc); // subsection_id
2119  avtext_print_section_footer(tfc); // section_id
2120 }
2121 
2123  const AVIAMFAudioElement *audio_element)
2124 {
2125  AVBPrint pbuf;
2126 
2128 
2130  print_int("nb_layers", audio_element->nb_layers);
2131  print_int("audio_element_type", audio_element->audio_element_type);
2132  print_int("default_w", audio_element->default_w);
2134  for (int i = 0; i < audio_element->nb_layers; i++) {
2135  const AVIAMFLayer *layer = audio_element->layers[i];
2136  char val_str[128];
2138  av_channel_layout_describe(&layer->ch_layout, val_str, sizeof(val_str));
2139  print_str("channel_layout", val_str);
2141  print_int("output_gain_flags", layer->output_gain_flags);
2142  print_q("output_gain", layer->output_gain, '/');
2143  } else if (audio_element->audio_element_type == AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE) {
2144  print_int("ambisonics_mode", layer->ambisonics_mode);
2146  print_list_fmt("demixing_matrix", "%d/%d", layer->nb_demixing_matrix, 1, layer->demixing_matrix[idx].num,
2147  layer->demixing_matrix[idx].den);
2148  }
2149  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENT
2150  }
2151  if (audio_element->demixing_info)
2152  print_iamf_param_definition(tfc, "demixing_info", audio_element->demixing_info,
2154  if (audio_element->recon_gain_info)
2155  print_iamf_param_definition(tfc, "recon_gain_info", audio_element->recon_gain_info,
2157  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENTS
2158  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_COMPONENT
2159 
2160  av_bprint_finalize(&pbuf, NULL);
2161 }
2162 
2164 {
2166  print_int("nb_elements", submix->nb_elements);
2167  print_int("nb_layouts", submix->nb_layouts);
2168  print_q("default_mix_gain", submix->default_mix_gain, '/');
2170  for (int i = 0; i < submix->nb_elements; i++) {
2171  const AVIAMFSubmixElement *element = submix->elements[i];
2172  avtext_print_section_header(tfc, "IAMF Submix Element", SECTION_ID_STREAM_GROUP_PIECE);
2173  print_int("stream_id", element->audio_element_id);
2174  print_q("default_mix_gain", element->default_mix_gain, '/');
2175  print_int("headphones_rendering_mode", element->headphones_rendering_mode);
2177  if (element->annotations) {
2178  const AVDictionaryEntry *annotation = NULL;
2180  while (annotation = av_dict_iterate(element->annotations, annotation))
2181  print_str(annotation->key, annotation->value);
2182  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBPIECE
2183  }
2184  if (element->element_mix_config)
2185  print_iamf_param_definition(tfc, "element_mix_config", element->element_mix_config,
2187  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBPIECES
2188  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_PIECE
2189  }
2190  if (submix->output_mix_config)
2191  print_iamf_param_definition(tfc, "output_mix_config", submix->output_mix_config,
2193  for (int i = 0; i < submix->nb_layouts; i++) {
2194  const AVIAMFSubmixLayout *layout = submix->layouts[i];
2195  char val_str[128];
2196  avtext_print_section_header(tfc, "IAMF Submix Layout", SECTION_ID_STREAM_GROUP_PIECE);
2197  av_channel_layout_describe(&layout->sound_system, val_str, sizeof(val_str));
2198  print_str("sound_system", val_str);
2199  print_q("integrated_loudness", layout->integrated_loudness, '/');
2200  print_q("digital_peak", layout->digital_peak, '/');
2201  print_q("true_peak", layout->true_peak, '/');
2202  print_q("dialogue_anchored_loudness", layout->dialogue_anchored_loudness, '/');
2203  print_q("album_anchored_loudness", layout->album_anchored_loudness, '/');
2204  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_PIECE
2205  }
2206  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_PIECES
2207  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENT
2208 }
2209 
2211  const AVIAMFMixPresentation *mix_presentation)
2212 {
2214  print_int("nb_submixes", mix_presentation->nb_submixes);
2216  if (mix_presentation->annotations) {
2217  const AVDictionaryEntry *annotation = NULL;
2219  while (annotation = av_dict_iterate(mix_presentation->annotations, annotation))
2220  print_str(annotation->key, annotation->value);
2221  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENT
2222  }
2223  for (int i = 0; i < mix_presentation->nb_submixes; i++)
2224  print_iamf_submix_params(tfc, mix_presentation->submixes[i]);
2225  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENTS
2226  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_COMPONENT
2227 }
2228 
2230 {
2233  print_tile_grid_params(tfc, stg, stg->params.tile_grid);
2238  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_COMPONENTS
2239 }
2240 
2242 {
2243  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2244  AVBPrint pbuf;
2245  int i, ret = 0;
2246 
2249  print_int("index", stg->index);
2250  if (fmt_ctx->iformat->flags & AVFMT_SHOW_IDS) print_fmt ("id", "0x%"PRIx64, stg->id);
2251  else print_str_opt("id", "N/A");
2252  print_int("nb_streams", stg->nb_streams);
2253  if (stg->type != AV_STREAM_GROUP_PARAMS_NONE)
2254  print_str("type", av_x_if_null(avformat_stream_group_name(stg->type), "unknown"));
2255  else
2256  print_str_opt("type", "unknown");
2258  print_stream_group_params(tfc, stg);
2259 
2260  /* Print disposition information */
2263 
2266  if (ret < 0)
2267  goto end;
2268 
2270  for (i = 0; i < stg->nb_streams; i++) {
2271  if (selected_streams[stg->streams[i]->index]) {
2272  ret = show_stream(tfc, fmt_ctx, stg->streams[i]->index, &ifile->streams[stg->streams[i]->index], IN_STREAM_GROUP);
2273  if (ret < 0)
2274  break;
2275  }
2276  }
2278 
2279 end:
2280  av_bprint_finalize(&pbuf, NULL);
2282  return ret;
2283 }
2284 
2286 {
2287  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2288  int i, ret = 0;
2289 
2291  for (i = 0; i < fmt_ctx->nb_stream_groups; i++) {
2293 
2294  ret = show_stream_group(tfc, ifile, stg);
2295  if (ret < 0)
2296  break;
2297  }
2299  return ret;
2300 }
2301 
2303 {
2304  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2305  int i, ret = 0;
2306 
2308  for (i = 0; i < fmt_ctx->nb_chapters; i++) {
2309  AVChapter *chapter = fmt_ctx->chapters[i];
2310 
2312  print_int("id", chapter->id);
2313  print_q ("time_base", chapter->time_base, '/');
2314  print_int("start", chapter->start);
2315  print_time("start_time", chapter->start, &chapter->time_base);
2316  print_int("end", chapter->end);
2317  print_time("end_time", chapter->end, &chapter->time_base);
2319  ret = show_tags(tfc, chapter->metadata, SECTION_ID_CHAPTER_TAGS);
2321  }
2323 
2324  return ret;
2325 }
2326 
2328 {
2329  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2330  int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1;
2331  int ret = 0;
2332 
2334  print_str_validate("filename", fmt_ctx->url);
2335  print_int("nb_streams", fmt_ctx->nb_streams);
2336  print_int("nb_programs", fmt_ctx->nb_programs);
2337  print_int("nb_stream_groups", fmt_ctx->nb_stream_groups);
2338  print_str("format_name", fmt_ctx->iformat->name);
2339  if (!do_bitexact) {
2340  if (fmt_ctx->iformat->long_name) print_str ("format_long_name", fmt_ctx->iformat->long_name);
2341  else print_str_opt("format_long_name", "unknown");
2342  }
2343  print_time("start_time", fmt_ctx->start_time, &AV_TIME_BASE_Q);
2344  print_time("duration", fmt_ctx->duration, &AV_TIME_BASE_Q);
2345  if (size >= 0) print_val ("size", size, unit_byte_str);
2346  else print_str_opt("size", "N/A");
2348  else print_str_opt("bit_rate", "N/A");
2349  print_int("probe_score", fmt_ctx->probe_score);
2350  if (do_show_format_tags)
2352 
2354  fflush(stdout);
2355  return ret;
2356 }
2357 
2358 static void show_error(AVTextFormatContext *tfc, int err)
2359 {
2361  print_int("code", err);
2362  print_str("string", av_err2str(err));
2364 }
2365 
2366 static int get_decoder_by_name(const char *codec_name, const AVCodec **codec)
2367 {
2368  if (codec_name == NULL)
2369  return 0;
2370 
2371  *codec = avcodec_find_decoder_by_name(codec_name);
2372  if (*codec == NULL) {
2374  "No codec could be found with name '%s'\n", codec_name);
2375  return AVERROR(EINVAL);
2376  }
2377  return 0;
2378 }
2379 
2381 {
2382  int ret;
2383 
2384 #define GET_DECODER(type_) \
2385  ret = get_decoder_by_name(type_##_codec_name, &fmt_ctx->type_##_codec); \
2386  if (ret < 0) return ret;
2387 
2388  GET_DECODER(audio);
2389  GET_DECODER(data);
2390  GET_DECODER(subtitle);
2391  GET_DECODER(video);
2392  return 0;
2393 }
2394 
2396 {
2397  const AVCodec *codec = NULL;
2398  switch (stream->codecpar->codec_type) {
2399  case AVMEDIA_TYPE_VIDEO: codec = fmt_ctx->video_codec; break;
2400  case AVMEDIA_TYPE_AUDIO: codec = fmt_ctx->audio_codec; break;
2401  case AVMEDIA_TYPE_SUBTITLE: codec = fmt_ctx->subtitle_codec; break;
2402  case AVMEDIA_TYPE_DATA: codec = fmt_ctx->data_codec; break;
2403  }
2404 
2405  if (codec != NULL)
2406  return codec;
2407 
2408  if (stream->codecpar->codec_id == AV_CODEC_ID_PROBE) {
2410  "Failed to probe codec for input stream %d\n", stream->index);
2411  return NULL;
2412  }
2413 
2414  codec = avcodec_find_decoder(stream->codecpar->codec_id);
2415  if (codec == NULL) {
2417  "Unsupported codec with id %d for input stream %d\n",
2418  stream->codecpar->codec_id, stream->index);
2419  return NULL;
2420  }
2421 
2422  return codec;
2423 }
2424 
2425 static int open_input_file(InputFile *ifile, const char *filename,
2426  const char *print_filename)
2427 {
2428  int err, i;
2430  const AVDictionaryEntry *t = NULL;
2431  int scan_all_pmts_set = 0;
2432 
2434  if (!fmt_ctx)
2435  return AVERROR(ENOMEM);
2436 
2437  err = set_decoders(fmt_ctx);
2438  if (err < 0)
2439  return err;
2440  if (!av_dict_get(format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) {
2441  av_dict_set(&format_opts, "scan_all_pmts", "1", AV_DICT_DONT_OVERWRITE);
2442  scan_all_pmts_set = 1;
2443  }
2444  if ((err = avformat_open_input(&fmt_ctx, filename,
2445  iformat, &format_opts)) < 0) {
2446  print_error(filename, err);
2447  return err;
2448  }
2449  if (print_filename) {
2450  av_freep(&fmt_ctx->url);
2451  fmt_ctx->url = av_strdup(print_filename);
2452  }
2453  ifile->fmt_ctx = fmt_ctx;
2454  if (scan_all_pmts_set)
2455  av_dict_set(&format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE);
2456  while ((t = av_dict_iterate(format_opts, t)))
2457  av_log(NULL, AV_LOG_WARNING, "Option %s skipped - not known to demuxer.\n", t->key);
2458 
2459  if (find_stream_info) {
2460  AVDictionary **opts;
2461  int orig_nb_streams = fmt_ctx->nb_streams;
2462 
2464  if (err < 0)
2465  return err;
2466 
2468 
2469  for (i = 0; i < orig_nb_streams; i++)
2470  av_dict_free(&opts[i]);
2471  av_freep(&opts);
2472 
2473  if (err < 0) {
2474  print_error(filename, err);
2475  return err;
2476  }
2477  }
2478 
2479  av_dump_format(fmt_ctx, 0, filename, 0);
2480 
2481  ifile->streams = av_calloc(fmt_ctx->nb_streams, sizeof(*ifile->streams));
2482  if (!ifile->streams)
2483  exit(1);
2484  ifile->nb_streams = fmt_ctx->nb_streams;
2485 
2486  /* bind a decoder to each input stream */
2487  for (i = 0; i < fmt_ctx->nb_streams; i++) {
2488  InputStream *ist = &ifile->streams[i];
2489  AVStream *stream = fmt_ctx->streams[i];
2490  const AVCodec *codec;
2491 
2492  ist->st = stream;
2493 
2494  codec = get_decoder_for_stream(fmt_ctx, stream);
2495  if (!codec)
2496  continue;
2497 
2498  {
2499  AVDictionary *opts;
2500 
2502  fmt_ctx, stream, codec, &opts, NULL);
2503  if (err < 0)
2504  exit(1);
2505 
2506  ist->dec_ctx = avcodec_alloc_context3(codec);
2507  if (!ist->dec_ctx)
2508  exit(1);
2509 
2510  err = avcodec_parameters_to_context(ist->dec_ctx, stream->codecpar);
2511  if (err < 0)
2512  exit(1);
2513 
2514  if (do_show_log) {
2515  // For logging it is needed to disable at least frame threads as otherwise
2516  // the log information would need to be reordered and matches up to contexts and frames
2517  // That is in fact possible but not trivial
2518  av_dict_set(&codec_opts, "threads", "1", 0);
2519  }
2520 
2521  av_dict_set(&opts, "flags", "+copy_opaque", AV_DICT_MULTIKEY);
2522 
2523  ist->dec_ctx->pkt_timebase = stream->time_base;
2524 
2525  if (avcodec_open2(ist->dec_ctx, codec, &opts) < 0) {
2526  av_log(NULL, AV_LOG_WARNING, "Could not open codec for input stream %d\n",
2527  stream->index);
2528  exit(1);
2529  }
2530 
2531  if ((t = av_dict_iterate(opts, NULL))) {
2532  av_log(NULL, AV_LOG_ERROR, "Option %s for input stream %d not found\n",
2533  t->key, stream->index);
2534  return AVERROR_OPTION_NOT_FOUND;
2535  }
2536  }
2537  }
2538 
2539  ifile->fmt_ctx = fmt_ctx;
2540  return 0;
2541 }
2542 
2543 static void close_input_file(InputFile *ifile)
2544 {
2545  int i;
2546 
2547  /* close decoder for each stream */
2548  for (i = 0; i < ifile->nb_streams; i++)
2550 
2551  av_freep(&ifile->streams);
2552  ifile->nb_streams = 0;
2553 
2554  avformat_close_input(&ifile->fmt_ctx);
2555 }
2556 
2557 static int probe_file(AVTextFormatContext *tfc, const char *filename,
2558  const char *print_filename)
2559 {
2560  InputFile ifile = { 0 };
2561  int ret, i;
2562  int section_id;
2563 
2567 
2568  ret = open_input_file(&ifile, filename, print_filename);
2569  if (ret < 0)
2570  goto end;
2571 
2572 #define CHECK_END if (ret < 0) goto end
2573 
2574  nb_streams = ifile.fmt_ctx->nb_streams;
2580 
2581  for (i = 0; i < ifile.fmt_ctx->nb_streams; i++) {
2582  if (stream_specifier) {
2584  ifile.fmt_ctx->streams[i],
2586  CHECK_END;
2587  else
2588  selected_streams[i] = ret;
2589  ret = 0;
2590  } else {
2591  selected_streams[i] = 1;
2592  }
2593  if (!selected_streams[i])
2594  ifile.fmt_ctx->streams[i]->discard = AVDISCARD_ALL;
2595  }
2596 
2600  section_id = SECTION_ID_PACKETS_AND_FRAMES;
2601  else if (do_show_packets && !do_show_frames)
2602  section_id = SECTION_ID_PACKETS;
2603  else // (!do_show_packets && do_show_frames)
2604  section_id = SECTION_ID_FRAMES;
2606  avtext_print_section_header(tfc, NULL, section_id);
2607  ret = read_packets(tfc, &ifile);
2610  CHECK_END;
2611  }
2612 
2613  if (do_show_programs) {
2614  ret = show_programs(tfc, &ifile);
2615  CHECK_END;
2616  }
2617 
2618  if (do_show_stream_groups) {
2619  ret = show_stream_groups(tfc, &ifile);
2620  CHECK_END;
2621  }
2622 
2623  if (do_show_streams) {
2624  ret = show_streams(tfc, &ifile);
2625  CHECK_END;
2626  }
2627  if (do_show_chapters) {
2628  ret = show_chapters(tfc, &ifile);
2629  CHECK_END;
2630  }
2631  if (do_show_format) {
2632  ret = show_format(tfc, &ifile);
2633  CHECK_END;
2634  }
2635 
2636 end:
2637  if (ifile.fmt_ctx)
2638  close_input_file(&ifile);
2648 
2649  return ret;
2650 }
2651 
2652 static void show_usage(void)
2653 {
2654  av_log(NULL, AV_LOG_INFO, "Simple multimedia streams analyzer\n");
2655  av_log(NULL, AV_LOG_INFO, "usage: %s [OPTIONS] INPUT_FILE\n", program_name);
2656  av_log(NULL, AV_LOG_INFO, "\n");
2657 }
2658 
2660 {
2661  AVBPrint pbuf;
2663 
2665  print_str("version", FFMPEG_VERSION);
2666  print_fmt("copyright", "Copyright (c) %d-%d the FFmpeg developers",
2667  program_birth_year, CONFIG_THIS_YEAR);
2668  print_str("compiler_ident", CC_IDENT);
2669  print_str("configuration", FFMPEG_CONFIGURATION);
2671 
2672  av_bprint_finalize(&pbuf, NULL);
2673 }
2674 
2675 #define SHOW_LIB_VERSION(libname, LIBNAME) \
2676  do { \
2677  if (CONFIG_##LIBNAME) { \
2678  unsigned int version = libname##_version(); \
2679  avtext_print_section_header(tfc, NULL, SECTION_ID_LIBRARY_VERSION); \
2680  print_str("name", "lib" #libname); \
2681  print_int("major", LIB##LIBNAME##_VERSION_MAJOR); \
2682  print_int("minor", LIB##LIBNAME##_VERSION_MINOR); \
2683  print_int("micro", LIB##LIBNAME##_VERSION_MICRO); \
2684  print_int("version", version); \
2685  print_str("ident", LIB##LIBNAME##_IDENT); \
2686  avtext_print_section_footer(tfc); \
2687  } \
2688  } while (0)
2689 
2691 {
2693  SHOW_LIB_VERSION(avutil, AVUTIL);
2694  SHOW_LIB_VERSION(avcodec, AVCODEC);
2695  SHOW_LIB_VERSION(avformat, AVFORMAT);
2696  SHOW_LIB_VERSION(avdevice, AVDEVICE);
2697  SHOW_LIB_VERSION(avfilter, AVFILTER);
2698  SHOW_LIB_VERSION(swscale, SWSCALE);
2699  SHOW_LIB_VERSION(swresample, SWRESAMPLE);
2701 }
2702 
2703 #define PRINT_PIX_FMT_FLAG(flagname, name) \
2704  do { \
2705  print_int(name, !!(pixdesc->flags & AV_PIX_FMT_FLAG_##flagname)); \
2706  } while (0)
2707 
2709 {
2710  const AVPixFmtDescriptor *pixdesc = NULL;
2711  int i, n;
2712 
2714  while (pixdesc = av_pix_fmt_desc_next(pixdesc)) {
2716  print_str("name", pixdesc->name);
2717  print_int("nb_components", pixdesc->nb_components);
2718  if ((pixdesc->nb_components >= 3) && !(pixdesc->flags & AV_PIX_FMT_FLAG_RGB)) {
2719  print_int ("log2_chroma_w", pixdesc->log2_chroma_w);
2720  print_int ("log2_chroma_h", pixdesc->log2_chroma_h);
2721  } else {
2722  print_str_opt("log2_chroma_w", "N/A");
2723  print_str_opt("log2_chroma_h", "N/A");
2724  }
2725  n = av_get_bits_per_pixel(pixdesc);
2726  if (n) print_int ("bits_per_pixel", n);
2727  else print_str_opt("bits_per_pixel", "N/A");
2730  PRINT_PIX_FMT_FLAG(BE, "big_endian");
2731  PRINT_PIX_FMT_FLAG(PAL, "palette");
2732  PRINT_PIX_FMT_FLAG(BITSTREAM, "bitstream");
2733  PRINT_PIX_FMT_FLAG(HWACCEL, "hwaccel");
2734  PRINT_PIX_FMT_FLAG(PLANAR, "planar");
2735  PRINT_PIX_FMT_FLAG(RGB, "rgb");
2736  PRINT_PIX_FMT_FLAG(ALPHA, "alpha");
2738  }
2739  if (do_show_pixel_format_components && (pixdesc->nb_components > 0)) {
2741  for (i = 0; i < pixdesc->nb_components; i++) {
2743  print_int("index", i + 1);
2744  print_int("bit_depth", pixdesc->comp[i].depth);
2746  }
2748  }
2750  }
2752 }
2753 
2754 static int opt_show_optional_fields(void *optctx, const char *opt, const char *arg)
2755 {
2759 
2761  double num;
2762  int ret = parse_number("show_optional_fields", arg, OPT_TYPE_INT,
2764  if (ret < 0)
2765  return ret;
2766  show_optional_fields = num;
2767  }
2768  return 0;
2769 }
2770 
2771 static int opt_format(void *optctx, const char *opt, const char *arg)
2772 {
2774  if (!iformat) {
2775  av_log(NULL, AV_LOG_ERROR, "Unknown input format: %s\n", arg);
2776  return AVERROR(EINVAL);
2777  }
2778  return 0;
2779 }
2780 
2781 static inline void mark_section_show_entries(SectionID section_id,
2782  int show_all_entries, AVDictionary *entries)
2783 {
2784  EntrySelection *selection = &selected_entries[section_id];
2785 
2786  selection->show_all_entries = show_all_entries;
2787  if (show_all_entries) {
2788  const AVTextFormatSection *section = &sections[section_id];
2789  for (const int *id = section->children_ids; *id != -1; id++)
2790  mark_section_show_entries(*id, show_all_entries, entries);
2791  } else {
2792  av_dict_copy(&selection->entries_to_show, entries, 0);
2793  }
2794 }
2795 
2796 static int match_section(const char *section_name,
2797  int show_all_entries, AVDictionary *entries)
2798 {
2799  int i, ret = 0;
2800 
2801  for (i = 0; i < FF_ARRAY_ELEMS(sections); i++) {
2802  const struct AVTextFormatSection *section = &sections[i];
2803  if (!strcmp(section_name, section->name) ||
2804  (section->unique_name && !strcmp(section_name, section->unique_name))) {
2806  "'%s' matches section with unique name '%s'\n", section_name,
2807  (char *)av_x_if_null(section->unique_name, section->name));
2808  ret++;
2809  mark_section_show_entries(section->id, show_all_entries, entries);
2810  }
2811  }
2812  return ret;
2813 }
2814 
2815 static int opt_show_entries(void *optctx, const char *opt, const char *arg)
2816 {
2817  const char *p = arg;
2818  int ret = 0;
2819 
2820  while (*p) {
2821  AVDictionary *entries = NULL;
2822  char *section_name = av_get_token(&p, "=:");
2823  int show_all_entries = 0;
2824 
2825  if (!section_name) {
2827  "Missing section name for option '%s'\n", opt);
2828  return AVERROR(EINVAL);
2829  }
2830 
2831  if (*p == '=') {
2832  p++;
2833  while (*p && *p != ':') {
2834  char *entry = av_get_token(&p, ",:");
2835  if (!entry)
2836  break;
2838  "Adding '%s' to the entries to show in section '%s'\n",
2839  entry, section_name);
2840  av_dict_set(&entries, entry, "", AV_DICT_DONT_STRDUP_KEY);
2841  if (*p == ',')
2842  p++;
2843  }
2844  } else {
2845  show_all_entries = 1;
2846  }
2847 
2848  ret = match_section(section_name, show_all_entries, entries);
2849  if (ret == 0) {
2850  av_log(NULL, AV_LOG_ERROR, "No match for section '%s'\n", section_name);
2851  ret = AVERROR(EINVAL);
2852  }
2853  av_dict_free(&entries);
2854  av_free(section_name);
2855 
2856  if (ret <= 0)
2857  break;
2858  if (*p)
2859  p++;
2860  }
2861 
2862  return ret;
2863 }
2864 
2865 static int opt_input_file(void *optctx, const char *arg)
2866 {
2867  if (input_filename) {
2869  "Argument '%s' provided as input filename, but '%s' was already specified.\n",
2870  arg, input_filename);
2871  return AVERROR(EINVAL);
2872  }
2873  if (!strcmp(arg, "-"))
2874  arg = "fd:";
2876  if (!input_filename)
2877  return AVERROR(ENOMEM);
2878 
2879  return 0;
2880 }
2881 
2882 static int opt_input_file_i(void *optctx, const char *opt, const char *arg)
2883 {
2884  opt_input_file(optctx, arg);
2885  return 0;
2886 }
2887 
2888 static int opt_output_file_o(void *optctx, const char *opt, const char *arg)
2889 {
2890  if (output_filename) {
2892  "Argument '%s' provided as output filename, but '%s' was already specified.\n",
2893  arg, output_filename);
2894  return AVERROR(EINVAL);
2895  }
2896  if (!strcmp(arg, "-"))
2897  arg = "fd:";
2899  if (!output_filename)
2900  return AVERROR(ENOMEM);
2901 
2902  return 0;
2903 }
2904 
2905 static int opt_print_filename(void *optctx, const char *opt, const char *arg)
2906 {
2909  return print_input_filename ? 0 : AVERROR(ENOMEM);
2910 }
2911 
2912 void show_help_default(const char *opt, const char *arg)
2913 {
2915  show_usage();
2916  show_help_options(options, "Main options:", 0, 0);
2917  printf("\n");
2918 
2921 }
2922 
2923 /**
2924  * Parse interval specification, according to the format:
2925  * INTERVAL ::= [START|+START_OFFSET][%[END|+END_OFFSET]]
2926  * INTERVALS ::= INTERVAL[,INTERVALS]
2927 */
2928 static int parse_read_interval(const char *interval_spec,
2929  ReadInterval *interval)
2930 {
2931  int ret = 0;
2932  char *next, *p, *spec = av_strdup(interval_spec);
2933  if (!spec)
2934  return AVERROR(ENOMEM);
2935 
2936  if (!*spec) {
2937  av_log(NULL, AV_LOG_ERROR, "Invalid empty interval specification\n");
2938  ret = AVERROR(EINVAL);
2939  goto end;
2940  }
2941 
2942  p = spec;
2943  next = strchr(spec, '%');
2944  if (next)
2945  *next++ = 0;
2946 
2947  /* parse first part */
2948  if (*p) {
2949  interval->has_start = 1;
2950 
2951  if (*p == '+') {
2952  interval->start_is_offset = 1;
2953  p++;
2954  } else {
2955  interval->start_is_offset = 0;
2956  }
2957 
2958  ret = av_parse_time(&interval->start, p, 1);
2959  if (ret < 0) {
2960  av_log(NULL, AV_LOG_ERROR, "Invalid interval start specification '%s'\n", p);
2961  goto end;
2962  }
2963  } else {
2964  interval->has_start = 0;
2965  }
2966 
2967  /* parse second part */
2968  p = next;
2969  if (p && *p) {
2970  int64_t us;
2971  interval->has_end = 1;
2972 
2973  if (*p == '+') {
2974  interval->end_is_offset = 1;
2975  p++;
2976  } else {
2977  interval->end_is_offset = 0;
2978  }
2979 
2980  if (interval->end_is_offset && *p == '#') {
2981  long long int lli;
2982  char *tail;
2983  interval->duration_frames = 1;
2984  p++;
2985  lli = strtoll(p, &tail, 10);
2986  if (*tail || lli < 0) {
2988  "Invalid or negative value '%s' for duration number of frames\n", p);
2989  goto end;
2990  }
2991  interval->end = lli;
2992  } else {
2993  interval->duration_frames = 0;
2994  ret = av_parse_time(&us, p, 1);
2995  if (ret < 0) {
2996  av_log(NULL, AV_LOG_ERROR, "Invalid interval end/duration specification '%s'\n", p);
2997  goto end;
2998  }
2999  interval->end = us;
3000  }
3001  } else {
3002  interval->has_end = 0;
3003  }
3004 
3005 end:
3006  av_free(spec);
3007  return ret;
3008 }
3009 
3010 static int parse_read_intervals(const char *intervals_spec)
3011 {
3012  int ret, n, i;
3013  char *p, *spec = av_strdup(intervals_spec);
3014  if (!spec)
3015  return AVERROR(ENOMEM);
3016 
3017  /* preparse specification, get number of intervals */
3018  for (n = 0, p = spec; *p; p++)
3019  if (*p == ',')
3020  n++;
3021  n++;
3022 
3024  if (!read_intervals) {
3025  ret = AVERROR(ENOMEM);
3026  goto end;
3027  }
3028  read_intervals_nb = n;
3029 
3030  /* parse intervals */
3031  p = spec;
3032  for (i = 0; p; i++) {
3033  char *next;
3034 
3036  next = strchr(p, ',');
3037  if (next)
3038  *next++ = 0;
3039 
3040  read_intervals[i].id = i;
3042  if (ret < 0) {
3043  av_log(NULL, AV_LOG_ERROR, "Error parsing read interval #%d '%s'\n",
3044  i, p);
3045  goto end;
3046  }
3047  av_log(NULL, AV_LOG_VERBOSE, "Parsed log interval ");
3049  p = next;
3050  }
3052 
3053 end:
3054  av_free(spec);
3055  return ret;
3056 }
3057 
3058 static int opt_read_intervals(void *optctx, const char *opt, const char *arg)
3059 {
3060  return parse_read_intervals(arg);
3061 }
3062 
3063 static int opt_pretty(void *optctx, const char *opt, const char *arg)
3064 {
3065  show_value_unit = 1;
3066  use_value_prefix = 1;
3069  return 0;
3070 }
3071 
3072 static void print_section(SectionID id, int level)
3073 {
3074  const int *pid;
3075  const struct AVTextFormatSection *section = &sections[id];
3076  printf("%c%c%c%c",
3077  section->flags & AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER ? 'W' : '.',
3078  section->flags & AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY ? 'A' : '.',
3080  section->flags & AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE ? 'T' : '.');
3081  printf("%*c %s", level * 4, ' ', section->name);
3082  if (section->unique_name)
3083  printf("/%s", section->unique_name);
3084  printf("\n");
3085 
3086  for (pid = section->children_ids; *pid != -1; pid++)
3087  print_section(*pid, level+1);
3088 }
3089 
3090 static int opt_sections(void *optctx, const char *opt, const char *arg)
3091 {
3092  printf("Sections:\n"
3093  "W... = Section is a wrapper (contains other sections, no local entries)\n"
3094  ".A.. = Section contains an array of elements of the same type\n"
3095  "..V. = Section may contain a variable number of fields with variable keys\n"
3096  "...T = Section contain a unique type\n"
3097  "FLAGS NAME/UNIQUE_NAME\n"
3098  "----\n");
3100  return 0;
3101 }
3102 
3103 static int opt_codec(void *optctx, const char *opt, const char *arg)
3104 {
3105  const char *spec = strchr(opt, ':');
3106  const char **name;
3107  if (!spec) {
3109  "No media specifier was specified for '%s' in option '%s'. Use -%s:<media_spec> "
3110  "where <media_spec> can be one of: 'a' (audio), 'v' (video), 's' (subtitle), 'd' (data)\n",
3111  arg, opt, opt);
3112  return AVERROR(EINVAL);
3113  }
3114  spec++;
3115 
3116  switch (spec[0]) {
3117  case 'a' : name = &audio_codec_name; break;
3118  case 'd' : name = &data_codec_name; break;
3119  case 's' : name = &subtitle_codec_name; break;
3120  case 'v' : name = &video_codec_name; break;
3121  default:
3123  "Invalid media specifier '%s' in option '%s'. "
3124  "Must be one of: 'a' (audio), 'v' (video), 's' (subtitle), 'd' (data)\n", spec, opt);
3125  return AVERROR(EINVAL);
3126  }
3127 
3128  av_freep(name);
3129  *name = av_strdup(arg);
3130  return *name ? 0 : AVERROR(ENOMEM);
3131 }
3132 
3133 static int opt_show_versions(void *optctx, const char *opt, const char *arg)
3134 {
3137  return 0;
3138 }
3139 
3140 #define DEFINE_OPT_SHOW_SECTION(section, target_section_id) \
3141  static int opt_show_##section(void *optctx, const char *opt, const char *arg) \
3142  { \
3143  mark_section_show_entries(SECTION_ID_##target_section_id, 1, NULL); \
3144  return 0; \
3145  }
3146 
3147 DEFINE_OPT_SHOW_SECTION(chapters, CHAPTERS)
3151 DEFINE_OPT_SHOW_SECTION(library_versions, LIBRARY_VERSIONS)
3152 DEFINE_OPT_SHOW_SECTION(packets, PACKETS)
3153 DEFINE_OPT_SHOW_SECTION(pixel_formats, PIXEL_FORMATS)
3154 DEFINE_OPT_SHOW_SECTION(program_version, PROGRAM_VERSION)
3155 DEFINE_OPT_SHOW_SECTION(streams, STREAMS)
3156 DEFINE_OPT_SHOW_SECTION(programs, PROGRAMS)
3157 DEFINE_OPT_SHOW_SECTION(stream_groups, STREAM_GROUPS)
3158 
3159 static const OptionDef real_options[] = {
3161  { "f", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_format}, "force format", "format" },
3162  { "unit", OPT_TYPE_BOOL, 0, {&show_value_unit}, "show unit of the displayed values" },
3163  { "prefix", OPT_TYPE_BOOL, 0, {&use_value_prefix}, "use SI prefixes for the displayed values" },
3164  { "byte_binary_prefix", OPT_TYPE_BOOL, 0, {&use_byte_value_binary_prefix},
3165  "use binary prefixes for byte units" },
3166  { "sexagesimal", OPT_TYPE_BOOL, 0, {&use_value_sexagesimal_format},
3167  "use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" },
3168  { "pretty", OPT_TYPE_FUNC, 0, {.func_arg = opt_pretty},
3169  "prettify the format of displayed values, make it more human readable" },
3170  { "output_format", OPT_TYPE_STRING, 0, { &output_format },
3171  "set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml)", "format" },
3172  { "print_format", OPT_TYPE_STRING, 0, { &output_format }, "alias for -output_format (deprecated)" },
3173  { "of", OPT_TYPE_STRING, 0, { &output_format }, "alias for -output_format", "format" },
3174  { "select_streams", OPT_TYPE_STRING, 0, { &stream_specifier }, "select the specified streams", "stream_specifier" },
3175  { "sections", OPT_TYPE_FUNC, OPT_EXIT, {.func_arg = opt_sections}, "print sections structure and section information, and exit" },
3176  { "data_dump_format", OPT_TYPE_STRING, 0, { &data_dump_format }, "set data dump format (available formats are: xxd, base64)" },
3177  { "show_data", OPT_TYPE_BOOL, 0, { &do_show_data }, "show packets data" },
3178  { "show_data_hash", OPT_TYPE_STRING, 0, { &show_data_hash }, "show packets data hash" },
3179  { "show_error", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_error }, "show probing error" },
3180  { "show_format", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_format }, "show format/container info" },
3181  { "show_frames", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_frames }, "show frames info" },
3182  { "show_entries", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_show_entries},
3183  "show a set of specified entries", "entry_list" },
3184 #if HAVE_THREADS
3185  { "show_log", OPT_TYPE_INT, 0, { &do_show_log }, "show log" },
3186 #endif
3187  { "show_packets", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_packets }, "show packets info" },
3188  { "show_programs", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_programs }, "show programs info" },
3189  { "show_stream_groups", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_stream_groups }, "show stream groups info" },
3190  { "show_streams", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_streams }, "show streams info" },
3191  { "show_chapters", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_chapters }, "show chapters info" },
3192  { "count_frames", OPT_TYPE_BOOL, 0, { &do_count_frames }, "count the number of frames per stream" },
3193  { "count_packets", OPT_TYPE_BOOL, 0, { &do_count_packets }, "count the number of packets per stream" },
3194  { "show_program_version", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_program_version }, "show ffprobe version" },
3195  { "show_library_versions", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_library_versions }, "show library versions" },
3196  { "show_versions", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_versions }, "show program and library versions" },
3197  { "show_pixel_formats", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_pixel_formats }, "show pixel format descriptions" },
3198  { "show_optional_fields", OPT_TYPE_FUNC, OPT_FUNC_ARG, { .func_arg = &opt_show_optional_fields }, "show optional fields" },
3199  { "show_private_data", OPT_TYPE_BOOL, 0, { &show_private_data }, "show private data" },
3200  { "private", OPT_TYPE_BOOL, 0, { &show_private_data }, "same as show_private_data" },
3201  { "analyze_frames", OPT_TYPE_BOOL, 0, { &do_analyze_frames }, "analyze frames to provide additional stream-level information" },
3202  { "bitexact", OPT_TYPE_BOOL, 0, {&do_bitexact}, "force bitexact output" },
3203  { "read_intervals", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_read_intervals}, "set read intervals", "read_intervals" },
3204  { "i", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_input_file_i}, "read specified file", "input_file"},
3205  { "o", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_output_file_o}, "write to specified output", "output_file"},
3206  { "print_filename", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_print_filename}, "override the printed input filename", "print_file"},
3207  { "find_stream_info", OPT_TYPE_BOOL, OPT_INPUT | OPT_EXPERT, { &find_stream_info },
3208  "read and decode the streams to fill missing information with heuristics" },
3209  { "c", OPT_TYPE_FUNC, OPT_FUNC_ARG, { .func_arg = opt_codec}, "force decoder", "decoder_name" },
3210  { "codec", OPT_TYPE_FUNC, OPT_FUNC_ARG, { .func_arg = opt_codec}, "alias for -c (force decoder)", "decoder_name" },
3211  { NULL, },
3212 };
3213 
3214 static inline int check_section_show_entries(int section_id)
3215 {
3216  const EntrySelection *selection = &selected_entries[section_id];
3217 
3218  if (selection->show_all_entries || selection->entries_to_show)
3219  return 1;
3220 
3221  const AVTextFormatSection *section = &sections[section_id];
3222  for (const int *id = section->children_ids; *id != -1; id++)
3223  if (check_section_show_entries(*id))
3224  return 1;
3225  return 0;
3226 }
3227 
3228 #define SET_DO_SHOW(id, varname) do { \
3229  if (check_section_show_entries(SECTION_ID_##id)) \
3230  do_show_##varname = 1; \
3231  } while (0)
3232 
3233 int main(int argc, char **argv)
3234 {
3235  const AVTextFormatter *f;
3236  AVTextFormatContext *tctx;
3237  AVTextWriterContext *wctx;
3238  char *buf;
3239  char *f_name = NULL, *f_args = NULL;
3240  int ret, input_ret;
3241  AVTextFormatDataDump data_dump_format_id;
3242 
3243  init_dynload();
3244 
3245  setvbuf(stderr, NULL, _IONBF, 0); /* win32 runtime needs this */
3246 
3248 
3250  parse_loglevel(argc, argv, options);
3252 #if CONFIG_AVDEVICE
3254 #endif
3255 
3256  show_banner(argc, argv, options);
3257  ret = parse_options(NULL, argc, argv, options, opt_input_file);
3258  if (ret < 0) {
3259  ret = (ret == AVERROR_EXIT) ? 0 : ret;
3260  goto end;
3261  }
3262 
3263  if (do_show_log)
3265 
3266  /* mark things to show, based on -show_entries */
3267  SET_DO_SHOW(CHAPTERS, chapters);
3269  SET_DO_SHOW(FORMAT, format);
3270  SET_DO_SHOW(FRAMES, frames);
3271  SET_DO_SHOW(LIBRARY_VERSIONS, library_versions);
3272  SET_DO_SHOW(PACKETS, packets);
3273  SET_DO_SHOW(PIXEL_FORMATS, pixel_formats);
3274  SET_DO_SHOW(PIXEL_FORMAT_FLAGS, pixel_format_flags);
3275  SET_DO_SHOW(PIXEL_FORMAT_COMPONENTS, pixel_format_components);
3276  SET_DO_SHOW(PROGRAM_VERSION, program_version);
3277  SET_DO_SHOW(PROGRAMS, programs);
3278  SET_DO_SHOW(STREAM_GROUP_DISPOSITION, stream_group_disposition);
3279  SET_DO_SHOW(STREAM_GROUPS, stream_groups);
3280  SET_DO_SHOW(STREAM_GROUP_COMPONENTS, stream_group_components);
3281  SET_DO_SHOW(STREAMS, streams);
3282  SET_DO_SHOW(STREAM_DISPOSITION, stream_disposition);
3283  SET_DO_SHOW(PROGRAM_STREAM_DISPOSITION, stream_disposition);
3284  SET_DO_SHOW(STREAM_GROUP_STREAM_DISPOSITION, stream_disposition);
3285 
3286  SET_DO_SHOW(CHAPTER_TAGS, chapter_tags);
3287  SET_DO_SHOW(FORMAT_TAGS, format_tags);
3288  SET_DO_SHOW(FRAME_TAGS, frame_tags);
3289  SET_DO_SHOW(PROGRAM_TAGS, program_tags);
3290  SET_DO_SHOW(STREAM_GROUP_TAGS, stream_group_tags);
3291  SET_DO_SHOW(STREAM_TAGS, stream_tags);
3292  SET_DO_SHOW(PROGRAM_STREAM_TAGS, stream_tags);
3293  SET_DO_SHOW(STREAM_GROUP_STREAM_TAGS, stream_tags);
3294  SET_DO_SHOW(PACKET_TAGS, packet_tags);
3295 
3298  "-bitexact and -show_program_version or -show_library_versions "
3299  "options are incompatible\n");
3300  ret = AVERROR(EINVAL);
3301  goto end;
3302  }
3303 
3304  if (!output_format)
3305  output_format = av_strdup("default");
3306  if (!output_format) {
3307  ret = AVERROR(ENOMEM);
3308  goto end;
3309  }
3310  f_name = av_strtok(output_format, "=", &buf);
3311  if (!f_name) {
3313  "No name specified for the output format\n");
3314  ret = AVERROR(EINVAL);
3315  goto end;
3316  }
3317  f_args = buf;
3318 
3319  f = avtext_get_formatter_by_name(f_name);
3320  if (!f) {
3321  av_log(NULL, AV_LOG_ERROR, "Unknown output format with name '%s'\n", f_name);
3322  ret = AVERROR(EINVAL);
3323  goto end;
3324  }
3325 
3326  if (data_dump_format) {
3327  if (!strcmp(data_dump_format, "xxd")) {
3328  data_dump_format_id = AV_TEXTFORMAT_DATADUMP_XXD;
3329  } else if (!strcmp(data_dump_format, "base64")) {
3330  data_dump_format_id = AV_TEXTFORMAT_DATADUMP_BASE64;
3331  } else {
3332  av_log(NULL, AV_LOG_ERROR, "Unknown data dump format with name '%s'\n", data_dump_format);
3333  ret = AVERROR(EINVAL);
3334  goto end;
3335  }
3336  }
3337 
3338  if (output_filename) {
3340  } else
3342 
3343  if (ret < 0)
3344  goto end;
3345 
3346  AVTextFormatOptions tf_options = {
3348  .show_optional_fields = show_optional_fields,
3349  .show_value_unit = show_value_unit,
3350  .use_value_prefix = use_value_prefix,
3351  .use_byte_value_binary_prefix = use_byte_value_binary_prefix,
3352  .use_value_sexagesimal_format = use_value_sexagesimal_format,
3353  .data_dump_format = data_dump_format_id,
3354  };
3355 
3356  if ((ret = avtext_context_open(&tctx, f, wctx, f_args, sections, FF_ARRAY_ELEMS(sections), tf_options, show_data_hash)) >= 0) {
3357  if (f == &avtextformatter_xml)
3359 
3361 
3368 
3369  if (!input_filename &&
3372  show_usage();
3373  av_log(NULL, AV_LOG_ERROR, "You have to specify one input file.\n");
3374  av_log(NULL, AV_LOG_ERROR, "Use -h to get full help or, even better, run 'man %s'.\n", program_name);
3375  ret = AVERROR(EINVAL);
3376  } else if (input_filename) {
3378  if (ret < 0 && do_show_error)
3379  show_error(tctx, ret);
3380  }
3381 
3382  input_ret = ret;
3383 
3385 
3387  if (ret < 0)
3388  av_log(NULL, AV_LOG_ERROR, "Writing output failed (closing writer): %s\n", av_err2str(ret));
3389 
3390  ret = avtext_context_close(&tctx);
3391  if (ret < 0)
3392  av_log(NULL, AV_LOG_ERROR, "Writing output failed (closing formatter): %s\n", av_err2str(ret));
3393 
3394  ret = FFMIN(ret, input_ret);
3395  }
3396 
3397 end:
3403 
3404  uninit_opts();
3405  for (size_t i = 0; i < FF_ARRAY_ELEMS(selected_entries); ++i)
3406  av_dict_free(&selected_entries[i].entries_to_show);
3407 
3409 
3410  return ret < 0;
3411 }
error
static void error(const char *err)
Definition: target_bsf_fuzzer.c:32
main
int main(int argc, char **argv)
Definition: ffprobe.c:3233
AVSubtitle
Definition: avcodec.h:2090
SECTION_ID_STREAM_SIDE_DATA_LIST
@ SECTION_ID_STREAM_SIDE_DATA_LIST
Definition: ffprobe.c:228
opt_format
static int opt_format(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2771
AVHDRVividColorTransformParams::maximum_maxrgb
AVRational maximum_maxrgb
Indicates the maximum brightness of the displayed content.
Definition: hdr_dynamic_vivid_metadata.h:206
clear_log
static void clear_log(int need_lock)
Definition: ffprobe.c:1213
iamf.h
AVHDRPlusColorTransformParams::average_maxrgb
AVRational average_maxrgb
The average of linearized maxRGB values in the processing window in the scene.
Definition: hdr_dynamic_metadata.h:164
mark_section_show_entries
static void mark_section_show_entries(SectionID section_id, int show_all_entries, AVDictionary *entries)
Definition: ffprobe.c:2781
AV_PKT_DATA_DISPLAYMATRIX
@ AV_PKT_DATA_DISPLAYMATRIX
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
Definition: packet.h:105
RGB
Definition: cms.c:66
av_packet_unref
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Definition: packet.c:432
OPT_EXIT
#define OPT_EXIT
Definition: cmdutils.h:207
show_help_options
void show_help_options(const OptionDef *options, const char *msg, int req_flags, int rej_flags)
Print help for all options matching specified flags.
Definition: cmdutils.c:107
AVCodec
AVCodec.
Definition: codec.h:172
av_pix_fmt_swap_endianness
enum AVPixelFormat av_pix_fmt_swap_endianness(enum AVPixelFormat pix_fmt)
Utility function to swap the endianness of a pixel format.
Definition: pixdesc.c:3511
AVMEDIA_TYPE_SUBTITLE
@ AVMEDIA_TYPE_SUBTITLE
Definition: avutil.h:203
AVIAMFSubmix::elements
AVIAMFSubmixElement ** elements
Array of submix elements.
Definition: iamf.h:568
AV_LOG_WARNING
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:216
AVIAMFAudioElement::nb_layers
unsigned int nb_layers
Number of layers, or channel groups, in the Audio Element.
Definition: iamf.h:371
AV_BPRINT_SIZE_UNLIMITED
#define AV_BPRINT_SIZE_UNLIMITED
AV_TIMECODE_STR_SIZE
#define AV_TIMECODE_STR_SIZE
Definition: timecode.h:33
AVDOVIDataMapping::nlq_method_idc
enum AVDOVINLQMethod nlq_method_idc
Definition: dovi_meta.h:159
use_byte_value_binary_prefix
static int use_byte_value_binary_prefix
Definition: ffprobe.c:130
av_mime_codec_str
int av_mime_codec_str(const AVCodecParameters *par, AVRational frame_rate, struct AVBPrint *out)
Make a RFC 4281/6381 like string describing a codec for MIME types.
Definition: codecstring.c:224
AVCodecParameters::extradata
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
Definition: codec_par.h:69
avtextwriter_create_stdout
int avtextwriter_create_stdout(AVTextWriterContext **pwctx)
Definition: tw_stdout.c:71
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
AVFormatContext::stream_groups
AVStreamGroup ** stream_groups
A list of all stream groups in the file.
Definition: avformat.h:1351
name
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
Definition: writing_filters.txt:88
entry
#define entry
Definition: aom_film_grain_template.c:66
AVHDRVividColorToneMappingParams::base_param_k2
int base_param_k2
indicates k2_0 in the base parameter, base_param_k2 <= 1: k2_0 = base_param_k2 base_param_k2 > 1: res...
Definition: hdr_dynamic_vivid_metadata.h:137
level
uint8_t level
Definition: svq3.c:208
do_show_log
static int do_show_log
Definition: ffprobe.c:118
AVStreamGroup::id
int64_t id
Group type-specific group ID.
Definition: avformat.h:1117
program
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C program
Definition: undefined.txt:6
InputFile::fmt_ctx
AVFormatContext * fmt_ctx
Definition: ffprobe.c:86
dec_ctx
static AVCodecContext * dec_ctx
Definition: decode_filter_audio.c:45
SECTION_ID_STREAM_SIDE_DATA
@ SECTION_ID_STREAM_SIDE_DATA
Definition: ffprobe.c:229
AVIAMFSubmix::layouts
AVIAMFSubmixLayout ** layouts
Array of submix layouts.
Definition: iamf.h:583
do_show_frame_tags
static int do_show_frame_tags
Definition: ffprobe.c:122
AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT
@ AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT
Ambient viewing environment metadata, as defined by H.274.
Definition: packet.h:327
mix
static int mix(int c0, int c1)
Definition: 4xm.c:717
PLANAR
#define PLANAR
Definition: flacdsp.c:42
AVChapter::metadata
AVDictionary * metadata
Definition: avformat.h:1227
r
const char * r
Definition: vf_curves.c:127
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
opt_show_optional_fields
static int opt_show_optional_fields(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2754
printf
__device__ int printf(const char *,...)
opt.h
FrameData::pkt_pos
int64_t pkt_pos
Definition: ffplay.c:149
read_intervals_nb
static int read_intervals_nb
Definition: ffprobe.c:158
opt_output_file_o
static int opt_output_file_o(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2888
AVCodecParameters::codec_type
enum AVMediaType codec_type
General type of the encoded data.
Definition: codec_par.h:51
AVStreamGroup::tile_grid
struct AVStreamGroupTileGrid * tile_grid
Definition: avformat.h:1133
AVFMT_SHOW_IDS
#define AVFMT_SHOW_IDS
Show format stream IDs numbers.
Definition: avformat.h:476
AVSphericalMapping::projection
enum AVSphericalProjection projection
Projection type.
Definition: spherical.h:104
ReadInterval::end_is_offset
int end_is_offset
Definition: ffprobe.c:153
EntrySelection::show_all_entries
int show_all_entries
Definition: ffprobe.c:329
LogBuffer::log_message
char * log_message
Definition: ffprobe.c:360
AVColorTransferCharacteristic
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition: pixfmt.h:666
libm.h
FrameData
Definition: ffmpeg.h:720
AVHDRVividColorToneMappingParams::base_param_Delta
AVRational base_param_Delta
base_param_Delta in the base parameter, in multiples of 1.0/127.
Definition: hdr_dynamic_vivid_metadata.h:157
AVFilmGrainParams::bit_depth_luma
int bit_depth_luma
Intended bit depth, or 0 for unknown/unspecified.
Definition: film_grain_params.h:238
AVHDRVividColorToneMappingParams::base_enable_flag
int base_enable_flag
This flag indicates that transfer the base parameter(for value of 1)
Definition: hdr_dynamic_vivid_metadata.h:88
print_str
#define print_str(k, v)
Definition: ffprobe.c:447
LogBuffer::context_name
char * context_name
Definition: ffprobe.c:358
color
Definition: vf_paletteuse.c:513
av_bprint_init
void av_bprint_init(AVBPrint *buf, unsigned size_init, unsigned size_max)
Definition: bprint.c:69
AVHDRPlusColorTransformParams::rotation_angle
uint8_t rotation_angle
The clockwise rotation angle in degree of arc with respect to the positive direction of the x-axis of...
Definition: hdr_dynamic_metadata.h:118
comp
static void comp(unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t src_stride, int add)
Definition: eamad.c:79
print_val
#define print_val(k, v, u)
Definition: ffprobe.c:454
AV_PKT_DATA_FRAME_CROPPING
@ AV_PKT_DATA_FRAME_CROPPING
The number of pixels to discard from the top/bottom/left/right border of the decoded frame to obtain ...
Definition: packet.h:340
SECTION_ID_PACKET_SIDE_DATA_LIST
@ SECTION_ID_PACKET_SIDE_DATA_LIST
Definition: ffprobe.c:190
AVFormatContext::nb_chapters
unsigned int nb_chapters
Number of chapters in AVChapter array.
Definition: avformat.h:1364
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition: codec_par.h:47
AVHDRPlusPercentile::percentile
AVRational percentile
The linearized maxRGB value at a specific percentile in the processing window in the scene.
Definition: hdr_dynamic_metadata.h:52
AVCodec::priv_class
const AVClass * priv_class
AVClass for the private context.
Definition: codec.h:206
AVAmbientViewingEnvironment
Ambient viewing environment metadata as defined by H.274.
Definition: ambient_viewing_environment.h:36
AVCodecParameters::color_space
enum AVColorSpace color_space
Definition: codec_par.h:169
AVIAMFAudioElement::default_w
unsigned int default_w
Default weight value as defined in section 3.6 of IAMF.
Definition: iamf.h:396
thread.h
AVERROR_EOF
#define AVERROR_EOF
End of file.
Definition: error.h:57
AVBufferRef::data
uint8_t * data
The data buffer.
Definition: buffer.h:90
AVStreamGroupTileGrid::horizontal_offset
int horizontal_offset
Offset in pixels from the left edge of the canvas where the actual image meant for presentation start...
Definition: avformat.h:1018
AVIAMFAudioElement::layers
AVIAMFLayer ** layers
Definition: iamf.h:362
AV_FRAME_DATA_A53_CC
@ AV_FRAME_DATA_A53_CC
ATSC A53 Part 4 Closed Captions.
Definition: frame.h:59
AVStream::discard
enum AVDiscard discard
Selects which packets can be discarded at will and do not need to be demuxed.
Definition: avformat.h:815
AV_FIELD_PROGRESSIVE
@ AV_FIELD_PROGRESSIVE
Definition: defs.h:213
process_frame
static av_always_inline int process_frame(AVTextFormatContext *tfc, InputFile *ifile, AVFrame *frame, const AVPacket *pkt, int *packet_new)
Definition: ffprobe.c:1496
AV_PKT_DATA_MASTERING_DISPLAY_METADATA
@ AV_PKT_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata (based on SMPTE-2086:2014).
Definition: packet.h:219
AVCodecDescriptor::long_name
const char * long_name
A more descriptive name for this codec.
Definition: codec_desc.h:50
AV_DOVI_COMPRESSION_LIMITED
@ AV_DOVI_COMPRESSION_LIMITED
Definition: dovi_meta.h:69
matrix
Definition: vc1dsp.c:43
AV_PKT_FLAG_DISCARD
#define AV_PKT_FLAG_DISCARD
Flag is used to discard packets which are required to maintain valid decoder state but are not requir...
Definition: packet.h:650
version.h
AVHDRVividColorToneMappingParams::three_Spline_num
int three_Spline_num
The number of three Spline.
Definition: hdr_dynamic_vivid_metadata.h:169
AV_FRAME_DATA_DOVI_METADATA
@ AV_FRAME_DATA_DOVI_METADATA
Parsed Dolby Vision metadata, suitable for passing to a software implementation.
Definition: frame.h:208
AV_TIME_BASE_Q
#define AV_TIME_BASE_Q
Internal time base represented as fractional value.
Definition: avutil.h:263
AVCodecDescriptor::name
const char * name
Name of the codec described by this descriptor.
Definition: codec_desc.h:46
int64_t
long long int64_t
Definition: coverity.c:34
av_alpha_mode_name
const char * av_alpha_mode_name(enum AVAlphaMode mode)
Definition: pixdesc.c:3921
selected_streams
static int * selected_streams
Definition: ffprobe.c:351
SECTION_ID_PROGRAM_TAGS
@ SECTION_ID_PROGRAM_TAGS
Definition: ffprobe.c:202
AVSubtitle::num_rects
unsigned num_rects
Definition: avcodec.h:2094
EntrySelection
Definition: ffprobe.c:328
AVFilmGrainAOMParams::uv_points
uint8_t uv_points[2][10][2]
Definition: film_grain_params.h:63
av_strcasecmp
int av_strcasecmp(const char *a, const char *b)
Locale-independent case-insensitive compare.
Definition: avstring.c:208
AV_FRAME_DATA_FILM_GRAIN_PARAMS
@ AV_FRAME_DATA_FILM_GRAIN_PARAMS
Film grain parameters for a frame, described by AVFilmGrainParams.
Definition: frame.h:188
AVHDRPlusColorTransformParams::semimajor_axis_external_ellipse
uint16_t semimajor_axis_external_ellipse
The semi-major axis value of the external ellipse of the elliptical pixel selector in amount of pixel...
Definition: hdr_dynamic_metadata.h:134
AVFilmGrainH274Params::blending_mode_id
int blending_mode_id
Specifies the blending mode used to blend the simulated film grain with the decoded images.
Definition: film_grain_params.h:145
AVIAMFMixPresentation::nb_submixes
unsigned int nb_submixes
Number of submixes in the presentation.
Definition: iamf.h:632
avformat_get_class
const AVClass * avformat_get_class(void)
Get the AVClass for AVFormatContext.
Definition: options.c:191
AVStreamGroup::disposition
int disposition
Stream group disposition - a combination of AV_DISPOSITION_* flags.
Definition: avformat.h:1175
ALPHA
@ ALPHA
Definition: drawutils.c:33
AV_FRAME_DATA_S12M_TIMECODE
@ AV_FRAME_DATA_S12M_TIMECODE
Timecode which conforms to SMPTE ST 12-1.
Definition: frame.h:152
AVHDRVividColorTransformParams::tone_mapping_param_num
int tone_mapping_param_num
The number of tone mapping param.
Definition: hdr_dynamic_vivid_metadata.h:218
AVHDRPlusColorTransformParams
Color transform parameters at a processing window in a dynamic metadata for SMPTE 2094-40.
Definition: hdr_dynamic_metadata.h:59
AV_RN16
#define AV_RN16(p)
Definition: intreadwrite.h:356
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:64
AVFilmGrainParams::aom
AVFilmGrainAOMParams aom
Definition: film_grain_params.h:247
print_ts
#define print_ts(k, v)
Definition: ffprobe.c:451
opt_input_file_i
static int opt_input_file_i(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2882
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:427
pixdesc.h
AVFormatContext::streams
AVStream ** streams
A list of all streams in the file.
Definition: avformat.h:1332
AVPacketSideData
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
Definition: packet.h:409
OPT_INPUT
#define OPT_INPUT
Definition: cmdutils.h:237
AVHDRVividColorTransformParams::variance_maxrgb
AVRational variance_maxrgb
Indicates the variance brightness of the displayed content.
Definition: hdr_dynamic_vivid_metadata.h:199
av_disposition_to_string
const char * av_disposition_to_string(int disposition)
Definition: options.c:547
SECTION_ID_STREAM_GROUP_COMPONENTS
@ SECTION_ID_STREAM_GROUP_COMPONENTS
Definition: ffprobe.c:208
AVDOVIReshapingCurve::mmr_coef
int64_t mmr_coef[AV_DOVI_MAX_PIECES][3][7]
Definition: dovi_meta.h:127
SECTION_ID_FRAME_SIDE_DATA_COMPONENT
@ SECTION_ID_FRAME_SIDE_DATA_COMPONENT
Definition: ffprobe.c:179
AVIAMFParamDefinition::type
enum AVIAMFParamDefinitionType type
Parameters type.
Definition: iamf.h:213
parse_number
int parse_number(const char *context, const char *numstr, enum OptionType type, double min, double max, double *dst)
Parse a string and return its corresponding value as a double.
Definition: cmdutils.c:84
print_context_light_level
static void print_context_light_level(AVTextFormatContext *tfc, const AVContentLightMetadata *metadata)
Definition: ffprobe.c:536
SECTION_ID_PIXEL_FORMAT_COMPONENTS
@ SECTION_ID_PIXEL_FORMAT_COMPONENTS
Definition: ffprobe.c:195
AVPacket::data
uint8_t * data
Definition: packet.h:588
ReadInterval::duration_frames
int duration_frames
Definition: ffprobe.c:154
AVComponentDescriptor::depth
int depth
Number of bits in the component.
Definition: pixdesc.h:57
av_spherical_tile_bounds
void av_spherical_tile_bounds(const AVSphericalMapping *map, size_t width, size_t height, size_t *left, size_t *top, size_t *right, size_t *bottom)
Convert the bounding fields from an AVSphericalVideo from 0.32 fixed point to pixels.
Definition: spherical.c:40
AVPixFmtDescriptor::name
const char * name
Definition: pixdesc.h:70
AVAmbientViewingEnvironment::ambient_light_x
AVRational ambient_light_x
Normalized x chromaticity coordinate of the environmental ambient light in the nominal viewing enviro...
Definition: ambient_viewing_environment.h:47
AVHDRVivid3SplineParams::enable_strength
AVRational enable_strength
3Spline_enable_Strength of three Spline.
Definition: hdr_dynamic_vivid_metadata.h:70
AVOption
AVOption.
Definition: opt.h:429
b
#define b
Definition: input.c:42
AVCOL_TRC_UNSPECIFIED
@ AVCOL_TRC_UNSPECIFIED
Definition: pixfmt.h:669
SECTION_ID_STREAM
@ SECTION_ID_STREAM
Definition: ffprobe.c:224
SECTION_ID_PIXEL_FORMAT_FLAGS
@ SECTION_ID_PIXEL_FORMAT_FLAGS
Definition: ffprobe.c:193
LogBuffer
Definition: ffprobe.c:357
AVStream::avg_frame_rate
AVRational avg_frame_rate
Average framerate.
Definition: avformat.h:833
AVStreamGroupTileGrid::vertical_offset
int vertical_offset
Offset in pixels from the top edge of the canvas where the actual image meant for presentation starts...
Definition: avformat.h:1025
spherical.h
AVChapter::start
int64_t start
Definition: avformat.h:1226
data
const char data[16]
Definition: mxf.c:149
AVTextWriterContext
Definition: avtextwriters.h:42
av_pix_fmt_desc_next
const AVPixFmtDescriptor * av_pix_fmt_desc_next(const AVPixFmtDescriptor *prev)
Iterate over all pixel format descriptors known to libavutil.
Definition: pixdesc.c:3463
avtextformat.h
format_opts
AVDictionary * format_opts
Definition: cmdutils.c:58
AV_DOVI_NLQ_NONE
@ AV_DOVI_NLQ_NONE
Definition: dovi_meta.h:131
AVTextFormatContext
Definition: avtextformat.h:133
AVFilmGrainParams::color_space
enum AVColorSpace color_space
Definition: film_grain_params.h:233
do_show_stream_tags
static int do_show_stream_tags
Definition: ffprobe.c:125
AVDOVIReshapingCurve::mapping_idc
enum AVDOVIMappingMethod mapping_idc[AV_DOVI_MAX_PIECES]
Definition: dovi_meta.h:120
SECTION_ID_PIXEL_FORMAT
@ SECTION_ID_PIXEL_FORMAT
Definition: ffprobe.c:192
version.h
AVHDRPlusColorTransformParams::tone_mapping_flag
uint8_t tone_mapping_flag
This flag indicates that the metadata for the tone mapping function in the processing window is prese...
Definition: hdr_dynamic_metadata.h:189
streams_with_closed_captions
static int * streams_with_closed_captions
Definition: ffprobe.c:352
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:226
SECTION_ID_PROGRAM_STREAM
@ SECTION_ID_PROGRAM_STREAM
Definition: ffprobe.c:201
category
category
Definition: openal-dec.c:249
AVFormatContext::programs
AVProgram ** programs
Definition: avformat.h:1462
video_codec_name
static const char * video_codec_name
Definition: ffprobe.c:137
SECTION_ID_FORMAT
@ SECTION_ID_FORMAT
Definition: ffprobe.c:169
show_help_children
void show_help_children(const AVClass *class, int flags)
Show help for all options with given flags in class and all its children.
Definition: cmdutils.c:140
AVIAMFParamDefinition
Parameters as defined in section 3.6.1 of IAMF.
Definition: iamf.h:193
AVOption::flags
int flags
A combination of AV_OPT_FLAG_*.
Definition: opt.h:472
show_subtitle
static void show_subtitle(AVTextFormatContext *tfc, AVSubtitle *sub, AVStream *stream, AVFormatContext *fmt_ctx)
Definition: ffprobe.c:1321
AV_FRAME_DATA_DISPLAYMATRIX
@ AV_FRAME_DATA_DISPLAYMATRIX
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
Definition: frame.h:85
av_get_bits_per_pixel
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
Definition: pixdesc.c:3408
AVPacket::duration
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: packet.h:606
SECTION_ID_STREAM_GROUP_SUBCOMPONENT
@ SECTION_ID_STREAM_GROUP_SUBCOMPONENT
Definition: ffprobe.c:211
AVCodecParameters::codec_tag
uint32_t codec_tag
Additional information about the codec (corresponds to the AVI FOURCC).
Definition: codec_par.h:59
AV_SPHERICAL_EQUIRECTANGULAR_TILE
@ AV_SPHERICAL_EQUIRECTANGULAR_TILE
Video represents a portion of a sphere mapped on a flat surface using equirectangular projection.
Definition: spherical.h:68
check_section_show_entries
static int check_section_show_entries(int section_id)
Definition: ffprobe.c:3214
AVStereo3D::baseline
uint32_t baseline
The distance between the centres of the lenses of the camera system, in micrometers.
Definition: stereo3d.h:228
print_section
static void print_section(SectionID id, int level)
Definition: ffprobe.c:3072
AVIAMFSubmixElement::default_mix_gain
AVRational default_mix_gain
Default mix gain value to apply when there are no AVIAMFParamDefinition with element_mix_config's par...
Definition: iamf.h:472
AVHDRVivid3SplineParams::th_mode
int th_mode
The mode of three Spline.
Definition: hdr_dynamic_vivid_metadata.h:35
AVHDRPlusColorTransformParams::distribution_maxrgb
AVHDRPlusPercentile distribution_maxrgb[15]
The linearized maxRGB values at given percentiles in the processing window in the scene.
Definition: hdr_dynamic_metadata.h:176
AVDictionary
Definition: dict.c:32
AVChannelLayout::order
enum AVChannelOrder order
Channel order used in this layout.
Definition: channel_layout.h:324
AVColorPrimaries
AVColorPrimaries
Chromaticity coordinates of the source primaries.
Definition: pixfmt.h:636
AVStreamGroupTileGrid::vertical
int vertical
Offset in pixels from the top edge of the canvas where the tile should be placed.
Definition: avformat.h:1000
SECTION_ID_STREAM_GROUP_BLOCKS
@ SECTION_ID_STREAM_GROUP_BLOCKS
Definition: ffprobe.c:216
AVDOVIRpuDataHeader::rpu_format
uint16_t rpu_format
Definition: dovi_meta.h:89
avcodec_profile_name
const char * avcodec_profile_name(enum AVCodecID codec_id, int profile)
Return a name for the specified profile, if available.
Definition: utils.c:439
get_decoder_by_name
static int get_decoder_by_name(const char *codec_name, const AVCodec **codec)
Definition: ffprobe.c:2366
do_show_stream_group_components
static int do_show_stream_group_components
Definition: ffprobe.c:108
av_read_frame
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
Definition: demux.c:1583
AVDOVIDataMapping::mapping_color_space
uint8_t mapping_color_space
Definition: dovi_meta.h:154
AVDOVIRpuDataHeader
Dolby Vision RPU data header.
Definition: dovi_meta.h:87
AVHDRPlusColorTransformParams::knee_point_x
AVRational knee_point_x
The x coordinate of the separation point between the linear part and the curved part of the tone mapp...
Definition: hdr_dynamic_metadata.h:196
output_filename
static const char * output_filename
Definition: ffprobe.c:341
AVHDRVividColorTransformParams::color_saturation_num
int color_saturation_num
The number of color saturation param.
Definition: hdr_dynamic_vivid_metadata.h:235
AVChannelLayout::nb_channels
int nb_channels
Number of channels in this layout.
Definition: channel_layout.h:329
print_frame_side_data
static void print_frame_side_data(AVTextFormatContext *tfc, const AVFrame *frame, const AVStream *stream)
Definition: ffprobe.c:1344
AV_RL8
#define AV_RL8(x)
Definition: intreadwrite.h:394
avio_size
int64_t avio_size(AVIOContext *s)
Get the filesize.
Definition: aviobuf.c:326
print_dispositions
static void print_dispositions(AVTextFormatContext *tfc, uint32_t disposition, SectionID section_id)
Definition: ffprobe.c:1738
ffprobe_show_pixel_formats
static void ffprobe_show_pixel_formats(AVTextFormatContext *tfc)
Definition: ffprobe.c:2708
AV_PKT_FLAG_KEY
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
Definition: packet.h:643
AVFilmGrainParams::color_trc
enum AVColorTransferCharacteristic color_trc
Definition: film_grain_params.h:232
do_show_format_tags
static int do_show_format_tags
Definition: ffprobe.c:121
av_packet_free
void av_packet_free(AVPacket **pkt)
Free the packet, if the packet is reference counted, it will be unreferenced first.
Definition: packet.c:74
AVFilmGrainParams::seed
uint64_t seed
Seed to use for the synthesis process, if the codec allows for it.
Definition: film_grain_params.h:213
av_chroma_location_name
const char * av_chroma_location_name(enum AVChromaLocation location)
Definition: pixdesc.c:3877
AVTextFormatDataDump
AVTextFormatDataDump
Definition: avtextformat.h:92
hdr_dynamic_vivid_metadata.h
do_show_frames
static int do_show_frames
Definition: ffprobe.c:104
OptionDef
Definition: cmdutils.h:195
AV_FIELD_BT
@ AV_FIELD_BT
Bottom coded first, top displayed first.
Definition: defs.h:217
AVInputFormat::long_name
const char * long_name
Descriptive name for the format, meant to be more human-readable than name.
Definition: avformat.h:556
AV_FRAME_FLAG_TOP_FIELD_FIRST
#define AV_FRAME_FLAG_TOP_FIELD_FIRST
A flag to mark frames where the top field is displayed first if the content is interlaced.
Definition: frame.h:655
SECTION_ID_FRAME_TAGS
@ SECTION_ID_FRAME_TAGS
Definition: ffprobe.c:173
print_chroma_location
static void print_chroma_location(AVTextFormatContext *tfc, enum AVChromaLocation chroma_location)
Definition: ffprobe.c:1193
ReadInterval::id
int id
identifier
Definition: ffprobe.c:150
AVTextFormatSection::id
int id
unique id identifying a section
Definition: avtextformat.h:42
ff_mutex_unlock
static int ff_mutex_unlock(AVMutex *mutex)
Definition: thread.h:189
AVContentLightMetadata
Content light level needed by to transmit HDR over HDMI (CTA-861.3).
Definition: mastering_display_metadata.h:107
AV_PKT_DATA_DOVI_CONF
@ AV_PKT_DATA_DOVI_CONF
DOVI configuration ref: dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2....
Definition: packet.h:280
AVDOVIRpuDataHeader::coef_data_type
uint8_t coef_data_type
Definition: dovi_meta.h:93
do_show_library_versions
static int do_show_library_versions
Definition: ffprobe.c:114
AVStereo3D::horizontal_field_of_view
AVRational horizontal_field_of_view
Horizontal field of view, in degrees.
Definition: stereo3d.h:239
AVCodecParameters::color_primaries
enum AVColorPrimaries color_primaries
Definition: codec_par.h:167
InputStream
Definition: ffmpeg.h:481
AVTextFormatContext::level
int level
current level, starting from 0
Definition: avtextformat.h:144
avformat_close_input
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
Definition: demux.c:377
AVPacketSideData::size
size_t size
Definition: packet.h:411
match_section
static int match_section(const char *section_name, int show_all_entries, AVDictionary *entries)
Definition: ffprobe.c:2796
AVHDRPlusColorTransformParams::color_saturation_mapping_flag
uint8_t color_saturation_mapping_flag
This flag shall be equal to 0 in bitstreams conforming to this version of this Specification.
Definition: hdr_dynamic_metadata.h:222
AVTextFormatSection::name
const char * name
Definition: avtextformat.h:43
unit_hertz_str
static const char unit_hertz_str[]
Definition: ffprobe.c:344
AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES
#define AV_UTF8_FLAG_EXCLUDE_XML_INVALID_CONTROL_CODES
exclude control codes not accepted by XML
Definition: avstring.h:374
subtitle_codec_name
static const char * subtitle_codec_name
Definition: ffprobe.c:136
AV_FIELD_TT
@ AV_FIELD_TT
Top coded_first, top displayed first.
Definition: defs.h:214
SHOW_OPTIONAL_FIELDS_NEVER
#define SHOW_OPTIONAL_FIELDS_NEVER
Definition: ffprobe.c:140
SECTION_ID_STREAMS
@ SECTION_ID_STREAMS
Definition: ffprobe.c:226
print_color_space
static void print_color_space(AVTextFormatContext *tfc, enum AVColorSpace color_space)
Definition: ffprobe.c:1163
AVHDRVividColorToneMappingParams::three_Spline_enable_flag
int three_Spline_enable_flag
indicates 3Spline_enable_flag in the base parameter, This flag indicates that transfer three Spline o...
Definition: hdr_dynamic_vivid_metadata.h:163
show_optional_fields
static int show_optional_fields
Definition: ffprobe.c:142
av_color_space_name
const char * av_color_space_name(enum AVColorSpace space)
Definition: pixdesc.c:3856
SECTION_ID_STREAM_GROUP
@ SECTION_ID_STREAM_GROUP
Definition: ffprobe.c:207
AVHDRPlusColorTransformParams::center_of_ellipse_x
uint16_t center_of_ellipse_x
The x coordinate of the center position of the concentric internal and external ellipses of the ellip...
Definition: hdr_dynamic_metadata.h:102
opt_pretty
static int opt_pretty(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:3063
AVCodecContext::codec
const struct AVCodec * codec
Definition: avcodec.h:448
ffprobe_show_program_version
static void ffprobe_show_program_version(AVTextFormatContext *tfc)
Definition: ffprobe.c:2659
AVPacket::opaque_ref
AVBufferRef * opaque_ref
AVBufferRef for free use by the API user.
Definition: packet.h:624
AVStreamGroup::params
union AVStreamGroup::@430 params
Group type-specific parameters.
AVHDRVividColorTransformParams::tm_params
AVHDRVividColorToneMappingParams tm_params[2]
The color tone mapping parameters.
Definition: hdr_dynamic_vivid_metadata.h:223
show_format
static int show_format(AVTextFormatContext *tfc, InputFile *ifile)
Definition: ffprobe.c:2327
AV_DOVI_COMPRESSION_EXTENDED
@ AV_DOVI_COMPRESSION_EXTENDED
Definition: dovi_meta.h:71
LogBuffer::log_level
int log_level
Definition: ffprobe.c:359
AVStreamGroupTileGrid
AVStreamGroupTileGrid holds information on how to combine several independent images on a single canv...
Definition: avformat.h:951
AVFilmGrainAOMParams::grain_scale_shift
int grain_scale_shift
Signals the down shift applied to the generated gaussian numbers during synthesis.
Definition: film_grain_params.h:99
AV_TEXTFORMAT_SECTION_FLAG_NUMBERING_BY_TYPE
#define AV_TEXTFORMAT_SECTION_FLAG_NUMBERING_BY_TYPE
the items in this array section should be numbered individually by type
Definition: avtextformat.h:50
AVDOVIRpuDataHeader::el_bit_depth
uint8_t el_bit_depth
Definition: dovi_meta.h:98
AVHDRVivid3SplineParams::th_delta1
AVRational th_delta1
3Spline_TH_Delta1 of three Spline.
Definition: hdr_dynamic_vivid_metadata.h:56
frames
if it could not because there are no more frames
Definition: filter_design.txt:267
timecode.h
AV_TEXTFORMAT_DATADUMP_BASE64
@ AV_TEXTFORMAT_DATADUMP_BASE64
Definition: avtextformat.h:94
AVIAMFSubmixLayout
Submix layout as defined in section 3.7.6 of IAMF.
Definition: iamf.h:517
avformat_stream_group_name
const char * avformat_stream_group_name(enum AVStreamGroupParamsType type)
Definition: avformat.c:259
AVDOVIDecoderConfigurationRecord::dv_md_compression
uint8_t dv_md_compression
Definition: dovi_meta.h:64
AVStreamGroupTileGrid::coded_width
int coded_width
Width of the canvas.
Definition: avformat.h:966
AVCodecContext::refs
int refs
number of reference frames
Definition: avcodec.h:697
AVERROR_OPTION_NOT_FOUND
#define AVERROR_OPTION_NOT_FOUND
Option not found.
Definition: error.h:63
AV_BPRINT_SIZE_AUTOMATIC
#define AV_BPRINT_SIZE_AUTOMATIC
AVChapter
Definition: avformat.h:1223
val
static double val(void *priv, double ch)
Definition: aeval.c:77
show_help_default
void show_help_default(const char *opt, const char *arg)
Per-fftool specific help handler.
Definition: ffprobe.c:2912
AVStreamGroupTileGrid::coded_height
int coded_height
Width of the canvas.
Definition: avformat.h:972
pts
static int64_t pts
Definition: transcode_aac.c:644
SECTION_ID_FRAME_SIDE_DATA_PIECE
@ SECTION_ID_FRAME_SIDE_DATA_PIECE
Definition: ffprobe.c:181
AVCodecContext::coded_height
int coded_height
Definition: avcodec.h:615
AVFilmGrainAOMParams::limit_output_range
int limit_output_range
Signals to clip to limited color levels after film grain application.
Definition: film_grain_params.h:122
AVStream::duration
int64_t duration
Decoding: duration of the stream, in stream time base.
Definition: avformat.h:803
AVAmbientViewingEnvironment::ambient_illuminance
AVRational ambient_illuminance
Environmental illuminance of the ambient viewing environment in lux.
Definition: ambient_viewing_environment.h:40
input_filename
static const char * input_filename
Definition: ffprobe.c:338
print_private_data
static void print_private_data(AVTextFormatContext *tfc, void *priv_data)
Definition: ffprobe.c:1115
print_duration_ts
#define print_duration_ts(k, v)
Definition: ffprobe.c:453
AVFilmGrainAOMParams::num_y_points
int num_y_points
Number of points, and the scale and value for each point of the piecewise linear scaling function for...
Definition: film_grain_params.h:49
AVIAMFAudioElement::audio_element_type
enum AVIAMFAudioElementType audio_element_type
Audio element type as defined in section 3.6 of IAMF.
Definition: iamf.h:391
av_reduce
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
Definition: rational.c:35
streams_with_film_grain
static int * streams_with_film_grain
Definition: ffprobe.c:353
AVIAMFReconGain
Recon Gain Info Parameter Data as defined in section 3.8.3 of IAMF.
Definition: iamf.h:148
AVRational::num
int num
Numerator.
Definition: rational.h:59
avformat_network_init
int avformat_network_init(void)
Do global initialization of network libraries.
Definition: utils.c:561
AV_FIELD_TB
@ AV_FIELD_TB
Top coded first, bottom displayed first.
Definition: defs.h:216
InputFile
Definition: ffmpeg.h:527
AVHDRPlusColorTransformParams::knee_point_y
AVRational knee_point_y
The y coordinate of the separation point between the linear part and the curved part of the tone mapp...
Definition: hdr_dynamic_metadata.h:203
AVDOVIRpuDataHeader::vdr_rpu_normalized_idc
uint8_t vdr_rpu_normalized_idc
Definition: dovi_meta.h:95
AVDOVIRpuDataHeader::el_spatial_resampling_filter_flag
uint8_t el_spatial_resampling_filter_flag
Definition: dovi_meta.h:101
do_read_packets
static int do_read_packets
Definition: ffprobe.c:100
AVFilmGrainAOMParams
This structure describes how to handle film grain synthesis for AOM codecs.
Definition: film_grain_params.h:44
AVHDRPlusColorTransformParams::num_bezier_curve_anchors
uint8_t num_bezier_curve_anchors
The number of the intermediate anchor parameters of the tone mapping function in the processing windo...
Definition: hdr_dynamic_metadata.h:209
av_stereo3d_view_name
const char * av_stereo3d_view_name(unsigned int view)
Provide a human-readable name of a given stereo3d view.
Definition: stereo3d.c:113
opt_read_intervals
static int opt_read_intervals(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:3058
AVFilmGrainH274Params::intensity_interval_upper_bound
uint8_t intensity_interval_upper_bound[3][256]
Specifies the upper bound of each intensity interval for which the set of model values applies for th...
Definition: film_grain_params.h:179
avsubtitle_free
void avsubtitle_free(AVSubtitle *sub)
Free all allocated data in the given subtitle struct.
Definition: avcodec.c:413
AV_PKT_DATA_WEBVTT_SETTINGS
@ AV_PKT_DATA_WEBVTT_SETTINGS
The optional settings (rendering instructions) that immediately follow the timestamp specifier of a W...
Definition: packet.h:199
AV_IAMF_PARAMETER_DEFINITION_RECON_GAIN
@ AV_IAMF_PARAMETER_DEFINITION_RECON_GAIN
Subblocks are of struct type AVIAMFReconGain.
Definition: iamf.h:181
close_input_file
static void close_input_file(InputFile *ifile)
Definition: ffprobe.c:2543
av_frame_alloc
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
Definition: frame.c:52
parse_read_intervals
static int parse_read_intervals(const char *intervals_spec)
Definition: ffprobe.c:3010
AVFormatContext::bit_rate
int64_t bit_rate
Total stream bitrate in bit/s, 0 if not available.
Definition: avformat.h:1406
av_get_bits_per_sample
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
Definition: utils.c:549
AVCodecParameters::color_trc
enum AVColorTransferCharacteristic color_trc
Definition: codec_par.h:168
avcodec_decode_subtitle2
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub, int *got_sub_ptr, const AVPacket *avpkt)
Decode a subtitle message.
Definition: decode.c:914
show_error
static void show_error(AVTextFormatContext *tfc, int err)
Definition: ffprobe.c:2358
AVIAMFSubmixElement::annotations
AVDictionary * annotations
A dictionary of strings describing the submix in different languages.
Definition: iamf.h:493
AVTextFormatSection::flags
int flags
Definition: avtextformat.h:56
AVFilmGrainParams::bit_depth_chroma
int bit_depth_chroma
Definition: film_grain_params.h:239
avassert.h
do_show_error
static int do_show_error
Definition: ffprobe.c:102
show_frame
static void show_frame(AVTextFormatContext *tfc, AVFrame *frame, AVStream *stream, AVFormatContext *fmt_ctx)
Definition: ffprobe.c:1409
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:210
CHECK_END
#define CHECK_END
AVTextFormatOptions::is_key_selected
int(* is_key_selected)(struct AVTextFormatContext *tctx, const char *key)
Callback to discard certain elements based upon the key used.
Definition: avtextformat.h:124
AVFormatContext::metadata
AVDictionary * metadata
Metadata that applies to the whole file.
Definition: avformat.h:1496
film_grain_params.h
AVFrameSideData::size
size_t size
Definition: frame.h:285
AVInputFormat
Definition: avformat.h:544
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
AVDOVIRpuDataHeader::chroma_resampling_explicit_filter_flag
uint8_t chroma_resampling_explicit_filter_flag
Definition: dovi_meta.h:92
AV_PKT_FLAG_CORRUPT
#define AV_PKT_FLAG_CORRUPT
The packet content is corrupted.
Definition: packet.h:644
av_dump_format
void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output)
Print detailed information about the input or output format, such as duration, bitrate,...
Definition: dump.c:845
AV_PROFILE_UNKNOWN
#define AV_PROFILE_UNKNOWN
Definition: defs.h:65
nb_streams_frames
static uint64_t * nb_streams_frames
Definition: ffprobe.c:350
AVFilmGrainParams::width
int width
Intended display resolution.
Definition: film_grain_params.h:220
AV_FRAME_FLAG_KEY
#define AV_FRAME_FLAG_KEY
A flag to mark frames that are keyframes.
Definition: frame.h:642
avformat_open_input
int avformat_open_input(AVFormatContext **ps, const char *url, const AVInputFormat *fmt, AVDictionary **options)
Open an input stream and read the header.
Definition: demux.c:231
AVMutex
#define AVMutex
Definition: thread.h:184
av_dict_get
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
Definition: dict.c:60
av_channel_layout_describe
int av_channel_layout_describe(const AVChannelLayout *channel_layout, char *buf, size_t buf_size)
Get a human-readable string describing the channel layout properties.
Definition: channel_layout.c:653
SECTION_ID_STREAM_GROUP_STREAMS
@ SECTION_ID_STREAM_GROUP_STREAMS
Definition: ffprobe.c:218
av_log_format_line
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl, char *line, int line_size, int *print_prefix)
Format a line of log the same way as the default callback.
Definition: log.c:362
SECTION_ID_FORMAT_TAGS
@ SECTION_ID_FORMAT_TAGS
Definition: ffprobe.c:170
AVDOVIRpuDataHeader::vdr_bit_depth
uint8_t vdr_bit_depth
Definition: dovi_meta.h:99
AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION
@ AV_STREAM_GROUP_PARAMS_IAMF_MIX_PRESENTATION
Definition: avformat.h:1090
AVDOVIRpuDataHeader::rpu_type
uint8_t rpu_type
Definition: dovi_meta.h:88
avcodec_alloc_context3
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
Definition: options.c:149
av_packet_side_data_name
const char * av_packet_side_data_name(enum AVPacketSideDataType type)
Definition: packet.c:269
do_count_frames
static int do_count_frames
Definition: ffprobe.c:97
AVChapter::end
int64_t end
chapter start/end time in time_base units
Definition: avformat.h:1226
AVDOVIMetadata
Combined struct representing a combination of header, mapping and color metadata, for attaching to fr...
Definition: dovi_meta.h:345
ReadInterval::end
int64_t end
start, end in second/AV_TIME_BASE units
Definition: ffprobe.c:151
AVCodecDescriptor
This struct describes the properties of a single codec described by an AVCodecID.
Definition: codec_desc.h:38
stereo3d.h
print_displaymatrix
static void print_displaymatrix(AVTextFormatContext *tfc, const int32_t matrix[9])
Definition: ffprobe.c:506
log_read_interval
static void log_read_interval(const ReadInterval *interval, void *log_ctx, int log_level)
Definition: ffprobe.c:1569
intreadwrite.h
AVFormatContext::video_codec
const struct AVCodec * video_codec
Forced video codec.
Definition: avformat.h:1786
s
#define s(width, name)
Definition: cbs_vp9.c:198
AVTextFormatter
Definition: avtextformat.h:97
AVDOVIReshapingCurve::mmr_order
uint8_t mmr_order[AV_DOVI_MAX_PIECES]
Definition: dovi_meta.h:125
AVHDRPlusColorTransformParams::semiminor_axis_external_ellipse
uint16_t semiminor_axis_external_ellipse
The semi-minor axis value of the external ellipse of the elliptical pixel selector in amount of pixel...
Definition: hdr_dynamic_metadata.h:141
show_packet
static void show_packet(AVTextFormatContext *tfc, InputFile *ifile, AVPacket *pkt, int packet_idx)
Definition: ffprobe.c:1264
unit_bit_per_second_str
static const char unit_bit_per_second_str[]
Definition: ffprobe.c:346
av_realloc_array
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
Definition: mem.c:217
AVFormatContext::nb_programs
unsigned int nb_programs
Definition: avformat.h:1461
AVHDRPlusColorTransformParams::window_upper_left_corner_y
AVRational window_upper_left_corner_y
The relative y coordinate of the top left pixel of the processing window.
Definition: hdr_dynamic_metadata.h:76
avtext_print_data_hash
void avtext_print_data_hash(AVTextFormatContext *tctx, const char *key, const uint8_t *data, int size)
Definition: avtextformat.c:568
AVInputFormat::name
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:549
AVFormatContext::iformat
const struct AVInputFormat * iformat
The input container format.
Definition: avformat.h:1276
audio_codec_name
static const char * audio_codec_name
Definition: ffprobe.c:134
AVFormatContext::chapters
AVChapter ** chapters
Definition: avformat.h:1365
AVHDRPlusColorTransformParams::window_lower_right_corner_x
AVRational window_lower_right_corner_x
The relative x coordinate of the bottom right pixel of the processing window.
Definition: hdr_dynamic_metadata.h:85
SECTION_ID_SUBTITLE
@ SECTION_ID_SUBTITLE
Definition: ffprobe.c:230
pix_fmt
static enum AVPixelFormat pix_fmt
Definition: demux_decode.c:41
AVDictionaryEntry::key
char * key
Definition: dict.h:91
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:201
AVDOVIRpuDataHeader::spatial_resampling_filter_flag
uint8_t spatial_resampling_filter_flag
Definition: dovi_meta.h:100
AVCodecParameters::width
int width
Video only.
Definition: codec_par.h:134
show_program
static int show_program(AVTextFormatContext *tfc, InputFile *ifile, AVProgram *program)
Definition: ffprobe.c:1995
av_iamf_param_definition_get_subblock
static av_always_inline void * av_iamf_param_definition_get_subblock(const AVIAMFParamDefinition *par, unsigned int idx)
Get the subblock at the specified.
Definition: iamf.h:260
AV_CHANNEL_ORDER_UNSPEC
@ AV_CHANNEL_ORDER_UNSPEC
Only the channel count is specified, without any further information about the channel order.
Definition: channel_layout.h:119
avtextwriter_context_close
int avtextwriter_context_close(AVTextWriterContext **pwctx)
Definition: avtextformat.c:606
AVTextFormatSection
Definition: avtextformat.h:41
av_strtok
char * av_strtok(char *s, const char *delim, char **saveptr)
Split the string into several tokens which can be accessed by successive calls to av_strtok().
Definition: avstring.c:179
get_decoder_for_stream
static const AVCodec * get_decoder_for_stream(AVFormatContext *fmt_ctx, AVStream *stream)
Definition: ffprobe.c:2395
get_frame_side_data_type
static const char * get_frame_side_data_type(const void *data)
Definition: ffprobe.c:239
print_fmt
#define print_fmt(k, f,...)
Definition: ffprobe.c:427
avcodec_receive_frame
int avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Alias for avcodec_receive_frame_flags(avctx, frame, 0).
Definition: avcodec.c:723
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:42
print_primaries
static void print_primaries(AVTextFormatContext *tfc, enum AVColorPrimaries color_primaries)
Definition: ffprobe.c:1173
AVIAMFSubmixElement::headphones_rendering_mode
enum AVIAMFHeadphonesMode headphones_rendering_mode
A value that indicates whether the referenced channel-based Audio Element shall be rendered to stereo...
Definition: iamf.h:481
do_show_stream_group_tags
static int do_show_stream_group_tags
Definition: ffprobe.c:124
AVStreamGroup::index
unsigned int index
Group index in AVFormatContext.
Definition: avformat.h:1109
AVCodecContext::bits_per_raw_sample
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:1561
AV_LOG_DEBUG
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:231
AVPacketSideData::data
uint8_t * data
Definition: packet.h:410
AVDOVIDecoderConfigurationRecord::dv_profile
uint8_t dv_profile
Definition: dovi_meta.h:58
av_guess_sample_aspect_ratio
AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, AVFrame *frame)
Guess the sample aspect ratio of a frame, based on both the stream and the frame aspect ratio.
Definition: avformat.c:663
avtext_context_open
int avtext_context_open(AVTextFormatContext **ptctx, const AVTextFormatter *formatter, AVTextWriterContext *writer_context, const char *args, const AVTextFormatSection *sections, int nb_sections, AVTextFormatOptions options, char *show_data_hash)
Definition: avtextformat.c:127
get_raw_string_type
static const char * get_raw_string_type(const void *data)
Definition: ffprobe.c:245
SECTION_ID_ROOT
@ SECTION_ID_ROOT
Definition: ffprobe.c:223
AVIAMFLayer::ch_layout
AVChannelLayout ch_layout
Definition: iamf.h:297
AV_PKT_DATA_STEREO3D
@ AV_PKT_DATA_STEREO3D
This side data should be associated with a video stream and contains Stereoscopic 3D information in f...
Definition: packet.h:111
nb_streams
static int nb_streams
Definition: ffprobe.c:348
av_rescale_q
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
Definition: mathematics.c:142
IN_STREAM_GROUP
#define IN_STREAM_GROUP
Definition: ffprobe.c:1751
AVSubtitle::pts
int64_t pts
Same as packet pts, in AV_TIME_BASE.
Definition: avcodec.h:2096
pixel_formats
static enum AVPixelFormat pixel_formats[]
Definition: vf_sr.c:64
do_show_chapter_tags
static int do_show_chapter_tags
Definition: ffprobe.c:120
AVPixFmtDescriptor::log2_chroma_w
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
Definition: pixdesc.h:80
do_show_pixel_format_components
static int do_show_pixel_format_components
Definition: ffprobe.c:117
AV_DOVI_MAPPING_POLYNOMIAL
@ AV_DOVI_MAPPING_POLYNOMIAL
Definition: dovi_meta.h:108
AV_TEXTFORMAT_DATADUMP_XXD
@ AV_TEXTFORMAT_DATADUMP_XXD
Definition: avtextformat.h:93
AVCodecContext::rc_max_rate
int64_t rc_max_rate
maximum bitrate
Definition: avcodec.h:1278
SECTION_ID_STREAM_GROUP_SUBPIECE
@ SECTION_ID_STREAM_GROUP_SUBPIECE
Definition: ffprobe.c:215
av_get_sample_fmt_name
const char * av_get_sample_fmt_name(enum AVSampleFormat sample_fmt)
Return the name of sample_fmt, or NULL if sample_fmt is not recognized.
Definition: samplefmt.c:51
AVFilmGrainH274Params::comp_model_value
int16_t comp_model_value[3][256][6]
Specifies the model values for the component for each intensity interval.
Definition: film_grain_params.h:190
key
const char * key
Definition: hwcontext_opencl.c:189
AVCodecParameters::nb_coded_side_data
int nb_coded_side_data
Amount of entries in coded_side_data.
Definition: codec_par.h:86
color_range
color_range
Definition: vf_selectivecolor.c:43
AVMEDIA_TYPE_DATA
@ AVMEDIA_TYPE_DATA
Opaque data information usually continuous.
Definition: avutil.h:202
AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE
#define AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE
For these sections the element_name field is mandatory.
Definition: avtextformat.h:49
InputStream::dec_ctx
AVCodecContext * dec_ctx
Definition: ffprobe.c:82
do_show_chapters
static int do_show_chapters
Definition: ffprobe.c:101
AVCOL_PRI_UNSPECIFIED
@ AVCOL_PRI_UNSPECIFIED
Definition: pixfmt.h:639
AVCPBProperties
This structure describes the bitrate properties of an encoded bitstream.
Definition: defs.h:282
AV_FILM_GRAIN_PARAMS_NONE
@ AV_FILM_GRAIN_PARAMS_NONE
Definition: film_grain_params.h:25
AVFormatContext::data_codec
const struct AVCodec * data_codec
Forced data codec.
Definition: avformat.h:1810
AVFormatContext::probe_score
int probe_score
format probing score.
Definition: avformat.h:1729
AVDOVIDecoderConfigurationRecord::dv_version_major
uint8_t dv_version_major
Definition: dovi_meta.h:56
av_dovi_get_header
static av_always_inline AVDOVIRpuDataHeader * av_dovi_get_header(const AVDOVIMetadata *data)
Definition: dovi_meta.h:363
AVDOVIReshapingCurve::poly_order
uint8_t poly_order[AV_DOVI_MAX_PIECES]
Definition: dovi_meta.h:122
AV_FRAME_DATA_DYNAMIC_HDR_VIVID
@ AV_FRAME_DATA_DYNAMIC_HDR_VIVID
HDR Vivid dynamic metadata associated with a video frame.
Definition: frame.h:215
find_stream_info
static int find_stream_info
Definition: ffprobe.c:160
SECTION_ID_FRAME_LOGS
@ SECTION_ID_FRAME_LOGS
Definition: ffprobe.c:183
arg
const char * arg
Definition: jacosubdec.c:65
AVStereo3D::flags
int flags
Additional information about the frame packing.
Definition: stereo3d.h:212
do_show_pixel_format_flags
static int do_show_pixel_format_flags
Definition: ffprobe.c:116
AVHDRPlusPercentile::percentage
uint8_t percentage
The percentage value corresponding to a specific percentile linearized RGB value in the processing wi...
Definition: hdr_dynamic_metadata.h:45
AVFilmGrainH274Params::model_id
int model_id
Specifies the film grain simulation mode.
Definition: film_grain_params.h:137
open_input_file
static int open_input_file(InputFile *ifile, const char *filename, const char *print_filename)
Definition: ffprobe.c:2425
AVDOVINLQParams::linear_deadzone_threshold
uint64_t linear_deadzone_threshold
Definition: dovi_meta.h:144
InputFile::streams
InputStream * streams
Definition: ffprobe.c:88
AVTextFormatSection::unique_name
const char * unique_name
unique section name, in case the name is ambiguous
Definition: avtextformat.h:59
print_tile_grid_params
static void print_tile_grid_params(AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVStreamGroupTileGrid *tile_grid)
Definition: ffprobe.c:2044
av_color_range_name
const char * av_color_range_name(enum AVColorRange range)
Definition: pixdesc.c:3772
ReadInterval::start
int64_t start
Definition: ffprobe.c:151
AVDISCARD_ALL
@ AVDISCARD_ALL
discard all
Definition: defs.h:232
AVFormatContext
Format I/O context.
Definition: avformat.h:1264
print_int
#define print_int(k, v)
Definition: ffprobe.c:445
AVFilmGrainAOMParams::uv_mult_luma
int uv_mult_luma[2]
Definition: film_grain_params.h:106
init_dynload
void init_dynload(void)
Initialize dynamic library loading.
Definition: cmdutils.c:75
opts
static AVDictionary * opts
Definition: movenc.c:51
read_intervals
static ReadInterval * read_intervals
Definition: ffprobe.c:157
AVIAMFDemixingInfo
Demixing Info Parameter Data as defined in section 3.8.2 of IAMF.
Definition: iamf.h:128
AVStream::codecpar
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Definition: avformat.h:767
SECTION_ID_STREAM_GROUPS
@ SECTION_ID_STREAM_GROUPS
Definition: ffprobe.c:222
avcodec_parameters_to_context
int avcodec_parameters_to_context(AVCodecContext *codec, const struct AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters.
AV_PKT_DATA_EXIF
@ AV_PKT_DATA_EXIF
Extensible image file format metadata.
Definition: packet.h:369
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:76
ReadInterval::has_end
int has_end
Definition: ffprobe.c:152
avcodec_get_class
const AVClass * avcodec_get_class(void)
Get the AVClass for AVCodecContext.
Definition: options.c:184
print_alpha_mode
static void print_alpha_mode(AVTextFormatContext *tfc, enum AVAlphaMode alpha_mode)
Definition: ffprobe.c:1203
metadata
Stream codec metadata
Definition: ogg-flac-chained-meta.txt:2
SECTION_ID_FRAME_LOG
@ SECTION_ID_FRAME_LOG
Definition: ffprobe.c:182
AVStream::time_base
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
Definition: avformat.h:783
NULL
#define NULL
Definition: coverity.c:32
avtext_print_string
int avtext_print_string(AVTextFormatContext *tctx, const char *key, const char *val, int flags)
Definition: avtextformat.c:439
AVTextFormatContext::section
const AVTextFormatSection * section[SECTION_MAX_NB_LEVELS]
section per each level
Definition: avtextformat.h:151
SET_DO_SHOW
#define SET_DO_SHOW(id, varname)
Definition: ffprobe.c:3228
avcodec_find_decoder_by_name
const AVCodec * avcodec_find_decoder_by_name(const char *name)
Find a registered decoder with the specified name.
Definition: allcodecs.c:1071
AVDOVIDecoderConfigurationRecord::dv_level
uint8_t dv_level
Definition: dovi_meta.h:59
program_name
const char program_name[]
program name, defined by the program for show_version().
Definition: ffprobe.c:92
format
New swscale design to change SwsGraph is what coordinates multiple passes These can include cascaded scaling error diffusion and so on Or we could have separate passes for the vertical and horizontal scaling In between each SwsPass lies a fully allocated image buffer Graph passes may have different levels of e g we can have a single threaded error diffusion pass following a multi threaded scaling pass SwsGraph is internally recreated whenever the image format
Definition: swscale-v2.txt:14
AVDOVIDecoderConfigurationRecord::dv_bl_signal_compatibility_id
uint8_t dv_bl_signal_compatibility_id
Definition: dovi_meta.h:63
InputStream::st
AVStream * st
Definition: ffmpeg.h:489
AV_DICT_MULTIKEY
#define AV_DICT_MULTIKEY
Allow to store several equal keys in the dictionary.
Definition: dict.h:84
AVHDRVividColorTransformParams::color_saturation_gain
AVRational color_saturation_gain[8]
Indicates the color correction strength parameter.
Definition: hdr_dynamic_vivid_metadata.h:242
AVPixFmtDescriptor::nb_components
uint8_t nb_components
The number of components each pixel has, (1-4)
Definition: pixdesc.h:71
show_stream_groups
static int show_stream_groups(AVTextFormatContext *tfc, InputFile *ifile)
Definition: ffprobe.c:2285
AV_DOVI_MAPPING_MMR
@ AV_DOVI_MAPPING_MMR
Definition: dovi_meta.h:109
OPT_EXPERT
#define OPT_EXPERT
Definition: cmdutils.h:211
AVStreamGroupTileGrid::offsets
struct AVStreamGroupTileGrid::@429 * offsets
An nb_tiles sized array of offsets in pixels from the topleft edge of the canvas, indicating where ea...
ERROR
static void ERROR(const char *str)
Definition: audio_fifo.c:58
do_read_frames
static int do_read_frames
Definition: ffprobe.c:99
SECTION_ID_LIBRARY_VERSION
@ SECTION_ID_LIBRARY_VERSION
Definition: ffprobe.c:184
avcodec_free_context
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
Definition: options.c:164
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
AVIAMFParamDefinition::duration
unsigned int duration
The accumulated duration of all blocks in this parameter definition, in units of 1 / parameter_rate.
Definition: iamf.h:231
SECTION_ID_STREAM_TAGS
@ SECTION_ID_STREAM_TAGS
Definition: ffprobe.c:227
isnan
#define isnan(x)
Definition: libm.h:342
SHOW_OPTIONAL_FIELDS_ALWAYS
#define SHOW_OPTIONAL_FIELDS_ALWAYS
Definition: ffprobe.c:141
AVPacketSideData::type
enum AVPacketSideDataType type
Definition: packet.h:412
filter_codec_opts
int filter_codec_opts(const AVDictionary *opts, enum AVCodecID codec_id, AVFormatContext *s, AVStream *st, const AVCodec *codec, AVDictionary **dst, AVDictionary **opts_used)
Filter out options for given codec.
Definition: cmdutils.c:1423
print_q
#define print_q(k, v, s)
Definition: ffprobe.c:446
AVStereo3D::horizontal_disparity_adjustment
AVRational horizontal_disparity_adjustment
Relative shift of the left and right images, which changes the zero parallax plane.
Definition: stereo3d.h:234
AVFormatContext::pb
AVIOContext * pb
I/O context.
Definition: avformat.h:1306
av_log_set_flags
void av_log_set_flags(int arg)
Definition: log.c:482
AV_RN32
#define AV_RN32(p)
Definition: intreadwrite.h:360
parseutils.h
AVIAMFLayer
A layer defining a Channel Layout in the Audio Element.
Definition: iamf.h:294
SECTION_ID_STREAM_GROUP_PIECE
@ SECTION_ID_STREAM_GROUP_PIECE
Definition: ffprobe.c:213
AV_FRAME_DATA_ICC_PROFILE
@ AV_FRAME_DATA_ICC_PROFILE
The data contains an ICC profile as an opaque octet buffer following the format described by ISO 1507...
Definition: frame.h:144
AVDynamicHDRVivid
This struct represents dynamic metadata for color volume transform - CUVA 005.1:2021 standard.
Definition: hdr_dynamic_vivid_metadata.h:256
is_key_selected_callback
static int is_key_selected_callback(AVTextFormatContext *tctx, const char *key)
Definition: ffprobe.c:369
options
Definition: swscale.c:43
AVHDRVividColorTransformParams::color_saturation_mapping_flag
int color_saturation_mapping_flag
This flag indicates that the metadata for the color saturation mapping in the processing window is pr...
Definition: hdr_dynamic_vivid_metadata.h:229
AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
@ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata associated with a video frame.
Definition: frame.h:120
AVStream::metadata
AVDictionary * metadata
Definition: avformat.h:824
av_color_primaries_name
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
Definition: pixdesc.c:3790
show_stream
static int show_stream(AVTextFormatContext *tfc, AVFormatContext *fmt_ctx, int stream_idx, InputStream *ist, int container)
Definition: ffprobe.c:1753
AVHDRPlusColorTransformParams::fraction_bright_pixels
AVRational fraction_bright_pixels
The fraction of selected pixels in the image that contains the brightest pixel in the scene.
Definition: hdr_dynamic_metadata.h:183
av_parse_time
int av_parse_time(int64_t *timeval, const char *timestr, int duration)
Parse timestr and return in *time a corresponding number of microseconds.
Definition: parseutils.c:592
AV_DICT_DONT_OVERWRITE
#define AV_DICT_DONT_OVERWRITE
Don't overwrite existing entries.
Definition: dict.h:81
avcodec_open2
int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options)
Initialize the AVCodecContext to use the given AVCodec.
Definition: avcodec.c:144
AVTextFormatContext::formatter
const AVTextFormatter * formatter
the AVTextFormatter of which this is an instance
Definition: avtextformat.h:135
GET_DECODER
#define GET_DECODER(type_)
print_integers
static void print_integers(AVTextFormatContext *tfc, const char *key, const void *data, int size, const char *format, int columns, int bytes, int offset_add)
Definition: ffprobe.c:456
set_decoders
static int set_decoders(AVFormatContext *fmt_ctx)
Definition: ffprobe.c:2380
AVCodecParameters::ch_layout
AVChannelLayout ch_layout
Audio only.
Definition: codec_par.h:180
AVFilmGrainParams::subsampling_x
int subsampling_x
Intended subsampling ratio, or 0 for luma-only streams.
Definition: film_grain_params.h:225
AVDOVIReshapingCurve::mmr_constant
int64_t mmr_constant[AV_DOVI_MAX_PIECES]
Definition: dovi_meta.h:126
do_show_programs
static int do_show_programs
Definition: ffprobe.c:106
AVHDRPlusColorTransformParams::color_saturation_weight
AVRational color_saturation_weight
The color saturation gain in the processing window in the scene.
Definition: hdr_dynamic_metadata.h:229
avtext_get_formatter_by_name
const AVTextFormatter * avtext_get_formatter_by_name(const char *name)
Definition: avtextformat.c:684
AVHDRVividColorTransformParams::tone_mapping_mode_flag
int tone_mapping_mode_flag
This flag indicates that the metadata for the tone mapping function in the processing window is prese...
Definition: hdr_dynamic_vivid_metadata.h:212
AV_FRAME_DATA_AFD
@ AV_FRAME_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
Definition: frame.h:90
AVPixFmtDescriptor::flags
uint64_t flags
Combination of AV_PIX_FMT_FLAG_...
Definition: pixdesc.h:94
real_options
static const OptionDef real_options[]
Definition: ffprobe.c:3159
AV_PKT_DATA_CONTENT_LIGHT_LEVEL
@ AV_PKT_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
Definition: packet.h:232
AVCOL_RANGE_UNSPECIFIED
@ AVCOL_RANGE_UNSPECIFIED
Definition: pixfmt.h:743
AVCodecParameters::level
int level
Definition: codec_par.h:129
swresample.h
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
unit_byte_str
static const char unit_byte_str[]
Definition: ffprobe.c:345
program_birth_year
const int program_birth_year
program birth year, defined by the program for show_banner()
Definition: ffprobe.c:93
AVCodecParameters::sample_rate
int sample_rate
Audio only.
Definition: codec_par.h:184
AVIAMFLayer::output_gain_flags
unsigned int output_gain_flags
Output gain channel flags as defined in section 3.6.2 of IAMF.
Definition: iamf.h:310
print_color_trc
static void print_color_trc(AVTextFormatContext *tfc, enum AVColorTransferCharacteristic color_trc)
Definition: ffprobe.c:1183
AVAudioServiceType
AVAudioServiceType
Definition: defs.h:235
AVFormatContext::audio_codec
const struct AVCodec * audio_codec
Forced audio codec.
Definition: avformat.h:1794
print_iamf_audio_element_params
static void print_iamf_audio_element_params(AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVIAMFAudioElement *audio_element)
Definition: ffprobe.c:2122
AVStream::nb_frames
int64_t nb_frames
number of frames in this stream if known or 0
Definition: avformat.h:805
SECTION_ID_CHAPTER
@ SECTION_ID_CHAPTER
Definition: ffprobe.c:165
AVIAMFSubmixElement::audio_element_id
unsigned int audio_element_id
The id of the Audio Element this submix element references.
Definition: iamf.h:455
avcodec_find_decoder
const AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
Definition: allcodecs.c:1043
print_duration_time
#define print_duration_time(k, v, tb)
Definition: ffprobe.c:452
print_iamf_param_definition
static void print_iamf_param_definition(AVTextFormatContext *tfc, const char *name, const AVIAMFParamDefinition *param, SectionID section_id)
Definition: ffprobe.c:2067
AV_PKT_DATA_SPHERICAL
@ AV_PKT_DATA_SPHERICAL
This side data should be associated with a video stream and corresponds to the AVSphericalMapping str...
Definition: packet.h:225
AVCodecParameters::extradata_size
int extradata_size
Size of the extradata content in bytes.
Definition: codec_par.h:73
AVIAMFSubmix
Submix layout as defined in section 3.7 of IAMF.
Definition: iamf.h:559
show_value_unit
static int show_value_unit
Definition: ffprobe.c:128
print_dynamic_hdr_vivid
static void print_dynamic_hdr_vivid(AVTextFormatContext *tfc, const AVDynamicHDRVivid *metadata)
Definition: ffprobe.c:804
AVFormatContext::nb_streams
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
Definition: avformat.h:1320
AVStereo3D::primary_eye
enum AVStereo3DPrimaryEye primary_eye
Which eye is the primary eye when rendering in 2D.
Definition: stereo3d.h:222
color_primaries
static const AVColorPrimariesDesc color_primaries[AVCOL_PRI_NB]
Definition: csp.c:76
AV_STREAM_GROUP_PARAMS_TILE_GRID
@ AV_STREAM_GROUP_PARAMS_TILE_GRID
Definition: avformat.h:1091
print_input_filename
static const char * print_input_filename
Definition: ffprobe.c:339
AVAlphaMode
AVAlphaMode
Correlation between the alpha channel and color values.
Definition: pixfmt.h:810
AVFilmGrainAOMParams::num_uv_points
int num_uv_points[2]
If chroma_scaling_from_luma is set to 0, signals the chroma scaling function parameters.
Definition: film_grain_params.h:62
AVIAMFReconGain::subblock_duration
unsigned int subblock_duration
Duration for the given subblock, in units of 1 / parameter_rate.
Definition: iamf.h:156
SECTION_ID_FRAMES
@ SECTION_ID_FRAMES
Definition: ffprobe.c:172
codec_opts
AVDictionary * codec_opts
Definition: cmdutils.c:58
FrameData::pkt_size
int pkt_size
Definition: ffprobe.c:76
avformat_find_stream_info
int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
Read packets of a media file to get stream information.
Definition: demux.c:2602
fmt_ctx
static AVFormatContext * fmt_ctx
Definition: decode_filter_audio.c:44
av_spherical_projection_name
const char * av_spherical_projection_name(enum AVSphericalProjection projection)
Provide a human-readable name of a given AVSphericalProjection.
Definition: spherical.c:68
f
f
Definition: af_crystalizer.c:122
SECTION_ID_STREAM_GROUP_PIECES
@ SECTION_ID_STREAM_GROUP_PIECES
Definition: ffprobe.c:212
AV_SPHERICAL_CUBEMAP
@ AV_SPHERICAL_CUBEMAP
Video frame is split into 6 faces of a cube, and arranged on a 3x2 layout.
Definition: spherical.h:61
av_ts2timestr
#define av_ts2timestr(ts, tb)
Convenience macro, the return value should be used only directly in function arguments but never stan...
Definition: timestamp.h:83
OPT_TYPE_INT
@ OPT_TYPE_INT
Definition: cmdutils.h:84
AVIAMFDemixingInfo::subblock_duration
unsigned int subblock_duration
Duration for the given subblock, in units of 1 / parameter_rate.
Definition: iamf.h:136
av_log_set_callback
void av_log_set_callback(void(*callback)(void *, int, const char *, va_list))
Set the logging callback.
Definition: log.c:492
AVPacket::size
int size
Definition: packet.h:589
ReadInterval::start_is_offset
int start_is_offset
Definition: ffprobe.c:153
do_show_packet_tags
static int do_show_packet_tags
Definition: ffprobe.c:126
avformat_match_stream_specifier
int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
Check if the stream st contained in s is matched by the stream specifier spec.
Definition: avformat.c:617
SECTION_ID_STREAM_DISPOSITION
@ SECTION_ID_STREAM_DISPOSITION
Definition: ffprobe.c:225
avformat_alloc_context
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
Definition: options.c:163
AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT
@ AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT
Ambient viewing environment metadata, as defined by H.274.
Definition: frame.h:220
av_bprint_finalize
int av_bprint_finalize(AVBPrint *buf, char **ret_str)
Finalize a print buffer.
Definition: bprint.c:235
PRINT_PIX_FMT_FLAG
#define PRINT_PIX_FMT_FLAG(flagname, name)
Definition: ffprobe.c:2703
AV_PIX_FMT_FLAG_RGB
#define AV_PIX_FMT_FLAG_RGB
The pixel format contains RGB-like data (as opposed to YUV/grayscale).
Definition: pixdesc.h:136
AVClass::category
AVClassCategory category
Category used for visualization (like color).
Definition: log.h:133
AVFilmGrainH274Params::component_model_present
int component_model_present[3]
Indicates if the modelling of film grain for a given component is present.
Definition: film_grain_params.h:155
show_programs
static int show_programs(AVTextFormatContext *tfc, InputFile *ifile)
Definition: ffprobe.c:2026
AV_DOVI_NLQ_LINEAR_DZ
@ AV_DOVI_NLQ_LINEAR_DZ
Definition: dovi_meta.h:132
AV_PKT_DATA_DYNAMIC_HDR10_PLUS
@ AV_PKT_DATA_DYNAMIC_HDR10_PLUS
HDR10+ dynamic metadata associated with a video frame.
Definition: packet.h:296
AVDOVIRpuDataHeader::vdr_rpu_profile
uint8_t vdr_rpu_profile
Definition: dovi_meta.h:90
av_err2str
#define av_err2str(errnum)
Convenience macro, the return value should be used only directly in function arguments but never stan...
Definition: error.h:122
av_stereo3d_primary_eye_name
const char * av_stereo3d_primary_eye_name(unsigned int eye)
Provide a human-readable name of a given stereo3d primary eye.
Definition: stereo3d.c:133
AVFormatContext::url
char * url
input or output URL.
Definition: avformat.h:1380
avtext_print_section_footer
void avtext_print_section_footer(AVTextFormatContext *tctx)
Definition: avtextformat.c:266
AVCodecContext::pkt_timebase
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.
Definition: avcodec.h:550
SectionID
SectionID
Definition: ffprobe.c:164
AV_MUTEX_INITIALIZER
#define AV_MUTEX_INITIALIZER
Definition: thread.h:185
REALLOCZ_ARRAY_STREAM
#define REALLOCZ_ARRAY_STREAM(ptr, cur_n, new_n)
Definition: ffprobe.c:480
SECTION_ID_STREAM_GROUP_COMPONENT
@ SECTION_ID_STREAM_GROUP_COMPONENT
Definition: ffprobe.c:209
print_iamf_submix_params
static void print_iamf_submix_params(AVTextFormatContext *tfc, const AVIAMFSubmix *submix)
Definition: ffprobe.c:2163
uninit_opts
void uninit_opts(void)
Uninitialize the cmdutils option system, in particular free the *_opts contexts and their contents.
Definition: cmdutils.c:62
AVClass::get_category
AVClassCategory(* get_category)(void *ctx)
Callback to return the instance category.
Definition: log.h:140
size
int size
Definition: twinvq_data.h:10344
SECTION_ID_CHAPTER_TAGS
@ SECTION_ID_CHAPTER_TAGS
Definition: ffprobe.c:166
AVHDRVividColorTransformParams::average_maxrgb
AVRational average_maxrgb
Indicates the average brightness of the displayed content.
Definition: hdr_dynamic_vivid_metadata.h:192
show_private_data
static int show_private_data
Definition: ffprobe.c:132
avformat_seek_file
int avformat_seek_file(AVFormatContext *s, int stream_index, int64_t min_ts, int64_t ts, int64_t max_ts, int flags)
Seek to timestamp ts.
Definition: seek.c:664
AV_NOPTS_VALUE
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition: avutil.h:247
AVStreamGroup::iamf_audio_element
struct AVIAMFAudioElement * iamf_audio_element
Definition: avformat.h:1131
opt_show_versions
static int opt_show_versions(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:3133
AVFrameSideData::data
uint8_t * data
Definition: frame.h:284
AVFilmGrainParams
This structure describes how to handle film grain synthesis in video for specific codecs.
Definition: film_grain_params.h:201
opt_input_file
static int opt_input_file(void *optctx, const char *arg)
Definition: ffprobe.c:2865
AVCodecParameters::profile
int profile
Codec-specific bitstream restrictions that the stream conforms to.
Definition: codec_par.h:128
AVCHROMA_LOC_UNSPECIFIED
@ AVCHROMA_LOC_UNSPECIFIED
Definition: pixfmt.h:797
SECTION_ID_PACKETS_AND_FRAMES
@ SECTION_ID_PACKETS_AND_FRAMES
Definition: ffprobe.c:189
AVOption::name
const char * name
Definition: opt.h:430
use_value_prefix
static int use_value_prefix
Definition: ffprobe.c:129
SECTION_ID_ERROR
@ SECTION_ID_ERROR
Definition: ffprobe.c:168
AVCPBProperties::min_bitrate
int64_t min_bitrate
Minimum bitrate of the stream, in bits per second.
Definition: defs.h:292
AVSubtitle::end_display_time
uint32_t end_display_time
Definition: avcodec.h:2093
avdevice.h
av_packet_unpack_dictionary
int av_packet_unpack_dictionary(const uint8_t *data, size_t size, AVDictionary **dict)
Unpack a dictionary from side_data.
Definition: packet.c:352
show_banner
void show_banner(int argc, char **argv, const OptionDef *options)
Print the program banner to stderr.
Definition: opt_common.c:235
AVHDRPlusColorTransformParams::window_lower_right_corner_y
AVRational window_lower_right_corner_y
The relative y coordinate of the bottom right pixel of the processing window.
Definition: hdr_dynamic_metadata.h:94
AVDOVIRpuDataHeader::coef_log2_denom
uint8_t coef_log2_denom
Definition: dovi_meta.h:94
AVDOVIRpuDataHeader::bl_video_full_range_flag
uint8_t bl_video_full_range_flag
Definition: dovi_meta.h:96
AVHDRVividColorToneMappingParams::base_param_k1
int base_param_k1
indicates k1_0 in the base parameter, base_param_k1 <= 1: k1_0 = base_param_k1 base_param_k1 > 1: res...
Definition: hdr_dynamic_vivid_metadata.h:130
AVPacket::dts
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
Definition: packet.h:587
AVSphericalMapping::padding
uint32_t padding
Number of pixels to pad from the edge of each cube face.
Definition: spherical.h:200
AVIAMFParamDefinition::constant_subblock_duration
unsigned int constant_subblock_duration
The duration of every subblock in the case where all subblocks, with the optional exception of the la...
Definition: iamf.h:238
AVIAMFAudioElement
Information on how to combine one or more audio streams, as defined in section 3.6 of IAMF.
Definition: iamf.h:359
AVTextFormatter::flags
int flags
a combination or AV_TEXTFORMAT__FLAG_*
Definition: avtextformat.h:109
AVDOVIReshapingCurve::poly_coef
int64_t poly_coef[AV_DOVI_MAX_PIECES][3]
Definition: dovi_meta.h:123
SECTION_ID_FRAME_SIDE_DATA_LIST
@ SECTION_ID_FRAME_SIDE_DATA_LIST
Definition: ffprobe.c:174
print_iamf_mix_presentation_params
static void print_iamf_mix_presentation_params(AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVIAMFMixPresentation *mix_presentation)
Definition: ffprobe.c:2210
SECTION_ID_PACKET_TAGS
@ SECTION_ID_PACKET_TAGS
Definition: ffprobe.c:187
AVStreamGroupTileGrid::nb_tiles
unsigned int nb_tiles
Amount of tiles in the grid.
Definition: avformat.h:959
offset
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
Definition: writing_filters.txt:86
line
Definition: graph2dot.c:48
SECTION_ID_STREAM_GROUP_STREAM_TAGS
@ SECTION_ID_STREAM_GROUP_STREAM_TAGS
Definition: ffprobe.c:206
ff_mutex_lock
static int ff_mutex_lock(AVMutex *mutex)
Definition: thread.h:188
AVIAMFMixGain
Mix Gain Parameter Data as defined in section 3.8.1 of IAMF.
Definition: iamf.h:77
AVPacket::flags
int flags
A combination of AV_PKT_FLAG values.
Definition: packet.h:594
av_packet_alloc
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
Definition: packet.c:63
av_dict_free
void av_dict_free(AVDictionary **pm)
Free all the memory allocated for an AVDictionary struct and all keys and values.
Definition: dict.c:233
do_show_format
static int do_show_format
Definition: ffprobe.c:103
AVCPBProperties::avg_bitrate
int64_t avg_bitrate
Average bitrate of the stream, in bits per second.
Definition: defs.h:297
log_mutex
static AVMutex log_mutex
Definition: ffprobe.c:355
AVFilmGrainParams::h274
AVFilmGrainH274Params h274
Definition: film_grain_params.h:248
ReadInterval
Definition: ffprobe.c:149
va_copy
#define va_copy(dst, src)
Definition: va_copy.h:31
AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT
@ AV_STREAM_GROUP_PARAMS_IAMF_AUDIO_ELEMENT
Definition: avformat.h:1089
OPT_TYPE_FUNC
@ OPT_TYPE_FUNC
Definition: cmdutils.h:81
AV_STEREO3D_FLAG_INVERT
#define AV_STEREO3D_FLAG_INVERT
Inverted views, Right/Bottom represents the left view.
Definition: stereo3d.h:194
AVStreamGroup::streams
AVStream ** streams
A list of streams in the group.
Definition: avformat.h:1165
AVFilmGrainAOMParams::ar_coeffs_y
int8_t ar_coeffs_y[24]
Luma auto-regression coefficients.
Definition: film_grain_params.h:80
print_color_range
static void print_color_range(AVTextFormatContext *tfc, enum AVColorRange color_range)
Definition: ffprobe.c:1153
OPT_TYPE_BOOL
@ OPT_TYPE_BOOL
Definition: cmdutils.h:82
AVStreamGroup::iamf_mix_presentation
struct AVIAMFMixPresentation * iamf_mix_presentation
Definition: avformat.h:1132
do_show_stream_disposition
static int do_show_stream_disposition
Definition: ffprobe.c:110
do_show_stream_groups
static int do_show_stream_groups
Definition: ffprobe.c:107
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:221
AV_FRAME_DATA_VIEW_ID
@ AV_FRAME_DATA_VIEW_ID
This side data must be associated with a video frame.
Definition: frame.h:245
AVChromaLocation
AVChromaLocation
Location of chroma samples.
Definition: pixfmt.h:796
AVHDRPlusColorTransformParams::window_upper_left_corner_x
AVRational window_upper_left_corner_x
The relative x coordinate of the top left pixel of the processing window.
Definition: hdr_dynamic_metadata.h:67
do_count_packets
static int do_count_packets
Definition: ffprobe.c:98
iformat
static const AVInputFormat * iformat
Definition: ffprobe.c:340
SHOW_OPTIONAL_FIELDS_AUTO
#define SHOW_OPTIONAL_FIELDS_AUTO
Definition: ffprobe.c:139
layout
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel layout
Definition: filter_design.txt:18
AV_PKT_DATA_STRINGS_METADATA
@ AV_PKT_DATA_STRINGS_METADATA
A list of zero terminated key/value strings.
Definition: packet.h:169
ReadInterval::has_start
int has_start
Definition: ffprobe.c:152
av_get_picture_type_char
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
Definition: utils.c:40
EntrySelection::entries_to_show
AVDictionary * entries_to_show
Definition: ffprobe.c:330
AVCPBProperties::vbv_delay
uint64_t vbv_delay
The delay between the time the packet this structure is associated with is received and the time when...
Definition: defs.h:312
SECTION_ID_PROGRAM_STREAM_TAGS
@ SECTION_ID_PROGRAM_STREAM_TAGS
Definition: ffprobe.c:198
avcodec_send_packet
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
Definition: decode.c:709
av_opt_next
const AVOption * av_opt_next(const void *obj, const AVOption *last)
Iterate over all AVOptions belonging to obj.
Definition: opt.c:48
AV_PKT_DATA_CPB_PROPERTIES
@ AV_PKT_DATA_CPB_PROPERTIES
This side data corresponds to the AVCPBProperties struct.
Definition: packet.h:142
bprint.h
AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
@ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
Definition: frame.h:137
AVHDRPlusColorTransformParams::semimajor_axis_internal_ellipse
uint16_t semimajor_axis_internal_ellipse
The semi-major axis value of the internal ellipse of the elliptical pixel selector in amount of pixel...
Definition: hdr_dynamic_metadata.h:125
print_ambient_viewing_environment
static void print_ambient_viewing_environment(AVTextFormatContext *tfc, const AVAmbientViewingEnvironment *env)
Definition: ffprobe.c:874
AVStreamGroupTileGrid::width
int width
Width of the final image for presentation.
Definition: avformat.h:1036
AVSphericalMapping::roll
int32_t roll
Rotation around the forward vector [-180, 180].
Definition: spherical.h:146
AVSubtitle::format
uint16_t format
Definition: avcodec.h:2091
AVClassCategory
AVClassCategory
Definition: log.h:28
AVFilmGrainParams::color_primaries
enum AVColorPrimaries color_primaries
Definition: film_grain_params.h:231
AV_STREAM_GROUP_PARAMS_NONE
@ AV_STREAM_GROUP_PARAMS_NONE
Definition: avformat.h:1088
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:256
AVPacket::pts
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: packet.h:581
av_timecode_make_smpte_tc_string2
char * av_timecode_make_smpte_tc_string2(char *buf, AVRational rate, uint32_t tcsmpte, int prevent_df, int skip_field)
Get the timecode string from the SMPTE timecode format.
Definition: timecode.c:131
AVIAMFParamDefinition::parameter_id
unsigned int parameter_id
Identifier for the parameter substream.
Definition: iamf.h:218
AVIAMFLayer::demixing_matrix
AVRational * demixing_matrix
Demixing matrix as defined in section 3.6.3 of IAMF.
Definition: iamf.h:336
print_film_grain_params
static void print_film_grain_params(AVTextFormatContext *tfc, const AVFilmGrainParams *fgp)
Definition: ffprobe.c:885
SECTION_ID_PROGRAM
@ SECTION_ID_PROGRAM
Definition: ffprobe.c:199
AVChapter::id
int64_t id
unique ID to identify the chapter
Definition: avformat.h:1224
setup_find_stream_info_opts
int setup_find_stream_info_opts(AVFormatContext *s, AVDictionary *local_codec_opts, AVDictionary ***dst)
Setup AVCodecContext options for avformat_find_stream_info().
Definition: cmdutils.c:1491
av_packet_get_side_data
uint8_t * av_packet_get_side_data(const AVPacket *pkt, enum AVPacketSideDataType type, size_t *size)
Get side information from packet.
Definition: packet.c:252
AVFormatContext::subtitle_codec
const struct AVCodec * subtitle_codec
Forced subtitle codec.
Definition: avformat.h:1802
show_usage
static void show_usage(void)
Definition: ffprobe.c:2652
AVFilmGrainH274Params
This structure describes how to handle film grain synthesis for codecs using the ITU-T H....
Definition: film_grain_params.h:132
SECTION_ID_STREAM_GROUP_STREAM
@ SECTION_ID_STREAM_GROUP_STREAM
Definition: ffprobe.c:219
AVHDRVividColorToneMappingParams::targeted_system_display_maximum_luminance
AVRational targeted_system_display_maximum_luminance
The nominal maximum display luminance of the targeted system display, in multiples of 1....
Definition: hdr_dynamic_vivid_metadata.h:83
AVCodecParameters::height
int height
Definition: codec_par.h:135
AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS
#define AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS
the section may contain a variable number of fields with variable keys.
Definition: avtextformat.h:47
AVFilmGrainH274Params::num_intensity_intervals
uint16_t num_intensity_intervals[3]
Specifies the number of intensity intervals for which a specific set of model values has been estimat...
Definition: film_grain_params.h:161
do_bitexact
static int do_bitexact
Definition: ffprobe.c:96
avtextwriter_create_file
int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename)
Definition: tw_avio.c:79
av_malloc_array
#define av_malloc_array(a, b)
Definition: tableprint_vlc.h:32
read_interval_packets
static int read_interval_packets(AVTextFormatContext *tfc, InputFile *ifile, const ReadInterval *interval, int64_t *cur_ts)
Definition: ffprobe.c:1593
AVColorSpace
AVColorSpace
YUV colorspace type.
Definition: pixfmt.h:700
display.h
SECTION_ID_PACKETS
@ SECTION_ID_PACKETS
Definition: ffprobe.c:188
AV_FIELD_BB
@ AV_FIELD_BB
Bottom coded first, bottom displayed first.
Definition: defs.h:215
AVIAMFMixPresentation
Information on how to render and mix one or more AVIAMFAudioElement to generate the final audio outpu...
Definition: iamf.h:616
AVFilmGrainParams::subsampling_y
int subsampling_y
Definition: film_grain_params.h:225
AVCPBProperties::max_bitrate
int64_t max_bitrate
Maximum bitrate of the stream, in bits per second.
Definition: defs.h:287
AVDOVIDataMapping::num_y_partitions
uint32_t num_y_partitions
Definition: dovi_meta.h:161
LogBuffer::category
AVClassCategory category
Definition: ffprobe.c:361
parse_options
int parse_options(void *optctx, int argc, char **argv, const OptionDef *options, int(*parse_arg_function)(void *, const char *))
Definition: cmdutils.c:420
opt_show_entries
static int opt_show_entries(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2815
av_always_inline
#define av_always_inline
Definition: attributes.h:63
SECTION_ID_FRAME_SIDE_DATA
@ SECTION_ID_FRAME_SIDE_DATA
Definition: ffprobe.c:175
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
print_pixel_format
static void print_pixel_format(AVTextFormatContext *tfc, enum AVPixelFormat pix_fmt)
Definition: ffprobe.c:1128
SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
@ SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
Definition: ffprobe.c:178
opt_sections
static int opt_sections(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:3090
avtextformatter_xml
const AVTextFormatter avtextformatter_xml
Definition: tf_xml.c:202
OPT_FUNC_ARG
#define OPT_FUNC_ARG
Definition: cmdutils.h:205
AVHDRPlusColorTransformParams::overlap_process_option
enum AVHDRPlusOverlapProcessOption overlap_process_option
Overlap process option indicates one of the two methods of combining rendered pixels in the processin...
Definition: hdr_dynamic_metadata.h:149
AVHDRVividColorTransformParams
Color transform parameters at a processing window in a dynamic metadata for CUVA 005....
Definition: hdr_dynamic_vivid_metadata.h:179
AVFilmGrainAOMParams::scaling_shift
int scaling_shift
Specifies the shift applied to the chroma components.
Definition: film_grain_params.h:69
AV_PKT_DATA_MPEGTS_STREAM_ID
@ AV_PKT_DATA_MPEGTS_STREAM_ID
MPEGTS stream ID as uint8_t, this is required to pass the stream ID information from the demuxer to t...
Definition: packet.h:212
AVProgram
New fields can be added to the end with minor version bumps.
Definition: avformat.h:1188
print_dynamic_hdr10_plus
static void print_dynamic_hdr10_plus(AVTextFormatContext *tfc, const AVDynamicHDRPlus *metadata)
Definition: ffprobe.c:705
AVCodecParameters::color_range
enum AVColorRange color_range
Video only.
Definition: codec_par.h:166
AVTextFormatContext::string_validation_utf8_flags
unsigned int string_validation_utf8_flags
Definition: avtextformat.h:161
AVMasteringDisplayMetadata
Mastering display metadata capable of representing the color volume of the display used to master the...
Definition: mastering_display_metadata.h:38
profile
int profile
Definition: mxfenc.c:2297
AVCOL_SPC_UNSPECIFIED
@ AVCOL_SPC_UNSPECIFIED
Definition: pixfmt.h:703
do_show_stream_group_disposition
static int do_show_stream_group_disposition
Definition: ffprobe.c:111
AVDOVINLQParams
Coefficients of the non-linear inverse quantization.
Definition: dovi_meta.h:139
AVHDRVividColorToneMappingParams::base_param_Delta_enable_mode
int base_param_Delta_enable_mode
This flag indicates that delta mode of base parameter(for value of 1)
Definition: hdr_dynamic_vivid_metadata.h:150
AVCodecParameters::coded_side_data
AVPacketSideData * coded_side_data
Additional data associated with the entire stream.
Definition: codec_par.h:81
SECTION_ID_PACKET_SIDE_DATA
@ SECTION_ID_PACKET_SIDE_DATA
Definition: ffprobe.c:191
ambient_viewing_environment.h
use_value_sexagesimal_format
static int use_value_sexagesimal_format
Definition: ffprobe.c:131
SECTION_ID_LIBRARY_VERSIONS
@ SECTION_ID_LIBRARY_VERSIONS
Definition: ffprobe.c:185
AV_FRAME_FLAG_INTERLACED
#define AV_FRAME_FLAG_INTERLACED
A flag to mark frames whose content is interlaced.
Definition: frame.h:650
av_calloc
void * av_calloc(size_t nmemb, size_t size)
Definition: mem.c:264
AVFilmGrainH274Params::intensity_interval_lower_bound
uint8_t intensity_interval_lower_bound[3][256]
Specifies the lower ounds of each intensity interval for whichthe set of model values applies for the...
Definition: film_grain_params.h:173
SECTION_ID_FRAME_SIDE_DATA_TIMECODE
@ SECTION_ID_FRAME_SIDE_DATA_TIMECODE
Definition: ffprobe.c:177
AVIAMFParamDefinition::nb_subblocks
unsigned int nb_subblocks
Number of subblocks in the array.
Definition: iamf.h:208
LogBuffer::parent_name
char * parent_name
Definition: ffprobe.c:362
AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE
@ AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE
Definition: iamf.h:349
AVCodecParameters::field_order
enum AVFieldOrder field_order
Video only.
Definition: codec_par.h:161
SECTION_ID_PROGRAM_VERSION
@ SECTION_ID_PROGRAM_VERSION
Definition: ffprobe.c:203
AVIAMFLayer::nb_demixing_matrix
unsigned int nb_demixing_matrix
The length of the Demixing matrix array.
Definition: iamf.h:343
AVDynamicHDRPlus
This struct represents dynamic metadata for color volume transform - application 4 of SMPTE 2094-40:2...
Definition: hdr_dynamic_metadata.h:243
AVDOVIDataMapping::curves
AVDOVIReshapingCurve curves[3]
Definition: dovi_meta.h:156
AVStreamGroupTileGrid::horizontal
int horizontal
Offset in pixels from the left edge of the canvas where the tile should be placed.
Definition: avformat.h:995
AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT
#define AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT
Definition: avtextformat.h:70
avcodec.h
parse_loglevel
void parse_loglevel(int argc, char **argv, const OptionDef *options)
Find the '-loglevel' option in the command line args and apply it.
Definition: cmdutils.c:556
AVDOVINLQParams::linear_deadzone_slope
uint64_t linear_deadzone_slope
Definition: dovi_meta.h:143
SECTION_ID_PROGRAMS
@ SECTION_ID_PROGRAMS
Definition: ffprobe.c:204
version.h
AVIAMFSubmix::nb_layouts
unsigned int nb_layouts
Number of layouts in the submix.
Definition: iamf.h:590
AVFilmGrainParams::height
int height
Definition: film_grain_params.h:220
AVDOVIReshapingCurve
Definition: dovi_meta.h:117
version.h
AVStream::disposition
int disposition
Stream disposition - a combination of AV_DISPOSITION_* flags.
Definition: avformat.h:813
AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL
@ AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL
Data found in BlockAdditional element of matroska container.
Definition: packet.h:188
av_buffer_allocz
AVBufferRef * av_buffer_allocz(size_t size)
Same as av_buffer_alloc(), except the returned buffer will be initialized to zero.
Definition: buffer.c:93
show_log
static int show_log(AVTextFormatContext *tfc, int section_ids, int section_id, int log_level)
Definition: ffprobe.c:1229
tag
uint32_t tag
Definition: movenc.c:2032
AVStream::id
int id
Format-specific stream ID.
Definition: avformat.h:756
ret
ret
Definition: filter_design.txt:187
AVStream
Stream structure.
Definition: avformat.h:744
AV_FRAME_DATA_GOP_TIMECODE
@ AV_FRAME_DATA_GOP_TIMECODE
The GOP timecode in 25 bit timecode format.
Definition: frame.h:125
log_buffer
static LogBuffer * log_buffer
Definition: ffprobe.c:366
avcodec_flush_buffers
void avcodec_flush_buffers(AVCodecContext *avctx)
Reset the internal codec state / flush internal buffers.
Definition: avcodec.c:381
AVALPHA_MODE_UNSPECIFIED
@ AVALPHA_MODE_UNSPECIFIED
Unknown alpha handling, or no alpha channel.
Definition: pixfmt.h:811
frame
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
Definition: filter_design.txt:265
AVCPBProperties::buffer_size
int64_t buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
Definition: defs.h:303
AVSphericalMapping::pitch
int32_t pitch
Rotation around the right vector [-90, 90].
Definition: spherical.h:145
AVStreamGroup::metadata
AVDictionary * metadata
Metadata that applies to the whole group.
Definition: avformat.h:1145
AVDOVINLQParams::vdr_in_max
uint64_t vdr_in_max
Definition: dovi_meta.h:141
log_callback_help
void log_callback_help(void *ptr, int level, const char *fmt, va_list vl)
Trivial log callback.
Definition: cmdutils.c:70
AVStereo3D::type
enum AVStereo3DType type
How views are packed within the video.
Definition: stereo3d.h:207
AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER
#define AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER
the section only contains other sections, but has no data at its own level
Definition: avtextformat.h:45
InputFile::streams
InputStream ** streams
Definition: ffmpeg.h:546
parse_read_interval
static int parse_read_interval(const char *interval_spec, ReadInterval *interval)
Parse interval specification, according to the format: INTERVAL ::= [START|+START_OFFSET][%[END|+END_...
Definition: ffprobe.c:2928
AVHDRVivid3SplineParams
HDR Vivid three spline params.
Definition: hdr_dynamic_vivid_metadata.h:30
avformat.h
dovi_meta.h
av_bprintf
void av_bprintf(AVBPrint *buf, const char *fmt,...)
Definition: bprint.c:122
AVHDRVividColorTransformParams::minimum_maxrgb
AVRational minimum_maxrgb
Indicates the minimum brightness of the displayed content.
Definition: hdr_dynamic_vivid_metadata.h:185
dict.h
AVPacket::side_data
AVPacketSideData * side_data
Additional packet data that can be provided by the container.
Definition: packet.h:599
AV_LOG_SKIP_REPEATED
#define AV_LOG_SKIP_REPEATED
Skip repeated messages, this requires the user app to use av_log() instead of (f)printf as the 2 woul...
Definition: log.h:400
id
enum AVCodecID id
Definition: dts2pts.c:549
CMDUTILS_COMMON_OPTIONS
#define CMDUTILS_COMMON_OPTIONS
Definition: opt_common.h:199
AV_DICT_MATCH_CASE
#define AV_DICT_MATCH_CASE
Only get an entry with exact-case key match.
Definition: dict.h:74
AV_RL32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:92
log_buffer_size
static int log_buffer_size
Definition: ffprobe.c:367
U
#define U(x)
Definition: vpx_arith.h:37
AVCodecParameters::chroma_location
enum AVChromaLocation chroma_location
Definition: codec_par.h:170
AVDOVIReshapingCurve::num_pivots
uint8_t num_pivots
Definition: dovi_meta.h:118
AV_PKT_DATA_WEBVTT_IDENTIFIER
@ AV_PKT_DATA_WEBVTT_IDENTIFIER
The optional first identifier line of a WebVTT cue.
Definition: packet.h:193
avformat_network_deinit
int avformat_network_deinit(void)
Undo the initialization done by avformat_network_init.
Definition: utils.c:573
AVDOVIRpuDataHeader::vdr_rpu_level
uint8_t vdr_rpu_level
Definition: dovi_meta.h:91
SECTION_ID_FRAME
@ SECTION_ID_FRAME
Definition: ffprobe.c:171
av_dovi_get_color
static av_always_inline AVDOVIColorMetadata * av_dovi_get_color(const AVDOVIMetadata *data)
Definition: dovi_meta.h:375
AVStreamGroup
Definition: avformat.h:1098
AVHDRVividColorToneMappingParams::base_param_m_n
AVRational base_param_m_n
base_param_m_n in the base parameter, in multiples of 1.0/10.
Definition: hdr_dynamic_vivid_metadata.h:123
av_get_media_type_string
const char * av_get_media_type_string(enum AVMediaType media_type)
Return a string describing the media_type enum, NULL if media_type is unknown.
Definition: utils.c:28
AV_FRAME_DATA_DYNAMIC_HDR_PLUS
@ AV_FRAME_DATA_DYNAMIC_HDR_PLUS
HDR dynamic metadata associated with a video frame.
Definition: frame.h:159
AVHDRVividColorToneMappingParams::base_param_m_a
AVRational base_param_m_a
base_param_m_a in the base parameter, in multiples of 1.0/1023.
Definition: hdr_dynamic_vivid_metadata.h:109
AVCodecContext
main external API structure.
Definition: avcodec.h:439
AVStream::index
int index
stream index in AVFormatContext
Definition: avformat.h:750
show_tags
static int show_tags(AVTextFormatContext *tfc, AVDictionary *tags, int section_id)
Definition: ffprobe.c:488
av_timecode_make_mpeg_tc_string
char * av_timecode_make_mpeg_tc_string(char *buf, uint32_t tc25bit)
Get the timecode string from the 25-bit timecode format (MPEG GOP format).
Definition: timecode.c:147
show_streams
static int show_streams(AVTextFormatContext *tfc, InputFile *ifile)
Definition: ffprobe.c:1978
AVFilmGrainAOMParams::ar_coeff_lag
int ar_coeff_lag
Specifies the auto-regression lag.
Definition: film_grain_params.h:74
AVDOVIDataMapping::mapping_chroma_format_idc
uint8_t mapping_chroma_format_idc
Definition: dovi_meta.h:155
AVStreamGroup::nb_streams
unsigned int nb_streams
Number of elements in AVStreamGroup.streams.
Definition: avformat.h:1152
get_packet_side_data_type
static const char * get_packet_side_data_type(const void *data)
Definition: ffprobe.c:233
AV_FILM_GRAIN_PARAMS_H274
@ AV_FILM_GRAIN_PARAMS_H274
The union is valid when interpreted as AVFilmGrainH274Params (codec.h274)
Definition: film_grain_params.h:35
channel_layout.h
AVIAMFSubmix::default_mix_gain
AVRational default_mix_gain
Default mix gain value to apply when there are no AVIAMFParamDefinition with output_mix_config's para...
Definition: iamf.h:606
nb_streams_packets
static uint64_t * nb_streams_packets
Definition: ffprobe.c:349
AVTextFormatSection::children_ids
const int children_ids[SECTION_MAX_NB_CHILDREN+1]
list of children section IDS, terminated by -1
Definition: avtextformat.h:57
do_show_program_version
static int do_show_program_version
Definition: ffprobe.c:113
AVFilmGrainAOMParams::y_points
uint8_t y_points[14][2]
Definition: film_grain_params.h:50
AVFilmGrainAOMParams::uv_offset
int uv_offset[2]
Offset used for component scaling function.
Definition: film_grain_params.h:112
opt_common.h
DEFINE_OPT_SHOW_SECTION
#define DEFINE_OPT_SHOW_SECTION(section, target_section_id)
Definition: ffprobe.c:3140
AVInputFormat::flags
int flags
Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS,...
Definition: avformat.h:563
AVTextFormatOptions
Definition: avtextformat.h:115
AVRational::den
int den
Denominator.
Definition: rational.h:60
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:72
probe_file
static int probe_file(AVTextFormatContext *tfc, const char *filename, const char *print_filename)
Definition: ffprobe.c:2557
AVDOVIDecoderConfigurationRecord::bl_present_flag
uint8_t bl_present_flag
Definition: dovi_meta.h:62
AVDOVIRpuDataHeader::bl_bit_depth
uint8_t bl_bit_depth
Definition: dovi_meta.h:97
av_get_token
char * av_get_token(const char **buf, const char *term)
Unescape the given string until a non escaped terminating char, and return the token corresponding to...
Definition: avstring.c:143
AVHDRVivid3SplineParams::th_enable
AVRational th_enable
3Spline_TH_enable of three Spline.
Definition: hdr_dynamic_vivid_metadata.h:49
av_bprint_clear
void av_bprint_clear(AVBPrint *buf)
Reset the string to "" but keep internal allocated data.
Definition: bprint.c:227
version.h
AVHDRPlusColorTransformParams::num_distribution_maxrgb_percentiles
uint8_t num_distribution_maxrgb_percentiles
The number of linearized maxRGB values at given percentiles in the processing window in the scene.
Definition: hdr_dynamic_metadata.h:170
AVHDRPlusColorTransformParams::maxscl
AVRational maxscl[3]
The maximum of the color components of linearized RGB values in the processing window in the scene.
Definition: hdr_dynamic_metadata.h:157
SECTION_ID_PIXEL_FORMATS
@ SECTION_ID_PIXEL_FORMATS
Definition: ffprobe.c:196
video
A Quick Description Of Rate Distortion Theory We want to encode a video
Definition: rate_distortion.txt:3
sections
static const AVTextFormatSection sections[]
Definition: ffprobe.c:256
SECTION_ID_STREAM_GROUP_BLOCK
@ SECTION_ID_STREAM_GROUP_BLOCK
Definition: ffprobe.c:217
print_str_validate
#define print_str_validate(k, v)
Definition: ffprobe.c:449
AVFrameSideData::type
enum AVFrameSideDataType type
Definition: frame.h:283
AVDOVIColorMetadata
Dolby Vision RPU colorspace metadata parameters.
Definition: dovi_meta.h:171
output_format
static char * output_format
Definition: ffprobe.c:144
AVFilmGrainH274Params::log2_scale_factor
int log2_scale_factor
Specifies a scale factor used in the film grain characterization equations.
Definition: film_grain_params.h:150
AVFilmGrainAOMParams::uv_mult
int uv_mult[2]
Specifies the luma/chroma multipliers for the index to the component scaling function.
Definition: film_grain_params.h:105
hdr_dynamic_metadata.h
AV_PKT_DATA_AFD
@ AV_PKT_DATA_AFD
Active Format Description data consisting of a single byte as specified in ETSI TS 101 154 using AVAc...
Definition: packet.h:258
selected_entries
static EntrySelection selected_entries[FF_ARRAY_ELEMS(sections)]
Definition: ffprobe.c:333
AVPixFmtDescriptor::comp
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
Definition: pixdesc.h:105
AVStream::r_frame_rate
AVRational r_frame_rate
Real base framerate of the stream.
Definition: avformat.h:878
AV_PKT_DATA_SKIP_SAMPLES
@ AV_PKT_DATA_SKIP_SAMPLES
Recommends skipping the specified number of samples.
Definition: packet.h:153
AVDOVIDecoderConfigurationRecord::rpu_present_flag
uint8_t rpu_present_flag
Definition: dovi_meta.h:60
options
static const OptionDef * options
Definition: ffprobe.c:335
do_show_pixel_formats
static int do_show_pixel_formats
Definition: ffprobe.c:115
AVDOVIDecoderConfigurationRecord::el_present_flag
uint8_t el_present_flag
Definition: dovi_meta.h:61
AV_CODEC_ID_PROBE
@ AV_CODEC_ID_PROBE
codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
Definition: codec_id.h:619
AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN
@ AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN
Subblocks are of struct type AVIAMFMixGain.
Definition: iamf.h:173
Windows::Graphics::DirectX::Direct3D11::p
IDirect3DDxgiInterfaceAccess _COM_Outptr_ void ** p
Definition: vsrc_gfxcapture_winrt.hpp:53
av_find_input_format
const AVInputFormat * av_find_input_format(const char *short_name)
Find AVInputFormat based on the short name of the input format.
Definition: format.c:146
AVFormatContext::duration
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
Definition: avformat.h:1399
AVHDRVividColorToneMappingParams
Color tone mapping parameters at a processing window in a dynamic metadata for CUVA 005....
Definition: hdr_dynamic_vivid_metadata.h:77
AVPacket::stream_index
int stream_index
Definition: packet.h:590
AVFilmGrainH274Params::num_model_values
uint8_t num_model_values[3]
Specifies the number of model values present for each intensity interval in which the film grain has ...
Definition: film_grain_params.h:167
AVFilmGrainParams::color_range
enum AVColorRange color_range
Intended video signal characteristics.
Definition: film_grain_params.h:230
ffprobe_show_library_versions
static void ffprobe_show_library_versions(AVTextFormatContext *tfc)
Definition: ffprobe.c:2690
data_codec_name
static const char * data_codec_name
Definition: ffprobe.c:135
opt_print_filename
static int opt_print_filename(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2905
AVIAMFSubmix::nb_elements
unsigned int nb_elements
Number of elements in the submix.
Definition: iamf.h:575
get_stream_group_type
static const char * get_stream_group_type(const void *data)
Definition: ffprobe.c:250
AVFilmGrainAOMParams::overlap_flag
int overlap_flag
Signals whether to overlap film grain blocks.
Definition: film_grain_params.h:117
AVCodecContext::coded_width
int coded_width
Bitstream width / height, may be different from width/height e.g.
Definition: avcodec.h:615
AV_PKT_DATA_AUDIO_SERVICE_TYPE
@ AV_PKT_DATA_AUDIO_SERVICE_TYPE
This side data should be associated with an audio stream and corresponds to enum AVAudioServiceType.
Definition: packet.h:117
av_strdup
char * av_strdup(const char *s)
Duplicate a string.
Definition: mem.c:272
AV_OPT_FLAG_DECODING_PARAM
#define AV_OPT_FLAG_DECODING_PARAM
A generic parameter which can be set by the user for demuxing or decoding.
Definition: opt.h:356
AVDOVIDecoderConfigurationRecord::dv_version_minor
uint8_t dv_version_minor
Definition: dovi_meta.h:57
do_show_program_tags
static int do_show_program_tags
Definition: ffprobe.c:123
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:200
AVHDRPlusColorTransformParams::center_of_ellipse_y
uint16_t center_of_ellipse_y
The y coordinate of the center position of the concentric internal and external ellipses of the ellip...
Definition: hdr_dynamic_metadata.h:110
av_log_default_callback
void av_log_default_callback(void *ptr, int level, const char *fmt, va_list vl)
Default logging callback.
Definition: log.c:380
avutil.h
us
#define us(width, name, range_min, range_max, subs,...)
Definition: cbs_apv.c:70
AVIAMFAudioElement::demixing_info
AVIAMFParamDefinition * demixing_info
Demixing information used to reconstruct a scalable channel audio representation.
Definition: iamf.h:379
AVIAMFDemixingInfo::dmixp_mode
unsigned int dmixp_mode
Pre-defined combination of demixing parameters.
Definition: iamf.h:140
mem.h
AVIAMFSubmix::output_mix_config
AVIAMFParamDefinition * output_mix_config
Information required for post-processing the mixed audio signal to generate the audio signal for play...
Definition: iamf.h:598
AVStreamGroup::type
enum AVStreamGroupParamsType type
Group type.
Definition: avformat.h:1125
print_stream_group_params
static void print_stream_group_params(AVTextFormatContext *tfc, AVStreamGroup *stg)
Definition: ffprobe.c:2229
AVFilmGrainParams::codec
union AVFilmGrainParams::@506 codec
Additional fields may be added both here and in any structure included.
AVIAMFLayer::ambisonics_mode
enum AVIAMFAmbisonicsMode ambisonics_mode
Ambisonics mode as defined in section 3.6.3 of IAMF.
Definition: iamf.h:328
mastering_display_metadata.h
av_dovi_get_mapping
static av_always_inline AVDOVIDataMapping * av_dovi_get_mapping(const AVDOVIMetadata *data)
Definition: dovi_meta.h:369
AV_DOVI_COMPRESSION_NONE
@ AV_DOVI_COMPRESSION_NONE
Definition: dovi_meta.h:68
AVCodecParameters::video_delay
int video_delay
Video only.
Definition: codec_par.h:175
AVFrameSideData
Structure to hold side data for an AVFrame.
Definition: frame.h:282
AVCodecParameters::format
int format
Definition: codec_par.h:92
AVPixFmtDescriptor
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
Definition: pixdesc.h:69
SECTION_ID_STREAM_GROUP_TAGS
@ SECTION_ID_STREAM_GROUP_TAGS
Definition: ffprobe.c:221
AVIAMFMixPresentation::annotations
AVDictionary * annotations
A dictionary of strings describing the mix in different languages.
Definition: iamf.h:644
SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST
@ SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST
Definition: ffprobe.c:176
AVFormatContext::nb_stream_groups
unsigned int nb_stream_groups
Number of elements in AVFormatContext.stream_groups.
Definition: avformat.h:1339
AVStreamGroupTileGrid::height
int height
Height of the final image for presentation.
Definition: avformat.h:1046
AVStereo3D::view
enum AVStereo3DView view
Determines which views are packed.
Definition: stereo3d.h:217
av_free
#define av_free(p)
Definition: tableprint_vlc.h:34
AVDictionaryEntry
Definition: dict.h:90
AVIAMFLayer::output_gain
AVRational output_gain
Output gain as defined in section 3.6.2 of IAMF.
Definition: iamf.h:316
AV_IAMF_AMBISONICS_MODE_PROJECTION
@ AV_IAMF_AMBISONICS_MODE_PROJECTION
Definition: iamf.h:274
AVCodecParameters::codec_id
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
Definition: codec_par.h:55
AV_OPT_FLAG_EXPORT
#define AV_OPT_FLAG_EXPORT
The option is intended for exporting values to the caller.
Definition: opt.h:363
OPT_TYPE_STRING
@ OPT_TYPE_STRING
Definition: cmdutils.h:83
AVCodecContext::priv_data
void * priv_data
Definition: avcodec.h:466
AVPacket
This structure stores compressed data.
Definition: packet.h:565
AVDOVIReshapingCurve::pivots
uint16_t pivots[AV_DOVI_MAX_PIECES+1]
Definition: dovi_meta.h:119
print_pkt_side_data
static void print_pkt_side_data(AVTextFormatContext *tfc, AVCodecParameters *par, const AVPacketSideData *sd, SectionID id_data)
Definition: ffprobe.c:1010
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:35
av_dict_set
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags)
Set the given entry in *pm, overwriting an existing entry.
Definition: dict.c:86
av_dict_copy
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags)
Copy entries from one AVDictionary struct into another.
Definition: dict.c:247
cmdutils.h
AVPacket::pos
int64_t pos
byte position in stream, -1 if unknown
Definition: packet.h:608
av_frame_side_data_name
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
Definition: side_data.c:70
SHOW_LIB_VERSION
#define SHOW_LIB_VERSION(libname, LIBNAME)
Definition: ffprobe.c:2675
IN_PROGRAM
#define IN_PROGRAM
Definition: ffprobe.c:1750
data_dump_format
static char * data_dump_format
Definition: ffprobe.c:147
AVIAMFSubmixElement::element_mix_config
AVIAMFParamDefinition * element_mix_config
Information required required for applying any processing to the referenced and rendered Audio Elemen...
Definition: iamf.h:464
AVIAMFParamDefinition::parameter_rate
unsigned int parameter_rate
Sample rate for the parameter substream.
Definition: iamf.h:222
AV_FRAME_DATA_EXIF
@ AV_FRAME_DATA_EXIF
Extensible image file format metadata.
Definition: frame.h:262
read_packets
static int read_packets(AVTextFormatContext *tfc, InputFile *ifile)
Definition: ffprobe.c:1718
int32_t
int32_t
Definition: audioconvert.c:56
AVIAMFSubmixElement
Submix element as defined in section 3.7 of IAMF.
Definition: iamf.h:449
AVDOVINLQParams::nlq_offset
uint16_t nlq_offset
Definition: dovi_meta.h:140
timestamp.h
AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL
@ AV_IAMF_AUDIO_ELEMENT_TYPE_CHANNEL
Definition: iamf.h:348
AVFrameSideData::metadata
AVDictionary * metadata
Definition: frame.h:286
AVCodecParameters::bit_rate
int64_t bit_rate
The average bitrate of the encoded data (in bits per second).
Definition: codec_par.h:97
av_opt_get
int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val)
Definition: opt.c:1215
AVDOVIDataMapping::vdr_rpu_id
uint8_t vdr_rpu_id
Definition: dovi_meta.h:153
av_log
#define av_log(a,...)
Definition: tableprint_vlc.h:27
AVFormatContext::start_time
int64_t start_time
Position of the first frame of the component, in AV_TIME_BASE fractional seconds.
Definition: avformat.h:1389
SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST
@ SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST
Definition: ffprobe.c:180
AVHDRVividColorToneMappingParams::base_param_k3
int base_param_k3
indicates k3_0 in the base parameter, base_param_k3 == 1: k3_0 = base_param_k3 base_param_k3 == 2: k3...
Definition: hdr_dynamic_vivid_metadata.h:145
SECTION_ID_PROGRAM_STREAMS
@ SECTION_ID_PROGRAM_STREAMS
Definition: ffprobe.c:200
av_stereo3d_type_name
const char * av_stereo3d_type_name(unsigned int type)
Provide a human-readable name of a given stereo3d type.
Definition: stereo3d.c:93
do_show_data
static int do_show_data
Definition: ffprobe.c:112
AVDOVIRpuDataHeader::disable_residual_flag
uint8_t disable_residual_flag
Definition: dovi_meta.h:102
AVClass::parent_log_context_offset
int parent_log_context_offset
Offset in the structure where a pointer to the parent context for logging is stored.
Definition: log.h:124
AVERROR_EXIT
#define AVERROR_EXIT
Immediate exit was requested; the called function should not be restarted.
Definition: error.h:58
SECTION_ID_STREAM_GROUP_DISPOSITION
@ SECTION_ID_STREAM_GROUP_DISPOSITION
Definition: ffprobe.c:220
avtext_print_data
void avtext_print_data(AVTextFormatContext *tctx, const char *key, const uint8_t *data, int size)
Definition: avtextformat.c:549
av_bprint_chars
void av_bprint_chars(AVBPrint *buf, char c, unsigned n)
Append char c n times to a print buffer.
Definition: bprint.c:130
LogBuffer::parent_category
AVClassCategory parent_category
Definition: ffprobe.c:363
print_dovi_metadata
static void print_dovi_metadata(AVTextFormatContext *tfc, const AVDOVIMetadata *dovi)
Definition: ffprobe.c:543
SECTION_ID_PROGRAM_STREAM_DISPOSITION
@ SECTION_ID_PROGRAM_STREAM_DISPOSITION
Definition: ffprobe.c:197
avcodec_descriptor_get
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
Definition: codec_desc.c:3887
AVHDRVivid3SplineParams::th_delta2
AVRational th_delta2
3Spline_TH_Delta2 of three Spline.
Definition: hdr_dynamic_vivid_metadata.h:63
AVIAMFAudioElement::recon_gain_info
AVIAMFParamDefinition * recon_gain_info
Recon gain information used to reconstruct a scalable channel audio representation.
Definition: iamf.h:386
AV_DOVI_COMPRESSION_RESERVED
@ AV_DOVI_COMPRESSION_RESERVED
Definition: dovi_meta.h:70
AVStereo3D
Stereo 3D type: this structure describes how two videos are packed within a single video surface,...
Definition: stereo3d.h:203
AVDictionaryEntry::value
char * value
Definition: dict.h:92
AVStream::start_time
int64_t start_time
Decoding: pts of the first frame of the stream in presentation order, in stream time base.
Definition: avformat.h:793
SECTION_ID_STREAM_GROUP_SUBPIECES
@ SECTION_ID_STREAM_GROUP_SUBPIECES
Definition: ffprobe.c:214
show_data_hash
static char * show_data_hash
Definition: ffprobe.c:146
pkt
static AVPacket * pkt
Definition: demux_decode.c:55
SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION
@ SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION
Definition: ffprobe.c:205
avstring.h
AVHDRVivid3SplineParams::th_enable_mb
AVRational th_enable_mb
three_Spline_TH_enable_MB is in the range of 0.0 to 1.0, inclusive and in multiples of 1....
Definition: hdr_dynamic_vivid_metadata.h:42
AVClass::item_name
const char *(* item_name)(void *ctx)
A pointer to a function which returns the name of a context instance ctx associated with the class.
Definition: log.h:87
AVAmbientViewingEnvironment::ambient_light_y
AVRational ambient_light_y
Normalized y chromaticity coordinate of the environmental ambient light in the nominal viewing enviro...
Definition: ambient_viewing_environment.h:54
do_show_streams
static int do_show_streams
Definition: ffprobe.c:109
AVFilmGrainAOMParams::chroma_scaling_from_luma
int chroma_scaling_from_luma
Signals whether to derive the chroma scaling function from the luma.
Definition: film_grain_params.h:56
AVStreamGroupTileGrid::idx
unsigned int idx
Index of the stream in the group this tile references.
Definition: avformat.h:990
opt_codec
static int opt_codec(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:3103
InputFile::nb_streams
int nb_streams
Definition: ffmpeg.h:547
show_chapters
static int show_chapters(AVTextFormatContext *tfc, InputFile *ifile)
Definition: ffprobe.c:2302
AVColorRange
AVColorRange
Visual content value range.
Definition: pixfmt.h:742
AVChapter::time_base
AVRational time_base
time base in which the start/end timestamps are specified
Definition: avformat.h:1225
AV_FILM_GRAIN_PARAMS_AV1
@ AV_FILM_GRAIN_PARAMS_AV1
The union is valid when interpreted as AVFilmGrainAOMParams (codec.aom)
Definition: film_grain_params.h:30
do_analyze_frames
static int do_analyze_frames
Definition: ffprobe.c:95
avtext_context_close
int avtext_context_close(AVTextFormatContext **ptctx)
Definition: avtextformat.c:102
AVHDRVividColorToneMappingParams::three_spline
AVHDRVivid3SplineParams three_spline[2]
Definition: hdr_dynamic_vivid_metadata.h:171
AVHDRVividColorToneMappingParams::base_param_m_p
AVRational base_param_m_p
base_param_m_p in the base parameter, in multiples of 1.0/16383.
Definition: hdr_dynamic_vivid_metadata.h:95
AVFilmGrainParams::type
enum AVFilmGrainParamsType type
Specifies the codec for which this structure is valid.
Definition: film_grain_params.h:205
AVIAMFMixPresentation::submixes
AVIAMFSubmix ** submixes
Array of submixes.
Definition: iamf.h:625
print_error
static void print_error(const char *filename, int err)
Print an error message to stderr, indicating filename and a human readable description of the error c...
Definition: cmdutils.h:472
AVDOVIDataMapping::nlq
AVDOVINLQParams nlq[3]
Definition: dovi_meta.h:162
snprintf
#define snprintf
Definition: snprintf.h:34
stream_specifier
static char * stream_specifier
Definition: ffprobe.c:145
AV_FRAME_FLAG_LOSSLESS
#define AV_FRAME_FLAG_LOSSLESS
A decoder can use this flag to mark frames which were originally encoded losslessly.
Definition: frame.h:663
log_callback
static void log_callback(void *ptr, int level, const char *fmt, va_list vl)
Definition: ffprobe.c:377
AVCodecParameters::initial_padding
int initial_padding
Audio only.
Definition: codec_par.h:203
AVFormatContext::priv_data
void * priv_data
Format private data.
Definition: avformat.h:1292
AVDOVIDataMapping
Dolby Vision RPU data mapping parameters.
Definition: dovi_meta.h:152
SECTION_ID_CHAPTERS
@ SECTION_ID_CHAPTERS
Definition: ffprobe.c:167
print_time
#define print_time(k, v, tb)
Definition: ffprobe.c:450
print_mastering_display_metadata
static void print_mastering_display_metadata(AVTextFormatContext *tfc, const AVMasteringDisplayMetadata *metadata)
Definition: ffprobe.c:515
AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY
#define AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY
the section contains an array of elements of the same type
Definition: avtextformat.h:46
AVSphericalMapping
This structure describes how to handle spherical videos, outlining information about projection,...
Definition: spherical.h:100
av_color_transfer_name
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
Definition: pixdesc.c:3823
print_str_opt
#define print_str_opt(k, v)
Definition: ffprobe.c:448
av_dict_iterate
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
Definition: dict.c:42
AVSubtitle::start_display_time
uint32_t start_display_time
Definition: avcodec.h:2092
AV_RB64
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_RB64
Definition: bytestream.h:95
AVPixFmtDescriptor::log2_chroma_h
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.
Definition: pixdesc.h:89
SECTION_ID_PIXEL_FORMAT_COMPONENT
@ SECTION_ID_PIXEL_FORMAT_COMPONENT
Definition: ffprobe.c:194
AVSphericalMapping::yaw
int32_t yaw
Rotation around the up vector [-180, 180].
Definition: spherical.h:144
AVHDRVividColorToneMappingParams::base_param_m_b
AVRational base_param_m_b
base_param_m_b in the base parameter, in multiples of 1/1023.
Definition: hdr_dynamic_vivid_metadata.h:116
SECTION_ID_PACKET
@ SECTION_ID_PACKET
Definition: ffprobe.c:186
swscale.h
AV_DICT_DONT_STRDUP_KEY
#define AV_DICT_DONT_STRDUP_KEY
Take ownership of a key that's been allocated with av_malloc() or another memory allocation function.
Definition: dict.h:77
AVInputFormat::priv_class
const AVClass * priv_class
AVClass for the private context.
Definition: avformat.h:574
AVHDRVividColorToneMappingParams::base_param_m_m
AVRational base_param_m_m
base_param_m_m in the base parameter, in multiples of 1.0/10.
Definition: hdr_dynamic_vivid_metadata.h:102
unit_second_str
static const char unit_second_str[]
Definition: ffprobe.c:343
AVHDRPlusColorTransformParams::bezier_curve_anchors
AVRational bezier_curve_anchors[15]
The intermediate anchor parameters of the tone mapping function in the processing window in the scene...
Definition: hdr_dynamic_metadata.h:216
av_x_if_null
static void * av_x_if_null(const void *p, const void *x)
Return x default pointer in case p is NULL.
Definition: avutil.h:311
AVDOVIDataMapping::num_x_partitions
uint32_t num_x_partitions
Definition: dovi_meta.h:160
AVFilmGrainAOMParams::ar_coeff_shift
int ar_coeff_shift
Specifies the range of the auto-regressive coefficients.
Definition: film_grain_params.h:93
AVPacket::side_data_elems
int side_data_elems
Definition: packet.h:600
av_display_rotation_get
double av_display_rotation_get(const int32_t matrix[9])
Extract the rotation component of the transformation matrix.
Definition: display.c:35
version.h
av_get_pix_fmt_name
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
Definition: pixdesc.c:3376
do_show_packets
static int do_show_packets
Definition: ffprobe.c:105
AV_IAMF_PARAMETER_DEFINITION_DEMIXING
@ AV_IAMF_PARAMETER_DEFINITION_DEMIXING
Subblocks are of struct type AVIAMFDemixingInfo.
Definition: iamf.h:177
SECTION_ID_STREAM_GROUP_SUBCOMPONENTS
@ SECTION_ID_STREAM_GROUP_SUBCOMPONENTS
Definition: ffprobe.c:210
av_fourcc2str
#define av_fourcc2str(fourcc)
Definition: avutil.h:347
print_list_fmt
#define print_list_fmt(k, f, n, m,...)
Definition: ffprobe.c:433
avdevice_register_all
FF_VISIBILITY_POP_HIDDEN av_cold void avdevice_register_all(void)
Initialize libavdevice and register all the input and output devices.
Definition: alldevices.c:67
AVDOVIDecoderConfigurationRecord
Definition: dovi_meta.h:55
avtext_print_section_header
void avtext_print_section_header(AVTextFormatContext *tctx, const void *data, int section_id)
Definition: avtextformat.c:248
AVFilmGrainAOMParams::ar_coeffs_uv
int8_t ar_coeffs_uv[2][25]
Chroma auto-regression coefficients.
Definition: film_grain_params.h:86
show_stream_group
static int show_stream_group(AVTextFormatContext *tfc, InputFile *ifile, AVStreamGroup *stg)
Definition: ffprobe.c:2241