2

When playing back videos on the Samsung Galaxy S4 the video does not recognize the orientation metadata. It always plays on landscape.

The app also records the video and plays correctly on all other devices while streaming. The S4 plays it fine only if the video is stored in the device but it won't work for streaming.

Using MediaPlayer and SurfaceView on a Fragment, not a VideoView.

Have tried to disable Air View, Air Gesture, Smart Stay, Smart Scroll and Auto Rotate without luck.

Also even stored the orientation hint along with the video to rotate manually the element in the layout, but the SurfaceView when rotated using lockCanvas doesn't work and when rotating its parent element goes black and only plays the audio.

Any suggestions I can try to get this bug fixed? Have you experiencing the same when using the S4? Any help on this will be greatly appreciated. Thanks!

John Paul
  • 12,196
  • 6
  • 55
  • 75
maxmartinez
  • 31
  • 1
  • 6

2 Answers2

1

I asked this question a few months back and haven't heard anything. I would love to know as well.

https://stackoverflow.com/questions/17950072/galaxy-s4-media-player-ignores-rotation-metadata

Edit: This also occurs on the Galaxy Note 3.

Community
  • 1
  • 1
haupman
  • 59
  • 7
  • Unfortunately not. Hopefully Samsung fixes this by 4.4, assuming they even know of the issue. – haupman Dec 04 '13 at 19:47
  • Good work in finding the workaround for this. I am going to continue to rotate the videos on the server because I am not willing to change my code to accommodate Samsung's bugs. Hopefully they will get in line with Android standards when it comes to video rotation. – haupman Dec 05 '13 at 20:26
1

Found a workaround for this issue. Try using a TextureView instead a SurfaceView, before playing the video, get the rotation info with MetadataRetriever and adjust the TextureView as needed. It worked on this side.

See the details here: Streaming Video Playback Orientation Issue @ Samsung Developers Forum

maxmartinez
  • 31
  • 1
  • 6
  • the rotation parameter `mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION)` is same on samsung like on other devices so this should not work – lxknvlk Apr 28 '20 at 13:52