42
45
static int use_value_sexagesimal_format = 0;
45
static const OptionDef options[];
48
static const OptionDef *options;
47
50
/* AVprobe context */
48
51
static const char *input_filename;
49
52
static AVInputFormat *iformat = NULL;
51
static const char *binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" };
52
static const char *decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" };
54
static const char *unit_second_str = "s" ;
55
static const char *unit_hertz_str = "Hz" ;
56
static const char *unit_byte_str = "byte" ;
57
static const char *unit_bit_per_second_str = "bit/s";
59
void exit_program(int ret)
54
static const char *const binary_unit_prefixes [] = { "", "Ki", "Mi", "Gi", "Ti", "Pi" };
55
static const char *const decimal_unit_prefixes[] = { "", "K" , "M" , "G" , "T" , "P" };
57
static const char unit_second_str[] = "s" ;
58
static const char unit_hertz_str[] = "Hz" ;
59
static const char unit_byte_str[] = "byte" ;
60
static const char unit_bit_per_second_str[] = "bit/s";
62
static void exit_program(void)
64
av_dict_free(&fmt_entries_to_show);
68
* The output is structured in array and objects that might contain items
69
* Array could require the objects within to not be named.
70
* Object could require the items within to be named.
72
* For flat representation the name of each section is saved on prefix so it
73
* can be rendered in order to represent nested structures (e.g. array of
74
* objects for the packets list).
76
* Within an array each element can need an unique identifier or an index.
78
* Nesting level is accounted separately.
88
ProbeElementType type;
96
void (*print_header)(void);
97
void (*print_footer)(void);
99
void (*print_array_header) (const char *name);
100
void (*print_array_footer) (const char *name);
101
void (*print_object_header)(const char *name);
102
void (*print_object_footer)(const char *name);
104
void (*print_integer) (const char *key, int64_t value);
105
void (*print_string) (const char *key, const char *value);
108
static AVIOContext *probe_out = NULL;
109
static OutputContext octx;
110
#define AVP_INDENT() avio_printf(probe_out, "%*c", octx.level * 2, ' ')
113
* Default format, INI
115
* - all key and values are utf8
116
* - '.' is the subgroup separator
117
* - newlines and the following characters are escaped
118
* - '\' is the escape character
119
* - '#' is the comment
120
* - '=' is the key/value separators
121
* - ':' is not used but usually parsed as key/value separator
124
static void ini_print_header(void)
126
avio_printf(probe_out, "# avprobe output\n\n");
128
static void ini_print_footer(void)
130
avio_w8(probe_out, '\n');
133
static void ini_escape_print(const char *s)
140
case '\r': avio_printf(probe_out, "%s", "\\r"); break;
141
case '\n': avio_printf(probe_out, "%s", "\\n"); break;
142
case '\f': avio_printf(probe_out, "%s", "\\f"); break;
143
case '\b': avio_printf(probe_out, "%s", "\\b"); break;
144
case '\t': avio_printf(probe_out, "%s", "\\t"); break;
148
case ':' : avio_w8(probe_out, '\\');
150
if ((unsigned char)c < 32)
151
avio_printf(probe_out, "\\x00%02x", c & 0xff);
153
avio_w8(probe_out, c);
159
static void ini_print_array_header(const char *name)
161
if (octx.prefix[octx.level -1].nb_elems)
162
avio_printf(probe_out, "\n");
165
static void ini_print_object_header(const char *name)
168
ProbeElement *el = octx.prefix + octx.level -1;
171
avio_printf(probe_out, "\n");
173
avio_printf(probe_out, "[");
175
for (i = 1; i < octx.level; i++) {
176
el = octx.prefix + i;
177
avio_printf(probe_out, "%s.", el->name);
179
avio_printf(probe_out, "%"PRId64".", el->index);
182
avio_printf(probe_out, "%s", name);
183
if (el && el->type == ARRAY)
184
avio_printf(probe_out, ".%"PRId64"", el->nb_elems);
185
avio_printf(probe_out, "]\n");
188
static void ini_print_integer(const char *key, int64_t value)
190
ini_escape_print(key);
191
avio_printf(probe_out, "=%"PRId64"\n", value);
195
static void ini_print_string(const char *key, const char *value)
197
ini_escape_print(key);
198
avio_printf(probe_out, "=");
199
ini_escape_print(value);
200
avio_w8(probe_out, '\n');
204
* Alternate format, JSON
207
static void json_print_header(void)
209
avio_printf(probe_out, "{");
211
static void json_print_footer(void)
213
avio_printf(probe_out, "}\n");
216
static void json_print_array_header(const char *name)
218
if (octx.prefix[octx.level -1].nb_elems)
219
avio_printf(probe_out, ",\n");
221
avio_printf(probe_out, "\"%s\" : ", name);
222
avio_printf(probe_out, "[\n");
225
static void json_print_array_footer(const char *name)
227
avio_printf(probe_out, "\n");
229
avio_printf(probe_out, "]");
232
static void json_print_object_header(const char *name)
234
if (octx.prefix[octx.level -1].nb_elems)
235
avio_printf(probe_out, ",\n");
237
if (octx.prefix[octx.level -1].type == OBJECT)
238
avio_printf(probe_out, "\"%s\" : ", name);
239
avio_printf(probe_out, "{\n");
242
static void json_print_object_footer(const char *name)
244
avio_printf(probe_out, "\n");
246
avio_printf(probe_out, "}");
249
static void json_print_integer(const char *key, int64_t value)
251
if (octx.prefix[octx.level -1].nb_elems)
252
avio_printf(probe_out, ",\n");
254
avio_printf(probe_out, "\"%s\" : %"PRId64"", key, value);
257
static void json_escape_print(const char *s)
264
case '\r': avio_printf(probe_out, "%s", "\\r"); break;
265
case '\n': avio_printf(probe_out, "%s", "\\n"); break;
266
case '\f': avio_printf(probe_out, "%s", "\\f"); break;
267
case '\b': avio_printf(probe_out, "%s", "\\b"); break;
268
case '\t': avio_printf(probe_out, "%s", "\\t"); break;
270
case '"' : avio_w8(probe_out, '\\');
272
if ((unsigned char)c < 32)
273
avio_printf(probe_out, "\\u00%02x", c & 0xff);
275
avio_w8(probe_out, c);
281
static void json_print_string(const char *key, const char *value)
283
if (octx.prefix[octx.level -1].nb_elems)
284
avio_printf(probe_out, ",\n");
286
avio_w8(probe_out, '\"');
287
json_escape_print(key);
288
avio_printf(probe_out, "\" : \"");
289
json_escape_print(value);
290
avio_w8(probe_out, '\"');
294
* old-style pseudo-INI
296
static void old_print_object_header(const char *name)
300
if (!strcmp(name, "tags"))
303
str = p = av_strdup(name);
309
avio_printf(probe_out, "[%s]\n", str);
313
static void old_print_object_footer(const char *name)
317
if (!strcmp(name, "tags"))
320
str = p = av_strdup(name);
326
avio_printf(probe_out, "[/%s]\n", str);
330
static void old_print_string(const char *key, const char *value)
332
if (!strcmp(octx.prefix[octx.level - 1].name, "tags"))
333
avio_printf(probe_out, "TAG:");
334
ini_print_string(key, value);
338
* Simple Formatter for single entries.
341
static void show_format_entry_integer(const char *key, int64_t value)
343
if (key && av_dict_get(fmt_entries_to_show, key, NULL, 0)) {
344
if (nb_fmt_entries_to_show > 1)
345
avio_printf(probe_out, "%s=", key);
346
avio_printf(probe_out, "%"PRId64"\n", value);
350
static void show_format_entry_string(const char *key, const char *value)
352
if (key && av_dict_get(fmt_entries_to_show, key, NULL, 0)) {
353
if (nb_fmt_entries_to_show > 1)
354
avio_printf(probe_out, "%s=", key);
355
avio_printf(probe_out, "%s\n", value);
359
static void probe_group_enter(const char *name, int type)
364
av_realloc(octx.prefix, sizeof(ProbeElement) * (octx.level + 1));
366
if (!octx.prefix || !name) {
367
fprintf(stderr, "Out of memory\n");
372
ProbeElement *parent = octx.prefix + octx.level -1;
373
if (parent->type == ARRAY)
374
count = parent->nb_elems;
378
octx.prefix[octx.level++] = (ProbeElement){name, type, count, 0};
381
static void probe_group_leave(void)
386
static void probe_header(void)
388
if (octx.print_header)
390
probe_group_enter("root", OBJECT);
393
static void probe_footer(void)
395
if (octx.print_footer)
401
static void probe_array_header(const char *name)
403
if (octx.print_array_header)
404
octx.print_array_header(name);
406
probe_group_enter(name, ARRAY);
409
static void probe_array_footer(const char *name)
412
if (octx.print_array_footer)
413
octx.print_array_footer(name);
416
static void probe_object_header(const char *name)
418
if (octx.print_object_header)
419
octx.print_object_header(name);
421
probe_group_enter(name, OBJECT);
424
static void probe_object_footer(const char *name)
427
if (octx.print_object_footer)
428
octx.print_object_footer(name);
431
static void probe_int(const char *key, int64_t value)
433
octx.print_integer(key, value);
434
octx.prefix[octx.level -1].nb_elems++;
437
static void probe_str(const char *key, const char *value)
439
octx.print_string(key, value);
440
octx.prefix[octx.level -1].nb_elems++;
443
static void probe_dict(AVDictionary *dict, const char *name)
445
AVDictionaryEntry *entry = NULL;
448
probe_object_header(name);
449
while ((entry = av_dict_get(dict, "", entry, AV_DICT_IGNORE_SUFFIX))) {
450
probe_str(entry->key, entry->value);
452
probe_object_footer(name);
64
455
static char *value_string(char *buf, int buf_size, double val, const char *unit)
137
544
char val_str[128];
138
545
AVStream *st = fmt_ctx->streams[pkt->stream_index];
140
printf("[PACKET]\n");
141
printf("codec_type=%s\n", media_type_string(st->codec->codec_type));
142
printf("stream_index=%d\n", pkt->stream_index);
143
printf("pts=%s\n", ts_value_string(val_str, sizeof(val_str), pkt->pts));
144
printf("pts_time=%s\n", time_value_string(val_str, sizeof(val_str),
145
pkt->pts, &st->time_base));
146
printf("dts=%s\n", ts_value_string(val_str, sizeof(val_str), pkt->dts));
147
printf("dts_time=%s\n", time_value_string(val_str, sizeof(val_str),
148
pkt->dts, &st->time_base));
149
printf("duration=%s\n", ts_value_string(val_str, sizeof(val_str),
151
printf("duration_time=%s\n", time_value_string(val_str, sizeof(val_str),
154
printf("size=%s\n", value_string(val_str, sizeof(val_str),
155
pkt->size, unit_byte_str));
156
printf("pos=%"PRId64"\n", pkt->pos);
157
printf("flags=%c\n", pkt->flags & AV_PKT_FLAG_KEY ? 'K' : '_');
158
printf("[/PACKET]\n");
547
probe_object_header("packet");
548
probe_str("codec_type", media_type_string(st->codec->codec_type));
549
probe_int("stream_index", pkt->stream_index);
550
probe_str("pts", ts_value_string(val_str, sizeof(val_str), pkt->pts));
551
probe_str("pts_time", time_value_string(val_str, sizeof(val_str),
552
pkt->pts, &st->time_base));
553
probe_str("dts", ts_value_string(val_str, sizeof(val_str), pkt->dts));
554
probe_str("dts_time", time_value_string(val_str, sizeof(val_str),
555
pkt->dts, &st->time_base));
556
probe_str("duration", ts_value_string(val_str, sizeof(val_str),
558
probe_str("duration_time", time_value_string(val_str, sizeof(val_str),
561
probe_str("size", value_string(val_str, sizeof(val_str),
562
pkt->size, unit_byte_str));
563
probe_int("pos", pkt->pos);
564
probe_str("flags", pkt->flags & AV_PKT_FLAG_KEY ? "K" : "_");
565
probe_object_footer("packet");
161
568
static void show_packets(AVFormatContext *fmt_ctx)
165
572
av_init_packet(&pkt);
573
probe_array_header("packets");
167
574
while (!av_read_frame(fmt_ctx, &pkt))
168
575
show_packet(fmt_ctx, &pkt);
576
probe_array_footer("packets");
171
579
static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
173
581
AVStream *stream = fmt_ctx->streams[stream_idx];
174
582
AVCodecContext *dec_ctx;
176
585
char val_str[128];
177
AVDictionaryEntry *tag = NULL;
178
AVRational display_aspect_ratio;
180
printf("[STREAM]\n");
182
printf("index=%d\n", stream->index);
586
AVRational display_aspect_ratio, *sar = NULL;
587
const AVPixFmtDescriptor *desc;
589
probe_object_header("stream");
591
probe_int("index", stream->index);
184
593
if ((dec_ctx = stream->codec)) {
185
594
if ((dec = dec_ctx->codec)) {
186
printf("codec_name=%s\n", dec->name);
187
printf("codec_long_name=%s\n", dec->long_name);
595
probe_str("codec_name", dec->name);
596
probe_str("codec_long_name", dec->long_name);
189
printf("codec_name=unknown\n");
598
probe_str("codec_name", "unknown");
192
printf("codec_type=%s\n", media_type_string(dec_ctx->codec_type));
193
printf("codec_time_base=%d/%d\n",
194
dec_ctx->time_base.num, dec_ctx->time_base.den);
601
probe_str("codec_type", media_type_string(dec_ctx->codec_type));
602
probe_str("codec_time_base",
603
rational_string(val_str, sizeof(val_str),
604
"/", &dec_ctx->time_base));
196
606
/* print AVI/FourCC tag */
197
607
av_get_codec_tag_string(val_str, sizeof(val_str), dec_ctx->codec_tag);
198
printf("codec_tag_string=%s\n", val_str);
199
printf("codec_tag=0x%04x\n", dec_ctx->codec_tag);
608
probe_str("codec_tag_string", val_str);
609
probe_str("codec_tag", tag_string(val_str, sizeof(val_str),
610
dec_ctx->codec_tag));
612
/* print profile, if there is one */
613
if (dec && (profile = av_get_profile_name(dec, dec_ctx->profile)))
614
probe_str("profile", profile);
201
616
switch (dec_ctx->codec_type) {
202
617
case AVMEDIA_TYPE_VIDEO:
203
printf("width=%d\n", dec_ctx->width);
204
printf("height=%d\n", dec_ctx->height);
205
printf("has_b_frames=%d\n", dec_ctx->has_b_frames);
206
if (dec_ctx->sample_aspect_ratio.num) {
207
printf("sample_aspect_ratio=%d:%d\n",
208
dec_ctx->sample_aspect_ratio.num,
209
dec_ctx->sample_aspect_ratio.den);
618
probe_int("width", dec_ctx->width);
619
probe_int("height", dec_ctx->height);
620
probe_int("has_b_frames", dec_ctx->has_b_frames);
621
if (dec_ctx->sample_aspect_ratio.num)
622
sar = &dec_ctx->sample_aspect_ratio;
623
else if (stream->sample_aspect_ratio.num)
624
sar = &stream->sample_aspect_ratio;
627
probe_str("sample_aspect_ratio",
628
rational_string(val_str, sizeof(val_str), ":", sar));
210
629
av_reduce(&display_aspect_ratio.num, &display_aspect_ratio.den,
211
dec_ctx->width * dec_ctx->sample_aspect_ratio.num,
212
dec_ctx->height * dec_ctx->sample_aspect_ratio.den,
630
dec_ctx->width * sar->num, dec_ctx->height * sar->den,
214
printf("display_aspect_ratio=%d:%d\n",
215
display_aspect_ratio.num, display_aspect_ratio.den);
632
probe_str("display_aspect_ratio",
633
rational_string(val_str, sizeof(val_str), ":",
634
&display_aspect_ratio));
217
printf("pix_fmt=%s\n",
218
dec_ctx->pix_fmt != PIX_FMT_NONE ? av_pix_fmt_descriptors[dec_ctx->pix_fmt].name
220
printf("level=%d\n", dec_ctx->level);
636
desc = av_pix_fmt_desc_get(dec_ctx->pix_fmt);
637
probe_str("pix_fmt", desc ? desc->name : "unknown");
638
probe_int("level", dec_ctx->level);
223
641
case AVMEDIA_TYPE_AUDIO:
224
printf("sample_rate=%s\n", value_string(val_str, sizeof(val_str),
225
dec_ctx->sample_rate,
227
printf("channels=%d\n", dec_ctx->channels);
228
printf("bits_per_sample=%d\n",
229
av_get_bits_per_sample(dec_ctx->codec_id));
642
probe_str("sample_rate",
643
value_string(val_str, sizeof(val_str),
644
dec_ctx->sample_rate,
646
probe_int("channels", dec_ctx->channels);
647
probe_int("bits_per_sample",
648
av_get_bits_per_sample(dec_ctx->codec_id));
233
printf("codec_type=unknown\n");
652
probe_str("codec_type", "unknown");
236
655
if (fmt_ctx->iformat->flags & AVFMT_SHOW_IDS)
237
printf("id=0x%x\n", stream->id);
238
printf("r_frame_rate=%d/%d\n",
239
stream->r_frame_rate.num, stream->r_frame_rate.den);
240
printf("avg_frame_rate=%d/%d\n",
241
stream->avg_frame_rate.num, stream->avg_frame_rate.den);
242
printf("time_base=%d/%d\n",
243
stream->time_base.num, stream->time_base.den);
244
printf("start_time=%s\n",
245
time_value_string(val_str, sizeof(val_str),
246
stream->start_time, &stream->time_base));
247
printf("duration=%s\n",
248
time_value_string(val_str, sizeof(val_str),
249
stream->duration, &stream->time_base));
656
probe_int("id", stream->id);
657
probe_str("avg_frame_rate",
658
rational_string(val_str, sizeof(val_str), "/",
659
&stream->avg_frame_rate));
660
if (dec_ctx->bit_rate)
661
probe_str("bit_rate",
662
value_string(val_str, sizeof(val_str),
663
dec_ctx->bit_rate, unit_bit_per_second_str));
664
probe_str("time_base",
665
rational_string(val_str, sizeof(val_str), "/",
666
&stream->time_base));
667
probe_str("start_time",
668
time_value_string(val_str, sizeof(val_str),
669
stream->start_time, &stream->time_base));
670
probe_str("duration",
671
time_value_string(val_str, sizeof(val_str),
672
stream->duration, &stream->time_base));
250
673
if (stream->nb_frames)
251
printf("nb_frames=%"PRId64"\n", stream->nb_frames);
253
while ((tag = av_dict_get(stream->metadata, "", tag,
254
AV_DICT_IGNORE_SUFFIX)))
255
printf("TAG:%s=%s\n", tag->key, tag->value);
257
printf("[/STREAM]\n");
674
probe_int("nb_frames", stream->nb_frames);
676
probe_dict(stream->metadata, "tags");
678
probe_object_footer("stream");
260
681
static void show_format(AVFormatContext *fmt_ctx)
262
AVDictionaryEntry *tag = NULL;
263
683
char val_str[128];
264
684
int64_t size = fmt_ctx->pb ? avio_size(fmt_ctx->pb) : -1;
266
printf("[FORMAT]\n");
268
printf("filename=%s\n", fmt_ctx->filename);
269
printf("nb_streams=%d\n", fmt_ctx->nb_streams);
270
printf("format_name=%s\n", fmt_ctx->iformat->name);
271
printf("format_long_name=%s\n", fmt_ctx->iformat->long_name);
272
printf("start_time=%s\n",
273
time_value_string(val_str, sizeof(val_str),
274
fmt_ctx->start_time, &AV_TIME_BASE_Q));
275
printf("duration=%s\n",
276
time_value_string(val_str, sizeof(val_str),
277
fmt_ctx->duration, &AV_TIME_BASE_Q));
278
printf("size=%s\n", size >= 0 ? value_string(val_str, sizeof(val_str),
686
probe_object_header("format");
687
probe_str("filename", fmt_ctx->filename);
688
probe_int("nb_streams", fmt_ctx->nb_streams);
689
probe_str("format_name", fmt_ctx->iformat->name);
690
probe_str("format_long_name", fmt_ctx->iformat->long_name);
691
probe_str("start_time",
692
time_value_string(val_str, sizeof(val_str),
693
fmt_ctx->start_time, &AV_TIME_BASE_Q));
694
probe_str("duration",
695
time_value_string(val_str, sizeof(val_str),
696
fmt_ctx->duration, &AV_TIME_BASE_Q));
698
size >= 0 ? value_string(val_str, sizeof(val_str),
281
printf("bit_rate=%s\n",
282
value_string(val_str, sizeof(val_str),
283
fmt_ctx->bit_rate, unit_bit_per_second_str));
285
while ((tag = av_dict_get(fmt_ctx->metadata, "", tag,
286
AV_DICT_IGNORE_SUFFIX)))
287
printf("TAG:%s=%s\n", tag->key, tag->value);
289
printf("[/FORMAT]\n");
701
probe_str("bit_rate",
702
value_string(val_str, sizeof(val_str),
703
fmt_ctx->bit_rate, unit_bit_per_second_str));
705
probe_dict(fmt_ctx->metadata, "tags");
707
probe_object_footer("format");
292
710
static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
385
874
input_filename = arg;
388
static void show_help(void)
877
void show_help_default(const char *opt, const char *arg)
390
879
av_log_set_callback(log_callback_help);
392
show_help_options(options, "Main options:\n", 0, 0);
881
show_help_options(options, "Main options:", 0, 0, 0);
394
883
show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
397
static void opt_pretty(void)
886
static int opt_pretty(void *optctx, const char *opt, const char *arg)
399
888
show_value_unit = 1;
400
889
use_value_prefix = 1;
401
890
use_byte_value_binary_prefix = 1;
402
891
use_value_sexagesimal_format = 1;
405
static const OptionDef options[] = {
895
static const OptionDef real_options[] = {
406
896
#include "cmdutils_common_opts.h"
407
{ "f", HAS_ARG, {(void*)opt_format}, "force format", "format" },
408
{ "unit", OPT_BOOL, {(void*)&show_value_unit},
897
{ "f", HAS_ARG, {.func_arg = opt_format}, "force format", "format" },
898
{ "of", HAS_ARG, {.func_arg = opt_output_format}, "output the document either as ini or json", "output_format" },
899
{ "unit", OPT_BOOL, {&show_value_unit},
409
900
"show unit of the displayed values" },
410
{ "prefix", OPT_BOOL, {(void*)&use_value_prefix},
901
{ "prefix", OPT_BOOL, {&use_value_prefix},
411
902
"use SI prefixes for the displayed values" },
412
{ "byte_binary_prefix", OPT_BOOL, {(void*)&use_byte_value_binary_prefix},
903
{ "byte_binary_prefix", OPT_BOOL, {&use_byte_value_binary_prefix},
413
904
"use binary prefixes for byte units" },
414
{ "sexagesimal", OPT_BOOL, {(void*)&use_value_sexagesimal_format},
905
{ "sexagesimal", OPT_BOOL, {&use_value_sexagesimal_format},
415
906
"use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" },
416
{ "pretty", 0, {(void*)&opt_pretty},
907
{ "pretty", 0, {.func_arg = opt_pretty},
417
908
"prettify the format of displayed values, make it more human readable" },
418
{ "show_format", OPT_BOOL, {(void*)&do_show_format} , "show format/container info" },
419
{ "show_packets", OPT_BOOL, {(void*)&do_show_packets}, "show packets info" },
420
{ "show_streams", OPT_BOOL, {(void*)&do_show_streams}, "show streams info" },
421
{ "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default},
909
{ "show_format", OPT_BOOL, {&do_show_format} , "show format/container info" },
910
{ "show_format_entry", HAS_ARG, {.func_arg = opt_show_format_entry},
911
"show a particular entry from the format/container info", "entry" },
912
{ "show_packets", OPT_BOOL, {&do_show_packets}, "show packets info" },
913
{ "show_streams", OPT_BOOL, {&do_show_streams}, "show streams info" },
914
{ "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {.func_arg = opt_default},
422
915
"generic catch all option", "" },
919
static int probe_buf_write(void *opaque, uint8_t *buf, int buf_size)
921
printf("%.*s", buf_size, buf);
925
#define AVP_BUFFSIZE 4096
426
927
int main(int argc, char **argv)
930
uint8_t *buffer = av_malloc(AVP_BUFFSIZE);
935
atexit(exit_program);
937
options = real_options;
430
938
parse_loglevel(argc, argv, options);
431
939
av_register_all();
432
940
avformat_network_init();