plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[video_player] Orientation tag

Open bbrto21 opened this issue 4 years ago • 5 comments

As far as I know, each video file has orientation tag, and video player must apply the tag when playing.

While developing a camera plug-in, I created a video with an orientation tag, and played it on Android and Tizen, and found that video_payer_tizen did not use the orientation tag

bbrto21 avatar Apr 29 '21 06:04 bbrto21

we will check if there is such API to get rotation angle from MM player

xuelian-bai avatar Apr 29 '21 06:04 xuelian-bai

Currently, video player plugin use texture method which use MMPlayer software codec(hardware codec is not supported for texture method), but software codec don't support that tag, and right now MMplayer don't provide such an API to get rotation information from metadata. To solve this issue, there are two solution:

  1. Use another video player which implemented based on video hole and plus player(to support local video file, we may need to support MMplayer). Hardware codec can support this video tag and rotate automatically, and video player don't need to do anything.
  2. MMplayer provide an API to get rotation information, so that video plugin can change geometry of the texture.

xuelian-bai avatar Apr 29 '21 08:04 xuelian-bai

but software codec don't support that tag, and right now MMplayer don't provide such an API to get rotation information from metadata.

Well, if you can read the rotation metadata from the video file, can you solve it by second way? Here I attach some information those might helpful. https://docs.tizen.org/application/native/guides/multimedia/metadata/#retrieving-metadata https://docs.tizen.org/application/native/api/wearable/4.0/group__CAPI__METADATA__EXTRACTOR__MODULE.html

  metadata_extractor_h metadata_h;
  metadata_extractor_create(&metadata_h);
  metadata_extractor_set_path(metadata_h, video_file_path);

  char *value = nullptr;
  metadata_extractor_get_metadata(metadata_h, METADATA_ROTATE, &value);

bbrto21 avatar Apr 30 '21 00:04 bbrto21

https://github.com/xiaowei-guan/plugins/commit/7e71c7b10e464ab21b2475d4eaa576eb7b1451e5

we can get rotation value,but set to player, not effect.

xiaowei-guan avatar Jun 02 '21 12:06 xiaowei-guan

xiaowei-guan@7e71c7b

we can get rotation value,but set to player, not effect.

I guess that this approach only works when the player uses the display feature.

error_code = player_set_display(g_player, PLAYER_DISPLAY_TYPE_OVERLAY, GET_DISPLAY(evas_obj));

bbrto21 avatar Jun 28 '21 04:06 bbrto21