-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
video codec not supported #2
Comments
Hi @FidanBacaj : You can find the default video recorder config here: Camera/camera/src/main/java/top/defaults/camera/Camera2Photographer.java Lines 851 to 870 in 6077681
As you can see, the default video format & codec is: mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264); So the problem is that the video player your phone provided may not support the There are two ways to solve the issue:
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263); // for example You may find these two classes helpful: |
Thank you @duanhong169 for quick answer ! |
@FidanBacaj Always welcome! |
When I make a video with this library (
com.github.duanhong169:camera:1.0.3
) and when i click to play this video ,video not played just voice and writes "video codec not supported"Can you help me for this problem how to fix ?
The text was updated successfully, but these errors were encountered: