-
Notifications
You must be signed in to change notification settings - Fork 386
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
v10 no longer writes "rotate" metadata flag #1045
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pin av!=10.0.0 to avoid PyAV-Org/PyAV#1045 (cf. imageio/imageio#912)
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 |
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. |
It may be that ffmpeg 5 deprecated these options: |
Ok digging around in this, I think that the ffmpeg command, uses:
but i'm not too sure... |
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. |
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 |
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. |
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. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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:
The text was updated successfully, but these errors were encountered: