Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update.
@ 2024-03-26  0:56 Romain Beauxis
  2024-03-26  0:56 ` [FFmpeg-devel] [PATCH 2/2] Add fate test for hls " Romain Beauxis
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Romain Beauxis @ 2024-03-26  0:56 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Romain Beauxis

This patch adds support for updating HLS metadata passed as ID3 frames.

This seems like a pretty straight-forward improvement. Updating the
metadaata of the first stream seems to be the mechanism is other places
in the code and works as expected.

---
 libavformat/hls.c | 54 ++++++++++++++++++++++++++++-------------------
 1 file changed, 32 insertions(+), 22 deletions(-)

diff --git a/libavformat/hls.c b/libavformat/hls.c
index f6b44c2e35..ba6634d57a 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -93,6 +93,12 @@ enum PlaylistType {
     PLS_TYPE_VOD
 };
 
+#define ID3_PRIV_OWNER_TS "com.apple.streaming.transportStreamTimestamp"
+#define ID3_PRIV_OWNER_AUDIO_SETUP "com.apple.streaming.audioDescription"
+
+#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX ID3_PRIV_OWNER_TS
+#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX ID3_PRIV_OWNER_AUDIO_SETUP
+
 /*
  * Each playlist has its own demuxer. If it currently is active,
  * it has an open AVIOContext too, and potentially an AVPacket
@@ -150,9 +156,7 @@ struct playlist {
     int64_t id3_offset; /* in stream original tb */
     uint8_t* id3_buf; /* temp buffer for id3 parsing */
     unsigned int id3_buf_size;
-    AVDictionary *id3_initial; /* data from first id3 tag */
-    int id3_found; /* ID3 tag found at some point */
-    int id3_changed; /* ID3 tag data has changed at some point */
+    AVDictionary *last_id3; /* data from the last id3 tag */
     ID3v2ExtraMeta *id3_deferred_extra; /* stored here until subdemuxer is opened */
 
     HLSAudioSetupInfo audio_setup_info;
@@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c)
         av_freep(&pls->main_streams);
         av_freep(&pls->renditions);
         av_freep(&pls->id3_buf);
-        av_dict_free(&pls->id3_initial);
+        av_dict_free(&pls->last_id3);
         ff_id3v2_free_extra_meta(&pls->id3_deferred_extra);
         av_freep(&pls->init_sec_buf);
         av_packet_free(&pls->pkt);
@@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s, AVIOContext *pb,
                       AVDictionary **metadata, int64_t *dts, HLSAudioSetupInfo *audio_setup_info,
                       ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta **extra_meta)
 {
-    static const char id3_priv_owner_ts[] = "com.apple.streaming.transportStreamTimestamp";
-    static const char id3_priv_owner_audio_setup[] = "com.apple.streaming.audioDescription";
     ID3v2ExtraMeta *meta;
 
     ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta);
     for (meta = *extra_meta; meta; meta = meta->next) {
         if (!strcmp(meta->tag, "PRIV")) {
             ID3v2ExtraMetaPRIV *priv = &meta->data.priv;
-            if (priv->datasize == 8 && !av_strncasecmp(priv->owner, id3_priv_owner_ts, 44)) {
+            if (priv->datasize == 8 && !av_strncasecmp(priv->owner, ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) {
                 /* 33-bit MPEG timestamp */
                 int64_t ts = AV_RB64(priv->data);
                 av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp %"PRId64"\n", ts);
@@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s, AVIOContext *pb,
                     *dts = ts;
                 else
                     av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio timestamp %"PRId64"\n", ts);
-            } else if (priv->datasize >= 8 && !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) {
+            } else if (priv->datasize >= 8 &&
+                       !av_strncasecmp(priv->owner, ID3_PRIV_OWNER_AUDIO_SETUP, 36) &&
+                       audio_setup_info) {
                 ff_hls_senc_read_audio_setup_info(audio_setup_info, priv->data, priv->datasize);
             }
         } else if (!strcmp(meta->tag, "APIC") && apic)
@@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct playlist *pls, AVDictionary *metadata,
 {
     const AVDictionaryEntry *entry = NULL;
     const AVDictionaryEntry *oldentry;
+
     /* check that no keys have changed values */
     while ((entry = av_dict_iterate(metadata, entry))) {
-        oldentry = av_dict_get(pls->id3_initial, entry->key, NULL, AV_DICT_MATCH_CASE);
+        oldentry = av_dict_get(pls->last_id3, entry->key, NULL, AV_DICT_MATCH_CASE);
         if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
             return 1;
     }
@@ -1143,35 +1148,40 @@ static void handle_id3(AVIOContext *pb, struct playlist *pls)
     ID3v2ExtraMetaAPIC *apic = NULL;
     ID3v2ExtraMeta *extra_meta = NULL;
     int64_t timestamp = AV_NOPTS_VALUE;
+    // Only set audio_setup_info on first id3 chunk.
+    HLSAudioSetupInfo *audio_setup_info = pls->last_id3 ? NULL : &pls->audio_setup_info;
 
-    parse_id3(pls->ctx, pb, &metadata, &timestamp, &pls->audio_setup_info, &apic, &extra_meta);
+    parse_id3(pls->ctx, pb, &metadata, &timestamp, audio_setup_info, &apic, &extra_meta);
 
-    if (timestamp != AV_NOPTS_VALUE) {
+    if (pls->id3_mpegts_timestamp == AV_NOPTS_VALUE && timestamp != AV_NOPTS_VALUE) {
         pls->id3_mpegts_timestamp = timestamp;
         pls->id3_offset = 0;
     }
 
-    if (!pls->id3_found) {
-        /* initial ID3 tags */
-        av_assert0(!pls->id3_deferred_extra);
-        pls->id3_found = 1;
-
+    if (id3_has_changed_values(pls, metadata, apic)) {
         /* get picture attachment and set text metadata */
         if (pls->ctx->nb_streams)
             ff_id3v2_parse_apic(pls->ctx, extra_meta);
-        else
+        else {
+            av_assert0(!pls->id3_deferred_extra);
             /* demuxer not yet opened, defer picture attachment */
             pls->id3_deferred_extra = extra_meta;
+        }
 
         ff_id3v2_parse_priv_dict(&metadata, extra_meta);
+
+        av_dict_set(&metadata, ID3v2_PRIV_OWNER_TS, NULL, 0);
+        av_dict_set(&metadata, ID3v2_PRIV_OWNER_AUDIO_SETUP, NULL, 0);
+
+        av_dict_free(&pls->ctx->metadata);
         av_dict_copy(&pls->ctx->metadata, metadata, 0);
-        pls->id3_initial = metadata;
 
+        if (pls->n_main_streams)
+            av_dict_copy(&pls->main_streams[0]->metadata, metadata, 0);
+
+        if (pls->last_id3) av_dict_free(&pls->last_id3);
+        pls->last_id3 = metadata;
     } else {
-        if (!pls->id3_changed && id3_has_changed_values(pls, metadata, apic)) {
-            avpriv_report_missing_feature(pls->parent, "Changing ID3 metadata in HLS audio elementary stream");
-            pls->id3_changed = 1;
-        }
         av_dict_free(&metadata);
     }
 
-- 
2.39.3 (Apple Git-145)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [FFmpeg-devel] [PATCH 2/2] Add fate test for hls metadata update.
  2024-03-26  0:56 [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update Romain Beauxis
@ 2024-03-26  0:56 ` Romain Beauxis
  2024-04-11 14:17   ` Andreas Rheinhardt
  2024-03-28 22:51 ` [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 " Romain Beauxis
  2024-04-07 10:44 ` Steven Liu
  2 siblings, 1 reply; 13+ messages in thread
From: Romain Beauxis @ 2024-03-26  0:56 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Romain Beauxis

This patch adds a FATE test for the new HLS metadata update. The fate
sample consists of a two segment AAC hls stream. The first segment has
test title 1 as title metadata while the second has test title 2.

In the log, we can see that test title 2 is reported for the stream,
indicating that the metadata was updated with the second segment.

Romain
---
 tests/fate/demux.mak               |   3 +
 tests/ref/fate/hls-adts-meta-demux | 124 +++++++++++++++++++++++++++++
 2 files changed, 127 insertions(+)
 create mode 100644 tests/ref/fate/hls-adts-meta-demux

diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak
index d9b9045f0b..7243c2c163 100644
--- a/tests/fate/demux.mak
+++ b/tests/fate/demux.mak
@@ -160,6 +160,9 @@ fate-ts-demux: CMD = ffprobe_demux $(TARGET_SAMPLES)/ac3/mp3ac325-4864-small.ts
 FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-ts-timed-id3-demux
 fate-ts-timed-id3-demux: CMD = ffprobe_demux $(TARGET_SAMPLES)/mpegts/id3.ts
 
+FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-hls-adts-meta-demux
+fate-fate-hls-adts-meta-demux: CMD = ffprobe_demux $(TARGET_SAMPLES)/hls-adts-meta/stream.m3u8
+
 FATE_SAMPLES_DEMUX += $(FATE_SAMPLES_DEMUX-yes)
 FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_DEMUX)
 FATE_FFPROBE_DEMUX   += $(FATE_FFPROBE_DEMUX-yes)
diff --git a/tests/ref/fate/hls-adts-meta-demux b/tests/ref/fate/hls-adts-meta-demux
new file mode 100644
index 0000000000..ab944695fc
--- /dev/null
+++ b/tests/ref/fate/hls-adts-meta-demux
@@ -0,0 +1,124 @@
+packet|codec_type=audio|stream_index=0|pts=3416400|pts_time=37.960000|dts=3416400|dts_time=37.960000|duration=2090|duration_time=0.023222|size=368|pos=0|flags=K__|data_hash=CRC32:c371b0d9
+packet|codec_type=audio|stream_index=0|pts=3418490|pts_time=37.983222|dts=3418490|dts_time=37.983222|duration=2090|duration_time=0.023222|size=390|pos=368|flags=K__|data_hash=CRC32:950c52b2
+packet|codec_type=audio|stream_index=0|pts=3420580|pts_time=38.006444|dts=3420580|dts_time=38.006444|duration=2090|duration_time=0.023222|size=357|pos=758|flags=K__|data_hash=CRC32:3e672212
+packet|codec_type=audio|stream_index=0|pts=3422669|pts_time=38.029656|dts=3422669|dts_time=38.029656|duration=2090|duration_time=0.023222|size=426|pos=1115|flags=K__|data_hash=CRC32:817b6e4c
+packet|codec_type=audio|stream_index=0|pts=3424759|pts_time=38.052878|dts=3424759|dts_time=38.052878|duration=2090|duration_time=0.023222|size=368|pos=1541|flags=K__|data_hash=CRC32:c4c6e1ed
+packet|codec_type=audio|stream_index=0|pts=3426849|pts_time=38.076100|dts=3426849|dts_time=38.076100|duration=2090|duration_time=0.023222|size=389|pos=1909|flags=K__|data_hash=CRC32:67cb6dd9
+packet|codec_type=audio|stream_index=0|pts=3428939|pts_time=38.099322|dts=3428939|dts_time=38.099322|duration=2090|duration_time=0.023222|size=352|pos=2298|flags=K__|data_hash=CRC32:7a56ff53
+packet|codec_type=audio|stream_index=0|pts=3431029|pts_time=38.122544|dts=3431029|dts_time=38.122544|duration=2090|duration_time=0.023222|size=378|pos=2650|flags=K__|data_hash=CRC32:f8d5ef58
+packet|codec_type=audio|stream_index=0|pts=3433118|pts_time=38.145756|dts=3433118|dts_time=38.145756|duration=2090|duration_time=0.023222|size=384|pos=3028|flags=K__|data_hash=CRC32:73a4fb1c
+packet|codec_type=audio|stream_index=0|pts=3435208|pts_time=38.168978|dts=3435208|dts_time=38.168978|duration=2090|duration_time=0.023222|size=353|pos=3412|flags=K__|data_hash=CRC32:4ea999b5
+packet|codec_type=audio|stream_index=0|pts=3437298|pts_time=38.192200|dts=3437298|dts_time=38.192200|duration=2090|duration_time=0.023222|size=417|pos=3765|flags=K__|data_hash=CRC32:4540aec8
+packet|codec_type=audio|stream_index=0|pts=3439388|pts_time=38.215422|dts=3439388|dts_time=38.215422|duration=2090|duration_time=0.023222|size=361|pos=4182|flags=K__|data_hash=CRC32:635a04f4
+packet|codec_type=audio|stream_index=0|pts=3441478|pts_time=38.238644|dts=3441478|dts_time=38.238644|duration=2090|duration_time=0.023222|size=399|pos=4543|flags=K__|data_hash=CRC32:94583c18
+packet|codec_type=audio|stream_index=0|pts=3443567|pts_time=38.261856|dts=3443567|dts_time=38.261856|duration=2090|duration_time=0.023222|size=384|pos=4942|flags=K__|data_hash=CRC32:21070d79
+packet|codec_type=audio|stream_index=0|pts=3445657|pts_time=38.285078|dts=3445657|dts_time=38.285078|duration=2090|duration_time=0.023222|size=378|pos=5326|flags=K__|data_hash=CRC32:bd5beb97
+packet|codec_type=audio|stream_index=0|pts=3447747|pts_time=38.308300|dts=3447747|dts_time=38.308300|duration=2090|duration_time=0.023222|size=362|pos=5704|flags=K__|data_hash=CRC32:8bb15fb7
+packet|codec_type=audio|stream_index=0|pts=3449837|pts_time=38.331522|dts=3449837|dts_time=38.331522|duration=2090|duration_time=0.023222|size=365|pos=6066|flags=K__|data_hash=CRC32:a1801ece
+packet|codec_type=audio|stream_index=0|pts=3451927|pts_time=38.354744|dts=3451927|dts_time=38.354744|duration=2090|duration_time=0.023222|size=390|pos=6431|flags=K__|data_hash=CRC32:8eb3880b
+packet|codec_type=audio|stream_index=0|pts=3454016|pts_time=38.377956|dts=3454016|dts_time=38.377956|duration=2090|duration_time=0.023222|size=358|pos=6821|flags=K__|data_hash=CRC32:b4b30472
+packet|codec_type=audio|stream_index=0|pts=3456106|pts_time=38.401178|dts=3456106|dts_time=38.401178|duration=2090|duration_time=0.023222|size=395|pos=7179|flags=K__|data_hash=CRC32:b3e014b3
+packet|codec_type=audio|stream_index=0|pts=3458196|pts_time=38.424400|dts=3458196|dts_time=38.424400|duration=2090|duration_time=0.023222|size=353|pos=7574|flags=K__|data_hash=CRC32:5b510322
+packet|codec_type=audio|stream_index=0|pts=3460286|pts_time=38.447622|dts=3460286|dts_time=38.447622|duration=2090|duration_time=0.023222|size=423|pos=7927|flags=K__|data_hash=CRC32:f36d52f3
+packet|codec_type=audio|stream_index=0|pts=3462376|pts_time=38.470844|dts=3462376|dts_time=38.470844|duration=2090|duration_time=0.023222|size=360|pos=8350|flags=K__|data_hash=CRC32:2bd95695
+packet|codec_type=audio|stream_index=0|pts=3464465|pts_time=38.494056|dts=3464465|dts_time=38.494056|duration=2090|duration_time=0.023222|size=355|pos=8710|flags=K__|data_hash=CRC32:804bd6ba
+packet|codec_type=audio|stream_index=0|pts=3466555|pts_time=38.517278|dts=3466555|dts_time=38.517278|duration=2090|duration_time=0.023222|size=419|pos=9065|flags=K__|data_hash=CRC32:6f2b27cf
+packet|codec_type=audio|stream_index=0|pts=3468645|pts_time=38.540500|dts=3468645|dts_time=38.540500|duration=2090|duration_time=0.023222|size=353|pos=9484|flags=K__|data_hash=CRC32:4dca2d23
+packet|codec_type=audio|stream_index=0|pts=3470735|pts_time=38.563722|dts=3470735|dts_time=38.563722|duration=2090|duration_time=0.023222|size=393|pos=9837|flags=K__|data_hash=CRC32:03511cbb
+packet|codec_type=audio|stream_index=0|pts=3472824|pts_time=38.586933|dts=3472824|dts_time=38.586933|duration=2090|duration_time=0.023222|size=384|pos=10230|flags=K__|data_hash=CRC32:a0b2bdab
+packet|codec_type=audio|stream_index=0|pts=3474914|pts_time=38.610156|dts=3474914|dts_time=38.610156|duration=2090|duration_time=0.023222|size=351|pos=10614|flags=K__|data_hash=CRC32:f11a77fb
+packet|codec_type=audio|stream_index=0|pts=3477004|pts_time=38.633378|dts=3477004|dts_time=38.633378|duration=2090|duration_time=0.023222|size=413|pos=10965|flags=K__|data_hash=CRC32:b3d288b4
+packet|codec_type=audio|stream_index=0|pts=3479094|pts_time=38.656600|dts=3479094|dts_time=38.656600|duration=2090|duration_time=0.023222|size=372|pos=11378|flags=K__|data_hash=CRC32:fbca6a8b
+packet|codec_type=audio|stream_index=0|pts=3481184|pts_time=38.679822|dts=3481184|dts_time=38.679822|duration=2090|duration_time=0.023222|size=389|pos=11750|flags=K__|data_hash=CRC32:ca769187
+packet|codec_type=audio|stream_index=0|pts=3483273|pts_time=38.703033|dts=3483273|dts_time=38.703033|duration=2090|duration_time=0.023222|size=353|pos=12139|flags=K__|data_hash=CRC32:a00ccdd1
+packet|codec_type=audio|stream_index=0|pts=3485363|pts_time=38.726256|dts=3485363|dts_time=38.726256|duration=2090|duration_time=0.023222|size=404|pos=12492|flags=K__|data_hash=CRC32:6593e756
+packet|codec_type=audio|stream_index=0|pts=3487453|pts_time=38.749478|dts=3487453|dts_time=38.749478|duration=2090|duration_time=0.023222|size=360|pos=12896|flags=K__|data_hash=CRC32:f87250e9
+packet|codec_type=audio|stream_index=0|pts=3489543|pts_time=38.772700|dts=3489543|dts_time=38.772700|duration=2090|duration_time=0.023222|size=394|pos=13256|flags=K__|data_hash=CRC32:6f5ece5c
+packet|codec_type=audio|stream_index=0|pts=3491633|pts_time=38.795922|dts=3491633|dts_time=38.795922|duration=2090|duration_time=0.023222|size=355|pos=13650|flags=K__|data_hash=CRC32:e3f880f2
+packet|codec_type=audio|stream_index=0|pts=3493722|pts_time=38.819133|dts=3493722|dts_time=38.819133|duration=2090|duration_time=0.023222|size=377|pos=14005|flags=K__|data_hash=CRC32:6637f3b8
+packet|codec_type=audio|stream_index=0|pts=3495812|pts_time=38.842356|dts=3495812|dts_time=38.842356|duration=2090|duration_time=0.023222|size=377|pos=14382|flags=K__|data_hash=CRC32:89220563
+packet|codec_type=audio|stream_index=0|pts=3497902|pts_time=38.865578|dts=3497902|dts_time=38.865578|duration=2090|duration_time=0.023222|size=366|pos=14759|flags=K__|data_hash=CRC32:9ba37001
+packet|codec_type=audio|stream_index=0|pts=3499992|pts_time=38.888800|dts=3499992|dts_time=38.888800|duration=2090|duration_time=0.023222|size=413|pos=15125|flags=K__|data_hash=CRC32:d59379d4
+packet|codec_type=audio|stream_index=0|pts=3502082|pts_time=38.912022|dts=3502082|dts_time=38.912022|duration=2090|duration_time=0.023222|size=352|pos=15538|flags=K__|data_hash=CRC32:ca06f39a
+packet|codec_type=audio|stream_index=0|pts=3504171|pts_time=38.935233|dts=3504171|dts_time=38.935233|duration=2090|duration_time=0.023222|size=408|pos=15890|flags=K__|data_hash=CRC32:a3d051e2
+packet|codec_type=audio|stream_index=0|pts=3506261|pts_time=38.958456|dts=3506261|dts_time=38.958456|duration=2090|duration_time=0.023222|size=400|pos=16298|flags=K__|data_hash=CRC32:9e69c13b
+packet|codec_type=audio|stream_index=0|pts=3508351|pts_time=38.981678|dts=3508351|dts_time=38.981678|duration=2090|duration_time=0.023222|size=392|pos=16698|flags=K__|data_hash=CRC32:2eee52a5
+packet|codec_type=audio|stream_index=0|pts=3510441|pts_time=39.004900|dts=3510441|dts_time=39.004900|duration=2090|duration_time=0.023222|size=339|pos=17090|flags=K__|data_hash=CRC32:596af9cf
+packet|codec_type=audio|stream_index=0|pts=3512531|pts_time=39.028122|dts=3512531|dts_time=39.028122|duration=2090|duration_time=0.023222|size=363|pos=17429|flags=K__|data_hash=CRC32:99c352e0
+packet|codec_type=audio|stream_index=0|pts=3514620|pts_time=39.051333|dts=3514620|dts_time=39.051333|duration=2090|duration_time=0.023222|size=374|pos=17792|flags=K__|data_hash=CRC32:65aba789
+packet|codec_type=audio|stream_index=0|pts=3516710|pts_time=39.074556|dts=3516710|dts_time=39.074556|duration=2090|duration_time=0.023222|size=365|pos=18166|flags=K__|data_hash=CRC32:245def8f
+packet|codec_type=audio|stream_index=0|pts=3518800|pts_time=39.097778|dts=3518800|dts_time=39.097778|duration=2090|duration_time=0.023222|size=394|pos=18531|flags=K__|data_hash=CRC32:5084699e
+packet|codec_type=audio|stream_index=0|pts=3520890|pts_time=39.121000|dts=3520890|dts_time=39.121000|duration=2090|duration_time=0.023222|size=353|pos=18925|flags=K__|data_hash=CRC32:81802260
+packet|codec_type=audio|stream_index=0|pts=3522980|pts_time=39.144222|dts=3522980|dts_time=39.144222|duration=2090|duration_time=0.023222|size=428|pos=19278|flags=K__|data_hash=CRC32:1ee470f2
+packet|codec_type=audio|stream_index=0|pts=3525069|pts_time=39.167433|dts=3525069|dts_time=39.167433|duration=2090|duration_time=0.023222|size=369|pos=19706|flags=K__|data_hash=CRC32:0cf541ad
+packet|codec_type=audio|stream_index=0|pts=3527159|pts_time=39.190656|dts=3527159|dts_time=39.190656|duration=2090|duration_time=0.023222|size=352|pos=20075|flags=K__|data_hash=CRC32:f8c1d4e8
+packet|codec_type=audio|stream_index=0|pts=3529249|pts_time=39.213878|dts=3529249|dts_time=39.213878|duration=2090|duration_time=0.023222|size=400|pos=20427|flags=K__|data_hash=CRC32:9394af89
+packet|codec_type=audio|stream_index=0|pts=3531339|pts_time=39.237100|dts=3531339|dts_time=39.237100|duration=2090|duration_time=0.023222|size=362|pos=20827|flags=K__|data_hash=CRC32:6e6c95cf
+packet|codec_type=audio|stream_index=0|pts=3533429|pts_time=39.260322|dts=3533429|dts_time=39.260322|duration=2090|duration_time=0.023222|size=396|pos=21189|flags=K__|data_hash=CRC32:e134ad64
+packet|codec_type=audio|stream_index=0|pts=3535518|pts_time=39.283533|dts=3535518|dts_time=39.283533|duration=2090|duration_time=0.023222|size=393|pos=21585|flags=K__|data_hash=CRC32:8be673f1
+packet|codec_type=audio|stream_index=0|pts=3537608|pts_time=39.306756|dts=3537608|dts_time=39.306756|duration=2090|duration_time=0.023222|size=353|pos=21978|flags=K__|data_hash=CRC32:fd068970
+packet|codec_type=audio|stream_index=0|pts=3539698|pts_time=39.329978|dts=3539698|dts_time=39.329978|duration=2090|duration_time=0.023222|size=396|pos=22331|flags=K__|data_hash=CRC32:a4204659
+packet|codec_type=audio|stream_index=0|pts=3541788|pts_time=39.353200|dts=3541788|dts_time=39.353200|duration=2090|duration_time=0.023222|size=379|pos=22727|flags=K__|data_hash=CRC32:28764b16
+packet|codec_type=audio|stream_index=0|pts=3543878|pts_time=39.376422|dts=3543878|dts_time=39.376422|duration=2090|duration_time=0.023222|size=384|pos=23106|flags=K__|data_hash=CRC32:087f79a3
+packet|codec_type=audio|stream_index=0|pts=3545967|pts_time=39.399633|dts=3545967|dts_time=39.399633|duration=2090|duration_time=0.023222|size=357|pos=23490|flags=K__|data_hash=CRC32:c6cee3f6
+packet|codec_type=audio|stream_index=0|pts=3548057|pts_time=39.422856|dts=3548057|dts_time=39.422856|duration=2090|duration_time=0.023222|size=401|pos=23847|flags=K__|data_hash=CRC32:aff37eb7
+packet|codec_type=audio|stream_index=0|pts=3550147|pts_time=39.446078|dts=3550147|dts_time=39.446078|duration=2090|duration_time=0.023222|size=358|pos=24248|flags=K__|data_hash=CRC32:930ec20c
+packet|codec_type=audio|stream_index=0|pts=3552237|pts_time=39.469300|dts=3552237|dts_time=39.469300|duration=2090|duration_time=0.023222|size=404|pos=24606|flags=K__|data_hash=CRC32:ed87be8c
+packet|codec_type=audio|stream_index=0|pts=3554327|pts_time=39.492522|dts=3554327|dts_time=39.492522|duration=2090|duration_time=0.023222|size=370|pos=25010|flags=K__|data_hash=CRC32:c7036091
+packet|codec_type=audio|stream_index=0|pts=3556416|pts_time=39.515733|dts=3556416|dts_time=39.515733|duration=2090|duration_time=0.023222|size=366|pos=25380|flags=K__|data_hash=CRC32:72ef3e91
+packet|codec_type=audio|stream_index=0|pts=3558506|pts_time=39.538956|dts=3558506|dts_time=39.538956|duration=2090|duration_time=0.023222|size=365|pos=25746|flags=K__|data_hash=CRC32:05f5a44a
+packet|codec_type=audio|stream_index=0|pts=3560596|pts_time=39.562178|dts=3560596|dts_time=39.562178|duration=2090|duration_time=0.023222|size=367|pos=26111|flags=K__|data_hash=CRC32:388ca65f
+packet|codec_type=audio|stream_index=0|pts=3562686|pts_time=39.585400|dts=3562686|dts_time=39.585400|duration=2090|duration_time=0.023222|size=403|pos=26478|flags=K__|data_hash=CRC32:9bbc8816
+packet|codec_type=audio|stream_index=0|pts=3564776|pts_time=39.608622|dts=3564776|dts_time=39.608622|duration=2090|duration_time=0.023222|size=368|pos=26881|flags=K__|data_hash=CRC32:0660a10d
+packet|codec_type=audio|stream_index=0|pts=3566865|pts_time=39.631833|dts=3566865|dts_time=39.631833|duration=2090|duration_time=0.023222|size=388|pos=27249|flags=K__|data_hash=CRC32:76f0191f
+packet|codec_type=audio|stream_index=0|pts=3568955|pts_time=39.655056|dts=3568955|dts_time=39.655056|duration=2090|duration_time=0.023222|size=361|pos=27637|flags=K__|data_hash=CRC32:d14107df
+packet|codec_type=audio|stream_index=0|pts=3571045|pts_time=39.678278|dts=3571045|dts_time=39.678278|duration=2090|duration_time=0.023222|size=380|pos=27998|flags=K__|data_hash=CRC32:5a4bfaa1
+packet|codec_type=audio|stream_index=0|pts=3573135|pts_time=39.701500|dts=3573135|dts_time=39.701500|duration=2090|duration_time=0.023222|size=381|pos=28378|flags=K__|data_hash=CRC32:3565436e
+packet|codec_type=audio|stream_index=0|pts=3575224|pts_time=39.724711|dts=3575224|dts_time=39.724711|duration=2090|duration_time=0.023222|size=362|pos=28759|flags=K__|data_hash=CRC32:7e88f30f
+packet|codec_type=audio|stream_index=0|pts=3577314|pts_time=39.747933|dts=3577314|dts_time=39.747933|duration=2090|duration_time=0.023222|size=406|pos=29121|flags=K__|data_hash=CRC32:6bb904a9
+packet|codec_type=audio|stream_index=0|pts=3579404|pts_time=39.771156|dts=3579404|dts_time=39.771156|duration=2090|duration_time=0.023222|size=365|pos=29527|flags=K__|data_hash=CRC32:fb889595
+packet|codec_type=audio|stream_index=0|pts=3581494|pts_time=39.794378|dts=3581494|dts_time=39.794378|duration=2090|duration_time=0.023222|size=384|pos=29892|flags=K__|data_hash=CRC32:c6e2f065
+packet|codec_type=audio|stream_index=0|pts=3583584|pts_time=39.817600|dts=3583584|dts_time=39.817600|duration=2090|duration_time=0.023222|size=364|pos=30276|flags=K__|data_hash=CRC32:1eafc85e
+packet|codec_type=audio|stream_index=0|pts=3585673|pts_time=39.840811|dts=3585673|dts_time=39.840811|duration=2090|duration_time=0.023222|size=400|pos=30640|flags=K__|data_hash=CRC32:cc280553
+packet|codec_type=audio|stream_index=0|pts=3587763|pts_time=39.864033|dts=3587763|dts_time=39.864033|duration=2090|duration_time=0.023222|size=383|pos=31040|flags=K__|data_hash=CRC32:46d3129c
+packet|codec_type=audio|stream_index=0|pts=3589853|pts_time=39.887256|dts=3589853|dts_time=39.887256|duration=2090|duration_time=0.023222|size=342|pos=31423|flags=K__|data_hash=CRC32:114b34eb
+packet|codec_type=audio|stream_index=0|pts=3591943|pts_time=39.910478|dts=3591943|dts_time=39.910478|duration=2090|duration_time=0.023222|size=437|pos=31765|flags=K__|data_hash=CRC32:e1e85144
+packet|codec_type=audio|stream_index=0|pts=3594033|pts_time=39.933700|dts=3594033|dts_time=39.933700|duration=2090|duration_time=0.023222|size=350|pos=32202|flags=K__|data_hash=CRC32:9a02bb70
+packet|codec_type=audio|stream_index=0|pts=3596122|pts_time=39.956911|dts=3596122|dts_time=39.956911|duration=2090|duration_time=0.023222|size=401|pos=32552|flags=K__|data_hash=CRC32:e3cf3e45
+packet|codec_type=audio|stream_index=0|pts=3598212|pts_time=39.980133|dts=3598212|dts_time=39.980133|duration=2090|duration_time=0.023222|size=394|pos=32953|flags=K__|data_hash=CRC32:ae8bc4b2
+packet|codec_type=audio|stream_index=0|pts=3600302|pts_time=40.003356|dts=3600302|dts_time=40.003356|duration=2090|duration_time=0.023222|size=345|pos=33347|flags=K__|data_hash=CRC32:7832c3d0
+packet|codec_type=audio|stream_index=0|pts=3602392|pts_time=40.026578|dts=3602392|dts_time=40.026578|duration=2090|duration_time=0.023222|size=410|pos=33692|flags=K__|data_hash=CRC32:df683be6
+packet|codec_type=audio|stream_index=0|pts=3604482|pts_time=40.049800|dts=3604482|dts_time=40.049800|duration=2090|duration_time=0.023222|size=375|pos=34102|flags=K__|data_hash=CRC32:34d7b41a
+packet|codec_type=audio|stream_index=0|pts=3606571|pts_time=40.073011|dts=3606571|dts_time=40.073011|duration=2090|duration_time=0.023222|size=374|pos=34477|flags=K__|data_hash=CRC32:8f4640d5
+packet|codec_type=audio|stream_index=0|pts=3608661|pts_time=40.096233|dts=3608661|dts_time=40.096233|duration=2090|duration_time=0.023222|size=354|pos=34851|flags=K__|data_hash=CRC32:e7d2863f
+packet|codec_type=audio|stream_index=0|pts=3610751|pts_time=40.119456|dts=3610751|dts_time=40.119456|duration=2090|duration_time=0.023222|size=396|pos=35205|flags=K__|data_hash=CRC32:66bd4930
+packet|codec_type=audio|stream_index=0|pts=3612841|pts_time=40.142678|dts=3612841|dts_time=40.142678|duration=2090|duration_time=0.023222|size=372|pos=35601|flags=K__|data_hash=CRC32:8a4ea872
+packet|codec_type=audio|stream_index=0|pts=3614931|pts_time=40.165900|dts=3614931|dts_time=40.165900|duration=2090|duration_time=0.023222|size=381|pos=35973|flags=K__|data_hash=CRC32:d64d85a8
+packet|codec_type=audio|stream_index=0|pts=3617020|pts_time=40.189111|dts=3617020|dts_time=40.189111|duration=2090|duration_time=0.023222|size=353|pos=36354|flags=K__|data_hash=CRC32:83beba28
+packet|codec_type=audio|stream_index=0|pts=3619110|pts_time=40.212333|dts=3619110|dts_time=40.212333|duration=2090|duration_time=0.023222|size=381|pos=36707|flags=K__|data_hash=CRC32:6f1a22c8
+packet|codec_type=audio|stream_index=0|pts=3621200|pts_time=40.235556|dts=3621200|dts_time=40.235556|duration=2090|duration_time=0.023222|size=383|pos=37088|flags=K__|data_hash=CRC32:75a208c1
+packet|codec_type=audio|stream_index=0|pts=3623290|pts_time=40.258778|dts=3623290|dts_time=40.258778|duration=2090|duration_time=0.023222|size=354|pos=37471|flags=K__|data_hash=CRC32:71efb40d
+packet|codec_type=audio|stream_index=0|pts=3625380|pts_time=40.282000|dts=3625380|dts_time=40.282000|duration=2090|duration_time=0.023222|size=419|pos=37825|flags=K__|data_hash=CRC32:a50c245a
+packet|codec_type=audio|stream_index=0|pts=3627469|pts_time=40.305211|dts=3627469|dts_time=40.305211|duration=2090|duration_time=0.023222|size=361|pos=38244|flags=K__|data_hash=CRC32:52b88d68
+packet|codec_type=audio|stream_index=0|pts=3629559|pts_time=40.328433|dts=3629559|dts_time=40.328433|duration=2090|duration_time=0.023222|size=384|pos=38605|flags=K__|data_hash=CRC32:dd8bf439
+packet|codec_type=audio|stream_index=0|pts=3631649|pts_time=40.351656|dts=3631649|dts_time=40.351656|duration=2090|duration_time=0.023222|size=363|pos=38989|flags=K__|data_hash=CRC32:d31ec44d
+packet|codec_type=audio|stream_index=0|pts=3633739|pts_time=40.374878|dts=3633739|dts_time=40.374878|duration=2090|duration_time=0.023222|size=389|pos=39352|flags=K__|data_hash=CRC32:3d0f896a
+packet|codec_type=audio|stream_index=0|pts=3635829|pts_time=40.398100|dts=3635829|dts_time=40.398100|duration=2090|duration_time=0.023222|size=380|pos=39741|flags=K__|data_hash=CRC32:163302e2
+packet|codec_type=audio|stream_index=0|pts=3637918|pts_time=40.421311|dts=3637918|dts_time=40.421311|duration=2090|duration_time=0.023222|size=353|pos=40121|flags=K__|data_hash=CRC32:29612204
+packet|codec_type=audio|stream_index=0|pts=3640008|pts_time=40.444533|dts=3640008|dts_time=40.444533|duration=2090|duration_time=0.023222|size=416|pos=40474|flags=K__|data_hash=CRC32:bb5ab61f
+packet|codec_type=audio|stream_index=0|pts=3642098|pts_time=40.467756|dts=3642098|dts_time=40.467756|duration=2090|duration_time=0.023222|size=358|pos=40890|flags=K__|data_hash=CRC32:58e5f54f
+packet|codec_type=audio|stream_index=0|pts=3644188|pts_time=40.490978|dts=3644188|dts_time=40.490978|duration=2090|duration_time=0.023222|size=399|pos=41248|flags=K__|data_hash=CRC32:be84d1e5
+packet|codec_type=audio|stream_index=0|pts=3646278|pts_time=40.514200|dts=3646278|dts_time=40.514200|duration=2090|duration_time=0.023222|size=396|pos=41647|flags=K__|data_hash=CRC32:65f493a0
+packet|codec_type=audio|stream_index=0|pts=3648367|pts_time=40.537411|dts=3648367|dts_time=40.537411|duration=2090|duration_time=0.023222|size=372|pos=42043|flags=K__|data_hash=CRC32:1654859d
+packet|codec_type=audio|stream_index=0|pts=3650457|pts_time=40.560633|dts=3650457|dts_time=40.560633|duration=2090|duration_time=0.023222|size=369|pos=42415|flags=K__|data_hash=CRC32:c730ed52
+packet|codec_type=audio|stream_index=0|pts=3652547|pts_time=40.583856|dts=3652547|dts_time=40.583856|duration=2090|duration_time=0.023222|size=343|pos=42784|flags=K__|data_hash=CRC32:148d0908
+packet|codec_type=audio|stream_index=0|pts=3654637|pts_time=40.607078|dts=3654637|dts_time=40.607078|duration=2090|duration_time=0.023222|size=417|pos=43127|flags=K__|data_hash=CRC32:2dc10245
+packet|codec_type=audio|stream_index=0|pts=3656727|pts_time=40.630300|dts=3656727|dts_time=40.630300|duration=2090|duration_time=0.023222|size=355|pos=43544|flags=K__|data_hash=CRC32:8d121e95
+packet|codec_type=audio|stream_index=0|pts=3658816|pts_time=40.653511|dts=3658816|dts_time=40.653511|duration=2090|duration_time=0.023222|size=410|pos=43899|flags=K__|data_hash=CRC32:ea6b90a8
+packet|codec_type=audio|stream_index=0|pts=3660906|pts_time=40.676733|dts=3660906|dts_time=40.676733|duration=2090|duration_time=0.023222|size=383|pos=44309|flags=K__|data_hash=CRC32:af456224
+packet|codec_type=audio|stream_index=0|pts=3662996|pts_time=40.699956|dts=3662996|dts_time=40.699956|duration=2090|duration_time=0.023222|size=368|pos=44692|flags=K__|data_hash=CRC32:5270e19c
+packet|codec_type=audio|stream_index=0|pts=3665086|pts_time=40.723178|dts=3665086|dts_time=40.723178|duration=2090|duration_time=0.023222|size=379|pos=45060|flags=K__|data_hash=CRC32:fb380ace
+packet|codec_type=audio|stream_index=0|pts=3667176|pts_time=40.746400|dts=3667176|dts_time=40.746400|duration=2090|duration_time=0.023222|size=351|pos=45439|flags=K__|data_hash=CRC32:7bba4016
+packet|codec_type=audio|stream_index=0|pts=3669265|pts_time=40.769611|dts=3669265|dts_time=40.769611|duration=2090|duration_time=0.023222|size=422|pos=45790|flags=K__|data_hash=CRC32:119eaa42
+stream|index=0|codec_name=aac|profile=1|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3416400|start_time=37.960000|duration_ts=N/A|duration=N/A|bit_rate=130405|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=122|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|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:variant_bitrate=140800|tag:album=foolol|tag:title=test title 2
+format|filename=bla|nb_streams=1|nb_programs=1|nb_stream_groups=0|format_name=hls|start_time=37.960000|duration=2.840000|size=74|bit_rate=208|probe_score=100
-- 
2.39.3 (Apple Git-145)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update.
  2024-03-26  0:56 [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update Romain Beauxis
  2024-03-26  0:56 ` [FFmpeg-devel] [PATCH 2/2] Add fate test for hls " Romain Beauxis
@ 2024-03-28 22:51 ` Romain Beauxis
  2024-03-29  8:44   ` Steven Liu
  2024-03-31 10:52   ` Liu Steven
  2024-04-07 10:44 ` Steven Liu
  2 siblings, 2 replies; 13+ messages in thread
From: Romain Beauxis @ 2024-03-28 22:51 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Mon, Mar 25, 2024, 19:58 Romain Beauxis <toots@rastageeks.org> wrote:

> This patch adds support for updating HLS metadata passed as ID3 frames.
>
> This seems like a pretty straight-forward improvement. Updating the
> metadaata of the first stream seems to be the mechanism is other places
> in the code and works as expected.
>


Hello!

Any interest in reviewing this?


---
>  libavformat/hls.c | 54 ++++++++++++++++++++++++++++-------------------
>  1 file changed, 32 insertions(+), 22 deletions(-)
>
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index f6b44c2e35..ba6634d57a 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -93,6 +93,12 @@ enum PlaylistType {
>      PLS_TYPE_VOD
>  };
>
> +#define ID3_PRIV_OWNER_TS "com.apple.streaming.transportStreamTimestamp"
> +#define ID3_PRIV_OWNER_AUDIO_SETUP "com.apple.streaming.audioDescription"
> +
> +#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX ID3_PRIV_OWNER_TS
> +#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX
> ID3_PRIV_OWNER_AUDIO_SETUP
> +
>  /*
>   * Each playlist has its own demuxer. If it currently is active,
>   * it has an open AVIOContext too, and potentially an AVPacket
> @@ -150,9 +156,7 @@ struct playlist {
>      int64_t id3_offset; /* in stream original tb */
>      uint8_t* id3_buf; /* temp buffer for id3 parsing */
>      unsigned int id3_buf_size;
> -    AVDictionary *id3_initial; /* data from first id3 tag */
> -    int id3_found; /* ID3 tag found at some point */
> -    int id3_changed; /* ID3 tag data has changed at some point */
> +    AVDictionary *last_id3; /* data from the last id3 tag */
>      ID3v2ExtraMeta *id3_deferred_extra; /* stored here until subdemuxer
> is opened */
>
>      HLSAudioSetupInfo audio_setup_info;
> @@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c)
>          av_freep(&pls->main_streams);
>          av_freep(&pls->renditions);
>          av_freep(&pls->id3_buf);
> -        av_dict_free(&pls->id3_initial);
> +        av_dict_free(&pls->last_id3);
>          ff_id3v2_free_extra_meta(&pls->id3_deferred_extra);
>          av_freep(&pls->init_sec_buf);
>          av_packet_free(&pls->pkt);
> @@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s,
> AVIOContext *pb,
>                        AVDictionary **metadata, int64_t *dts,
> HLSAudioSetupInfo *audio_setup_info,
>                        ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta
> **extra_meta)
>  {
> -    static const char id3_priv_owner_ts[] =
> "com.apple.streaming.transportStreamTimestamp";
> -    static const char id3_priv_owner_audio_setup[] =
> "com.apple.streaming.audioDescription";
>      ID3v2ExtraMeta *meta;
>
>      ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta);
>      for (meta = *extra_meta; meta; meta = meta->next) {
>          if (!strcmp(meta->tag, "PRIV")) {
>              ID3v2ExtraMetaPRIV *priv = &meta->data.priv;
> -            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
> id3_priv_owner_ts, 44)) {
> +            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
> ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) {
>                  /* 33-bit MPEG timestamp */
>                  int64_t ts = AV_RB64(priv->data);
>                  av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp
> %"PRId64"\n", ts);
> @@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s,
> AVIOContext *pb,
>                      *dts = ts;
>                  else
>                      av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio
> timestamp %"PRId64"\n", ts);
> -            } else if (priv->datasize >= 8 &&
> !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) {
> +            } else if (priv->datasize >= 8 &&
> +                       !av_strncasecmp(priv->owner,
> ID3_PRIV_OWNER_AUDIO_SETUP, 36) &&
> +                       audio_setup_info) {
>                  ff_hls_senc_read_audio_setup_info(audio_setup_info,
> priv->data, priv->datasize);
>              }
>          } else if (!strcmp(meta->tag, "APIC") && apic)
> @@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct playlist
> *pls, AVDictionary *metadata,
>  {
>      const AVDictionaryEntry *entry = NULL;
>      const AVDictionaryEntry *oldentry;
> +
>      /* check that no keys have changed values */
>      while ((entry = av_dict_iterate(metadata, entry))) {
> -        oldentry = av_dict_get(pls->id3_initial, entry->key, NULL,
> AV_DICT_MATCH_CASE);
> +        oldentry = av_dict_get(pls->last_id3, entry->key, NULL,
> AV_DICT_MATCH_CASE);
>          if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
>              return 1;
>      }
> @@ -1143,35 +1148,40 @@ static void handle_id3(AVIOContext *pb, struct
> playlist *pls)
>      ID3v2ExtraMetaAPIC *apic = NULL;
>      ID3v2ExtraMeta *extra_meta = NULL;
>      int64_t timestamp = AV_NOPTS_VALUE;
> +    // Only set audio_setup_info on first id3 chunk.
> +    HLSAudioSetupInfo *audio_setup_info = pls->last_id3 ? NULL :
> &pls->audio_setup_info;
>
> -    parse_id3(pls->ctx, pb, &metadata, &timestamp,
> &pls->audio_setup_info, &apic, &extra_meta);
> +    parse_id3(pls->ctx, pb, &metadata, &timestamp, audio_setup_info,
> &apic, &extra_meta);
>
> -    if (timestamp != AV_NOPTS_VALUE) {
> +    if (pls->id3_mpegts_timestamp == AV_NOPTS_VALUE && timestamp !=
> AV_NOPTS_VALUE) {
>          pls->id3_mpegts_timestamp = timestamp;
>          pls->id3_offset = 0;
>      }
>
> -    if (!pls->id3_found) {
> -        /* initial ID3 tags */
> -        av_assert0(!pls->id3_deferred_extra);
> -        pls->id3_found = 1;
> -
> +    if (id3_has_changed_values(pls, metadata, apic)) {
>          /* get picture attachment and set text metadata */
>          if (pls->ctx->nb_streams)
>              ff_id3v2_parse_apic(pls->ctx, extra_meta);
> -        else
> +        else {
> +            av_assert0(!pls->id3_deferred_extra);
>              /* demuxer not yet opened, defer picture attachment */
>              pls->id3_deferred_extra = extra_meta;
> +        }
>
>          ff_id3v2_parse_priv_dict(&metadata, extra_meta);
> +
> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_TS, NULL, 0);
> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_AUDIO_SETUP, NULL, 0);
> +
> +        av_dict_free(&pls->ctx->metadata);
>          av_dict_copy(&pls->ctx->metadata, metadata, 0);
> -        pls->id3_initial = metadata;
>
> +        if (pls->n_main_streams)
> +            av_dict_copy(&pls->main_streams[0]->metadata, metadata, 0);
> +
> +        if (pls->last_id3) av_dict_free(&pls->last_id3);
> +        pls->last_id3 = metadata;
>      } else {
> -        if (!pls->id3_changed && id3_has_changed_values(pls, metadata,
> apic)) {
> -            avpriv_report_missing_feature(pls->parent, "Changing ID3
> metadata in HLS audio elementary stream");
> -            pls->id3_changed = 1;
> -        }
>          av_dict_free(&metadata);
>      }
>
> --
> 2.39.3 (Apple Git-145)
>
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update.
  2024-03-28 22:51 ` [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 " Romain Beauxis
@ 2024-03-29  8:44   ` Steven Liu
  2024-03-31 10:52   ` Liu Steven
  1 sibling, 0 replies; 13+ messages in thread
From: Steven Liu @ 2024-03-29  8:44 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> 在 2024年3月29日,06:51,Romain Beauxis <toots@rastageeks.org> 写道:
> 
> On Mon, Mar 25, 2024, 19:58 Romain Beauxis <toots@rastageeks.org> wrote:
> 
>> This patch adds support for updating HLS metadata passed as ID3 frames.
>> 
>> This seems like a pretty straight-forward improvement. Updating the
>> metadaata of the first stream seems to be the mechanism is other places
>> in the code and works as expected.
>> 
> 
> 
> Hello!
> 
> Any interest in reviewing this?
Let me test these patchset need some days, Thanks

> 
> 
> ---
>> libavformat/hls.c | 54 ++++++++++++++++++++++++++++-------------------
>> 1 file changed, 32 insertions(+), 22 deletions(-)
>> 
>> diff --git a/libavformat/hls.c b/libavformat/hls.c
>> index f6b44c2e35..ba6634d57a 100644
>> --- a/libavformat/hls.c
>> +++ b/libavformat/hls.c
>> @@ -93,6 +93,12 @@ enum PlaylistType {
>>     PLS_TYPE_VOD
>> };
>> 
>> +#define ID3_PRIV_OWNER_TS "com.apple.streaming.transportStreamTimestamp"
>> +#define ID3_PRIV_OWNER_AUDIO_SETUP "com.apple.streaming.audioDescription"
>> +
>> +#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX ID3_PRIV_OWNER_TS
>> +#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX
>> ID3_PRIV_OWNER_AUDIO_SETUP
>> +
>> /*
>>  * Each playlist has its own demuxer. If it currently is active,
>>  * it has an open AVIOContext too, and potentially an AVPacket
>> @@ -150,9 +156,7 @@ struct playlist {
>>     int64_t id3_offset; /* in stream original tb */
>>     uint8_t* id3_buf; /* temp buffer for id3 parsing */
>>     unsigned int id3_buf_size;
>> -    AVDictionary *id3_initial; /* data from first id3 tag */
>> -    int id3_found; /* ID3 tag found at some point */
>> -    int id3_changed; /* ID3 tag data has changed at some point */
>> +    AVDictionary *last_id3; /* data from the last id3 tag */
>>     ID3v2ExtraMeta *id3_deferred_extra; /* stored here until subdemuxer
>> is opened */
>> 
>>     HLSAudioSetupInfo audio_setup_info;
>> @@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c)
>>         av_freep(&pls->main_streams);
>>         av_freep(&pls->renditions);
>>         av_freep(&pls->id3_buf);
>> -        av_dict_free(&pls->id3_initial);
>> +        av_dict_free(&pls->last_id3);
>>         ff_id3v2_free_extra_meta(&pls->id3_deferred_extra);
>>         av_freep(&pls->init_sec_buf);
>>         av_packet_free(&pls->pkt);
>> @@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s,
>> AVIOContext *pb,
>>                       AVDictionary **metadata, int64_t *dts,
>> HLSAudioSetupInfo *audio_setup_info,
>>                       ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta
>> **extra_meta)
>> {
>> -    static const char id3_priv_owner_ts[] =
>> "com.apple.streaming.transportStreamTimestamp";
>> -    static const char id3_priv_owner_audio_setup[] =
>> "com.apple.streaming.audioDescription";
>>     ID3v2ExtraMeta *meta;
>> 
>>     ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta);
>>     for (meta = *extra_meta; meta; meta = meta->next) {
>>         if (!strcmp(meta->tag, "PRIV")) {
>>             ID3v2ExtraMetaPRIV *priv = &meta->data.priv;
>> -            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
>> id3_priv_owner_ts, 44)) {
>> +            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
>> ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) {
>>                 /* 33-bit MPEG timestamp */
>>                 int64_t ts = AV_RB64(priv->data);
>>                 av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp
>> %"PRId64"\n", ts);
>> @@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s,
>> AVIOContext *pb,
>>                     *dts = ts;
>>                 else
>>                     av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio
>> timestamp %"PRId64"\n", ts);
>> -            } else if (priv->datasize >= 8 &&
>> !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) {
>> +            } else if (priv->datasize >= 8 &&
>> +                       !av_strncasecmp(priv->owner,
>> ID3_PRIV_OWNER_AUDIO_SETUP, 36) &&
>> +                       audio_setup_info) {
>>                 ff_hls_senc_read_audio_setup_info(audio_setup_info,
>> priv->data, priv->datasize);
>>             }
>>         } else if (!strcmp(meta->tag, "APIC") && apic)
>> @@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct playlist
>> *pls, AVDictionary *metadata,
>> {
>>     const AVDictionaryEntry *entry = NULL;
>>     const AVDictionaryEntry *oldentry;
>> +
>>     /* check that no keys have changed values */
>>     while ((entry = av_dict_iterate(metadata, entry))) {
>> -        oldentry = av_dict_get(pls->id3_initial, entry->key, NULL,
>> AV_DICT_MATCH_CASE);
>> +        oldentry = av_dict_get(pls->last_id3, entry->key, NULL,
>> AV_DICT_MATCH_CASE);
>>         if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
>>             return 1;
>>     }
>> @@ -1143,35 +1148,40 @@ static void handle_id3(AVIOContext *pb, struct
>> playlist *pls)
>>     ID3v2ExtraMetaAPIC *apic = NULL;
>>     ID3v2ExtraMeta *extra_meta = NULL;
>>     int64_t timestamp = AV_NOPTS_VALUE;
>> +    // Only set audio_setup_info on first id3 chunk.
>> +    HLSAudioSetupInfo *audio_setup_info = pls->last_id3 ? NULL :
>> &pls->audio_setup_info;
>> 
>> -    parse_id3(pls->ctx, pb, &metadata, &timestamp,
>> &pls->audio_setup_info, &apic, &extra_meta);
>> +    parse_id3(pls->ctx, pb, &metadata, &timestamp, audio_setup_info,
>> &apic, &extra_meta);
>> 
>> -    if (timestamp != AV_NOPTS_VALUE) {
>> +    if (pls->id3_mpegts_timestamp == AV_NOPTS_VALUE && timestamp !=
>> AV_NOPTS_VALUE) {
>>         pls->id3_mpegts_timestamp = timestamp;
>>         pls->id3_offset = 0;
>>     }
>> 
>> -    if (!pls->id3_found) {
>> -        /* initial ID3 tags */
>> -        av_assert0(!pls->id3_deferred_extra);
>> -        pls->id3_found = 1;
>> -
>> +    if (id3_has_changed_values(pls, metadata, apic)) {
>>         /* get picture attachment and set text metadata */
>>         if (pls->ctx->nb_streams)
>>             ff_id3v2_parse_apic(pls->ctx, extra_meta);
>> -        else
>> +        else {
>> +            av_assert0(!pls->id3_deferred_extra);
>>             /* demuxer not yet opened, defer picture attachment */
>>             pls->id3_deferred_extra = extra_meta;
>> +        }
>> 
>>         ff_id3v2_parse_priv_dict(&metadata, extra_meta);
>> +
>> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_TS, NULL, 0);
>> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_AUDIO_SETUP, NULL, 0);
>> +
>> +        av_dict_free(&pls->ctx->metadata);
>>         av_dict_copy(&pls->ctx->metadata, metadata, 0);
>> -        pls->id3_initial = metadata;
>> 
>> +        if (pls->n_main_streams)
>> +            av_dict_copy(&pls->main_streams[0]->metadata, metadata, 0);
>> +
>> +        if (pls->last_id3) av_dict_free(&pls->last_id3);
>> +        pls->last_id3 = metadata;
>>     } else {
>> -        if (!pls->id3_changed && id3_has_changed_values(pls, metadata,
>> apic)) {
>> -            avpriv_report_missing_feature(pls->parent, "Changing ID3
>> metadata in HLS audio elementary stream");
>> -            pls->id3_changed = 1;
>> -        }
>>         av_dict_free(&metadata);
>>     }
>> 
>> --
>> 2.39.3 (Apple Git-145)
>> 
>> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update.
  2024-03-28 22:51 ` [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 " Romain Beauxis
  2024-03-29  8:44   ` Steven Liu
@ 2024-03-31 10:52   ` Liu Steven
  2024-03-31 17:46     ` Romain Beauxis
  1 sibling, 1 reply; 13+ messages in thread
From: Liu Steven @ 2024-03-31 10:52 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Liu Steven



> On Mar 29, 2024, at 06:51, Romain Beauxis <toots@rastageeks.org> wrote:
> 
> On Mon, Mar 25, 2024, 19:58 Romain Beauxis <toots@rastageeks.org> wrote:
> 
>> This patch adds support for updating HLS metadata passed as ID3 frames.
>> 
>> This seems like a pretty straight-forward improvement. Updating the
>> metadaata of the first stream seems to be the mechanism is other places
>> in the code and works as expected.
>> 
> 
> 
> Hello!
> 
> Any interest in reviewing this?

Patchset looks good to me, looks better than before patch.
> 
> 
> ---
>> libavformat/hls.c | 54 ++++++++++++++++++++++++++++-------------------
>> 1 file changed, 32 insertions(+), 22 deletions(-)
>> 
>> diff --git a/libavformat/hls.c b/libavformat/hls.c
>> index f6b44c2e35..ba6634d57a 100644
>> --- a/libavformat/hls.c
>> +++ b/libavformat/hls.c
>> @@ -93,6 +93,12 @@ enum PlaylistType {
>>     PLS_TYPE_VOD
>> };
>> 
>> +#define ID3_PRIV_OWNER_TS "com.apple.streaming.transportStreamTimestamp"
>> +#define ID3_PRIV_OWNER_AUDIO_SETUP "com.apple.streaming.audioDescription"
>> +
>> +#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX ID3_PRIV_OWNER_TS
>> +#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX
>> ID3_PRIV_OWNER_AUDIO_SETUP
>> +
>> /*
>>  * Each playlist has its own demuxer. If it currently is active,
>>  * it has an open AVIOContext too, and potentially an AVPacket
>> @@ -150,9 +156,7 @@ struct playlist {
>>     int64_t id3_offset; /* in stream original tb */
>>     uint8_t* id3_buf; /* temp buffer for id3 parsing */
>>     unsigned int id3_buf_size;
>> -    AVDictionary *id3_initial; /* data from first id3 tag */
>> -    int id3_found; /* ID3 tag found at some point */
>> -    int id3_changed; /* ID3 tag data has changed at some point */
>> +    AVDictionary *last_id3; /* data from the last id3 tag */
>>     ID3v2ExtraMeta *id3_deferred_extra; /* stored here until subdemuxer
>> is opened */
>> 
>>     HLSAudioSetupInfo audio_setup_info;
>> @@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c)
>>         av_freep(&pls->main_streams);
>>         av_freep(&pls->renditions);
>>         av_freep(&pls->id3_buf);
>> -        av_dict_free(&pls->id3_initial);
>> +        av_dict_free(&pls->last_id3);
>>         ff_id3v2_free_extra_meta(&pls->id3_deferred_extra);
>>         av_freep(&pls->init_sec_buf);
>>         av_packet_free(&pls->pkt);
>> @@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s,
>> AVIOContext *pb,
>>                       AVDictionary **metadata, int64_t *dts,
>> HLSAudioSetupInfo *audio_setup_info,
>>                       ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta
>> **extra_meta)
>> {
>> -    static const char id3_priv_owner_ts[] =
>> "com.apple.streaming.transportStreamTimestamp";
>> -    static const char id3_priv_owner_audio_setup[] =
>> "com.apple.streaming.audioDescription";
>>     ID3v2ExtraMeta *meta;
>> 
>>     ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta);
>>     for (meta = *extra_meta; meta; meta = meta->next) {
>>         if (!strcmp(meta->tag, "PRIV")) {
>>             ID3v2ExtraMetaPRIV *priv = &meta->data.priv;
>> -            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
>> id3_priv_owner_ts, 44)) {
>> +            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
>> ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) {
>>                 /* 33-bit MPEG timestamp */
>>                 int64_t ts = AV_RB64(priv->data);
>>                 av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp
>> %"PRId64"\n", ts);
>> @@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s,
>> AVIOContext *pb,
>>                     *dts = ts;
>>                 else
>>                     av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio
>> timestamp %"PRId64"\n", ts);
>> -            } else if (priv->datasize >= 8 &&
>> !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) {
>> +            } else if (priv->datasize >= 8 &&
>> +                       !av_strncasecmp(priv->owner,
>> ID3_PRIV_OWNER_AUDIO_SETUP, 36) &&
>> +                       audio_setup_info) {
>>                 ff_hls_senc_read_audio_setup_info(audio_setup_info,
>> priv->data, priv->datasize);
>>             }
>>         } else if (!strcmp(meta->tag, "APIC") && apic)
>> @@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct playlist
>> *pls, AVDictionary *metadata,
>> {
>>     const AVDictionaryEntry *entry = NULL;
>>     const AVDictionaryEntry *oldentry;
>> +
>>     /* check that no keys have changed values */
>>     while ((entry = av_dict_iterate(metadata, entry))) {
>> -        oldentry = av_dict_get(pls->id3_initial, entry->key, NULL,
>> AV_DICT_MATCH_CASE);
>> +        oldentry = av_dict_get(pls->last_id3, entry->key, NULL,
>> AV_DICT_MATCH_CASE);
>>         if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
>>             return 1;
>>     }
>> @@ -1143,35 +1148,40 @@ static void handle_id3(AVIOContext *pb, struct
>> playlist *pls)
>>     ID3v2ExtraMetaAPIC *apic = NULL;
>>     ID3v2ExtraMeta *extra_meta = NULL;
>>     int64_t timestamp = AV_NOPTS_VALUE;
>> +    // Only set audio_setup_info on first id3 chunk.
>> +    HLSAudioSetupInfo *audio_setup_info = pls->last_id3 ? NULL :
>> &pls->audio_setup_info;
>> 
>> -    parse_id3(pls->ctx, pb, &metadata, &timestamp,
>> &pls->audio_setup_info, &apic, &extra_meta);
>> +    parse_id3(pls->ctx, pb, &metadata, &timestamp, audio_setup_info,
>> &apic, &extra_meta);
>> 
>> -    if (timestamp != AV_NOPTS_VALUE) {
>> +    if (pls->id3_mpegts_timestamp == AV_NOPTS_VALUE && timestamp !=
>> AV_NOPTS_VALUE) {
>>         pls->id3_mpegts_timestamp = timestamp;
>>         pls->id3_offset = 0;
>>     }
>> 
>> -    if (!pls->id3_found) {
>> -        /* initial ID3 tags */
>> -        av_assert0(!pls->id3_deferred_extra);
>> -        pls->id3_found = 1;
>> -
>> +    if (id3_has_changed_values(pls, metadata, apic)) {
>>         /* get picture attachment and set text metadata */
>>         if (pls->ctx->nb_streams)
>>             ff_id3v2_parse_apic(pls->ctx, extra_meta);
>> -        else
>> +        else {
>> +            av_assert0(!pls->id3_deferred_extra);
>>             /* demuxer not yet opened, defer picture attachment */
>>             pls->id3_deferred_extra = extra_meta;
>> +        }
>> 
>>         ff_id3v2_parse_priv_dict(&metadata, extra_meta);
>> +
>> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_TS, NULL, 0);
>> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_AUDIO_SETUP, NULL, 0);
>> +
>> +        av_dict_free(&pls->ctx->metadata);
>>         av_dict_copy(&pls->ctx->metadata, metadata, 0);
>> -        pls->id3_initial = metadata;
>> 
>> +        if (pls->n_main_streams)
>> +            av_dict_copy(&pls->main_streams[0]->metadata, metadata, 0);
>> +
>> +        if (pls->last_id3) av_dict_free(&pls->last_id3);
>> +        pls->last_id3 = metadata;
>>     } else {
>> -        if (!pls->id3_changed && id3_has_changed_values(pls, metadata,
>> apic)) {
>> -            avpriv_report_missing_feature(pls->parent, "Changing ID3
>> metadata in HLS audio elementary stream");
>> -            pls->id3_changed = 1;
>> -        }
>>         av_dict_free(&metadata);
>>     }
>> 
>> --
>> 2.39.3 (Apple Git-145)
>> 
>> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> 

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update.
  2024-03-31 10:52   ` Liu Steven
@ 2024-03-31 17:46     ` Romain Beauxis
  2024-04-06 17:48       ` Romain Beauxis
  0 siblings, 1 reply; 13+ messages in thread
From: Romain Beauxis @ 2024-03-31 17:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Liu Steven

On Sun, Mar 31, 2024, 05:52 Liu Steven <lq@chinaffmpeg.org> wrote:

>
>
> > On Mar 29, 2024, at 06:51, Romain Beauxis <toots@rastageeks.org> wrote:
> >
> > On Mon, Mar 25, 2024, 19:58 Romain Beauxis <toots@rastageeks.org> wrote:
> >
> >> This patch adds support for updating HLS metadata passed as ID3 frames.
> >>
> >> This seems like a pretty straight-forward improvement. Updating the
> >> metadaata of the first stream seems to be the mechanism is other places
> >> in the code and works as expected.
> >>
> >
> >
> > Hello!
> >
> > Any interest in reviewing this?
>
> Patchset looks good to me, looks better than before patch.
>

Great! Happy to provide the fate samples too.


> ---
> >> libavformat/hls.c | 54 ++++++++++++++++++++++++++++-------------------
> >> 1 file changed, 32 insertions(+), 22 deletions(-)
> >>
> >> diff --git a/libavformat/hls.c b/libavformat/hls.c
> >> index f6b44c2e35..ba6634d57a 100644
> >> --- a/libavformat/hls.c
> >> +++ b/libavformat/hls.c
> >> @@ -93,6 +93,12 @@ enum PlaylistType {
> >>     PLS_TYPE_VOD
> >> };
> >>
> >> +#define ID3_PRIV_OWNER_TS
> "com.apple.streaming.transportStreamTimestamp"
> >> +#define ID3_PRIV_OWNER_AUDIO_SETUP
> "com.apple.streaming.audioDescription"
> >> +
> >> +#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX
> ID3_PRIV_OWNER_TS
> >> +#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX
> >> ID3_PRIV_OWNER_AUDIO_SETUP
> >> +
> >> /*
> >>  * Each playlist has its own demuxer. If it currently is active,
> >>  * it has an open AVIOContext too, and potentially an AVPacket
> >> @@ -150,9 +156,7 @@ struct playlist {
> >>     int64_t id3_offset; /* in stream original tb */
> >>     uint8_t* id3_buf; /* temp buffer for id3 parsing */
> >>     unsigned int id3_buf_size;
> >> -    AVDictionary *id3_initial; /* data from first id3 tag */
> >> -    int id3_found; /* ID3 tag found at some point */
> >> -    int id3_changed; /* ID3 tag data has changed at some point */
> >> +    AVDictionary *last_id3; /* data from the last id3 tag */
> >>     ID3v2ExtraMeta *id3_deferred_extra; /* stored here until subdemuxer
> >> is opened */
> >>
> >>     HLSAudioSetupInfo audio_setup_info;
> >> @@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c)
> >>         av_freep(&pls->main_streams);
> >>         av_freep(&pls->renditions);
> >>         av_freep(&pls->id3_buf);
> >> -        av_dict_free(&pls->id3_initial);
> >> +        av_dict_free(&pls->last_id3);
> >>         ff_id3v2_free_extra_meta(&pls->id3_deferred_extra);
> >>         av_freep(&pls->init_sec_buf);
> >>         av_packet_free(&pls->pkt);
> >> @@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s,
> >> AVIOContext *pb,
> >>                       AVDictionary **metadata, int64_t *dts,
> >> HLSAudioSetupInfo *audio_setup_info,
> >>                       ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta
> >> **extra_meta)
> >> {
> >> -    static const char id3_priv_owner_ts[] =
> >> "com.apple.streaming.transportStreamTimestamp";
> >> -    static const char id3_priv_owner_audio_setup[] =
> >> "com.apple.streaming.audioDescription";
> >>     ID3v2ExtraMeta *meta;
> >>
> >>     ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta);
> >>     for (meta = *extra_meta; meta; meta = meta->next) {
> >>         if (!strcmp(meta->tag, "PRIV")) {
> >>             ID3v2ExtraMetaPRIV *priv = &meta->data.priv;
> >> -            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
> >> id3_priv_owner_ts, 44)) {
> >> +            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
> >> ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) {
> >>                 /* 33-bit MPEG timestamp */
> >>                 int64_t ts = AV_RB64(priv->data);
> >>                 av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp
> >> %"PRId64"\n", ts);
> >> @@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s,
> >> AVIOContext *pb,
> >>                     *dts = ts;
> >>                 else
> >>                     av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio
> >> timestamp %"PRId64"\n", ts);
> >> -            } else if (priv->datasize >= 8 &&
> >> !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) {
> >> +            } else if (priv->datasize >= 8 &&
> >> +                       !av_strncasecmp(priv->owner,
> >> ID3_PRIV_OWNER_AUDIO_SETUP, 36) &&
> >> +                       audio_setup_info) {
> >>                 ff_hls_senc_read_audio_setup_info(audio_setup_info,
> >> priv->data, priv->datasize);
> >>             }
> >>         } else if (!strcmp(meta->tag, "APIC") && apic)
> >> @@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct playlist
> >> *pls, AVDictionary *metadata,
> >> {
> >>     const AVDictionaryEntry *entry = NULL;
> >>     const AVDictionaryEntry *oldentry;
> >> +
> >>     /* check that no keys have changed values */
> >>     while ((entry = av_dict_iterate(metadata, entry))) {
> >> -        oldentry = av_dict_get(pls->id3_initial, entry->key, NULL,
> >> AV_DICT_MATCH_CASE);
> >> +        oldentry = av_dict_get(pls->last_id3, entry->key, NULL,
> >> AV_DICT_MATCH_CASE);
> >>         if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
> >>             return 1;
> >>     }
> >> @@ -1143,35 +1148,40 @@ static void handle_id3(AVIOContext *pb, struct
> >> playlist *pls)
> >>     ID3v2ExtraMetaAPIC *apic = NULL;
> >>     ID3v2ExtraMeta *extra_meta = NULL;
> >>     int64_t timestamp = AV_NOPTS_VALUE;
> >> +    // Only set audio_setup_info on first id3 chunk.
> >> +    HLSAudioSetupInfo *audio_setup_info = pls->last_id3 ? NULL :
> >> &pls->audio_setup_info;
> >>
> >> -    parse_id3(pls->ctx, pb, &metadata, &timestamp,
> >> &pls->audio_setup_info, &apic, &extra_meta);
> >> +    parse_id3(pls->ctx, pb, &metadata, &timestamp, audio_setup_info,
> >> &apic, &extra_meta);
> >>
> >> -    if (timestamp != AV_NOPTS_VALUE) {
> >> +    if (pls->id3_mpegts_timestamp == AV_NOPTS_VALUE && timestamp !=
> >> AV_NOPTS_VALUE) {
> >>         pls->id3_mpegts_timestamp = timestamp;
> >>         pls->id3_offset = 0;
> >>     }
> >>
> >> -    if (!pls->id3_found) {
> >> -        /* initial ID3 tags */
> >> -        av_assert0(!pls->id3_deferred_extra);
> >> -        pls->id3_found = 1;
> >> -
> >> +    if (id3_has_changed_values(pls, metadata, apic)) {
> >>         /* get picture attachment and set text metadata */
> >>         if (pls->ctx->nb_streams)
> >>             ff_id3v2_parse_apic(pls->ctx, extra_meta);
> >> -        else
> >> +        else {
> >> +            av_assert0(!pls->id3_deferred_extra);
> >>             /* demuxer not yet opened, defer picture attachment */
> >>             pls->id3_deferred_extra = extra_meta;
> >> +        }
> >>
> >>         ff_id3v2_parse_priv_dict(&metadata, extra_meta);
> >> +
> >> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_TS, NULL, 0);
> >> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_AUDIO_SETUP, NULL, 0);
> >> +
> >> +        av_dict_free(&pls->ctx->metadata);
> >>         av_dict_copy(&pls->ctx->metadata, metadata, 0);
> >> -        pls->id3_initial = metadata;
> >>
> >> +        if (pls->n_main_streams)
> >> +            av_dict_copy(&pls->main_streams[0]->metadata, metadata, 0);
> >> +
> >> +        if (pls->last_id3) av_dict_free(&pls->last_id3);
> >> +        pls->last_id3 = metadata;
> >>     } else {
> >> -        if (!pls->id3_changed && id3_has_changed_values(pls, metadata,
> >> apic)) {
> >> -            avpriv_report_missing_feature(pls->parent, "Changing ID3
> >> metadata in HLS audio elementary stream");
> >> -            pls->id3_changed = 1;
> >> -        }
> >>         av_dict_free(&metadata);
> >>     }
> >>
> >> --
> >> 2.39.3 (Apple Git-145)
> >>
> >>
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> >
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update.
  2024-03-31 17:46     ` Romain Beauxis
@ 2024-04-06 17:48       ` Romain Beauxis
  0 siblings, 0 replies; 13+ messages in thread
From: Romain Beauxis @ 2024-04-06 17:48 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Liu Steven

On Sun, Mar 31, 2024, 12:46 Romain Beauxis <romain.beauxis@gmail.com> wrote:

>
>
> On Sun, Mar 31, 2024, 05:52 Liu Steven <lq@chinaffmpeg.org> wrote:
>
>>
>>
>> > On Mar 29, 2024, at 06:51, Romain Beauxis <toots@rastageeks.org> wrote:
>> >
>> > On Mon, Mar 25, 2024, 19:58 Romain Beauxis <toots@rastageeks.org>
>> wrote:
>> >
>> >> This patch adds support for updating HLS metadata passed as ID3 frames.
>> >>
>> >> This seems like a pretty straight-forward improvement. Updating the
>> >> metadaata of the first stream seems to be the mechanism is other places
>> >> in the code and works as expected.
>> >>
>> >
>> >
>> > Hello!
>> >
>> > Any interest in reviewing this?
>>
>> Patchset looks good to me, looks better than before patch.
>>
>
> Great! Happy to provide the fate samples too.
>
>
Hi!

Any update on this?

Let me know if I can do anything to help!




> > ---
>> >> libavformat/hls.c | 54 ++++++++++++++++++++++++++++-------------------
>> >> 1 file changed, 32 insertions(+), 22 deletions(-)
>> >>
>> >> diff --git a/libavformat/hls.c b/libavformat/hls.c
>> >> index f6b44c2e35..ba6634d57a 100644
>> >> --- a/libavformat/hls.c
>> >> +++ b/libavformat/hls.c
>> >> @@ -93,6 +93,12 @@ enum PlaylistType {
>> >>     PLS_TYPE_VOD
>> >> };
>> >>
>> >> +#define ID3_PRIV_OWNER_TS
>> "com.apple.streaming.transportStreamTimestamp"
>> >> +#define ID3_PRIV_OWNER_AUDIO_SETUP
>> "com.apple.streaming.audioDescription"
>> >> +
>> >> +#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX
>> ID3_PRIV_OWNER_TS
>> >> +#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX
>> >> ID3_PRIV_OWNER_AUDIO_SETUP
>> >> +
>> >> /*
>> >>  * Each playlist has its own demuxer. If it currently is active,
>> >>  * it has an open AVIOContext too, and potentially an AVPacket
>> >> @@ -150,9 +156,7 @@ struct playlist {
>> >>     int64_t id3_offset; /* in stream original tb */
>> >>     uint8_t* id3_buf; /* temp buffer for id3 parsing */
>> >>     unsigned int id3_buf_size;
>> >> -    AVDictionary *id3_initial; /* data from first id3 tag */
>> >> -    int id3_found; /* ID3 tag found at some point */
>> >> -    int id3_changed; /* ID3 tag data has changed at some point */
>> >> +    AVDictionary *last_id3; /* data from the last id3 tag */
>> >>     ID3v2ExtraMeta *id3_deferred_extra; /* stored here until subdemuxer
>> >> is opened */
>> >>
>> >>     HLSAudioSetupInfo audio_setup_info;
>> >> @@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c)
>> >>         av_freep(&pls->main_streams);
>> >>         av_freep(&pls->renditions);
>> >>         av_freep(&pls->id3_buf);
>> >> -        av_dict_free(&pls->id3_initial);
>> >> +        av_dict_free(&pls->last_id3);
>> >>         ff_id3v2_free_extra_meta(&pls->id3_deferred_extra);
>> >>         av_freep(&pls->init_sec_buf);
>> >>         av_packet_free(&pls->pkt);
>> >> @@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s,
>> >> AVIOContext *pb,
>> >>                       AVDictionary **metadata, int64_t *dts,
>> >> HLSAudioSetupInfo *audio_setup_info,
>> >>                       ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta
>> >> **extra_meta)
>> >> {
>> >> -    static const char id3_priv_owner_ts[] =
>> >> "com.apple.streaming.transportStreamTimestamp";
>> >> -    static const char id3_priv_owner_audio_setup[] =
>> >> "com.apple.streaming.audioDescription";
>> >>     ID3v2ExtraMeta *meta;
>> >>
>> >>     ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta);
>> >>     for (meta = *extra_meta; meta; meta = meta->next) {
>> >>         if (!strcmp(meta->tag, "PRIV")) {
>> >>             ID3v2ExtraMetaPRIV *priv = &meta->data.priv;
>> >> -            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
>> >> id3_priv_owner_ts, 44)) {
>> >> +            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
>> >> ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) {
>> >>                 /* 33-bit MPEG timestamp */
>> >>                 int64_t ts = AV_RB64(priv->data);
>> >>                 av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp
>> >> %"PRId64"\n", ts);
>> >> @@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s,
>> >> AVIOContext *pb,
>> >>                     *dts = ts;
>> >>                 else
>> >>                     av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio
>> >> timestamp %"PRId64"\n", ts);
>> >> -            } else if (priv->datasize >= 8 &&
>> >> !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) {
>> >> +            } else if (priv->datasize >= 8 &&
>> >> +                       !av_strncasecmp(priv->owner,
>> >> ID3_PRIV_OWNER_AUDIO_SETUP, 36) &&
>> >> +                       audio_setup_info) {
>> >>                 ff_hls_senc_read_audio_setup_info(audio_setup_info,
>> >> priv->data, priv->datasize);
>> >>             }
>> >>         } else if (!strcmp(meta->tag, "APIC") && apic)
>> >> @@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct
>> playlist
>> >> *pls, AVDictionary *metadata,
>> >> {
>> >>     const AVDictionaryEntry *entry = NULL;
>> >>     const AVDictionaryEntry *oldentry;
>> >> +
>> >>     /* check that no keys have changed values */
>> >>     while ((entry = av_dict_iterate(metadata, entry))) {
>> >> -        oldentry = av_dict_get(pls->id3_initial, entry->key, NULL,
>> >> AV_DICT_MATCH_CASE);
>> >> +        oldentry = av_dict_get(pls->last_id3, entry->key, NULL,
>> >> AV_DICT_MATCH_CASE);
>> >>         if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
>> >>             return 1;
>> >>     }
>> >> @@ -1143,35 +1148,40 @@ static void handle_id3(AVIOContext *pb, struct
>> >> playlist *pls)
>> >>     ID3v2ExtraMetaAPIC *apic = NULL;
>> >>     ID3v2ExtraMeta *extra_meta = NULL;
>> >>     int64_t timestamp = AV_NOPTS_VALUE;
>> >> +    // Only set audio_setup_info on first id3 chunk.
>> >> +    HLSAudioSetupInfo *audio_setup_info = pls->last_id3 ? NULL :
>> >> &pls->audio_setup_info;
>> >>
>> >> -    parse_id3(pls->ctx, pb, &metadata, &timestamp,
>> >> &pls->audio_setup_info, &apic, &extra_meta);
>> >> +    parse_id3(pls->ctx, pb, &metadata, &timestamp, audio_setup_info,
>> >> &apic, &extra_meta);
>> >>
>> >> -    if (timestamp != AV_NOPTS_VALUE) {
>> >> +    if (pls->id3_mpegts_timestamp == AV_NOPTS_VALUE && timestamp !=
>> >> AV_NOPTS_VALUE) {
>> >>         pls->id3_mpegts_timestamp = timestamp;
>> >>         pls->id3_offset = 0;
>> >>     }
>> >>
>> >> -    if (!pls->id3_found) {
>> >> -        /* initial ID3 tags */
>> >> -        av_assert0(!pls->id3_deferred_extra);
>> >> -        pls->id3_found = 1;
>> >> -
>> >> +    if (id3_has_changed_values(pls, metadata, apic)) {
>> >>         /* get picture attachment and set text metadata */
>> >>         if (pls->ctx->nb_streams)
>> >>             ff_id3v2_parse_apic(pls->ctx, extra_meta);
>> >> -        else
>> >> +        else {
>> >> +            av_assert0(!pls->id3_deferred_extra);
>> >>             /* demuxer not yet opened, defer picture attachment */
>> >>             pls->id3_deferred_extra = extra_meta;
>> >> +        }
>> >>
>> >>         ff_id3v2_parse_priv_dict(&metadata, extra_meta);
>> >> +
>> >> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_TS, NULL, 0);
>> >> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_AUDIO_SETUP, NULL, 0);
>> >> +
>> >> +        av_dict_free(&pls->ctx->metadata);
>> >>         av_dict_copy(&pls->ctx->metadata, metadata, 0);
>> >> -        pls->id3_initial = metadata;
>> >>
>> >> +        if (pls->n_main_streams)
>> >> +            av_dict_copy(&pls->main_streams[0]->metadata, metadata,
>> 0);
>> >> +
>> >> +        if (pls->last_id3) av_dict_free(&pls->last_id3);
>> >> +        pls->last_id3 = metadata;
>> >>     } else {
>> >> -        if (!pls->id3_changed && id3_has_changed_values(pls, metadata,
>> >> apic)) {
>> >> -            avpriv_report_missing_feature(pls->parent, "Changing ID3
>> >> metadata in HLS audio elementary stream");
>> >> -            pls->id3_changed = 1;
>> >> -        }
>> >>         av_dict_free(&metadata);
>> >>     }
>> >>
>> >> --
>> >> 2.39.3 (Apple Git-145)
>> >>
>> >>
>> > _______________________________________________
>> > ffmpeg-devel mailing list
>> > ffmpeg-devel@ffmpeg.org
>> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> >
>> > To unsubscribe, visit link above, or email
>> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>> >
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>>
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update.
  2024-03-26  0:56 [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update Romain Beauxis
  2024-03-26  0:56 ` [FFmpeg-devel] [PATCH 2/2] Add fate test for hls " Romain Beauxis
  2024-03-28 22:51 ` [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 " Romain Beauxis
@ 2024-04-07 10:44 ` Steven Liu
  2024-04-07 14:46   ` Romain Beauxis
  2 siblings, 1 reply; 13+ messages in thread
From: Steven Liu @ 2024-04-07 10:44 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Romain Beauxis <toots@rastageeks.org> 于2024年3月26日周二 08:58写道:
>
> This patch adds support for updating HLS metadata passed as ID3 frames.
>
> This seems like a pretty straight-forward improvement. Updating the
> metadaata of the first stream seems to be the mechanism is other places
> in the code and works as expected.
>
> ---
>  libavformat/hls.c | 54 ++++++++++++++++++++++++++++-------------------
>  1 file changed, 32 insertions(+), 22 deletions(-)
>
> diff --git a/libavformat/hls.c b/libavformat/hls.c
> index f6b44c2e35..ba6634d57a 100644
> --- a/libavformat/hls.c
> +++ b/libavformat/hls.c
> @@ -93,6 +93,12 @@ enum PlaylistType {
>      PLS_TYPE_VOD
>  };
>
> +#define ID3_PRIV_OWNER_TS "com.apple.streaming.transportStreamTimestamp"
> +#define ID3_PRIV_OWNER_AUDIO_SETUP "com.apple.streaming.audioDescription"
> +
> +#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX ID3_PRIV_OWNER_TS
> +#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX ID3_PRIV_OWNER_AUDIO_SETUP
> +
>  /*
>   * Each playlist has its own demuxer. If it currently is active,
>   * it has an open AVIOContext too, and potentially an AVPacket
> @@ -150,9 +156,7 @@ struct playlist {
>      int64_t id3_offset; /* in stream original tb */
>      uint8_t* id3_buf; /* temp buffer for id3 parsing */
>      unsigned int id3_buf_size;
> -    AVDictionary *id3_initial; /* data from first id3 tag */
> -    int id3_found; /* ID3 tag found at some point */
> -    int id3_changed; /* ID3 tag data has changed at some point */
> +    AVDictionary *last_id3; /* data from the last id3 tag */
>      ID3v2ExtraMeta *id3_deferred_extra; /* stored here until subdemuxer is opened */
>
>      HLSAudioSetupInfo audio_setup_info;
> @@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c)
>          av_freep(&pls->main_streams);
>          av_freep(&pls->renditions);
>          av_freep(&pls->id3_buf);
> -        av_dict_free(&pls->id3_initial);
> +        av_dict_free(&pls->last_id3);
>          ff_id3v2_free_extra_meta(&pls->id3_deferred_extra);
>          av_freep(&pls->init_sec_buf);
>          av_packet_free(&pls->pkt);
> @@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s, AVIOContext *pb,
>                        AVDictionary **metadata, int64_t *dts, HLSAudioSetupInfo *audio_setup_info,
>                        ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta **extra_meta)
>  {
> -    static const char id3_priv_owner_ts[] = "com.apple.streaming.transportStreamTimestamp";
> -    static const char id3_priv_owner_audio_setup[] = "com.apple.streaming.audioDescription";
>      ID3v2ExtraMeta *meta;
>
>      ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta);
>      for (meta = *extra_meta; meta; meta = meta->next) {
>          if (!strcmp(meta->tag, "PRIV")) {
>              ID3v2ExtraMetaPRIV *priv = &meta->data.priv;
> -            if (priv->datasize == 8 && !av_strncasecmp(priv->owner, id3_priv_owner_ts, 44)) {
> +            if (priv->datasize == 8 && !av_strncasecmp(priv->owner, ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) {
>                  /* 33-bit MPEG timestamp */
>                  int64_t ts = AV_RB64(priv->data);
>                  av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp %"PRId64"\n", ts);
> @@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s, AVIOContext *pb,
>                      *dts = ts;
>                  else
>                      av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio timestamp %"PRId64"\n", ts);
> -            } else if (priv->datasize >= 8 && !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) {
> +            } else if (priv->datasize >= 8 &&
> +                       !av_strncasecmp(priv->owner, ID3_PRIV_OWNER_AUDIO_SETUP, 36) &&
> +                       audio_setup_info) {
>                  ff_hls_senc_read_audio_setup_info(audio_setup_info, priv->data, priv->datasize);
>              }
>          } else if (!strcmp(meta->tag, "APIC") && apic)
> @@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct playlist *pls, AVDictionary *metadata,
>  {
>      const AVDictionaryEntry *entry = NULL;
>      const AVDictionaryEntry *oldentry;
> +
>      /* check that no keys have changed values */
>      while ((entry = av_dict_iterate(metadata, entry))) {
> -        oldentry = av_dict_get(pls->id3_initial, entry->key, NULL, AV_DICT_MATCH_CASE);
> +        oldentry = av_dict_get(pls->last_id3, entry->key, NULL, AV_DICT_MATCH_CASE);
>          if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
>              return 1;
>      }
> @@ -1143,35 +1148,40 @@ static void handle_id3(AVIOContext *pb, struct playlist *pls)
>      ID3v2ExtraMetaAPIC *apic = NULL;
>      ID3v2ExtraMeta *extra_meta = NULL;
>      int64_t timestamp = AV_NOPTS_VALUE;
> +    // Only set audio_setup_info on first id3 chunk.
> +    HLSAudioSetupInfo *audio_setup_info = pls->last_id3 ? NULL : &pls->audio_setup_info;
>
> -    parse_id3(pls->ctx, pb, &metadata, &timestamp, &pls->audio_setup_info, &apic, &extra_meta);
> +    parse_id3(pls->ctx, pb, &metadata, &timestamp, audio_setup_info, &apic, &extra_meta);
>
> -    if (timestamp != AV_NOPTS_VALUE) {
> +    if (pls->id3_mpegts_timestamp == AV_NOPTS_VALUE && timestamp != AV_NOPTS_VALUE) {
>          pls->id3_mpegts_timestamp = timestamp;
>          pls->id3_offset = 0;
>      }
>
> -    if (!pls->id3_found) {
> -        /* initial ID3 tags */
> -        av_assert0(!pls->id3_deferred_extra);
> -        pls->id3_found = 1;
> -
> +    if (id3_has_changed_values(pls, metadata, apic)) {
>          /* get picture attachment and set text metadata */
>          if (pls->ctx->nb_streams)
>              ff_id3v2_parse_apic(pls->ctx, extra_meta);
> -        else
> +        else {
> +            av_assert0(!pls->id3_deferred_extra);
>              /* demuxer not yet opened, defer picture attachment */
>              pls->id3_deferred_extra = extra_meta;
> +        }
>
>          ff_id3v2_parse_priv_dict(&metadata, extra_meta);
> +
> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_TS, NULL, 0);
> +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_AUDIO_SETUP, NULL, 0);
> +
> +        av_dict_free(&pls->ctx->metadata);
>          av_dict_copy(&pls->ctx->metadata, metadata, 0);
> -        pls->id3_initial = metadata;
>
> +        if (pls->n_main_streams)
> +            av_dict_copy(&pls->main_streams[0]->metadata, metadata, 0);
> +
> +        if (pls->last_id3) av_dict_free(&pls->last_id3);
> +        pls->last_id3 = metadata;
>      } else {
> -        if (!pls->id3_changed && id3_has_changed_values(pls, metadata, apic)) {
> -            avpriv_report_missing_feature(pls->parent, "Changing ID3 metadata in HLS audio elementary stream");
> -            pls->id3_changed = 1;
> -        }
>          av_dict_free(&metadata);
>      }
>
> --
> 2.39.3 (Apple Git-145)
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

I look at the second patch result:

make: *** [fate-hls-adts-meta-demux] Error 1
cpu_flags(raw) = 0x000813DB
cpu_flags_str(raw) = mmx mmxext sse sse2 sse3 ssse3 sse4.1 sse4.2 cmov aesni
cpu_flags(effective) = 0x000813DB
cpu_flags_str(effective) = mmx mmxext sse sse2 sse3 ssse3 sse4.1
sse4.2 cmov aesni
threads = 1 (cpu_count = 5)
make: Target 'fate' not remade because of errors.



https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240326005639.27000-2-toots@rastageeks.org/


Thanks
Steven
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update.
  2024-04-07 10:44 ` Steven Liu
@ 2024-04-07 14:46   ` Romain Beauxis
  2024-04-11 14:04     ` Romain Beauxis
  0 siblings, 1 reply; 13+ messages in thread
From: Romain Beauxis @ 2024-04-07 14:46 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Le dim. 7 avr. 2024 à 05:44, Steven Liu <lingjiujianke@gmail.com> a écrit :

> Romain Beauxis <toots@rastageeks.org> 于2024年3月26日周二 08:58写道:
> >
> > This patch adds support for updating HLS metadata passed as ID3 frames.
> >
> > This seems like a pretty straight-forward improvement. Updating the
> > metadaata of the first stream seems to be the mechanism is other places
> > in the code and works as expected.
> >
> > ---
> >  libavformat/hls.c | 54 ++++++++++++++++++++++++++++-------------------
> >  1 file changed, 32 insertions(+), 22 deletions(-)
> >
> > diff --git a/libavformat/hls.c b/libavformat/hls.c
> > index f6b44c2e35..ba6634d57a 100644
> > --- a/libavformat/hls.c
> > +++ b/libavformat/hls.c
> > @@ -93,6 +93,12 @@ enum PlaylistType {
> >      PLS_TYPE_VOD
> >  };
> >
> > +#define ID3_PRIV_OWNER_TS "com.apple.streaming.transportStreamTimestamp"
> > +#define ID3_PRIV_OWNER_AUDIO_SETUP
> "com.apple.streaming.audioDescription"
> > +
> > +#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX ID3_PRIV_OWNER_TS
> > +#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX
> ID3_PRIV_OWNER_AUDIO_SETUP
> > +
> >  /*
> >   * Each playlist has its own demuxer. If it currently is active,
> >   * it has an open AVIOContext too, and potentially an AVPacket
> > @@ -150,9 +156,7 @@ struct playlist {
> >      int64_t id3_offset; /* in stream original tb */
> >      uint8_t* id3_buf; /* temp buffer for id3 parsing */
> >      unsigned int id3_buf_size;
> > -    AVDictionary *id3_initial; /* data from first id3 tag */
> > -    int id3_found; /* ID3 tag found at some point */
> > -    int id3_changed; /* ID3 tag data has changed at some point */
> > +    AVDictionary *last_id3; /* data from the last id3 tag */
> >      ID3v2ExtraMeta *id3_deferred_extra; /* stored here until subdemuxer
> is opened */
> >
> >      HLSAudioSetupInfo audio_setup_info;
> > @@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c)
> >          av_freep(&pls->main_streams);
> >          av_freep(&pls->renditions);
> >          av_freep(&pls->id3_buf);
> > -        av_dict_free(&pls->id3_initial);
> > +        av_dict_free(&pls->last_id3);
> >          ff_id3v2_free_extra_meta(&pls->id3_deferred_extra);
> >          av_freep(&pls->init_sec_buf);
> >          av_packet_free(&pls->pkt);
> > @@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s,
> AVIOContext *pb,
> >                        AVDictionary **metadata, int64_t *dts,
> HLSAudioSetupInfo *audio_setup_info,
> >                        ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta
> **extra_meta)
> >  {
> > -    static const char id3_priv_owner_ts[] =
> "com.apple.streaming.transportStreamTimestamp";
> > -    static const char id3_priv_owner_audio_setup[] =
> "com.apple.streaming.audioDescription";
> >      ID3v2ExtraMeta *meta;
> >
> >      ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta);
> >      for (meta = *extra_meta; meta; meta = meta->next) {
> >          if (!strcmp(meta->tag, "PRIV")) {
> >              ID3v2ExtraMetaPRIV *priv = &meta->data.priv;
> > -            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
> id3_priv_owner_ts, 44)) {
> > +            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
> ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) {
> >                  /* 33-bit MPEG timestamp */
> >                  int64_t ts = AV_RB64(priv->data);
> >                  av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp
> %"PRId64"\n", ts);
> > @@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s,
> AVIOContext *pb,
> >                      *dts = ts;
> >                  else
> >                      av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio
> timestamp %"PRId64"\n", ts);
> > -            } else if (priv->datasize >= 8 &&
> !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) {
> > +            } else if (priv->datasize >= 8 &&
> > +                       !av_strncasecmp(priv->owner,
> ID3_PRIV_OWNER_AUDIO_SETUP, 36) &&
> > +                       audio_setup_info) {
> >                  ff_hls_senc_read_audio_setup_info(audio_setup_info,
> priv->data, priv->datasize);
> >              }
> >          } else if (!strcmp(meta->tag, "APIC") && apic)
> > @@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct playlist
> *pls, AVDictionary *metadata,
> >  {
> >      const AVDictionaryEntry *entry = NULL;
> >      const AVDictionaryEntry *oldentry;
> > +
> >      /* check that no keys have changed values */
> >      while ((entry = av_dict_iterate(metadata, entry))) {
> > -        oldentry = av_dict_get(pls->id3_initial, entry->key, NULL,
> AV_DICT_MATCH_CASE);
> > +        oldentry = av_dict_get(pls->last_id3, entry->key, NULL,
> AV_DICT_MATCH_CASE);
> >          if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
> >              return 1;
> >      }
> > @@ -1143,35 +1148,40 @@ static void handle_id3(AVIOContext *pb, struct
> playlist *pls)
> >      ID3v2ExtraMetaAPIC *apic = NULL;
> >      ID3v2ExtraMeta *extra_meta = NULL;
> >      int64_t timestamp = AV_NOPTS_VALUE;
> > +    // Only set audio_setup_info on first id3 chunk.
> > +    HLSAudioSetupInfo *audio_setup_info = pls->last_id3 ? NULL :
> &pls->audio_setup_info;
> >
> > -    parse_id3(pls->ctx, pb, &metadata, &timestamp,
> &pls->audio_setup_info, &apic, &extra_meta);
> > +    parse_id3(pls->ctx, pb, &metadata, &timestamp, audio_setup_info,
> &apic, &extra_meta);
> >
> > -    if (timestamp != AV_NOPTS_VALUE) {
> > +    if (pls->id3_mpegts_timestamp == AV_NOPTS_VALUE && timestamp !=
> AV_NOPTS_VALUE) {
> >          pls->id3_mpegts_timestamp = timestamp;
> >          pls->id3_offset = 0;
> >      }
> >
> > -    if (!pls->id3_found) {
> > -        /* initial ID3 tags */
> > -        av_assert0(!pls->id3_deferred_extra);
> > -        pls->id3_found = 1;
> > -
> > +    if (id3_has_changed_values(pls, metadata, apic)) {
> >          /* get picture attachment and set text metadata */
> >          if (pls->ctx->nb_streams)
> >              ff_id3v2_parse_apic(pls->ctx, extra_meta);
> > -        else
> > +        else {
> > +            av_assert0(!pls->id3_deferred_extra);
> >              /* demuxer not yet opened, defer picture attachment */
> >              pls->id3_deferred_extra = extra_meta;
> > +        }
> >
> >          ff_id3v2_parse_priv_dict(&metadata, extra_meta);
> > +
> > +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_TS, NULL, 0);
> > +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_AUDIO_SETUP, NULL, 0);
> > +
> > +        av_dict_free(&pls->ctx->metadata);
> >          av_dict_copy(&pls->ctx->metadata, metadata, 0);
> > -        pls->id3_initial = metadata;
> >
> > +        if (pls->n_main_streams)
> > +            av_dict_copy(&pls->main_streams[0]->metadata, metadata, 0);
> > +
> > +        if (pls->last_id3) av_dict_free(&pls->last_id3);
> > +        pls->last_id3 = metadata;
> >      } else {
> > -        if (!pls->id3_changed && id3_has_changed_values(pls, metadata,
> apic)) {
> > -            avpriv_report_missing_feature(pls->parent, "Changing ID3
> metadata in HLS audio elementary stream");
> > -            pls->id3_changed = 1;
> > -        }
> >          av_dict_free(&metadata);
> >      }
> >
> > --
> > 2.39.3 (Apple Git-145)
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
> I look at the second patch result:
>
> make: *** [fate-hls-adts-meta-demux] Error 1
> cpu_flags(raw) = 0x000813DB
> cpu_flags_str(raw) = mmx mmxext sse sse2 sse3 ssse3 sse4.1 sse4.2 cmov
> aesni
> cpu_flags(effective) = 0x000813DB
> cpu_flags_str(effective) = mmx mmxext sse sse2 sse3 ssse3 sse4.1
> sse4.2 cmov aesni
> threads = 1 (cpu_count = 5)
> make: Target 'fate' not remade because of errors.
>
>
>
>
> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240326005639.27000-2-toots@rastageeks.org/
>
>
Ok. The samples are here:
https://www.dropbox.com/scl/fo/1x74ztoa6yo9q49ignfnt/h?rlkey=xvg5nhgjr515gm6b375evm8n4&dl=0

If you place them under $FATE_SAMPLES/hls-adts-meta the test suite should
pass.

Are you the right person to also upload the samples?

Thanks for your time on this!


>
> Thanks
> Steven
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update.
  2024-04-07 14:46   ` Romain Beauxis
@ 2024-04-11 14:04     ` Romain Beauxis
  0 siblings, 0 replies; 13+ messages in thread
From: Romain Beauxis @ 2024-04-11 14:04 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: Steven Liu

Hi all,

Le dim. 7 avr. 2024 à 09:46, Romain Beauxis <romain.beauxis@gmail.com> a
écrit :

>
>
> Le dim. 7 avr. 2024 à 05:44, Steven Liu <lingjiujianke@gmail.com> a
> écrit :
>
>> Romain Beauxis <toots@rastageeks.org> 于2024年3月26日周二 08:58写道:
>> >
>> > This patch adds support for updating HLS metadata passed as ID3 frames.
>> >
>> > This seems like a pretty straight-forward improvement. Updating the
>> > metadaata of the first stream seems to be the mechanism is other places
>> > in the code and works as expected.
>>
>>
Would it be possible to get this patch committed? My understanding is that
it has been reviewed so this should be the next step?

The second patch adding FATE tests could be committed separately if it
causes issues. The samples for it are here:
https://www.dropbox.com/scl/fo/1x74ztoa6yo9q49ignfnt/h?rlkey=xvg5nhgjr515gm6b375evm8n4&dl=0
and
should be placed into a $FATE_SAMPLES/hls-adts-meta directory.

Thanks!


> > ---
>> >  libavformat/hls.c | 54 ++++++++++++++++++++++++++++-------------------
>> >  1 file changed, 32 insertions(+), 22 deletions(-)
>> >
>> > diff --git a/libavformat/hls.c b/libavformat/hls.c
>> > index f6b44c2e35..ba6634d57a 100644
>> > --- a/libavformat/hls.c
>> > +++ b/libavformat/hls.c
>> > @@ -93,6 +93,12 @@ enum PlaylistType {
>> >      PLS_TYPE_VOD
>> >  };
>> >
>> > +#define ID3_PRIV_OWNER_TS
>> "com.apple.streaming.transportStreamTimestamp"
>> > +#define ID3_PRIV_OWNER_AUDIO_SETUP
>> "com.apple.streaming.audioDescription"
>> > +
>> > +#define ID3v2_PRIV_OWNER_TS ID3v2_PRIV_METADATA_PREFIX
>> ID3_PRIV_OWNER_TS
>> > +#define ID3v2_PRIV_OWNER_AUDIO_SETUP ID3v2_PRIV_METADATA_PREFIX
>> ID3_PRIV_OWNER_AUDIO_SETUP
>> > +
>> >  /*
>> >   * Each playlist has its own demuxer. If it currently is active,
>> >   * it has an open AVIOContext too, and potentially an AVPacket
>> > @@ -150,9 +156,7 @@ struct playlist {
>> >      int64_t id3_offset; /* in stream original tb */
>> >      uint8_t* id3_buf; /* temp buffer for id3 parsing */
>> >      unsigned int id3_buf_size;
>> > -    AVDictionary *id3_initial; /* data from first id3 tag */
>> > -    int id3_found; /* ID3 tag found at some point */
>> > -    int id3_changed; /* ID3 tag data has changed at some point */
>> > +    AVDictionary *last_id3; /* data from the last id3 tag */
>> >      ID3v2ExtraMeta *id3_deferred_extra; /* stored here until
>> subdemuxer is opened */
>> >
>> >      HLSAudioSetupInfo audio_setup_info;
>> > @@ -270,7 +274,7 @@ static void free_playlist_list(HLSContext *c)
>> >          av_freep(&pls->main_streams);
>> >          av_freep(&pls->renditions);
>> >          av_freep(&pls->id3_buf);
>> > -        av_dict_free(&pls->id3_initial);
>> > +        av_dict_free(&pls->last_id3);
>> >          ff_id3v2_free_extra_meta(&pls->id3_deferred_extra);
>> >          av_freep(&pls->init_sec_buf);
>> >          av_packet_free(&pls->pkt);
>> > @@ -1083,15 +1087,13 @@ static void parse_id3(AVFormatContext *s,
>> AVIOContext *pb,
>> >                        AVDictionary **metadata, int64_t *dts,
>> HLSAudioSetupInfo *audio_setup_info,
>> >                        ID3v2ExtraMetaAPIC **apic, ID3v2ExtraMeta
>> **extra_meta)
>> >  {
>> > -    static const char id3_priv_owner_ts[] =
>> "com.apple.streaming.transportStreamTimestamp";
>> > -    static const char id3_priv_owner_audio_setup[] =
>> "com.apple.streaming.audioDescription";
>> >      ID3v2ExtraMeta *meta;
>> >
>> >      ff_id3v2_read_dict(pb, metadata, ID3v2_DEFAULT_MAGIC, extra_meta);
>> >      for (meta = *extra_meta; meta; meta = meta->next) {
>> >          if (!strcmp(meta->tag, "PRIV")) {
>> >              ID3v2ExtraMetaPRIV *priv = &meta->data.priv;
>> > -            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
>> id3_priv_owner_ts, 44)) {
>> > +            if (priv->datasize == 8 && !av_strncasecmp(priv->owner,
>> ID3_PRIV_OWNER_TS, strlen(ID3_PRIV_OWNER_TS))) {
>> >                  /* 33-bit MPEG timestamp */
>> >                  int64_t ts = AV_RB64(priv->data);
>> >                  av_log(s, AV_LOG_DEBUG, "HLS ID3 audio timestamp
>> %"PRId64"\n", ts);
>> > @@ -1099,7 +1101,9 @@ static void parse_id3(AVFormatContext *s,
>> AVIOContext *pb,
>> >                      *dts = ts;
>> >                  else
>> >                      av_log(s, AV_LOG_ERROR, "Invalid HLS ID3 audio
>> timestamp %"PRId64"\n", ts);
>> > -            } else if (priv->datasize >= 8 &&
>> !av_strncasecmp(priv->owner, id3_priv_owner_audio_setup, 36)) {
>> > +            } else if (priv->datasize >= 8 &&
>> > +                       !av_strncasecmp(priv->owner,
>> ID3_PRIV_OWNER_AUDIO_SETUP, 36) &&
>> > +                       audio_setup_info) {
>> >                  ff_hls_senc_read_audio_setup_info(audio_setup_info,
>> priv->data, priv->datasize);
>> >              }
>> >          } else if (!strcmp(meta->tag, "APIC") && apic)
>> > @@ -1113,9 +1117,10 @@ static int id3_has_changed_values(struct
>> playlist *pls, AVDictionary *metadata,
>> >  {
>> >      const AVDictionaryEntry *entry = NULL;
>> >      const AVDictionaryEntry *oldentry;
>> > +
>> >      /* check that no keys have changed values */
>> >      while ((entry = av_dict_iterate(metadata, entry))) {
>> > -        oldentry = av_dict_get(pls->id3_initial, entry->key, NULL,
>> AV_DICT_MATCH_CASE);
>> > +        oldentry = av_dict_get(pls->last_id3, entry->key, NULL,
>> AV_DICT_MATCH_CASE);
>> >          if (!oldentry || strcmp(oldentry->value, entry->value) != 0)
>> >              return 1;
>> >      }
>> > @@ -1143,35 +1148,40 @@ static void handle_id3(AVIOContext *pb, struct
>> playlist *pls)
>> >      ID3v2ExtraMetaAPIC *apic = NULL;
>> >      ID3v2ExtraMeta *extra_meta = NULL;
>> >      int64_t timestamp = AV_NOPTS_VALUE;
>> > +    // Only set audio_setup_info on first id3 chunk.
>> > +    HLSAudioSetupInfo *audio_setup_info = pls->last_id3 ? NULL :
>> &pls->audio_setup_info;
>> >
>> > -    parse_id3(pls->ctx, pb, &metadata, &timestamp,
>> &pls->audio_setup_info, &apic, &extra_meta);
>> > +    parse_id3(pls->ctx, pb, &metadata, &timestamp, audio_setup_info,
>> &apic, &extra_meta);
>> >
>> > -    if (timestamp != AV_NOPTS_VALUE) {
>> > +    if (pls->id3_mpegts_timestamp == AV_NOPTS_VALUE && timestamp !=
>> AV_NOPTS_VALUE) {
>> >          pls->id3_mpegts_timestamp = timestamp;
>> >          pls->id3_offset = 0;
>> >      }
>> >
>> > -    if (!pls->id3_found) {
>> > -        /* initial ID3 tags */
>> > -        av_assert0(!pls->id3_deferred_extra);
>> > -        pls->id3_found = 1;
>> > -
>> > +    if (id3_has_changed_values(pls, metadata, apic)) {
>> >          /* get picture attachment and set text metadata */
>> >          if (pls->ctx->nb_streams)
>> >              ff_id3v2_parse_apic(pls->ctx, extra_meta);
>> > -        else
>> > +        else {
>> > +            av_assert0(!pls->id3_deferred_extra);
>> >              /* demuxer not yet opened, defer picture attachment */
>> >              pls->id3_deferred_extra = extra_meta;
>> > +        }
>> >
>> >          ff_id3v2_parse_priv_dict(&metadata, extra_meta);
>> > +
>> > +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_TS, NULL, 0);
>> > +        av_dict_set(&metadata, ID3v2_PRIV_OWNER_AUDIO_SETUP, NULL, 0);
>> > +
>> > +        av_dict_free(&pls->ctx->metadata);
>> >          av_dict_copy(&pls->ctx->metadata, metadata, 0);
>> > -        pls->id3_initial = metadata;
>> >
>> > +        if (pls->n_main_streams)
>> > +            av_dict_copy(&pls->main_streams[0]->metadata, metadata, 0);
>> > +
>> > +        if (pls->last_id3) av_dict_free(&pls->last_id3);
>> > +        pls->last_id3 = metadata;
>> >      } else {
>> > -        if (!pls->id3_changed && id3_has_changed_values(pls, metadata,
>> apic)) {
>> > -            avpriv_report_missing_feature(pls->parent, "Changing ID3
>> metadata in HLS audio elementary stream");
>> > -            pls->id3_changed = 1;
>> > -        }
>> >          av_dict_free(&metadata);
>> >      }
>> >
>> > --
>> > 2.39.3 (Apple Git-145)
>> >
>> > _______________________________________________
>> > ffmpeg-devel mailing list
>> > ffmpeg-devel@ffmpeg.org
>> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> >
>> > To unsubscribe, visit link above, or email
>> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>>
>> I look at the second patch result:
>>
>> make: *** [fate-hls-adts-meta-demux] Error 1
>> cpu_flags(raw) = 0x000813DB
>> cpu_flags_str(raw) = mmx mmxext sse sse2 sse3 ssse3 sse4.1 sse4.2 cmov
>> aesni
>> cpu_flags(effective) = 0x000813DB
>> cpu_flags_str(effective) = mmx mmxext sse sse2 sse3 ssse3 sse4.1
>> sse4.2 cmov aesni
>> threads = 1 (cpu_count = 5)
>> make: Target 'fate' not remade because of errors.
>>
>>
>>
>>
>> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20240326005639.27000-2-toots@rastageeks.org/
>>
>>
> Ok. The samples are here:
> https://www.dropbox.com/scl/fo/1x74ztoa6yo9q49ignfnt/h?rlkey=xvg5nhgjr515gm6b375evm8n4&dl=0
>
> If you place them under $FATE_SAMPLES/hls-adts-meta the test suite should
> pass.
>
> Are you the right person to also upload the samples?
>
> Thanks for your time on this!
>
>
>>
>> Thanks
>> Steven
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>>
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 2/2] Add fate test for hls metadata update.
  2024-03-26  0:56 ` [FFmpeg-devel] [PATCH 2/2] Add fate test for hls " Romain Beauxis
@ 2024-04-11 14:17   ` Andreas Rheinhardt
  2024-04-12 18:37     ` Romain Beauxis
  0 siblings, 1 reply; 13+ messages in thread
From: Andreas Rheinhardt @ 2024-04-11 14:17 UTC (permalink / raw)
  To: ffmpeg-devel

Romain Beauxis:
> This patch adds a FATE test for the new HLS metadata update. The fate
> sample consists of a two segment AAC hls stream. The first segment has
> test title 1 as title metadata while the second has test title 2.
> 
> In the log, we can see that test title 2 is reported for the stream,
> indicating that the metadata was updated with the second segment.
> 
> Romain
> ---
>  tests/fate/demux.mak               |   3 +
>  tests/ref/fate/hls-adts-meta-demux | 124 +++++++++++++++++++++++++++++
>  2 files changed, 127 insertions(+)
>  create mode 100644 tests/ref/fate/hls-adts-meta-demux
> 
> diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak
> index d9b9045f0b..7243c2c163 100644
> --- a/tests/fate/demux.mak
> +++ b/tests/fate/demux.mak
> @@ -160,6 +160,9 @@ fate-ts-demux: CMD = ffprobe_demux $(TARGET_SAMPLES)/ac3/mp3ac325-4864-small.ts
>  FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-ts-timed-id3-demux
>  fate-ts-timed-id3-demux: CMD = ffprobe_demux $(TARGET_SAMPLES)/mpegts/id3.ts
>  
> +FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-hls-adts-meta-demux
> +fate-fate-hls-adts-meta-demux: CMD = ffprobe_demux $(TARGET_SAMPLES)/hls-adts-meta/stream.m3u8
> +
>  FATE_SAMPLES_DEMUX += $(FATE_SAMPLES_DEMUX-yes)
>  FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_DEMUX)
>  FATE_FFPROBE_DEMUX   += $(FATE_FFPROBE_DEMUX-yes)
> diff --git a/tests/ref/fate/hls-adts-meta-demux b/tests/ref/fate/hls-adts-meta-demux
> new file mode 100644
> index 0000000000..ab944695fc
> --- /dev/null
> +++ b/tests/ref/fate/hls-adts-meta-demux
> @@ -0,0 +1,124 @@
> +packet|codec_type=audio|stream_index=0|pts=3416400|pts_time=37.960000|dts=3416400|dts_time=37.960000|duration=2090|duration_time=0.023222|size=368|pos=0|flags=K__|data_hash=CRC32:c371b0d9
> +packet|codec_type=audio|stream_index=0|pts=3418490|pts_time=37.983222|dts=3418490|dts_time=37.983222|duration=2090|duration_time=0.023222|size=390|pos=368|flags=K__|data_hash=CRC32:950c52b2
> +packet|codec_type=audio|stream_index=0|pts=3420580|pts_time=38.006444|dts=3420580|dts_time=38.006444|duration=2090|duration_time=0.023222|size=357|pos=758|flags=K__|data_hash=CRC32:3e672212
> +packet|codec_type=audio|stream_index=0|pts=3422669|pts_time=38.029656|dts=3422669|dts_time=38.029656|duration=2090|duration_time=0.023222|size=426|pos=1115|flags=K__|data_hash=CRC32:817b6e4c
> +packet|codec_type=audio|stream_index=0|pts=3424759|pts_time=38.052878|dts=3424759|dts_time=38.052878|duration=2090|duration_time=0.023222|size=368|pos=1541|flags=K__|data_hash=CRC32:c4c6e1ed
> +packet|codec_type=audio|stream_index=0|pts=3426849|pts_time=38.076100|dts=3426849|dts_time=38.076100|duration=2090|duration_time=0.023222|size=389|pos=1909|flags=K__|data_hash=CRC32:67cb6dd9
> +packet|codec_type=audio|stream_index=0|pts=3428939|pts_time=38.099322|dts=3428939|dts_time=38.099322|duration=2090|duration_time=0.023222|size=352|pos=2298|flags=K__|data_hash=CRC32:7a56ff53
> +packet|codec_type=audio|stream_index=0|pts=3431029|pts_time=38.122544|dts=3431029|dts_time=38.122544|duration=2090|duration_time=0.023222|size=378|pos=2650|flags=K__|data_hash=CRC32:f8d5ef58
> +packet|codec_type=audio|stream_index=0|pts=3433118|pts_time=38.145756|dts=3433118|dts_time=38.145756|duration=2090|duration_time=0.023222|size=384|pos=3028|flags=K__|data_hash=CRC32:73a4fb1c
> +packet|codec_type=audio|stream_index=0|pts=3435208|pts_time=38.168978|dts=3435208|dts_time=38.168978|duration=2090|duration_time=0.023222|size=353|pos=3412|flags=K__|data_hash=CRC32:4ea999b5
> +packet|codec_type=audio|stream_index=0|pts=3437298|pts_time=38.192200|dts=3437298|dts_time=38.192200|duration=2090|duration_time=0.023222|size=417|pos=3765|flags=K__|data_hash=CRC32:4540aec8
> +packet|codec_type=audio|stream_index=0|pts=3439388|pts_time=38.215422|dts=3439388|dts_time=38.215422|duration=2090|duration_time=0.023222|size=361|pos=4182|flags=K__|data_hash=CRC32:635a04f4
> +packet|codec_type=audio|stream_index=0|pts=3441478|pts_time=38.238644|dts=3441478|dts_time=38.238644|duration=2090|duration_time=0.023222|size=399|pos=4543|flags=K__|data_hash=CRC32:94583c18
> +packet|codec_type=audio|stream_index=0|pts=3443567|pts_time=38.261856|dts=3443567|dts_time=38.261856|duration=2090|duration_time=0.023222|size=384|pos=4942|flags=K__|data_hash=CRC32:21070d79
> +packet|codec_type=audio|stream_index=0|pts=3445657|pts_time=38.285078|dts=3445657|dts_time=38.285078|duration=2090|duration_time=0.023222|size=378|pos=5326|flags=K__|data_hash=CRC32:bd5beb97
> +packet|codec_type=audio|stream_index=0|pts=3447747|pts_time=38.308300|dts=3447747|dts_time=38.308300|duration=2090|duration_time=0.023222|size=362|pos=5704|flags=K__|data_hash=CRC32:8bb15fb7
> +packet|codec_type=audio|stream_index=0|pts=3449837|pts_time=38.331522|dts=3449837|dts_time=38.331522|duration=2090|duration_time=0.023222|size=365|pos=6066|flags=K__|data_hash=CRC32:a1801ece
> +packet|codec_type=audio|stream_index=0|pts=3451927|pts_time=38.354744|dts=3451927|dts_time=38.354744|duration=2090|duration_time=0.023222|size=390|pos=6431|flags=K__|data_hash=CRC32:8eb3880b
> +packet|codec_type=audio|stream_index=0|pts=3454016|pts_time=38.377956|dts=3454016|dts_time=38.377956|duration=2090|duration_time=0.023222|size=358|pos=6821|flags=K__|data_hash=CRC32:b4b30472
> +packet|codec_type=audio|stream_index=0|pts=3456106|pts_time=38.401178|dts=3456106|dts_time=38.401178|duration=2090|duration_time=0.023222|size=395|pos=7179|flags=K__|data_hash=CRC32:b3e014b3
> +packet|codec_type=audio|stream_index=0|pts=3458196|pts_time=38.424400|dts=3458196|dts_time=38.424400|duration=2090|duration_time=0.023222|size=353|pos=7574|flags=K__|data_hash=CRC32:5b510322
> +packet|codec_type=audio|stream_index=0|pts=3460286|pts_time=38.447622|dts=3460286|dts_time=38.447622|duration=2090|duration_time=0.023222|size=423|pos=7927|flags=K__|data_hash=CRC32:f36d52f3
> +packet|codec_type=audio|stream_index=0|pts=3462376|pts_time=38.470844|dts=3462376|dts_time=38.470844|duration=2090|duration_time=0.023222|size=360|pos=8350|flags=K__|data_hash=CRC32:2bd95695
> +packet|codec_type=audio|stream_index=0|pts=3464465|pts_time=38.494056|dts=3464465|dts_time=38.494056|duration=2090|duration_time=0.023222|size=355|pos=8710|flags=K__|data_hash=CRC32:804bd6ba
> +packet|codec_type=audio|stream_index=0|pts=3466555|pts_time=38.517278|dts=3466555|dts_time=38.517278|duration=2090|duration_time=0.023222|size=419|pos=9065|flags=K__|data_hash=CRC32:6f2b27cf
> +packet|codec_type=audio|stream_index=0|pts=3468645|pts_time=38.540500|dts=3468645|dts_time=38.540500|duration=2090|duration_time=0.023222|size=353|pos=9484|flags=K__|data_hash=CRC32:4dca2d23
> +packet|codec_type=audio|stream_index=0|pts=3470735|pts_time=38.563722|dts=3470735|dts_time=38.563722|duration=2090|duration_time=0.023222|size=393|pos=9837|flags=K__|data_hash=CRC32:03511cbb
> +packet|codec_type=audio|stream_index=0|pts=3472824|pts_time=38.586933|dts=3472824|dts_time=38.586933|duration=2090|duration_time=0.023222|size=384|pos=10230|flags=K__|data_hash=CRC32:a0b2bdab
> +packet|codec_type=audio|stream_index=0|pts=3474914|pts_time=38.610156|dts=3474914|dts_time=38.610156|duration=2090|duration_time=0.023222|size=351|pos=10614|flags=K__|data_hash=CRC32:f11a77fb
> +packet|codec_type=audio|stream_index=0|pts=3477004|pts_time=38.633378|dts=3477004|dts_time=38.633378|duration=2090|duration_time=0.023222|size=413|pos=10965|flags=K__|data_hash=CRC32:b3d288b4
> +packet|codec_type=audio|stream_index=0|pts=3479094|pts_time=38.656600|dts=3479094|dts_time=38.656600|duration=2090|duration_time=0.023222|size=372|pos=11378|flags=K__|data_hash=CRC32:fbca6a8b
> +packet|codec_type=audio|stream_index=0|pts=3481184|pts_time=38.679822|dts=3481184|dts_time=38.679822|duration=2090|duration_time=0.023222|size=389|pos=11750|flags=K__|data_hash=CRC32:ca769187
> +packet|codec_type=audio|stream_index=0|pts=3483273|pts_time=38.703033|dts=3483273|dts_time=38.703033|duration=2090|duration_time=0.023222|size=353|pos=12139|flags=K__|data_hash=CRC32:a00ccdd1
> +packet|codec_type=audio|stream_index=0|pts=3485363|pts_time=38.726256|dts=3485363|dts_time=38.726256|duration=2090|duration_time=0.023222|size=404|pos=12492|flags=K__|data_hash=CRC32:6593e756
> +packet|codec_type=audio|stream_index=0|pts=3487453|pts_time=38.749478|dts=3487453|dts_time=38.749478|duration=2090|duration_time=0.023222|size=360|pos=12896|flags=K__|data_hash=CRC32:f87250e9
> +packet|codec_type=audio|stream_index=0|pts=3489543|pts_time=38.772700|dts=3489543|dts_time=38.772700|duration=2090|duration_time=0.023222|size=394|pos=13256|flags=K__|data_hash=CRC32:6f5ece5c
> +packet|codec_type=audio|stream_index=0|pts=3491633|pts_time=38.795922|dts=3491633|dts_time=38.795922|duration=2090|duration_time=0.023222|size=355|pos=13650|flags=K__|data_hash=CRC32:e3f880f2
> +packet|codec_type=audio|stream_index=0|pts=3493722|pts_time=38.819133|dts=3493722|dts_time=38.819133|duration=2090|duration_time=0.023222|size=377|pos=14005|flags=K__|data_hash=CRC32:6637f3b8
> +packet|codec_type=audio|stream_index=0|pts=3495812|pts_time=38.842356|dts=3495812|dts_time=38.842356|duration=2090|duration_time=0.023222|size=377|pos=14382|flags=K__|data_hash=CRC32:89220563
> +packet|codec_type=audio|stream_index=0|pts=3497902|pts_time=38.865578|dts=3497902|dts_time=38.865578|duration=2090|duration_time=0.023222|size=366|pos=14759|flags=K__|data_hash=CRC32:9ba37001
> +packet|codec_type=audio|stream_index=0|pts=3499992|pts_time=38.888800|dts=3499992|dts_time=38.888800|duration=2090|duration_time=0.023222|size=413|pos=15125|flags=K__|data_hash=CRC32:d59379d4
> +packet|codec_type=audio|stream_index=0|pts=3502082|pts_time=38.912022|dts=3502082|dts_time=38.912022|duration=2090|duration_time=0.023222|size=352|pos=15538|flags=K__|data_hash=CRC32:ca06f39a
> +packet|codec_type=audio|stream_index=0|pts=3504171|pts_time=38.935233|dts=3504171|dts_time=38.935233|duration=2090|duration_time=0.023222|size=408|pos=15890|flags=K__|data_hash=CRC32:a3d051e2
> +packet|codec_type=audio|stream_index=0|pts=3506261|pts_time=38.958456|dts=3506261|dts_time=38.958456|duration=2090|duration_time=0.023222|size=400|pos=16298|flags=K__|data_hash=CRC32:9e69c13b
> +packet|codec_type=audio|stream_index=0|pts=3508351|pts_time=38.981678|dts=3508351|dts_time=38.981678|duration=2090|duration_time=0.023222|size=392|pos=16698|flags=K__|data_hash=CRC32:2eee52a5
> +packet|codec_type=audio|stream_index=0|pts=3510441|pts_time=39.004900|dts=3510441|dts_time=39.004900|duration=2090|duration_time=0.023222|size=339|pos=17090|flags=K__|data_hash=CRC32:596af9cf
> +packet|codec_type=audio|stream_index=0|pts=3512531|pts_time=39.028122|dts=3512531|dts_time=39.028122|duration=2090|duration_time=0.023222|size=363|pos=17429|flags=K__|data_hash=CRC32:99c352e0
> +packet|codec_type=audio|stream_index=0|pts=3514620|pts_time=39.051333|dts=3514620|dts_time=39.051333|duration=2090|duration_time=0.023222|size=374|pos=17792|flags=K__|data_hash=CRC32:65aba789
> +packet|codec_type=audio|stream_index=0|pts=3516710|pts_time=39.074556|dts=3516710|dts_time=39.074556|duration=2090|duration_time=0.023222|size=365|pos=18166|flags=K__|data_hash=CRC32:245def8f
> +packet|codec_type=audio|stream_index=0|pts=3518800|pts_time=39.097778|dts=3518800|dts_time=39.097778|duration=2090|duration_time=0.023222|size=394|pos=18531|flags=K__|data_hash=CRC32:5084699e
> +packet|codec_type=audio|stream_index=0|pts=3520890|pts_time=39.121000|dts=3520890|dts_time=39.121000|duration=2090|duration_time=0.023222|size=353|pos=18925|flags=K__|data_hash=CRC32:81802260
> +packet|codec_type=audio|stream_index=0|pts=3522980|pts_time=39.144222|dts=3522980|dts_time=39.144222|duration=2090|duration_time=0.023222|size=428|pos=19278|flags=K__|data_hash=CRC32:1ee470f2
> +packet|codec_type=audio|stream_index=0|pts=3525069|pts_time=39.167433|dts=3525069|dts_time=39.167433|duration=2090|duration_time=0.023222|size=369|pos=19706|flags=K__|data_hash=CRC32:0cf541ad
> +packet|codec_type=audio|stream_index=0|pts=3527159|pts_time=39.190656|dts=3527159|dts_time=39.190656|duration=2090|duration_time=0.023222|size=352|pos=20075|flags=K__|data_hash=CRC32:f8c1d4e8
> +packet|codec_type=audio|stream_index=0|pts=3529249|pts_time=39.213878|dts=3529249|dts_time=39.213878|duration=2090|duration_time=0.023222|size=400|pos=20427|flags=K__|data_hash=CRC32:9394af89
> +packet|codec_type=audio|stream_index=0|pts=3531339|pts_time=39.237100|dts=3531339|dts_time=39.237100|duration=2090|duration_time=0.023222|size=362|pos=20827|flags=K__|data_hash=CRC32:6e6c95cf
> +packet|codec_type=audio|stream_index=0|pts=3533429|pts_time=39.260322|dts=3533429|dts_time=39.260322|duration=2090|duration_time=0.023222|size=396|pos=21189|flags=K__|data_hash=CRC32:e134ad64
> +packet|codec_type=audio|stream_index=0|pts=3535518|pts_time=39.283533|dts=3535518|dts_time=39.283533|duration=2090|duration_time=0.023222|size=393|pos=21585|flags=K__|data_hash=CRC32:8be673f1
> +packet|codec_type=audio|stream_index=0|pts=3537608|pts_time=39.306756|dts=3537608|dts_time=39.306756|duration=2090|duration_time=0.023222|size=353|pos=21978|flags=K__|data_hash=CRC32:fd068970
> +packet|codec_type=audio|stream_index=0|pts=3539698|pts_time=39.329978|dts=3539698|dts_time=39.329978|duration=2090|duration_time=0.023222|size=396|pos=22331|flags=K__|data_hash=CRC32:a4204659
> +packet|codec_type=audio|stream_index=0|pts=3541788|pts_time=39.353200|dts=3541788|dts_time=39.353200|duration=2090|duration_time=0.023222|size=379|pos=22727|flags=K__|data_hash=CRC32:28764b16
> +packet|codec_type=audio|stream_index=0|pts=3543878|pts_time=39.376422|dts=3543878|dts_time=39.376422|duration=2090|duration_time=0.023222|size=384|pos=23106|flags=K__|data_hash=CRC32:087f79a3
> +packet|codec_type=audio|stream_index=0|pts=3545967|pts_time=39.399633|dts=3545967|dts_time=39.399633|duration=2090|duration_time=0.023222|size=357|pos=23490|flags=K__|data_hash=CRC32:c6cee3f6
> +packet|codec_type=audio|stream_index=0|pts=3548057|pts_time=39.422856|dts=3548057|dts_time=39.422856|duration=2090|duration_time=0.023222|size=401|pos=23847|flags=K__|data_hash=CRC32:aff37eb7
> +packet|codec_type=audio|stream_index=0|pts=3550147|pts_time=39.446078|dts=3550147|dts_time=39.446078|duration=2090|duration_time=0.023222|size=358|pos=24248|flags=K__|data_hash=CRC32:930ec20c
> +packet|codec_type=audio|stream_index=0|pts=3552237|pts_time=39.469300|dts=3552237|dts_time=39.469300|duration=2090|duration_time=0.023222|size=404|pos=24606|flags=K__|data_hash=CRC32:ed87be8c
> +packet|codec_type=audio|stream_index=0|pts=3554327|pts_time=39.492522|dts=3554327|dts_time=39.492522|duration=2090|duration_time=0.023222|size=370|pos=25010|flags=K__|data_hash=CRC32:c7036091
> +packet|codec_type=audio|stream_index=0|pts=3556416|pts_time=39.515733|dts=3556416|dts_time=39.515733|duration=2090|duration_time=0.023222|size=366|pos=25380|flags=K__|data_hash=CRC32:72ef3e91
> +packet|codec_type=audio|stream_index=0|pts=3558506|pts_time=39.538956|dts=3558506|dts_time=39.538956|duration=2090|duration_time=0.023222|size=365|pos=25746|flags=K__|data_hash=CRC32:05f5a44a
> +packet|codec_type=audio|stream_index=0|pts=3560596|pts_time=39.562178|dts=3560596|dts_time=39.562178|duration=2090|duration_time=0.023222|size=367|pos=26111|flags=K__|data_hash=CRC32:388ca65f
> +packet|codec_type=audio|stream_index=0|pts=3562686|pts_time=39.585400|dts=3562686|dts_time=39.585400|duration=2090|duration_time=0.023222|size=403|pos=26478|flags=K__|data_hash=CRC32:9bbc8816
> +packet|codec_type=audio|stream_index=0|pts=3564776|pts_time=39.608622|dts=3564776|dts_time=39.608622|duration=2090|duration_time=0.023222|size=368|pos=26881|flags=K__|data_hash=CRC32:0660a10d
> +packet|codec_type=audio|stream_index=0|pts=3566865|pts_time=39.631833|dts=3566865|dts_time=39.631833|duration=2090|duration_time=0.023222|size=388|pos=27249|flags=K__|data_hash=CRC32:76f0191f
> +packet|codec_type=audio|stream_index=0|pts=3568955|pts_time=39.655056|dts=3568955|dts_time=39.655056|duration=2090|duration_time=0.023222|size=361|pos=27637|flags=K__|data_hash=CRC32:d14107df
> +packet|codec_type=audio|stream_index=0|pts=3571045|pts_time=39.678278|dts=3571045|dts_time=39.678278|duration=2090|duration_time=0.023222|size=380|pos=27998|flags=K__|data_hash=CRC32:5a4bfaa1
> +packet|codec_type=audio|stream_index=0|pts=3573135|pts_time=39.701500|dts=3573135|dts_time=39.701500|duration=2090|duration_time=0.023222|size=381|pos=28378|flags=K__|data_hash=CRC32:3565436e
> +packet|codec_type=audio|stream_index=0|pts=3575224|pts_time=39.724711|dts=3575224|dts_time=39.724711|duration=2090|duration_time=0.023222|size=362|pos=28759|flags=K__|data_hash=CRC32:7e88f30f
> +packet|codec_type=audio|stream_index=0|pts=3577314|pts_time=39.747933|dts=3577314|dts_time=39.747933|duration=2090|duration_time=0.023222|size=406|pos=29121|flags=K__|data_hash=CRC32:6bb904a9
> +packet|codec_type=audio|stream_index=0|pts=3579404|pts_time=39.771156|dts=3579404|dts_time=39.771156|duration=2090|duration_time=0.023222|size=365|pos=29527|flags=K__|data_hash=CRC32:fb889595
> +packet|codec_type=audio|stream_index=0|pts=3581494|pts_time=39.794378|dts=3581494|dts_time=39.794378|duration=2090|duration_time=0.023222|size=384|pos=29892|flags=K__|data_hash=CRC32:c6e2f065
> +packet|codec_type=audio|stream_index=0|pts=3583584|pts_time=39.817600|dts=3583584|dts_time=39.817600|duration=2090|duration_time=0.023222|size=364|pos=30276|flags=K__|data_hash=CRC32:1eafc85e
> +packet|codec_type=audio|stream_index=0|pts=3585673|pts_time=39.840811|dts=3585673|dts_time=39.840811|duration=2090|duration_time=0.023222|size=400|pos=30640|flags=K__|data_hash=CRC32:cc280553
> +packet|codec_type=audio|stream_index=0|pts=3587763|pts_time=39.864033|dts=3587763|dts_time=39.864033|duration=2090|duration_time=0.023222|size=383|pos=31040|flags=K__|data_hash=CRC32:46d3129c
> +packet|codec_type=audio|stream_index=0|pts=3589853|pts_time=39.887256|dts=3589853|dts_time=39.887256|duration=2090|duration_time=0.023222|size=342|pos=31423|flags=K__|data_hash=CRC32:114b34eb
> +packet|codec_type=audio|stream_index=0|pts=3591943|pts_time=39.910478|dts=3591943|dts_time=39.910478|duration=2090|duration_time=0.023222|size=437|pos=31765|flags=K__|data_hash=CRC32:e1e85144
> +packet|codec_type=audio|stream_index=0|pts=3594033|pts_time=39.933700|dts=3594033|dts_time=39.933700|duration=2090|duration_time=0.023222|size=350|pos=32202|flags=K__|data_hash=CRC32:9a02bb70
> +packet|codec_type=audio|stream_index=0|pts=3596122|pts_time=39.956911|dts=3596122|dts_time=39.956911|duration=2090|duration_time=0.023222|size=401|pos=32552|flags=K__|data_hash=CRC32:e3cf3e45
> +packet|codec_type=audio|stream_index=0|pts=3598212|pts_time=39.980133|dts=3598212|dts_time=39.980133|duration=2090|duration_time=0.023222|size=394|pos=32953|flags=K__|data_hash=CRC32:ae8bc4b2
> +packet|codec_type=audio|stream_index=0|pts=3600302|pts_time=40.003356|dts=3600302|dts_time=40.003356|duration=2090|duration_time=0.023222|size=345|pos=33347|flags=K__|data_hash=CRC32:7832c3d0
> +packet|codec_type=audio|stream_index=0|pts=3602392|pts_time=40.026578|dts=3602392|dts_time=40.026578|duration=2090|duration_time=0.023222|size=410|pos=33692|flags=K__|data_hash=CRC32:df683be6
> +packet|codec_type=audio|stream_index=0|pts=3604482|pts_time=40.049800|dts=3604482|dts_time=40.049800|duration=2090|duration_time=0.023222|size=375|pos=34102|flags=K__|data_hash=CRC32:34d7b41a
> +packet|codec_type=audio|stream_index=0|pts=3606571|pts_time=40.073011|dts=3606571|dts_time=40.073011|duration=2090|duration_time=0.023222|size=374|pos=34477|flags=K__|data_hash=CRC32:8f4640d5
> +packet|codec_type=audio|stream_index=0|pts=3608661|pts_time=40.096233|dts=3608661|dts_time=40.096233|duration=2090|duration_time=0.023222|size=354|pos=34851|flags=K__|data_hash=CRC32:e7d2863f
> +packet|codec_type=audio|stream_index=0|pts=3610751|pts_time=40.119456|dts=3610751|dts_time=40.119456|duration=2090|duration_time=0.023222|size=396|pos=35205|flags=K__|data_hash=CRC32:66bd4930
> +packet|codec_type=audio|stream_index=0|pts=3612841|pts_time=40.142678|dts=3612841|dts_time=40.142678|duration=2090|duration_time=0.023222|size=372|pos=35601|flags=K__|data_hash=CRC32:8a4ea872
> +packet|codec_type=audio|stream_index=0|pts=3614931|pts_time=40.165900|dts=3614931|dts_time=40.165900|duration=2090|duration_time=0.023222|size=381|pos=35973|flags=K__|data_hash=CRC32:d64d85a8
> +packet|codec_type=audio|stream_index=0|pts=3617020|pts_time=40.189111|dts=3617020|dts_time=40.189111|duration=2090|duration_time=0.023222|size=353|pos=36354|flags=K__|data_hash=CRC32:83beba28
> +packet|codec_type=audio|stream_index=0|pts=3619110|pts_time=40.212333|dts=3619110|dts_time=40.212333|duration=2090|duration_time=0.023222|size=381|pos=36707|flags=K__|data_hash=CRC32:6f1a22c8
> +packet|codec_type=audio|stream_index=0|pts=3621200|pts_time=40.235556|dts=3621200|dts_time=40.235556|duration=2090|duration_time=0.023222|size=383|pos=37088|flags=K__|data_hash=CRC32:75a208c1
> +packet|codec_type=audio|stream_index=0|pts=3623290|pts_time=40.258778|dts=3623290|dts_time=40.258778|duration=2090|duration_time=0.023222|size=354|pos=37471|flags=K__|data_hash=CRC32:71efb40d
> +packet|codec_type=audio|stream_index=0|pts=3625380|pts_time=40.282000|dts=3625380|dts_time=40.282000|duration=2090|duration_time=0.023222|size=419|pos=37825|flags=K__|data_hash=CRC32:a50c245a
> +packet|codec_type=audio|stream_index=0|pts=3627469|pts_time=40.305211|dts=3627469|dts_time=40.305211|duration=2090|duration_time=0.023222|size=361|pos=38244|flags=K__|data_hash=CRC32:52b88d68
> +packet|codec_type=audio|stream_index=0|pts=3629559|pts_time=40.328433|dts=3629559|dts_time=40.328433|duration=2090|duration_time=0.023222|size=384|pos=38605|flags=K__|data_hash=CRC32:dd8bf439
> +packet|codec_type=audio|stream_index=0|pts=3631649|pts_time=40.351656|dts=3631649|dts_time=40.351656|duration=2090|duration_time=0.023222|size=363|pos=38989|flags=K__|data_hash=CRC32:d31ec44d
> +packet|codec_type=audio|stream_index=0|pts=3633739|pts_time=40.374878|dts=3633739|dts_time=40.374878|duration=2090|duration_time=0.023222|size=389|pos=39352|flags=K__|data_hash=CRC32:3d0f896a
> +packet|codec_type=audio|stream_index=0|pts=3635829|pts_time=40.398100|dts=3635829|dts_time=40.398100|duration=2090|duration_time=0.023222|size=380|pos=39741|flags=K__|data_hash=CRC32:163302e2
> +packet|codec_type=audio|stream_index=0|pts=3637918|pts_time=40.421311|dts=3637918|dts_time=40.421311|duration=2090|duration_time=0.023222|size=353|pos=40121|flags=K__|data_hash=CRC32:29612204
> +packet|codec_type=audio|stream_index=0|pts=3640008|pts_time=40.444533|dts=3640008|dts_time=40.444533|duration=2090|duration_time=0.023222|size=416|pos=40474|flags=K__|data_hash=CRC32:bb5ab61f
> +packet|codec_type=audio|stream_index=0|pts=3642098|pts_time=40.467756|dts=3642098|dts_time=40.467756|duration=2090|duration_time=0.023222|size=358|pos=40890|flags=K__|data_hash=CRC32:58e5f54f
> +packet|codec_type=audio|stream_index=0|pts=3644188|pts_time=40.490978|dts=3644188|dts_time=40.490978|duration=2090|duration_time=0.023222|size=399|pos=41248|flags=K__|data_hash=CRC32:be84d1e5
> +packet|codec_type=audio|stream_index=0|pts=3646278|pts_time=40.514200|dts=3646278|dts_time=40.514200|duration=2090|duration_time=0.023222|size=396|pos=41647|flags=K__|data_hash=CRC32:65f493a0
> +packet|codec_type=audio|stream_index=0|pts=3648367|pts_time=40.537411|dts=3648367|dts_time=40.537411|duration=2090|duration_time=0.023222|size=372|pos=42043|flags=K__|data_hash=CRC32:1654859d
> +packet|codec_type=audio|stream_index=0|pts=3650457|pts_time=40.560633|dts=3650457|dts_time=40.560633|duration=2090|duration_time=0.023222|size=369|pos=42415|flags=K__|data_hash=CRC32:c730ed52
> +packet|codec_type=audio|stream_index=0|pts=3652547|pts_time=40.583856|dts=3652547|dts_time=40.583856|duration=2090|duration_time=0.023222|size=343|pos=42784|flags=K__|data_hash=CRC32:148d0908
> +packet|codec_type=audio|stream_index=0|pts=3654637|pts_time=40.607078|dts=3654637|dts_time=40.607078|duration=2090|duration_time=0.023222|size=417|pos=43127|flags=K__|data_hash=CRC32:2dc10245
> +packet|codec_type=audio|stream_index=0|pts=3656727|pts_time=40.630300|dts=3656727|dts_time=40.630300|duration=2090|duration_time=0.023222|size=355|pos=43544|flags=K__|data_hash=CRC32:8d121e95
> +packet|codec_type=audio|stream_index=0|pts=3658816|pts_time=40.653511|dts=3658816|dts_time=40.653511|duration=2090|duration_time=0.023222|size=410|pos=43899|flags=K__|data_hash=CRC32:ea6b90a8
> +packet|codec_type=audio|stream_index=0|pts=3660906|pts_time=40.676733|dts=3660906|dts_time=40.676733|duration=2090|duration_time=0.023222|size=383|pos=44309|flags=K__|data_hash=CRC32:af456224
> +packet|codec_type=audio|stream_index=0|pts=3662996|pts_time=40.699956|dts=3662996|dts_time=40.699956|duration=2090|duration_time=0.023222|size=368|pos=44692|flags=K__|data_hash=CRC32:5270e19c
> +packet|codec_type=audio|stream_index=0|pts=3665086|pts_time=40.723178|dts=3665086|dts_time=40.723178|duration=2090|duration_time=0.023222|size=379|pos=45060|flags=K__|data_hash=CRC32:fb380ace
> +packet|codec_type=audio|stream_index=0|pts=3667176|pts_time=40.746400|dts=3667176|dts_time=40.746400|duration=2090|duration_time=0.023222|size=351|pos=45439|flags=K__|data_hash=CRC32:7bba4016
> +packet|codec_type=audio|stream_index=0|pts=3669265|pts_time=40.769611|dts=3669265|dts_time=40.769611|duration=2090|duration_time=0.023222|size=422|pos=45790|flags=K__|data_hash=CRC32:119eaa42
> +stream|index=0|codec_name=aac|profile=1|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3416400|start_time=37.960000|duration_ts=N/A|duration=N/A|bit_rate=130405|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=122|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|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:variant_bitrate=140800|tag:album=foolol|tag:title=test title 2
> +format|filename=bla|nb_streams=1|nb_programs=1|nb_stream_groups=0|format_name=hls|start_time=37.960000|duration=2.840000|size=74|bit_rate=208|probe_score=100

Can't you cut the length of the files down to (say) 10 AAC frames each?

- Andreas

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 2/2] Add fate test for hls metadata update.
  2024-04-11 14:17   ` Andreas Rheinhardt
@ 2024-04-12 18:37     ` Romain Beauxis
  2024-04-12 18:39       ` Andreas Rheinhardt
  0 siblings, 1 reply; 13+ messages in thread
From: Romain Beauxis @ 2024-04-12 18:37 UTC (permalink / raw)
  To: andreas.rheinhardt; +Cc: ffmpeg-devel

Le jeu. 11 avr. 2024 à 09:17, Andreas Rheinhardt <
andreas.rheinhardt@outlook.com> a écrit :

> Romain Beauxis:
> > This patch adds a FATE test for the new HLS metadata update. The fate
> > sample consists of a two segment AAC hls stream. The first segment has
> > test title 1 as title metadata while the second has test title 2.
> >
> > In the log, we can see that test title 2 is reported for the stream,
> > indicating that the metadata was updated with the second segment.
> >
> > Romain
> > ---
> >  tests/fate/demux.mak               |   3 +
> >  tests/ref/fate/hls-adts-meta-demux | 124 +++++++++++++++++++++++++++++
> >  2 files changed, 127 insertions(+)
> >  create mode 100644 tests/ref/fate/hls-adts-meta-demux
> >
> > diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak
> > index d9b9045f0b..7243c2c163 100644
> > --- a/tests/fate/demux.mak
> > +++ b/tests/fate/demux.mak
> > @@ -160,6 +160,9 @@ fate-ts-demux: CMD = ffprobe_demux
> $(TARGET_SAMPLES)/ac3/mp3ac325-4864-small.ts
> >  FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-ts-timed-id3-demux
> >  fate-ts-timed-id3-demux: CMD = ffprobe_demux
> $(TARGET_SAMPLES)/mpegts/id3.ts
> >
> > +FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-hls-adts-meta-demux
> > +fate-fate-hls-adts-meta-demux: CMD = ffprobe_demux
> $(TARGET_SAMPLES)/hls-adts-meta/stream.m3u8
> > +
> >  FATE_SAMPLES_DEMUX += $(FATE_SAMPLES_DEMUX-yes)
> >  FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_DEMUX)
> >  FATE_FFPROBE_DEMUX   += $(FATE_FFPROBE_DEMUX-yes)
> > diff --git a/tests/ref/fate/hls-adts-meta-demux
> b/tests/ref/fate/hls-adts-meta-demux
> > new file mode 100644
> > index 0000000000..ab944695fc
> > --- /dev/null
> > +++ b/tests/ref/fate/hls-adts-meta-demux
> > @@ -0,0 +1,124 @@
> >
> +packet|codec_type=audio|stream_index=0|pts=3416400|pts_time=37.960000|dts=3416400|dts_time=37.960000|duration=2090|duration_time=0.023222|size=368|pos=0|flags=K__|data_hash=CRC32:c371b0d9
> >
> +packet|codec_type=audio|stream_index=0|pts=3418490|pts_time=37.983222|dts=3418490|dts_time=37.983222|duration=2090|duration_time=0.023222|size=390|pos=368|flags=K__|data_hash=CRC32:950c52b2
> >
> +packet|codec_type=audio|stream_index=0|pts=3420580|pts_time=38.006444|dts=3420580|dts_time=38.006444|duration=2090|duration_time=0.023222|size=357|pos=758|flags=K__|data_hash=CRC32:3e672212
> >
> +packet|codec_type=audio|stream_index=0|pts=3422669|pts_time=38.029656|dts=3422669|dts_time=38.029656|duration=2090|duration_time=0.023222|size=426|pos=1115|flags=K__|data_hash=CRC32:817b6e4c
> >
> +packet|codec_type=audio|stream_index=0|pts=3424759|pts_time=38.052878|dts=3424759|dts_time=38.052878|duration=2090|duration_time=0.023222|size=368|pos=1541|flags=K__|data_hash=CRC32:c4c6e1ed
> >
> +packet|codec_type=audio|stream_index=0|pts=3426849|pts_time=38.076100|dts=3426849|dts_time=38.076100|duration=2090|duration_time=0.023222|size=389|pos=1909|flags=K__|data_hash=CRC32:67cb6dd9
> >
> +packet|codec_type=audio|stream_index=0|pts=3428939|pts_time=38.099322|dts=3428939|dts_time=38.099322|duration=2090|duration_time=0.023222|size=352|pos=2298|flags=K__|data_hash=CRC32:7a56ff53
> >
> +packet|codec_type=audio|stream_index=0|pts=3431029|pts_time=38.122544|dts=3431029|dts_time=38.122544|duration=2090|duration_time=0.023222|size=378|pos=2650|flags=K__|data_hash=CRC32:f8d5ef58
> >
> +packet|codec_type=audio|stream_index=0|pts=3433118|pts_time=38.145756|dts=3433118|dts_time=38.145756|duration=2090|duration_time=0.023222|size=384|pos=3028|flags=K__|data_hash=CRC32:73a4fb1c
> >
> +packet|codec_type=audio|stream_index=0|pts=3435208|pts_time=38.168978|dts=3435208|dts_time=38.168978|duration=2090|duration_time=0.023222|size=353|pos=3412|flags=K__|data_hash=CRC32:4ea999b5
> >
> +packet|codec_type=audio|stream_index=0|pts=3437298|pts_time=38.192200|dts=3437298|dts_time=38.192200|duration=2090|duration_time=0.023222|size=417|pos=3765|flags=K__|data_hash=CRC32:4540aec8
> >
> +packet|codec_type=audio|stream_index=0|pts=3439388|pts_time=38.215422|dts=3439388|dts_time=38.215422|duration=2090|duration_time=0.023222|size=361|pos=4182|flags=K__|data_hash=CRC32:635a04f4
> >
> +packet|codec_type=audio|stream_index=0|pts=3441478|pts_time=38.238644|dts=3441478|dts_time=38.238644|duration=2090|duration_time=0.023222|size=399|pos=4543|flags=K__|data_hash=CRC32:94583c18
> >
> +packet|codec_type=audio|stream_index=0|pts=3443567|pts_time=38.261856|dts=3443567|dts_time=38.261856|duration=2090|duration_time=0.023222|size=384|pos=4942|flags=K__|data_hash=CRC32:21070d79
> >
> +packet|codec_type=audio|stream_index=0|pts=3445657|pts_time=38.285078|dts=3445657|dts_time=38.285078|duration=2090|duration_time=0.023222|size=378|pos=5326|flags=K__|data_hash=CRC32:bd5beb97
> >
> +packet|codec_type=audio|stream_index=0|pts=3447747|pts_time=38.308300|dts=3447747|dts_time=38.308300|duration=2090|duration_time=0.023222|size=362|pos=5704|flags=K__|data_hash=CRC32:8bb15fb7
> >
> +packet|codec_type=audio|stream_index=0|pts=3449837|pts_time=38.331522|dts=3449837|dts_time=38.331522|duration=2090|duration_time=0.023222|size=365|pos=6066|flags=K__|data_hash=CRC32:a1801ece
> >
> +packet|codec_type=audio|stream_index=0|pts=3451927|pts_time=38.354744|dts=3451927|dts_time=38.354744|duration=2090|duration_time=0.023222|size=390|pos=6431|flags=K__|data_hash=CRC32:8eb3880b
> >
> +packet|codec_type=audio|stream_index=0|pts=3454016|pts_time=38.377956|dts=3454016|dts_time=38.377956|duration=2090|duration_time=0.023222|size=358|pos=6821|flags=K__|data_hash=CRC32:b4b30472
> >
> +packet|codec_type=audio|stream_index=0|pts=3456106|pts_time=38.401178|dts=3456106|dts_time=38.401178|duration=2090|duration_time=0.023222|size=395|pos=7179|flags=K__|data_hash=CRC32:b3e014b3
> >
> +packet|codec_type=audio|stream_index=0|pts=3458196|pts_time=38.424400|dts=3458196|dts_time=38.424400|duration=2090|duration_time=0.023222|size=353|pos=7574|flags=K__|data_hash=CRC32:5b510322
> >
> +packet|codec_type=audio|stream_index=0|pts=3460286|pts_time=38.447622|dts=3460286|dts_time=38.447622|duration=2090|duration_time=0.023222|size=423|pos=7927|flags=K__|data_hash=CRC32:f36d52f3
> >
> +packet|codec_type=audio|stream_index=0|pts=3462376|pts_time=38.470844|dts=3462376|dts_time=38.470844|duration=2090|duration_time=0.023222|size=360|pos=8350|flags=K__|data_hash=CRC32:2bd95695
> >
> +packet|codec_type=audio|stream_index=0|pts=3464465|pts_time=38.494056|dts=3464465|dts_time=38.494056|duration=2090|duration_time=0.023222|size=355|pos=8710|flags=K__|data_hash=CRC32:804bd6ba
> >
> +packet|codec_type=audio|stream_index=0|pts=3466555|pts_time=38.517278|dts=3466555|dts_time=38.517278|duration=2090|duration_time=0.023222|size=419|pos=9065|flags=K__|data_hash=CRC32:6f2b27cf
> >
> +packet|codec_type=audio|stream_index=0|pts=3468645|pts_time=38.540500|dts=3468645|dts_time=38.540500|duration=2090|duration_time=0.023222|size=353|pos=9484|flags=K__|data_hash=CRC32:4dca2d23
> >
> +packet|codec_type=audio|stream_index=0|pts=3470735|pts_time=38.563722|dts=3470735|dts_time=38.563722|duration=2090|duration_time=0.023222|size=393|pos=9837|flags=K__|data_hash=CRC32:03511cbb
> >
> +packet|codec_type=audio|stream_index=0|pts=3472824|pts_time=38.586933|dts=3472824|dts_time=38.586933|duration=2090|duration_time=0.023222|size=384|pos=10230|flags=K__|data_hash=CRC32:a0b2bdab
> >
> +packet|codec_type=audio|stream_index=0|pts=3474914|pts_time=38.610156|dts=3474914|dts_time=38.610156|duration=2090|duration_time=0.023222|size=351|pos=10614|flags=K__|data_hash=CRC32:f11a77fb
> >
> +packet|codec_type=audio|stream_index=0|pts=3477004|pts_time=38.633378|dts=3477004|dts_time=38.633378|duration=2090|duration_time=0.023222|size=413|pos=10965|flags=K__|data_hash=CRC32:b3d288b4
> >
> +packet|codec_type=audio|stream_index=0|pts=3479094|pts_time=38.656600|dts=3479094|dts_time=38.656600|duration=2090|duration_time=0.023222|size=372|pos=11378|flags=K__|data_hash=CRC32:fbca6a8b
> >
> +packet|codec_type=audio|stream_index=0|pts=3481184|pts_time=38.679822|dts=3481184|dts_time=38.679822|duration=2090|duration_time=0.023222|size=389|pos=11750|flags=K__|data_hash=CRC32:ca769187
> >
> +packet|codec_type=audio|stream_index=0|pts=3483273|pts_time=38.703033|dts=3483273|dts_time=38.703033|duration=2090|duration_time=0.023222|size=353|pos=12139|flags=K__|data_hash=CRC32:a00ccdd1
> >
> +packet|codec_type=audio|stream_index=0|pts=3485363|pts_time=38.726256|dts=3485363|dts_time=38.726256|duration=2090|duration_time=0.023222|size=404|pos=12492|flags=K__|data_hash=CRC32:6593e756
> >
> +packet|codec_type=audio|stream_index=0|pts=3487453|pts_time=38.749478|dts=3487453|dts_time=38.749478|duration=2090|duration_time=0.023222|size=360|pos=12896|flags=K__|data_hash=CRC32:f87250e9
> >
> +packet|codec_type=audio|stream_index=0|pts=3489543|pts_time=38.772700|dts=3489543|dts_time=38.772700|duration=2090|duration_time=0.023222|size=394|pos=13256|flags=K__|data_hash=CRC32:6f5ece5c
> >
> +packet|codec_type=audio|stream_index=0|pts=3491633|pts_time=38.795922|dts=3491633|dts_time=38.795922|duration=2090|duration_time=0.023222|size=355|pos=13650|flags=K__|data_hash=CRC32:e3f880f2
> >
> +packet|codec_type=audio|stream_index=0|pts=3493722|pts_time=38.819133|dts=3493722|dts_time=38.819133|duration=2090|duration_time=0.023222|size=377|pos=14005|flags=K__|data_hash=CRC32:6637f3b8
> >
> +packet|codec_type=audio|stream_index=0|pts=3495812|pts_time=38.842356|dts=3495812|dts_time=38.842356|duration=2090|duration_time=0.023222|size=377|pos=14382|flags=K__|data_hash=CRC32:89220563
> >
> +packet|codec_type=audio|stream_index=0|pts=3497902|pts_time=38.865578|dts=3497902|dts_time=38.865578|duration=2090|duration_time=0.023222|size=366|pos=14759|flags=K__|data_hash=CRC32:9ba37001
> >
> +packet|codec_type=audio|stream_index=0|pts=3499992|pts_time=38.888800|dts=3499992|dts_time=38.888800|duration=2090|duration_time=0.023222|size=413|pos=15125|flags=K__|data_hash=CRC32:d59379d4
> >
> +packet|codec_type=audio|stream_index=0|pts=3502082|pts_time=38.912022|dts=3502082|dts_time=38.912022|duration=2090|duration_time=0.023222|size=352|pos=15538|flags=K__|data_hash=CRC32:ca06f39a
> >
> +packet|codec_type=audio|stream_index=0|pts=3504171|pts_time=38.935233|dts=3504171|dts_time=38.935233|duration=2090|duration_time=0.023222|size=408|pos=15890|flags=K__|data_hash=CRC32:a3d051e2
> >
> +packet|codec_type=audio|stream_index=0|pts=3506261|pts_time=38.958456|dts=3506261|dts_time=38.958456|duration=2090|duration_time=0.023222|size=400|pos=16298|flags=K__|data_hash=CRC32:9e69c13b
> >
> +packet|codec_type=audio|stream_index=0|pts=3508351|pts_time=38.981678|dts=3508351|dts_time=38.981678|duration=2090|duration_time=0.023222|size=392|pos=16698|flags=K__|data_hash=CRC32:2eee52a5
> >
> +packet|codec_type=audio|stream_index=0|pts=3510441|pts_time=39.004900|dts=3510441|dts_time=39.004900|duration=2090|duration_time=0.023222|size=339|pos=17090|flags=K__|data_hash=CRC32:596af9cf
> >
> +packet|codec_type=audio|stream_index=0|pts=3512531|pts_time=39.028122|dts=3512531|dts_time=39.028122|duration=2090|duration_time=0.023222|size=363|pos=17429|flags=K__|data_hash=CRC32:99c352e0
> >
> +packet|codec_type=audio|stream_index=0|pts=3514620|pts_time=39.051333|dts=3514620|dts_time=39.051333|duration=2090|duration_time=0.023222|size=374|pos=17792|flags=K__|data_hash=CRC32:65aba789
> >
> +packet|codec_type=audio|stream_index=0|pts=3516710|pts_time=39.074556|dts=3516710|dts_time=39.074556|duration=2090|duration_time=0.023222|size=365|pos=18166|flags=K__|data_hash=CRC32:245def8f
> >
> +packet|codec_type=audio|stream_index=0|pts=3518800|pts_time=39.097778|dts=3518800|dts_time=39.097778|duration=2090|duration_time=0.023222|size=394|pos=18531|flags=K__|data_hash=CRC32:5084699e
> >
> +packet|codec_type=audio|stream_index=0|pts=3520890|pts_time=39.121000|dts=3520890|dts_time=39.121000|duration=2090|duration_time=0.023222|size=353|pos=18925|flags=K__|data_hash=CRC32:81802260
> >
> +packet|codec_type=audio|stream_index=0|pts=3522980|pts_time=39.144222|dts=3522980|dts_time=39.144222|duration=2090|duration_time=0.023222|size=428|pos=19278|flags=K__|data_hash=CRC32:1ee470f2
> >
> +packet|codec_type=audio|stream_index=0|pts=3525069|pts_time=39.167433|dts=3525069|dts_time=39.167433|duration=2090|duration_time=0.023222|size=369|pos=19706|flags=K__|data_hash=CRC32:0cf541ad
> >
> +packet|codec_type=audio|stream_index=0|pts=3527159|pts_time=39.190656|dts=3527159|dts_time=39.190656|duration=2090|duration_time=0.023222|size=352|pos=20075|flags=K__|data_hash=CRC32:f8c1d4e8
> >
> +packet|codec_type=audio|stream_index=0|pts=3529249|pts_time=39.213878|dts=3529249|dts_time=39.213878|duration=2090|duration_time=0.023222|size=400|pos=20427|flags=K__|data_hash=CRC32:9394af89
> >
> +packet|codec_type=audio|stream_index=0|pts=3531339|pts_time=39.237100|dts=3531339|dts_time=39.237100|duration=2090|duration_time=0.023222|size=362|pos=20827|flags=K__|data_hash=CRC32:6e6c95cf
> >
> +packet|codec_type=audio|stream_index=0|pts=3533429|pts_time=39.260322|dts=3533429|dts_time=39.260322|duration=2090|duration_time=0.023222|size=396|pos=21189|flags=K__|data_hash=CRC32:e134ad64
> >
> +packet|codec_type=audio|stream_index=0|pts=3535518|pts_time=39.283533|dts=3535518|dts_time=39.283533|duration=2090|duration_time=0.023222|size=393|pos=21585|flags=K__|data_hash=CRC32:8be673f1
> >
> +packet|codec_type=audio|stream_index=0|pts=3537608|pts_time=39.306756|dts=3537608|dts_time=39.306756|duration=2090|duration_time=0.023222|size=353|pos=21978|flags=K__|data_hash=CRC32:fd068970
> >
> +packet|codec_type=audio|stream_index=0|pts=3539698|pts_time=39.329978|dts=3539698|dts_time=39.329978|duration=2090|duration_time=0.023222|size=396|pos=22331|flags=K__|data_hash=CRC32:a4204659
> >
> +packet|codec_type=audio|stream_index=0|pts=3541788|pts_time=39.353200|dts=3541788|dts_time=39.353200|duration=2090|duration_time=0.023222|size=379|pos=22727|flags=K__|data_hash=CRC32:28764b16
> >
> +packet|codec_type=audio|stream_index=0|pts=3543878|pts_time=39.376422|dts=3543878|dts_time=39.376422|duration=2090|duration_time=0.023222|size=384|pos=23106|flags=K__|data_hash=CRC32:087f79a3
> >
> +packet|codec_type=audio|stream_index=0|pts=3545967|pts_time=39.399633|dts=3545967|dts_time=39.399633|duration=2090|duration_time=0.023222|size=357|pos=23490|flags=K__|data_hash=CRC32:c6cee3f6
> >
> +packet|codec_type=audio|stream_index=0|pts=3548057|pts_time=39.422856|dts=3548057|dts_time=39.422856|duration=2090|duration_time=0.023222|size=401|pos=23847|flags=K__|data_hash=CRC32:aff37eb7
> >
> +packet|codec_type=audio|stream_index=0|pts=3550147|pts_time=39.446078|dts=3550147|dts_time=39.446078|duration=2090|duration_time=0.023222|size=358|pos=24248|flags=K__|data_hash=CRC32:930ec20c
> >
> +packet|codec_type=audio|stream_index=0|pts=3552237|pts_time=39.469300|dts=3552237|dts_time=39.469300|duration=2090|duration_time=0.023222|size=404|pos=24606|flags=K__|data_hash=CRC32:ed87be8c
> >
> +packet|codec_type=audio|stream_index=0|pts=3554327|pts_time=39.492522|dts=3554327|dts_time=39.492522|duration=2090|duration_time=0.023222|size=370|pos=25010|flags=K__|data_hash=CRC32:c7036091
> >
> +packet|codec_type=audio|stream_index=0|pts=3556416|pts_time=39.515733|dts=3556416|dts_time=39.515733|duration=2090|duration_time=0.023222|size=366|pos=25380|flags=K__|data_hash=CRC32:72ef3e91
> >
> +packet|codec_type=audio|stream_index=0|pts=3558506|pts_time=39.538956|dts=3558506|dts_time=39.538956|duration=2090|duration_time=0.023222|size=365|pos=25746|flags=K__|data_hash=CRC32:05f5a44a
> >
> +packet|codec_type=audio|stream_index=0|pts=3560596|pts_time=39.562178|dts=3560596|dts_time=39.562178|duration=2090|duration_time=0.023222|size=367|pos=26111|flags=K__|data_hash=CRC32:388ca65f
> >
> +packet|codec_type=audio|stream_index=0|pts=3562686|pts_time=39.585400|dts=3562686|dts_time=39.585400|duration=2090|duration_time=0.023222|size=403|pos=26478|flags=K__|data_hash=CRC32:9bbc8816
> >
> +packet|codec_type=audio|stream_index=0|pts=3564776|pts_time=39.608622|dts=3564776|dts_time=39.608622|duration=2090|duration_time=0.023222|size=368|pos=26881|flags=K__|data_hash=CRC32:0660a10d
> >
> +packet|codec_type=audio|stream_index=0|pts=3566865|pts_time=39.631833|dts=3566865|dts_time=39.631833|duration=2090|duration_time=0.023222|size=388|pos=27249|flags=K__|data_hash=CRC32:76f0191f
> >
> +packet|codec_type=audio|stream_index=0|pts=3568955|pts_time=39.655056|dts=3568955|dts_time=39.655056|duration=2090|duration_time=0.023222|size=361|pos=27637|flags=K__|data_hash=CRC32:d14107df
> >
> +packet|codec_type=audio|stream_index=0|pts=3571045|pts_time=39.678278|dts=3571045|dts_time=39.678278|duration=2090|duration_time=0.023222|size=380|pos=27998|flags=K__|data_hash=CRC32:5a4bfaa1
> >
> +packet|codec_type=audio|stream_index=0|pts=3573135|pts_time=39.701500|dts=3573135|dts_time=39.701500|duration=2090|duration_time=0.023222|size=381|pos=28378|flags=K__|data_hash=CRC32:3565436e
> >
> +packet|codec_type=audio|stream_index=0|pts=3575224|pts_time=39.724711|dts=3575224|dts_time=39.724711|duration=2090|duration_time=0.023222|size=362|pos=28759|flags=K__|data_hash=CRC32:7e88f30f
> >
> +packet|codec_type=audio|stream_index=0|pts=3577314|pts_time=39.747933|dts=3577314|dts_time=39.747933|duration=2090|duration_time=0.023222|size=406|pos=29121|flags=K__|data_hash=CRC32:6bb904a9
> >
> +packet|codec_type=audio|stream_index=0|pts=3579404|pts_time=39.771156|dts=3579404|dts_time=39.771156|duration=2090|duration_time=0.023222|size=365|pos=29527|flags=K__|data_hash=CRC32:fb889595
> >
> +packet|codec_type=audio|stream_index=0|pts=3581494|pts_time=39.794378|dts=3581494|dts_time=39.794378|duration=2090|duration_time=0.023222|size=384|pos=29892|flags=K__|data_hash=CRC32:c6e2f065
> >
> +packet|codec_type=audio|stream_index=0|pts=3583584|pts_time=39.817600|dts=3583584|dts_time=39.817600|duration=2090|duration_time=0.023222|size=364|pos=30276|flags=K__|data_hash=CRC32:1eafc85e
> >
> +packet|codec_type=audio|stream_index=0|pts=3585673|pts_time=39.840811|dts=3585673|dts_time=39.840811|duration=2090|duration_time=0.023222|size=400|pos=30640|flags=K__|data_hash=CRC32:cc280553
> >
> +packet|codec_type=audio|stream_index=0|pts=3587763|pts_time=39.864033|dts=3587763|dts_time=39.864033|duration=2090|duration_time=0.023222|size=383|pos=31040|flags=K__|data_hash=CRC32:46d3129c
> >
> +packet|codec_type=audio|stream_index=0|pts=3589853|pts_time=39.887256|dts=3589853|dts_time=39.887256|duration=2090|duration_time=0.023222|size=342|pos=31423|flags=K__|data_hash=CRC32:114b34eb
> >
> +packet|codec_type=audio|stream_index=0|pts=3591943|pts_time=39.910478|dts=3591943|dts_time=39.910478|duration=2090|duration_time=0.023222|size=437|pos=31765|flags=K__|data_hash=CRC32:e1e85144
> >
> +packet|codec_type=audio|stream_index=0|pts=3594033|pts_time=39.933700|dts=3594033|dts_time=39.933700|duration=2090|duration_time=0.023222|size=350|pos=32202|flags=K__|data_hash=CRC32:9a02bb70
> >
> +packet|codec_type=audio|stream_index=0|pts=3596122|pts_time=39.956911|dts=3596122|dts_time=39.956911|duration=2090|duration_time=0.023222|size=401|pos=32552|flags=K__|data_hash=CRC32:e3cf3e45
> >
> +packet|codec_type=audio|stream_index=0|pts=3598212|pts_time=39.980133|dts=3598212|dts_time=39.980133|duration=2090|duration_time=0.023222|size=394|pos=32953|flags=K__|data_hash=CRC32:ae8bc4b2
> >
> +packet|codec_type=audio|stream_index=0|pts=3600302|pts_time=40.003356|dts=3600302|dts_time=40.003356|duration=2090|duration_time=0.023222|size=345|pos=33347|flags=K__|data_hash=CRC32:7832c3d0
> >
> +packet|codec_type=audio|stream_index=0|pts=3602392|pts_time=40.026578|dts=3602392|dts_time=40.026578|duration=2090|duration_time=0.023222|size=410|pos=33692|flags=K__|data_hash=CRC32:df683be6
> >
> +packet|codec_type=audio|stream_index=0|pts=3604482|pts_time=40.049800|dts=3604482|dts_time=40.049800|duration=2090|duration_time=0.023222|size=375|pos=34102|flags=K__|data_hash=CRC32:34d7b41a
> >
> +packet|codec_type=audio|stream_index=0|pts=3606571|pts_time=40.073011|dts=3606571|dts_time=40.073011|duration=2090|duration_time=0.023222|size=374|pos=34477|flags=K__|data_hash=CRC32:8f4640d5
> >
> +packet|codec_type=audio|stream_index=0|pts=3608661|pts_time=40.096233|dts=3608661|dts_time=40.096233|duration=2090|duration_time=0.023222|size=354|pos=34851|flags=K__|data_hash=CRC32:e7d2863f
> >
> +packet|codec_type=audio|stream_index=0|pts=3610751|pts_time=40.119456|dts=3610751|dts_time=40.119456|duration=2090|duration_time=0.023222|size=396|pos=35205|flags=K__|data_hash=CRC32:66bd4930
> >
> +packet|codec_type=audio|stream_index=0|pts=3612841|pts_time=40.142678|dts=3612841|dts_time=40.142678|duration=2090|duration_time=0.023222|size=372|pos=35601|flags=K__|data_hash=CRC32:8a4ea872
> >
> +packet|codec_type=audio|stream_index=0|pts=3614931|pts_time=40.165900|dts=3614931|dts_time=40.165900|duration=2090|duration_time=0.023222|size=381|pos=35973|flags=K__|data_hash=CRC32:d64d85a8
> >
> +packet|codec_type=audio|stream_index=0|pts=3617020|pts_time=40.189111|dts=3617020|dts_time=40.189111|duration=2090|duration_time=0.023222|size=353|pos=36354|flags=K__|data_hash=CRC32:83beba28
> >
> +packet|codec_type=audio|stream_index=0|pts=3619110|pts_time=40.212333|dts=3619110|dts_time=40.212333|duration=2090|duration_time=0.023222|size=381|pos=36707|flags=K__|data_hash=CRC32:6f1a22c8
> >
> +packet|codec_type=audio|stream_index=0|pts=3621200|pts_time=40.235556|dts=3621200|dts_time=40.235556|duration=2090|duration_time=0.023222|size=383|pos=37088|flags=K__|data_hash=CRC32:75a208c1
> >
> +packet|codec_type=audio|stream_index=0|pts=3623290|pts_time=40.258778|dts=3623290|dts_time=40.258778|duration=2090|duration_time=0.023222|size=354|pos=37471|flags=K__|data_hash=CRC32:71efb40d
> >
> +packet|codec_type=audio|stream_index=0|pts=3625380|pts_time=40.282000|dts=3625380|dts_time=40.282000|duration=2090|duration_time=0.023222|size=419|pos=37825|flags=K__|data_hash=CRC32:a50c245a
> >
> +packet|codec_type=audio|stream_index=0|pts=3627469|pts_time=40.305211|dts=3627469|dts_time=40.305211|duration=2090|duration_time=0.023222|size=361|pos=38244|flags=K__|data_hash=CRC32:52b88d68
> >
> +packet|codec_type=audio|stream_index=0|pts=3629559|pts_time=40.328433|dts=3629559|dts_time=40.328433|duration=2090|duration_time=0.023222|size=384|pos=38605|flags=K__|data_hash=CRC32:dd8bf439
> >
> +packet|codec_type=audio|stream_index=0|pts=3631649|pts_time=40.351656|dts=3631649|dts_time=40.351656|duration=2090|duration_time=0.023222|size=363|pos=38989|flags=K__|data_hash=CRC32:d31ec44d
> >
> +packet|codec_type=audio|stream_index=0|pts=3633739|pts_time=40.374878|dts=3633739|dts_time=40.374878|duration=2090|duration_time=0.023222|size=389|pos=39352|flags=K__|data_hash=CRC32:3d0f896a
> >
> +packet|codec_type=audio|stream_index=0|pts=3635829|pts_time=40.398100|dts=3635829|dts_time=40.398100|duration=2090|duration_time=0.023222|size=380|pos=39741|flags=K__|data_hash=CRC32:163302e2
> >
> +packet|codec_type=audio|stream_index=0|pts=3637918|pts_time=40.421311|dts=3637918|dts_time=40.421311|duration=2090|duration_time=0.023222|size=353|pos=40121|flags=K__|data_hash=CRC32:29612204
> >
> +packet|codec_type=audio|stream_index=0|pts=3640008|pts_time=40.444533|dts=3640008|dts_time=40.444533|duration=2090|duration_time=0.023222|size=416|pos=40474|flags=K__|data_hash=CRC32:bb5ab61f
> >
> +packet|codec_type=audio|stream_index=0|pts=3642098|pts_time=40.467756|dts=3642098|dts_time=40.467756|duration=2090|duration_time=0.023222|size=358|pos=40890|flags=K__|data_hash=CRC32:58e5f54f
> >
> +packet|codec_type=audio|stream_index=0|pts=3644188|pts_time=40.490978|dts=3644188|dts_time=40.490978|duration=2090|duration_time=0.023222|size=399|pos=41248|flags=K__|data_hash=CRC32:be84d1e5
> >
> +packet|codec_type=audio|stream_index=0|pts=3646278|pts_time=40.514200|dts=3646278|dts_time=40.514200|duration=2090|duration_time=0.023222|size=396|pos=41647|flags=K__|data_hash=CRC32:65f493a0
> >
> +packet|codec_type=audio|stream_index=0|pts=3648367|pts_time=40.537411|dts=3648367|dts_time=40.537411|duration=2090|duration_time=0.023222|size=372|pos=42043|flags=K__|data_hash=CRC32:1654859d
> >
> +packet|codec_type=audio|stream_index=0|pts=3650457|pts_time=40.560633|dts=3650457|dts_time=40.560633|duration=2090|duration_time=0.023222|size=369|pos=42415|flags=K__|data_hash=CRC32:c730ed52
> >
> +packet|codec_type=audio|stream_index=0|pts=3652547|pts_time=40.583856|dts=3652547|dts_time=40.583856|duration=2090|duration_time=0.023222|size=343|pos=42784|flags=K__|data_hash=CRC32:148d0908
> >
> +packet|codec_type=audio|stream_index=0|pts=3654637|pts_time=40.607078|dts=3654637|dts_time=40.607078|duration=2090|duration_time=0.023222|size=417|pos=43127|flags=K__|data_hash=CRC32:2dc10245
> >
> +packet|codec_type=audio|stream_index=0|pts=3656727|pts_time=40.630300|dts=3656727|dts_time=40.630300|duration=2090|duration_time=0.023222|size=355|pos=43544|flags=K__|data_hash=CRC32:8d121e95
> >
> +packet|codec_type=audio|stream_index=0|pts=3658816|pts_time=40.653511|dts=3658816|dts_time=40.653511|duration=2090|duration_time=0.023222|size=410|pos=43899|flags=K__|data_hash=CRC32:ea6b90a8
> >
> +packet|codec_type=audio|stream_index=0|pts=3660906|pts_time=40.676733|dts=3660906|dts_time=40.676733|duration=2090|duration_time=0.023222|size=383|pos=44309|flags=K__|data_hash=CRC32:af456224
> >
> +packet|codec_type=audio|stream_index=0|pts=3662996|pts_time=40.699956|dts=3662996|dts_time=40.699956|duration=2090|duration_time=0.023222|size=368|pos=44692|flags=K__|data_hash=CRC32:5270e19c
> >
> +packet|codec_type=audio|stream_index=0|pts=3665086|pts_time=40.723178|dts=3665086|dts_time=40.723178|duration=2090|duration_time=0.023222|size=379|pos=45060|flags=K__|data_hash=CRC32:fb380ace
> >
> +packet|codec_type=audio|stream_index=0|pts=3667176|pts_time=40.746400|dts=3667176|dts_time=40.746400|duration=2090|duration_time=0.023222|size=351|pos=45439|flags=K__|data_hash=CRC32:7bba4016
> >
> +packet|codec_type=audio|stream_index=0|pts=3669265|pts_time=40.769611|dts=3669265|dts_time=40.769611|duration=2090|duration_time=0.023222|size=422|pos=45790|flags=K__|data_hash=CRC32:119eaa42
> >
> +stream|index=0|codec_name=aac|profile=1|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3416400|start_time=37.960000|duration_ts=N/A|duration=N/A|bit_rate=130405|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=122|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|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:variant_bitrate=140800|tag:album=foolol|tag:title=test
> title 2
> >
> +format|filename=bla|nb_streams=1|nb_programs=1|nb_stream_groups=0|format_name=hls|start_time=37.960000|duration=2.840000|size=74|bit_rate=208|probe_score=100
>
> Can't you cut the length of the files down to (say) 10 AAC frames each?
>
>
Ok will do


> - Andreas
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [FFmpeg-devel] [PATCH 2/2] Add fate test for hls metadata update.
  2024-04-12 18:37     ` Romain Beauxis
@ 2024-04-12 18:39       ` Andreas Rheinhardt
  0 siblings, 0 replies; 13+ messages in thread
From: Andreas Rheinhardt @ 2024-04-12 18:39 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

Romain Beauxis:
> Le jeu. 11 avr. 2024 à 09:17, Andreas Rheinhardt <
> andreas.rheinhardt@outlook.com> a écrit :
> 
>> Romain Beauxis:
>>> This patch adds a FATE test for the new HLS metadata update. The fate
>>> sample consists of a two segment AAC hls stream. The first segment has
>>> test title 1 as title metadata while the second has test title 2.
>>>
>>> In the log, we can see that test title 2 is reported for the stream,
>>> indicating that the metadata was updated with the second segment.
>>>
>>> Romain
>>> ---
>>>  tests/fate/demux.mak               |   3 +
>>>  tests/ref/fate/hls-adts-meta-demux | 124 +++++++++++++++++++++++++++++
>>>  2 files changed, 127 insertions(+)
>>>  create mode 100644 tests/ref/fate/hls-adts-meta-demux
>>>
>>> diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak
>>> index d9b9045f0b..7243c2c163 100644
>>> --- a/tests/fate/demux.mak
>>> +++ b/tests/fate/demux.mak
>>> @@ -160,6 +160,9 @@ fate-ts-demux: CMD = ffprobe_demux
>> $(TARGET_SAMPLES)/ac3/mp3ac325-4864-small.ts
>>>  FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-ts-timed-id3-demux
>>>  fate-ts-timed-id3-demux: CMD = ffprobe_demux
>> $(TARGET_SAMPLES)/mpegts/id3.ts
>>>
>>> +FATE_FFPROBE_DEMUX-$(CONFIG_MPEGTS_DEMUXER) += fate-hls-adts-meta-demux
>>> +fate-fate-hls-adts-meta-demux: CMD = ffprobe_demux
>> $(TARGET_SAMPLES)/hls-adts-meta/stream.m3u8
>>> +
>>>  FATE_SAMPLES_DEMUX += $(FATE_SAMPLES_DEMUX-yes)
>>>  FATE_SAMPLES_FFMPEG += $(FATE_SAMPLES_DEMUX)
>>>  FATE_FFPROBE_DEMUX   += $(FATE_FFPROBE_DEMUX-yes)
>>> diff --git a/tests/ref/fate/hls-adts-meta-demux
>> b/tests/ref/fate/hls-adts-meta-demux
>>> new file mode 100644
>>> index 0000000000..ab944695fc
>>> --- /dev/null
>>> +++ b/tests/ref/fate/hls-adts-meta-demux
>>> @@ -0,0 +1,124 @@
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3416400|pts_time=37.960000|dts=3416400|dts_time=37.960000|duration=2090|duration_time=0.023222|size=368|pos=0|flags=K__|data_hash=CRC32:c371b0d9
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3418490|pts_time=37.983222|dts=3418490|dts_time=37.983222|duration=2090|duration_time=0.023222|size=390|pos=368|flags=K__|data_hash=CRC32:950c52b2
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3420580|pts_time=38.006444|dts=3420580|dts_time=38.006444|duration=2090|duration_time=0.023222|size=357|pos=758|flags=K__|data_hash=CRC32:3e672212
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3422669|pts_time=38.029656|dts=3422669|dts_time=38.029656|duration=2090|duration_time=0.023222|size=426|pos=1115|flags=K__|data_hash=CRC32:817b6e4c
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3424759|pts_time=38.052878|dts=3424759|dts_time=38.052878|duration=2090|duration_time=0.023222|size=368|pos=1541|flags=K__|data_hash=CRC32:c4c6e1ed
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3426849|pts_time=38.076100|dts=3426849|dts_time=38.076100|duration=2090|duration_time=0.023222|size=389|pos=1909|flags=K__|data_hash=CRC32:67cb6dd9
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3428939|pts_time=38.099322|dts=3428939|dts_time=38.099322|duration=2090|duration_time=0.023222|size=352|pos=2298|flags=K__|data_hash=CRC32:7a56ff53
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3431029|pts_time=38.122544|dts=3431029|dts_time=38.122544|duration=2090|duration_time=0.023222|size=378|pos=2650|flags=K__|data_hash=CRC32:f8d5ef58
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3433118|pts_time=38.145756|dts=3433118|dts_time=38.145756|duration=2090|duration_time=0.023222|size=384|pos=3028|flags=K__|data_hash=CRC32:73a4fb1c
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3435208|pts_time=38.168978|dts=3435208|dts_time=38.168978|duration=2090|duration_time=0.023222|size=353|pos=3412|flags=K__|data_hash=CRC32:4ea999b5
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3437298|pts_time=38.192200|dts=3437298|dts_time=38.192200|duration=2090|duration_time=0.023222|size=417|pos=3765|flags=K__|data_hash=CRC32:4540aec8
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3439388|pts_time=38.215422|dts=3439388|dts_time=38.215422|duration=2090|duration_time=0.023222|size=361|pos=4182|flags=K__|data_hash=CRC32:635a04f4
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3441478|pts_time=38.238644|dts=3441478|dts_time=38.238644|duration=2090|duration_time=0.023222|size=399|pos=4543|flags=K__|data_hash=CRC32:94583c18
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3443567|pts_time=38.261856|dts=3443567|dts_time=38.261856|duration=2090|duration_time=0.023222|size=384|pos=4942|flags=K__|data_hash=CRC32:21070d79
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3445657|pts_time=38.285078|dts=3445657|dts_time=38.285078|duration=2090|duration_time=0.023222|size=378|pos=5326|flags=K__|data_hash=CRC32:bd5beb97
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3447747|pts_time=38.308300|dts=3447747|dts_time=38.308300|duration=2090|duration_time=0.023222|size=362|pos=5704|flags=K__|data_hash=CRC32:8bb15fb7
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3449837|pts_time=38.331522|dts=3449837|dts_time=38.331522|duration=2090|duration_time=0.023222|size=365|pos=6066|flags=K__|data_hash=CRC32:a1801ece
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3451927|pts_time=38.354744|dts=3451927|dts_time=38.354744|duration=2090|duration_time=0.023222|size=390|pos=6431|flags=K__|data_hash=CRC32:8eb3880b
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3454016|pts_time=38.377956|dts=3454016|dts_time=38.377956|duration=2090|duration_time=0.023222|size=358|pos=6821|flags=K__|data_hash=CRC32:b4b30472
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3456106|pts_time=38.401178|dts=3456106|dts_time=38.401178|duration=2090|duration_time=0.023222|size=395|pos=7179|flags=K__|data_hash=CRC32:b3e014b3
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3458196|pts_time=38.424400|dts=3458196|dts_time=38.424400|duration=2090|duration_time=0.023222|size=353|pos=7574|flags=K__|data_hash=CRC32:5b510322
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3460286|pts_time=38.447622|dts=3460286|dts_time=38.447622|duration=2090|duration_time=0.023222|size=423|pos=7927|flags=K__|data_hash=CRC32:f36d52f3
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3462376|pts_time=38.470844|dts=3462376|dts_time=38.470844|duration=2090|duration_time=0.023222|size=360|pos=8350|flags=K__|data_hash=CRC32:2bd95695
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3464465|pts_time=38.494056|dts=3464465|dts_time=38.494056|duration=2090|duration_time=0.023222|size=355|pos=8710|flags=K__|data_hash=CRC32:804bd6ba
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3466555|pts_time=38.517278|dts=3466555|dts_time=38.517278|duration=2090|duration_time=0.023222|size=419|pos=9065|flags=K__|data_hash=CRC32:6f2b27cf
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3468645|pts_time=38.540500|dts=3468645|dts_time=38.540500|duration=2090|duration_time=0.023222|size=353|pos=9484|flags=K__|data_hash=CRC32:4dca2d23
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3470735|pts_time=38.563722|dts=3470735|dts_time=38.563722|duration=2090|duration_time=0.023222|size=393|pos=9837|flags=K__|data_hash=CRC32:03511cbb
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3472824|pts_time=38.586933|dts=3472824|dts_time=38.586933|duration=2090|duration_time=0.023222|size=384|pos=10230|flags=K__|data_hash=CRC32:a0b2bdab
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3474914|pts_time=38.610156|dts=3474914|dts_time=38.610156|duration=2090|duration_time=0.023222|size=351|pos=10614|flags=K__|data_hash=CRC32:f11a77fb
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3477004|pts_time=38.633378|dts=3477004|dts_time=38.633378|duration=2090|duration_time=0.023222|size=413|pos=10965|flags=K__|data_hash=CRC32:b3d288b4
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3479094|pts_time=38.656600|dts=3479094|dts_time=38.656600|duration=2090|duration_time=0.023222|size=372|pos=11378|flags=K__|data_hash=CRC32:fbca6a8b
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3481184|pts_time=38.679822|dts=3481184|dts_time=38.679822|duration=2090|duration_time=0.023222|size=389|pos=11750|flags=K__|data_hash=CRC32:ca769187
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3483273|pts_time=38.703033|dts=3483273|dts_time=38.703033|duration=2090|duration_time=0.023222|size=353|pos=12139|flags=K__|data_hash=CRC32:a00ccdd1
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3485363|pts_time=38.726256|dts=3485363|dts_time=38.726256|duration=2090|duration_time=0.023222|size=404|pos=12492|flags=K__|data_hash=CRC32:6593e756
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3487453|pts_time=38.749478|dts=3487453|dts_time=38.749478|duration=2090|duration_time=0.023222|size=360|pos=12896|flags=K__|data_hash=CRC32:f87250e9
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3489543|pts_time=38.772700|dts=3489543|dts_time=38.772700|duration=2090|duration_time=0.023222|size=394|pos=13256|flags=K__|data_hash=CRC32:6f5ece5c
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3491633|pts_time=38.795922|dts=3491633|dts_time=38.795922|duration=2090|duration_time=0.023222|size=355|pos=13650|flags=K__|data_hash=CRC32:e3f880f2
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3493722|pts_time=38.819133|dts=3493722|dts_time=38.819133|duration=2090|duration_time=0.023222|size=377|pos=14005|flags=K__|data_hash=CRC32:6637f3b8
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3495812|pts_time=38.842356|dts=3495812|dts_time=38.842356|duration=2090|duration_time=0.023222|size=377|pos=14382|flags=K__|data_hash=CRC32:89220563
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3497902|pts_time=38.865578|dts=3497902|dts_time=38.865578|duration=2090|duration_time=0.023222|size=366|pos=14759|flags=K__|data_hash=CRC32:9ba37001
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3499992|pts_time=38.888800|dts=3499992|dts_time=38.888800|duration=2090|duration_time=0.023222|size=413|pos=15125|flags=K__|data_hash=CRC32:d59379d4
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3502082|pts_time=38.912022|dts=3502082|dts_time=38.912022|duration=2090|duration_time=0.023222|size=352|pos=15538|flags=K__|data_hash=CRC32:ca06f39a
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3504171|pts_time=38.935233|dts=3504171|dts_time=38.935233|duration=2090|duration_time=0.023222|size=408|pos=15890|flags=K__|data_hash=CRC32:a3d051e2
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3506261|pts_time=38.958456|dts=3506261|dts_time=38.958456|duration=2090|duration_time=0.023222|size=400|pos=16298|flags=K__|data_hash=CRC32:9e69c13b
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3508351|pts_time=38.981678|dts=3508351|dts_time=38.981678|duration=2090|duration_time=0.023222|size=392|pos=16698|flags=K__|data_hash=CRC32:2eee52a5
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3510441|pts_time=39.004900|dts=3510441|dts_time=39.004900|duration=2090|duration_time=0.023222|size=339|pos=17090|flags=K__|data_hash=CRC32:596af9cf
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3512531|pts_time=39.028122|dts=3512531|dts_time=39.028122|duration=2090|duration_time=0.023222|size=363|pos=17429|flags=K__|data_hash=CRC32:99c352e0
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3514620|pts_time=39.051333|dts=3514620|dts_time=39.051333|duration=2090|duration_time=0.023222|size=374|pos=17792|flags=K__|data_hash=CRC32:65aba789
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3516710|pts_time=39.074556|dts=3516710|dts_time=39.074556|duration=2090|duration_time=0.023222|size=365|pos=18166|flags=K__|data_hash=CRC32:245def8f
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3518800|pts_time=39.097778|dts=3518800|dts_time=39.097778|duration=2090|duration_time=0.023222|size=394|pos=18531|flags=K__|data_hash=CRC32:5084699e
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3520890|pts_time=39.121000|dts=3520890|dts_time=39.121000|duration=2090|duration_time=0.023222|size=353|pos=18925|flags=K__|data_hash=CRC32:81802260
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3522980|pts_time=39.144222|dts=3522980|dts_time=39.144222|duration=2090|duration_time=0.023222|size=428|pos=19278|flags=K__|data_hash=CRC32:1ee470f2
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3525069|pts_time=39.167433|dts=3525069|dts_time=39.167433|duration=2090|duration_time=0.023222|size=369|pos=19706|flags=K__|data_hash=CRC32:0cf541ad
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3527159|pts_time=39.190656|dts=3527159|dts_time=39.190656|duration=2090|duration_time=0.023222|size=352|pos=20075|flags=K__|data_hash=CRC32:f8c1d4e8
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3529249|pts_time=39.213878|dts=3529249|dts_time=39.213878|duration=2090|duration_time=0.023222|size=400|pos=20427|flags=K__|data_hash=CRC32:9394af89
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3531339|pts_time=39.237100|dts=3531339|dts_time=39.237100|duration=2090|duration_time=0.023222|size=362|pos=20827|flags=K__|data_hash=CRC32:6e6c95cf
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3533429|pts_time=39.260322|dts=3533429|dts_time=39.260322|duration=2090|duration_time=0.023222|size=396|pos=21189|flags=K__|data_hash=CRC32:e134ad64
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3535518|pts_time=39.283533|dts=3535518|dts_time=39.283533|duration=2090|duration_time=0.023222|size=393|pos=21585|flags=K__|data_hash=CRC32:8be673f1
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3537608|pts_time=39.306756|dts=3537608|dts_time=39.306756|duration=2090|duration_time=0.023222|size=353|pos=21978|flags=K__|data_hash=CRC32:fd068970
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3539698|pts_time=39.329978|dts=3539698|dts_time=39.329978|duration=2090|duration_time=0.023222|size=396|pos=22331|flags=K__|data_hash=CRC32:a4204659
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3541788|pts_time=39.353200|dts=3541788|dts_time=39.353200|duration=2090|duration_time=0.023222|size=379|pos=22727|flags=K__|data_hash=CRC32:28764b16
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3543878|pts_time=39.376422|dts=3543878|dts_time=39.376422|duration=2090|duration_time=0.023222|size=384|pos=23106|flags=K__|data_hash=CRC32:087f79a3
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3545967|pts_time=39.399633|dts=3545967|dts_time=39.399633|duration=2090|duration_time=0.023222|size=357|pos=23490|flags=K__|data_hash=CRC32:c6cee3f6
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3548057|pts_time=39.422856|dts=3548057|dts_time=39.422856|duration=2090|duration_time=0.023222|size=401|pos=23847|flags=K__|data_hash=CRC32:aff37eb7
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3550147|pts_time=39.446078|dts=3550147|dts_time=39.446078|duration=2090|duration_time=0.023222|size=358|pos=24248|flags=K__|data_hash=CRC32:930ec20c
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3552237|pts_time=39.469300|dts=3552237|dts_time=39.469300|duration=2090|duration_time=0.023222|size=404|pos=24606|flags=K__|data_hash=CRC32:ed87be8c
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3554327|pts_time=39.492522|dts=3554327|dts_time=39.492522|duration=2090|duration_time=0.023222|size=370|pos=25010|flags=K__|data_hash=CRC32:c7036091
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3556416|pts_time=39.515733|dts=3556416|dts_time=39.515733|duration=2090|duration_time=0.023222|size=366|pos=25380|flags=K__|data_hash=CRC32:72ef3e91
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3558506|pts_time=39.538956|dts=3558506|dts_time=39.538956|duration=2090|duration_time=0.023222|size=365|pos=25746|flags=K__|data_hash=CRC32:05f5a44a
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3560596|pts_time=39.562178|dts=3560596|dts_time=39.562178|duration=2090|duration_time=0.023222|size=367|pos=26111|flags=K__|data_hash=CRC32:388ca65f
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3562686|pts_time=39.585400|dts=3562686|dts_time=39.585400|duration=2090|duration_time=0.023222|size=403|pos=26478|flags=K__|data_hash=CRC32:9bbc8816
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3564776|pts_time=39.608622|dts=3564776|dts_time=39.608622|duration=2090|duration_time=0.023222|size=368|pos=26881|flags=K__|data_hash=CRC32:0660a10d
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3566865|pts_time=39.631833|dts=3566865|dts_time=39.631833|duration=2090|duration_time=0.023222|size=388|pos=27249|flags=K__|data_hash=CRC32:76f0191f
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3568955|pts_time=39.655056|dts=3568955|dts_time=39.655056|duration=2090|duration_time=0.023222|size=361|pos=27637|flags=K__|data_hash=CRC32:d14107df
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3571045|pts_time=39.678278|dts=3571045|dts_time=39.678278|duration=2090|duration_time=0.023222|size=380|pos=27998|flags=K__|data_hash=CRC32:5a4bfaa1
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3573135|pts_time=39.701500|dts=3573135|dts_time=39.701500|duration=2090|duration_time=0.023222|size=381|pos=28378|flags=K__|data_hash=CRC32:3565436e
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3575224|pts_time=39.724711|dts=3575224|dts_time=39.724711|duration=2090|duration_time=0.023222|size=362|pos=28759|flags=K__|data_hash=CRC32:7e88f30f
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3577314|pts_time=39.747933|dts=3577314|dts_time=39.747933|duration=2090|duration_time=0.023222|size=406|pos=29121|flags=K__|data_hash=CRC32:6bb904a9
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3579404|pts_time=39.771156|dts=3579404|dts_time=39.771156|duration=2090|duration_time=0.023222|size=365|pos=29527|flags=K__|data_hash=CRC32:fb889595
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3581494|pts_time=39.794378|dts=3581494|dts_time=39.794378|duration=2090|duration_time=0.023222|size=384|pos=29892|flags=K__|data_hash=CRC32:c6e2f065
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3583584|pts_time=39.817600|dts=3583584|dts_time=39.817600|duration=2090|duration_time=0.023222|size=364|pos=30276|flags=K__|data_hash=CRC32:1eafc85e
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3585673|pts_time=39.840811|dts=3585673|dts_time=39.840811|duration=2090|duration_time=0.023222|size=400|pos=30640|flags=K__|data_hash=CRC32:cc280553
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3587763|pts_time=39.864033|dts=3587763|dts_time=39.864033|duration=2090|duration_time=0.023222|size=383|pos=31040|flags=K__|data_hash=CRC32:46d3129c
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3589853|pts_time=39.887256|dts=3589853|dts_time=39.887256|duration=2090|duration_time=0.023222|size=342|pos=31423|flags=K__|data_hash=CRC32:114b34eb
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3591943|pts_time=39.910478|dts=3591943|dts_time=39.910478|duration=2090|duration_time=0.023222|size=437|pos=31765|flags=K__|data_hash=CRC32:e1e85144
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3594033|pts_time=39.933700|dts=3594033|dts_time=39.933700|duration=2090|duration_time=0.023222|size=350|pos=32202|flags=K__|data_hash=CRC32:9a02bb70
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3596122|pts_time=39.956911|dts=3596122|dts_time=39.956911|duration=2090|duration_time=0.023222|size=401|pos=32552|flags=K__|data_hash=CRC32:e3cf3e45
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3598212|pts_time=39.980133|dts=3598212|dts_time=39.980133|duration=2090|duration_time=0.023222|size=394|pos=32953|flags=K__|data_hash=CRC32:ae8bc4b2
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3600302|pts_time=40.003356|dts=3600302|dts_time=40.003356|duration=2090|duration_time=0.023222|size=345|pos=33347|flags=K__|data_hash=CRC32:7832c3d0
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3602392|pts_time=40.026578|dts=3602392|dts_time=40.026578|duration=2090|duration_time=0.023222|size=410|pos=33692|flags=K__|data_hash=CRC32:df683be6
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3604482|pts_time=40.049800|dts=3604482|dts_time=40.049800|duration=2090|duration_time=0.023222|size=375|pos=34102|flags=K__|data_hash=CRC32:34d7b41a
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3606571|pts_time=40.073011|dts=3606571|dts_time=40.073011|duration=2090|duration_time=0.023222|size=374|pos=34477|flags=K__|data_hash=CRC32:8f4640d5
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3608661|pts_time=40.096233|dts=3608661|dts_time=40.096233|duration=2090|duration_time=0.023222|size=354|pos=34851|flags=K__|data_hash=CRC32:e7d2863f
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3610751|pts_time=40.119456|dts=3610751|dts_time=40.119456|duration=2090|duration_time=0.023222|size=396|pos=35205|flags=K__|data_hash=CRC32:66bd4930
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3612841|pts_time=40.142678|dts=3612841|dts_time=40.142678|duration=2090|duration_time=0.023222|size=372|pos=35601|flags=K__|data_hash=CRC32:8a4ea872
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3614931|pts_time=40.165900|dts=3614931|dts_time=40.165900|duration=2090|duration_time=0.023222|size=381|pos=35973|flags=K__|data_hash=CRC32:d64d85a8
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3617020|pts_time=40.189111|dts=3617020|dts_time=40.189111|duration=2090|duration_time=0.023222|size=353|pos=36354|flags=K__|data_hash=CRC32:83beba28
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3619110|pts_time=40.212333|dts=3619110|dts_time=40.212333|duration=2090|duration_time=0.023222|size=381|pos=36707|flags=K__|data_hash=CRC32:6f1a22c8
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3621200|pts_time=40.235556|dts=3621200|dts_time=40.235556|duration=2090|duration_time=0.023222|size=383|pos=37088|flags=K__|data_hash=CRC32:75a208c1
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3623290|pts_time=40.258778|dts=3623290|dts_time=40.258778|duration=2090|duration_time=0.023222|size=354|pos=37471|flags=K__|data_hash=CRC32:71efb40d
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3625380|pts_time=40.282000|dts=3625380|dts_time=40.282000|duration=2090|duration_time=0.023222|size=419|pos=37825|flags=K__|data_hash=CRC32:a50c245a
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3627469|pts_time=40.305211|dts=3627469|dts_time=40.305211|duration=2090|duration_time=0.023222|size=361|pos=38244|flags=K__|data_hash=CRC32:52b88d68
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3629559|pts_time=40.328433|dts=3629559|dts_time=40.328433|duration=2090|duration_time=0.023222|size=384|pos=38605|flags=K__|data_hash=CRC32:dd8bf439
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3631649|pts_time=40.351656|dts=3631649|dts_time=40.351656|duration=2090|duration_time=0.023222|size=363|pos=38989|flags=K__|data_hash=CRC32:d31ec44d
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3633739|pts_time=40.374878|dts=3633739|dts_time=40.374878|duration=2090|duration_time=0.023222|size=389|pos=39352|flags=K__|data_hash=CRC32:3d0f896a
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3635829|pts_time=40.398100|dts=3635829|dts_time=40.398100|duration=2090|duration_time=0.023222|size=380|pos=39741|flags=K__|data_hash=CRC32:163302e2
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3637918|pts_time=40.421311|dts=3637918|dts_time=40.421311|duration=2090|duration_time=0.023222|size=353|pos=40121|flags=K__|data_hash=CRC32:29612204
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3640008|pts_time=40.444533|dts=3640008|dts_time=40.444533|duration=2090|duration_time=0.023222|size=416|pos=40474|flags=K__|data_hash=CRC32:bb5ab61f
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3642098|pts_time=40.467756|dts=3642098|dts_time=40.467756|duration=2090|duration_time=0.023222|size=358|pos=40890|flags=K__|data_hash=CRC32:58e5f54f
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3644188|pts_time=40.490978|dts=3644188|dts_time=40.490978|duration=2090|duration_time=0.023222|size=399|pos=41248|flags=K__|data_hash=CRC32:be84d1e5
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3646278|pts_time=40.514200|dts=3646278|dts_time=40.514200|duration=2090|duration_time=0.023222|size=396|pos=41647|flags=K__|data_hash=CRC32:65f493a0
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3648367|pts_time=40.537411|dts=3648367|dts_time=40.537411|duration=2090|duration_time=0.023222|size=372|pos=42043|flags=K__|data_hash=CRC32:1654859d
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3650457|pts_time=40.560633|dts=3650457|dts_time=40.560633|duration=2090|duration_time=0.023222|size=369|pos=42415|flags=K__|data_hash=CRC32:c730ed52
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3652547|pts_time=40.583856|dts=3652547|dts_time=40.583856|duration=2090|duration_time=0.023222|size=343|pos=42784|flags=K__|data_hash=CRC32:148d0908
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3654637|pts_time=40.607078|dts=3654637|dts_time=40.607078|duration=2090|duration_time=0.023222|size=417|pos=43127|flags=K__|data_hash=CRC32:2dc10245
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3656727|pts_time=40.630300|dts=3656727|dts_time=40.630300|duration=2090|duration_time=0.023222|size=355|pos=43544|flags=K__|data_hash=CRC32:8d121e95
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3658816|pts_time=40.653511|dts=3658816|dts_time=40.653511|duration=2090|duration_time=0.023222|size=410|pos=43899|flags=K__|data_hash=CRC32:ea6b90a8
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3660906|pts_time=40.676733|dts=3660906|dts_time=40.676733|duration=2090|duration_time=0.023222|size=383|pos=44309|flags=K__|data_hash=CRC32:af456224
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3662996|pts_time=40.699956|dts=3662996|dts_time=40.699956|duration=2090|duration_time=0.023222|size=368|pos=44692|flags=K__|data_hash=CRC32:5270e19c
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3665086|pts_time=40.723178|dts=3665086|dts_time=40.723178|duration=2090|duration_time=0.023222|size=379|pos=45060|flags=K__|data_hash=CRC32:fb380ace
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3667176|pts_time=40.746400|dts=3667176|dts_time=40.746400|duration=2090|duration_time=0.023222|size=351|pos=45439|flags=K__|data_hash=CRC32:7bba4016
>>>
>> +packet|codec_type=audio|stream_index=0|pts=3669265|pts_time=40.769611|dts=3669265|dts_time=40.769611|duration=2090|duration_time=0.023222|size=422|pos=45790|flags=K__|data_hash=CRC32:119eaa42
>>>
>> +stream|index=0|codec_name=aac|profile=1|codec_type=audio|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|sample_fmt=fltp|sample_rate=44100|channels=2|channel_layout=stereo|bits_per_sample=0|initial_padding=0|id=N/A|r_frame_rate=0/0|avg_frame_rate=0/0|time_base=1/90000|start_pts=3416400|start_time=37.960000|duration_ts=N/A|duration=N/A|bit_rate=130405|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=122|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|disposition:timed_thumbnails=0|disposition:non_diegetic=0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|tag:variant_bitrate=140800|tag:album=foolol|tag:title=test
>> title 2
>>>
>> +format|filename=bla|nb_streams=1|nb_programs=1|nb_stream_groups=0|format_name=hls|start_time=37.960000|duration=2.840000|size=74|bit_rate=208|probe_score=100
>>
>> Can't you cut the length of the files down to (say) 10 AAC frames each?
>>
>>
> Ok will do
> 

Thanks. Would it also be possible to encrypt this and test our handling
of encrypted content (hls_sample_encryption.c) in the same test?

- Andreas

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-04-12 18:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26  0:56 [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 metadata update Romain Beauxis
2024-03-26  0:56 ` [FFmpeg-devel] [PATCH 2/2] Add fate test for hls " Romain Beauxis
2024-04-11 14:17   ` Andreas Rheinhardt
2024-04-12 18:37     ` Romain Beauxis
2024-04-12 18:39       ` Andreas Rheinhardt
2024-03-28 22:51 ` [FFmpeg-devel] [PATCH 1/2] libavformat/hls.c: support in-stream ID3 " Romain Beauxis
2024-03-29  8:44   ` Steven Liu
2024-03-31 10:52   ` Liu Steven
2024-03-31 17:46     ` Romain Beauxis
2024-04-06 17:48       ` Romain Beauxis
2024-04-07 10:44 ` Steven Liu
2024-04-07 14:46   ` Romain Beauxis
2024-04-11 14:04     ` Romain Beauxis

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git