* [FFmpeg-devel] [PATCH] libavformat/mov: Add support for exporting poster time.
@ 2022-10-03 16:08 Bryce Chester Newman
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 0/2] " ffmpegagent
0 siblings, 1 reply; 7+ messages in thread
From: Bryce Chester Newman @ 2022-10-03 16:08 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Bryce Chester Newman
From: Bryce Chester Newman <bryce.newman@gettyimages.com>
Export the poster_time_location if available.
The poster_time_location is calculated using
the poster_time / time_scale = X seconds.
The value of poster_time_location indicates
where in the video the poster frame is.
Addresses feedback
from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html.
Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com
---
libavformat/mov: Add support for exporting poster time.
Export the poster_time_location if available. The poster_time_location
is calculated using the poster_time / time_scale = X seconds. The value
of poster_time_location indicates where in the video the poster frame
is.
Addresses feedback from
https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html.
Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-41%2Fbrycechesternewman%2Fadd_poster_time_location_mov-v1
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-41/brycechesternewman/add_poster_time_location_mov-v1
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/41
doc/demuxers.texi | 6 ++++++
libavformat/isom.h | 1 +
libavformat/mov.c | 13 +++++++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index 2b6dd86c2a..b1f4926c40 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -749,6 +749,12 @@ cast to int32 are used to adjust onward dts.
Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto
a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range.
+
+@item poster_time_location
+Export the poster_time_location if available.
+The poster_time_location is calculated using the poster_time / time_scale = X seconds.
+The value of poster_time_location indicates where in the video the poster frame is.
+Default is false.
@end table
@subsection Audible AAX
diff --git a/libavformat/isom.h b/libavformat/isom.h
index 64fb7065d5..fb3d8d5618 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -326,6 +326,7 @@ typedef struct MOVContext {
int64_t extent_offset;
} *avif_info;
int avif_info_size;
+ int poster_time_location;
} MOVContext;
int ff_mp4_read_descr_len(AVIOContext *pb);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1f436e21d6..b914bbc96a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1501,6 +1501,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int i;
int64_t creation_time;
+ int32_t poster_time;
int version = avio_r8(pb); /* version */
avio_rb24(pb); /* flags */
@@ -1535,12 +1536,20 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb32(pb); /* preview time */
avio_rb32(pb); /* preview duration */
- avio_rb32(pb); /* poster time */
+ poster_time = avio_rb32(pb); /* poster time */
avio_rb32(pb); /* selection time */
avio_rb32(pb); /* selection duration */
avio_rb32(pb); /* current time */
avio_rb32(pb); /* next track ID */
+ if(c->poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
+ av_log(c->fc, AV_LOG_TRACE, "poster_time = %i, time_scale = %i\n", poster_time, c->time_scale);
+ char buffer[32];
+ int poster_time_location = poster_time / c->time_scale;
+ snprintf(buffer, sizeof(buffer), "%i", poster_time_location);
+ av_dict_set(&c->fc->metadata, "poster_time_location", buffer, 0);
+ }
+
return 0;
}
@@ -9114,7 +9123,7 @@ static const AVOption mov_options[] = {
{ "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_BOOL,
{.i64 = 0}, 0, 1, FLAGS },
{ "max_stts_delta", "treat offsets above this value as invalid", OFFSET(max_stts_delta), AV_OPT_TYPE_INT, {.i64 = UINT_MAX-48000*10 }, 0, UINT_MAX, .flags = AV_OPT_FLAG_DECODING_PARAM },
-
+ { "poster_time_location", "Export the poster time location.", OFFSET(poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
{ NULL },
};
base-commit: 5f02a261a2ddca7c79198869b45d35019baac819
--
ffmpeg-codebot
_______________________________________________
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] 7+ messages in thread
* [FFmpeg-devel] [PATCH v2 0/2] libavformat/mov: Add support for exporting poster time.
2022-10-03 16:08 [FFmpeg-devel] [PATCH] libavformat/mov: Add support for exporting poster time Bryce Chester Newman
@ 2022-10-05 14:25 ` ffmpegagent
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 1/2] " Bryce Chester Newman
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 2/2] ibavformat/mov: " Bryce Chester Newman
0 siblings, 2 replies; 7+ messages in thread
From: ffmpegagent @ 2022-10-05 14:25 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: brycechesternewman
Export the poster_time_location if available. The poster_time_location is
calculated using the poster_time / time_scale = X seconds. The value of
poster_time_location indicates where in the video the poster frame is.
Addresses feedback from
https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html.
Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com
Bryce Chester Newman (2):
libavformat/mov: Add support for exporting poster time.
ibavformat/mov: Add support for exporting poster time.
doc/demuxers.texi | 6 ++++++
libavformat/isom.h | 1 +
libavformat/mov.c | 13 +++++++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
base-commit: 5f02a261a2ddca7c79198869b45d35019baac819
Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-41%2Fbrycechesternewman%2Fadd_poster_time_location_mov-v2
Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-41/brycechesternewman/add_poster_time_location_mov-v2
Pull-Request: https://github.com/ffstaging/FFmpeg/pull/41
Range-diff vs v1:
1: c10a75a9ed = 1: c10a75a9ed libavformat/mov: Add support for exporting poster time.
-: ---------- > 2: c8f54a5d86 ibavformat/mov: Add support for exporting poster time.
--
ffmpeg-codebot
_______________________________________________
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] 7+ messages in thread
* [FFmpeg-devel] [PATCH v2 1/2] libavformat/mov: Add support for exporting poster time.
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 0/2] " ffmpegagent
@ 2022-10-05 14:25 ` Bryce Chester Newman
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 2/2] ibavformat/mov: " Bryce Chester Newman
1 sibling, 0 replies; 7+ messages in thread
From: Bryce Chester Newman @ 2022-10-05 14:25 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Bryce Chester Newman
From: Bryce Chester Newman <bryce.newman@gettyimages.com>
Export the poster_time_location if available.
The poster_time_location is calculated using
the poster_time / time_scale = X seconds.
The value of poster_time_location indicates
where in the video the poster frame is.
Addresses feedback
from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html.
Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com
---
doc/demuxers.texi | 6 ++++++
libavformat/isom.h | 1 +
libavformat/mov.c | 13 +++++++++++--
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index 2b6dd86c2a..b1f4926c40 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -749,6 +749,12 @@ cast to int32 are used to adjust onward dts.
Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto
a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range.
+
+@item poster_time_location
+Export the poster_time_location if available.
+The poster_time_location is calculated using the poster_time / time_scale = X seconds.
+The value of poster_time_location indicates where in the video the poster frame is.
+Default is false.
@end table
@subsection Audible AAX
diff --git a/libavformat/isom.h b/libavformat/isom.h
index 64fb7065d5..fb3d8d5618 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -326,6 +326,7 @@ typedef struct MOVContext {
int64_t extent_offset;
} *avif_info;
int avif_info_size;
+ int poster_time_location;
} MOVContext;
int ff_mp4_read_descr_len(AVIOContext *pb);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1f436e21d6..b914bbc96a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1501,6 +1501,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int i;
int64_t creation_time;
+ int32_t poster_time;
int version = avio_r8(pb); /* version */
avio_rb24(pb); /* flags */
@@ -1535,12 +1536,20 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb32(pb); /* preview time */
avio_rb32(pb); /* preview duration */
- avio_rb32(pb); /* poster time */
+ poster_time = avio_rb32(pb); /* poster time */
avio_rb32(pb); /* selection time */
avio_rb32(pb); /* selection duration */
avio_rb32(pb); /* current time */
avio_rb32(pb); /* next track ID */
+ if(c->poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
+ av_log(c->fc, AV_LOG_TRACE, "poster_time = %i, time_scale = %i\n", poster_time, c->time_scale);
+ char buffer[32];
+ int poster_time_location = poster_time / c->time_scale;
+ snprintf(buffer, sizeof(buffer), "%i", poster_time_location);
+ av_dict_set(&c->fc->metadata, "poster_time_location", buffer, 0);
+ }
+
return 0;
}
@@ -9114,7 +9123,7 @@ static const AVOption mov_options[] = {
{ "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_BOOL,
{.i64 = 0}, 0, 1, FLAGS },
{ "max_stts_delta", "treat offsets above this value as invalid", OFFSET(max_stts_delta), AV_OPT_TYPE_INT, {.i64 = UINT_MAX-48000*10 }, 0, UINT_MAX, .flags = AV_OPT_FLAG_DECODING_PARAM },
-
+ { "poster_time_location", "Export the poster time location.", OFFSET(poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
{ NULL },
};
--
ffmpeg-codebot
_______________________________________________
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] 7+ messages in thread
* [FFmpeg-devel] [PATCH v2 2/2] ibavformat/mov: Add support for exporting poster time.
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 0/2] " ffmpegagent
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 1/2] " Bryce Chester Newman
@ 2022-10-05 14:25 ` Bryce Chester Newman
2022-11-28 14:11 ` [FFmpeg-devel] [EXTERNAL] " Bryce Newman
2023-01-10 2:56 ` [FFmpeg-devel] " "zhilizhao(赵志立)"
1 sibling, 2 replies; 7+ messages in thread
From: Bryce Chester Newman @ 2022-10-05 14:25 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Bryce Chester Newman
From: Bryce Chester Newman <bryce.newman@gettyimages.com>
Change demuxer option name from
poster_time_location
to export_poster_time_location.
Export the poster_time_location if available.
The poster_time_location is calculated using
the poster_time / time_scale = X seconds.
The value of poster_time_location indicates
where in the video the poster frame is.
Addresses feedback
from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html.
Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com
---
doc/demuxers.texi | 4 ++--
libavformat/isom.h | 2 +-
libavformat/mov.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index b1f4926c40..447287357d 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -750,10 +750,10 @@ cast to int32 are used to adjust onward dts.
Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto
a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range.
-@item poster_time_location
+@item export_poster_time_location
Export the poster_time_location if available.
The poster_time_location is calculated using the poster_time / time_scale = X seconds.
-The value of poster_time_location indicates where in the video the poster frame is.
+The value of the poster_time_location key indicates where in the video the poster frame is.
Default is false.
@end table
diff --git a/libavformat/isom.h b/libavformat/isom.h
index fb3d8d5618..f621abec76 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -326,7 +326,7 @@ typedef struct MOVContext {
int64_t extent_offset;
} *avif_info;
int avif_info_size;
- int poster_time_location;
+ int export_poster_time_location;
} MOVContext;
int ff_mp4_read_descr_len(AVIOContext *pb);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b914bbc96a..be939f6cc2 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1542,7 +1542,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb32(pb); /* current time */
avio_rb32(pb); /* next track ID */
- if(c->poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
+ if(c->export_poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
av_log(c->fc, AV_LOG_TRACE, "poster_time = %i, time_scale = %i\n", poster_time, c->time_scale);
char buffer[32];
int poster_time_location = poster_time / c->time_scale;
@@ -9123,7 +9123,7 @@ static const AVOption mov_options[] = {
{ "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_BOOL,
{.i64 = 0}, 0, 1, FLAGS },
{ "max_stts_delta", "treat offsets above this value as invalid", OFFSET(max_stts_delta), AV_OPT_TYPE_INT, {.i64 = UINT_MAX-48000*10 }, 0, UINT_MAX, .flags = AV_OPT_FLAG_DECODING_PARAM },
- { "poster_time_location", "Export the poster time location.", OFFSET(poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
+ { "export_poster_time_location", "Export the poster time location.", OFFSET(export_poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
{ NULL },
};
--
ffmpeg-codebot
_______________________________________________
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] 7+ messages in thread
* Re: [FFmpeg-devel] [EXTERNAL] [PATCH v2 2/2] ibavformat/mov: Add support for exporting poster time.
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 2/2] ibavformat/mov: " Bryce Chester Newman
@ 2022-11-28 14:11 ` Bryce Newman
2023-01-09 17:01 ` Bryce Newman
2023-01-10 2:56 ` [FFmpeg-devel] " "zhilizhao(赵志立)"
1 sibling, 1 reply; 7+ messages in thread
From: Bryce Newman @ 2022-11-28 14:11 UTC (permalink / raw)
To: ffmpeg-devel
[-- Attachment #1.1: Type: text/plain, Size: 3987 bytes --]
Hi,
This should address the feedback from a prior change that was not accepted.
Could I please get some eyes on this?
Thank you in advance.
Bryce
Bryce Chester Newman | Principal Developer
p: +12069255045 |
From: Bryce Chester Newman <ffmpegagent@gmail.com>
Date: Wednesday, October 5, 2022 at 8:25 AM
To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org>
Cc: Bryce Newman <bryce.newman@gettyimages.com>, Bryce Newman <bryce.newman@gettyimages.com>
Subject: [EXTERNAL] [PATCH v2 2/2] ibavformat/mov: Add support for exporting poster time.
From: Bryce Chester Newman <bryce.newman@gettyimages.com>
Change demuxer option name from
poster_time_location
to export_poster_time_location.
Export the poster_time_location if available.
The poster_time_location is calculated using
the poster_time / time_scale = X seconds.
The value of poster_time_location indicates
where in the video the poster frame is.
Addresses feedback
from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html.
Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com
---
doc/demuxers.texi | 4 ++--
libavformat/isom.h | 2 +-
libavformat/mov.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index b1f4926c40..447287357d 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -750,10 +750,10 @@ cast to int32 are used to adjust onward dts.
Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto
a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range.
-@item poster_time_location
+@item export_poster_time_location
Export the poster_time_location if available.
The poster_time_location is calculated using the poster_time / time_scale = X seconds.
-The value of poster_time_location indicates where in the video the poster frame is.
+The value of the poster_time_location key indicates where in the video the poster frame is.
Default is false.
@end table
diff --git a/libavformat/isom.h b/libavformat/isom.h
index fb3d8d5618..f621abec76 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -326,7 +326,7 @@ typedef struct MOVContext {
int64_t extent_offset;
} *avif_info;
int avif_info_size;
- int poster_time_location;
+ int export_poster_time_location;
} MOVContext;
int ff_mp4_read_descr_len(AVIOContext *pb);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b914bbc96a..be939f6cc2 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1542,7 +1542,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb32(pb); /* current time */
avio_rb32(pb); /* next track ID */
- if(c->poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
+ if(c->export_poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
av_log(c->fc, AV_LOG_TRACE, "poster_time = %i, time_scale = %i\n", poster_time, c->time_scale);
char buffer[32];
int poster_time_location = poster_time / c->time_scale;
@@ -9123,7 +9123,7 @@ static const AVOption mov_options[] = {
{ "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_BOOL,
{.i64 = 0}, 0, 1, FLAGS },
{ "max_stts_delta", "treat offsets above this value as invalid", OFFSET(max_stts_delta), AV_OPT_TYPE_INT, {.i64 = UINT_MAX-48000*10 }, 0, UINT_MAX, .flags = AV_OPT_FLAG_DECODING_PARAM },
- { "poster_time_location", "Export the poster time location.", OFFSET(poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
+ { "export_poster_time_location", "Export the poster time location.", OFFSET(export_poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
{ NULL },
};
--
ffmpeg-codebot
[-- Attachment #1.2: 0.png --]
[-- Type: image/png, Size: 2684 bytes --]
[-- Attachment #1.3: 1.png --]
[-- Type: image/png, Size: 2260 bytes --]
[-- Attachment #1.4: 2.png --]
[-- Type: image/png, Size: 2256 bytes --]
[-- Attachment #1.5: 3.png --]
[-- Type: image/png, Size: 7110 bytes --]
[-- Attachment #1.6: 4.jpg --]
[-- Type: image/jpeg, Size: 7125 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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] 7+ messages in thread
* Re: [FFmpeg-devel] [EXTERNAL] [PATCH v2 2/2] ibavformat/mov: Add support for exporting poster time.
2022-11-28 14:11 ` [FFmpeg-devel] [EXTERNAL] " Bryce Newman
@ 2023-01-09 17:01 ` Bryce Newman
0 siblings, 0 replies; 7+ messages in thread
From: Bryce Newman @ 2023-01-09 17:01 UTC (permalink / raw)
To: ffmpeg-devel
[-- Attachment #1.1: Type: text/plain, Size: 4341 bytes --]
Hi,
Any possibility of getting this change into the next versioned release of FFmpeg?
Thank you.
Bryce
Bryce Chester Newman | Principal Developer
p: +12069255045 |
From: Bryce Newman <bryce.newman@gettyimages.com>
Date: Monday, November 28, 2022 at 7:11 AM
To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org>
Subject: Re: [EXTERNAL] [PATCH v2 2/2] ibavformat/mov: Add support for exporting poster time.
Hi,
This should address the feedback from a prior change that was not accepted.
Could I please get some eyes on this?
Thank you in advance.
Bryce
From: Bryce Chester Newman <ffmpegagent@gmail.com>
Date: Wednesday, October 5, 2022 at 8:25 AM
To: ffmpeg-devel@ffmpeg.org <ffmpeg-devel@ffmpeg.org>
Cc: Bryce Newman <bryce.newman@gettyimages.com>, Bryce Newman <bryce.newman@gettyimages.com>
Subject: [EXTERNAL] [PATCH v2 2/2] ibavformat/mov: Add support for exporting poster time.
From: Bryce Chester Newman <bryce.newman@gettyimages.com>
Change demuxer option name from
poster_time_location
to export_poster_time_location.
Export the poster_time_location if available.
The poster_time_location is calculated using
the poster_time / time_scale = X seconds.
The value of poster_time_location indicates
where in the video the poster frame is.
Addresses feedback
from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html.
Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com
---
doc/demuxers.texi | 4 ++--
libavformat/isom.h | 2 +-
libavformat/mov.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/doc/demuxers.texi b/doc/demuxers.texi
index b1f4926c40..447287357d 100644
--- a/doc/demuxers.texi
+++ b/doc/demuxers.texi
@@ -750,10 +750,10 @@ cast to int32 are used to adjust onward dts.
Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto
a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range.
-@item poster_time_location
+@item export_poster_time_location
Export the poster_time_location if available.
The poster_time_location is calculated using the poster_time / time_scale = X seconds.
-The value of poster_time_location indicates where in the video the poster frame is.
+The value of the poster_time_location key indicates where in the video the poster frame is.
Default is false.
@end table
diff --git a/libavformat/isom.h b/libavformat/isom.h
index fb3d8d5618..f621abec76 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -326,7 +326,7 @@ typedef struct MOVContext {
int64_t extent_offset;
} *avif_info;
int avif_info_size;
- int poster_time_location;
+ int export_poster_time_location;
} MOVContext;
int ff_mp4_read_descr_len(AVIOContext *pb);
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b914bbc96a..be939f6cc2 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1542,7 +1542,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
avio_rb32(pb); /* current time */
avio_rb32(pb); /* next track ID */
- if(c->poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
+ if(c->export_poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
av_log(c->fc, AV_LOG_TRACE, "poster_time = %i, time_scale = %i\n", poster_time, c->time_scale);
char buffer[32];
int poster_time_location = poster_time / c->time_scale;
@@ -9123,7 +9123,7 @@ static const AVOption mov_options[] = {
{ "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_BOOL,
{.i64 = 0}, 0, 1, FLAGS },
{ "max_stts_delta", "treat offsets above this value as invalid", OFFSET(max_stts_delta), AV_OPT_TYPE_INT, {.i64 = UINT_MAX-48000*10 }, 0, UINT_MAX, .flags = AV_OPT_FLAG_DECODING_PARAM },
- { "poster_time_location", "Export the poster time location.", OFFSET(poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
+ { "export_poster_time_location", "Export the poster time location.", OFFSET(export_poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
{ NULL },
};
--
ffmpeg-codebot
[-- Attachment #1.2: 0.png --]
[-- Type: image/png, Size: 2684 bytes --]
[-- Attachment #1.3: 1.png --]
[-- Type: image/png, Size: 2260 bytes --]
[-- Attachment #1.4: 2.png --]
[-- Type: image/png, Size: 2256 bytes --]
[-- Attachment #1.5: 3.png --]
[-- Type: image/png, Size: 7110 bytes --]
[-- Attachment #1.6: 4.jpg --]
[-- Type: image/jpeg, Size: 33779 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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] 7+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2 2/2] ibavformat/mov: Add support for exporting poster time.
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 2/2] ibavformat/mov: " Bryce Chester Newman
2022-11-28 14:11 ` [FFmpeg-devel] [EXTERNAL] " Bryce Newman
@ 2023-01-10 2:56 ` "zhilizhao(赵志立)"
1 sibling, 0 replies; 7+ messages in thread
From: "zhilizhao(赵志立)" @ 2023-01-10 2:56 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Bryce Chester Newman
> On Oct 5, 2022, at 22:25, Bryce Chester Newman <ffmpegagent@gmail.com> wrote:
>
> From: Bryce Chester Newman <bryce.newman@gettyimages.com>
>
> Change demuxer option name from
> poster_time_location
> to export_poster_time_location.
>
> Export the poster_time_location if available.
> The poster_time_location is calculated using
> the poster_time / time_scale = X seconds.
> The value of poster_time_location indicates
> where in the video the poster frame is.
>
> Addresses feedback
> from https://www.mail-archive.com/ffmpeg-devel@ffmpeg.org/msg138122.html.
>
> Signed-off-by: Bryce Chester Newman bryce.newman@gettyimages.com
> ---
> doc/demuxers.texi | 4 ++--
> libavformat/isom.h | 2 +-
> libavformat/mov.c | 4 ++--
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/doc/demuxers.texi b/doc/demuxers.texi
> index b1f4926c40..447287357d 100644
> --- a/doc/demuxers.texi
> +++ b/doc/demuxers.texi
> @@ -750,10 +750,10 @@ cast to int32 are used to adjust onward dts.
> Unit is the track time scale. Range is 0 to UINT_MAX. Default is @code{UINT_MAX - 48000*10} which allows upto
> a 10 second dts correction for 48 kHz audio streams while accommodating 99.9% of @code{uint32} range.
>
> -@item poster_time_location
> +@item export_poster_time_location
> Export the poster_time_location if available.
> The poster_time_location is calculated using the poster_time / time_scale = X seconds.
> -The value of poster_time_location indicates where in the video the poster frame is.
> +The value of the poster_time_location key indicates where in the video the poster frame is.
> Default is false.
> @end table
>
> diff --git a/libavformat/isom.h b/libavformat/isom.h
> index fb3d8d5618..f621abec76 100644
> --- a/libavformat/isom.h
> +++ b/libavformat/isom.h
> @@ -326,7 +326,7 @@ typedef struct MOVContext {
> int64_t extent_offset;
> } *avif_info;
> int avif_info_size;
> - int poster_time_location;
> + int export_poster_time_location;
> } MOVContext;
>
> int ff_mp4_read_descr_len(AVIOContext *pb);
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index b914bbc96a..be939f6cc2 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -1542,7 +1542,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
> avio_rb32(pb); /* current time */
> avio_rb32(pb); /* next track ID */
>
> - if(c->poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
> + if(c->export_poster_time_location && poster_time && c->time_scale && c->time_scale > 0) {
> av_log(c->fc, AV_LOG_TRACE, "poster_time = %i, time_scale = %i\n", poster_time, c->time_scale);
> char buffer[32];
> int poster_time_location = poster_time / c->time_scale;
> @@ -9123,7 +9123,7 @@ static const AVOption mov_options[] = {
> { "enable_drefs", "Enable external track support.", OFFSET(enable_drefs), AV_OPT_TYPE_BOOL,
> {.i64 = 0}, 0, 1, FLAGS },
> { "max_stts_delta", "treat offsets above this value as invalid", OFFSET(max_stts_delta), AV_OPT_TYPE_INT, {.i64 = UINT_MAX-48000*10 }, 0, UINT_MAX, .flags = AV_OPT_FLAG_DECODING_PARAM },
> - { "poster_time_location", "Export the poster time location.", OFFSET(poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
> + { "export_poster_time_location", "Export the poster time location.", OFFSET(export_poster_time_location), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS | AV_OPT_FLAG_EXPORT },
> { NULL },
> };
>
Firstly, the patch should be based on master.
Secondly, it’s too ad hoc. I don’t see a strong reason to export such information.
Those fields only defined by quicktime, not defined by ISO base media file format.
_______________________________________________
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] 7+ messages in thread
end of thread, other threads:[~2023-01-10 2:57 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 16:08 [FFmpeg-devel] [PATCH] libavformat/mov: Add support for exporting poster time Bryce Chester Newman
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 0/2] " ffmpegagent
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 1/2] " Bryce Chester Newman
2022-10-05 14:25 ` [FFmpeg-devel] [PATCH v2 2/2] ibavformat/mov: " Bryce Chester Newman
2022-11-28 14:11 ` [FFmpeg-devel] [EXTERNAL] " Bryce Newman
2023-01-09 17:01 ` Bryce Newman
2023-01-10 2:56 ` [FFmpeg-devel] " "zhilizhao(赵志立)"
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