I am working as a android developer and while testing my app in Samsung I found something.
When I am capturing any video in my Samsung device with portrait mode, and then playing it in a video view, it will display with the wrong orientation. Portrait video will play with landscape orientation. I think it is rotating the video 90 degree left. Please guide us to solve this problem.
Video is played in the correct orientation in devices from other manufactures like Google Nexus or Micromax. It is played in the correct orientation but in Samsung the portrait video orientation is not proper.
Related
I have a website with lots of video. Currently I am struggling to develop an app version of my website. I am developing the app in android studio and using webview to show the website in the app.
Currently I have two issues related to video playing.
First one is, if I am holding mobile phone in portrait mode, and I play a video. Video plays smooth. But if I tilt the phone to landscape mode, the audio still plays but a new website loads where video is not playing.
Second issue is, I want to achieve when a user tilts the phone from portrait to landscape mode, if a video is playing then it should occupy entire screen of phone. Similar to youtube. If a video is playing in portrait mode and if you tilt the phone then the video occupies entire screen, I want such result.
Sorry for my bad english. Please guide me. Thanks in advance.
Fast googling, it gives you anything you need to know.
http://tekeye.uk/android/examples/ui/android-portrait-landscape-screens
So you must just define two layouts, one for landscape, and one for portrait orientation.
Then just handle how it should look in both of them.
Im using a YouTubeStandAlonePlayer to play a youtube video in my app
When I use YouTubeStandAlonePlayer in LightBox Mode the video rotates whenever the device orientation changes and does not restart the activity
However when I use YouTubeStandAlonePlayer in fullscreen mode it only plays in landscape mode
My app only operates in portrait mode, but when I play a video via. YouTubeStandAlonePlayer I want it to enter full screen and be able to change to both portrait and landscape mode as the orientation changes. When the user exits the video I want the app to go back to portrait mode regardless of what orientation the full screen video was being played in.
I've seen this functionality in Flipboard when YouTube Videos are played
I've been stumbling around this for weeks can someone please help me!!
I have an issue with video recording on S4.
What I need is front facing recording with good quality/size ratio. What I do is set CameraProfile to QUALITY_480P and that is basically all (video size is about 3MB). Everything is working except on S4 which works only on QUALITY_HIGH (not even on QUALITY_LOW). What more same video length has over 50MB on high.
Preview on S4 is OK, but recorded video looks like the image below. All I do is basically this (I use cwac, but this is my debug code):
CamcorderProfile profile = CamcorderProfile.get(cameraId,
CamcorderProfile.QUALITY_HIGH);
recorder.setProfile(profile);
Any way to fix this please?
OK so I found that this happens when you try to record with front facing camera in portrait mode. What really messes up encoded video is recorder.setOrientationHint(). This line is kind of needed, without it the recorded video is 90 degrees rotated.
That means one issue is fixed. Now I need to how to rotate recoded video.
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!
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.
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
I am just developing one Android app, in which we have to capture the video. Now user will capture the video in portrait view but while it will play, it will automatically play in landscape.
i.e. video is capture in portrait view, though it will play in landscape view. when i will check in memory card, video is still captured in portrait view and also while playing video from memory card, it will play in portrait view.
I have checked, manifest file and seems all files are fine.
Please let me know if any one have any idea.
Regards,
Keyur Satyadev