-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Difference in video quality compared to mediaplayer #5003
Comments
Could be related to #4559 which was fixed in version 2.9.0. Can you try updating to see if it still occurs? |
We tested with version 2.9.0 and the problem seems to continue. |
I'm unfortunately getting 404s when trying to access the media you've sent. Can you check it's still valid? |
Sorry about that, we sent you another email with other media. |
The media plays fine for me, although I used a new device. Can you give some more details of what's wrong with the ExoPlayer playback?
|
We've had some reports about AmLogic (and possibly RockChip) STBs in the past. For example #953. They are likely device specific issues that need reporting to the manufacturer, rather than to us. |
From our findings it looks like it is NOT a hardware/manufacturer issue. We also spoke to the device manufacture and they confirmed the same thing as below. This are the results from our tests on the same device: Video plays smoother and has more colors on above players compared to Exoplayer. On exoplayer we also notice some sporadic freezes from time to time. Please let me know if you need further information. The hardware is running on an amlogic s812. |
There is also #926 and #678 which both sounds like the same problem. The conclusion on these issues was that it may be a device specific issue or may not occur with newer versions of ExoPlayer. It's still a device-specific issue because it only happens on this device. However, given that the default player can play it fine, it seems we should be able to provide a workaround. Need to get hold of the device first though. One thing that stands out in the logs is the repeated "AmlogicVideoDecoderAwesome: head is 001,do not add start code" in every renderer iteration which indicates that the decoder expects us not to send a start code. It would be helpful to know the scope the problem. Can you check on all the devices where you've seen the problem which decoder they use? Look out for the "decoderInitialized" messages of the EventLogger. Can you also let us know the Build.DEVICE and Build.MODEL values of these devices? Thanks! |
From the logs "decoderInitialized" is OMX.amlogic.avc.decoder.awesome for video and OMX.google.aac.decoder for the audio. As for the Build.DEVICE: stvm8 and MODEL: Quad-Core Enjoy TV Box. Attached you will find some more logs from the device that we are interested in (the one that our customers have). You will also find system/etc/media_codecs.xml. |
Since our issue related to this topic was closed (#5022) and we also want this resolved, I'd like to share our observations here. We're seeing basically the same symptoms as @loredanatosku. In MediaPlayer, the image quality is better (the image is sharper) and the playback is smoother. Whereas in ExoPlayer, the image is not that sharp and the video seems like it would have slightly lower frame rate than when playing in MediaPlayer. We're seeing these issues only on some devices and some content though. Our DASH content is playing fine everywhere, but when we play the UDP multicasts from which our DASH content is prepared, on some devices, we see the problems described above. I've made a summary of the devices we tested on including the details @tonihei requested. Problematic devices
Okay devices
If necessary, we can provide test content as well as bugreports from these devices. Thanks for looking into this. |
@loredanatosku @okycelt Thanks for the input. We'll try to get hold of a device to reproduce ourselves. And then check if there is an easy workaround we could enable for those devices. |
@tonihei Have you made any progress regarding this? Thank you. |
No, sorry. Haven't got a device yet. |
@tonihei If you'd like, we would be willing to provide a test device for you. For free of course. |
Thanks for the offer, but that's probably too complicated. Would you reckon this device is one of the problematic ones? |
Looking at the specs, I think it could be. The problematic box we use has the same specs. |
@tonihei Sorry to push, but do you have any estimate when approximately you're going to start working on this? Thanks again. |
Will investigate this week. Got one of the devices now. |
Great, thanks a lot. |
@tonihei Have you had a chance to take look at this? Thanks. |
I wasn't able to reproduce the problem with the streams provided by Loredana. And I couldn't test with your test stream so far as the link expired already - could you sent it again? |
I've just sent a link to dev.exoplayer@gmail.com |
I don't know where this weird size came from, but the circle in the test video was smooth. Did tests one more time:
Checked it another time, I confirm it doesn't help. |
Thanks for the reports. As you noted, it looks as if this device is ignoring the MAX_WIDTH and MAX_HEIGHT parameters completely. When changing the video size itself, the codec seems to switch to a special 4K code path which doesn't have the bug. Note how the line with "omx output size changed from 1920*1088 to ..." isn't even part of the output anymore. Although changing the video size itself seems to work, it's may not be a good idea to change it in code because we would be giving the decoder a wrong configuration. Whereas setting a higher maximum size isn't wrong per se. As a whole bunch of other devices seem to work fine with the existing workaround (see above), I would leave it as it is in the hope that this is just an exception. Maybe also be worth reporting the issue to Amlogic again to see if they can provide a proper workaround. |
Yes, I understand that setting invalid size will necessary break playback on some other device and it would be a horrible decision to make such thing to ExoPlayer helps to get rid of vendor-specific bugs almost on every level, except hardware decoding.It would be great to have more deeper control over decoding process than existing |
Well, the media codecs are part of the platform and we can't only work around issues or hope for vendor updates if possible. There are ExoPlayer extensions to use software decoders (e.g. ffmpeg for audio) if you prefer that. |
Closing this issue under the assumption that the workaround we committed helps. |
The given fix results in breaking the Amlogic box that I have. This results in a completely black screen which covers the whole viewing area (including any sibling views). I could hear only the audio. If the new code is commented out, things work without any issue as expected. It would be good if you could change the codecNeedsMaxVideoSizeResetWorkaround method from private static to protected so that I can override the behaviour. I will also open up a new issue so that other users need not waste time on this issue. Box Details: |
I think I'd be in favour of reverting the fix for now. It's unclear whether it's making things better, on balance (in particular if it's affecting playback of non-interlaced content). |
*** Reason for rollback *** Reverting as this may break playback on other Amlogic devices and/or playback of non-interlaced content. *** Original change description *** Add max video size workaround for Amlogic decoder. The Amlogic awesome decoder reduces the video size of interlaced videos by half if the internal configuration isn't force reset with new maximum input size values. The product of these new values must exceed 1920x1088 to force the reset. Issue:#5003 *** PiperOrigin-RevId: 234967314
*** Reason for rollback *** Reverting as this may break playback on other Amlogic devices and/or playback of non-interlaced content. *** Original change description *** Add max video size workaround for Amlogic decoder. The Amlogic awesome decoder reduces the video size of interlaced videos by half if the internal configuration isn't force reset with new maximum input size values. The product of these new values must exceed 1920x1088 to force the reset. Issue:#5003 *** PiperOrigin-RevId: 234967314
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I'll close this issue again because the revert of the original fix has been pushed. If you find a way to target the max video size workaround to only the affected video streams, please let us know. |
@tonihei |
@lintax I can see how this helps for some devices, but on the other hand it seems to break playback on other devices (see #5003 (comment)). How would you decide if it's fine for your app to enable such a flag or not? So far it's unclear under which exact conditions it improves playback and under which conditions the "fix" completely breaks it. From ExoPlayer side it seems safer to opt for having some devices with non-optimal playback vs some devices with no playback at all. Regardless of this decision dilemma, you can reenable the fix by extending
|
@tonihei thanks for your solution, probably the best would be to override DefaultRendererFactory.buildVideoRenderers() since it is effective only creating a single renderer in my case PS: I've got lots of users reports that video quality drastically improved when updated to the version with the patch, and no one reporting issue (I understand that it is a weak point, since the app also has software decoders and user is able to switch to it instead of exoplayer, since many streams are not playable via hardware decoders) |
@giridharkannan Would it be possible for you to provide a full bugreport for the problematic device when the problem occurs? It would be good to see if there is any indication of the underlying problem. |
@tonihei Sure, but don't expect an immediate response as 'am currently occupied with other things. I will try to give a full bug report by the end of next week. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
HI "mediaFormat.setInteger(MediaFormat.KEY_WIDTH, 1920); mediaFormat.setInteger(MediaFormat.KEY_HEIGHT, 1089);" @tonihei I saw this problem not only with amlogic, but with smart TVs, for ex. finlux. best regards |
Based on what? It seems to be the case that AmLogic have two separate video paths. Your suggestion is that the one that's not enabled by default is strictly better. However if that were the case, I think AmLogic would have made it the default. This suggests to me that there are disadvantages with the alternate video path, perhaps for use cases other than the one you've tested. I also suspect that the original workaround we had was effectively achieving the same thing (i.e. causing the non-default video path to be selected), and it did not turn out to be suitable for all cases.
Probably, but the problem is in the underlying platform, not in ExoPlayer (and not in ScalableVideoView either), which is why this issue only affects certain devices. The device manufacturers and/or the chipset providers are the people who should fix this. From our perspective, this issue affects a small number of devices, and only when playing interlaced content. The fraction of ExoPlayer playbacks affected is tiny, and so I don't think we can really justify investing more time into this issue. It's up to AmLogic to decide whether they wish to better support your use case. Please direct your issue to them. |
Perhaps you `re right. We reported problems to Amlogic. |
Issue description
Hello
We are using Exoplayer on our application. We have noticed that there is a difference on video quality between Exolplayer and Mediaplayer.
The picture quality is better on Mediaplayer and the video plays smoothly (the colors seem to be different). On the other hand, picture on Exoplayer is not so clear and video freezes time after time.
We are testing the same streams in both players
Version of ExoPlayer being used
The version of exoplayer is 2.7.1
Device(s) and version(s) of Android being used
We have tested on different devices, mainly in Android 4.4.2 STB
A full bug report captured from the device
The text was updated successfully, but these errors were encountered: