#3 "The media could not be played" when seeing videos

Closed
opened 2 years ago by TotalCaesar659 · 11 comments
TotalCaesar659 commented 2 years ago (Migrated from github.com)
Owner

When seeing some videos (e.g. Twitter posts with them), it says "The media could not be played", and usual Chromium shows the notification "Get Google Play services. Chromium won't run without Google Play" etc. Same result is on ungoogled-chromium too.
P.S. Usual Chromium (and ungoogled-chromium) doesn't let to make screenshots, so here's the photo.
1

When seeing some videos (e.g. Twitter posts with them), it says "The media could not be played", and usual Chromium shows the notification "Get Google Play services. Chromium won't run without Google Play" etc. Same result is on ungoogled-chromium too. P.S. Usual Chromium (and ungoogled-chromium) doesn't let to make screenshots, so here's the photo. ![1](https://user-images.githubusercontent.com/14265316/60623958-b8d01c80-9dec-11e9-9406-d869a7356adb.jpg)
wchen342 commented 2 years ago (Migrated from github.com)
Owner

The video playback problem is an upstream licensing issue, see https://groups.google.com/a/chromium.org/d/msg/chromium-dev/mHNIn0FUouo/Foi0wBSJMwAJ.
I will not distribute versions compiled with proprietary codecs, but you can always build your own version with the script in this repo.

The 'Get Google Play Services' is another issue. Is this the same as what you are seeing?

The video playback problem is an upstream licensing issue, see [https://groups.google.com/a/chromium.org/d/msg/chromium-dev/mHNIn0FUouo/Foi0wBSJMwAJ](https://groups.google.com/a/chromium.org/d/msg/chromium-dev/mHNIn0FUouo/Foi0wBSJMwAJ). I will not distribute versions compiled with proprietary codecs, but you can always build your own version with the script in this repo. The 'Get Google Play Services' is another issue. Is [this](https://github.com/bromite/bromite/issues/281) the same as what you are seeing?
TotalCaesar659 commented 2 years ago (Migrated from github.com)
Poster
Owner

Yeah, it looks similar, but the warning appears when opening a video, so I thought that may be related to codecs or smth like this. Thank you for explanation, it would be good to add this to readme (with build instruction).
P.S. Could you enable the ability for making screenshots? It looks weird that Chromium doesn't let to do it.

Yeah, it looks similar, but the warning appears when opening a video, so I thought that may be related to codecs or smth like this. Thank you for explanation, it would be good to add this to readme (with build instruction). P.S. Could you enable the ability for making screenshots? It looks weird that Chromium doesn't let to do it.
wchen342 commented 2 years ago (Migrated from github.com)
Owner

Please do not bring up multiple problems in one issue. Next time open a new issue for a new problem. I will keep this open for the Play Service problem for now.

I believe you are using incognito pages. The screenshot is forbidden when using incognito pages by design for privacy reasons, and the only known way to change that behavior is to pass in a cmdline parameter using adb:

$ adb shell 'echo "chrome --enable-incognito-snapshots-in-android-recents" > /data/local/tmp/chrome-command-line'
Please do *not* bring up multiple problems in one issue. Next time open a new issue for a new problem. I will keep this open for the Play Service problem for now. I believe you are using incognito pages. The screenshot is forbidden when using incognito pages by design for privacy reasons, and the only known way to change that behavior is to [pass in a cmdline parameter using adb](https://bugs.chromium.org/p/chromium/issues/detail?id=920762): ``` $ adb shell 'echo "chrome --enable-incognito-snapshots-in-android-recents" > /data/local/tmp/chrome-command-line' ```
TotalCaesar659 commented 2 years ago (Migrated from github.com)
Poster
Owner

Yeah, sorry, I understood. And thanks for the answer, I forgot about incognito mode.

Yeah, sorry, I understood. And thanks for the answer, I forgot about incognito mode.
thestinger commented 2 years ago (Migrated from github.com)
Owner

It's worth noting that in this context, proprietary means patented. The implementations of mp3, h.264, etc. are open source and there isn't a licensing issue with the sources. It's opt-in in order to avoid patent encumbered codecs by default. It's a totally separate issue from software licensing.

@wchen342 The issue of it trying to use Play Services and triggering that notification is likely tied to Chromecast integration for video elements. On other platforms, Chromium has built-in support for all the Google services. On Android, it often doesn't but rather uses it via Play Services to reuse the implementation across multiple apps instead of it being specific to Chromium. They're supposed to make sure to check for it being present before trying to use it, but sometimes there are regressions because they really do much testing without Play Services. Even if you replace the client library with stubs, you really want to avoid having it call into it to avoid (silent) breakage, so these issues should still be fixed.

It's worth noting that in this context, proprietary means patented. The implementations of mp3, h.264, etc. are open source and there isn't a licensing issue with the sources. It's opt-in in order to avoid patent encumbered codecs by default. It's a totally separate issue from software licensing. @wchen342 The issue of it trying to use Play Services and triggering that notification is likely tied to Chromecast integration for video elements. On other platforms, Chromium has built-in support for all the Google services. On Android, it often doesn't but rather uses it via Play Services to reuse the implementation across multiple apps instead of it being specific to Chromium. They're supposed to make sure to check for it being present before trying to use it, but sometimes there are regressions because they really do much testing without Play Services. Even if you replace the client library with stubs, you really want to avoid having it call into it to avoid (silent) breakage, so these issues should still be fixed.
thestinger commented 2 years ago (Migrated from github.com)
Owner

@wchen342 I ended up resolving this by applying 9bb898ebce/0020-disable-media-router-media-remoting-by-default.patch and 9bb898ebce/0021-disable-media-router-by-default.patch. It's possible that only the 2nd patch is needed, but I'd rather just disable both settings and I don't feel like narrowing down which one resolved the issue.

@wchen342 I ended up resolving this by applying https://github.com/GrapheneOS/Vanadium/blob/9bb898ebcee8102fd60da961ee17c458eaf3ec7f/0020-disable-media-router-media-remoting-by-default.patch and https://github.com/GrapheneOS/Vanadium/blob/9bb898ebcee8102fd60da961ee17c458eaf3ec7f/0021-disable-media-router-by-default.patch. It's possible that only the 2nd patch is needed, but I'd rather just disable both settings and I don't feel like narrowing down which one resolved the issue.
wchen342 commented 2 years ago (Migrated from github.com)
Owner

It's worth noting that in this context, proprietary means patented.

I did some reading and you are right. I am not familiar with patents so thanks for pointing this out.

Even if you replace the client library with stubs, you really want to avoid having it call into it to avoid (silent) breakage, so these issues should still be fixed.

Yes, and that will basically need android specific patches. For now I haven't really starting replace google play libraries (I am still trying to figure out how to exclude them in the building system), but once I start to do so then fixes will need to be applied at the same time.

And thanks for the patches! I think the second one is more likely to be the cause since we have enable_remoting=false and enable_reporting=false in GN flags, but either way it won't hurt to apply them.

> It's worth noting that in this context, proprietary means patented. I did some reading and you are right. I am not familiar with patents so thanks for pointing this out. > Even if you replace the client library with stubs, you really want to avoid having it call into it to avoid (silent) breakage, so these issues should still be fixed. Yes, and that will basically need android specific patches. For now I haven't really starting replace google play libraries (I am still trying to figure out how to exclude them in the building system), but once I start to do so then fixes will need to be applied at the same time. And thanks for the patches! I think the second one is more likely to be the cause since we have `enable_remoting=false` and `enable_reporting=false` in GN flags, but either way it won't hurt to apply them.
csagan5 commented 2 years ago (Migrated from github.com)
Owner

FYI the GN flags used in Bromite are always available at: https://github.com/bromite/bromite/blob/master/build/GN_ARGS

FYI the GN flags used in Bromite are always available at: https://github.com/bromite/bromite/blob/master/build/GN_ARGS
wchen342 commented 2 years ago (Migrated from github.com)
Owner
Should be fixed by [https://github.com/wchen342/ungoogled-chromium-android/commit/cccee318847901f83ae4b99b5bf4a6e72dd17fef](https://github.com/wchen342/ungoogled-chromium-android/commit/cccee318847901f83ae4b99b5bf4a6e72dd17fef).
thestinger commented 2 years ago (Migrated from github.com)
Owner

"The media could not be played" part might also be the issue of not having the patented codecs like h.264, etc. enabled via FFmpeg.

"The media could not be played" part might also be the issue of not having the patented codecs like h.264, etc. enabled via FFmpeg.
wchen342 commented 2 years ago (Migrated from github.com)
Owner

I already set ffmpeg_branding="Chrome" so that shouldn't be the problem.

I already set `ffmpeg_branding="Chrome"` so that shouldn't be the problem.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.