LiTr
LiTr copied to clipboard
Not working on Redmi note 8 Pro
MediaTransformer mediaTransformer = new MediaTransformer(mContext);
File linkedIn = new File(Environment.getExternalStorageDirectory() + "/kckc.mp4");
String id=String.valueOf(System.currentTimeMillis());
mediaTransformer.transform(id,
Uri.parse(uploadsPostModel.getFile().getAbsolutePath()),
linkedIn.getPath(),
null,
null,
new TransformationListener() {
@Override
public void onStarted(@NonNull String id) {
Log.e("///////", "onStarted");
}
@Override
public void onProgress(@NonNull String id, float progress) {
Log.e("///////", "onProgress" + progress);
}
@Override
public void onCompleted(@NonNull String id, @Nullable List<TrackTransformationInfo> trackTransformationInfos) {
Log.e("///////", "Completed");
}
@Override
public void onCancelled(@NonNull String id, @Nullable List<TrackTransformationInfo> trackTransformationInfos) {
Log.e("///////", "onCancelled");
}
@Override
public void onError(@NonNull String id, @Nullable Throwable cause, @Nullable List<TrackTransformationInfo> trackTransformationInfos) {
Log.e("///////", "onError" + cause);
}
},
MediaTransformer.GRANULARITY_NONE,
null);
In Some videos i get error Transformation job error com.linkedin.android.litr.exception.TrackTranscoderException {color-format=2130708361, i-frame-interval=5, durationUs=2499966, mime=video/avc, profile=8, width=1920, bitrate=-128004, frame-rate=30, height=1080}
And for some video nothing happens any callback from listener is not executing.
Hi, thanks for reporting this!
Bitrate is negative, which could be the problem. Also, try lowering profile to Main or even Baseline, see if that helps. Let me know how it works out.
Can check with latest master? This might be fixed in one of recent PRs.