[Bug]: Video is flipped vertically when playing
Describe the bug
When playing the video in this post, it is flipped vertically in the player view. This doesn't happen with other videos and images.
Steps To Reproduce
- Search for the post
https://mastodon.gamedev.place/@jerrodputman/112381197588667762 - Click on the video thumbnail to play the video
Logs and/or Screenshots
Screencast from 2024-05-05 18-26-20.webm
There's no output when playing the video. This is printed when opening the app (probably not helpful):
(dev.geopjr.Tuba:2): Tuba-CRITICAL **: 18:36:14.225: Network.vala:77: Request "https://mastodon.online/api/v1/markers?timeline[]=notifications" failed: 403 Forbidden
(dev.geopjr.Tuba:2): Gtk-CRITICAL **: 18:36:14.575: gtk_list_box_remove: assertion 'GTK_IS_WIDGET (child)' failed
(dev.geopjr.Tuba:2): Tuba-CRITICAL **: 18:36:14.588: tuba_views_content_base_real_on_create_model_widget: assertion 'obj != NULL' failed
(dev.geopjr.Tuba:2): GLib-GObject-CRITICAL **: 18:36:14.588: g_object_is_floating: assertion 'G_IS_OBJECT (object)' failed
(dev.geopjr.Tuba:2): Gtk-CRITICAL **: 18:36:14.588: gtk_widget_set_visible: assertion 'GTK_IS_WIDGET (widget)' failed
(dev.geopjr.Tuba:2): Gtk-CRITICAL **: 18:36:14.588: gtk_list_box_insert: assertion 'GTK_IS_WIDGET (child)' failed
(dev.geopjr.Tuba:2): GLib-GObject-CRITICAL **: 18:36:14.588: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(dev.geopjr.Tuba:2): GLib-GObject-CRITICAL **: 18:36:14.588: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
(dev.geopjr.Tuba:2): Gtk-WARNING **: 18:36:23.767: GtkImage 0x563dd59af020 (image) reported min height -17, but sizes must be >= 0
Instance Backend
Mastodon
Operating System
Vanilla OS 2.0
Package
Flatpak
Troubleshooting information
os: GNOME 46 (Flatpak runtime)
prefix: /app
flatpak: true
version: 0.7.2 (production)
gtk: 4.14.3 (4.14.1)
libadwaita: 1.5.0 (1.5.0)
libsoup: 3.4.4 (3.4.4)
libgtksourceview: 5.12.0 (5.12.0)
Additional Context
No response
Looking at the exif data, it reports itself as upside down:
Rotation: 180
Assuming that was shot on an apple device, it wouldn't be the first time they do this. All media shot on apple devices seem to be upside down and change their orientation using exif metadata. For images, we do actually correct them with Gdk.Pixbuf#apply_embedded_orientation
Now for video, I don't know :shrug:
Now for video, I don't know 🤷
Gstreamer uses the image-orientation tag for such cases. There are multiple ways to apply the rotation - such as using the glvideoflip element or having direct support in the sink (see this MR for the gtk4paintablesink).
Unfortunately neither the GTK internal player nor Clapper seem to support it yet (which is an issue with videos from other devices aswell).
Thanks for the info!
Rafostar gave me a lengthy explanation on orientation when this issue opened on Matrix, I'm sure they'll be interested in this, @Rafostar
nor Clapper seem to support it
This is incorrect. Clapper does support this. In fact this issue is not present if you build Tuba with Clapper support (its set behind meson option).
Obligatory screenshot :smile: :
This is incorrect. Clapper does support this.
Oh, then it's just the version currently shipped by fedora here :/ Great to hear that it works!
fixed by: #1308