Android camera2 api galaxy s7

Viewed 1304

I am writing an app which records video from the phone and uploads it to a server. Works fine on any device except Galaxy S7. On the Galaxy S7 recording produces a video file with audio only and either no video or one video frame. This is true in the temporary file created on the phone and not just the one uploaded to the server. I am using the Camera2 API, and I have tried with the front and back cameras.

I have tried with my code, and these two example applications: https://developer.android.com/samples/Camera2Video/project.html https://github.com/googlesamples/android-Camera2Video/blob/master/Application/src/main/java/com/example/android/camera2video/Camera2VideoFragment.java

The video file produced appears to be ok, here is the codec info: Stream 0 Type: Video Codec: H264 - MPEG-4 AVC (part 10) (avc1) Language: English Resolution: 960x720 Display resolution: 960x720 Frame rate: 29.055091

Stream 1 Type: Audio Codec: MPEG AAC Audio (mp4a) Language: English Channels: Stereo Sample rate: 16000 Hz

1 Answers
Related