mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
ffprobe: show audio frame channels and channel_layout
This commit is contained in:
parent
23fc4dd6e7
commit
c809b89a12
@ -62,6 +62,8 @@
|
||||
<!-- audio attributes -->
|
||||
<xsd:attribute name="sample_fmt" type="xsd:string"/>
|
||||
<xsd:attribute name="nb_samples" type="xsd:long" />
|
||||
<xsd:attribute name="channels" type="xsd:int" />
|
||||
<xsd:attribute name="channel_layout" type="xsd:string"/>
|
||||
|
||||
<!-- video attributes -->
|
||||
<xsd:attribute name="width" type="xsd:long" />
|
||||
|
@ -1647,6 +1647,14 @@ static void show_frame(WriterContext *w, AVFrame *frame, AVStream *stream,
|
||||
if (s) print_str ("sample_fmt", s);
|
||||
else print_str_opt("sample_fmt", "unknown");
|
||||
print_int("nb_samples", frame->nb_samples);
|
||||
print_int("channels", av_frame_get_channels(frame));
|
||||
if (av_frame_get_channel_layout(frame)) {
|
||||
av_bprint_clear(&pbuf);
|
||||
av_bprint_channel_layout(&pbuf, av_frame_get_channels(frame),
|
||||
av_frame_get_channel_layout(frame));
|
||||
print_str ("channel_layout", pbuf.str);
|
||||
} else
|
||||
print_str_opt("channel_layout", "unknown");
|
||||
break;
|
||||
}
|
||||
show_tags(av_frame_get_metadata(frame));
|
||||
|
Loading…
Reference in New Issue
Block a user