Skip to content
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

FFmpegFrameRecorder no longer support "rotate" metadata #1976

Closed
b005t3r opened this issue Jan 26, 2023 · 4 comments
Closed

FFmpegFrameRecorder no longer support "rotate" metadata #1976

b005t3r opened this issue Jan 26, 2023 · 4 comments

Comments

@b005t3r
Copy link

b005t3r commented Jan 26, 2023

I think somewhere between version 1.5.4 and 1.5.7 rotation got moved to "Display Matrix" side data, when in 1.5.4 and prior it was set as "rotate" metadata, when decoding a video with ffmpeg. However, I don't think there's a matching change done in FFmpegFrameRecorder - in 1.5.4 is was simply setting the "rotate" metadata to a desired rotation value, but now it has no effect and I don't see a way of altering the side data on the output video.

Am I missing something or is it a bug?

@saudet
Copy link
Member

saudet commented Jan 27, 2023

That was removed with FFmpeg 5.0, so to support that with FFmpegFrameRecorder with FFmpeg 5.x, we probably need to go through AVPacketSideData as with FFmpegFrameGrabber, yes. As usual, contributions are welcome!

@saudet
Copy link
Member

saudet commented May 12, 2023

Concretely, we need to add a pair of getVideoSideData()/setVideoSideData() property methods to mirror FFmpegFrameGrabber as well as a helper method like setDisplayRotation().

saudet added a commit that referenced this issue May 14, 2023
…mpegFrameRecorder.setDisplayRotation()` for convenience (issue #1976)
@saudet
Copy link
Member

saudet commented May 14, 2023

I've added those in commit b1c95f1. Please give it a try with the snapshots: http://bytedeco.org/builds/

@saudet
Copy link
Member

saudet commented Jun 6, 2023

JavaCV 1.5.9 has been released with those new methods! Enjoy

@saudet saudet closed this as completed Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants