Commit 301f6da0 authored by Stefano Sabatini's avatar Stefano Sabatini

ffprobe: extend disposition printing support

This generalizes the previous work on disposition printing.

Disposition flags are shown in a dedicated section, which should improve
output intellegibility, extensibility and filtering operations.

This breaks output syntax with the recently introduced disposition
printing.
parent 50efde6b
......@@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest.
version next:
- stream disposition information printing in ffprobe
version 1.0:
......
......@@ -86,9 +86,24 @@
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="streamDispositionType">
<xsd:attribute name="default" type="xsd:int" use="required" />
<xsd:attribute name="dub" type="xsd:int" use="required" />
<xsd:attribute name="original" type="xsd:int" use="required" />
<xsd:attribute name="comment" type="xsd:int" use="required" />
<xsd:attribute name="lyrics" type="xsd:int" use="required" />
<xsd:attribute name="karaoke" type="xsd:int" use="required" />
<xsd:attribute name="forced" type="xsd:int" use="required" />
<xsd:attribute name="hearing_impaired" type="xsd:int" use="required" />
<xsd:attribute name="visual_impaired" type="xsd:int" use="required" />
<xsd:attribute name="clean_effects" type="xsd:int" use="required" />
<xsd:attribute name="attached_pic" type="xsd:int" use="required" />
</xsd:complexType>
<xsd:complexType name="streamType">
<xsd:sequence>
<xsd:element name="tag" type="ffprobe:tagType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="disposition" type="ffprobe:streamDispositionType" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="index" type="xsd:int" use="required"/>
......@@ -100,8 +115,6 @@
<xsd:attribute name="codec_tag" type="xsd:string" use="required"/>
<xsd:attribute name="codec_tag_string" type="xsd:string" use="required"/>
<xsd:attribute name="extradata" type="xsd:string" />
<xsd:attribute name="default" type="xsd:int" use="required"/>
<xsd:attribute name="forced" type="xsd:int" use="required"/>
<!-- video attributes -->
<xsd:attribute name="width" type="xsd:int"/>
......@@ -112,7 +125,6 @@
<xsd:attribute name="pix_fmt" type="xsd:string"/>
<xsd:attribute name="level" type="xsd:int"/>
<xsd:attribute name="timecode" type="xsd:string"/>
<xsd:attribute name="attached_pic" type="xsd:int"/>
<!-- audio attributes -->
<xsd:attribute name="sample_fmt" type="xsd:string"/>
......
......@@ -100,6 +100,7 @@ typedef enum {
SECTION_ID_PROGRAM_VERSION,
SECTION_ID_ROOT,
SECTION_ID_STREAM,
SECTION_ID_STREAM_DISPOSITION,
SECTION_ID_STREAMS,
SECTION_ID_STREAM_TAGS
} SectionID;
......@@ -119,6 +120,7 @@ static const struct section sections[] = {
[SECTION_ID_PROGRAM_VERSION] = { SECTION_ID_PROGRAM_VERSION, "program_version" },
[SECTION_ID_ROOT] = { SECTION_ID_ROOT, "root", SECTION_FLAG_IS_WRAPPER },
[SECTION_ID_STREAM] = { SECTION_ID_STREAM, "stream" },
[SECTION_ID_STREAM_DISPOSITION] = { SECTION_ID_STREAM_DISPOSITION, "disposition" },
[SECTION_ID_STREAMS] = { SECTION_ID_STREAMS, "streams", SECTION_FLAG_IS_ARRAY },
[SECTION_ID_STREAM_TAGS] = { SECTION_ID_STREAM_TAGS, "tags", SECTION_FLAG_HAS_VARIABLE_FIELDS, .element_name = "tag" },
};
......@@ -1682,10 +1684,6 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
print_str("codec_tag_string", val_str);
print_fmt("codec_tag", "0x%04x", dec_ctx->codec_tag);
/* Print useful disposition */
print_int("default", !!(stream->disposition & AV_DISPOSITION_DEFAULT));
print_int("forced", !!(stream->disposition & AV_DISPOSITION_FORCED));
switch (dec_ctx->codec_type) {
case AVMEDIA_TYPE_VIDEO:
print_int("width", dec_ctx->width);
......@@ -1714,8 +1712,6 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
} else {
print_str_opt("timecode", "N/A");
}
print_int("attached_pic",
!!(stream->disposition & AV_DISPOSITION_ATTACHED_PIC));
break;
case AVMEDIA_TYPE_AUDIO:
......@@ -1762,6 +1758,26 @@ static void show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_i
if (do_show_data)
writer_print_data(w, "extradata", dec_ctx->extradata,
dec_ctx->extradata_size);
/* Print disposition information */
#define PRINT_DISPOSITION(flagname, name) do { \
print_int(name, !!(stream->disposition & AV_DISPOSITION_##flagname)); \
} while (0)
writer_print_section_header(w, SECTION_ID_STREAM_DISPOSITION);
PRINT_DISPOSITION(DEFAULT, "default");
PRINT_DISPOSITION(DUB, "dub");
PRINT_DISPOSITION(ORIGINAL, "original");
PRINT_DISPOSITION(COMMENT, "comment");
PRINT_DISPOSITION(LYRICS, "lyrics");
PRINT_DISPOSITION(KARAOKE, "karaoke");
PRINT_DISPOSITION(FORCED, "forced");
PRINT_DISPOSITION(HEARING_IMPAIRED, "hearing_impaired");
PRINT_DISPOSITION(VISUAL_IMPAIRED, "visual_impaired");
PRINT_DISPOSITION(CLEAN_EFFECTS, "clean_effects");
PRINT_DISPOSITION(ATTACHED_PIC, "attached_pic");
writer_print_section_footer(w);
show_tags(w, stream->metadata, SECTION_ID_STREAM_TAGS);
writer_print_section_footer(w);
......
......@@ -26,7 +26,7 @@ packet|codec_type=video|stream_index=1|pts=3|pts_time=0.120000|dts=3|dts_time=0.
frame|media_type=video|key_frame=1|pkt_pts=3|pkt_pts_time=0.120000|pkt_dts=3|pkt_dts_time=0.120000|pkt_duration=1|pkt_duration_time=0.040000|pkt_pos=794128|width=320|height=240|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
packet|codec_type=video|stream_index=2|pts=3|pts_time=0.120000|dts=3|dts_time=0.120000|duration=1|duration_time=0.040000|convergence_duration=N/A|convergence_duration_time=N/A|size=30000|pos=1024550|flags=K
frame|media_type=video|key_frame=1|pkt_pts=3|pkt_pts_time=0.120000|pkt_dts=3|pkt_dts_time=0.120000|pkt_duration=1|pkt_duration_time=0.040000|pkt_pos=1024550|width=100|height=100|pix_fmt=rgb24|sample_aspect_ratio=1:1|pict_type=I|coded_picture_number=0|display_picture_number=0|interlaced_frame=0|top_field_first=0|repeat_pict=0|reference=0
stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_time_base=1/44100|codec_tag_string=[1][0][0][0]|codec_tag=0x0001|default=0|forced=0|sample_fmt=s16|sample_rate=44100|channels=1|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=527313|duration=11.957211|bit_rate=705600|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6
stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/25|codec_tag_string=RGB[24]|codec_tag=0x18424752|default=0|forced=0|width=320|height=240|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|timecode=N/A|attached_pic=0|id=N/A|r_frame_rate=25/1|avg_frame_rate=0/0|time_base=1/25|start_pts=0|start_time=0.000000|duration_ts=299|duration=11.960000|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4
stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/25|codec_tag_string=RGB[24]|codec_tag=0x18424752|default=0|forced=0|width=100|height=100|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|timecode=N/A|attached_pic=0|id=N/A|r_frame_rate=25/1|avg_frame_rate=0/0|time_base=1/25|start_pts=0|start_time=0.000000|duration_ts=299|duration=11.960000|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4
stream|index=0|codec_name=pcm_s16le|profile=unknown|codec_type=audio|codec_time_base=1/44100|codec_tag_string=[1][0][0][0]|codec_tag=0x0001|sample_fmt=s16|sample_rate=44100|channels=1|bits_per_sample=16|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/44100|start_pts=0|start_time=0.000000|duration_ts=527313|duration=11.957211|bit_rate=705600|nb_frames=N/A|nb_read_frames=6|nb_read_packets=6|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0
stream|index=1|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/25|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=320|height=240|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=4:3|pix_fmt=rgb24|level=-99|timecode=N/A|id=N/A|r_frame_rate=25/1|avg_frame_rate=0/0|time_base=1/25|start_pts=0|start_time=0.000000|duration_ts=299|duration=11.960000|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0
stream|index=2|codec_name=rawvideo|profile=unknown|codec_type=video|codec_time_base=1/25|codec_tag_string=RGB[24]|codec_tag=0x18424752|width=100|height=100|has_b_frames=0|sample_aspect_ratio=1:1|display_aspect_ratio=1:1|pix_fmt=rgb24|level=-99|timecode=N/A|id=N/A|r_frame_rate=25/1|avg_frame_rate=0/0|time_base=1/25|start_pts=0|start_time=0.000000|duration_ts=299|duration=11.960000|bit_rate=N/A|nb_frames=N/A|nb_read_frames=4|nb_read_packets=4|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0
format|filename=tests/data/ffprobe-test.nut|nb_streams=3|format_name=nut|start_time=0.000000|duration=11.960000|size=1054625|bit_rate=705434|tag:title=ffprobe test file|tag:comment='A comment with CSV, XML & JSON special chars': <tag value="x">|tag:comment2=I ♥ Üñîçød€
......@@ -26,7 +26,7 @@ packet,video,1,3,0.120000,3,0.120000,1,0.040000,N/A,N/A,230400,794128,K
frame,video,1,3,0.120000,3,0.120000,1,0.040000,794128,320,240,rgb24,1:1,I,0,0,0,0,0,0
packet,video,2,3,0.120000,3,0.120000,1,0.040000,N/A,N/A,30000,1024550,K
frame,video,1,3,0.120000,3,0.120000,1,0.040000,1024550,100,100,rgb24,1:1,I,0,0,0,0,0,0
stream,0,pcm_s16le,unknown,audio,1/44100,[1][0][0][0],0x0001,0,0,s16,44100,1,16,N/A,0/0,0/0,1/44100,0,0.000000,527313,11.957211,705600,N/A,6,6
stream,1,rawvideo,unknown,video,1/25,RGB[24],0x18424752,0,0,320,240,0,1:1,4:3,rgb24,-99,N/A,0,N/A,25/1,0/0,1/25,0,0.000000,299,11.960000,N/A,N/A,4,4
stream,2,rawvideo,unknown,video,1/25,RGB[24],0x18424752,0,0,100,100,0,1:1,1:1,rgb24,-99,N/A,0,N/A,25/1,0/0,1/25,0,0.000000,299,11.960000,N/A,N/A,4,4
stream,0,pcm_s16le,unknown,audio,1/44100,[1][0][0][0],0x0001,s16,44100,1,16,N/A,0/0,0/0,1/44100,0,0.000000,527313,11.957211,705600,N/A,6,6,0,0,0,0,0,0,0,0,0,0,0
stream,1,rawvideo,unknown,video,1/25,RGB[24],0x18424752,320,240,0,1:1,4:3,rgb24,-99,N/A,N/A,25/1,0/0,1/25,0,0.000000,299,11.960000,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0
stream,2,rawvideo,unknown,video,1/25,RGB[24],0x18424752,100,100,0,1:1,1:1,rgb24,-99,N/A,N/A,25/1,0/0,1/25,0,0.000000,299,11.960000,N/A,N/A,4,4,0,0,0,0,0,0,0,0,0,0,0
format,tests/data/ffprobe-test.nut,3,nut,0.000000,11.960000,1054625,705434,ffprobe test file,"'A comment with CSV, XML & JSON special chars': <tag value=""x"">",I ♥ Üñîçød€
......@@ -482,8 +482,6 @@ codec_type=audio
codec_time_base=1/44100
codec_tag_string=[1][0][0][0]
codec_tag=0x0001
default=0
forced=0
sample_fmt=s16
sample_rate=44100
channels=1
......@@ -500,6 +498,17 @@ bit_rate=705600
nb_frames=N/A
nb_read_frames=6
nb_read_packets=6
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[STREAM]
index=1
......@@ -509,8 +518,6 @@ codec_type=video
codec_time_base=1/25
codec_tag_string=RGB[24]
codec_tag=0x18424752
default=0
forced=0
width=320
height=240
has_b_frames=0
......@@ -519,7 +526,6 @@ display_aspect_ratio=4:3
pix_fmt=rgb24
level=-99
timecode=N/A
attached_pic=0
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
......@@ -532,6 +538,17 @@ bit_rate=N/A
nb_frames=N/A
nb_read_frames=4
nb_read_packets=4
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[STREAM]
index=2
......@@ -541,8 +558,6 @@ codec_type=video
codec_time_base=1/25
codec_tag_string=RGB[24]
codec_tag=0x18424752
default=0
forced=0
width=100
height=100
has_b_frames=0
......@@ -551,7 +566,6 @@ display_aspect_ratio=1:1
pix_fmt=rgb24
level=-99
timecode=N/A
attached_pic=0
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
......@@ -564,6 +578,17 @@ bit_rate=N/A
nb_frames=N/A
nb_read_frames=4
nb_read_packets=4
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[FORMAT]
filename=tests/data/ffprobe-test.nut
......
......@@ -425,8 +425,6 @@ streams.stream.0.codec_type="audio"
streams.stream.0.codec_time_base="1/44100"
streams.stream.0.codec_tag_string="[1][0][0][0]"
streams.stream.0.codec_tag="0x0001"
streams.stream.0.default=0
streams.stream.0.forced=0
streams.stream.0.sample_fmt="s16"
streams.stream.0.sample_rate="44100"
streams.stream.0.channels=1
......@@ -443,6 +441,17 @@ streams.stream.0.bit_rate="705600"
streams.stream.0.nb_frames="N/A"
streams.stream.0.nb_read_frames="6"
streams.stream.0.nb_read_packets="6"
streams.stream.0.disposition.default=0
streams.stream.0.disposition.dub=0
streams.stream.0.disposition.original=0
streams.stream.0.disposition.comment=0
streams.stream.0.disposition.lyrics=0
streams.stream.0.disposition.karaoke=0
streams.stream.0.disposition.forced=0
streams.stream.0.disposition.hearing_impaired=0
streams.stream.0.disposition.visual_impaired=0
streams.stream.0.disposition.clean_effects=0
streams.stream.0.disposition.attached_pic=0
streams.stream.1.index=1
streams.stream.1.codec_name="rawvideo"
streams.stream.1.profile="unknown"
......@@ -450,8 +459,6 @@ streams.stream.1.codec_type="video"
streams.stream.1.codec_time_base="1/25"
streams.stream.1.codec_tag_string="RGB[24]"
streams.stream.1.codec_tag="0x18424752"
streams.stream.1.default=0
streams.stream.1.forced=0
streams.stream.1.width=320
streams.stream.1.height=240
streams.stream.1.has_b_frames=0
......@@ -460,7 +467,6 @@ streams.stream.1.display_aspect_ratio="4:3"
streams.stream.1.pix_fmt="rgb24"
streams.stream.1.level=-99
streams.stream.1.timecode="N/A"
streams.stream.1.attached_pic=0
streams.stream.1.id="N/A"
streams.stream.1.r_frame_rate="25/1"
streams.stream.1.avg_frame_rate="0/0"
......@@ -473,6 +479,17 @@ streams.stream.1.bit_rate="N/A"
streams.stream.1.nb_frames="N/A"
streams.stream.1.nb_read_frames="4"
streams.stream.1.nb_read_packets="4"
streams.stream.1.disposition.default=0
streams.stream.1.disposition.dub=0
streams.stream.1.disposition.original=0
streams.stream.1.disposition.comment=0
streams.stream.1.disposition.lyrics=0
streams.stream.1.disposition.karaoke=0
streams.stream.1.disposition.forced=0
streams.stream.1.disposition.hearing_impaired=0
streams.stream.1.disposition.visual_impaired=0
streams.stream.1.disposition.clean_effects=0
streams.stream.1.disposition.attached_pic=0
streams.stream.2.index=2
streams.stream.2.codec_name="rawvideo"
streams.stream.2.profile="unknown"
......@@ -480,8 +497,6 @@ streams.stream.2.codec_type="video"
streams.stream.2.codec_time_base="1/25"
streams.stream.2.codec_tag_string="RGB[24]"
streams.stream.2.codec_tag="0x18424752"
streams.stream.2.default=0
streams.stream.2.forced=0
streams.stream.2.width=100
streams.stream.2.height=100
streams.stream.2.has_b_frames=0
......@@ -490,7 +505,6 @@ streams.stream.2.display_aspect_ratio="1:1"
streams.stream.2.pix_fmt="rgb24"
streams.stream.2.level=-99
streams.stream.2.timecode="N/A"
streams.stream.2.attached_pic=0
streams.stream.2.id="N/A"
streams.stream.2.r_frame_rate="25/1"
streams.stream.2.avg_frame_rate="0/0"
......@@ -503,6 +517,17 @@ streams.stream.2.bit_rate="N/A"
streams.stream.2.nb_frames="N/A"
streams.stream.2.nb_read_frames="4"
streams.stream.2.nb_read_packets="4"
streams.stream.2.disposition.default=0
streams.stream.2.disposition.dub=0
streams.stream.2.disposition.original=0
streams.stream.2.disposition.comment=0
streams.stream.2.disposition.lyrics=0
streams.stream.2.disposition.karaoke=0
streams.stream.2.disposition.forced=0
streams.stream.2.disposition.hearing_impaired=0
streams.stream.2.disposition.visual_impaired=0
streams.stream.2.disposition.clean_effects=0
streams.stream.2.disposition.attached_pic=0
format.filename="tests/data/ffprobe-test.nut"
format.nb_streams=3
format.format_name="nut"
......
......@@ -484,8 +484,6 @@ codec_type=audio
codec_time_base=1/44100
codec_tag_string=[1][0][0][0]
codec_tag=0x0001
default=0
forced=0
sample_fmt=s16
sample_rate=44100
channels=1
......@@ -503,6 +501,19 @@ nb_frames=N/A
nb_read_frames=6
nb_read_packets=6
[streams.stream.0.disposition]
default=0
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
[streams.stream.1]
index=1
codec_name=rawvideo
......@@ -511,8 +522,6 @@ codec_type=video
codec_time_base=1/25
codec_tag_string=RGB[24]
codec_tag=0x18424752
default=0
forced=0
width=320
height=240
has_b_frames=0
......@@ -521,7 +530,6 @@ display_aspect_ratio=4\:3
pix_fmt=rgb24
level=-99
timecode=N/A
attached_pic=0
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
......@@ -535,6 +543,19 @@ nb_frames=N/A
nb_read_frames=4
nb_read_packets=4
[streams.stream.1.disposition]
default=0
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
[streams.stream.2]
index=2
codec_name=rawvideo
......@@ -543,8 +564,6 @@ codec_type=video
codec_time_base=1/25
codec_tag_string=RGB[24]
codec_tag=0x18424752
default=0
forced=0
width=100
height=100
has_b_frames=0
......@@ -553,7 +572,6 @@ display_aspect_ratio=1\:1
pix_fmt=rgb24
level=-99
timecode=N/A
attached_pic=0
id=N/A
r_frame_rate=25/1
avg_frame_rate=0/0
......@@ -567,6 +585,19 @@ nb_frames=N/A
nb_read_frames=4
nb_read_packets=4
[streams.stream.2.disposition]
default=0
dub=0
original=0
comment=0
lyrics=0
karaoke=0
forced=0
hearing_impaired=0
visual_impaired=0
clean_effects=0
attached_pic=0
[format]
filename=tests/data/ffprobe-test.nut
nb_streams=3
......
......@@ -479,8 +479,6 @@
"codec_time_base": "1/44100",
"codec_tag_string": "[1][0][0][0]",
"codec_tag": "0x0001",
"default": 0,
"forced": 0,
"sample_fmt": "s16",
"sample_rate": "44100",
"channels": 1,
......@@ -494,7 +492,20 @@
"duration": "11.957211",
"bit_rate": "705600",
"nb_read_frames": "6",
"nb_read_packets": "6"
"nb_read_packets": "6",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0
}
},
{
"index": 1,
......@@ -503,8 +514,6 @@
"codec_time_base": "1/25",
"codec_tag_string": "RGB[24]",
"codec_tag": "0x18424752",
"default": 0,
"forced": 0,
"width": 320,
"height": 240,
"has_b_frames": 0,
......@@ -512,7 +521,6 @@
"display_aspect_ratio": "4:3",
"pix_fmt": "rgb24",
"level": -99,
"attached_pic": 0,
"r_frame_rate": "25/1",
"avg_frame_rate": "0/0",
"time_base": "1/25",
......@@ -521,7 +529,20 @@
"duration_ts": 299,
"duration": "11.960000",
"nb_read_frames": "4",
"nb_read_packets": "4"
"nb_read_packets": "4",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0
}
},
{
"index": 2,
......@@ -530,8 +551,6 @@
"codec_time_base": "1/25",
"codec_tag_string": "RGB[24]",
"codec_tag": "0x18424752",
"default": 0,
"forced": 0,
"width": 100,
"height": 100,
"has_b_frames": 0,
......@@ -539,7 +558,6 @@
"display_aspect_ratio": "1:1",
"pix_fmt": "rgb24",
"level": -99,
"attached_pic": 0,
"r_frame_rate": "25/1",
"avg_frame_rate": "0/0",
"time_base": "1/25",
......@@ -548,7 +566,20 @@
"duration_ts": 299,
"duration": "11.960000",
"nb_read_frames": "4",
"nb_read_packets": "4"
"nb_read_packets": "4",
"disposition": {
"default": 0,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0
}
}
],
"format": {
......
......@@ -32,9 +32,15 @@
</packets_and_frames>
<streams>
<stream index="0" codec_name="pcm_s16le" codec_type="audio" codec_time_base="1/44100" codec_tag_string="[1][0][0][0]" codec_tag="0x0001" default="0" forced="0" sample_fmt="s16" sample_rate="44100" channels="1" bits_per_sample="16" r_frame_rate="0/0" avg_frame_rate="0/0" time_base="1/44100" start_pts="0" start_time="0.000000" duration_ts="527313" duration="11.957211" bit_rate="705600" nb_read_frames="6" nb_read_packets="6"/>
<stream index="1" codec_name="rawvideo" codec_type="video" codec_time_base="1/25" codec_tag_string="RGB[24]" codec_tag="0x18424752" default="0" forced="0" width="320" height="240" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="4:3" pix_fmt="rgb24" level="-99" attached_pic="0" r_frame_rate="25/1" avg_frame_rate="0/0" time_base="1/25" start_pts="0" start_time="0.000000" duration_ts="299" duration="11.960000" nb_read_frames="4" nb_read_packets="4"/>
<stream index="2" codec_name="rawvideo" codec_type="video" codec_time_base="1/25" codec_tag_string="RGB[24]" codec_tag="0x18424752" default="0" forced="0" width="100" height="100" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="1:1" pix_fmt="rgb24" level="-99" attached_pic="0" r_frame_rate="25/1" avg_frame_rate="0/0" time_base="1/25" start_pts="0" start_time="0.000000" duration_ts="299" duration="11.960000" nb_read_frames="4" nb_read_packets="4"/>
<stream index="0" codec_name="pcm_s16le" codec_type="audio" codec_time_base="1/44100" codec_tag_string="[1][0][0][0]" codec_tag="0x0001" sample_fmt="s16" sample_rate="44100" channels="1" bits_per_sample="16" r_frame_rate="0/0" avg_frame_rate="0/0" time_base="1/44100" start_pts="0" start_time="0.000000" duration_ts="527313" duration="11.957211" bit_rate="705600" nb_read_frames="6" nb_read_packets="6">
<disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0"/>
</stream>
<stream index="1" codec_name="rawvideo" codec_type="video" codec_time_base="1/25" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="320" height="240" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="4:3" pix_fmt="rgb24" level="-99" r_frame_rate="25/1" avg_frame_rate="0/0" time_base="1/25" start_pts="0" start_time="0.000000" duration_ts="299" duration="11.960000" nb_read_frames="4" nb_read_packets="4">
<disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0"/>
</stream>
<stream index="2" codec_name="rawvideo" codec_type="video" codec_time_base="1/25" codec_tag_string="RGB[24]" codec_tag="0x18424752" width="100" height="100" has_b_frames="0" sample_aspect_ratio="1:1" display_aspect_ratio="1:1" pix_fmt="rgb24" level="-99" r_frame_rate="25/1" avg_frame_rate="0/0" time_base="1/25" start_pts="0" start_time="0.000000" duration_ts="299" duration="11.960000" nb_read_frames="4" nb_read_packets="4">
<disposition default="0" dub="0" original="0" comment="0" lyrics="0" karaoke="0" forced="0" hearing_impaired="0" visual_impaired="0" clean_effects="0" attached_pic="0"/>
</stream>
</streams>
<format filename="tests/data/ffprobe-test.nut" nb_streams="3" format_name="nut" start_time="0.000000" duration="11.960000" size="1054625" bit_rate="705434">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment