[FFmpeg-cvslog] ffprobe: support printing more packet side data types
Anton Khirnov
git at videolan.org
Sun May 9 12:08:47 EEST 2021
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sat Apr 24 17:49:35 2021 +0200| [677a030b26045acb50353d7954ae984ceefcd807] | committer: Anton Khirnov
ffprobe: support printing more packet side data types
Specifically WebVTT subtitle data, CPB properties, audio service type
and mpegts stream id.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=677a030b26045acb50353d7954ae984ceefcd807
---
fftools/ffprobe.c | 17 ++++
tests/ref/fate/concat-demuxer-simple2-lavf-ts | 128 +++++++++++++-------------
tests/ref/fate/mxf-probe-d10 | 5 +
3 files changed, 86 insertions(+), 64 deletions(-)
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index f7c5db8613..88e82a4195 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -2029,6 +2029,23 @@ static void print_pkt_side_data(WriterContext *w,
print_int("el_present_flag", dovi->el_present_flag);
print_int("bl_present_flag", dovi->bl_present_flag);
print_int("dv_bl_signal_compatibility_id", dovi->dv_bl_signal_compatibility_id);
+ } else if (sd->type == AV_PKT_DATA_AUDIO_SERVICE_TYPE) {
+ enum AVAudioServiceType *t = (enum AVAudioServiceType *)sd->data;
+ print_int("type", *t);
+ } else if (sd->type == AV_PKT_DATA_MPEGTS_STREAM_ID) {
+ print_int("id", *sd->data);
+ } else if (sd->type == AV_PKT_DATA_CPB_PROPERTIES) {
+ const AVCPBProperties *prop = (AVCPBProperties *)sd->data;
+ print_int("max_bitrate", prop->max_bitrate);
+ print_int("min_bitrate", prop->min_bitrate);
+ print_int("avg_bitrate", prop->avg_bitrate);
+ print_int("buffer_size", prop->buffer_size);
+ print_int("vbv_delay", prop->vbv_delay);
+ } else if (sd->type == AV_PKT_DATA_WEBVTT_IDENTIFIER ||
+ sd->type == AV_PKT_DATA_WEBVTT_SETTINGS) {
+ if (do_show_data)
+ writer_print_data(w, "data", sd->data, sd->size);
+ writer_print_data_hash(w, "data_hash", sd->data, sd->size);
}
writer_print_section_footer(w);
}
diff --git a/tests/ref/fate/concat-demuxer-simple2-lavf-ts b/tests/ref/fate/concat-demuxer-simple2-lavf-ts
index 72d9e57464..8a36b3e0ff 100644
--- a/tests/ref/fate/concat-demuxer-simple2-lavf-ts
+++ b/tests/ref/fate/concat-demuxer-simple2-lavf-ts
@@ -1,20 +1,20 @@
-video|1|982|0.010911|-2618|-0.029089|3600|0.040000|24801|564|K_MPEGTS Stream ID
+video|1|982|0.010911|-2618|-0.029089|3600|0.040000|24801|564|K_MPEGTS Stream ID|224
-video|1|4582|0.050911|982|0.010911|3600|0.040000|16429|25944|__MPEGTS Stream ID
+video|1|4582|0.050911|982|0.010911|3600|0.040000|16429|25944|__MPEGTS Stream ID|224
-video|1|8182|0.090911|4582|0.050911|3600|0.040000|14508|42864|__MPEGTS Stream ID
+video|1|8182|0.090911|4582|0.050911|3600|0.040000|14508|42864|__MPEGTS Stream ID|224
-video|1|11782|0.130911|8182|0.090911|3600|0.040000|12622|58092|__MPEGTS Stream ID
+video|1|11782|0.130911|8182|0.090911|3600|0.040000|12622|58092|__MPEGTS Stream ID|224
-video|1|15382|0.170911|11782|0.130911|3600|0.040000|13393|71064|__MPEGTS Stream ID
+video|1|15382|0.170911|11782|0.130911|3600|0.040000|13393|71064|__MPEGTS Stream ID|224
-video|1|18982|0.210911|15382|0.170911|3600|0.040000|13092|84788|__MPEGTS Stream ID
+video|1|18982|0.210911|15382|0.170911|3600|0.040000|13092|84788|__MPEGTS Stream ID|224
-video|1|22582|0.250911|18982|0.210911|3600|0.040000|12755|98700|__MPEGTS Stream ID
+video|1|22582|0.250911|18982|0.210911|3600|0.040000|12755|98700|__MPEGTS Stream ID|224
-video|1|26182|0.290911|22582|0.250911|3600|0.040000|12023|111860|__MPEGTS Stream ID
+video|1|26182|0.290911|22582|0.250911|3600|0.040000|12023|111860|__MPEGTS Stream ID|224
-audio|0|0|0.000000|0|0.000000|2351|0.026122|208|152844|K_MPEGTS Stream ID
+audio|0|0|0.000000|0|0.000000|2351|0.026122|208|152844|K_MPEGTS Stream ID|192
audio|0|2351|0.026122|2351|0.026122|2351|0.026122|209|N/A|K_
audio|0|4702|0.052244|4702|0.052244|2351|0.026122|209|N/A|K_
@@ -29,27 +29,27 @@ audio|0|23510|0.261222|23510|0.261222|2351|0.026122|209|N/A|K_
audio|0|25861|0.287344|25861|0.287344|2351|0.026122|209|N/A|K_
audio|0|28212|0.313467|28212|0.313467|2351|0.026122|209|N/A|K_
audio|0|30563|0.339589|30563|0.339589|2351|0.026122|209|N/A|K_
-video|1|29782|0.330911|26182|0.290911|3600|0.040000|14098|124268|__MPEGTS Stream ID
+video|1|29782|0.330911|26182|0.290911|3600|0.040000|14098|124268|__MPEGTS Stream ID|224
-video|1|33382|0.370911|29782|0.330911|3600|0.040000|13329|139120|__MPEGTS Stream ID
+video|1|33382|0.370911|29782|0.330911|3600|0.040000|13329|139120|__MPEGTS Stream ID|224
-video|1|36982|0.410911|33382|0.370911|3600|0.040000|12135|155852|__MPEGTS Stream ID
+video|1|36982|0.410911|33382|0.370911|3600|0.040000|12135|155852|__MPEGTS Stream ID|224
-video|1|40582|0.450911|36982|0.410911|3600|0.040000|12282|168448|__MPEGTS Stream ID
+video|1|40582|0.450911|36982|0.410911|3600|0.040000|12282|168448|__MPEGTS Stream ID|224
-video|1|44182|0.490911|40582|0.450911|3600|0.040000|24786|181420|K_MPEGTS Stream ID
+video|1|44182|0.490911|40582|0.450911|3600|0.040000|24786|181420|K_MPEGTS Stream ID|224
-video|1|47782|0.530911|44182|0.490911|3600|0.040000|17440|206988|__MPEGTS Stream ID
+video|1|47782|0.530911|44182|0.490911|3600|0.040000|17440|206988|__MPEGTS Stream ID|224
-video|1|51382|0.570911|47782|0.530911|3600|0.040000|15019|224848|__MPEGTS Stream ID
+video|1|51382|0.570911|47782|0.530911|3600|0.040000|15019|224848|__MPEGTS Stream ID|224
-video|1|54982|0.610911|51382|0.570911|3600|0.040000|13449|240640|__MPEGTS Stream ID
+video|1|54982|0.610911|51382|0.570911|3600|0.040000|13449|240640|__MPEGTS Stream ID|224
-video|1|58582|0.650911|54982|0.610911|3600|0.040000|12398|254552|__MPEGTS Stream ID
+video|1|58582|0.650911|54982|0.610911|3600|0.040000|12398|254552|__MPEGTS Stream ID|224
-video|1|62182|0.690911|58582|0.650911|3600|0.040000|13455|267336|__MPEGTS Stream ID
+video|1|62182|0.690911|58582|0.650911|3600|0.040000|13455|267336|__MPEGTS Stream ID|224
-audio|0|32915|0.365722|32915|0.365722|2351|0.026122|209|308508|K_MPEGTS Stream ID
+audio|0|32915|0.365722|32915|0.365722|2351|0.026122|209|308508|K_MPEGTS Stream ID|192
audio|0|35266|0.391844|35266|0.391844|2351|0.026122|209|N/A|K_
audio|0|37617|0.417967|37617|0.417967|2351|0.026122|209|N/A|K_
@@ -64,17 +64,17 @@ audio|0|56425|0.626944|56425|0.626944|2351|0.026122|209|N/A|K_
audio|0|58776|0.653067|58776|0.653067|2351|0.026122|209|N/A|K_
audio|0|61127|0.679189|61127|0.679189|2351|0.026122|209|N/A|K_
audio|0|63478|0.705311|63478|0.705311|2351|0.026122|209|N/A|K_
-video|1|65782|0.730911|62182|0.690911|3600|0.040000|13836|281624|__MPEGTS Stream ID
+video|1|65782|0.730911|62182|0.690911|3600|0.040000|13836|281624|__MPEGTS Stream ID|224
-video|1|69382|0.770911|65782|0.730911|3600|0.040000|12163|295912|__MPEGTS Stream ID
+video|1|69382|0.770911|65782|0.730911|3600|0.040000|12163|295912|__MPEGTS Stream ID|224
-video|1|72982|0.810911|69382|0.770911|3600|0.040000|12692|311516|__MPEGTS Stream ID
+video|1|72982|0.810911|69382|0.770911|3600|0.040000|12692|311516|__MPEGTS Stream ID|224
-video|1|76582|0.850911|72982|0.810911|3600|0.040000|10824|325052|__MPEGTS Stream ID
+video|1|76582|0.850911|72982|0.810911|3600|0.040000|10824|325052|__MPEGTS Stream ID|224
-video|1|80182|0.890911|76582|0.850911|3600|0.040000|11286|336144|__MPEGTS Stream ID
+video|1|80182|0.890911|76582|0.850911|3600|0.040000|11286|336144|__MPEGTS Stream ID|224
-audio|0|65829|0.731433|65829|0.731433|2351|0.026122|209|386716|K_MPEGTS Stream ID
+audio|0|65829|0.731433|65829|0.731433|2351|0.026122|209|386716|K_MPEGTS Stream ID|192
audio|0|68180|0.757556|68180|0.757556|2351|0.026122|209|N/A|K_
audio|0|70531|0.783678|70531|0.783678|2351|0.026122|209|N/A|K_
@@ -86,26 +86,26 @@ audio|0|82286|0.914289|82286|0.914289|2351|0.026122|209|N/A|K_
audio|0|84637|0.940411|84637|0.940411|2351|0.026122|209|N/A|K_
audio|0|86988|0.966533|86988|0.966533|2351|0.026122|209|N/A|K_
audio|0|89339|0.992656|89339|0.992656|2351|0.026122|209|N/A|K_
-video|1|83782|0.930911|80182|0.890911|3600|0.040000|12678|347800|__MPEGTS Stream ID
+video|1|83782|0.930911|80182|0.890911|3600|0.040000|12678|347800|__MPEGTS Stream ID|224
video|1|87382|0.970911|83782|0.930911|3600|0.040000|24711|361336|K_
-video|1|91964|1.021822|88364|0.981822|3600|0.040000|24801|564|K_MPEGTS Stream ID
+video|1|91964|1.021822|88364|0.981822|3600|0.040000|24801|564|K_MPEGTS Stream ID|224
-video|1|95564|1.061822|91964|1.021822|3600|0.040000|16429|25944|__MPEGTS Stream ID
+video|1|95564|1.061822|91964|1.021822|3600|0.040000|16429|25944|__MPEGTS Stream ID|224
-video|1|99164|1.101822|95564|1.061822|3600|0.040000|14508|42864|__MPEGTS Stream ID
+video|1|99164|1.101822|95564|1.061822|3600|0.040000|14508|42864|__MPEGTS Stream ID|224
-video|1|102764|1.141822|99164|1.101822|3600|0.040000|12622|58092|__MPEGTS Stream ID
+video|1|102764|1.141822|99164|1.101822|3600|0.040000|12622|58092|__MPEGTS Stream ID|224
-video|1|106364|1.181822|102764|1.141822|3600|0.040000|13393|71064|__MPEGTS Stream ID
+video|1|106364|1.181822|102764|1.141822|3600|0.040000|13393|71064|__MPEGTS Stream ID|224
-video|1|109964|1.221822|106364|1.181822|3600|0.040000|13092|84788|__MPEGTS Stream ID
+video|1|109964|1.221822|106364|1.181822|3600|0.040000|13092|84788|__MPEGTS Stream ID|224
-video|1|113564|1.261822|109964|1.221822|3600|0.040000|12755|98700|__MPEGTS Stream ID
+video|1|113564|1.261822|109964|1.221822|3600|0.040000|12755|98700|__MPEGTS Stream ID|224
-video|1|117164|1.301822|113564|1.261822|3600|0.040000|12023|111860|__MPEGTS Stream ID
+video|1|117164|1.301822|113564|1.261822|3600|0.040000|12023|111860|__MPEGTS Stream ID|224
-audio|0|90982|1.010911|90982|1.010911|2351|0.026122|208|152844|K_MPEGTS Stream ID
+audio|0|90982|1.010911|90982|1.010911|2351|0.026122|208|152844|K_MPEGTS Stream ID|192
audio|0|93333|1.037033|93333|1.037033|2351|0.026122|209|N/A|K_
audio|0|95684|1.063156|95684|1.063156|2351|0.026122|209|N/A|K_
@@ -120,27 +120,27 @@ audio|0|114492|1.272133|114492|1.272133|2351|0.026122|209|N/A|K_
audio|0|116843|1.298256|116843|1.298256|2351|0.026122|209|N/A|K_
audio|0|119194|1.324378|119194|1.324378|2351|0.026122|209|N/A|K_
audio|0|121545|1.350500|121545|1.350500|2351|0.026122|209|N/A|K_
-video|1|120764|1.341822|117164|1.301822|3600|0.040000|14098|124268|__MPEGTS Stream ID
+video|1|120764|1.341822|117164|1.301822|3600|0.040000|14098|124268|__MPEGTS Stream ID|224
-video|1|124364|1.381822|120764|1.341822|3600|0.040000|13329|139120|__MPEGTS Stream ID
+video|1|124364|1.381822|120764|1.341822|3600|0.040000|13329|139120|__MPEGTS Stream ID|224
-video|1|127964|1.421822|124364|1.381822|3600|0.040000|12135|155852|__MPEGTS Stream ID
+video|1|127964|1.421822|124364|1.381822|3600|0.040000|12135|155852|__MPEGTS Stream ID|224
-video|1|131564|1.461822|127964|1.421822|3600|0.040000|12282|168448|__MPEGTS Stream ID
+video|1|131564|1.461822|127964|1.421822|3600|0.040000|12282|168448|__MPEGTS Stream ID|224
-video|1|135164|1.501822|131564|1.461822|3600|0.040000|24786|181420|K_MPEGTS Stream ID
+video|1|135164|1.501822|131564|1.461822|3600|0.040000|24786|181420|K_MPEGTS Stream ID|224
-video|1|138764|1.541822|135164|1.501822|3600|0.040000|17440|206988|__MPEGTS Stream ID
+video|1|138764|1.541822|135164|1.501822|3600|0.040000|17440|206988|__MPEGTS Stream ID|224
-video|1|142364|1.581822|138764|1.541822|3600|0.040000|15019|224848|__MPEGTS Stream ID
+video|1|142364|1.581822|138764|1.541822|3600|0.040000|15019|224848|__MPEGTS Stream ID|224
-video|1|145964|1.621822|142364|1.581822|3600|0.040000|13449|240640|__MPEGTS Stream ID
+video|1|145964|1.621822|142364|1.581822|3600|0.040000|13449|240640|__MPEGTS Stream ID|224
-video|1|149564|1.661822|145964|1.621822|3600|0.040000|12398|254552|__MPEGTS Stream ID
+video|1|149564|1.661822|145964|1.621822|3600|0.040000|12398|254552|__MPEGTS Stream ID|224
-video|1|153164|1.701822|149564|1.661822|3600|0.040000|13455|267336|__MPEGTS Stream ID
+video|1|153164|1.701822|149564|1.661822|3600|0.040000|13455|267336|__MPEGTS Stream ID|224
-audio|0|123897|1.376633|123897|1.376633|2351|0.026122|209|308508|K_MPEGTS Stream ID
+audio|0|123897|1.376633|123897|1.376633|2351|0.026122|209|308508|K_MPEGTS Stream ID|192
audio|0|126248|1.402756|126248|1.402756|2351|0.026122|209|N/A|K_
audio|0|128599|1.428878|128599|1.428878|2351|0.026122|209|N/A|K_
@@ -155,17 +155,17 @@ audio|0|147407|1.637856|147407|1.637856|2351|0.026122|209|N/A|K_
audio|0|149758|1.663978|149758|1.663978|2351|0.026122|209|N/A|K_
audio|0|152109|1.690100|152109|1.690100|2351|0.026122|209|N/A|K_
audio|0|154460|1.716222|154460|1.716222|2351|0.026122|209|N/A|K_
-video|1|156764|1.741822|153164|1.701822|3600|0.040000|13836|281624|__MPEGTS Stream ID
+video|1|156764|1.741822|153164|1.701822|3600|0.040000|13836|281624|__MPEGTS Stream ID|224
-video|1|160364|1.781822|156764|1.741822|3600|0.040000|12163|295912|__MPEGTS Stream ID
+video|1|160364|1.781822|156764|1.741822|3600|0.040000|12163|295912|__MPEGTS Stream ID|224
-video|1|163964|1.821822|160364|1.781822|3600|0.040000|12692|311516|__MPEGTS Stream ID
+video|1|163964|1.821822|160364|1.781822|3600|0.040000|12692|311516|__MPEGTS Stream ID|224
-video|1|167564|1.861822|163964|1.821822|3600|0.040000|10824|325052|__MPEGTS Stream ID
+video|1|167564|1.861822|163964|1.821822|3600|0.040000|10824|325052|__MPEGTS Stream ID|224
-video|1|171164|1.901822|167564|1.861822|3600|0.040000|11286|336144|__MPEGTS Stream ID
+video|1|171164|1.901822|167564|1.861822|3600|0.040000|11286|336144|__MPEGTS Stream ID|224
-audio|0|156811|1.742344|156811|1.742344|2351|0.026122|209|386716|K_MPEGTS Stream ID
+audio|0|156811|1.742344|156811|1.742344|2351|0.026122|209|386716|K_MPEGTS Stream ID|192
audio|0|159162|1.768467|159162|1.768467|2351|0.026122|209|N/A|K_
audio|0|161513|1.794589|161513|1.794589|2351|0.026122|209|N/A|K_
@@ -177,16 +177,16 @@ audio|0|173268|1.925200|173268|1.925200|2351|0.026122|209|N/A|K_
audio|0|175619|1.951322|175619|1.951322|2351|0.026122|209|N/A|K_
audio|0|177970|1.977444|177970|1.977444|2351|0.026122|209|N/A|K_
audio|0|180321|2.003567|180321|2.003567|2351|0.026122|209|N/A|K_
-video|1|174764|1.941822|171164|1.901822|3600|0.040000|12678|347800|__MPEGTS Stream ID
+video|1|174764|1.941822|171164|1.901822|3600|0.040000|12678|347800|__MPEGTS Stream ID|224
video|1|178364|1.981822|174764|1.941822|3600|0.040000|24711|361336|K_
-video|1|139582|1.550911|135982|1.510911|3600|0.040000|12692|311516|__MPEGTS Stream ID
+video|1|139582|1.550911|135982|1.510911|3600|0.040000|12692|311516|__MPEGTS Stream ID|224
-video|1|143182|1.590911|139582|1.550911|3600|0.040000|10824|325052|__MPEGTS Stream ID
+video|1|143182|1.590911|139582|1.550911|3600|0.040000|10824|325052|__MPEGTS Stream ID|224
-video|1|146782|1.630911|143182|1.590911|3600|0.040000|11286|336144|__MPEGTS Stream ID
+video|1|146782|1.630911|143182|1.590911|3600|0.040000|11286|336144|__MPEGTS Stream ID|224
-audio|0|132429|1.471433|132429|1.471433|2351|0.026122|209|386716|K_MPEGTS Stream ID
+audio|0|132429|1.471433|132429|1.471433|2351|0.026122|209|386716|K_MPEGTS Stream ID|192
audio|0|134780|1.497556|134780|1.497556|2351|0.026122|209|N/A|K_
audio|0|137131|1.523678|137131|1.523678|2351|0.026122|209|N/A|K_
@@ -198,18 +198,18 @@ audio|0|148886|1.654289|148886|1.654289|2351|0.026122|209|N/A|K_
audio|0|151237|1.680411|151237|1.680411|2351|0.026122|209|N/A|K_
audio|0|153588|1.706533|153588|1.706533|2351|0.026122|209|N/A|K_
audio|0|155939|1.732656|155939|1.732656|2351|0.026122|209|N/A|K_
-video|1|150382|1.670911|146782|1.630911|3600|0.040000|12678|347800|__MPEGTS Stream ID
+video|1|150382|1.670911|146782|1.630911|3600|0.040000|12678|347800|__MPEGTS Stream ID|224
video|1|153982|1.710911|150382|1.670911|3600|0.040000|24711|361336|K_
-video|1|161182|1.790911|157582|1.750911|3600|0.040000|12135|155852|__MPEGTS Stream ID
+video|1|161182|1.790911|157582|1.750911|3600|0.040000|12135|155852|__MPEGTS Stream ID|224
-video|1|164782|1.830911|161182|1.790911|3600|0.040000|12282|168448|__MPEGTS Stream ID
+video|1|164782|1.830911|161182|1.790911|3600|0.040000|12282|168448|__MPEGTS Stream ID|224
-video|1|168382|1.870911|164782|1.830911|3600|0.040000|24786|181420|K_MPEGTS Stream ID
+video|1|168382|1.870911|164782|1.830911|3600|0.040000|24786|181420|K_MPEGTS Stream ID|224
-video|1|171982|1.910911|168382|1.870911|3600|0.040000|17440|206988|__MPEGTS Stream ID
+video|1|171982|1.910911|168382|1.870911|3600|0.040000|17440|206988|__MPEGTS Stream ID|224
-video|1|175582|1.950911|171982|1.910911|3600|0.040000|15019|224848|__MPEGTS Stream ID
+video|1|175582|1.950911|171982|1.910911|3600|0.040000|15019|224848|__MPEGTS Stream ID|224
0|mp2|unknown|audio|[3][0][0][0]|0x0003|s16p|44100|1|mono|0|N/A|0/0|0/0|1/90000|0|0.000000|N/A|N/A|64000|N/A|N/A|N/A|N/A|89|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
1|mpeg2video|4|video|[2][0][0][0]|0x0002|352|288|0|0|0|1|1:1|11:9|yuv420p|8|tv|unknown|unknown|unknown|left|progressive|1|N/A|25/1|25/1|1/90000|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|N/A|60|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
diff --git a/tests/ref/fate/mxf-probe-d10 b/tests/ref/fate/mxf-probe-d10
index 94b0f5f384..4b1b303d3c 100644
--- a/tests/ref/fate/mxf-probe-d10
+++ b/tests/ref/fate/mxf-probe-d10
@@ -56,6 +56,11 @@ DISPOSITION:still_image=0
TAG:file_package_umid=0x060A2B340101010501010D1313000000AE86B200913105800000080046A54011
[SIDE_DATA]
side_data_type=CPB properties
+max_bitrate=50000000
+min_bitrate=0
+avg_bitrate=0
+buffer_size=2015232
+vbv_delay=-1
[/SIDE_DATA]
[/STREAM]
[STREAM]
More information about the ffmpeg-cvslog
mailing list