Status Update
Comments
wu...@google.com <wu...@google.com> #2
Thanks for letting us know. We will take a look and update the status here.
le...@google.com <le...@google.com>
le...@google.com <le...@google.com> #3
Hi,
Thanks for reporting the issue. It seems that you forgot to attach the video?
I am not able to reproduce this issue. May I know your device build number?
Are you able to test on the latest CameraX version (ex: 1.4.0-alpha02) and/or the latest build?
ex: my test devices is Pixel 6 Android 13
+ Build: TQ3A.230605.008
wu...@google.com <wu...@google.com>
wu...@google.com <wu...@google.com> #4
Friendly ping, smrecki.tomislav :)
sm...@gmail.com <sm...@gmail.com> #5
I'm sorry, I somehow missed the previous email. This is a video from Android 14, Build number is UP1A.231105.003.
Also, I tried it with CameraX lib version 1.4.0-alpha02 but no luck, I'm having the same issue.
wu...@google.com <wu...@google.com>
le...@google.com <le...@google.com> #6
Sorry for the delayed response.
I experimented with the video attached in
Here's what I tried:
- Desktop Player: I checked the video on my computer using a standard media player and navigated to the very beginning.
- Mobile Playback: I checked the video on a Pixel 6 phone using the Google Photos app and also sought to the start.
- ffmpeg Extraction: I used the ffmpeg command to extract the first frame as an image:
ffmpeg -i Elevien_Floor_Roki__Croatia_Dec0620230623.mp4 -vf "select=eq(n\,0)" -q:v 3 first_frame.jpg
Did I miss something?
Description
CAMERAX VERSION: 1.2.2, 1.2.3, 1.3.0
CAMERA APPLICATION NAME AND VERSION: Elevien, 3.63.1
ANDROID OS BUILD NUMBER: UP1A.231105.003
DEVICE NAME: Pixel 6
DESCRIPTION: On Pixel 6, we noticed that when audio recording is enabled, the first (or couple) of frames of the video are black. When disabling audio recording (removing .withAudio()), the video is fine, without black frames. We were able to track it a bit back and came to a conclusion that it's happening from CameraX version 1.2.2, but also we were also able to track back to Android 13 on Pixel 6 as we see there are some videos with black frames from that time as well. Unfortunately we're unable to pin point the exact time when that started happening. We are taking video poster images from first frame of the video to preload as a image placeholder while the video loads in the app, so this results in black poster images.
My CameraX SDK setup is rather simple, with only setting the cameraSelector to DEFAULT_BACK_CAMERA, QualitySelector and output target rotation set to ROTATION_90. Recording config is set-up with .withAudioEnabled(), as we want to enable audio recording, but that causes the issue. See code fragments at the end.
STEPS TO REPRODUCE:
OBSERVED RESULTS: When recording video with audio recording enabled, first (or couple) of frames are black. When recording without audio recording enabled, video is fine and doesn't start with black frames.
EXPECTED RESULTS: Video doesn't start with black frames when audio recording is enabled.
REPRODUCIBILITY: 5 of 5
ADDITIONAL INFORMATION: As far as we could test this behaviour, it doesn't happen on every device. For example, Pixel 7 is recording these videos just fine (no black frames at the begining of the video).
CODE FRAGMENTS:
As for the Recording setup, I'm using MediaStoreOutput provider and I'm enabling the audio recording.