History

ffprobe: report bit rate in stream description

Matthieu Bouron committed 14 years ago

Commit 278d6ab1 parent 3293b1a2 files · +3 −0Browse files

Unified · Split

2 files
  1. doc/ffprobe.xsd +1 −0
  2. ffprobe.c +2 −0
doc/ffprobe.xsd+1−0
@@ -110,6 +110,7 @@ · 109 unmodified lines
110110 <xsd:attribute name="time_base" type="xsd:string" use="required"/>
111111 <xsd:attribute name="start_time" type="xsd:float"/>
112112 <xsd:attribute name="duration" type="xsd:float"/>
113+ <xsd:attribute name="bit_rate" type="xsd:int"/>
113114 <xsd:attribute name="nb_frames" type="xsd:int"/>
114115 <xsd:attribute name="nb_read_frames" type="xsd:int"/>
115116 <xsd:attribute name="nb_read_packets" type="xsd:int"/>
ffprobe.c+2−0
@@ -1509,6 +1509,8 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i · 1508 unmodified lines
15091509 print_fmt("time_base", "%d/%d", stream->time_base.num, stream->time_base.den);
15101510 print_time("start_time", stream->start_time, &stream->time_base);
15111511 print_time("duration", stream->duration, &stream->time_base);
1512+ if (dec_ctx->bit_rate > 0) print_val ("bit_rate", dec_ctx->bit_rate, unit_bit_per_second_str);
1513+ else print_str_opt("bit_rate", "N/A");
15121514 if (stream->nb_frames) print_fmt ("nb_frames", "%"PRId64, stream->nb_frames);
15131515 else print_str_opt("nb_frames", "N/A");
15141516 if (nb_streams_frames[stream_idx]) print_fmt ("nb_read_frames", "%"PRIu64, nb_streams_frames[stream_idx]);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t