LiTr icon indicating copy to clipboard operation
LiTr copied to clipboard

Not working on Redmi note 8 Pro

Open Krutika-chotara opened this issue 4 years ago • 2 comments

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.

Krutika-chotara avatar Oct 27 '20 07:10 Krutika-chotara

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.

izzytwosheds avatar Oct 30 '20 17:10 izzytwosheds

Can check with latest master? This might be fixed in one of recent PRs.

izzytwosheds avatar Jan 19 '21 22:01 izzytwosheds