Skip to content
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

H264 encoding problem #481

Open
dwmshiwo91 opened this issue Aug 20, 2024 · 3 comments
Open

H264 encoding problem #481

dwmshiwo91 opened this issue Aug 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@dwmshiwo91
Copy link

I set H264 encoding in the code, but it crashes as soon as I open the camera,The server requires that both the uploaded and returned videos be in H264 encoded format. How can I set this?

private fun getRoomOptions(): RoomOptions {
return RoomOptions(
adaptiveStream = true,
dynacast = true,
e2eeOptions = getE2EEOptions(),
videoTrackPublishDefaults = VideoTrackPublishDefaults(videoCodec = VideoCodec.H264.codecName,
backupCodec = BackupVideoCodec(codec = "h264") )
)
}

version:2.2.0, Here is the crash information

Caused by: java.lang.IllegalArgumentException
com... W at android.media.MediaCodec.native_configure(Native Method)
com... W at android.media.MediaCodec.configure(MediaCodec.java:2214)
com...n.meeting_app W at android.media.MediaCodec.configure(MediaCodec.java:2130)
com...n.meeting_app W at livekit.org.webrtc.MediaCodecWrapperFactoryImpl$MediaCodecWrapperImpl.configure(MediaCodecWrapperFactoryImpl.java:37)
com...n.meeting_app W at livekit.org.webrtc.HardwareVideoEncoder.initEncodeInternal(HardwareVideoEncoder.java:287)
com...n.meeting_app W at livekit.org.webrtc.HardwareVideoEncoder.initEncode(HardwareVideoEncoder.java:231)
com...n.meeting_app W at io.livekit.android.webrtc.SimulcastVideoEncoderFactoryWrapper$StreamEncoderWrapper.initEncode$lambda$1(SimulcastVideoEncoderFactoryWrapper.kt:126)
com...n.meeting_app W at io.livekit.android.webrtc.SimulcastVideoEncoderFactoryWrapper$StreamEncoderWrapper.$r8$lambda$Y_AfeOG92vJ_mL7Q4IBF5tHMRlQ(Unknown Source:0)
com...n.meeting_app W at io.livekit.android.webrtc.SimulcastVideoEncoderFactoryWrapper$StreamEncoderWrapper$$ExternalSyntheticLambda10.call(D8$$SyntheticClass:0)
com...n.meeting_app W at java.util.concurrent.FutureTask.run(FutureTask.java:264)
com...n.meeting_app W at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
com...n.meeting_app W at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
com...n.meeting_app W at java.lang.Thread.run(Thread.java:1012)
com...n.meeting_app E #
# Fatal error in: gen/jni_headers/sdk/android/generated_metrics_jni/../../../../../../../../../../../_source/android_prefixed/webrtc/src/sdk/android/src/jni/jni_generator_helper.h, line 95
# last system error: 0
# Check failed: !env->ExceptionCheck()
#
com...n.meeting_app A Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 25782 (EncoderQueue - ), pid 25357 (xin.meeting_app)

@dwmshiwo91 dwmshiwo91 added the bug Something isn't working label Aug 20, 2024
@davidliu
Copy link
Contributor

Can you add the logs leading up to the crash?

@dwmshiwo91
Copy link
Author

@dwmshiwo91
Copy link
Author

dwmshiwo91 commented Aug 30, 2024

After repeated attempts, I had no problem with Snapdragon 8g2 and 8g3, but there was a problem with MediaTek. The tested chips were MediaTek8100 and Helio G88.@davidliu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants