v10 no longer writes "rotate" metadata flag #1630
Replies: 8 comments
-
Does this also affect conda-forge? it may be that something is wrong with the bundled ffmpeg. conda-forge I believe has allowed ffmpeg 5 with pyav 9.2 |
Beta Was this translation helpful? Give feedback.
-
I tried it with conda-forge builds. i can indeed recreate.
It seems to be a bug in the pyav implementation, not the bundled ffmpeg libraries. |
Beta Was this translation helpful? Give feedback.
-
It may be that ffmpeg 5 deprecated these options: |
Beta Was this translation helpful? Give feedback.
-
Ok digging around in this, I think that the ffmpeg command, uses:
but i'm not too sure... |
Beta Was this translation helpful? Give feedback.
-
This isn't a bug so much as it is a "PyAV/we" need to update to the new API. The old "rotate" flag (that they consider hack) needs to be updated. |
Beta Was this translation helpful? Give feedback.
-
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index 0d1c84d6df..5a00886e05 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -2916,6 +2916,7 @@ loop_end:
for (j = 0; j < oc->nb_streams; j++) {
ost = output_streams[nb_output_streams - oc->nb_streams + j];
if ((ret = check_stream_specifier(oc, oc->streams[j], stream_spec)) > 0) {
+#if FFMPEG_ROTATION_METADATA
if (!strcmp(o->metadata[i].u.str, "rotate")) {
char *tail;
double theta = av_strtod(val, &tail);
@@ -2923,9 +2924,18 @@ loop_end:
ost->rotate_overridden = 1;
ost->rotate_override_value = theta;
}
+
+ av_log(NULL, AV_LOG_WARNING,
+ "Conversion of a 'rotate' metadata key to a "
+ "proper display matrix rotation is deprecated. "
+ "See -display_rotation for setting rotation "
+ "instead.");
} else {
+#endif
av_dict_set(&oc->streams[j]->metadata, o->metadata[i].u.str, *val ? val : NULL, 0);
+#if FFMPEG_ROTATION_METADATA
}
+#endif
} else if (ret < 0)
exit_program(1);
}
-- It won't be set by |
Beta Was this translation helpful? Give feedback.
-
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Beta Was this translation helpful? Give feedback.
-
Although the api is different now, #1249 should address this. All major ffmpeg point releases I expect would have these breaking changes, including the upcoming ffmpeg 7.0. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
As of v10.0.0 the stream metadata flag
rotate
is no longer written to file. This may affect other metadata fields; however, for this one specifically, we have a unit-test downstream so I know for sure that it is affected.Expected behavior
Setting a field in a video stream's metadata dict causes it to be written to the file.
Actual behavior
Stream-level metadata (at least the
rotation
flag) is no longer written.Reproduction
Using av v9.2 the above snippet produces:
However, when switching to v10 it produces:
Versions
Research
I have done the following:
Beta Was this translation helpful? Give feedback.
All reactions