Transformed Videos missing metadata?
Hello!
Any time I run a video through the MediaTransformer.transform on Android and save that to my device, I noticed that it changes in the way it displays in Android Files app or the Photos app.
For example, in the Files app of Android, it looks like this:

The one with the thumbnail visible is the original video that hasn't gone through transform method. The 12.32MB video on the top left is the output of transform using the same original video. When I click it to the fullscreen viewer, it plays the video fine, but even in the Android Photos app, it looks like this:

Any idea what could be happening?
Hi,
It is possible that LiTr might be stripping out some metadata when transcoding. We use bare minimum when creating new video. I will look into this.
FWIW - I tried reencoding the video with FFMPEG, and the video seems now fixed - the thumbnail and the time duration load accurately on the Files/Photos app on Android.
Can you share one of videos? I will try to debug and see what is happening. You can share on google drive with ibahadirov at linkedin.com
Hi @izzytwosheds , let me know if you can see the videos in the link! https://drive.google.com/drive/folders/1VRrqdq2C0QAK53VPsm5SGgLW8eP88sZW?usp=sharing
Interestingly enough, even on Google Drive web UI, one shows the thumbnail and the other does not š

Which device did you create LiTr on? Looks like duration metadata is missing, so MediaMetadataRetriever cannot extract it, which is most likely causing problems. I cannot reproduce this problem on my Pixel 3, so I am suspecting that this problem could be device specific.
I see, I am on Pixel 6a.. :( Is there anything I can try, since Iām getting a repro?
On Fri, Nov 11, 2022 at 9:20 PM Izzat Bahadirov @.***> wrote:
Which device did you create LiTr on? Looks like duration metadata is missing, so MediaMetadataRetriever cannot extract it, which is most likely causing problems. I cannot reproduce this problem on my Pixel 3, so I am suspecting that this problem could be device specific.
ā Reply to this email directly, view it on GitHub https://github.com/linkedin/LiTr/issues/222#issuecomment-1312370326, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ525MWOTIKJRRSISHFVG63WH4SIZANCNFSM6AAAAAARW7SZGY . You are receiving this because you authored the thread.Message ID: @.***>
I will think about possible test cases and get back to you shortly. Are you using LiTr demo app or are you calling LiTr API in your app?
I am using the LiTr API in my app :)
On Sat, Nov 12, 2022 at 5:21 PM Izzat Bahadirov @.***> wrote:
I will think about possible test cases and get back to you shortly. Are you using LiTr demo app or are you calling LiTr API in your app?
ā Reply to this email directly, view it on GitHub https://github.com/linkedin/LiTr/issues/222#issuecomment-1312610886, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ525MUXOIYVHE76BOTQZLLWIA7BHANCNFSM6AAAAAARW7SZGY . You are receiving this because you authored the thread.Message ID: @.***>
Hello! Just wanted to check in and see if you were able to find anything on this front
I haven't made much progress, with work and all. Can you check one thing, though? Can you try using LiTr demo app on your phone and see if problem happens again?
Another thing to try - can you remove metadata tracks from that video and see if that helps? There is a flag in TransformationOptions now.
This is very interesting. MediaExtractor on my Pixel 3 cannot extract any metadata from transcoded video you provided. ffprobe can handle it, and shows all metadata. Looks like something is happening when MediaMuxer on your Pixel 6a is writing that video. Maybe those metadata tracks are affecting it somehow - I am seeing their format change between original and transcoded videos.
Which Android OS version do you have on your device? I will try to get ahold of similar device here, to debug.
if its any help, @izzytwosheds I'm able to reproduce this using the LiTr api on a Samsung s10 running Android 12!
i've also tried removing metadata tracks and it still occurs.
Thank you @charlesx2013 ! Does this happen with LiTr demo app as well?
Thank you very much, guys! I was able to reproduce it. Fix was merged, I hope it fixes the problem on your devices as well. Will you have to wait for the new release to verify this?
awesome, thank so much! yes, we will have to bump litr to the next release version to test it.
Awesome news! Thank you so much!
I released version 1.5.5 which has the fix. Let me know if it fixes this issue. I will close it if it does.