linkedin / LiTr

Lightweight hardware accelerated video/audio transcoder for Android.
BSD 2-Clause "Simplified" License
609 stars 85 forks source link

Safari Video Playback Display Issues #38

Open herrchmafi opened 4 years ago

herrchmafi commented 4 years ago

I've gone ahead and setup transcoding similar to configuration mentioned in https://github.com/linkedin/LiTr/issues/25

This is working well and the output video is line with how I expect. However, when playing back on Safari, I'm noticing a green overlay persisting for the first 4-5 seconds of the video where it then goes back to normal. If you scrub back to the beginning, the green overlay is removed, but quality is deteriorated during this 4-5 second period.

Any recommendations for this? Thank you for creating this library!

izzytwosheds commented 4 years ago

Thanks for reporting this! Also thank you for giving LiTr a shot. I will try to reproduce this on my end. Does that happen for any video or particular one? Which device are you using to transcode?

herrchmafi commented 4 years ago

I'm testing with a Samsung Galaxy Tab S3. I've been able to reproduce on all the videos I've tested. These include ones taken on the native camera as well as ones downloaded from various websites.

I went ahead and tested from LinkedIn's Android app and didn't run into the same issue.

izzytwosheds commented 4 years ago

LinkedIn Android app is different, we do some backend processing on top of what LiTr produces, so the video you are playing might not be what LiTr produced. I tried reproducing the bug on my Pixel 3 and was not able to reproduce it. Are you using LiTr demo app? If not, can you try to see if bug happens with videos transcoded in it?

herrchmafi commented 4 years ago

I've tried using the demo app and yielded the same results. Happy to share the raw and transcoded (adjusted bitrate and dimensions) video files with you if you'd like.

For the raw video, the green overlay exists for a split second before disappearing. The transcoded video's overlay behaves similarly to the transcoder I set up (4-5 seconds of green overlay). Very peculiar and possibly a lower level issue.

izzytwosheds commented 4 years ago

Yeah, this feels like a some sort of incompatibility between how encoder compresses the video on Tab S3 and how decoder in Safari plays it. Not really sure how to fix that, since we don't do any fine tuning on the encoder. Not fully sure if fine tuning will even fix that.