After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 790470 - glimagesink: subtitle don't rotate with video
glimagesink: subtitle don't rotate with video
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.12.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 791415
Blocks:
 
 
Reported: 2017-11-17 02:03 UTC by Haihua Hu
Modified: 2018-11-03 12:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gloverlaycompositor: add subtitle rotate support follow video (4.95 KB, patch)
2017-12-01 07:11 UTC, Haihua Hu
none Details | Review

Description Haihua Hu 2017-11-17 02:03:38 UTC
transform meta don't apply to subtitle draw?
Comment 1 Matthew Waters (ystreet00) 2017-11-17 02:24:58 UTC
That, is a very good question.  I don't think anybody's ever defined what happens on the interaction between the transformation meta, the rotation properties and subtitles.
Comment 2 Haihua Hu 2017-11-17 02:27:55 UTC
(In reply to Matthew Waters (ystreet00) from comment #1)
> That, is a very good question.  I don't think anybody's ever defined what
> happens on the interaction between the transformation meta, the rotation
> properties and subtitles.

Yes, I found that the subtitle is composited by gl alpha blend, but glimagesink didn't pass any rotation message to it.
Comment 3 Nicolas Dufresne (ndufresne) 2017-11-17 12:06:37 UTC
It is probably a bit complicated, I can imagine cases were you need to rotate the video but keep the subtitles straight. I must admit, I thought these elements would only support composition in passthrough, so oops.
Comment 4 Haihua Hu 2017-12-01 07:11:54 UTC
Created attachment 364717 [details] [review]
gloverlaycompositor: add subtitle rotate support follow video
Comment 5 Haihua Hu 2017-12-07 05:51:34 UTC
Any update?
Comment 6 Nicolas Dufresne (ndufresne) 2017-12-07 12:39:13 UTC
To me the patch looks fine (except that you change an API, this breakage need to be mentioned in the commit, and didn't fix the other elements using that API).

Though, at higher level, you didn't solve the main issue.  There is a visual difference when the transformation matrix is added before or after.

I can easily imagine a scenario where I want the text straight while on the video is rotated. And other scenario where the text should rotate/scale/whatever with the video. Which case so you implement, and why do you think it's the right way for now ? All this need to be answered here and/or in your commit message.
Comment 7 Haihua Hu 2017-12-08 03:09:49 UTC
(In reply to Nicolas Dufresne (stormer) from comment #6)
> To me the patch looks fine (except that you change an API, this breakage
> need to be mentioned in the commit, and didn't fix the other elements using
> that API).

I will double check if the API change has impact on other components. On my side, seems no compile error.

> 
> Though, at higher level, you didn't solve the main issue.  There is a visual
> difference when the transformation matrix is added before or after.
> 
> I can easily imagine a scenario where I want the text straight while on the
> video is rotated. And other scenario where the text should
> rotate/scale/whatever with the video. Which case so you implement, and why
> do you think it's the right way for now ? All this need to be answered here
> and/or in your commit message.

The patch will make subtitle always rotate with video, I think the case is meaningless which text straight while on the video is rotated. If there are some use cases for this scenario, please let me know.
Comment 8 Nicolas Dufresne (ndufresne) 2017-12-08 13:37:36 UTC
Well, I have a use case. Take an iPad and hold it upside down to record. Then play that file and attached an external subtitle file. With this patch, the text will be upside down. The transformation in this case was to put back the image straight.
Comment 9 Haihua Hu 2017-12-10 03:17:36 UTC
(In reply to Nicolas Dufresne (stormer) from comment #8)
> Well, I have a use case. Take an iPad and hold it upside down to record.
> Then play that file and attached an external subtitle file. With this patch,
> the text will be upside down. The transformation in this case was to put
> back the image straight.

Then we can add a property to enable subtitle rotate or not.
Comment 10 Nicolas Dufresne (ndufresne) 2017-12-10 14:41:57 UTC
I'd prefer if we fix this properly. There is a proposal from Tim that would allow figuring the order: 

https://bugzilla.gnome.org/show_bug.cgi?id=791415
Comment 11 GStreamer system administrator 2018-11-03 12:01:51 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/402.