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/bprint.h"
41 #include "libavutil/display.h"
44 #include "libavutil/iamf.h"
47 #include "libavutil/dovi_meta.h"
48 #include "libavutil/mem.h"
49 #include "libavutil/opt.h"
50 #include "libavutil/pixdesc.h"
51 #include "libavutil/spherical.h"
52 #include "libavutil/stereo3d.h"
53 #include "libavutil/dict.h"
54 #include "libavutil/intreadwrite.h"
55 #include "libavutil/libm.h"
56 #include "libavutil/parseutils.h"
57 #include "libavutil/timecode.h"
58 #include "libavutil/timestamp.h"
59 #include "libavdevice/avdevice.h"
60 #include "libavdevice/version.h"
61 #include "libswscale/swscale.h"
62 #include "libswscale/version.h"
64 #include "libswresample/version.h"
66 #include "libpostproc/version.h"
67 #include "libavfilter/version.h"
69 #include "cmdutils.h"
70 #include "opt_common.h"
71 
72 #include "libavutil/thread.h"
73 
74 // attached as opaque_ref to packets/frames
75 typedef struct FrameData {
77  int pkt_size;
78 } FrameData;
79 
80 typedef struct InputStream {
81  AVStream *st;
82 
84 } InputStream;
85 
86 typedef struct InputFile {
88 
90  int nb_streams;
91 } InputFile;
92 
93 const char program_name[] = "ffprobe";
94 const int program_birth_year = 2007;
95 
96 static int do_analyze_frames = 0;
97 static int do_bitexact = 0;
98 static int do_count_frames = 0;
99 static int do_count_packets = 0;
100 static int do_read_frames = 0;
101 static int do_read_packets = 0;
102 static int do_show_chapters = 0;
103 static int do_show_error = 0;
104 static int do_show_format = 0;
105 static int do_show_frames = 0;
106 static int do_show_packets = 0;
107 static int do_show_programs = 0;
108 static int do_show_stream_groups = 0;
110 static int do_show_streams = 0;
113 static int do_show_data = 0;
114 static int do_show_program_version = 0;
116 static int do_show_pixel_formats = 0;
119 static int do_show_log = 0;
120 
121 static int do_show_chapter_tags = 0;
122 static int do_show_format_tags = 0;
123 static int do_show_frame_tags = 0;
124 static int do_show_program_tags = 0;
126 static int do_show_stream_tags = 0;
127 static int do_show_packet_tags = 0;
128 
129 static int show_value_unit = 0;
130 static int use_value_prefix = 0;
133 static int show_private_data = 1;
134 
135 #define SHOW_OPTIONAL_FIELDS_AUTO -1
136 #define SHOW_OPTIONAL_FIELDS_NEVER 0
137 #define SHOW_OPTIONAL_FIELDS_ALWAYS 1
139 
140 static char *output_format;
141 static char *stream_specifier;
142 static char *show_data_hash;
143 
144 typedef struct ReadInterval {
145  int id; ///< identifier
146  int64_t start, end; ///< start, end in second/AV_TIME_BASE units
150 } ReadInterval;
151 
153 static int read_intervals_nb = 0;
154 
155 static int find_stream_info = 1;
156 
157 /* section structure definition */
158 
159 typedef enum {
226 } SectionID;
227 
228 static const char *get_packet_side_data_type(const void *data)
229 {
230  const AVPacketSideData *sd = (const AVPacketSideData *)data;
231  return av_x_if_null(av_packet_side_data_name(sd->type), "unknown");
232 }
233 
234 static const char *get_frame_side_data_type(const void *data)
235 {
236  const AVFrameSideData *sd = (const AVFrameSideData *)data;
237  return av_x_if_null(av_frame_side_data_name(sd->type), "unknown");
238 }
239 
240 static const char *get_raw_string_type(const void *data)
241 {
242  return data;
243 }
244 
245 static const char *get_stream_group_type(const void *data)
246 {
247  const AVStreamGroup *stg = (const AVStreamGroup *)data;
248  return av_x_if_null(avformat_stream_group_name(stg->type), "unknown");
249 }
250 
251 static struct AVTextFormatSection sections[] = {
253  [SECTION_ID_CHAPTER] = { SECTION_ID_CHAPTER, "chapter", 0, { SECTION_ID_CHAPTER_TAGS, -1 } },
254  [SECTION_ID_CHAPTER_TAGS] = { SECTION_ID_CHAPTER_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "chapter_tags" },
255  [SECTION_ID_ERROR] = { SECTION_ID_ERROR, "error", 0, { -1 } },
256  [SECTION_ID_FORMAT] = { SECTION_ID_FORMAT, "format", 0, { SECTION_ID_FORMAT_TAGS, -1 } },
257  [SECTION_ID_FORMAT_TAGS] = { SECTION_ID_FORMAT_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "format_tags" },
260  [SECTION_ID_FRAME_TAGS] = { SECTION_ID_FRAME_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "frame_tags" },
261  [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" },
265  [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" },
267  [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" },
268  [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 },
270  [SECTION_ID_FRAME_LOG] = { SECTION_ID_FRAME_LOG, "log", 0, { -1 }, },
272  [SECTION_ID_LIBRARY_VERSION] = { SECTION_ID_LIBRARY_VERSION, "library_version", 0, { -1 } },
276  [SECTION_ID_PACKET_TAGS] = { SECTION_ID_PACKET_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "packet_tags" },
277  [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" },
278  [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 },
281  [SECTION_ID_PIXEL_FORMAT_FLAGS] = { SECTION_ID_PIXEL_FORMAT_FLAGS, "flags", 0, { -1 }, .unique_name = "pixel_format_flags" },
284  [SECTION_ID_PROGRAM_STREAM_DISPOSITION] = { SECTION_ID_PROGRAM_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "program_stream_disposition" },
285  [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" },
289  [SECTION_ID_PROGRAM_TAGS] = { SECTION_ID_PROGRAM_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "program_tags" },
290  [SECTION_ID_PROGRAM_VERSION] = { SECTION_ID_PROGRAM_VERSION, "program_version", 0, { -1 } },
292  [SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION] = { SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_group_stream_disposition" },
293  [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" },
295  [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" },
299  [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" },
307  [SECTION_ID_STREAM_GROUP_DISPOSITION] = { SECTION_ID_STREAM_GROUP_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_group_disposition" },
308  [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" },
316  [SECTION_ID_STREAM_DISPOSITION] = { SECTION_ID_STREAM_DISPOSITION, "disposition", 0, { -1 }, .unique_name = "stream_disposition" },
317  [SECTION_ID_STREAM_TAGS] = { SECTION_ID_STREAM_TAGS, "tags", AV_TEXTFORMAT_SECTION_FLAG_HAS_VARIABLE_FIELDS, { -1 }, .element_name = "tag", .unique_name = "stream_tags" },
318  [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" },
319  [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 },
320  [SECTION_ID_SUBTITLE] = { SECTION_ID_SUBTITLE, "subtitle", 0, { -1 } },
321 };
322 
323 static const OptionDef *options;
324 
325 /* FFprobe context */
326 static const char *input_filename;
327 static const char *print_input_filename;
328 static const AVInputFormat *iformat = NULL;
329 static const char *output_filename = NULL;
330 
331 static const char unit_second_str[] = "s" ;
332 static const char unit_hertz_str[] = "Hz" ;
333 static const char unit_byte_str[] = "byte" ;
334 static const char unit_bit_per_second_str[] = "bit/s";
335 
336 static int nb_streams;
337 static uint64_t *nb_streams_packets;
338 static uint64_t *nb_streams_frames;
339 static int *selected_streams;
342 
344 
345 typedef struct LogBuffer {
348  char *log_message;
350  char *parent_name;
352 }LogBuffer;
353 
355 static int log_buffer_size;
356 
357 static void log_callback(void *ptr, int level, const char *fmt, va_list vl)
358 {
359  AVClass* avc = ptr ? *(AVClass **) ptr : NULL;
360  va_list vl2;
361  char line[1024];
362  static int print_prefix = 1;
363  void *new_log_buffer;
364 
365  va_copy(vl2, vl);
366  av_log_default_callback(ptr, level, fmt, vl);
367  av_log_format_line(ptr, level, fmt, vl2, line, sizeof(line), &print_prefix);
368  va_end(vl2);
369 
370 #if HAVE_THREADS
372 
373  new_log_buffer = av_realloc_array(log_buffer, log_buffer_size + 1, sizeof(*log_buffer));
374  if (new_log_buffer) {
375  char *msg;
376  int i;
377 
378  log_buffer = new_log_buffer;
379  memset(&log_buffer[log_buffer_size], 0, sizeof(log_buffer[log_buffer_size]));
381  if (avc) {
384  }
387  for (i=strlen(msg) - 1; i>=0 && msg[i] == '\n'; i--) {
388  msg[i] = 0;
389  }
390  if (avc && avc->parent_log_context_offset) {
391  AVClass** parent = *(AVClass ***) (((uint8_t *) ptr) +
393  if (parent && *parent) {
394  log_buffer[log_buffer_size].parent_name = av_strdup((*parent)->item_name(parent));
396  (*parent)->get_category ? (*parent)->get_category(parent) :(*parent)->category;
397  }
398  }
399  log_buffer_size ++;
400  }
401 
403 #endif
404 }
405 
406 
407 #define print_fmt(k, f, ...) do { \
408  av_bprint_clear(&pbuf); \
409  av_bprintf(&pbuf, f, __VA_ARGS__); \
410  avtext_print_string(tfc, k, pbuf.str, 0); \
411 } while (0)
412 
413 #define print_list_fmt(k, f, n, m, ...) do { \
414  av_bprint_clear(&pbuf); \
415  for (int idx = 0; idx < n; idx++) { \
416  for (int idx2 = 0; idx2 < m; idx2++) { \
417  if (idx > 0 || idx2 > 0) \
418  av_bprint_chars(&pbuf, ' ', 1); \
419  av_bprintf(&pbuf, f, __VA_ARGS__); \
420  } \
421  } \
422  avtext_print_string(tfc, k, pbuf.str, 0); \
423 } while (0)
424 
425 #define print_int(k, v) avtext_print_integer(tfc, k, v)
426 #define print_q(k, v, s) avtext_print_rational(tfc, k, v, s)
427 #define print_str(k, v) avtext_print_string(tfc, k, v, 0)
428 #define print_str_opt(k, v) avtext_print_string(tfc, k, v, AV_TEXTFORMAT_PRINT_STRING_OPTIONAL)
429 #define print_str_validate(k, v) avtext_print_string(tfc, k, v, AV_TEXTFORMAT_PRINT_STRING_VALIDATE)
430 #define print_time(k, v, tb) avtext_print_time(tfc, k, v, tb, 0)
431 #define print_ts(k, v) avtext_print_ts(tfc, k, v, 0)
432 #define print_duration_time(k, v, tb) avtext_print_time(tfc, k, v, tb, 1)
433 #define print_duration_ts(k, v) avtext_print_ts(tfc, k, v, 1)
434 #define print_val(k, v, u) avtext_print_unit_int(tfc, k, v, u)
435 
436 #define REALLOCZ_ARRAY_STREAM(ptr, cur_n, new_n) \
437 { \
438  ret = av_reallocp_array(&(ptr), (new_n), sizeof(*(ptr))); \
439  if (ret < 0) \
440  goto end; \
441  memset( (ptr) + (cur_n), 0, ((new_n) - (cur_n)) * sizeof(*(ptr)) ); \
442 }
443 
444 static inline int show_tags(AVTextFormatContext *tfc, AVDictionary *tags, int section_id)
445 {
446  const AVDictionaryEntry *tag = NULL;
447  int ret = 0;
448 
449  if (!tags)
450  return 0;
451  avtext_print_section_header(tfc, NULL, section_id);
452 
453  while ((tag = av_dict_iterate(tags, tag))) {
454  if ((ret = print_str_validate(tag->key, tag->value)) < 0)
455  break;
456  }
458 
459  return ret;
460 }
461 
463 {
464  if (!dovi)
465  return;
466 
467  {
468  const AVDOVIRpuDataHeader *hdr = av_dovi_get_header(dovi);
469  const AVDOVIDataMapping *mapping = av_dovi_get_mapping(dovi);
471  AVBPrint pbuf;
472 
474 
475  // header
476  print_int("rpu_type", hdr->rpu_type);
477  print_int("rpu_format", hdr->rpu_format);
478  print_int("vdr_rpu_profile", hdr->vdr_rpu_profile);
479  print_int("vdr_rpu_level", hdr->vdr_rpu_level);
480  print_int("chroma_resampling_explicit_filter_flag",
482  print_int("coef_data_type", hdr->coef_data_type);
483  print_int("coef_log2_denom", hdr->coef_log2_denom);
484  print_int("vdr_rpu_normalized_idc", hdr->vdr_rpu_normalized_idc);
485  print_int("bl_video_full_range_flag", hdr->bl_video_full_range_flag);
486  print_int("bl_bit_depth", hdr->bl_bit_depth);
487  print_int("el_bit_depth", hdr->el_bit_depth);
488  print_int("vdr_bit_depth", hdr->vdr_bit_depth);
489  print_int("spatial_resampling_filter_flag",
491  print_int("el_spatial_resampling_filter_flag",
493  print_int("disable_residual_flag", hdr->disable_residual_flag);
494 
495  // data mapping values
496  print_int("vdr_rpu_id", mapping->vdr_rpu_id);
497  print_int("mapping_color_space", mapping->mapping_color_space);
498  print_int("mapping_chroma_format_idc",
499  mapping->mapping_chroma_format_idc);
500 
501  print_int("nlq_method_idc", mapping->nlq_method_idc);
502  switch (mapping->nlq_method_idc) {
503  case AV_DOVI_NLQ_NONE:
504  print_str("nlq_method_idc_name", "none");
505  break;
507  print_str("nlq_method_idc_name", "linear_dz");
508  break;
509  default:
510  print_str("nlq_method_idc_name", "unknown");
511  break;
512  }
513 
514  print_int("num_x_partitions", mapping->num_x_partitions);
515  print_int("num_y_partitions", mapping->num_y_partitions);
516 
518 
519  for (int c = 0; c < 3; c++) {
520  const AVDOVIReshapingCurve *curve = &mapping->curves[c];
522 
523  print_list_fmt("pivots", "%"PRIu16, curve->num_pivots, 1, curve->pivots[idx]);
524 
526  for (int i = 0; i < curve->num_pivots - 1; i++) {
527  AVBPrint piece_buf;
528 
530  switch (curve->mapping_idc[i]) {
532  av_bprintf(&piece_buf, "Polynomial");
533  break;
534  case AV_DOVI_MAPPING_MMR:
535  av_bprintf(&piece_buf, "MMR");
536  break;
537  default:
538  av_bprintf(&piece_buf, "Unknown");
539  break;
540  }
541  av_bprintf(&piece_buf, " mapping");
542 
544  print_int("mapping_idc", curve->mapping_idc[i]);
545  switch (curve->mapping_idc[i]) {
547  print_str("mapping_idc_name", "polynomial");
548  print_int("poly_order", curve->poly_order[i]);
549  print_list_fmt("poly_coef", "%"PRIi64,
550  curve->poly_order[i] + 1, 1,
551  curve->poly_coef[i][idx]);
552  break;
553  case AV_DOVI_MAPPING_MMR:
554  print_str("mapping_idc_name", "mmr");
555  print_int("mmr_order", curve->mmr_order[i]);
556  print_int("mmr_constant", curve->mmr_constant[i]);
557  print_list_fmt("mmr_coef", "%"PRIi64,
558  curve->mmr_order[i], 7,
559  curve->mmr_coef[i][idx][idx2]);
560  break;
561  default:
562  print_str("mapping_idc_name", "unknown");
563  break;
564  }
565 
566  // SECTION_ID_FRAME_SIDE_DATA_PIECE
568  }
569 
570  // SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST
572 
573  if (mapping->nlq_method_idc != AV_DOVI_NLQ_NONE) {
574  const AVDOVINLQParams *nlq = &mapping->nlq[c];
575  print_int("nlq_offset", nlq->nlq_offset);
576  print_int("vdr_in_max", nlq->vdr_in_max);
577 
578  switch (mapping->nlq_method_idc) {
580  print_int("linear_deadzone_slope", nlq->linear_deadzone_slope);
581  print_int("linear_deadzone_threshold", nlq->linear_deadzone_threshold);
582  break;
583  }
584  }
585 
586  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT
588  }
589 
590  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
592 
593  // color metadata
594  print_int("dm_metadata_id", color->dm_metadata_id);
595  print_int("scene_refresh_flag", color->scene_refresh_flag);
596  print_list_fmt("ycc_to_rgb_matrix", "%d/%d",
597  FF_ARRAY_ELEMS(color->ycc_to_rgb_matrix), 1,
598  color->ycc_to_rgb_matrix[idx].num,
599  color->ycc_to_rgb_matrix[idx].den);
600  print_list_fmt("ycc_to_rgb_offset", "%d/%d",
601  FF_ARRAY_ELEMS(color->ycc_to_rgb_offset), 1,
602  color->ycc_to_rgb_offset[idx].num,
603  color->ycc_to_rgb_offset[idx].den);
604  print_list_fmt("rgb_to_lms_matrix", "%d/%d",
605  FF_ARRAY_ELEMS(color->rgb_to_lms_matrix), 1,
606  color->rgb_to_lms_matrix[idx].num,
607  color->rgb_to_lms_matrix[idx].den);
608  print_int("signal_eotf", color->signal_eotf);
609  print_int("signal_eotf_param0", color->signal_eotf_param0);
610  print_int("signal_eotf_param1", color->signal_eotf_param1);
611  print_int("signal_eotf_param2", color->signal_eotf_param2);
612  print_int("signal_bit_depth", color->signal_bit_depth);
613  print_int("signal_color_space", color->signal_color_space);
614  print_int("signal_chroma_format", color->signal_chroma_format);
615  print_int("signal_full_range_flag", color->signal_full_range_flag);
616  print_int("source_min_pq", color->source_min_pq);
617  print_int("source_max_pq", color->source_max_pq);
618  print_int("source_diagonal", color->source_diagonal);
619 
620  av_bprint_finalize(&pbuf, NULL);
621  }
622 }
623 
625 {
626  if (!metadata)
627  return;
628  print_int("application version", metadata->application_version);
629  print_int("num_windows", metadata->num_windows);
630  for (int n = 1; n < metadata->num_windows; n++) {
631  const AVHDRPlusColorTransformParams *params = &metadata->params[n];
632  print_q("window_upper_left_corner_x",
633  params->window_upper_left_corner_x,'/');
634  print_q("window_upper_left_corner_y",
635  params->window_upper_left_corner_y,'/');
636  print_q("window_lower_right_corner_x",
637  params->window_lower_right_corner_x,'/');
638  print_q("window_lower_right_corner_y",
639  params->window_lower_right_corner_y,'/');
640  print_q("window_upper_left_corner_x",
641  params->window_upper_left_corner_x,'/');
642  print_q("window_upper_left_corner_y",
643  params->window_upper_left_corner_y,'/');
644  print_int("center_of_ellipse_x",
645  params->center_of_ellipse_x ) ;
646  print_int("center_of_ellipse_y",
647  params->center_of_ellipse_y );
648  print_int("rotation_angle",
649  params->rotation_angle);
650  print_int("semimajor_axis_internal_ellipse",
652  print_int("semimajor_axis_external_ellipse",
654  print_int("semiminor_axis_external_ellipse",
656  print_int("overlap_process_option",
657  params->overlap_process_option);
658  }
659  print_q("targeted_system_display_maximum_luminance",
662  print_int("num_rows_targeted_system_display_actual_peak_luminance",
664  print_int("num_cols_targeted_system_display_actual_peak_luminance",
666  for (int i = 0; i < metadata->num_rows_targeted_system_display_actual_peak_luminance; i++) {
667  for (int j = 0; j < metadata->num_cols_targeted_system_display_actual_peak_luminance; j++) {
668  print_q("targeted_system_display_actual_peak_luminance",
670  }
671  }
672  }
673  for (int n = 0; n < metadata->num_windows; n++) {
674  const AVHDRPlusColorTransformParams *params = &metadata->params[n];
675  for (int i = 0; i < 3; i++) {
676  print_q("maxscl",params->maxscl[i],'/');
677  }
678  print_q("average_maxrgb",
679  params->average_maxrgb,'/');
680  print_int("num_distribution_maxrgb_percentiles",
682  for (int i = 0; i < params->num_distribution_maxrgb_percentiles; i++) {
683  print_int("distribution_maxrgb_percentage",
684  params->distribution_maxrgb[i].percentage);
685  print_q("distribution_maxrgb_percentile",
686  params->distribution_maxrgb[i].percentile,'/');
687  }
688  print_q("fraction_bright_pixels",
689  params->fraction_bright_pixels,'/');
690  }
692  print_int("num_rows_mastering_display_actual_peak_luminance",
694  print_int("num_cols_mastering_display_actual_peak_luminance",
696  for (int i = 0; i < metadata->num_rows_mastering_display_actual_peak_luminance; i++) {
697  for (int j = 0; j < metadata->num_cols_mastering_display_actual_peak_luminance; j++) {
698  print_q("mastering_display_actual_peak_luminance",
699  metadata->mastering_display_actual_peak_luminance[i][j],'/');
700  }
701  }
702  }
703 
704  for (int n = 0; n < metadata->num_windows; n++) {
705  const AVHDRPlusColorTransformParams *params = &metadata->params[n];
706  if (params->tone_mapping_flag) {
707  print_q("knee_point_x", params->knee_point_x,'/');
708  print_q("knee_point_y", params->knee_point_y,'/');
709  print_int("num_bezier_curve_anchors",
710  params->num_bezier_curve_anchors );
711  for (int i = 0; i < params->num_bezier_curve_anchors; i++) {
712  print_q("bezier_curve_anchors",
713  params->bezier_curve_anchors[i],'/');
714  }
715  }
716  if (params->color_saturation_mapping_flag) {
717  print_q("color_saturation_weight",
718  params->color_saturation_weight,'/');
719  }
720  }
721 }
722 
724 {
725  if (!metadata)
726  return;
727  print_int("system_start_code", metadata->system_start_code);
728  print_int("num_windows", metadata->num_windows);
729 
730  for (int n = 0; n < metadata->num_windows; n++) {
731  const AVHDRVividColorTransformParams *params = &metadata->params[n];
732 
733  print_q("minimum_maxrgb", params->minimum_maxrgb, '/');
734  print_q("average_maxrgb", params->average_maxrgb, '/');
735  print_q("variance_maxrgb", params->variance_maxrgb, '/');
736  print_q("maximum_maxrgb", params->maximum_maxrgb, '/');
737  }
738 
739  for (int n = 0; n < metadata->num_windows; n++) {
740  const AVHDRVividColorTransformParams *params = &metadata->params[n];
741 
742  print_int("tone_mapping_mode_flag", params->tone_mapping_mode_flag);
743  if (params->tone_mapping_mode_flag) {
744  print_int("tone_mapping_param_num", params->tone_mapping_param_num);
745  for (int i = 0; i < params->tone_mapping_param_num; i++) {
746  const AVHDRVividColorToneMappingParams *tm_params = &params->tm_params[i];
747 
748  print_q("targeted_system_display_maximum_luminance",
750  print_int("base_enable_flag", tm_params->base_enable_flag);
751  if (tm_params->base_enable_flag) {
752  print_q("base_param_m_p", tm_params->base_param_m_p, '/');
753  print_q("base_param_m_m", tm_params->base_param_m_m, '/');
754  print_q("base_param_m_a", tm_params->base_param_m_a, '/');
755  print_q("base_param_m_b", tm_params->base_param_m_b, '/');
756  print_q("base_param_m_n", tm_params->base_param_m_n, '/');
757 
758  print_int("base_param_k1", tm_params->base_param_k1);
759  print_int("base_param_k2", tm_params->base_param_k2);
760  print_int("base_param_k3", tm_params->base_param_k3);
761  print_int("base_param_Delta_enable_mode",
762  tm_params->base_param_Delta_enable_mode);
763  print_q("base_param_Delta", tm_params->base_param_Delta, '/');
764  }
765  print_int("3Spline_enable_flag", tm_params->three_Spline_enable_flag);
766  if (tm_params->three_Spline_enable_flag) {
767  print_int("3Spline_num", tm_params->three_Spline_num);
768 
769  for (int j = 0; j < tm_params->three_Spline_num; j++) {
770  const AVHDRVivid3SplineParams *three_spline = &tm_params->three_spline[j];
771  print_int("3Spline_TH_mode", three_spline->th_mode);
772  if (three_spline->th_mode == 0 || three_spline->th_mode == 2)
773  print_q("3Spline_TH_enable_MB", three_spline->th_enable_mb, '/');
774  print_q("3Spline_TH_enable", three_spline->th_enable, '/');
775  print_q("3Spline_TH_Delta1", three_spline->th_delta1, '/');
776  print_q("3Spline_TH_Delta2", three_spline->th_delta2, '/');
777  print_q("3Spline_enable_Strength", three_spline->enable_strength, '/');
778  }
779  }
780  }
781  }
782 
783  print_int("color_saturation_mapping_flag", params->color_saturation_mapping_flag);
784  if (params->color_saturation_mapping_flag) {
785  print_int("color_saturation_num", params->color_saturation_num);
786  for (int i = 0; i < params->color_saturation_num; i++) {
787  print_q("color_saturation_gain", params->color_saturation_gain[i], '/');
788  }
789  }
790  }
791 }
792 
794  const AVAmbientViewingEnvironment *env)
795 {
796  if (!env)
797  return;
798 
799  print_q("ambient_illuminance", env->ambient_illuminance, '/');
800  print_q("ambient_light_x", env->ambient_light_x, '/');
801  print_q("ambient_light_y", env->ambient_light_y, '/');
802 }
803 
805  const AVFilmGrainParams *fgp)
806 {
807  const char *color_range, *color_primaries, *color_trc, *color_space;
808  const char *const film_grain_type_names[] = {
809  [AV_FILM_GRAIN_PARAMS_NONE] = "none",
810  [AV_FILM_GRAIN_PARAMS_AV1] = "av1",
811  [AV_FILM_GRAIN_PARAMS_H274] = "h274",
812  };
813 
814  AVBPrint pbuf;
815  if (!fgp || fgp->type >= FF_ARRAY_ELEMS(film_grain_type_names))
816  return;
817 
820  color_trc = av_color_transfer_name(fgp->color_trc);
821  color_space = av_color_space_name(fgp->color_space);
822 
824  print_str("type", film_grain_type_names[fgp->type]);
825  print_fmt("seed", "%"PRIu64, fgp->seed);
826  print_int("width", fgp->width);
827  print_int("height", fgp->height);
828  print_int("subsampling_x", fgp->subsampling_x);
829  print_int("subsampling_y", fgp->subsampling_y);
830  print_str("color_range", color_range ? color_range : "unknown");
831  print_str("color_primaries", color_primaries ? color_primaries : "unknown");
832  print_str("color_trc", color_trc ? color_trc : "unknown");
833  print_str("color_space", color_space ? color_space : "unknown");
834 
835  switch (fgp->type) {
837  break;
839  const AVFilmGrainAOMParams *aom = &fgp->codec.aom;
840  const int num_ar_coeffs_y = 2 * aom->ar_coeff_lag * (aom->ar_coeff_lag + 1);
841  const int num_ar_coeffs_uv = num_ar_coeffs_y + !!aom->num_y_points;
842  print_int("chroma_scaling_from_luma", aom->chroma_scaling_from_luma);
843  print_int("scaling_shift", aom->scaling_shift);
844  print_int("ar_coeff_lag", aom->ar_coeff_lag);
845  print_int("ar_coeff_shift", aom->ar_coeff_shift);
846  print_int("grain_scale_shift", aom->grain_scale_shift);
847  print_int("overlap_flag", aom->overlap_flag);
848  print_int("limit_output_range", aom->limit_output_range);
849 
851 
852  if (aom->num_y_points) {
854 
855  print_int("bit_depth_luma", fgp->bit_depth_luma);
856  print_list_fmt("y_points_value", "%"PRIu8, aom->num_y_points, 1, aom->y_points[idx][0]);
857  print_list_fmt("y_points_scaling", "%"PRIu8, aom->num_y_points, 1, aom->y_points[idx][1]);
858  print_list_fmt("ar_coeffs_y", "%"PRId8, num_ar_coeffs_y, 1, aom->ar_coeffs_y[idx]);
859 
860  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT
862  }
863 
864  for (int uv = 0; uv < 2; uv++) {
865  if (!aom->num_uv_points[uv] && !aom->chroma_scaling_from_luma)
866  continue;
867 
869 
870  print_int("bit_depth_chroma", fgp->bit_depth_chroma);
871  print_list_fmt("uv_points_value", "%"PRIu8, aom->num_uv_points[uv], 1, aom->uv_points[uv][idx][0]);
872  print_list_fmt("uv_points_scaling", "%"PRIu8, aom->num_uv_points[uv], 1, aom->uv_points[uv][idx][1]);
873  print_list_fmt("ar_coeffs_uv", "%"PRId8, num_ar_coeffs_uv, 1, aom->ar_coeffs_uv[uv][idx]);
874  print_int("uv_mult", aom->uv_mult[uv]);
875  print_int("uv_mult_luma", aom->uv_mult_luma[uv]);
876  print_int("uv_offset", aom->uv_offset[uv]);
877 
878  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT
880  }
881 
882  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
884  break;
885  }
887  const AVFilmGrainH274Params *h274 = &fgp->codec.h274;
888  print_int("model_id", h274->model_id);
889  print_int("blending_mode_id", h274->blending_mode_id);
890  print_int("log2_scale_factor", h274->log2_scale_factor);
891 
893 
894  for (int c = 0; c < 3; c++) {
895  if (!h274->component_model_present[c])
896  continue;
897 
899  print_int(c ? "bit_depth_chroma" : "bit_depth_luma", c ? fgp->bit_depth_chroma : fgp->bit_depth_luma);
900 
902  for (int i = 0; i < h274->num_intensity_intervals[c]; i++) {
903 
905  print_int("intensity_interval_lower_bound", h274->intensity_interval_lower_bound[c][i]);
906  print_int("intensity_interval_upper_bound", h274->intensity_interval_upper_bound[c][i]);
907  print_list_fmt("comp_model_value", "%"PRId16, h274->num_model_values[c], 1, h274->comp_model_value[c][i][idx]);
908 
909  // SECTION_ID_FRAME_SIDE_DATA_PIECE
911  }
912 
913  // SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST
915 
916  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT
918  }
919 
920  // SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
922  break;
923  }
924  }
925 
926  av_bprint_finalize(&pbuf, NULL);
927 }
928 
930  AVCodecParameters *par,
931  const AVPacketSideData *sd,
932  SectionID id_data)
933 {
934  const char *name = av_packet_side_data_name(sd->type);
935 
936  avtext_print_section_header(tfc, sd, id_data);
937  print_str("side_data_type", name ? name : "unknown");
938  if (sd->type == AV_PKT_DATA_DISPLAYMATRIX && sd->size >= 9*4) {
939  double rotation = av_display_rotation_get((int32_t *)sd->data);
940  if (isnan(rotation))
941  rotation = 0;
942  avtext_print_integers(tfc, "displaymatrix", sd->data, 9, " %11d", 3, 4, 1);
943  print_int("rotation", rotation);
944  } else if (sd->type == AV_PKT_DATA_STEREO3D) {
945  const AVStereo3D *stereo = (AVStereo3D *)sd->data;
946  print_str("type", av_stereo3d_type_name(stereo->type));
947  print_int("inverted", !!(stereo->flags & AV_STEREO3D_FLAG_INVERT));
948  print_str("view", av_stereo3d_view_name(stereo->view));
949  print_str("primary_eye", av_stereo3d_primary_eye_name(stereo->primary_eye));
950  print_int("baseline", stereo->baseline);
951  print_q("horizontal_disparity_adjustment", stereo->horizontal_disparity_adjustment, '/');
952  print_q("horizontal_field_of_view", stereo->horizontal_field_of_view, '/');
953  } else if (sd->type == AV_PKT_DATA_SPHERICAL) {
954  const AVSphericalMapping *spherical = (AVSphericalMapping *)sd->data;
955  print_str("projection", av_spherical_projection_name(spherical->projection));
956  if (spherical->projection == AV_SPHERICAL_CUBEMAP) {
957  print_int("padding", spherical->padding);
958  } else if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE) {
959  size_t l, t, r, b;
960  av_spherical_tile_bounds(spherical, par->width, par->height,
961  &l, &t, &r, &b);
962  print_int("bound_left", l);
963  print_int("bound_top", t);
964  print_int("bound_right", r);
965  print_int("bound_bottom", b);
966  }
967 
968  print_int("yaw", (double) spherical->yaw / (1 << 16));
969  print_int("pitch", (double) spherical->pitch / (1 << 16));
970  print_int("roll", (double) spherical->roll / (1 << 16));
971  } else if (sd->type == AV_PKT_DATA_SKIP_SAMPLES && sd->size == 10) {
972  print_int("skip_samples", AV_RL32(sd->data));
973  print_int("discard_padding", AV_RL32(sd->data + 4));
974  print_int("skip_reason", AV_RL8(sd->data + 8));
975  print_int("discard_reason", AV_RL8(sd->data + 9));
976  } else if (sd->type == AV_PKT_DATA_MASTERING_DISPLAY_METADATA) {
978 
979  if (metadata->has_primaries) {
980  print_q("red_x", metadata->display_primaries[0][0], '/');
981  print_q("red_y", metadata->display_primaries[0][1], '/');
982  print_q("green_x", metadata->display_primaries[1][0], '/');
983  print_q("green_y", metadata->display_primaries[1][1], '/');
984  print_q("blue_x", metadata->display_primaries[2][0], '/');
985  print_q("blue_y", metadata->display_primaries[2][1], '/');
986 
987  print_q("white_point_x", metadata->white_point[0], '/');
988  print_q("white_point_y", metadata->white_point[1], '/');
989  }
990 
991  if (metadata->has_luminance) {
992  print_q("min_luminance", metadata->min_luminance, '/');
993  print_q("max_luminance", metadata->max_luminance, '/');
994  }
995  } else if (sd->type == AV_PKT_DATA_CONTENT_LIGHT_LEVEL) {
997  print_int("max_content", metadata->MaxCLL);
998  print_int("max_average", metadata->MaxFALL);
999  } else if (sd->type == AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT) {
1001  tfc, (const AVAmbientViewingEnvironment *)sd->data);
1002  } else if (sd->type == AV_PKT_DATA_DYNAMIC_HDR10_PLUS) {
1003  AVDynamicHDRPlus *metadata = (AVDynamicHDRPlus *)sd->data;
1004  print_dynamic_hdr10_plus(tfc, metadata);
1005  } else if (sd->type == AV_PKT_DATA_DOVI_CONF) {
1007  const char *comp = "unknown";
1008  print_int("dv_version_major", dovi->dv_version_major);
1009  print_int("dv_version_minor", dovi->dv_version_minor);
1010  print_int("dv_profile", dovi->dv_profile);
1011  print_int("dv_level", dovi->dv_level);
1012  print_int("rpu_present_flag", dovi->rpu_present_flag);
1013  print_int("el_present_flag", dovi->el_present_flag);
1014  print_int("bl_present_flag", dovi->bl_present_flag);
1015  print_int("dv_bl_signal_compatibility_id", dovi->dv_bl_signal_compatibility_id);
1016  switch (dovi->dv_md_compression)
1017  {
1018  case AV_DOVI_COMPRESSION_NONE: comp = "none"; break;
1019  case AV_DOVI_COMPRESSION_LIMITED: comp = "limited"; break;
1020  case AV_DOVI_COMPRESSION_RESERVED: comp = "reserved"; break;
1021  case AV_DOVI_COMPRESSION_EXTENDED: comp = "extended"; break;
1022  }
1023  print_str("dv_md_compression", comp);
1024  } else if (sd->type == AV_PKT_DATA_AUDIO_SERVICE_TYPE) {
1025  enum AVAudioServiceType *t = (enum AVAudioServiceType *)sd->data;
1026  print_int("service_type", *t);
1027  } else if (sd->type == AV_PKT_DATA_MPEGTS_STREAM_ID) {
1028  print_int("id", *sd->data);
1029  } else if (sd->type == AV_PKT_DATA_CPB_PROPERTIES) {
1030  const AVCPBProperties *prop = (AVCPBProperties *)sd->data;
1031  print_int("max_bitrate", prop->max_bitrate);
1032  print_int("min_bitrate", prop->min_bitrate);
1033  print_int("avg_bitrate", prop->avg_bitrate);
1034  print_int("buffer_size", prop->buffer_size);
1035  print_int("vbv_delay", prop->vbv_delay);
1036  } else if (sd->type == AV_PKT_DATA_WEBVTT_IDENTIFIER ||
1038  if (do_show_data)
1039  avtext_print_data(tfc, "data", sd->data, sd->size);
1040  avtext_print_data_hash(tfc, "data_hash", sd->data, sd->size);
1041  } else if (sd->type == AV_PKT_DATA_FRAME_CROPPING && sd->size >= sizeof(uint32_t) * 4) {
1042  print_int("crop_top", AV_RL32(sd->data));
1043  print_int("crop_bottom", AV_RL32(sd->data + 4));
1044  print_int("crop_left", AV_RL32(sd->data + 8));
1045  print_int("crop_right", AV_RL32(sd->data + 12));
1046  } else if (sd->type == AV_PKT_DATA_AFD && sd->size > 0) {
1047  print_int("active_format", *sd->data);
1048  }
1049 }
1050 
1051 static void print_private_data(AVTextFormatContext *tfc, void *priv_data)
1052 {
1053  const AVOption *opt = NULL;
1054  while (opt = av_opt_next(priv_data, opt)) {
1055  uint8_t *str;
1056  if (!(opt->flags & AV_OPT_FLAG_EXPORT)) continue;
1057  if (av_opt_get(priv_data, opt->name, 0, &str) >= 0) {
1058  print_str(opt->name, str);
1059  av_free(str);
1060  }
1061  }
1062 }
1063 
1065 {
1066  const char *s = av_get_pix_fmt_name(pix_fmt);
1067  enum AVPixelFormat swapped_pix_fmt;
1068 
1069  if (!s) {
1070  print_str_opt("pix_fmt", "unknown");
1071  } else if (!do_bitexact ||
1072  (swapped_pix_fmt = av_pix_fmt_swap_endianness(pix_fmt)) == AV_PIX_FMT_NONE) {
1073  print_str ("pix_fmt", s);
1074  } else {
1075  const char *s2 = av_get_pix_fmt_name(swapped_pix_fmt);
1076  char buf[128];
1077  size_t i = 0;
1078 
1079  while (s[i] && s[i] == s2[i] && i < sizeof(buf) - 1) {
1080  buf[i] = s[i];
1081  i++;
1082  }
1083  buf[i] = '\0';
1084 
1085  print_str ("pix_fmt", buf);
1086  }
1087 }
1088 
1090 {
1091  const char *val = av_color_range_name(color_range);
1093  print_str_opt("color_range", "unknown");
1094  } else {
1095  print_str("color_range", val);
1096  }
1097 }
1098 
1099 static void print_color_space(AVTextFormatContext *tfc, enum AVColorSpace color_space)
1100 {
1101  const char *val = av_color_space_name(color_space);
1102  if (!val || color_space == AVCOL_SPC_UNSPECIFIED) {
1103  print_str_opt("color_space", "unknown");
1104  } else {
1105  print_str("color_space", val);
1106  }
1107 }
1108 
1110 {
1113  print_str_opt("color_primaries", "unknown");
1114  } else {
1115  print_str("color_primaries", val);
1116  }
1117 }
1118 
1120 {
1121  const char *val = av_color_transfer_name(color_trc);
1122  if (!val || color_trc == AVCOL_TRC_UNSPECIFIED) {
1123  print_str_opt("color_transfer", "unknown");
1124  } else {
1125  print_str("color_transfer", val);
1126  }
1127 }
1128 
1129 static void print_chroma_location(AVTextFormatContext *tfc, enum AVChromaLocation chroma_location)
1130 {
1131  const char *val = av_chroma_location_name(chroma_location);
1132  if (!val || chroma_location == AVCHROMA_LOC_UNSPECIFIED) {
1133  print_str_opt("chroma_location", "unspecified");
1134  } else {
1135  print_str("chroma_location", val);
1136  }
1137 }
1138 
1139 static void clear_log(int need_lock)
1140 {
1141  int i;
1142 
1143  if (need_lock)
1145  for (i=0; i<log_buffer_size; i++) {
1146  av_freep(&log_buffer[i].context_name);
1147  av_freep(&log_buffer[i].parent_name);
1148  av_freep(&log_buffer[i].log_message);
1149  }
1150  log_buffer_size = 0;
1151  if(need_lock)
1153 }
1154 
1155 static int show_log(AVTextFormatContext *tfc, int section_ids, int section_id, int log_level)
1156 {
1157  int i;
1159  if (!log_buffer_size) {
1161  return 0;
1162  }
1163  avtext_print_section_header(tfc, NULL, section_ids);
1164 
1165  for (i=0; i<log_buffer_size; i++) {
1166  if (log_buffer[i].log_level <= log_level) {
1167  avtext_print_section_header(tfc, NULL, section_id);
1168  print_str("context", log_buffer[i].context_name);
1169  print_int("level", log_buffer[i].log_level);
1170  print_int("category", log_buffer[i].category);
1171  if (log_buffer[i].parent_name) {
1172  print_str("parent_context", log_buffer[i].parent_name);
1173  print_int("parent_category", log_buffer[i].parent_category);
1174  } else {
1175  print_str_opt("parent_context", "N/A");
1176  print_str_opt("parent_category", "N/A");
1177  }
1178  print_str("message", log_buffer[i].log_message);
1180  }
1181  }
1182  clear_log(0);
1184 
1186 
1187  return 0;
1188 }
1189 
1190 static void show_packet(AVTextFormatContext *tfc, InputFile *ifile, AVPacket *pkt, int packet_idx)
1191 {
1192  AVStream *st = ifile->streams[pkt->stream_index].st;
1193  AVBPrint pbuf;
1194  const char *s;
1195 
1197 
1199 
1201  if (s) print_str ("codec_type", s);
1202  else print_str_opt("codec_type", "unknown");
1203  print_int("stream_index", pkt->stream_index);
1204  print_ts ("pts", pkt->pts);
1205  print_time("pts_time", pkt->pts, &st->time_base);
1206  print_ts ("dts", pkt->dts);
1207  print_time("dts_time", pkt->dts, &st->time_base);
1208  print_duration_ts("duration", pkt->duration);
1209  print_duration_time("duration_time", pkt->duration, &st->time_base);
1210  print_val("size", pkt->size, unit_byte_str);
1211  if (pkt->pos != -1) print_fmt ("pos", "%"PRId64, pkt->pos);
1212  else print_str_opt("pos", "N/A");
1213  print_fmt("flags", "%c%c%c", pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_',
1214  pkt->flags & AV_PKT_FLAG_DISCARD ? 'D' : '_',
1215  pkt->flags & AV_PKT_FLAG_CORRUPT ? 'C' : '_');
1216  if (do_show_data)
1217  avtext_print_data(tfc, "data", pkt->data, pkt->size);
1218  avtext_print_data_hash(tfc, "data_hash", pkt->data, pkt->size);
1219 
1220  if (pkt->side_data_elems) {
1221  size_t size;
1222  const uint8_t *side_metadata;
1223 
1225  if (side_metadata && size && do_show_packet_tags) {
1226  AVDictionary *dict = NULL;
1227  if (av_packet_unpack_dictionary(side_metadata, size, &dict) >= 0)
1228  show_tags(tfc, dict, SECTION_ID_PACKET_TAGS);
1229  av_dict_free(&dict);
1230  }
1231 
1233  for (int i = 0; i < pkt->side_data_elems; i++) {
1237  }
1239  }
1240 
1242 
1243  av_bprint_finalize(&pbuf, NULL);
1244  fflush(stdout);
1245 }
1246 
1247 static void show_subtitle(AVTextFormatContext *tfc, AVSubtitle *sub, AVStream *stream,
1249 {
1250  AVBPrint pbuf;
1251 
1253 
1255 
1256  print_str ("media_type", "subtitle");
1257  print_ts ("pts", sub->pts);
1258  print_time("pts_time", sub->pts, &AV_TIME_BASE_Q);
1259  print_int ("format", sub->format);
1260  print_int ("start_display_time", sub->start_display_time);
1261  print_int ("end_display_time", sub->end_display_time);
1262  print_int ("num_rects", sub->num_rects);
1263 
1265 
1266  av_bprint_finalize(&pbuf, NULL);
1267  fflush(stdout);
1268 }
1269 
1271  const AVFrame *frame,
1272  const AVStream *stream)
1273 {
1275 
1276  for (int i = 0; i < frame->nb_side_data; i++) {
1277  const AVFrameSideData *sd = frame->side_data[i];
1278  const char *name;
1279 
1282  print_str("side_data_type", name ? name : "unknown");
1283  if (sd->type == AV_FRAME_DATA_DISPLAYMATRIX && sd->size >= 9*4) {
1284  double rotation = av_display_rotation_get((int32_t *)sd->data);
1285  if (isnan(rotation))
1286  rotation = 0;
1287  avtext_print_integers(tfc, "displaymatrix", sd->data, 9, " %11d", 3, 4, 1);
1288  print_int("rotation", rotation);
1289  } else if (sd->type == AV_FRAME_DATA_AFD && sd->size > 0) {
1290  print_int("active_format", *sd->data);
1291  } else if (sd->type == AV_FRAME_DATA_GOP_TIMECODE && sd->size >= 8) {
1292  char tcbuf[AV_TIMECODE_STR_SIZE];
1293  av_timecode_make_mpeg_tc_string(tcbuf, *(int64_t *)(sd->data));
1294  print_str("timecode", tcbuf);
1295  } else if (sd->type == AV_FRAME_DATA_S12M_TIMECODE && sd->size == 16) {
1296  uint32_t *tc = (uint32_t*)sd->data;
1297  int m = FFMIN(tc[0],3);
1299  for (int j = 1; j <= m ; j++) {
1300  char tcbuf[AV_TIMECODE_STR_SIZE];
1301  av_timecode_make_smpte_tc_string2(tcbuf, stream->avg_frame_rate, tc[j], 0, 0);
1303  print_str("value", tcbuf);
1305  }
1307  } else if (sd->type == AV_FRAME_DATA_MASTERING_DISPLAY_METADATA) {
1309 
1310  if (metadata->has_primaries) {
1311  print_q("red_x", metadata->display_primaries[0][0], '/');
1312  print_q("red_y", metadata->display_primaries[0][1], '/');
1313  print_q("green_x", metadata->display_primaries[1][0], '/');
1314  print_q("green_y", metadata->display_primaries[1][1], '/');
1315  print_q("blue_x", metadata->display_primaries[2][0], '/');
1316  print_q("blue_y", metadata->display_primaries[2][1], '/');
1317 
1318  print_q("white_point_x", metadata->white_point[0], '/');
1319  print_q("white_point_y", metadata->white_point[1], '/');
1320  }
1321 
1322  if (metadata->has_luminance) {
1323  print_q("min_luminance", metadata->min_luminance, '/');
1324  print_q("max_luminance", metadata->max_luminance, '/');
1325  }
1326  } else if (sd->type == AV_FRAME_DATA_DYNAMIC_HDR_PLUS) {
1327  AVDynamicHDRPlus *metadata = (AVDynamicHDRPlus *)sd->data;
1328  print_dynamic_hdr10_plus(tfc, metadata);
1329  } else if (sd->type == AV_FRAME_DATA_CONTENT_LIGHT_LEVEL) {
1331  print_int("max_content", metadata->MaxCLL);
1332  print_int("max_average", metadata->MaxFALL);
1333  } else if (sd->type == AV_FRAME_DATA_ICC_PROFILE) {
1335  if (tag)
1336  print_str(tag->key, tag->value);
1337  print_int("size", sd->size);
1338  } else if (sd->type == AV_FRAME_DATA_DOVI_METADATA) {
1339  print_dovi_metadata(tfc, (const AVDOVIMetadata *)sd->data);
1340  } else if (sd->type == AV_FRAME_DATA_DYNAMIC_HDR_VIVID) {
1341  AVDynamicHDRVivid *metadata = (AVDynamicHDRVivid *)sd->data;
1342  print_dynamic_hdr_vivid(tfc, metadata);
1343  } else if (sd->type == AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT) {
1345  } else if (sd->type == AV_FRAME_DATA_FILM_GRAIN_PARAMS) {
1347  print_film_grain_params(tfc, fgp);
1348  } else if (sd->type == AV_FRAME_DATA_VIEW_ID) {
1349  print_int("view_id", *(int*)sd->data);
1350  }
1352  }
1354 }
1355 
1358 {
1359  FrameData *fd = frame->opaque_ref ? (FrameData*)frame->opaque_ref->data : NULL;
1360  AVBPrint pbuf;
1361  char val_str[128];
1362  const char *s;
1363 
1365 
1367 
1369  if (s) print_str ("media_type", s);
1370  else print_str_opt("media_type", "unknown");
1371  print_int("stream_index", stream->index);
1372  print_int("key_frame", !!(frame->flags & AV_FRAME_FLAG_KEY));
1373  print_ts ("pts", frame->pts);
1374  print_time("pts_time", frame->pts, &stream->time_base);
1375  print_ts ("pkt_dts", frame->pkt_dts);
1376  print_time("pkt_dts_time", frame->pkt_dts, &stream->time_base);
1377  print_ts ("best_effort_timestamp", frame->best_effort_timestamp);
1378  print_time("best_effort_timestamp_time", frame->best_effort_timestamp, &stream->time_base);
1379  print_duration_ts ("duration", frame->duration);
1380  print_duration_time("duration_time", frame->duration, &stream->time_base);
1381  if (fd && fd->pkt_pos != -1) print_fmt ("pkt_pos", "%"PRId64, fd->pkt_pos);
1382  else print_str_opt("pkt_pos", "N/A");
1383  if (fd && fd->pkt_size != -1) print_val ("pkt_size", fd->pkt_size, unit_byte_str);
1384  else print_str_opt("pkt_size", "N/A");
1385 
1386  switch (stream->codecpar->codec_type) {
1387  AVRational sar;
1388 
1389  case AVMEDIA_TYPE_VIDEO:
1390  print_int("width", frame->width);
1391  print_int("height", frame->height);
1392  print_int("crop_top", frame->crop_top);
1393  print_int("crop_bottom", frame->crop_bottom);
1394  print_int("crop_left", frame->crop_left);
1395  print_int("crop_right", frame->crop_right);
1396  print_pixel_format(tfc, frame->format);
1397  sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, frame);
1398  if (sar.num) {
1399  print_q("sample_aspect_ratio", sar, ':');
1400  } else {
1401  print_str_opt("sample_aspect_ratio", "N/A");
1402  }
1403  print_fmt("pict_type", "%c", av_get_picture_type_char(frame->pict_type));
1404  print_int("interlaced_frame", !!(frame->flags & AV_FRAME_FLAG_INTERLACED));
1405  print_int("top_field_first", !!(frame->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST));
1406  print_int("lossless", !!(frame->flags & AV_FRAME_FLAG_LOSSLESS));
1407  print_int("repeat_pict", frame->repeat_pict);
1408 
1409  print_color_range(tfc, frame->color_range);
1410  print_color_space(tfc, frame->colorspace);
1411  print_primaries(tfc, frame->color_primaries);
1412  print_color_trc(tfc, frame->color_trc);
1413  print_chroma_location(tfc, frame->chroma_location);
1414  break;
1415 
1416  case AVMEDIA_TYPE_AUDIO:
1417  s = av_get_sample_fmt_name(frame->format);
1418  if (s) print_str ("sample_fmt", s);
1419  else print_str_opt("sample_fmt", "unknown");
1420  print_int("nb_samples", frame->nb_samples);
1421  print_int("channels", frame->ch_layout.nb_channels);
1422  if (frame->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC) {
1423  av_channel_layout_describe(&frame->ch_layout, val_str, sizeof(val_str));
1424  print_str ("channel_layout", val_str);
1425  } else
1426  print_str_opt("channel_layout", "unknown");
1427  break;
1428  }
1429  if (do_show_frame_tags)
1430  show_tags(tfc, frame->metadata, SECTION_ID_FRAME_TAGS);
1431  if (do_show_log)
1433  if (frame->nb_side_data)
1434  print_frame_side_data(tfc, frame, stream);
1435 
1437 
1438  av_bprint_finalize(&pbuf, NULL);
1439  fflush(stdout);
1440 }
1441 
1443  InputFile *ifile,
1444  AVFrame *frame, const AVPacket *pkt,
1445  int *packet_new)
1446 {
1447  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1450  AVSubtitle sub;
1451  int ret = 0, got_frame = 0;
1452 
1453  clear_log(1);
1454  if (dec_ctx) {
1455  switch (par->codec_type) {
1456  case AVMEDIA_TYPE_VIDEO:
1457  case AVMEDIA_TYPE_AUDIO:
1458  if (*packet_new) {
1460  if (ret == AVERROR(EAGAIN)) {
1461  ret = 0;
1462  } else if (ret >= 0 || ret == AVERROR_EOF) {
1463  ret = 0;
1464  *packet_new = 0;
1465  }
1466  }
1467  if (ret >= 0) {
1469  if (ret >= 0) {
1470  got_frame = 1;
1471  } else if (ret == AVERROR(EAGAIN) || ret == AVERROR_EOF) {
1472  ret = 0;
1473  }
1474  }
1475  break;
1476 
1477  case AVMEDIA_TYPE_SUBTITLE:
1478  if (*packet_new)
1479  ret = avcodec_decode_subtitle2(dec_ctx, &sub, &got_frame, pkt);
1480  *packet_new = 0;
1481  break;
1482  default:
1483  *packet_new = 0;
1484  }
1485  } else {
1486  *packet_new = 0;
1487  }
1488 
1489  if (ret < 0)
1490  return ret;
1491  if (got_frame) {
1492  int is_sub = (par->codec_type == AVMEDIA_TYPE_SUBTITLE);
1494  if (do_show_frames)
1495  if (is_sub)
1496  show_subtitle(tfc, &sub, ifile->streams[pkt->stream_index].st, fmt_ctx);
1497  else
1498  show_frame(tfc, frame, ifile->streams[pkt->stream_index].st, fmt_ctx);
1499 
1500  if (!is_sub && do_analyze_frames) {
1501  for (int i = 0; i < frame->nb_side_data; i++) {
1502  if (frame->side_data[i]->type == AV_FRAME_DATA_A53_CC)
1504  else if (frame->side_data[i]->type == AV_FRAME_DATA_FILM_GRAIN_PARAMS)
1506  }
1507  }
1508 
1509  if (is_sub)
1510  avsubtitle_free(&sub);
1511  }
1512  return got_frame || *packet_new;
1513 }
1514 
1515 static void log_read_interval(const ReadInterval *interval, void *log_ctx, int log_level)
1516 {
1517  av_log(log_ctx, log_level, "id:%d", interval->id);
1518 
1519  if (interval->has_start) {
1520  av_log(log_ctx, log_level, " start:%s%s", interval->start_is_offset ? "+" : "",
1521  av_ts2timestr(interval->start, &AV_TIME_BASE_Q));
1522  } else {
1523  av_log(log_ctx, log_level, " start:N/A");
1524  }
1525 
1526  if (interval->has_end) {
1527  av_log(log_ctx, log_level, " end:%s", interval->end_is_offset ? "+" : "");
1528  if (interval->duration_frames)
1529  av_log(log_ctx, log_level, "#%"PRId64, interval->end);
1530  else
1531  av_log(log_ctx, log_level, "%s", av_ts2timestr(interval->end, &AV_TIME_BASE_Q));
1532  } else {
1533  av_log(log_ctx, log_level, " end:N/A");
1534  }
1535 
1536  av_log(log_ctx, log_level, "\n");
1537 }
1538 
1540  const ReadInterval *interval, int64_t *cur_ts)
1541 {
1542  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1543  AVPacket *pkt = NULL;
1544  AVFrame *frame = NULL;
1545  int ret = 0, i = 0, frame_count = 0;
1546  int64_t start = -INT64_MAX, end = interval->end;
1547  int has_start = 0, has_end = interval->has_end && !interval->end_is_offset;
1548 
1549  av_log(NULL, AV_LOG_VERBOSE, "Processing read interval ");
1551 
1552  if (interval->has_start) {
1553  int64_t target;
1554  if (interval->start_is_offset) {
1555  if (*cur_ts == AV_NOPTS_VALUE) {
1557  "Could not seek to relative position since current "
1558  "timestamp is not defined\n");
1559  ret = AVERROR(EINVAL);
1560  goto end;
1561  }
1562  target = *cur_ts + interval->start;
1563  } else {
1564  target = interval->start;
1565  }
1566 
1567  av_log(NULL, AV_LOG_VERBOSE, "Seeking to read interval start point %s\n",
1568  av_ts2timestr(target, &AV_TIME_BASE_Q));
1569  if ((ret = avformat_seek_file(fmt_ctx, -1, -INT64_MAX, target, INT64_MAX, 0)) < 0) {
1570  av_log(NULL, AV_LOG_ERROR, "Could not seek to position %"PRId64": %s\n",
1571  interval->start, av_err2str(ret));
1572  goto end;
1573  }
1574  }
1575 
1576  frame = av_frame_alloc();
1577  if (!frame) {
1578  ret = AVERROR(ENOMEM);
1579  goto end;
1580  }
1581  pkt = av_packet_alloc();
1582  if (!pkt) {
1583  ret = AVERROR(ENOMEM);
1584  goto end;
1585  }
1586  while (!av_read_frame(fmt_ctx, pkt)) {
1587  if (fmt_ctx->nb_streams > nb_streams) {
1594  }
1596  AVRational tb = ifile->streams[pkt->stream_index].st->time_base;
1597  int64_t pts = pkt->pts != AV_NOPTS_VALUE ? pkt->pts : pkt->dts;
1598 
1599  if (pts != AV_NOPTS_VALUE)
1600  *cur_ts = av_rescale_q(pts, tb, AV_TIME_BASE_Q);
1601 
1602  if (!has_start && *cur_ts != AV_NOPTS_VALUE) {
1603  start = *cur_ts;
1604  has_start = 1;
1605  }
1606 
1607  if (has_start && !has_end && interval->end_is_offset) {
1608  end = start + interval->end;
1609  has_end = 1;
1610  }
1611 
1612  if (interval->end_is_offset && interval->duration_frames) {
1613  if (frame_count >= interval->end)
1614  break;
1615  } else if (has_end && *cur_ts != AV_NOPTS_VALUE && *cur_ts >= end) {
1616  break;
1617  }
1618 
1619  frame_count++;
1620  if (do_read_packets) {
1621  if (do_show_packets)
1622  show_packet(tfc, ifile, pkt, i++);
1624  }
1625  if (do_read_frames) {
1626  int packet_new = 1;
1627  FrameData *fd;
1628 
1629  pkt->opaque_ref = av_buffer_allocz(sizeof(*fd));
1630  if (!pkt->opaque_ref) {
1631  ret = AVERROR(ENOMEM);
1632  goto end;
1633  }
1634  fd = (FrameData*)pkt->opaque_ref->data;
1635  fd->pkt_pos = pkt->pos;
1636  fd->pkt_size = pkt->size;
1637 
1638  while (process_frame(tfc, ifile, frame, pkt, &packet_new) > 0);
1639  }
1640  }
1642  }
1644  //Flush remaining frames that are cached in the decoder
1645  for (i = 0; i < ifile->nb_streams; i++) {
1646  pkt->stream_index = i;
1647  if (do_read_frames) {
1648  while (process_frame(tfc, ifile, frame, pkt, &(int){1}) > 0);
1649  if (ifile->streams[i].dec_ctx)
1651  }
1652  }
1653 
1654 end:
1655  av_frame_free(&frame);
1656  av_packet_free(&pkt);
1657  if (ret < 0) {
1658  av_log(NULL, AV_LOG_ERROR, "Could not read packets in interval ");
1659  log_read_interval(interval, NULL, AV_LOG_ERROR);
1660  }
1661  return ret;
1662 }
1663 
1665 {
1666  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1667  int i, ret = 0;
1668  int64_t cur_ts = fmt_ctx->start_time;
1669 
1670  if (read_intervals_nb == 0) {
1671  ReadInterval interval = (ReadInterval) { .has_start = 0, .has_end = 0 };
1672  ret = read_interval_packets(tfc, ifile, &interval, &cur_ts);
1673  } else {
1674  for (i = 0; i < read_intervals_nb; i++) {
1675  ret = read_interval_packets(tfc, ifile, &read_intervals[i], &cur_ts);
1676  if (ret < 0)
1677  break;
1678  }
1679  }
1680 
1681  return ret;
1682 }
1683 
1684 static void print_dispositions(AVTextFormatContext *tfc, uint32_t disposition, SectionID section_id)
1685 {
1686  avtext_print_section_header(tfc, NULL, section_id);
1687  for (int i = 0; i < sizeof(disposition) * CHAR_BIT; i++) {
1688  const char *disposition_str = av_disposition_to_string(1U << i);
1689 
1690  if (disposition_str)
1691  print_int(disposition_str, !!(disposition & (1U << i)));
1692  }
1694 }
1695 
1696 #define IN_PROGRAM 1
1697 #define IN_STREAM_GROUP 2
1698 
1699 static int show_stream(AVTextFormatContext *tfc, AVFormatContext *fmt_ctx, int stream_idx, InputStream *ist, int container)
1700 {
1701  AVStream *stream = ist->st;
1702  AVCodecParameters *par;
1704  char val_str[128];
1705  const char *s;
1706  AVRational sar, dar;
1707  AVBPrint pbuf;
1708  const AVCodecDescriptor *cd;
1709  const SectionID section_header[] = {
1713  };
1714  const SectionID section_disposition[] = {
1718  };
1719  const SectionID section_tags[] = {
1723  };
1724  int ret = 0;
1725  const char *profile = NULL;
1726 
1727  av_assert0(container < FF_ARRAY_ELEMS(section_header));
1728 
1730 
1731  avtext_print_section_header(tfc, NULL, section_header[container]);
1732 
1733  print_int("index", stream->index);
1734 
1735  par = stream->codecpar;
1736  dec_ctx = ist->dec_ctx;
1737  if (cd = avcodec_descriptor_get(par->codec_id)) {
1738  print_str("codec_name", cd->name);
1739  if (!do_bitexact) {
1740  print_str("codec_long_name",
1741  cd->long_name ? cd->long_name : "unknown");
1742  }
1743  } else {
1744  print_str_opt("codec_name", "unknown");
1745  if (!do_bitexact) {
1746  print_str_opt("codec_long_name", "unknown");
1747  }
1748  }
1749 
1750  if (!do_bitexact && (profile = avcodec_profile_name(par->codec_id, par->profile)))
1751  print_str("profile", profile);
1752  else {
1753  if (par->profile != AV_PROFILE_UNKNOWN) {
1754  char profile_num[12];
1755  snprintf(profile_num, sizeof(profile_num), "%d", par->profile);
1756  print_str("profile", profile_num);
1757  } else
1758  print_str_opt("profile", "unknown");
1759  }
1760 
1762  if (s) print_str ("codec_type", s);
1763  else print_str_opt("codec_type", "unknown");
1764 
1765  /* print AVI/FourCC tag */
1766  print_str("codec_tag_string", av_fourcc2str(par->codec_tag));
1767  print_fmt("codec_tag", "0x%04"PRIx32, par->codec_tag);
1768 
1769  switch (par->codec_type) {
1770  case AVMEDIA_TYPE_VIDEO:
1771  print_int("width", par->width);
1772  print_int("height", par->height);
1773  if (dec_ctx) {
1774  print_int("coded_width", dec_ctx->coded_width);
1775  print_int("coded_height", dec_ctx->coded_height);
1776 
1777  if (do_analyze_frames) {
1778  print_int("closed_captions", streams_with_closed_captions[stream->index]);
1779  print_int("film_grain", streams_with_film_grain[stream->index]);
1780  }
1781  }
1782  print_int("has_b_frames", par->video_delay);
1783  sar = av_guess_sample_aspect_ratio(fmt_ctx, stream, NULL);
1784  if (sar.num) {
1785  print_q("sample_aspect_ratio", sar, ':');
1786  av_reduce(&dar.num, &dar.den,
1787  (int64_t) par->width * sar.num,
1788  (int64_t) par->height * sar.den,
1789  1024*1024);
1790  print_q("display_aspect_ratio", dar, ':');
1791  } else {
1792  print_str_opt("sample_aspect_ratio", "N/A");
1793  print_str_opt("display_aspect_ratio", "N/A");
1794  }
1795  print_pixel_format(tfc, par->format);
1796  print_int("level", par->level);
1797 
1798  print_color_range(tfc, par->color_range);
1799  print_color_space(tfc, par->color_space);
1800  print_color_trc(tfc, par->color_trc);
1801  print_primaries(tfc, par->color_primaries);
1803 
1804  if (par->field_order == AV_FIELD_PROGRESSIVE)
1805  print_str("field_order", "progressive");
1806  else if (par->field_order == AV_FIELD_TT)
1807  print_str("field_order", "tt");
1808  else if (par->field_order == AV_FIELD_BB)
1809  print_str("field_order", "bb");
1810  else if (par->field_order == AV_FIELD_TB)
1811  print_str("field_order", "tb");
1812  else if (par->field_order == AV_FIELD_BT)
1813  print_str("field_order", "bt");
1814  else
1815  print_str_opt("field_order", "unknown");
1816 
1817  if (dec_ctx)
1818  print_int("refs", dec_ctx->refs);
1819  break;
1820 
1821  case AVMEDIA_TYPE_AUDIO:
1823  if (s) print_str ("sample_fmt", s);
1824  else print_str_opt("sample_fmt", "unknown");
1825  print_val("sample_rate", par->sample_rate, unit_hertz_str);
1826  print_int("channels", par->ch_layout.nb_channels);
1827 
1828  if (par->ch_layout.order != AV_CHANNEL_ORDER_UNSPEC) {
1829  av_channel_layout_describe(&par->ch_layout, val_str, sizeof(val_str));
1830  print_str ("channel_layout", val_str);
1831  } else {
1832  print_str_opt("channel_layout", "unknown");
1833  }
1834 
1835  print_int("bits_per_sample", av_get_bits_per_sample(par->codec_id));
1836 
1837  print_int("initial_padding", par->initial_padding);
1838  break;
1839 
1840  case AVMEDIA_TYPE_SUBTITLE:
1841  if (par->width)
1842  print_int("width", par->width);
1843  else
1844  print_str_opt("width", "N/A");
1845  if (par->height)
1846  print_int("height", par->height);
1847  else
1848  print_str_opt("height", "N/A");
1849  break;
1850  }
1851 
1852  if (show_private_data) {
1853  if (dec_ctx && dec_ctx->codec->priv_class)
1855  if (fmt_ctx->iformat->priv_class)
1857  }
1858 
1859  if (fmt_ctx->iformat->flags & AVFMT_SHOW_IDS) print_fmt ("id", "0x%x", stream->id);
1860  else print_str_opt("id", "N/A");
1861  print_q("r_frame_rate", stream->r_frame_rate, '/');
1862  print_q("avg_frame_rate", stream->avg_frame_rate, '/');
1863  print_q("time_base", stream->time_base, '/');
1864  print_ts ("start_pts", stream->start_time);
1865  print_time("start_time", stream->start_time, &stream->time_base);
1866  print_ts ("duration_ts", stream->duration);
1867  print_time("duration", stream->duration, &stream->time_base);
1868  if (par->bit_rate > 0) print_val ("bit_rate", par->bit_rate, unit_bit_per_second_str);
1869  else print_str_opt("bit_rate", "N/A");
1870  if (dec_ctx && dec_ctx->rc_max_rate > 0)
1872  else
1873  print_str_opt("max_bit_rate", "N/A");
1874  if (dec_ctx && dec_ctx->bits_per_raw_sample > 0) print_fmt("bits_per_raw_sample", "%d", dec_ctx->bits_per_raw_sample);
1875  else print_str_opt("bits_per_raw_sample", "N/A");
1876  if (stream->nb_frames) print_fmt ("nb_frames", "%"PRId64, stream->nb_frames);
1877  else print_str_opt("nb_frames", "N/A");
1878  if (nb_streams_frames[stream_idx]) print_fmt ("nb_read_frames", "%"PRIu64, nb_streams_frames[stream_idx]);
1879  else print_str_opt("nb_read_frames", "N/A");
1880  if (nb_streams_packets[stream_idx]) print_fmt ("nb_read_packets", "%"PRIu64, nb_streams_packets[stream_idx]);
1881  else print_str_opt("nb_read_packets", "N/A");
1882  if (do_show_data)
1883  avtext_print_data(tfc, "extradata", par->extradata,
1884  par->extradata_size);
1885 
1886  if (par->extradata_size > 0) {
1887  print_int("extradata_size", par->extradata_size);
1888  avtext_print_data_hash(tfc, "extradata_hash", par->extradata,
1889  par->extradata_size);
1890  }
1891 
1892  /* Print disposition information */
1894  av_assert0(container < FF_ARRAY_ELEMS(section_disposition));
1895  print_dispositions(tfc, stream->disposition, section_disposition[container]);
1896  }
1897 
1898  if (do_show_stream_tags) {
1899  av_assert0(container < FF_ARRAY_ELEMS(section_tags));
1900  ret = show_tags(tfc, stream->metadata, section_tags[container]);
1901  }
1902 
1903  if (stream->codecpar->nb_coded_side_data) {
1905  for (int i = 0; i < stream->codecpar->nb_coded_side_data; i++) {
1906  print_pkt_side_data(tfc, stream->codecpar, &stream->codecpar->coded_side_data[i],
1909  }
1911  }
1912 
1914  av_bprint_finalize(&pbuf, NULL);
1915  fflush(stdout);
1916 
1917  return ret;
1918 }
1919 
1921 {
1922  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1923  int i, ret = 0;
1924 
1926  for (i = 0; i < ifile->nb_streams; i++)
1927  if (selected_streams[i]) {
1928  ret = show_stream(tfc, fmt_ctx, i, &ifile->streams[i], 0);
1929  if (ret < 0)
1930  break;
1931  }
1933 
1934  return ret;
1935 }
1936 
1938 {
1939  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1940  int i, ret = 0;
1941 
1943  print_int("program_id", program->id);
1944  print_int("program_num", program->program_num);
1945  print_int("nb_streams", program->nb_stream_indexes);
1946  print_int("pmt_pid", program->pmt_pid);
1947  print_int("pcr_pid", program->pcr_pid);
1949  ret = show_tags(tfc, program->metadata, SECTION_ID_PROGRAM_TAGS);
1950  if (ret < 0)
1951  goto end;
1952 
1954  for (i = 0; i < program->nb_stream_indexes; i++) {
1955  if (selected_streams[program->stream_index[i]]) {
1956  ret = show_stream(tfc, fmt_ctx, program->stream_index[i], &ifile->streams[program->stream_index[i]], IN_PROGRAM);
1957  if (ret < 0)
1958  break;
1959  }
1960  }
1962 
1963 end:
1965  return ret;
1966 }
1967 
1969 {
1970  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
1971  int i, ret = 0;
1972 
1974  for (i = 0; i < fmt_ctx->nb_programs; i++) {
1976  if (!program)
1977  continue;
1978  ret = show_program(tfc, ifile, program);
1979  if (ret < 0)
1980  break;
1981  }
1983  return ret;
1984 }
1985 
1987  const AVStreamGroupTileGrid *tile_grid)
1988 {
1990  print_int("nb_tiles", tile_grid->nb_tiles);
1991  print_int("coded_width", tile_grid->coded_width);
1992  print_int("coded_height", tile_grid->coded_height);
1993  print_int("horizontal_offset", tile_grid->horizontal_offset);
1994  print_int("vertical_offset", tile_grid->vertical_offset);
1995  print_int("width", tile_grid->width);
1996  print_int("height", tile_grid->height);
1998  for (int i = 0; i < tile_grid->nb_tiles; i++) {
2000  print_int("stream_index", tile_grid->offsets[i].idx);
2001  print_int("tile_horizontal_offset", tile_grid->offsets[i].horizontal);
2002  print_int("tile_vertical_offset", tile_grid->offsets[i].vertical);
2004  }
2007 }
2008 
2010  const AVIAMFParamDefinition *param, SectionID section_id)
2011 {
2012  SectionID subsection_id, parameter_section_id;
2013  subsection_id = sections[section_id].children_ids[0];
2014  av_assert0(subsection_id != -1);
2015  parameter_section_id = sections[subsection_id].children_ids[0];
2016  av_assert0(parameter_section_id != -1);
2017  avtext_print_section_header(tfc, "IAMF Param Definition", section_id);
2018  print_str("name", name);
2019  print_int("nb_subblocks", param->nb_subblocks);
2020  print_int("type", param->type);
2021  print_int("parameter_id", param->parameter_id);
2022  print_int("parameter_rate", param->parameter_rate);
2023  print_int("duration", param->duration);
2024  print_int("constant_subblock_duration", param->constant_subblock_duration);
2025  if (param->nb_subblocks > 0)
2026  avtext_print_section_header(tfc, NULL, subsection_id);
2027  for (int i = 0; i < param->nb_subblocks; i++) {
2028  const void *subblock = av_iamf_param_definition_get_subblock(param, i);
2029  switch(param->type) {
2031  const AVIAMFMixGain *mix = subblock;
2032  avtext_print_section_header(tfc, "IAMF Mix Gain Parameters", parameter_section_id);
2033  print_int("subblock_duration", mix->subblock_duration);
2034  print_int("animation_type", mix->animation_type);
2035  print_q("start_point_value", mix->start_point_value, '/');
2036  print_q("end_point_value", mix->end_point_value, '/');
2037  print_q("control_point_value", mix->control_point_value, '/');
2038  print_q("control_point_relative_time", mix->control_point_relative_time, '/');
2039  avtext_print_section_footer(tfc); // parameter_section_id
2040  break;
2041  }
2043  const AVIAMFDemixingInfo *demix = subblock;
2044  avtext_print_section_header(tfc, "IAMF Demixing Info", parameter_section_id);
2045  print_int("subblock_duration", demix->subblock_duration);
2046  print_int("dmixp_mode", demix->dmixp_mode);
2047  avtext_print_section_footer(tfc); // parameter_section_id
2048  break;
2049  }
2051  const AVIAMFReconGain *recon = subblock;
2052  avtext_print_section_header(tfc, "IAMF Recon Gain", parameter_section_id);
2053  print_int("subblock_duration", recon->subblock_duration);
2054  avtext_print_section_footer(tfc); // parameter_section_id
2055  break;
2056  }
2057  }
2058  }
2059  if (param->nb_subblocks > 0)
2060  avtext_print_section_footer(tfc); // subsection_id
2061  avtext_print_section_footer(tfc); // section_id
2062 }
2063 
2065  const AVIAMFAudioElement *audio_element)
2066 {
2068  print_int("nb_layers", audio_element->nb_layers);
2069  print_int("audio_element_type", audio_element->audio_element_type);
2070  print_int("default_w", audio_element->default_w);
2072  for (int i = 0; i < audio_element->nb_layers; i++) {
2073  const AVIAMFLayer *layer = audio_element->layers[i];
2074  char val_str[128];
2076  av_channel_layout_describe(&layer->ch_layout, val_str, sizeof(val_str));
2077  print_str("channel_layout", val_str);
2079  print_int("output_gain_flags", layer->output_gain_flags);
2080  print_q("output_gain", layer->output_gain, '/');
2081  } else if (audio_element->audio_element_type == AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE)
2082  print_int("ambisonics_mode", layer->ambisonics_mode);
2083  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENT
2084  }
2085  if (audio_element->demixing_info)
2086  print_iamf_param_definition(tfc, "demixing_info", audio_element->demixing_info,
2088  if (audio_element->recon_gain_info)
2089  print_iamf_param_definition(tfc, "recon_gain_info", audio_element->recon_gain_info,
2091  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENTS
2092  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_COMPONENT
2093 }
2094 
2096 {
2098  print_int("nb_elements", submix->nb_elements);
2099  print_int("nb_layouts", submix->nb_layouts);
2100  print_q("default_mix_gain", submix->default_mix_gain, '/');
2102  for (int i = 0; i < submix->nb_elements; i++) {
2103  const AVIAMFSubmixElement *element = submix->elements[i];
2104  avtext_print_section_header(tfc, "IAMF Submix Element", SECTION_ID_STREAM_GROUP_PIECE);
2105  print_int("stream_id", element->audio_element_id);
2106  print_q("default_mix_gain", element->default_mix_gain, '/');
2107  print_int("headphones_rendering_mode", element->headphones_rendering_mode);
2109  if (element->annotations) {
2110  const AVDictionaryEntry *annotation = NULL;
2112  while (annotation = av_dict_iterate(element->annotations, annotation))
2113  print_str(annotation->key, annotation->value);
2114  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBPIECE
2115  }
2116  if (element->element_mix_config)
2117  print_iamf_param_definition(tfc, "element_mix_config", element->element_mix_config,
2119  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBPIECES
2120  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_PIECE
2121  }
2122  if (submix->output_mix_config)
2123  print_iamf_param_definition(tfc, "output_mix_config", submix->output_mix_config,
2125  for (int i = 0; i < submix->nb_layouts; i++) {
2126  const AVIAMFSubmixLayout *layout = submix->layouts[i];
2127  char val_str[128];
2128  avtext_print_section_header(tfc, "IAMF Submix Layout", SECTION_ID_STREAM_GROUP_PIECE);
2129  av_channel_layout_describe(&layout->sound_system, val_str, sizeof(val_str));
2130  print_str("sound_system", val_str);
2131  print_q("integrated_loudness", layout->integrated_loudness, '/');
2132  print_q("digital_peak", layout->digital_peak, '/');
2133  print_q("true_peak", layout->true_peak, '/');
2134  print_q("dialogue_anchored_loudness", layout->dialogue_anchored_loudness, '/');
2135  print_q("album_anchored_loudness", layout->album_anchored_loudness, '/');
2136  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_PIECE
2137  }
2138  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_PIECES
2139  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENT
2140 }
2141 
2143  const AVIAMFMixPresentation *mix_presentation)
2144 {
2146  print_int("nb_submixes", mix_presentation->nb_submixes);
2148  if (mix_presentation->annotations) {
2149  const AVDictionaryEntry *annotation = NULL;
2151  while (annotation = av_dict_iterate(mix_presentation->annotations, annotation))
2152  print_str(annotation->key, annotation->value);
2153  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENT
2154  }
2155  for (int i = 0; i < mix_presentation->nb_submixes; i++)
2156  print_iamf_submix_params(tfc, mix_presentation->submixes[i]);
2157  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_SUBCOMPONENTS
2158  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_COMPONENT
2159 }
2160 
2162 {
2165  print_tile_grid_params(tfc, stg, stg->params.tile_grid);
2170  avtext_print_section_footer(tfc); // SECTION_ID_STREAM_GROUP_COMPONENTS
2171 }
2172 
2174 {
2175  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2176  AVBPrint pbuf;
2177  int i, ret = 0;
2178 
2181  print_int("index", stg->index);
2182  if (fmt_ctx->iformat->flags & AVFMT_SHOW_IDS) print_fmt ("id", "0x%"PRIx64, stg->id);
2183  else print_str_opt("id", "N/A");
2184  print_int("nb_streams", stg->nb_streams);
2185  if (stg->type != AV_STREAM_GROUP_PARAMS_NONE)
2186  print_str("type", av_x_if_null(avformat_stream_group_name(stg->type), "unknown"));
2187  else
2188  print_str_opt("type", "unknown");
2190  print_stream_group_params(tfc, stg);
2191 
2192  /* Print disposition information */
2195 
2198  if (ret < 0)
2199  goto end;
2200 
2202  for (i = 0; i < stg->nb_streams; i++) {
2203  if (selected_streams[stg->streams[i]->index]) {
2204  ret = show_stream(tfc, fmt_ctx, stg->streams[i]->index, &ifile->streams[stg->streams[i]->index], IN_STREAM_GROUP);
2205  if (ret < 0)
2206  break;
2207  }
2208  }
2210 
2211 end:
2212  av_bprint_finalize(&pbuf, NULL);
2214  return ret;
2215 }
2216 
2218 {
2219  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2220  int i, ret = 0;
2221 
2223  for (i = 0; i < fmt_ctx->nb_stream_groups; i++) {
2225 
2226  ret = show_stream_group(tfc, ifile, stg);
2227  if (ret < 0)
2228  break;
2229  }
2231  return ret;
2232 }
2233 
2235 {
2236  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2237  int i, ret = 0;
2238 
2240  for (i = 0; i < fmt_ctx->nb_chapters; i++) {
2241  AVChapter *chapter = fmt_ctx->chapters[i];
2242 
2244  print_int("id", chapter->id);
2245  print_q ("time_base", chapter->time_base, '/');
2246  print_int("start", chapter->start);
2247  print_time("start_time", chapter->start, &chapter->time_base);
2248  print_int("end", chapter->end);
2249  print_time("end_time", chapter->end, &chapter->time_base);
2251  ret = show_tags(tfc, chapter->metadata, SECTION_ID_CHAPTER_TAGS);
2253  }
2255 
2256  return ret;
2257 }
2258 
2260 {
2261  AVFormatContext *fmt_ctx = ifile->fmt_ctx;
2262  int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1;
2263  int ret = 0;
2264 
2266  print_str_validate("filename", fmt_ctx->url);
2267  print_int("nb_streams", fmt_ctx->nb_streams);
2268  print_int("nb_programs", fmt_ctx->nb_programs);
2269  print_int("nb_stream_groups", fmt_ctx->nb_stream_groups);
2270  print_str("format_name", fmt_ctx->iformat->name);
2271  if (!do_bitexact) {
2272  if (fmt_ctx->iformat->long_name) print_str ("format_long_name", fmt_ctx->iformat->long_name);
2273  else print_str_opt("format_long_name", "unknown");
2274  }
2275  print_time("start_time", fmt_ctx->start_time, &AV_TIME_BASE_Q);
2276  print_time("duration", fmt_ctx->duration, &AV_TIME_BASE_Q);
2277  if (size >= 0) print_val ("size", size, unit_byte_str);
2278  else print_str_opt("size", "N/A");
2280  else print_str_opt("bit_rate", "N/A");
2281  print_int("probe_score", fmt_ctx->probe_score);
2282  if (do_show_format_tags)
2284 
2286  fflush(stdout);
2287  return ret;
2288 }
2289 
2290 static void show_error(AVTextFormatContext *tfc, int err)
2291 {
2293  print_int("code", err);
2294  print_str("string", av_err2str(err));
2296 }
2297 
2298 static int open_input_file(InputFile *ifile, const char *filename,
2299  const char *print_filename)
2300 {
2301  int err, i;
2303  const AVDictionaryEntry *t = NULL;
2304  int scan_all_pmts_set = 0;
2305 
2307  if (!fmt_ctx)
2308  return AVERROR(ENOMEM);
2309 
2310  if (!av_dict_get(format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE)) {
2311  av_dict_set(&format_opts, "scan_all_pmts", "1", AV_DICT_DONT_OVERWRITE);
2312  scan_all_pmts_set = 1;
2313  }
2314  if ((err = avformat_open_input(&fmt_ctx, filename,
2315  iformat, &format_opts)) < 0) {
2316  print_error(filename, err);
2317  return err;
2318  }
2319  if (print_filename) {
2320  av_freep(&fmt_ctx->url);
2321  fmt_ctx->url = av_strdup(print_filename);
2322  }
2323  ifile->fmt_ctx = fmt_ctx;
2324  if (scan_all_pmts_set)
2325  av_dict_set(&format_opts, "scan_all_pmts", NULL, AV_DICT_MATCH_CASE);
2326  while ((t = av_dict_iterate(format_opts, t)))
2327  av_log(NULL, AV_LOG_WARNING, "Option %s skipped - not known to demuxer.\n", t->key);
2328 
2329  if (find_stream_info) {
2330  AVDictionary **opts;
2331  int orig_nb_streams = fmt_ctx->nb_streams;
2332 
2334  if (err < 0)
2335  return err;
2336 
2338 
2339  for (i = 0; i < orig_nb_streams; i++)
2340  av_dict_free(&opts[i]);
2341  av_freep(&opts);
2342 
2343  if (err < 0) {
2344  print_error(filename, err);
2345  return err;
2346  }
2347  }
2348 
2349  av_dump_format(fmt_ctx, 0, filename, 0);
2350 
2351  ifile->streams = av_calloc(fmt_ctx->nb_streams, sizeof(*ifile->streams));
2352  if (!ifile->streams)
2353  exit(1);
2354  ifile->nb_streams = fmt_ctx->nb_streams;
2355 
2356  /* bind a decoder to each input stream */
2357  for (i = 0; i < fmt_ctx->nb_streams; i++) {
2358  InputStream *ist = &ifile->streams[i];
2359  AVStream *stream = fmt_ctx->streams[i];
2360  const AVCodec *codec;
2361 
2362  ist->st = stream;
2363 
2364  if (stream->codecpar->codec_id == AV_CODEC_ID_PROBE) {
2366  "Failed to probe codec for input stream %d\n",
2367  stream->index);
2368  continue;
2369  }
2370 
2371  codec = avcodec_find_decoder(stream->codecpar->codec_id);
2372  if (!codec) {
2374  "Unsupported codec with id %d for input stream %d\n",
2375  stream->codecpar->codec_id, stream->index);
2376  continue;
2377  }
2378  {
2379  AVDictionary *opts;
2380 
2382  fmt_ctx, stream, codec, &opts, NULL);
2383  if (err < 0)
2384  exit(1);
2385 
2386  ist->dec_ctx = avcodec_alloc_context3(codec);
2387  if (!ist->dec_ctx)
2388  exit(1);
2389 
2390  err = avcodec_parameters_to_context(ist->dec_ctx, stream->codecpar);
2391  if (err < 0)
2392  exit(1);
2393 
2394  if (do_show_log) {
2395  // For loging it is needed to disable at least frame threads as otherwise
2396  // the log information would need to be reordered and matches up to contexts and frames
2397  // That is in fact possible but not trivial
2398  av_dict_set(&codec_opts, "threads", "1", 0);
2399  }
2400 
2401  av_dict_set(&opts, "flags", "+copy_opaque", AV_DICT_MULTIKEY);
2402 
2403  ist->dec_ctx->pkt_timebase = stream->time_base;
2404 
2405  if (avcodec_open2(ist->dec_ctx, codec, &opts) < 0) {
2406  av_log(NULL, AV_LOG_WARNING, "Could not open codec for input stream %d\n",
2407  stream->index);
2408  exit(1);
2409  }
2410 
2411  if ((t = av_dict_iterate(opts, NULL))) {
2412  av_log(NULL, AV_LOG_ERROR, "Option %s for input stream %d not found\n",
2413  t->key, stream->index);
2414  return AVERROR_OPTION_NOT_FOUND;
2415  }
2416  }
2417  }
2418 
2419  ifile->fmt_ctx = fmt_ctx;
2420  return 0;
2421 }
2422 
2423 static void close_input_file(InputFile *ifile)
2424 {
2425  int i;
2426 
2427  /* close decoder for each stream */
2428  for (i = 0; i < ifile->nb_streams; i++)
2430 
2431  av_freep(&ifile->streams);
2432  ifile->nb_streams = 0;
2433 
2434  avformat_close_input(&ifile->fmt_ctx);
2435 }
2436 
2437 static int probe_file(AVTextFormatContext *tfc, const char *filename,
2438  const char *print_filename)
2439 {
2440  InputFile ifile = { 0 };
2441  int ret, i;
2442  int section_id;
2443 
2447 
2448  ret = open_input_file(&ifile, filename, print_filename);
2449  if (ret < 0)
2450  goto end;
2451 
2452 #define CHECK_END if (ret < 0) goto end
2453 
2454  nb_streams = ifile.fmt_ctx->nb_streams;
2460 
2461  for (i = 0; i < ifile.fmt_ctx->nb_streams; i++) {
2462  if (stream_specifier) {
2464  ifile.fmt_ctx->streams[i],
2466  CHECK_END;
2467  else
2468  selected_streams[i] = ret;
2469  ret = 0;
2470  } else {
2471  selected_streams[i] = 1;
2472  }
2473  if (!selected_streams[i])
2474  ifile.fmt_ctx->streams[i]->discard = AVDISCARD_ALL;
2475  }
2476 
2480  section_id = SECTION_ID_PACKETS_AND_FRAMES;
2481  else if (do_show_packets && !do_show_frames)
2482  section_id = SECTION_ID_PACKETS;
2483  else // (!do_show_packets && do_show_frames)
2484  section_id = SECTION_ID_FRAMES;
2486  avtext_print_section_header(tfc, NULL, section_id);
2487  ret = read_packets(tfc, &ifile);
2490  CHECK_END;
2491  }
2492 
2493  if (do_show_programs) {
2494  ret = show_programs(tfc, &ifile);
2495  CHECK_END;
2496  }
2497 
2498  if (do_show_stream_groups) {
2499  ret = show_stream_groups(tfc, &ifile);
2500  CHECK_END;
2501  }
2502 
2503  if (do_show_streams) {
2504  ret = show_streams(tfc, &ifile);
2505  CHECK_END;
2506  }
2507  if (do_show_chapters) {
2508  ret = show_chapters(tfc, &ifile);
2509  CHECK_END;
2510  }
2511  if (do_show_format) {
2512  ret = show_format(tfc, &ifile);
2513  CHECK_END;
2514  }
2515 
2516 end:
2517  if (ifile.fmt_ctx)
2518  close_input_file(&ifile);
2524 
2525  return ret;
2526 }
2527 
2528 static void show_usage(void)
2529 {
2530  av_log(NULL, AV_LOG_INFO, "Simple multimedia streams analyzer\n");
2531  av_log(NULL, AV_LOG_INFO, "usage: %s [OPTIONS] INPUT_FILE\n", program_name);
2532  av_log(NULL, AV_LOG_INFO, "\n");
2533 }
2534 
2536 {
2537  AVBPrint pbuf;
2539 
2541  print_str("version", FFMPEG_VERSION);
2542  print_fmt("copyright", "Copyright (c) %d-%d the FFmpeg developers",
2543  program_birth_year, CONFIG_THIS_YEAR);
2544  print_str("compiler_ident", CC_IDENT);
2545  print_str("configuration", FFMPEG_CONFIGURATION);
2547 
2548  av_bprint_finalize(&pbuf, NULL);
2549 }
2550 
2551 #define SHOW_LIB_VERSION(libname, LIBNAME) \
2552  do { \
2553  if (CONFIG_##LIBNAME) { \
2554  unsigned int version = libname##_version(); \
2555  avtext_print_section_header(tfc, NULL, SECTION_ID_LIBRARY_VERSION); \
2556  print_str("name", "lib" #libname); \
2557  print_int("major", LIB##LIBNAME##_VERSION_MAJOR); \
2558  print_int("minor", LIB##LIBNAME##_VERSION_MINOR); \
2559  print_int("micro", LIB##LIBNAME##_VERSION_MICRO); \
2560  print_int("version", version); \
2561  print_str("ident", LIB##LIBNAME##_IDENT); \
2562  avtext_print_section_footer(tfc); \
2563  } \
2564  } while (0)
2565 
2567 {
2569  SHOW_LIB_VERSION(avutil, AVUTIL);
2570  SHOW_LIB_VERSION(avcodec, AVCODEC);
2571  SHOW_LIB_VERSION(avformat, AVFORMAT);
2572  SHOW_LIB_VERSION(avdevice, AVDEVICE);
2573  SHOW_LIB_VERSION(avfilter, AVFILTER);
2574  SHOW_LIB_VERSION(swscale, SWSCALE);
2575  SHOW_LIB_VERSION(swresample, SWRESAMPLE);
2576  SHOW_LIB_VERSION(postproc, POSTPROC);
2578 }
2579 
2580 #define PRINT_PIX_FMT_FLAG(flagname, name) \
2581  do { \
2582  print_int(name, !!(pixdesc->flags & AV_PIX_FMT_FLAG_##flagname)); \
2583  } while (0)
2584 
2586 {
2587  const AVPixFmtDescriptor *pixdesc = NULL;
2588  int i, n;
2589 
2591  while (pixdesc = av_pix_fmt_desc_next(pixdesc)) {
2593  print_str("name", pixdesc->name);
2594  print_int("nb_components", pixdesc->nb_components);
2595  if ((pixdesc->nb_components >= 3) && !(pixdesc->flags & AV_PIX_FMT_FLAG_RGB)) {
2596  print_int ("log2_chroma_w", pixdesc->log2_chroma_w);
2597  print_int ("log2_chroma_h", pixdesc->log2_chroma_h);
2598  } else {
2599  print_str_opt("log2_chroma_w", "N/A");
2600  print_str_opt("log2_chroma_h", "N/A");
2601  }
2602  n = av_get_bits_per_pixel(pixdesc);
2603  if (n) print_int ("bits_per_pixel", n);
2604  else print_str_opt("bits_per_pixel", "N/A");
2607  PRINT_PIX_FMT_FLAG(BE, "big_endian");
2608  PRINT_PIX_FMT_FLAG(PAL, "palette");
2609  PRINT_PIX_FMT_FLAG(BITSTREAM, "bitstream");
2610  PRINT_PIX_FMT_FLAG(HWACCEL, "hwaccel");
2611  PRINT_PIX_FMT_FLAG(PLANAR, "planar");
2612  PRINT_PIX_FMT_FLAG(RGB, "rgb");
2613  PRINT_PIX_FMT_FLAG(ALPHA, "alpha");
2615  }
2616  if (do_show_pixel_format_components && (pixdesc->nb_components > 0)) {
2618  for (i = 0; i < pixdesc->nb_components; i++) {
2620  print_int("index", i + 1);
2621  print_int("bit_depth", pixdesc->comp[i].depth);
2623  }
2625  }
2627  }
2629 }
2630 
2631 static int opt_show_optional_fields(void *optctx, const char *opt, const char *arg)
2632 {
2636 
2638  double num;
2639  int ret = parse_number("show_optional_fields", arg, OPT_TYPE_INT,
2641  if (ret < 0)
2642  return ret;
2643  show_optional_fields = num;
2644  }
2645  return 0;
2646 }
2647 
2648 static int opt_format(void *optctx, const char *opt, const char *arg)
2649 {
2651  if (!iformat) {
2652  av_log(NULL, AV_LOG_ERROR, "Unknown input format: %s\n", arg);
2653  return AVERROR(EINVAL);
2654  }
2655  return 0;
2656 }
2657 
2658 static inline void mark_section_show_entries(SectionID section_id,
2659  int show_all_entries, AVDictionary *entries)
2660 {
2661  struct AVTextFormatSection *section = &sections[section_id];
2662 
2664  if (show_all_entries) {
2665  for (const int *id = section->children_ids; *id != -1; id++)
2667  } else {
2668  av_dict_copy(&section->entries_to_show, entries, 0);
2669  }
2670 }
2671 
2672 static int match_section(const char *section_name,
2673  int show_all_entries, AVDictionary *entries)
2674 {
2675  int i, ret = 0;
2676 
2677  for (i = 0; i < FF_ARRAY_ELEMS(sections); i++) {
2678  const struct AVTextFormatSection *section = &sections[i];
2679  if (!strcmp(section_name, section->name) ||
2680  (section->unique_name && !strcmp(section_name, section->unique_name))) {
2682  "'%s' matches section with unique name '%s'\n", section_name,
2683  (char *)av_x_if_null(section->unique_name, section->name));
2684  ret++;
2685  mark_section_show_entries(section->id, show_all_entries, entries);
2686  }
2687  }
2688  return ret;
2689 }
2690 
2691 static int opt_show_entries(void *optctx, const char *opt, const char *arg)
2692 {
2693  const char *p = arg;
2694  int ret = 0;
2695 
2696  while (*p) {
2697  AVDictionary *entries = NULL;
2698  char *section_name = av_get_token(&p, "=:");
2699  int show_all_entries = 0;
2700 
2701  if (!section_name) {
2703  "Missing section name for option '%s'\n", opt);
2704  return AVERROR(EINVAL);
2705  }
2706 
2707  if (*p == '=') {
2708  p++;
2709  while (*p && *p != ':') {
2710  char *entry = av_get_token(&p, ",:");
2711  if (!entry)
2712  break;
2714  "Adding '%s' to the entries to show in section '%s'\n",
2715  entry, section_name);
2716  av_dict_set(&entries, entry, "", AV_DICT_DONT_STRDUP_KEY);
2717  if (*p == ',')
2718  p++;
2719  }
2720  } else {
2721  show_all_entries = 1;
2722  }
2723 
2724  ret = match_section(section_name, show_all_entries, entries);
2725  if (ret == 0) {
2726  av_log(NULL, AV_LOG_ERROR, "No match for section '%s'\n", section_name);
2727  ret = AVERROR(EINVAL);
2728  }
2729  av_dict_free(&entries);
2730  av_free(section_name);
2731 
2732  if (ret <= 0)
2733  break;
2734  if (*p)
2735  p++;
2736  }
2737 
2738  return ret;
2739 }
2740 
2741 static int opt_input_file(void *optctx, const char *arg)
2742 {
2743  if (input_filename) {
2745  "Argument '%s' provided as input filename, but '%s' was already specified.\n",
2746  arg, input_filename);
2747  return AVERROR(EINVAL);
2748  }
2749  if (!strcmp(arg, "-"))
2750  arg = "fd:";
2752  if (!input_filename)
2753  return AVERROR(ENOMEM);
2754 
2755  return 0;
2756 }
2757 
2758 static int opt_input_file_i(void *optctx, const char *opt, const char *arg)
2759 {
2760  opt_input_file(optctx, arg);
2761  return 0;
2762 }
2763 
2764 static int opt_output_file_o(void *optctx, const char *opt, const char *arg)
2765 {
2766  if (output_filename) {
2768  "Argument '%s' provided as output filename, but '%s' was already specified.\n",
2769  arg, output_filename);
2770  return AVERROR(EINVAL);
2771  }
2772  if (!strcmp(arg, "-"))
2773  arg = "fd:";
2775  if (!output_filename)
2776  return AVERROR(ENOMEM);
2777 
2778  return 0;
2779 }
2780 
2781 static int opt_print_filename(void *optctx, const char *opt, const char *arg)
2782 {
2785  return print_input_filename ? 0 : AVERROR(ENOMEM);
2786 }
2787 
2788 void show_help_default(const char *opt, const char *arg)
2789 {
2791  show_usage();
2792  show_help_options(options, "Main options:", 0, 0);
2793  printf("\n");
2794 
2797 }
2798 
2799 /**
2800  * Parse interval specification, according to the format:
2801  * INTERVAL ::= [START|+START_OFFSET][%[END|+END_OFFSET]]
2802  * INTERVALS ::= INTERVAL[,INTERVALS]
2803 */
2804 static int parse_read_interval(const char *interval_spec,
2805  ReadInterval *interval)
2806 {
2807  int ret = 0;
2808  char *next, *p, *spec = av_strdup(interval_spec);
2809  if (!spec)
2810  return AVERROR(ENOMEM);
2811 
2812  if (!*spec) {
2813  av_log(NULL, AV_LOG_ERROR, "Invalid empty interval specification\n");
2814  ret = AVERROR(EINVAL);
2815  goto end;
2816  }
2817 
2818  p = spec;
2819  next = strchr(spec, '%');
2820  if (next)
2821  *next++ = 0;
2822 
2823  /* parse first part */
2824  if (*p) {
2825  interval->has_start = 1;
2826 
2827  if (*p == '+') {
2828  interval->start_is_offset = 1;
2829  p++;
2830  } else {
2831  interval->start_is_offset = 0;
2832  }
2833 
2834  ret = av_parse_time(&interval->start, p, 1);
2835  if (ret < 0) {
2836  av_log(NULL, AV_LOG_ERROR, "Invalid interval start specification '%s'\n", p);
2837  goto end;
2838  }
2839  } else {
2840  interval->has_start = 0;
2841  }
2842 
2843  /* parse second part */
2844  p = next;
2845  if (p && *p) {
2846  int64_t us;
2847  interval->has_end = 1;
2848 
2849  if (*p == '+') {
2850  interval->end_is_offset = 1;
2851  p++;
2852  } else {
2853  interval->end_is_offset = 0;
2854  }
2855 
2856  if (interval->end_is_offset && *p == '#') {
2857  long long int lli;
2858  char *tail;
2859  interval->duration_frames = 1;
2860  p++;
2861  lli = strtoll(p, &tail, 10);
2862  if (*tail || lli < 0) {
2864  "Invalid or negative value '%s' for duration number of frames\n", p);
2865  goto end;
2866  }
2867  interval->end = lli;
2868  } else {
2869  interval->duration_frames = 0;
2870  ret = av_parse_time(&us, p, 1);
2871  if (ret < 0) {
2872  av_log(NULL, AV_LOG_ERROR, "Invalid interval end/duration specification '%s'\n", p);
2873  goto end;
2874  }
2875  interval->end = us;
2876  }
2877  } else {
2878  interval->has_end = 0;
2879  }
2880 
2881 end:
2882  av_free(spec);
2883  return ret;
2884 }
2885 
2886 static int parse_read_intervals(const char *intervals_spec)
2887 {
2888  int ret, n, i;
2889  char *p, *spec = av_strdup(intervals_spec);
2890  if (!spec)
2891  return AVERROR(ENOMEM);
2892 
2893  /* preparse specification, get number of intervals */
2894  for (n = 0, p = spec; *p; p++)
2895  if (*p == ',')
2896  n++;
2897  n++;
2898 
2900  if (!read_intervals) {
2901  ret = AVERROR(ENOMEM);
2902  goto end;
2903  }
2904  read_intervals_nb = n;
2905 
2906  /* parse intervals */
2907  p = spec;
2908  for (i = 0; p; i++) {
2909  char *next;
2910 
2912  next = strchr(p, ',');
2913  if (next)
2914  *next++ = 0;
2915 
2916  read_intervals[i].id = i;
2918  if (ret < 0) {
2919  av_log(NULL, AV_LOG_ERROR, "Error parsing read interval #%d '%s'\n",
2920  i, p);
2921  goto end;
2922  }
2923  av_log(NULL, AV_LOG_VERBOSE, "Parsed log interval ");
2925  p = next;
2926  }
2928 
2929 end:
2930  av_free(spec);
2931  return ret;
2932 }
2933 
2934 static int opt_read_intervals(void *optctx, const char *opt, const char *arg)
2935 {
2936  return parse_read_intervals(arg);
2937 }
2938 
2939 static int opt_pretty(void *optctx, const char *opt, const char *arg)
2940 {
2941  show_value_unit = 1;
2942  use_value_prefix = 1;
2945  return 0;
2946 }
2947 
2948 static void print_section(SectionID id, int level)
2949 {
2950  const int *pid;
2951  const struct AVTextFormatSection *section = &sections[id];
2952  printf("%c%c%c%c",
2953  section->flags & AV_TEXTFORMAT_SECTION_FLAG_IS_WRAPPER ? 'W' : '.',
2954  section->flags & AV_TEXTFORMAT_SECTION_FLAG_IS_ARRAY ? 'A' : '.',
2956  section->flags & AV_TEXTFORMAT_SECTION_FLAG_HAS_TYPE ? 'T' : '.');
2957  printf("%*c %s", level * 4, ' ', section->name);
2958  if (section->unique_name)
2959  printf("/%s", section->unique_name);
2960  printf("\n");
2961 
2962  for (pid = section->children_ids; *pid != -1; pid++)
2963  print_section(*pid, level+1);
2964 }
2965 
2966 static int opt_sections(void *optctx, const char *opt, const char *arg)
2967 {
2968  printf("Sections:\n"
2969  "W... = Section is a wrapper (contains other sections, no local entries)\n"
2970  ".A.. = Section contains an array of elements of the same type\n"
2971  "..V. = Section may contain a variable number of fields with variable keys\n"
2972  "...T = Section contain a unique type\n"
2973  "FLAGS NAME/UNIQUE_NAME\n"
2974  "----\n");
2976  return 0;
2977 }
2978 
2979 static int opt_show_versions(void *optctx, const char *opt, const char *arg)
2980 {
2983  return 0;
2984 }
2985 
2986 #define DEFINE_OPT_SHOW_SECTION(section, target_section_id) \
2987  static int opt_show_##section(void *optctx, const char *opt, const char *arg) \
2988  { \
2989  mark_section_show_entries(SECTION_ID_##target_section_id, 1, NULL); \
2990  return 0; \
2991  }
2992 
2993 DEFINE_OPT_SHOW_SECTION(chapters, CHAPTERS)
2997 DEFINE_OPT_SHOW_SECTION(library_versions, LIBRARY_VERSIONS)
2998 DEFINE_OPT_SHOW_SECTION(packets, PACKETS)
2999 DEFINE_OPT_SHOW_SECTION(pixel_formats, PIXEL_FORMATS)
3000 DEFINE_OPT_SHOW_SECTION(program_version, PROGRAM_VERSION)
3001 DEFINE_OPT_SHOW_SECTION(streams, STREAMS)
3002 DEFINE_OPT_SHOW_SECTION(programs, PROGRAMS)
3003 DEFINE_OPT_SHOW_SECTION(stream_groups, STREAM_GROUPS)
3004 
3005 static const OptionDef real_options[] = {
3007  { "f", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_format}, "force format", "format" },
3008  { "unit", OPT_TYPE_BOOL, 0, {&show_value_unit}, "show unit of the displayed values" },
3009  { "prefix", OPT_TYPE_BOOL, 0, {&use_value_prefix}, "use SI prefixes for the displayed values" },
3010  { "byte_binary_prefix", OPT_TYPE_BOOL, 0, {&use_byte_value_binary_prefix},
3011  "use binary prefixes for byte units" },
3012  { "sexagesimal", OPT_TYPE_BOOL, 0, {&use_value_sexagesimal_format},
3013  "use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" },
3014  { "pretty", OPT_TYPE_FUNC, 0, {.func_arg = opt_pretty},
3015  "prettify the format of displayed values, make it more human readable" },
3016  { "output_format", OPT_TYPE_STRING, 0, { &output_format },
3017  "set the output printing format (available formats are: default, compact, csv, flat, ini, json, xml)", "format" },
3018  { "print_format", OPT_TYPE_STRING, 0, { &output_format }, "alias for -output_format (deprecated)" },
3019  { "of", OPT_TYPE_STRING, 0, { &output_format }, "alias for -output_format", "format" },
3020  { "select_streams", OPT_TYPE_STRING, 0, { &stream_specifier }, "select the specified streams", "stream_specifier" },
3021  { "sections", OPT_TYPE_FUNC, OPT_EXIT, {.func_arg = opt_sections}, "print sections structure and section information, and exit" },
3022  { "show_data", OPT_TYPE_BOOL, 0, { &do_show_data }, "show packets data" },
3023  { "show_data_hash", OPT_TYPE_STRING, 0, { &show_data_hash }, "show packets data hash" },
3024  { "show_error", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_error }, "show probing error" },
3025  { "show_format", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_format }, "show format/container info" },
3026  { "show_frames", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_frames }, "show frames info" },
3027  { "show_entries", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_show_entries},
3028  "show a set of specified entries", "entry_list" },
3029 #if HAVE_THREADS
3030  { "show_log", OPT_TYPE_INT, 0, { &do_show_log }, "show log" },
3031 #endif
3032  { "show_packets", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_packets }, "show packets info" },
3033  { "show_programs", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_programs }, "show programs info" },
3034  { "show_stream_groups", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_stream_groups }, "show stream groups info" },
3035  { "show_streams", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_streams }, "show streams info" },
3036  { "show_chapters", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_chapters }, "show chapters info" },
3037  { "count_frames", OPT_TYPE_BOOL, 0, { &do_count_frames }, "count the number of frames per stream" },
3038  { "count_packets", OPT_TYPE_BOOL, 0, { &do_count_packets }, "count the number of packets per stream" },
3039  { "show_program_version", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_program_version }, "show ffprobe version" },
3040  { "show_library_versions", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_library_versions }, "show library versions" },
3041  { "show_versions", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_versions }, "show program and library versions" },
3042  { "show_pixel_formats", OPT_TYPE_FUNC, 0, { .func_arg = &opt_show_pixel_formats }, "show pixel format descriptions" },
3043  { "show_optional_fields", OPT_TYPE_FUNC, OPT_FUNC_ARG, { .func_arg = &opt_show_optional_fields }, "show optional fields" },
3044  { "show_private_data", OPT_TYPE_BOOL, 0, { &show_private_data }, "show private data" },
3045  { "private", OPT_TYPE_BOOL, 0, { &show_private_data }, "same as show_private_data" },
3046  { "analyze_frames", OPT_TYPE_BOOL, 0, { &do_analyze_frames }, "analyze frames to provide additional stream-level information" },
3047  { "bitexact", OPT_TYPE_BOOL, 0, {&do_bitexact}, "force bitexact output" },
3048  { "read_intervals", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_read_intervals}, "set read intervals", "read_intervals" },
3049  { "i", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_input_file_i}, "read specified file", "input_file"},
3050  { "o", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_output_file_o}, "write to specified output", "output_file"},
3051  { "print_filename", OPT_TYPE_FUNC, OPT_FUNC_ARG, {.func_arg = opt_print_filename}, "override the printed input filename", "print_file"},
3052  { "find_stream_info", OPT_TYPE_BOOL, OPT_INPUT | OPT_EXPERT, { &find_stream_info },
3053  "read and decode the streams to fill missing information with heuristics" },
3054  { NULL, },
3055 };
3056 
3057 static inline int check_section_show_entries(int section_id)
3058 {
3059  struct AVTextFormatSection *section = &sections[section_id];
3060  if (sections[section_id].show_all_entries || sections[section_id].entries_to_show)
3061  return 1;
3062  for (const int *id = section->children_ids; *id != -1; id++)
3063  if (check_section_show_entries(*id))
3064  return 1;
3065  return 0;
3066 }
3067 
3068 #define SET_DO_SHOW(id, varname) do { \
3069  if (check_section_show_entries(SECTION_ID_##id)) \
3070  do_show_##varname = 1; \
3071  } while (0)
3072 
3073 int main(int argc, char **argv)
3074 {
3075  const AVTextFormatter *f;
3076  AVTextFormatContext *tctx;
3077  AVTextWriterContext *wctx;
3078  char *buf;
3079  char *f_name = NULL, *f_args = NULL;
3080  int ret, input_ret, i;
3081 
3082  init_dynload();
3083 
3085 
3087  parse_loglevel(argc, argv, options);
3089 #if CONFIG_AVDEVICE
3091 #endif
3092 
3093  show_banner(argc, argv, options);
3094  ret = parse_options(NULL, argc, argv, options, opt_input_file);
3095  if (ret < 0) {
3096  ret = (ret == AVERROR_EXIT) ? 0 : ret;
3097  goto end;
3098  }
3099 
3100  if (do_show_log)
3102 
3103  /* mark things to show, based on -show_entries */
3104  SET_DO_SHOW(CHAPTERS, chapters);
3106  SET_DO_SHOW(FORMAT, format);
3107  SET_DO_SHOW(FRAMES, frames);
3108  SET_DO_SHOW(LIBRARY_VERSIONS, library_versions);
3109  SET_DO_SHOW(PACKETS, packets);
3110  SET_DO_SHOW(PIXEL_FORMATS, pixel_formats);
3111  SET_DO_SHOW(PIXEL_FORMAT_FLAGS, pixel_format_flags);
3112  SET_DO_SHOW(PIXEL_FORMAT_COMPONENTS, pixel_format_components);
3113  SET_DO_SHOW(PROGRAM_VERSION, program_version);
3114  SET_DO_SHOW(PROGRAMS, programs);
3115  SET_DO_SHOW(STREAM_GROUP_DISPOSITION, stream_group_disposition);
3116  SET_DO_SHOW(STREAM_GROUPS, stream_groups);
3117  SET_DO_SHOW(STREAM_GROUP_COMPONENTS, stream_group_components);
3118  SET_DO_SHOW(STREAMS, streams);
3119  SET_DO_SHOW(STREAM_DISPOSITION, stream_disposition);
3120  SET_DO_SHOW(PROGRAM_STREAM_DISPOSITION, stream_disposition);
3121  SET_DO_SHOW(STREAM_GROUP_STREAM_DISPOSITION, stream_disposition);
3122 
3123  SET_DO_SHOW(CHAPTER_TAGS, chapter_tags);
3124  SET_DO_SHOW(FORMAT_TAGS, format_tags);
3125  SET_DO_SHOW(FRAME_TAGS, frame_tags);
3126  SET_DO_SHOW(PROGRAM_TAGS, program_tags);
3127  SET_DO_SHOW(STREAM_GROUP_TAGS, stream_group_tags);
3128  SET_DO_SHOW(STREAM_TAGS, stream_tags);
3129  SET_DO_SHOW(PROGRAM_STREAM_TAGS, stream_tags);
3130  SET_DO_SHOW(STREAM_GROUP_STREAM_TAGS, stream_tags);
3131  SET_DO_SHOW(PACKET_TAGS, packet_tags);
3132 
3135  "-bitexact and -show_program_version or -show_library_versions "
3136  "options are incompatible\n");
3137  ret = AVERROR(EINVAL);
3138  goto end;
3139  }
3140 
3141  if (!output_format)
3142  output_format = av_strdup("default");
3143  if (!output_format) {
3144  ret = AVERROR(ENOMEM);
3145  goto end;
3146  }
3147  f_name = av_strtok(output_format, "=", &buf);
3148  if (!f_name) {
3150  "No name specified for the output format\n");
3151  ret = AVERROR(EINVAL);
3152  goto end;
3153  }
3154  f_args = buf;
3155 
3156  f = avtext_get_formatter_by_name(f_name);
3157  if (!f) {
3158  av_log(NULL, AV_LOG_ERROR, "Unknown output format with name '%s'\n", f_name);
3159  ret = AVERROR(EINVAL);
3160  goto end;
3161  }
3162 
3163  if (output_filename) {
3165  } else
3167 
3168  if (ret < 0)
3169  goto end;
3170 
3171  if ((ret = avtext_context_open(&tctx, f, wctx, f_args,
3175  if (f == &avtextformatter_xml)
3177 
3179 
3186 
3187  if (!input_filename &&
3190  show_usage();
3191  av_log(NULL, AV_LOG_ERROR, "You have to specify one input file.\n");
3192  av_log(NULL, AV_LOG_ERROR, "Use -h to get full help or, even better, run 'man %s'.\n", program_name);
3193  ret = AVERROR(EINVAL);
3194  } else if (input_filename) {
3196  if (ret < 0 && do_show_error)
3197  show_error(tctx, ret);
3198  }
3199 
3200  input_ret = ret;
3201 
3203 
3205  if (ret < 0)
3206  av_log(NULL, AV_LOG_ERROR, "Writing output failed (closing writer): %s\n", av_err2str(ret));
3207 
3208  ret = avtext_context_close(&tctx);
3209  if (ret < 0)
3210  av_log(NULL, AV_LOG_ERROR, "Writing output failed (closing formatter): %s\n", av_err2str(ret));
3211 
3212  ret = FFMIN(ret, input_ret);
3213  }
3214 
3215 end:
3221 
3222  uninit_opts();
3223  for (i = 0; i < FF_ARRAY_ELEMS(sections); i++)
3225 
3227 
3228  return ret < 0;
3229 }
error
static void error(const char *err)
Definition: target_bsf_fuzzer.c:32
main
int main(int argc, char **argv)
Definition: ffprobe.c:3073
AVSubtitle
Definition: avcodec.h:2075
SECTION_ID_STREAM_SIDE_DATA_LIST
@ SECTION_ID_STREAM_SIDE_DATA_LIST
Definition: ffprobe.c:223
opt_format
static int opt_format(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2648
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:1139
AVMasteringDisplayMetadata::has_primaries
int has_primaries
Flag indicating whether the display primaries (and white point) are set.
Definition: mastering_display_metadata.h:62
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:2658
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:430
OPT_EXIT
#define OPT_EXIT
Definition: cmdutils.h:203
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:3396
AVDynamicHDRPlus::params
AVHDRPlusColorTransformParams params[3]
The color transform parameters for every processing window.
Definition: hdr_dynamic_metadata.h:264
AVMEDIA_TYPE_SUBTITLE
@ AVMEDIA_TYPE_SUBTITLE
Definition: avutil.h:204
AVIAMFSubmix::elements
AVIAMFSubmixElement ** elements
Array of submix elements.
Definition: iamf.h:565
AV_LOG_WARNING
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:215
AVIAMFAudioElement::nb_layers
unsigned int nb_layers
Number of layers, or channel groups, in the Audio Element.
Definition: iamf.h:368
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:131
AVMasteringDisplayMetadata::max_luminance
AVRational max_luminance
Max luminance of mastering display (cd/m^2).
Definition: mastering_display_metadata.h:57
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:75
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:1352
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:205
do_show_log
static int do_show_log
Definition: ffprobe.c:119
AVStreamGroup::id
int64_t id
Group type-specific group ID.
Definition: avformat.h:1118
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:87
dec_ctx
static AVCodecContext * dec_ctx
Definition: decode_filter_audio.c:47
SECTION_ID_STREAM_SIDE_DATA
@ SECTION_ID_STREAM_SIDE_DATA
Definition: ffprobe.c:224
AVIAMFSubmix::layouts
AVIAMFSubmixLayout ** layouts
Array of submix layouts.
Definition: iamf.h:580
AVTextFormatSection::entries_to_show
AVDictionary * entries_to_show
Definition: avtextformat.h:52
do_show_frame_tags
static int do_show_frame_tags
Definition: ffprobe.c:123
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:716
PLANAR
#define PLANAR
Definition: flacdsp.c:42
AVChapter::metadata
AVDictionary * metadata
Definition: avformat.h:1228
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:2631
opt.h
FrameData::pkt_pos
int64_t pkt_pos
Definition: ffplay.c:148
read_intervals_nb
static int read_intervals_nb
Definition: ffprobe.c:153
opt_output_file_o
static int opt_output_file_o(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2764
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:1134
AVFMT_SHOW_IDS
#define AVFMT_SHOW_IDS
Show format stream IDs numbers.
Definition: avformat.h:477
AVSphericalMapping::projection
enum AVSphericalProjection projection
Projection type.
Definition: spherical.h:98
ReadInterval::end_is_offset
int end_is_offset
Definition: ffprobe.c:148
LogBuffer::log_message
char * log_message
Definition: ffprobe.c:348
AVColorTransferCharacteristic
AVColorTransferCharacteristic
Color Transfer Characteristic.
Definition: pixfmt.h:644
libm.h
FrameData
Definition: ffmpeg.h:658
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 paramter(for value of 1)
Definition: hdr_dynamic_vivid_metadata.h:88
print_str
#define print_str(k, v)
Definition: ffprobe.c:427
LogBuffer::context_name
char * context_name
Definition: ffprobe.c:346
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:434
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:185
AVFormatContext::nb_chapters
unsigned int nb_chapters
Number of chapters in AVChapter array.
Definition: avformat.h:1365
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:393
AVStreamGroupTileGrid::offsets
struct AVStreamGroupTileGrid::@379 * offsets
An nb_tiles sized array of offsets in pixels from the topleft edge of the canvas, indicating where ea...
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:1019
AVIAMFAudioElement::layers
AVIAMFLayer ** layers
Definition: iamf.h:359
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:816
AV_FIELD_PROGRESSIVE
@ AV_FIELD_PROGRESSIVE
Definition: defs.h:202
process_frame
static av_always_inline int process_frame(AVTextFormatContext *tfc, InputFile *ifile, AVFrame *frame, const AVPacket *pkt, int *packet_new)
Definition: ffprobe.c:1442
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
AVMasteringDisplayMetadata::display_primaries
AVRational display_primaries[3][2]
CIE 1931 xy chromaticity coords of color primaries (r, g, b order).
Definition: mastering_display_metadata.h:42
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:597
AVMasteringDisplayMetadata::has_luminance
int has_luminance
Flag indicating whether the luminance (min_ and max_) have been set.
Definition: mastering_display_metadata.h:67
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:264
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
selected_streams
static int * selected_streams
Definition: ffprobe.c:339
SECTION_ID_PROGRAM_TAGS
@ SECTION_ID_PROGRAM_TAGS
Definition: ffprobe.c:197
AVSubtitle::num_rects
unsigned num_rects
Definition: avcodec.h:2079
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:207
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:629
avformat_get_class
const AVClass * avformat_get_class(void)
Get the AVClass for AVFormatContext.
Definition: options.c:190
AVStreamGroup::disposition
int disposition
Stream group disposition - a combination of AV_DISPOSITION_* flags.
Definition: avformat.h:1176
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_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:63
AVContentLightMetadata::MaxCLL
unsigned MaxCLL
Max content light level (cd/m^2).
Definition: mastering_display_metadata.h:111
AVFilmGrainParams::aom
AVFilmGrainAOMParams aom
Definition: film_grain_params.h:247
print_ts
#define print_ts(k, v)
Definition: ffprobe.c:431
opt_input_file_i
static int opt_input_file_i(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2758
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:410
pixdesc.h
AVFormatContext::streams
AVStream ** streams
A list of all streams in the file.
Definition: avformat.h:1333
AVPacketSideData
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
Definition: packet.h:386
OPT_INPUT
#define OPT_INPUT
Definition: cmdutils.h:233
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:542
SECTION_ID_STREAM_GROUP_COMPONENTS
@ SECTION_ID_STREAM_GROUP_COMPONENTS
Definition: ffprobe.c:203
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:174
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
SECTION_ID_PIXEL_FORMAT_COMPONENTS
@ SECTION_ID_PIXEL_FORMAT_COMPONENTS
Definition: ffprobe.c:190
AVDynamicHDRPlus::num_cols_targeted_system_display_actual_peak_luminance
uint8_t num_cols_targeted_system_display_actual_peak_luminance
The number of columns in the targeted_system_display_actual_peak_luminance array.
Definition: hdr_dynamic_metadata.h:290
AVPacket::data
uint8_t * data
Definition: packet.h:535
avtext_print_data_hash
void avtext_print_data_hash(AVTextFormatContext *tctx, const char *name, const uint8_t *data, int size)
Definition: avtextformat.c:523
ReadInterval::duration_frames
int duration_frames
Definition: ffprobe.c:149
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:647
SECTION_ID_STREAM
@ SECTION_ID_STREAM
Definition: ffprobe.c:219
SECTION_ID_PIXEL_FORMAT_FLAGS
@ SECTION_ID_PIXEL_FORMAT_FLAGS
Definition: ffprobe.c:188
LogBuffer
Definition: ffprobe.c:345
AVStream::avg_frame_rate
AVRational avg_frame_rate
Average framerate.
Definition: avformat.h:834
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:1026
spherical.h
AVChapter::start
int64_t start
Definition: avformat.h:1227
data
const char data[16]
Definition: mxf.c:149
AVTextWriterContext
Definition: avtextwriters.h:47
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:3348
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:88
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:126
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:187
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:340
AV_LOG_VERBOSE
#define AV_LOG_VERBOSE
Detailed information.
Definition: log.h:225
SECTION_ID_PROGRAM_STREAM
@ SECTION_ID_PROGRAM_STREAM
Definition: ffprobe.c:196
category
category
Definition: openal-dec.c:249
AVFormatContext::programs
AVProgram ** programs
Definition: avformat.h:1463
SECTION_ID_FORMAT
@ SECTION_ID_FORMAT
Definition: ffprobe.c:164
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:1247
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:3293
AVPacket::duration
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: packet.h:553
SECTION_ID_STREAM_GROUP_SUBCOMPONENT
@ SECTION_ID_STREAM_GROUP_SUBCOMPONENT
Definition: ffprobe.c:206
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:3057
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:2948
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:469
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:619
AVStreamGroupTileGrid::vertical
int vertical
Offset in pixels from the top edge of the canvas where the tile should be placed.
Definition: avformat.h:1001
SECTION_ID_STREAM_GROUP_BLOCKS
@ SECTION_ID_STREAM_GROUP_BLOCKS
Definition: ffprobe.c:211
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
do_show_stream_group_components
static int do_show_stream_group_components
Definition: ffprobe.c:109
av_read_frame
int av_read_frame(AVFormatContext *s, AVPacket *pkt)
Return the next frame of a stream.
Definition: demux.c:1529
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:329
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:1270
AV_RL8
#define AV_RL8(x)
Definition: intreadwrite.h:394
avio_size
int64_t avio_size(AVIOContext *s)
Get the filesize.
Definition: aviobuf.c:323
print_dispositions
static void print_dispositions(AVTextFormatContext *tfc, uint32_t disposition, SectionID section_id)
Definition: ffprobe.c:1684
ffprobe_show_pixel_formats
static void ffprobe_show_pixel_formats(AVTextFormatContext *tfc)
Definition: ffprobe.c:2585
AV_PKT_FLAG_KEY
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
Definition: packet.h:590
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:122
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:75
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:3738
hdr_dynamic_vivid_metadata.h
do_show_frames
static int do_show_frames
Definition: ffprobe.c:105
OptionDef
Definition: cmdutils.h:191
AV_FIELD_BT
@ AV_FIELD_BT
Bottom coded first, top displayed first.
Definition: defs.h:206
AVInputFormat::long_name
const char * long_name
Descriptive name for the format, meant to be more human-readable than name.
Definition: avformat.h:557
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:638
SECTION_ID_FRAME_TAGS
@ SECTION_ID_FRAME_TAGS
Definition: ffprobe.c:168
print_chroma_location
static void print_chroma_location(AVTextFormatContext *tfc, enum AVChromaLocation chroma_location)
Definition: ffprobe.c:1129
ReadInterval::id
int id
identifier
Definition: ffprobe.c:145
AVTextFormatSection::id
int id
unique id identifying a section
Definition: avtextformat.h:38
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:115
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:437
avformat_close_input
void avformat_close_input(AVFormatContext **s)
Close an opened input AVFormatContext.
Definition: demux.c:367
AVPacketSideData::size
size_t size
Definition: packet.h:388
match_section
static int match_section(const char *section_name, int show_all_entries, AVDictionary *entries)
Definition: ffprobe.c:2672
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:39
unit_hertz_str
static const char unit_hertz_str[]
Definition: ffprobe.c:332
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
AV_FIELD_TT
@ AV_FIELD_TT
Top coded_first, top displayed first.
Definition: defs.h:203
SHOW_OPTIONAL_FIELDS_NEVER
#define SHOW_OPTIONAL_FIELDS_NEVER
Definition: ffprobe.c:136
SECTION_ID_STREAMS
@ SECTION_ID_STREAMS
Definition: ffprobe.c:221
print_color_space
static void print_color_space(AVTextFormatContext *tfc, enum AVColorSpace color_space)
Definition: ffprobe.c:1099
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:138
av_color_space_name
const char * av_color_space_name(enum AVColorSpace space)
Definition: pixdesc.c:3717
SECTION_ID_STREAM_GROUP
@ SECTION_ID_STREAM_GROUP
Definition: ffprobe.c:202
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:2939
AVCodecContext::codec
const struct AVCodec * codec
Definition: avcodec.h:440
ffprobe_show_program_version
static void ffprobe_show_program_version(AVTextFormatContext *tfc)
Definition: ffprobe.c:2535
AVPacket::opaque_ref
AVBufferRef * opaque_ref
AVBufferRef for free use by the API user.
Definition: packet.h:571
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:2259
AV_DOVI_COMPRESSION_EXTENDED
@ AV_DOVI_COMPRESSION_EXTENDED
Definition: dovi_meta.h:71
LogBuffer::log_level
int log_level
Definition: ffprobe.c:347
AVStreamGroupTileGrid
AVStreamGroupTileGrid holds information on how to combine several independent images on a single canv...
Definition: avformat.h:952
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:46
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:266
timecode.h
AVIAMFSubmixLayout
Submix layout as defined in section 3.7.6 of IAMF.
Definition: iamf.h:514
avformat_stream_group_name
const char * avformat_stream_group_name(enum AVStreamGroupParamsType type)
Definition: avformat.c:256
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:967
AVCodecContext::refs
int refs
number of reference frames
Definition: avcodec.h:689
AVERROR_OPTION_NOT_FOUND
#define AVERROR_OPTION_NOT_FOUND
Option not found.
Definition: error.h:63
AVDynamicHDRVivid::num_windows
uint8_t num_windows
The number of processing windows.
Definition: hdr_dynamic_vivid_metadata.h:266
AV_BPRINT_SIZE_AUTOMATIC
#define AV_BPRINT_SIZE_AUTOMATIC
AVChapter
Definition: avformat.h:1224
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:2788
AVTextFormatSection::show_all_entries
int show_all_entries
Definition: avtextformat.h:54
AVStreamGroupTileGrid::coded_height
int coded_height
Width of the canvas.
Definition: avformat.h:973
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:176
AVCodecContext::coded_height
int coded_height
Definition: avcodec.h:607
us
#define us(width, name, range_min, range_max, subs,...)
Definition: cbs_h2645.c:263
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:804
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:326
print_private_data
static void print_private_data(AVTextFormatContext *tfc, void *priv_data)
Definition: ffprobe.c:1051
print_duration_ts
#define print_duration_ts(k, v)
Definition: ffprobe.c:433
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:388
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:341
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:554
AV_FIELD_TB
@ AV_FIELD_TB
Top coded first, bottom displayed first.
Definition: defs.h:205
InputFile
Definition: ffmpeg.h:471
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:101
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:2934
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:406
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:2423
av_frame_alloc
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
Definition: frame.c:51
parse_read_intervals
static int parse_read_intervals(const char *intervals_spec)
Definition: ffprobe.c:2886
AVFormatContext::bit_rate
int64_t bit_rate
Total stream bitrate in bit/s, 0 if not available.
Definition: avformat.h:1407
av_get_bits_per_sample
int av_get_bits_per_sample(enum AVCodecID codec_id)
Return codec bits per sample.
Definition: utils.c:547
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:909
show_error
static void show_error(AVTextFormatContext *tfc, int err)
Definition: ffprobe.c:2290
AVIAMFSubmixElement::annotations
AVDictionary * annotations
A dictionary of strings describing the submix in different languages.
Definition: iamf.h:490
AVTextFormatSection::flags
int flags
Definition: avtextformat.h:48
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:103
show_frame
static void show_frame(AVTextFormatContext *tfc, AVFrame *frame, AVStream *stream, AVFormatContext *fmt_ctx)
Definition: ffprobe.c:1356
pkt
AVPacket * pkt
Definition: movenc.c:60
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:209
CHECK_END
#define CHECK_END
AVFormatContext::metadata
AVDictionary * metadata
Metadata that applies to the whole file.
Definition: avformat.h:1497
film_grain_params.h
AVFrameSideData::size
size_t size
Definition: frame.h:268
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
AVInputFormat
Definition: avformat.h:545
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:591
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:338
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:625
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:217
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
postprocess.h
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:213
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:358
SECTION_ID_FORMAT_TAGS
@ SECTION_ID_FORMAT_TAGS
Definition: ffprobe.c:165
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:1091
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:270
do_count_frames
static int do_count_frames
Definition: ffprobe.c:98
AVChapter::end
int64_t end
chapter start/end time in time_base units
Definition: avformat.h:1227
AVDOVIMetadata
Combined struct representing a combination of header, mapping and color metadata, for attaching to fr...
Definition: dovi_meta.h:337
ReadInterval::end
int64_t end
start, end in second/AV_TIME_BASE units
Definition: ffprobe.c:146
AVCodecDescriptor
This struct describes the properties of a single codec described by an AVCodecID.
Definition: codec_desc.h:38
stereo3d.h
AVMasteringDisplayMetadata::white_point
AVRational white_point[2]
CIE 1931 xy chromaticity coords of white point.
Definition: mastering_display_metadata.h:47
log_read_interval
static void log_read_interval(const ReadInterval *interval, void *log_ctx, int log_level)
Definition: ffprobe.c:1515
intreadwrite.h
s
#define s(width, name)
Definition: cbs_vp9.c:198
AVTextFormatter
Definition: avtextformat.h:69
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:1190
unit_bit_per_second_str
static const char unit_bit_per_second_str[]
Definition: ffprobe.c:334
av_realloc_array
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
Definition: mem.c:217
format
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 format(the sample packing is implied by the sample format) and sample rate. The lists are not just lists
AVFormatContext::nb_programs
unsigned int nb_programs
Definition: avformat.h:1462
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
AVInputFormat::name
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:550
AVFormatContext::iformat
const struct AVInputFormat * iformat
The input container format.
Definition: avformat.h:1277
AVFormatContext::chapters
AVChapter ** chapters
Definition: avformat.h:1366
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:225
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:202
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:1937
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:586
AVTextFormatSection
Definition: avtextformat.h:37
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:178
AVDynamicHDRPlus::targeted_system_display_maximum_luminance
AVRational targeted_system_display_maximum_luminance
The nominal maximum display luminance of the targeted system display, in units of 0....
Definition: hdr_dynamic_metadata.h:271
get_frame_side_data_type
static const char * get_frame_side_data_type(const void *data)
Definition: ffprobe.c:234
print_fmt
#define print_fmt(k, f,...)
Definition: ffprobe.c:407
avcodec_receive_frame
int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *frame)
Return decoded output data from a decoder or encoder (when the AV_CODEC_FLAG_RECON_FRAME flag is used...
Definition: avcodec.c:705
av_assert0
#define av_assert0(cond)
assert() equivalent, that is always enabled.
Definition: avassert.h:40
print_primaries
static void print_primaries(AVTextFormatContext *tfc, enum AVColorPrimaries color_primaries)
Definition: ffprobe.c:1109
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:478
do_show_stream_group_tags
static int do_show_stream_group_tags
Definition: ffprobe.c:125
AVStreamGroup::index
unsigned int index
Group index in AVFormatContext.
Definition: avformat.h:1110
AVDynamicHDRPlus::mastering_display_actual_peak_luminance_flag
uint8_t mastering_display_actual_peak_luminance_flag
This flag shall be equal to 0 in bitstreams conforming to this version of this Specification.
Definition: hdr_dynamic_metadata.h:303
AVCodecContext::bits_per_raw_sample
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
Definition: avcodec.h:1553
AV_LOG_DEBUG
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:230
AVPacketSideData::data
uint8_t * data
Definition: packet.h:387
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:660
get_raw_string_type
static const char * get_raw_string_type(const void *data)
Definition: ffprobe.c:240
SECTION_ID_ROOT
@ SECTION_ID_ROOT
Definition: ffprobe.c:218
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:336
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:1697
AVSubtitle::pts
int64_t pts
Same as packet pts, in AV_TIME_BASE.
Definition: avcodec.h:2081
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:121
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:118
AV_DOVI_MAPPING_POLYNOMIAL
@ AV_DOVI_MAPPING_POLYNOMIAL
Definition: dovi_meta.h:108
AVCodecContext::rc_max_rate
int64_t rc_max_rate
maximum bitrate
Definition: avcodec.h:1270
SECTION_ID_STREAM_GROUP_SUBPIECE
@ SECTION_ID_STREAM_GROUP_SUBPIECE
Definition: ffprobe.c:210
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
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
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:45
InputStream::dec_ctx
AVCodecContext * dec_ctx
Definition: ffprobe.c:83
do_show_chapters
static int do_show_chapters
Definition: ffprobe.c:102
AVCOL_PRI_UNSPECIFIED
@ AVCOL_PRI_UNSPECIFIED
Definition: pixfmt.h:622
AVCPBProperties
This structure describes the bitrate properties of an encoded bitstream.
Definition: defs.h:271
AV_FILM_GRAIN_PARAMS_NONE
@ AV_FILM_GRAIN_PARAMS_NONE
Definition: film_grain_params.h:25
AVFormatContext::probe_score
int probe_score
format probing score.
Definition: avformat.h:1730
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:355
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:155
SECTION_ID_FRAME_LOGS
@ SECTION_ID_FRAME_LOGS
Definition: ffprobe.c:178
arg
const char * arg
Definition: jacosubdec.c:67
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:117
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
if
if(ret)
Definition: filter_design.txt:179
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:2298
AVDOVINLQParams::linear_deadzone_threshold
uint64_t linear_deadzone_threshold
Definition: dovi_meta.h:144
InputFile::streams
InputStream * streams
Definition: ffprobe.c:89
AVTextFormatSection::unique_name
const char * unique_name
unique section name, in case the name is ambiguous
Definition: avtextformat.h:51
print_tile_grid_params
static void print_tile_grid_params(AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVStreamGroupTileGrid *tile_grid)
Definition: ffprobe.c:1986
av_color_range_name
const char * av_color_range_name(enum AVColorRange range)
Definition: pixdesc.c:3657
ReadInterval::start
int64_t start
Definition: ffprobe.c:146
AVDISCARD_ALL
@ AVDISCARD_ALL
discard all
Definition: defs.h:221
AVFormatContext
Format I/O context.
Definition: avformat.h:1265
print_int
#define print_int(k, v)
Definition: ffprobe.c:425
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
AVDictionary * opts
Definition: movenc.c:51
read_intervals
static ReadInterval * read_intervals
Definition: ffprobe.c:152
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:768
SECTION_ID_STREAM_GROUPS
@ SECTION_ID_STREAM_GROUPS
Definition: ffprobe.c:217
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.
AVDynamicHDRPlus::application_version
uint8_t application_version
Application version in the application defining document in ST-2094 suite.
Definition: hdr_dynamic_metadata.h:253
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:75
ReadInterval::has_end
int has_end
Definition: ffprobe.c:147
avcodec_get_class
const AVClass * avcodec_get_class(void)
Get the AVClass for AVCodecContext.
Definition: options.c:184
SECTION_ID_FRAME_LOG
@ SECTION_ID_FRAME_LOG
Definition: ffprobe.c:177
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:784
NULL
#define NULL
Definition: coverity.c:32
SET_DO_SHOW
#define SET_DO_SHOW(id, varname)
Definition: ffprobe.c:3068
AVFilmGrainParams::codec
union AVFilmGrainParams::@453 codec
Additional fields may be added both here and in any structure included.
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:93
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:445
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:2217
AV_DOVI_MAPPING_MMR
@ AV_DOVI_MAPPING_MMR
Definition: dovi_meta.h:109
OPT_EXPERT
#define OPT_EXPERT
Definition: cmdutils.h:207
ERROR
static void ERROR(const char *str)
Definition: audio_fifo.c:58
do_read_frames
static int do_read_frames
Definition: ffprobe.c:100
SECTION_ID_LIBRARY_VERSION
@ SECTION_ID_LIBRARY_VERSION
Definition: ffprobe.c:179
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
version.h
SECTION_ID_STREAM_TAGS
@ SECTION_ID_STREAM_TAGS
Definition: ffprobe.c:222
isnan
#define isnan(x)
Definition: libm.h:342
SHOW_OPTIONAL_FIELDS_ALWAYS
#define SHOW_OPTIONAL_FIELDS_ALWAYS
Definition: ffprobe.c:137
AVPacketSideData::type
enum AVPacketSideDataType type
Definition: packet.h:389
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:1352
print_q
#define print_q(k, v, s)
Definition: ffprobe.c:426
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:1307
av_log_set_flags
void av_log_set_flags(int arg)
Definition: log.c:478
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:208
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
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
ALPHA
@ ALPHA
Definition: drawutils.c:33
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:825
av_color_primaries_name
const char * av_color_primaries_name(enum AVColorPrimaries primaries)
Definition: pixdesc.c:3675
show_stream
static int show_stream(AVTextFormatContext *tfc, AVFormatContext *fmt_ctx, int stream_idx, InputStream *ist, int container)
Definition: ffprobe.c:1699
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:143
AVTextFormatContext::formatter
const AVTextFormatter * formatter
the AVTextFormatter of which this is an instance
Definition: avtextformat.h:90
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:107
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:663
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:3005
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:716
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:333
program_birth_year
const int program_birth_year
program birth year, defined by the program for show_banner()
Definition: ffprobe.c:94
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:1119
AVAudioServiceType
AVAudioServiceType
Definition: defs.h:224
print_iamf_audio_element_params
static void print_iamf_audio_element_params(AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVIAMFAudioElement *audio_element)
Definition: ffprobe.c:2064
AVStream::nb_frames
int64_t nb_frames
number of frames in this stream if known or 0
Definition: avformat.h:806
SECTION_ID_CHAPTER
@ SECTION_ID_CHAPTER
Definition: ffprobe.c:160
AVIAMFSubmixElement::audio_element_id
unsigned int audio_element_id
The id of the Audio Element this submix element references.
Definition: iamf.h:452
avcodec_find_decoder
const AVCodec * avcodec_find_decoder(enum AVCodecID id)
Find a registered decoder with a matching codec ID.
Definition: allcodecs.c:1016
print_duration_time
#define print_duration_time(k, v, tb)
Definition: ffprobe.c:432
print_iamf_param_definition
static void print_iamf_param_definition(AVTextFormatContext *tfc, const char *name, const AVIAMFParamDefinition *param, SectionID section_id)
Definition: ffprobe.c:2009
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:556
show_value_unit
static int show_value_unit
Definition: ffprobe.c:129
print_dynamic_hdr_vivid
static void print_dynamic_hdr_vivid(AVTextFormatContext *tfc, const AVDynamicHDRVivid *metadata)
Definition: ffprobe.c:723
AVFormatContext::nb_streams
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
Definition: avformat.h:1321
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:1092
print_input_filename
static const char * print_input_filename
Definition: ffprobe.c:327
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:167
codec_opts
AVDictionary * codec_opts
Definition: cmdutils.c:58
FrameData::pkt_size
int pkt_size
Definition: ffprobe.c:77
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:2507
fmt_ctx
static AVFormatContext * fmt_ctx
Definition: decode_filter_audio.c:46
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:67
f
f
Definition: af_crystalizer.c:122
SECTION_ID_STREAM_GROUP_PIECES
@ SECTION_ID_STREAM_GROUP_PIECES
Definition: ffprobe.c:207
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:488
AVDynamicHDRPlus::num_rows_mastering_display_actual_peak_luminance
uint8_t num_rows_mastering_display_actual_peak_luminance
The number of rows in the mastering_display_actual_peak_luminance array.
Definition: hdr_dynamic_metadata.h:309
AVPacket::size
int size
Definition: packet.h:536
ReadInterval::start_is_offset
int start_is_offset
Definition: ffprobe.c:148
do_show_packet_tags
static int do_show_packet_tags
Definition: ffprobe.c:127
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:614
SECTION_ID_STREAM_DISPOSITION
@ SECTION_ID_STREAM_DISPOSITION
Definition: ffprobe.c:220
avformat_alloc_context
AVFormatContext * avformat_alloc_context(void)
Allocate an AVFormatContext.
Definition: options.c:162
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:240
PRINT_PIX_FMT_FLAG
#define PRINT_PIX_FMT_FLAG(flagname, name)
Definition: ffprobe.c:2580
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:132
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:1968
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
AVDynamicHDRPlus::num_windows
uint8_t num_windows
The number of processing windows.
Definition: hdr_dynamic_metadata.h:259
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:1381
avtext_print_section_footer
void avtext_print_section_footer(AVTextFormatContext *tctx)
Definition: avtextformat.c:272
AVCodecContext::pkt_timebase
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are expressed.
Definition: avcodec.h:542
SectionID
SectionID
Definition: ffprobe.c:159
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:436
SECTION_ID_STREAM_GROUP_COMPONENT
@ SECTION_ID_STREAM_GROUP_COMPONENT
Definition: ffprobe.c:204
print_iamf_submix_params
static void print_iamf_submix_params(AVTextFormatContext *tfc, const AVIAMFSubmix *submix)
Definition: ffprobe.c:2095
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:139
size
int size
Definition: twinvq_data.h:10344
avtext_context_open
int avtext_context_open(AVTextFormatContext **ptctx, const AVTextFormatter *formatter, AVTextWriterContext *writer_context, const char *args, const struct AVTextFormatSection *sections, int nb_sections, int show_value_unit, int use_value_prefix, int use_byte_value_binary_prefix, int use_value_sexagesimal_format, int show_optional_fields, char *show_data_hash)
Definition: avtextformat.c:128
SECTION_ID_CHAPTER_TAGS
@ SECTION_ID_CHAPTER_TAGS
Definition: ffprobe.c:161
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:133
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:248
AVDynamicHDRPlus::mastering_display_actual_peak_luminance
AVRational mastering_display_actual_peak_luminance[25][25]
The normalized actual peak luminance of the mastering display used for mastering the image essence.
Definition: hdr_dynamic_metadata.h:322
AVStreamGroup::iamf_audio_element
struct AVIAMFAudioElement * iamf_audio_element
Definition: avformat.h:1132
opt_show_versions
static int opt_show_versions(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2979
AVFrameSideData::data
uint8_t * data
Definition: frame.h:267
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:2741
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:770
printf
printf("static const uint8_t my_array[100] = {\n")
SECTION_ID_PACKETS_AND_FRAMES
@ SECTION_ID_PACKETS_AND_FRAMES
Definition: ffprobe.c:184
AVOption::name
const char * name
Definition: opt.h:430
use_value_prefix
static int use_value_prefix
Definition: ffprobe.c:130
SECTION_ID_ERROR
@ SECTION_ID_ERROR
Definition: ffprobe.c:163
AVCPBProperties::min_bitrate
int64_t min_bitrate
Minimum bitrate of the stream, in bits per second.
Definition: defs.h:281
AVSubtitle::end_display_time
uint32_t end_display_time
Definition: avcodec.h:2078
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:350
show_banner
void show_banner(int argc, char **argv, const OptionDef *options)
Print the program banner to stderr.
Definition: opt_common.c:237
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:534
AVSphericalMapping::padding
uint32_t padding
Number of pixels to pad from the edge of each cube face.
Definition: spherical.h:194
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:356
AVTextFormatter::flags
int flags
a combination or AV_TEXTFORMAT__FLAG_*
Definition: avtextformat.h:82
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:169
print_iamf_mix_presentation_params
static void print_iamf_mix_presentation_params(AVTextFormatContext *tfc, const AVStreamGroup *stg, const AVIAMFMixPresentation *mix_presentation)
Definition: ffprobe.c:2142
SECTION_ID_PACKET_TAGS
@ SECTION_ID_PACKET_TAGS
Definition: ffprobe.c:182
AVStreamGroupTileGrid::nb_tiles
unsigned int nb_tiles
Amount of tiles in the grid.
Definition: avformat.h:960
line
Definition: graph2dot.c:48
SECTION_ID_STREAM_GROUP_STREAM_TAGS
@ SECTION_ID_STREAM_GROUP_STREAM_TAGS
Definition: ffprobe.c:201
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:541
av_packet_alloc
AVPacket * av_packet_alloc(void)
Allocate an AVPacket and set its fields to default values.
Definition: packet.c:64
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:104
AVCPBProperties::avg_bitrate
int64_t avg_bitrate
Average bitrate of the stream, in bits per second.
Definition: defs.h:286
log_mutex
static AVMutex log_mutex
Definition: ffprobe.c:343
AVFilmGrainParams::h274
AVFilmGrainH274Params h274
Definition: film_grain_params.h:248
ReadInterval
Definition: ffprobe.c:144
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:1090
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:1166
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:1089
OPT_TYPE_BOOL
@ OPT_TYPE_BOOL
Definition: cmdutils.h:82
AVStreamGroup::iamf_mix_presentation
struct AVIAMFMixPresentation * iamf_mix_presentation
Definition: avformat.h:1133
do_show_stream_disposition
static int do_show_stream_disposition
Definition: ffprobe.c:111
do_show_stream_groups
static int do_show_stream_groups
Definition: ffprobe.c:108
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:220
AVStreamGroup::params
union AVStreamGroup::@380 params
Group type-specific parameters.
AV_FRAME_DATA_VIEW_ID
@ AV_FRAME_DATA_VIEW_ID
This side data must be associated with a video frame.
Definition: frame.h:245
AVDynamicHDRPlus::num_rows_targeted_system_display_actual_peak_luminance
uint8_t num_rows_targeted_system_display_actual_peak_luminance
The number of rows in the targeted system_display_actual_peak_luminance array.
Definition: hdr_dynamic_metadata.h:283
AVChromaLocation
AVChromaLocation
Location of chroma samples.
Definition: pixfmt.h:769
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:99
iformat
static const AVInputFormat * iformat
Definition: ffprobe.c:328
SHOW_OPTIONAL_FIELDS_AUTO
#define SHOW_OPTIONAL_FIELDS_AUTO
Definition: ffprobe.c:135
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:147
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
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:301
SECTION_ID_PROGRAM_STREAM_TAGS
@ SECTION_ID_PROGRAM_STREAM_TAGS
Definition: ffprobe.c:193
avcodec_send_packet
int avcodec_send_packet(AVCodecContext *avctx, const AVPacket *avpkt)
Supply raw packet data as input to a decoder.
Definition: decode.c:704
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:793
AVStreamGroupTileGrid::width
int width
Width of the final image for presentation.
Definition: avformat.h:1037
AVSphericalMapping::roll
int32_t roll
Rotation around the forward vector [-180, 180].
Definition: spherical.h:140
AVSubtitle::format
uint16_t format
Definition: avcodec.h:2076
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:1089
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:528
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 paremeter substream.
Definition: iamf.h:218
print_film_grain_params
static void print_film_grain_params(AVTextFormatContext *tfc, const AVFilmGrainParams *fgp)
Definition: ffprobe.c:804
SECTION_ID_PROGRAM
@ SECTION_ID_PROGRAM
Definition: ffprobe.c:194
AVChapter::id
int64_t id
unique ID to identify the chapter
Definition: avformat.h:1225
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:1420
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:253
show_usage
static void show_usage(void)
Definition: ffprobe.c:2528
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:214
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:43
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:97
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:1539
AVColorSpace
AVColorSpace
YUV colorspace type.
Definition: pixfmt.h:673
display.h
SECTION_ID_PACKETS
@ SECTION_ID_PACKETS
Definition: ffprobe.c:183
AV_FIELD_BB
@ AV_FIELD_BB
Bottom coded first, bottom displayed first.
Definition: defs.h:204
AVIAMFMixPresentation
Information on how to render and mix one or more AVIAMFAudioElement to generate the final audio outpu...
Definition: iamf.h:613
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:276
AVDOVIDataMapping::num_y_partitions
uint32_t num_y_partitions
Definition: dovi_meta.h:161
LogBuffer::category
AVClassCategory category
Definition: ffprobe.c:349
parse_options
int parse_options(void *optctx, int argc, char **argv, const OptionDef *options, int(*parse_arg_function)(void *, const char *))
Definition: cmdutils.c:419
opt_show_entries
static int opt_show_entries(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2691
av_always_inline
#define av_always_inline
Definition: attributes.h:49
SECTION_ID_FRAME_SIDE_DATA
@ SECTION_ID_FRAME_SIDE_DATA
Definition: ffprobe.c:170
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:1064
SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
@ SECTION_ID_FRAME_SIDE_DATA_COMPONENT_LIST
Definition: ffprobe.c:173
opt_sections
static int opt_sections(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2966
avtextformatter_xml
const AVTextFormatter avtextformatter_xml
Definition: tf_xml.c:210
OPT_FUNC_ARG
#define OPT_FUNC_ARG
Definition: cmdutils.h:201
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:1189
print_dynamic_hdr10_plus
static void print_dynamic_hdr10_plus(AVTextFormatContext *tfc, const AVDynamicHDRPlus *metadata)
Definition: ffprobe.c:624
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:120
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:2250
AVCOL_SPC_UNSPECIFIED
@ AVCOL_SPC_UNSPECIFIED
Definition: pixfmt.h:676
do_show_stream_group_disposition
static int do_show_stream_group_disposition
Definition: ffprobe.c:112
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 paramter(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:186
ambient_viewing_environment.h
use_value_sexagesimal_format
static int use_value_sexagesimal_format
Definition: ffprobe.c:132
SECTION_ID_LIBRARY_VERSIONS
@ SECTION_ID_LIBRARY_VERSIONS
Definition: ffprobe.c:180
AV_FRAME_FLAG_INTERLACED
#define AV_FRAME_FLAG_INTERLACED
A flag to mark frames whose content is interlaced.
Definition: frame.h:633
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:172
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:350
AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE
@ AV_IAMF_AUDIO_ELEMENT_TYPE_SCENE
Definition: iamf.h:346
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:198
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:996
AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT
#define AV_TEXTFORMAT_FLAG_SUPPORTS_MIXED_ARRAY_CONTENT
Definition: avtextformat.h:60
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:555
AVDOVINLQParams::linear_deadzone_slope
uint64_t linear_deadzone_slope
Definition: dovi_meta.h:143
SECTION_ID_PROGRAMS
@ SECTION_ID_PROGRAMS
Definition: ffprobe.c:199
version.h
AVIAMFSubmix::nb_layouts
unsigned int nb_layouts
Number of layouts in the submix.
Definition: iamf.h:587
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:814
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:1155
tag
uint32_t tag
Definition: movenc.c:1911
sections
static struct AVTextFormatSection sections[]
Definition: ffprobe.c:251
AVStream::id
int id
Format-specific stream ID.
Definition: avformat.h:757
ret
ret
Definition: filter_design.txt:187
AVStream
Stream structure.
Definition: avformat.h:745
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:354
avcodec_flush_buffers
void avcodec_flush_buffers(AVCodecContext *avctx)
Reset the internal codec state / flush internal buffers.
Definition: avcodec.c:374
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:264
AVCPBProperties::buffer_size
int64_t buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
Definition: defs.h:292
AVSphericalMapping::pitch
int32_t pitch
Rotation around the right vector [-90, 90].
Definition: spherical.h:139
AVStreamGroup::metadata
AVDictionary * metadata
Metadata that applies to the whole group.
Definition: avformat.h:1146
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:41
InputFile::streams
InputStream ** streams
Definition: ffmpeg.h:490
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:2804
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:99
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:546
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:399
id
enum AVCodecID id
Definition: dts2pts.c:367
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:355
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:566
AVDOVIRpuDataHeader::vdr_rpu_level
uint8_t vdr_rpu_level
Definition: dovi_meta.h:91
SECTION_ID_FRAME
@ SECTION_ID_FRAME
Definition: ffprobe.c:166
av_dovi_get_color
static av_always_inline AVDOVIColorMetadata * av_dovi_get_color(const AVDOVIMetadata *data)
Definition: dovi_meta.h:367
AVStreamGroup
Definition: avformat.h:1099
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:431
AVStream::index
int index
stream index in AVFormatContext
Definition: avformat.h:751
show_tags
static int show_tags(AVTextFormatContext *tfc, AVDictionary *tags, int section_id)
Definition: ffprobe.c:444
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:1920
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:1153
get_packet_side_data_type
static const char * get_packet_side_data_type(const void *data)
Definition: ffprobe.c:228
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
avtext_print_integers
void avtext_print_integers(AVTextFormatContext *tctx, const char *name, uint8_t *data, int size, const char *format, int columns, int bytes, int offset_add)
Definition: avtextformat.c:538
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:603
nb_streams_packets
static uint64_t * nb_streams_packets
Definition: ffprobe.c:337
AVDynamicHDRPlus::targeted_system_display_actual_peak_luminance_flag
uint8_t targeted_system_display_actual_peak_luminance_flag
This flag shall be equal to 0 in bit streams conforming to this version of this Specification.
Definition: hdr_dynamic_metadata.h:277
AVTextFormatSection::children_ids
const int children_ids[SECTION_MAX_NB_CHILDREN+1]
list of children section IDS, terminated by -1
Definition: avtextformat.h:49
do_show_program_version
static int do_show_program_version
Definition: ffprobe.c:114
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:2986
AVInputFormat::flags
int flags
Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS,...
Definition: avformat.h:564
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:2437
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
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:191
SECTION_ID_STREAM_GROUP_BLOCK
@ SECTION_ID_STREAM_GROUP_BLOCK
Definition: ffprobe.c:212
print_str_validate
#define print_str_validate(k, v)
Definition: ffprobe.c:429
AVFrameSideData::type
enum AVFrameSideDataType type
Definition: frame.h:266
AVDOVIColorMetadata
Dolby Vision RPU colorspace metadata parameters.
Definition: dovi_meta.h:171
output_format
static char * output_format
Definition: ffprobe.c:140
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
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:879
AV_PKT_DATA_SKIP_SAMPLES
@ AV_PKT_DATA_SKIP_SAMPLES
Recommmends 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:323
do_show_pixel_formats
static int do_show_pixel_formats
Definition: ffprobe.c:116
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:604
AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN
@ AV_IAMF_PARAMETER_DEFINITION_MIX_GAIN
Subblocks are of struct type AVIAMFMixGain.
Definition: iamf.h:173
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:144
AVMasteringDisplayMetadata::min_luminance
AVRational min_luminance
Min luminance of mastering display (cd/m^2).
Definition: mastering_display_metadata.h:52
AVFormatContext::duration
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
Definition: avformat.h:1400
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:537
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:2566
opt_print_filename
static int opt_print_filename(void *optctx, const char *opt, const char *arg)
Definition: ffprobe.c:2781
AVIAMFSubmix::nb_elements
unsigned int nb_elements
Number of elements in the submix.
Definition: iamf.h:572
get_stream_group_type
static const char * get_stream_group_type(const void *data)
Definition: ffprobe.c:245
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:607
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:124
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
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:376
AVIAMFAudioElement::demixing_info
AVIAMFParamDefinition * demixing_info
Demixing information used to reconstruct a scalable channel audio representation.
Definition: iamf.h:376
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:595
AVStreamGroup::type
enum AVStreamGroupParamsType type
Group type.
Definition: avformat.h:1126
print_stream_group_params
static void print_stream_group_params(AVTextFormatContext *tfc, AVStreamGroup *stg)
Definition: ffprobe.c:2161
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:361
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:265
AVCodecParameters::format
int format
Definition: codec_par.h:92
AVDynamicHDRVivid::params
AVHDRVividColorTransformParams params[3]
The color transform parameters for every processing window.
Definition: hdr_dynamic_vivid_metadata.h:271
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:216
AVIAMFMixPresentation::annotations
AVDictionary * annotations
A dictionary of strings describing the mix in different languages.
Definition: iamf.h:641
SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST
@ SECTION_ID_FRAME_SIDE_DATA_TIMECODE_LIST
Definition: ffprobe.c:171
AVFormatContext::nb_stream_groups
unsigned int nb_stream_groups
Number of elements in AVFormatContext.stream_groups.
Definition: avformat.h:1340
AVStreamGroupTileGrid::height
int height
Height of the final image for presentation.
Definition: avformat.h:1047
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
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:458
AVPacket
This structure stores compressed data.
Definition: packet.h:512
AVContentLightMetadata::MaxFALL
unsigned MaxFALL
Max average light level per frame (cd/m^2).
Definition: mastering_display_metadata.h:116
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:929
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:555
AVDynamicHDRPlus::targeted_system_display_actual_peak_luminance
AVRational targeted_system_display_actual_peak_luminance[25][25]
The normalized actual peak luminance of the targeted system display.
Definition: hdr_dynamic_metadata.h:297
av_frame_side_data_name
const char * av_frame_side_data_name(enum AVFrameSideDataType type)
Definition: side_data.c:68
SHOW_LIB_VERSION
#define SHOW_LIB_VERSION(libname, LIBNAME)
Definition: ffprobe.c:2551
IN_PROGRAM
#define IN_PROGRAM
Definition: ffprobe.c:1696
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:461
AVIAMFParamDefinition::parameter_rate
unsigned int parameter_rate
Sample rate for the paremeter substream.
Definition: iamf.h:222
read_packets
static int read_packets(AVTextFormatContext *tfc, InputFile *ifile)
Definition: ffprobe.c:1664
int32_t
int32_t
Definition: audioconvert.c:56
AVIAMFSubmixElement
Submix element as defined in section 3.7 of IAMF.
Definition: iamf.h:446
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:345
AVFrameSideData::metadata
AVDictionary * metadata
Definition: frame.h:269
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
AVDynamicHDRVivid::system_start_code
uint8_t system_start_code
The system start code.
Definition: hdr_dynamic_vivid_metadata.h:260
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:1390
SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST
@ SECTION_ID_FRAME_SIDE_DATA_PIECE_LIST
Definition: ffprobe.c:175
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:195
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:113
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:123
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:215
LogBuffer::parent_category
AVClassCategory parent_category
Definition: ffprobe.c:351
print_dovi_metadata
static void print_dovi_metadata(AVTextFormatContext *tfc, const AVDOVIMetadata *dovi)
Definition: ffprobe.c:462
SECTION_ID_PROGRAM_STREAM_DISPOSITION
@ SECTION_ID_PROGRAM_STREAM_DISPOSITION
Definition: ffprobe.c:192
avcodec_descriptor_get
const AVCodecDescriptor * avcodec_descriptor_get(enum AVCodecID id)
Definition: codec_desc.c:3780
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:383
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:794
SECTION_ID_STREAM_GROUP_SUBPIECES
@ SECTION_ID_STREAM_GROUP_SUBPIECES
Definition: ffprobe.c:209
show_data_hash
static char * show_data_hash
Definition: ffprobe.c:142
SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION
@ SECTION_ID_STREAM_GROUP_STREAM_DISPOSITION
Definition: ffprobe.c:200
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:86
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:110
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:991
InputFile::nb_streams
int nb_streams
Definition: ffmpeg.h:491
show_chapters
static int show_chapters(AVTextFormatContext *tfc, InputFile *ifile)
Definition: ffprobe.c:2234
AVColorRange
AVColorRange
Visual content value range.
Definition: pixfmt.h:715
AVChapter::time_base
AVRational time_base
time base in which the start/end timestamps are specified
Definition: avformat.h:1226
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:96
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
avtextwriter_create_file
int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename, int close_on_uninit)
Definition: tw_avio.c:90
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:622
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:468
AVDOVIDataMapping::nlq
AVDOVINLQParams nlq[3]
Definition: dovi_meta.h:162
snprintf
#define snprintf
Definition: snprintf.h:34
avtext_print_data
void avtext_print_data(AVTextFormatContext *tctx, const char *name, const uint8_t *data, int size)
Definition: avtextformat.c:495
stream_specifier
static char * stream_specifier
Definition: ffprobe.c:141
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:646
log_callback
static void log_callback(void *ptr, int level, const char *fmt, va_list vl)
Definition: ffprobe.c:357
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:1293
AVDOVIDataMapping
Dolby Vision RPU data mapping parameters.
Definition: dovi_meta.h:152
SECTION_ID_CHAPTERS
@ SECTION_ID_CHAPTERS
Definition: ffprobe.c:162
print_time
#define print_time(k, v, tb)
Definition: ffprobe.c:430
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:42
AVSphericalMapping
This structure describes how to handle spherical videos, outlining information about projection,...
Definition: spherical.h:94
av_color_transfer_name
const char * av_color_transfer_name(enum AVColorTransferCharacteristic transfer)
Definition: pixdesc.c:3696
print_str_opt
#define print_str_opt(k, v)
Definition: ffprobe.c:428
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:2077
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:189
AVSphericalMapping::yaw
int32_t yaw
Rotation around the up vector [-180, 180].
Definition: spherical.h:138
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:181
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:575
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:331
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:312
AVDynamicHDRPlus::num_cols_mastering_display_actual_peak_luminance
uint8_t num_cols_mastering_display_actual_peak_luminance
The number of columns in the mastering_display_actual_peak_luminance array.
Definition: hdr_dynamic_metadata.h:315
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:547
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:3261
do_show_packets
static int do_show_packets
Definition: ffprobe.c:106
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:205
av_fourcc2str
#define av_fourcc2str(fourcc)
Definition: avutil.h:348
print_list_fmt
#define print_list_fmt(k, f, n, m,...)
Definition: ffprobe.c:413
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:257
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:2173