FFmpeg
dump.c
Go to the documentation of this file.
1 /*
2  * Various pretty-printing functions for use within FFmpeg
3  * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4  *
5  * This file is part of FFmpeg.
6  *
7  * FFmpeg is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * FFmpeg is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with FFmpeg; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  */
21 
22 #include <stdio.h>
23 #include <stdint.h>
24 
26 #include "libavutil/display.h"
27 #include "libavutil/intreadwrite.h"
28 #include "libavutil/log.h"
30 #include "libavutil/dovi_meta.h"
31 #include "libavutil/mathematics.h"
32 #include "libavutil/opt.h"
33 #include "libavutil/replaygain.h"
34 #include "libavutil/spherical.h"
35 #include "libavutil/stereo3d.h"
36 #include "libavutil/timecode.h"
37 
38 #include "libavcodec/avcodec.h"
39 
40 #include "avformat.h"
41 #include "internal.h"
42 
43 #define HEXDUMP_PRINT(...) \
44  do { \
45  if (!f) \
46  av_log(avcl, level, __VA_ARGS__); \
47  else \
48  fprintf(f, __VA_ARGS__); \
49  } while (0)
50 
51 static void hex_dump_internal(void *avcl, FILE *f, int level,
52  const uint8_t *buf, int size)
53 {
54  int len, i, j, c;
55 
56  for (i = 0; i < size; i += 16) {
57  len = size - i;
58  if (len > 16)
59  len = 16;
60  HEXDUMP_PRINT("%08x ", i);
61  for (j = 0; j < 16; j++) {
62  if (j < len)
63  HEXDUMP_PRINT(" %02x", buf[i + j]);
64  else
65  HEXDUMP_PRINT(" ");
66  }
67  HEXDUMP_PRINT(" ");
68  for (j = 0; j < len; j++) {
69  c = buf[i + j];
70  if (c < ' ' || c > '~')
71  c = '.';
72  HEXDUMP_PRINT("%c", c);
73  }
74  HEXDUMP_PRINT("\n");
75  }
76 }
77 
78 void av_hex_dump(FILE *f, const uint8_t *buf, int size)
79 {
80  hex_dump_internal(NULL, f, 0, buf, size);
81 }
82 
83 void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
84 {
85  hex_dump_internal(avcl, NULL, level, buf, size);
86 }
87 
88 static void pkt_dump_internal(void *avcl, FILE *f, int level, const AVPacket *pkt,
89  int dump_payload, AVRational time_base)
90 {
91  HEXDUMP_PRINT("stream #%d:\n", pkt->stream_index);
92  HEXDUMP_PRINT(" keyframe=%d\n", (pkt->flags & AV_PKT_FLAG_KEY) != 0);
93  HEXDUMP_PRINT(" duration=%0.3f\n", pkt->duration * av_q2d(time_base));
94  /* DTS is _always_ valid after av_read_frame() */
95  HEXDUMP_PRINT(" dts=");
96  if (pkt->dts == AV_NOPTS_VALUE)
97  HEXDUMP_PRINT("N/A");
98  else
99  HEXDUMP_PRINT("%0.3f", pkt->dts * av_q2d(time_base));
100  /* PTS may not be known if B-frames are present. */
101  HEXDUMP_PRINT(" pts=");
102  if (pkt->pts == AV_NOPTS_VALUE)
103  HEXDUMP_PRINT("N/A");
104  else
105  HEXDUMP_PRINT("%0.3f", pkt->pts * av_q2d(time_base));
106  HEXDUMP_PRINT("\n");
107  HEXDUMP_PRINT(" size=%d\n", pkt->size);
108  if (dump_payload)
109  hex_dump_internal(avcl, f, level, pkt->data, pkt->size);
110 }
111 
112 void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
113 {
114  pkt_dump_internal(NULL, f, 0, pkt, dump_payload, st->time_base);
115 }
116 
117 void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload,
118  const AVStream *st)
119 {
120  pkt_dump_internal(avcl, NULL, level, pkt, dump_payload, st->time_base);
121 }
122 
123 
124 static void print_fps(double d, const char *postfix)
125 {
126  uint64_t v = lrintf(d * 100);
127  if (!v)
128  av_log(NULL, AV_LOG_INFO, "%1.4f %s", d, postfix);
129  else if (v % 100)
130  av_log(NULL, AV_LOG_INFO, "%3.2f %s", d, postfix);
131  else if (v % (100 * 1000))
132  av_log(NULL, AV_LOG_INFO, "%1.0f %s", d, postfix);
133  else
134  av_log(NULL, AV_LOG_INFO, "%1.0fk %s", d / 1000, postfix);
135 }
136 
137 static void dump_metadata(void *ctx, const AVDictionary *m, const char *indent)
138 {
139  if (m && !(av_dict_count(m) == 1 && av_dict_get(m, "language", NULL, 0))) {
140  const AVDictionaryEntry *tag = NULL;
141 
142  av_log(ctx, AV_LOG_INFO, "%sMetadata:\n", indent);
143  while ((tag = av_dict_iterate(m, tag)))
144  if (strcmp("language", tag->key)) {
145  const char *p = tag->value;
147  "%s %-16s: ", indent, tag->key);
148  while (*p) {
149  size_t len = strcspn(p, "\x8\xa\xb\xc\xd");
150  av_log(ctx, AV_LOG_INFO, "%.*s", (int)(FFMIN(255, len)), p);
151  p += len;
152  if (*p == 0xd) av_log(ctx, AV_LOG_INFO, " ");
153  if (*p == 0xa) av_log(ctx, AV_LOG_INFO, "\n%s %-16s: ", indent, "");
154  if (*p) p++;
155  }
156  av_log(ctx, AV_LOG_INFO, "\n");
157  }
158  }
159 }
160 
161 /* param change side data*/
162 static void dump_paramchange(void *ctx, const AVPacketSideData *sd)
163 {
164  int size = sd->size;
165  const uint8_t *data = sd->data;
166  uint32_t flags, sample_rate, width, height;
167 #if FF_API_OLD_CHANNEL_LAYOUT
168  uint32_t channels;
169  uint64_t layout;
170 #endif
171 
172  if (!data || sd->size < 4)
173  goto fail;
174 
175  flags = AV_RL32(data);
176  data += 4;
177  size -= 4;
178 
179 #if FF_API_OLD_CHANNEL_LAYOUT
181  if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT) {
182  if (size < 4)
183  goto fail;
184  channels = AV_RL32(data);
185  data += 4;
186  size -= 4;
187  av_log(ctx, AV_LOG_INFO, "channel count %"PRIu32", ", channels);
188  }
189  if (flags & AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT) {
190  if (size < 8)
191  goto fail;
192  layout = AV_RL64(data);
193  data += 8;
194  size -= 8;
196  "channel layout: %s, ", av_get_channel_name(layout));
197  }
199 #endif /* FF_API_OLD_CHANNEL_LAYOUT */
201  if (size < 4)
202  goto fail;
204  data += 4;
205  size -= 4;
206  av_log(ctx, AV_LOG_INFO, "sample_rate %"PRIu32", ", sample_rate);
207  }
209  if (size < 8)
210  goto fail;
211  width = AV_RL32(data);
212  data += 4;
213  size -= 4;
214  height = AV_RL32(data);
215  data += 4;
216  size -= 4;
217  av_log(ctx, AV_LOG_INFO, "width %"PRIu32" height %"PRIu32, width, height);
218  }
219 
220  return;
221 fail:
222  av_log(ctx, AV_LOG_ERROR, "unknown param\n");
223 }
224 
225 /* replaygain side data*/
226 static void print_gain(void *ctx, const char *str, int32_t gain)
227 {
228  av_log(ctx, AV_LOG_INFO, "%s - ", str);
229  if (gain == INT32_MIN)
230  av_log(ctx, AV_LOG_INFO, "unknown");
231  else
232  av_log(ctx, AV_LOG_INFO, "%f", gain / 100000.0f);
233  av_log(ctx, AV_LOG_INFO, ", ");
234 }
235 
236 static void print_peak(void *ctx, const char *str, uint32_t peak)
237 {
238  av_log(ctx, AV_LOG_INFO, "%s - ", str);
239  if (!peak)
240  av_log(ctx, AV_LOG_INFO, "unknown");
241  else
242  av_log(ctx, AV_LOG_INFO, "%f", (float) peak / UINT32_MAX);
243  av_log(ctx, AV_LOG_INFO, ", ");
244 }
245 
246 static void dump_replaygain(void *ctx, const AVPacketSideData *sd)
247 {
248  const AVReplayGain *rg;
249 
250  if (sd->size < sizeof(*rg)) {
251  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
252  return;
253  }
254  rg = (const AVReplayGain *)sd->data;
255 
256  print_gain(ctx, "track gain", rg->track_gain);
257  print_peak(ctx, "track peak", rg->track_peak);
258  print_gain(ctx, "album gain", rg->album_gain);
259  print_peak(ctx, "album peak", rg->album_peak);
260 }
261 
262 static void dump_stereo3d(void *ctx, const AVPacketSideData *sd)
263 {
264  const AVStereo3D *stereo;
265 
266  if (sd->size < sizeof(*stereo)) {
267  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
268  return;
269  }
270 
271  stereo = (const AVStereo3D *)sd->data;
272 
273  av_log(ctx, AV_LOG_INFO, "%s", av_stereo3d_type_name(stereo->type));
274 
275  if (stereo->flags & AV_STEREO3D_FLAG_INVERT)
276  av_log(ctx, AV_LOG_INFO, " (inverted)");
277 }
278 
279 static void dump_audioservicetype(void *ctx, const AVPacketSideData *sd)
280 {
281  const enum AVAudioServiceType *ast = (const enum AVAudioServiceType *)sd->data;
282 
283  if (sd->size < sizeof(*ast)) {
284  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
285  return;
286  }
287 
288  switch (*ast) {
290  av_log(ctx, AV_LOG_INFO, "main");
291  break;
293  av_log(ctx, AV_LOG_INFO, "effects");
294  break;
296  av_log(ctx, AV_LOG_INFO, "visually impaired");
297  break;
299  av_log(ctx, AV_LOG_INFO, "hearing impaired");
300  break;
302  av_log(ctx, AV_LOG_INFO, "dialogue");
303  break;
305  av_log(ctx, AV_LOG_INFO, "commentary");
306  break;
308  av_log(ctx, AV_LOG_INFO, "emergency");
309  break;
311  av_log(ctx, AV_LOG_INFO, "voice over");
312  break;
314  av_log(ctx, AV_LOG_INFO, "karaoke");
315  break;
316  default:
317  av_log(ctx, AV_LOG_WARNING, "unknown");
318  break;
319  }
320 }
321 
322 static void dump_cpb(void *ctx, const AVPacketSideData *sd)
323 {
324  const AVCPBProperties *cpb = (const AVCPBProperties *)sd->data;
325 
326  if (sd->size < sizeof(*cpb)) {
327  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
328  return;
329  }
330 
332  "bitrate max/min/avg: %"PRId64"/%"PRId64"/%"PRId64" buffer size: %"PRId64" ",
333  cpb->max_bitrate, cpb->min_bitrate, cpb->avg_bitrate,
334  cpb->buffer_size);
335  if (cpb->vbv_delay == UINT64_MAX)
336  av_log(ctx, AV_LOG_INFO, "vbv_delay: N/A");
337  else
338  av_log(ctx, AV_LOG_INFO, "vbv_delay: %"PRIu64"", cpb->vbv_delay);
339 }
340 
342 {
343  const AVMasteringDisplayMetadata *metadata =
344  (const AVMasteringDisplayMetadata *)sd->data;
345  av_log(ctx, AV_LOG_INFO, "Mastering Display Metadata, "
346  "has_primaries:%d has_luminance:%d "
347  "r(%5.4f,%5.4f) g(%5.4f,%5.4f) b(%5.4f %5.4f) wp(%5.4f, %5.4f) "
348  "min_luminance=%f, max_luminance=%f",
349  metadata->has_primaries, metadata->has_luminance,
350  av_q2d(metadata->display_primaries[0][0]),
351  av_q2d(metadata->display_primaries[0][1]),
352  av_q2d(metadata->display_primaries[1][0]),
353  av_q2d(metadata->display_primaries[1][1]),
354  av_q2d(metadata->display_primaries[2][0]),
355  av_q2d(metadata->display_primaries[2][1]),
356  av_q2d(metadata->white_point[0]), av_q2d(metadata->white_point[1]),
357  av_q2d(metadata->min_luminance), av_q2d(metadata->max_luminance));
358 }
359 
360 static void dump_content_light_metadata(void *ctx, const AVPacketSideData *sd)
361 {
362  const AVContentLightMetadata *metadata =
363  (const AVContentLightMetadata *)sd->data;
364  av_log(ctx, AV_LOG_INFO, "Content Light Level Metadata, "
365  "MaxCLL=%d, MaxFALL=%d",
366  metadata->MaxCLL, metadata->MaxFALL);
367 }
368 
369 static void dump_spherical(void *ctx, const AVCodecParameters *par,
370  const AVPacketSideData *sd)
371 {
372  const AVSphericalMapping *spherical = (const AVSphericalMapping *)sd->data;
373  double yaw, pitch, roll;
374 
375  if (sd->size < sizeof(*spherical)) {
376  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
377  return;
378  }
379 
381 
382  yaw = ((double)spherical->yaw) / (1 << 16);
383  pitch = ((double)spherical->pitch) / (1 << 16);
384  roll = ((double)spherical->roll) / (1 << 16);
385  av_log(ctx, AV_LOG_INFO, "(%f/%f/%f) ", yaw, pitch, roll);
386 
387  if (spherical->projection == AV_SPHERICAL_EQUIRECTANGULAR_TILE) {
388  size_t l, t, r, b;
389  av_spherical_tile_bounds(spherical, par->width, par->height,
390  &l, &t, &r, &b);
393  l, t, r, b);
394  } else if (spherical->projection == AV_SPHERICAL_CUBEMAP) {
395  av_log(ctx, AV_LOG_INFO, "[pad %"PRIu32"] ", spherical->padding);
396  }
397 }
398 
399 static void dump_dovi_conf(void *ctx, const AVPacketSideData *sd)
400 {
403 
404  av_log(ctx, AV_LOG_INFO, "version: %d.%d, profile: %d, level: %d, "
405  "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d",
406  dovi->dv_version_major, dovi->dv_version_minor,
407  dovi->dv_profile, dovi->dv_level,
408  dovi->rpu_present_flag,
409  dovi->el_present_flag,
410  dovi->bl_present_flag,
412 }
413 
414 static void dump_s12m_timecode(void *ctx, const AVStream *st, const AVPacketSideData *sd)
415 {
416  const uint32_t *tc = (const uint32_t *)sd->data;
417 
418  if ((sd->size != sizeof(uint32_t) * 4) || (tc[0] > 3)) {
419  av_log(ctx, AV_LOG_ERROR, "invalid data\n");
420  return;
421  }
422 
423  for (int j = 1; j <= tc[0]; j++) {
424  char tcbuf[AV_TIMECODE_STR_SIZE];
426  av_log(ctx, AV_LOG_INFO, "timecode - %s%s", tcbuf, j != tc[0] ? ", " : "");
427  }
428 }
429 
430 static void dump_sidedata(void *ctx, const AVStream *st, const char *indent)
431 {
432  int i;
433 
434  if (st->nb_side_data)
435  av_log(ctx, AV_LOG_INFO, "%sSide data:\n", indent);
436 
437  for (i = 0; i < st->nb_side_data; i++) {
438  const AVPacketSideData *sd = &st->side_data[i];
439  av_log(ctx, AV_LOG_INFO, "%s ", indent);
440 
441  switch (sd->type) {
442  case AV_PKT_DATA_PALETTE:
443  av_log(ctx, AV_LOG_INFO, "palette");
444  break;
446  av_log(ctx, AV_LOG_INFO, "new extradata");
447  break;
449  av_log(ctx, AV_LOG_INFO, "paramchange: ");
450  dump_paramchange(ctx, sd);
451  break;
453  av_log(ctx, AV_LOG_INFO, "H.263 macroblock info");
454  break;
456  av_log(ctx, AV_LOG_INFO, "replaygain: ");
457  dump_replaygain(ctx, sd);
458  break;
460  av_log(ctx, AV_LOG_INFO, "displaymatrix: rotation of %.2f degrees",
461  av_display_rotation_get((const int32_t *)sd->data));
462  break;
464  av_log(ctx, AV_LOG_INFO, "stereo3d: ");
465  dump_stereo3d(ctx, sd);
466  break;
468  av_log(ctx, AV_LOG_INFO, "audio service type: ");
470  break;
472  av_log(ctx, AV_LOG_INFO, "quality factor: %"PRId32", pict_type: %c",
473  AV_RL32(sd->data), av_get_picture_type_char(sd->data[4]));
474  break;
476  av_log(ctx, AV_LOG_INFO, "cpb: ");
477  dump_cpb(ctx, sd);
478  break;
481  break;
483  av_log(ctx, AV_LOG_INFO, "spherical: ");
484  dump_spherical(ctx, st->codecpar, sd);
485  break;
488  break;
490  av_log(ctx, AV_LOG_INFO, "ICC Profile");
491  break;
493  av_log(ctx, AV_LOG_INFO, "DOVI configuration record: ");
494  dump_dovi_conf(ctx, sd);
495  break;
497  av_log(ctx, AV_LOG_INFO, "SMPTE ST 12-1:2014: ");
498  dump_s12m_timecode(ctx, st, sd);
499  break;
500  default:
501  av_log(ctx, AV_LOG_INFO, "unknown side data type %d "
502  "(%"SIZE_SPECIFIER" bytes)", sd->type, sd->size);
503  break;
504  }
505 
506  av_log(ctx, AV_LOG_INFO, "\n");
507  }
508 }
509 
510 /* "user interface" functions */
511 static void dump_stream_format(const AVFormatContext *ic, int i,
512  int index, int is_output)
513 {
514  char buf[256];
515  int flags = (is_output ? ic->oformat->flags : ic->iformat->flags);
516  const AVStream *st = ic->streams[i];
517  const FFStream *const sti = cffstream(st);
518  const AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL, 0);
519  const char *separator = ic->dump_separator;
520  AVCodecContext *avctx;
521  int ret;
522 
523  avctx = avcodec_alloc_context3(NULL);
524  if (!avctx)
525  return;
526 
528  if (ret < 0) {
529  avcodec_free_context(&avctx);
530  return;
531  }
532 
533  // Fields which are missing from AVCodecParameters need to be taken from the AVCodecContext
534  avctx->properties = sti->avctx->properties;
535  avctx->codec = sti->avctx->codec;
536  avctx->qmin = sti->avctx->qmin;
537  avctx->qmax = sti->avctx->qmax;
538  avctx->coded_width = sti->avctx->coded_width;
539  avctx->coded_height = sti->avctx->coded_height;
540 
541  if (separator)
542  av_opt_set(avctx, "dump_separator", separator, 0);
543  avcodec_string(buf, sizeof(buf), avctx, is_output);
544  avcodec_free_context(&avctx);
545 
546  av_log(NULL, AV_LOG_INFO, " Stream #%d:%d", index, i);
547 
548  /* the pid is an important information, so we display it */
549  /* XXX: add a generic system */
550  if (flags & AVFMT_SHOW_IDS)
551  av_log(NULL, AV_LOG_INFO, "[0x%x]", st->id);
552  if (lang)
553  av_log(NULL, AV_LOG_INFO, "(%s)", lang->value);
554  av_log(NULL, AV_LOG_DEBUG, ", %d, %d/%d", sti->codec_info_nb_frames,
555  st->time_base.num, st->time_base.den);
556  av_log(NULL, AV_LOG_INFO, ": %s", buf);
557 
558  if (st->sample_aspect_ratio.num &&
560  AVRational display_aspect_ratio;
561  av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den,
562  st->codecpar->width * (int64_t)st->sample_aspect_ratio.num,
563  st->codecpar->height * (int64_t)st->sample_aspect_ratio.den,
564  1024 * 1024);
565  av_log(NULL, AV_LOG_INFO, ", SAR %d:%d DAR %d:%d",
567  display_aspect_ratio.num, display_aspect_ratio.den);
568  }
569 
570  if (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
571  int fps = st->avg_frame_rate.den && st->avg_frame_rate.num;
572  int tbr = st->r_frame_rate.den && st->r_frame_rate.num;
573  int tbn = st->time_base.den && st->time_base.num;
574 
575  if (fps || tbr || tbn)
576  av_log(NULL, AV_LOG_INFO, "%s", separator);
577 
578  if (fps)
579  print_fps(av_q2d(st->avg_frame_rate), tbr || tbn ? "fps, " : "fps");
580  if (tbr)
581  print_fps(av_q2d(st->r_frame_rate), tbn ? "tbr, " : "tbr");
582  if (tbn)
583  print_fps(1 / av_q2d(st->time_base), "tbn");
584  }
585 
587  av_log(NULL, AV_LOG_INFO, " (default)");
589  av_log(NULL, AV_LOG_INFO, " (dub)");
591  av_log(NULL, AV_LOG_INFO, " (original)");
593  av_log(NULL, AV_LOG_INFO, " (comment)");
595  av_log(NULL, AV_LOG_INFO, " (lyrics)");
597  av_log(NULL, AV_LOG_INFO, " (karaoke)");
599  av_log(NULL, AV_LOG_INFO, " (forced)");
601  av_log(NULL, AV_LOG_INFO, " (hearing impaired)");
603  av_log(NULL, AV_LOG_INFO, " (visual impaired)");
605  av_log(NULL, AV_LOG_INFO, " (clean effects)");
607  av_log(NULL, AV_LOG_INFO, " (attached pic)");
609  av_log(NULL, AV_LOG_INFO, " (timed thumbnails)");
611  av_log(NULL, AV_LOG_INFO, " (captions)");
613  av_log(NULL, AV_LOG_INFO, " (descriptions)");
615  av_log(NULL, AV_LOG_INFO, " (metadata)");
617  av_log(NULL, AV_LOG_INFO, " (dependent)");
619  av_log(NULL, AV_LOG_INFO, " (still image)");
621  av_log(NULL, AV_LOG_INFO, " (non-diegetic)");
622  av_log(NULL, AV_LOG_INFO, "\n");
623 
624  dump_metadata(NULL, st->metadata, " ");
625 
626  dump_sidedata(NULL, st, " ");
627 }
628 
630  const char *url, int is_output)
631 {
632  int i;
633  uint8_t *printed = ic->nb_streams ? av_mallocz(ic->nb_streams) : NULL;
634  if (ic->nb_streams && !printed)
635  return;
636 
637  av_log(NULL, AV_LOG_INFO, "%s #%d, %s, %s '%s':\n",
638  is_output ? "Output" : "Input",
639  index,
640  is_output ? ic->oformat->name : ic->iformat->name,
641  is_output ? "to" : "from", url);
642  dump_metadata(NULL, ic->metadata, " ");
643 
644  if (!is_output) {
645  av_log(NULL, AV_LOG_INFO, " Duration: ");
646  if (ic->duration != AV_NOPTS_VALUE) {
647  int64_t hours, mins, secs, us;
648  int64_t duration = ic->duration + (ic->duration <= INT64_MAX - 5000 ? 5000 : 0);
649  secs = duration / AV_TIME_BASE;
651  mins = secs / 60;
652  secs %= 60;
653  hours = mins / 60;
654  mins %= 60;
655  av_log(NULL, AV_LOG_INFO, "%02"PRId64":%02"PRId64":%02"PRId64".%02"PRId64"", hours, mins, secs,
656  (100 * us) / AV_TIME_BASE);
657  } else {
658  av_log(NULL, AV_LOG_INFO, "N/A");
659  }
660  if (ic->start_time != AV_NOPTS_VALUE) {
661  int secs, us;
662  av_log(NULL, AV_LOG_INFO, ", start: ");
663  secs = llabs(ic->start_time / AV_TIME_BASE);
664  us = llabs(ic->start_time % AV_TIME_BASE);
665  av_log(NULL, AV_LOG_INFO, "%s%d.%06d",
666  ic->start_time >= 0 ? "" : "-",
667  secs,
668  (int) av_rescale(us, 1000000, AV_TIME_BASE));
669  }
670  av_log(NULL, AV_LOG_INFO, ", bitrate: ");
671  if (ic->bit_rate)
672  av_log(NULL, AV_LOG_INFO, "%"PRId64" kb/s", ic->bit_rate / 1000);
673  else
674  av_log(NULL, AV_LOG_INFO, "N/A");
675  av_log(NULL, AV_LOG_INFO, "\n");
676  }
677 
678  if (ic->nb_chapters)
679  av_log(NULL, AV_LOG_INFO, " Chapters:\n");
680  for (i = 0; i < ic->nb_chapters; i++) {
681  const AVChapter *ch = ic->chapters[i];
682  av_log(NULL, AV_LOG_INFO, " Chapter #%d:%d: ", index, i);
684  "start %f, ", ch->start * av_q2d(ch->time_base));
686  "end %f\n", ch->end * av_q2d(ch->time_base));
687 
688  dump_metadata(NULL, ch->metadata, " ");
689  }
690 
691  if (ic->nb_programs) {
692  int j, k, total = 0;
693  for (j = 0; j < ic->nb_programs; j++) {
694  const AVProgram *program = ic->programs[j];
695  const AVDictionaryEntry *name = av_dict_get(program->metadata,
696  "name", NULL, 0);
697  av_log(NULL, AV_LOG_INFO, " Program %d %s\n", program->id,
698  name ? name->value : "");
699  dump_metadata(NULL, program->metadata, " ");
700  for (k = 0; k < program->nb_stream_indexes; k++) {
701  dump_stream_format(ic, program->stream_index[k],
702  index, is_output);
703  printed[program->stream_index[k]] = 1;
704  }
705  total += program->nb_stream_indexes;
706  }
707  if (total < ic->nb_streams)
708  av_log(NULL, AV_LOG_INFO, " No Program\n");
709  }
710 
711  for (i = 0; i < ic->nb_streams; i++)
712  if (!printed[i])
713  dump_stream_format(ic, i, index, is_output);
714 
715  av_free(printed);
716 }
AVMasteringDisplayMetadata::has_primaries
int has_primaries
Flag indicating whether the display primaries (and white point) are set.
Definition: mastering_display_metadata.h:62
av_pkt_dump2
void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the specified file stream.
Definition: dump.c:112
FF_ENABLE_DEPRECATION_WARNINGS
#define FF_ENABLE_DEPRECATION_WARNINGS
Definition: internal.h:82
AV_LOG_WARNING
#define AV_LOG_WARNING
Something somehow does not look correct.
Definition: log.h:186
AV_TIMECODE_STR_SIZE
#define AV_TIMECODE_STR_SIZE
Definition: timecode.h:33
AVMasteringDisplayMetadata::max_luminance
AVRational max_luminance
Max luminance of mastering display (cd/m^2).
Definition: mastering_display_metadata.h:57
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
dump_paramchange
static void dump_paramchange(void *ctx, const AVPacketSideData *sd)
Definition: dump.c:162
level
uint8_t level
Definition: svq3.c:204
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
AVOutputFormat::name
const char * name
Definition: avformat.h:508
AVChapter::metadata
AVDictionary * metadata
Definition: avformat.h:1067
r
const char * r
Definition: vf_curves.c:126
opt.h
AVCodecParameters::codec_type
enum AVMediaType codec_type
General type of the encoded data.
Definition: codec_par.h:58
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:82
AVFormatContext::nb_chapters
unsigned int nb_chapters
Number of chapters in AVChapter array.
Definition: avformat.h:1319
AVCodecParameters
This struct describes the properties of an encoded stream.
Definition: codec_par.h:54
AV_PKT_DATA_PARAM_CHANGE
@ AV_PKT_DATA_PARAM_CHANGE
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
Definition: packet.h:73
AV_RL64
uint64_t_TMPL AV_RL64
Definition: bytestream.h:91
AV_DISPOSITION_ATTACHED_PIC
#define AV_DISPOSITION_ATTACHED_PIC
The stream is stored in the file as an attached picture/"cover art" (e.g.
Definition: avformat.h:769
av_dict_count
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
Definition: dict.c:37
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
AVMasteringDisplayMetadata::has_luminance
int has_luminance
Flag indicating whether the luminance (min_ and max_) have been set.
Definition: mastering_display_metadata.h:67
avcodec_string
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
Definition: avcodec.c:505
av_get_channel_name
const char * av_get_channel_name(uint64_t channel)
Get the name of a given channel.
Definition: channel_layout.c:343
hex_dump_internal
static void hex_dump_internal(void *avcl, FILE *f, int level, const uint8_t *buf, int size)
Definition: dump.c:51
dump_s12m_timecode
static void dump_s12m_timecode(void *ctx, const AVStream *st, const AVPacketSideData *sd)
Definition: dump.c:414
AV_DISPOSITION_DEFAULT
#define AV_DISPOSITION_DEFAULT
The stream should be chosen by default among other streams of the same type, unless the user has expl...
Definition: avformat.h:716
AVContentLightMetadata::MaxCLL
unsigned MaxCLL
Max content light level (cd/m^2).
Definition: mastering_display_metadata.h:102
AVFormatContext::streams
AVStream ** streams
A list of all streams in the file.
Definition: avformat.h:1172
AVPacketSideData
Definition: packet.h:315
AVPacket::data
uint8_t * data
Definition: packet.h:374
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:37
dump_dovi_conf
static void dump_dovi_conf(void *ctx, const AVPacketSideData *sd)
Definition: dump.c:399
b
#define b
Definition: input.c:41
AVReplayGain::album_gain
int32_t album_gain
Same as track_gain, but for the whole album.
Definition: replaygain.h:43
AV_PKT_DATA_PALETTE
@ AV_PKT_DATA_PALETTE
An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE bytes worth of palette.
Definition: packet.h:47
AVStream::avg_frame_rate
AVRational avg_frame_rate
Average framerate.
Definition: avformat.h:927
spherical.h
AVChapter::start
int64_t start
Definition: avformat.h:1066
data
const char data[16]
Definition: mxf.c:146
AV_AUDIO_SERVICE_TYPE_VOICE_OVER
@ AV_AUDIO_SERVICE_TYPE_VOICE_OVER
Definition: defs.h:87
print_fps
static void print_fps(double d, const char *postfix)
Definition: dump.c:124
AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE
@ AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE
Definition: packet.h:458
AVFormatContext::programs
AVProgram ** programs
Definition: avformat.h:1270
AVPacket::duration
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
Definition: packet.h:392
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
mathematics.h
AVDictionary
Definition: dict.c:32
dump_cpb
static void dump_cpb(void *ctx, const AVPacketSideData *sd)
Definition: dump.c:322
cffstream
static const av_always_inline FFStream * cffstream(const AVStream *st)
Definition: internal.h:418
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:229
AVCodecContext::qmax
int qmax
maximum quantizer
Definition: avcodec.h:1225
replaygain.h
AV_PKT_FLAG_KEY
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
Definition: packet.h:429
sample_rate
sample_rate
Definition: ffmpeg_filter.c:156
AVContentLightMetadata
Content light level needed by to transmit HDR over HDMI (CTA-861.3).
Definition: mastering_display_metadata.h:98
AVPacketSideData::size
size_t size
Definition: packet.h:317
AVCodecContext::codec
const struct AVCodec * codec
Definition: avcodec.h:435
fail
#define fail()
Definition: checkasm.h:134
timecode.h
dump_audioservicetype
static void dump_audioservicetype(void *ctx, const AVPacketSideData *sd)
Definition: dump.c:279
AV_DISPOSITION_STILL_IMAGE
#define AV_DISPOSITION_STILL_IMAGE
The video stream contains still images.
Definition: avformat.h:808
FFStream::avctx
struct AVCodecContext * avctx
The codec context used by avformat_find_stream_info, the parser, etc.
Definition: internal.h:223
AVChapter
Definition: avformat.h:1063
AV_DISPOSITION_FORCED
#define AV_DISPOSITION_FORCED
Track should be used during playback by default.
Definition: avformat.h:749
AVFormatContext::dump_separator
uint8_t * dump_separator
dump format separator.
Definition: avformat.h:1626
AV_DISPOSITION_TIMED_THUMBNAILS
#define AV_DISPOSITION_TIMED_THUMBNAILS
The stream is sparse, and contains thumbnail images, often corresponding to chapter markers.
Definition: avformat.h:774
AVCodecContext::coded_height
int coded_height
Definition: avcodec.h:613
us
#define us(width, name, range_min, range_max, subs,...)
Definition: cbs_h2645.c:276
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:109
av_opt_set
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
Definition: opt.c:487
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
AVRational::num
int num
Numerator.
Definition: rational.h:59
AV_PKT_DATA_REPLAYGAIN
@ AV_PKT_DATA_REPLAYGAIN
This side data should be associated with an audio stream and contains ReplayGain information in form ...
Definition: packet.h:100
AVFormatContext::bit_rate
int64_t bit_rate
Total stream bitrate in bit/s, 0 if not available.
Definition: avformat.h:1213
AV_DISPOSITION_CLEAN_EFFECTS
#define AV_DISPOSITION_CLEAN_EFFECTS
The audio stream contains music and sound effects without voice.
Definition: avformat.h:761
pkt
AVPacket * pkt
Definition: movenc.c:59
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
AVFormatContext::metadata
AVDictionary * metadata
Metadata that applies to the whole file.
Definition: avformat.h:1330
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:629
duration
int64_t duration
Definition: movenc.c:64
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:121
av_dict_get
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
Definition: dict.c:60
AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
@ AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
Definition: packet.h:459
avcodec_alloc_context3
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
Definition: options.c:153
AVChapter::end
int64_t end
chapter start/end time in time_base units
Definition: avformat.h:1066
width
#define width
stereo3d.h
AVMasteringDisplayMetadata::white_point
AVRational white_point[2]
CIE 1931 xy chromaticity coords of white point.
Definition: mastering_display_metadata.h:47
intreadwrite.h
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:115
AV_PKT_DATA_MASTERING_DISPLAY_METADATA
@ AV_PKT_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata (based on SMPTE-2086:2014).
Definition: packet.h:223
AVCodecParameters::sample_aspect_ratio
AVRational sample_aspect_ratio
Video only.
Definition: codec_par.h:138
AVFormatContext::nb_programs
unsigned int nb_programs
Definition: avformat.h:1269
AVInputFormat::name
const char * name
A comma separated list of short names for the format.
Definition: avformat.h:551
AVFormatContext::iformat
const struct AVInputFormat * iformat
The input container format.
Definition: avformat.h:1116
AVFormatContext::chapters
AVChapter ** chapters
Definition: avformat.h:1320
dump_metadata
static void dump_metadata(void *ctx, const AVDictionary *m, const char *indent)
Definition: dump.c:137
AVCodecParameters::width
int width
Video only.
Definition: codec_par.h:128
av_q2d
static double av_q2d(AVRational a)
Convert an AVRational to a double.
Definition: rational.h:104
AV_PKT_DATA_ICC_PROFILE
@ AV_PKT_DATA_ICC_PROFILE
ICC profile data consisting of an opaque octet buffer following the format described by ISO 15076-1.
Definition: packet.h:275
AV_LOG_DEBUG
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
Definition: log.h:201
AVPacketSideData::data
uint8_t * data
Definition: packet.h:316
AVDOVIDecoderConfigurationRecord::dv_profile
uint8_t dv_profile
Definition: dovi_meta.h:55
ctx
AVFormatContext * ctx
Definition: movenc.c:48
FFStream::codec_info_nb_frames
int codec_info_nb_frames
Number of frames that have been demuxed during avformat_find_stream_info()
Definition: internal.h:392
channels
channels
Definition: aptx.h:31
nb_streams
static int nb_streams
Definition: ffprobe.c:309
AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED
@ AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED
Definition: defs.h:83
AVReplayGain::track_peak
uint32_t track_peak
Peak track amplitude, with 100000 representing full scale (but values may overflow).
Definition: replaygain.h:39
AVCPBProperties
This structure describes the bitrate properties of an encoded bitstream.
Definition: defs.h:126
AVDOVIDecoderConfigurationRecord::dv_version_major
uint8_t dv_version_major
Definition: dovi_meta.h:53
print_peak
static void print_peak(void *ctx, const char *str, uint32_t peak)
Definition: dump.c:236
AVStereo3D::flags
int flags
Additional information about the frame packing.
Definition: stereo3d.h:182
dump_mastering_display_metadata
static void dump_mastering_display_metadata(void *ctx, const AVPacketSideData *sd)
Definition: dump.c:341
if
if(ret)
Definition: filter_design.txt:179
AVFormatContext
Format I/O context.
Definition: avformat.h:1104
internal.h
AVStream::codecpar
AVCodecParameters * codecpar
Codec parameters associated with this stream.
Definition: avformat.h:861
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:877
NULL
#define NULL
Definition: coverity.c:32
AVDOVIDecoderConfigurationRecord::dv_level
uint8_t dv_level
Definition: dovi_meta.h:56
AVDOVIDecoderConfigurationRecord::dv_bl_signal_compatibility_id
uint8_t dv_bl_signal_compatibility_id
Definition: dovi_meta.h:60
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:168
AVRational
Rational number (pair of numerator and denominator).
Definition: rational.h:58
print_gain
static void print_gain(void *ctx, const char *str, int32_t gain)
Definition: dump.c:226
AVPacketSideData::type
enum AVPacketSideDataType type
Definition: packet.h:318
AV_DISPOSITION_COMMENT
#define AV_DISPOSITION_COMMENT
The stream is a commentary track.
Definition: avformat.h:734
AVStream::metadata
AVDictionary * metadata
Definition: avformat.h:918
dump_content_light_metadata
static void dump_content_light_metadata(void *ctx, const AVPacketSideData *sd)
Definition: dump.c:360
AV_DISPOSITION_METADATA
#define AV_DISPOSITION_METADATA
The subtitle stream contains time-aligned metadata that is not intended to be directly presented to t...
Definition: avformat.h:798
double
double
Definition: af_crystalizer.c:132
AV_AUDIO_SERVICE_TYPE_EMERGENCY
@ AV_AUDIO_SERVICE_TYPE_EMERGENCY
Definition: defs.h:86
AV_DISPOSITION_ORIGINAL
#define AV_DISPOSITION_ORIGINAL
The stream is in original language.
Definition: avformat.h:730
index
int index
Definition: gxfenc.c:89
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
AVAudioServiceType
AVAudioServiceType
Definition: defs.h:79
AVFormatContext::nb_streams
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
Definition: avformat.h:1160
AVOutputFormat::flags
int flags
can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS,...
Definition: avformat.h:527
dump_stereo3d
static void dump_stereo3d(void *ctx, const AVPacketSideData *sd)
Definition: dump.c:262
AV_DISPOSITION_CAPTIONS
#define AV_DISPOSITION_CAPTIONS
The subtitle stream contains captions, providing a transcription and possibly a translation of audio.
Definition: avformat.h:787
dump_spherical
static void dump_spherical(void *ctx, const AVCodecParameters *par, const AVPacketSideData *sd)
Definition: dump.c:369
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:61
f
f
Definition: af_crystalizer.c:122
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
AVPacket::size
int size
Definition: packet.h:375
FFStream
Definition: internal.h:196
size
int size
Definition: twinvq_data.h:10344
AV_NOPTS_VALUE
#define AV_NOPTS_VALUE
Undefined timestamp value.
Definition: avutil.h:248
dump_stream_format
static void dump_stream_format(const AVFormatContext *ic, int i, int index, int is_output)
Definition: dump.c:511
AVReplayGain::track_gain
int32_t track_gain
Track replay gain in microbels (divide by 100000 to get the value in dB).
Definition: replaygain.h:34
AV_DISPOSITION_DUB
#define AV_DISPOSITION_DUB
The stream is not in original language.
Definition: avformat.h:724
AV_PKT_DATA_H263_MB_INFO
@ AV_PKT_DATA_H263_MB_INFO
An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of structures with info about macroblo...
Definition: packet.h:94
AVCPBProperties::min_bitrate
int64_t min_bitrate
Minimum bitrate of the stream, in bits per second.
Definition: defs.h:136
AVStream::sample_aspect_ratio
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
Definition: avformat.h:916
AV_DISPOSITION_HEARING_IMPAIRED
#define AV_DISPOSITION_HEARING_IMPAIRED
The stream is intended for hearing impaired audiences.
Definition: avformat.h:753
AVPacket::dts
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
Definition: packet.h:373
height
#define height
AVSphericalMapping::padding
uint32_t padding
Number of pixels to pad from the edge of each cube face.
Definition: spherical.h:178
AV_PKT_DATA_CONTENT_LIGHT_LEVEL
@ AV_PKT_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
Definition: packet.h:236
AVPacket::flags
int flags
A combination of AV_PKT_FLAG values.
Definition: packet.h:380
AVCPBProperties::avg_bitrate
int64_t avg_bitrate
Average bitrate of the stream, in bits per second.
Definition: defs.h:141
AV_STEREO3D_FLAG_INVERT
#define AV_STEREO3D_FLAG_INVERT
Inverted views, Right/Bottom represents the left view.
Definition: stereo3d.h:164
AV_LOG_INFO
#define AV_LOG_INFO
Standard information.
Definition: log.h:191
AVStream::side_data
AVPacketSideData * side_data
An array of side data that applies to the whole stream (i.e.
Definition: avformat.h:956
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_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:156
HEXDUMP_PRINT
#define HEXDUMP_PRINT(...)
Definition: dump.c:43
AVSphericalMapping::roll
int32_t roll
Rotation around the forward vector [-180, 180].
Definition: spherical.h:124
log.h
lrintf
#define lrintf(x)
Definition: libm_mips.h:72
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
AVPacket::pts
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
Definition: packet.h:367
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:138
AVCodecContext::properties
unsigned properties
Properties of the stream that gets decoded.
Definition: avcodec.h:1851
AVCodecParameters::height
int height
Definition: codec_par.h:129
avcodec_parameters_to_context
int avcodec_parameters_to_context(AVCodecContext *codec, const AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters.
Definition: codec_par.c:182
AV_TIME_BASE
#define AV_TIME_BASE
Internal time base represented as integer.
Definition: avutil.h:254
display.h
AVCPBProperties::max_bitrate
int64_t max_bitrate
Maximum bitrate of the stream, in bits per second.
Definition: defs.h:131
AV_DISPOSITION_KARAOKE
#define AV_DISPOSITION_KARAOKE
The stream contains karaoke audio.
Definition: avformat.h:742
dump_sidedata
static void dump_sidedata(void *ctx, const AVStream *st, const char *indent)
Definition: dump.c:430
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED
@ AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED
Definition: defs.h:82
av_mallocz
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
Definition: mem.c:254
AVProgram
New fields can be added to the end with minor version bumps.
Definition: avformat.h:1028
AV_PKT_DATA_CPB_PROPERTIES
@ AV_PKT_DATA_CPB_PROPERTIES
This side data corresponds to the AVCPBProperties struct.
Definition: packet.h:146
AV_DISPOSITION_DEPENDENT
#define AV_DISPOSITION_DEPENDENT
The audio stream is intended to be mixed with another stream before presentation.
Definition: avformat.h:804
AVMasteringDisplayMetadata
Mastering display metadata capable of representing the color volume of the display used to master the...
Definition: mastering_display_metadata.h:38
len
int len
Definition: vorbis_enc_data.h:426
av_rescale
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
Definition: mathematics.c:129
avcodec.h
av_cmp_q
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
Definition: rational.h:89
AVStream::disposition
int disposition
Stream disposition - a combination of AV_DISPOSITION_* flags.
Definition: avformat.h:907
AV_DISPOSITION_VISUAL_IMPAIRED
#define AV_DISPOSITION_VISUAL_IMPAIRED
The stream is intended for visually impaired audiences.
Definition: avformat.h:757
tag
uint32_t tag
Definition: movenc.c:1641
AVStream::id
int id
Format-specific stream ID.
Definition: avformat.h:850
ret
ret
Definition: filter_design.txt:187
AVStream
Stream structure.
Definition: avformat.h:838
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:284
av_hex_dump_log
void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the log.
Definition: dump.c:83
AVFormatContext::oformat
const struct AVOutputFormat * oformat
The output container format.
Definition: avformat.h:1123
AVCPBProperties::buffer_size
int64_t buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
Definition: defs.h:147
AVSphericalMapping::pitch
int32_t pitch
Rotation around the right vector [-90, 90].
Definition: spherical.h:123
AVStream::nb_side_data
int nb_side_data
The number of elements in the AVStream.side_data array.
Definition: avformat.h:960
AVStereo3D::type
enum AVStereo3DType type
How views are packed within the video.
Definition: stereo3d.h:177
avformat.h
dovi_meta.h
AV_AUDIO_SERVICE_TYPE_KARAOKE
@ AV_AUDIO_SERVICE_TYPE_KARAOKE
Definition: defs.h:88
AV_PKT_DATA_S12M_TIMECODE
@ AV_PKT_DATA_S12M_TIMECODE
Timecode which conforms to SMPTE ST 12-1:2014.
Definition: packet.h:292
AV_DISPOSITION_DESCRIPTIONS
#define AV_DISPOSITION_DESCRIPTIONS
The subtitle stream contains a textual description of the video content.
Definition: avformat.h:793
AV_RL32
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
Definition: bytestream.h:92
SIZE_SPECIFIER
#define SIZE_SPECIFIER
Definition: internal.h:150
AVCodecContext
main external API structure.
Definition: avcodec.h:426
channel_layout.h
AVInputFormat::flags
int flags
Can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_SHOW_IDS, AVFMT_NOTIMESTAMPS,...
Definition: avformat.h:565
dump_replaygain
static void dump_replaygain(void *ctx, const AVPacketSideData *sd)
Definition: dump.c:246
AVCodecContext::qmin
int qmin
minimum quantizer
Definition: avcodec.h:1218
AV_PKT_DATA_NEW_EXTRADATA
@ AV_PKT_DATA_NEW_EXTRADATA
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
Definition: packet.h:56
AVRational::den
int den
Denominator.
Definition: rational.h:60
AVDOVIDecoderConfigurationRecord::bl_present_flag
uint8_t bl_present_flag
Definition: dovi_meta.h:59
AV_AUDIO_SERVICE_TYPE_COMMENTARY
@ AV_AUDIO_SERVICE_TYPE_COMMENTARY
Definition: defs.h:85
AVReplayGain::album_peak
uint32_t album_peak
Same as track_peak, but for the whole album,.
Definition: replaygain.h:47
AVStream::r_frame_rate
AVRational r_frame_rate
Real base framerate of the stream.
Definition: avformat.h:996
AVDOVIDecoderConfigurationRecord::rpu_present_flag
uint8_t rpu_present_flag
Definition: dovi_meta.h:57
AVDOVIDecoderConfigurationRecord::el_present_flag
uint8_t el_present_flag
Definition: dovi_meta.h:58
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:1206
AVPacket::stream_index
int stream_index
Definition: packet.h:376
pkt_dump_internal
static void pkt_dump_internal(void *avcl, FILE *f, int level, const AVPacket *pkt, int dump_payload, AVRational time_base)
Definition: dump.c:88
FF_DISABLE_DEPRECATION_WARNINGS
#define FF_DISABLE_DEPRECATION_WARNINGS
Definition: internal.h:81
AVReplayGain
ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1....
Definition: replaygain.h:29
AVCodecContext::coded_width
int coded_width
Bitstream width / height, may be different from width/height e.g.
Definition: avcodec.h:613
tc
#define tc
Definition: regdef.h:69
AVDOVIDecoderConfigurationRecord::dv_version_minor
uint8_t dv_version_minor
Definition: dovi_meta.h:54
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
mastering_display_metadata.h
av_free
#define av_free(p)
Definition: tableprint_vlc.h:33
AVDictionaryEntry
Definition: dict.h:89
AV_AUDIO_SERVICE_TYPE_EFFECTS
@ AV_AUDIO_SERVICE_TYPE_EFFECTS
Definition: defs.h:81
AVContentLightMetadata::MaxFALL
unsigned MaxFALL
Max average light level per frame (cd/m^2).
Definition: mastering_display_metadata.h:107
AVPacket
This structure stores compressed data.
Definition: packet.h:351
d
d
Definition: ffmpeg_filter.c:156
int32_t
int32_t
Definition: audioconvert.c:56
convert_header.str
string str
Definition: convert_header.py:20
AV_PKT_DATA_QUALITY_STATS
@ AV_PKT_DATA_QUALITY_STATS
This side data contains quality related information from the encoder.
Definition: packet.h:133
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
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:1196
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:58
av_pkt_dump_log2
void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the log.
Definition: dump.c:117
AV_AUDIO_SERVICE_TYPE_DIALOGUE
@ AV_AUDIO_SERVICE_TYPE_DIALOGUE
Definition: defs.h:84
AVStereo3D
Stereo 3D type: this structure describes how two videos are packed within a single video surface,...
Definition: stereo3d.h:173
AVDictionaryEntry::value
char * value
Definition: dict.h:91
AVChapter::time_base
AVRational time_base
time base in which the start/end timestamps are specified
Definition: avformat.h:1065
AV_AUDIO_SERVICE_TYPE_MAIN
@ AV_AUDIO_SERVICE_TYPE_MAIN
Definition: defs.h:80
AVSphericalMapping
This structure describes how to handle spherical videos, outlining information about projection,...
Definition: spherical.h:78
av_dict_iterate
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
Definition: dict.c:42
AVSphericalMapping::yaw
int32_t yaw
Rotation around the up vector [-180, 180].
Definition: spherical.h:122
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
AV_DISPOSITION_LYRICS
#define AV_DISPOSITION_LYRICS
The stream contains song lyrics.
Definition: avformat.h:738
AVDOVIDecoderConfigurationRecord
Definition: dovi_meta.h:52
AV_DISPOSITION_NON_DIEGETIC
#define AV_DISPOSITION_NON_DIEGETIC
The stream is intended to be mixed with a spatial audio track.
Definition: avformat.h:781
av_hex_dump
void av_hex_dump(FILE *f, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the specified file stream.
Definition: dump.c:78