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

Better debugging for TrackTranscoderException #261

Open
Queatz opened this issue Jun 26, 2023 · 1 comment
Open

Better debugging for TrackTranscoderException #261

Queatz opened this issue Jun 26, 2023 · 1 comment

Comments

@Queatz
Copy link

Queatz commented Jun 26, 2023

Transformation job error
com.linkedin.android.litr.exception.TrackTranscoderException: Failed to configure encoder codec.Media transformation failed for job id: null
Media format: {color-format=6, durationUs=7832955, mime=video/x-vnd.on2.vp9, profile=32, width=768, bitrate=8000000, frame-rate=30, height=1280}
Diagnostic info: null
at com.linkedin.android.litr.utils.CodecUtils.getAndConfigureCodec(CodecUtils.java:217)
// ...
Caused by: java.lang.IllegalStateException
	at com.linkedin.android.litr.utils.CodecUtils.createAndConfigureCodec(CodecUtils.java:283)
	at com.linkedin.android.litr.utils.CodecUtils.getAndConfigureCodecByType(CodecUtils.java:230)
	at com.linkedin.android.litr.utils.CodecUtils.getAndConfigureCodec(CodecUtils.java:205)

I did some debugging and that exception from CodecUtils.java:283 is coming from an IllegalArgumentException from the native code, but there's not much info to go on.

I have tried a variation of including / not including these keys on createVideoFormat:

KEY_PROFILE
KEY_COLOR_FORMAT
KEY_BIT_RATE
KEY_DURATION

Replacing createVideoFormat with null works but I'm trying to downscale a video.

What's the best way to figure out what's going on?

@izzytwosheds
Copy link
Contributor

Apologies for late response. Try adding KEY_FRAME_RATE to your video MediaFormat, some encoders don't like when it is missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants