Skip to content
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

Zimit Videos are not playable on kiwix-desktop Windows #1276

Open
kelson42 opened this issue Dec 9, 2024 · 15 comments
Open

Zimit Videos are not playable on kiwix-desktop Windows #1276

kelson42 opened this issue Dec 9, 2024 · 15 comments
Assignees
Milestone

Comments

@kelson42
Copy link
Collaborator

kelson42 commented Dec 9, 2024

With cutting edge dev version of Kiwix Desktop on Windows
(download ZIM at https://dev.library.kiwix.org/#lang=&q=quartier)

See
Image

But it works online:
https://dev.library.kiwix.org/viewer#mes-quartiers-chinois_fr_all_2024-12/mesquartierschinois.wordpress.com/

@kelson42 kelson42 added this to the 2.4.0 milestone Dec 9, 2024
@kelson42
Copy link
Collaborator Author

kelson42 commented Dec 9, 2024

@benoit74 MIght that be that we have some kind of problem with the user-agent or the resolution?

@benoit74
Copy link

benoit74 commented Dec 9, 2024

I doubt (we never had a problem of user-agent or resolution with Youtube video, we always suspected but never got into this as far as I remember). We should first check with https://dev.library.kiwix.org/#lang=eng&q=zimit+test+website to get a better grasp of the problem. I will have a look.

@benoit74 benoit74 changed the title Zimit video is not playable Inline JS of zimit/warc2zim is not working Dec 9, 2024
@benoit74
Copy link

benoit74 commented Dec 9, 2024

Testing with https://dev.library.kiwix.org/#lang=eng&q=zimit+test+website, it is now clear that the problem is not specific to Youtube but all (even very straightforward) inline JS.

If you go to "Javascript" page on this test website, we see that all inline JS are failing (while working online in kiwix-serve at https://dev.library.kiwix.org/viewer#website.test.openzim.org_en_all_2024-12/website.test.openzim.org/javascript.html and in all other readers if I'm not mistaken).

@veloman-yunkan do you have any clue where to look at?

Problem is already present in 2.3.1, so for me this is not an issue which should stop release of 2.4.0

@kelson42
Copy link
Collaborator Author

kelson42 commented Dec 9, 2024

@benoit74 Thank you very much for the analysis! @veloman-yunkan if there is something unclear how these ZIM are working, please request a meeting to @benoit74 so you can clarify things.

@benoit74
Copy link

benoit74 commented Dec 9, 2024

Yes, do not hesitate, zimit test website is really "plain simple", so do not hesitate if you need a small tour, it will probably be quick to explain.

@veloman-yunkan
Copy link
Collaborator

veloman-yunkan commented Dec 10, 2024

In the Linux build of kiwix-dekstop the tests 01*, 08* and 09* for inline Javascript fail too:

Various Javascript
On every lines below, you should see written "This is working OK"

01a. Simple inline Javascript with content on "normal" FQDN: This is not working

01b. Simple inline Javascript with content on "special chars" FQDN: This is not working

01c. Simple inline Javascript with content on "normal" FQDN and accentuated path: This is not working

01d. Simple inline Javascript with content on "special chars" FQDN and accentuated path: This is not working

01e. Simple inline Javascript with content on "normal" FQDN and utf-8 char in path: This is not working

01f. Simple inline Javascript with content on "special chars" FQDN and utf-8 char in path: This is not working

01g. Simple inline Javascript with content on "normal" FQDN and improperly escaped accentued char in path: This is not working

01h. Simple inline Javascript with content on "special chars" FQDN andimproperly escaped accentued char in path: This is not working

01i. Simple inline Javascript with content on improperly escaped "special chars" FQDN: This is not working

01j. Simple inline Javascript with content accessed with query parameter: This is not working

01k. Simple inline Javascript with content accessed with query parameter and query value containing an equal sign : This is not working

01l. Simple inline Javascript with content accessed with query parameter and query value containing a percent sign: This is not working

01m. Simple inline Javascript with content URL containing an interogation point sign: This is not working

01n. Simple inline Javascript with content URL containing an interogation point sign and a query parameter: This is not working

01o. Simple inline Javascript with content on "normal" FQDN and improperly escaped utf-8 char in path: This is not working

01p. Simple inline Javascript with content on "special chars" FQDN and improperly escaped utf-8 char in path: This is not working

01q. Simple inline Javascript with content on relative path and improperly escaped utf-8 char in path: This is not working

01r. Simple inline Javascript with content on relative path and exclamation mark in path: This is not working

02a. Simple classic Javascript with simple src: This is working OK

02b. Simple classic Javascript with src and exclamation mark in path: This is working OK

03. Simple classic Javascript with src and type: This is working OK

04. Simple classic Javascript onload: This is working OK

05. Simple classic Javascript preload as script: This is working OK

06a. Simple module Javascript with src and type - nominal case: This is working OK

06b. Simple module Javascript with src and type - unused vars: This is working OK

06c. Simple module Javascript with src and type - absolute path: This is working OK

06d. Simple module Javascript with src and type - parent path: This is working OK

06e. Simple module Javascript with src and type - accentuated path: This is working OK

06f. Simple module Javascript with src and type - querystring: This is working OK

06g. Simple module Javascript with src and type - querystring with equal sign in value: This is working OK

06h. Simple module Javascript with src and type - querystring with percent sign in value: This is working OK

06i. Simple module Javascript with src and type - interogation sign in path: This is working OK

06j. Simple module Javascript with src and type - interogation sign in path and querystring: This is working OK

07. Simple module Javascript with modulepreload: This is working OK

08a. Simple module Javascript with importmap required: This is not working

08b. Simple module Javascript with importmap required: This is not working

08c. Simple module Javascript with importmap required: This is not working

09a. Simple module Javascript with importmap required but nasty URL used in JS: This is not working

09b. Simple module Javascript with importmap required but nasty URL used in JS: This is not working

09c. Simple module Javascript with importmap required but nasty URL used in JS: This is not working

09d. Simple module Javascript with importmap required but nasty URL used in JS: This is not working

10. Rewritting image src dynamically based on already statically rewritten link: This is working OK

@veloman-yunkan
Copy link
Collaborator

By looking at the HTML source of the inline Javascript test page (the snapshot is saved here) it's not surprising that the 01[a-r] tests fail - they all fetch data from an external URL (located at https://website.test.openzim.org/ or https://xn--wbsite-bva.test.openzim.org/).

@veloman-yunkan
Copy link
Collaborator

In the Linux build of kiwix-dekstop the tests 01*, 08* and 09* for inline Javascript fail too:

The set of failing tests is identical across Linux and Windows.

Whereas the problem with video playback is only under Windows.

@veloman-yunkan
Copy link
Collaborator

veloman-yunkan commented Dec 10, 2024

It looks like in the Qt build used in our CI/CD under Windows proprietary audio and video codecs have not been enabled.

https://doc.qt.io/qt-5/qtwebengine-features.html#audio-and-video-codecs

Qt WebEngine supports the MPEG-4 Part 14 (MP4) file format only if the required proprietary audio and video codecs, such as H.264 and MPEG layer-3 (MP3), have been enabled.

@benoit74 benoit74 changed the title Inline JS of zimit/warc2zim is not working Videos are not playable on kiwix-desktop Windows Dec 10, 2024
@benoit74
Copy link

Thank you! Let's focus back this issue on video problem on Windows then, looks like these are distinct issues.

@kelson42
Copy link
Collaborator Author

It looks like in the Qt build used in our CI/CD under Windows proprietary audio and video codecs have not been enabled.

https://doc.qt.io/qt-5/qtwebengine-features.html#audio-and-video-codecs

Qt WebEngine supports the MPEG-4 Part 14 (MP4) file format only if the required proprietary audio and video codecs, such as H.264 and MPEG layer-3 (MP3), have been enabled.

We should not have to activate the support of these propriatary codecs because we use webm. In addition we should not because this would imply probably paying license fee for our distributed software.

@benoit74
Copy link

I've opened #1281 for the inline JS part

@benoit74
Copy link

benoit74 commented Dec 10, 2024

We should not have to activate the support of these propriatary codecs because we use webm. In addition we should not because this would imply probably paying license fee for our distributed software.

We do not use webm on zimit ZIMs, we use whatever the youtube player decided to use at crawling time. And it might be mp4. And indeed, this video is mp4.

@benoit74
Copy link

I've asked the question to webrecorder team to have a bit more details about where mp4 comes from: webrecorder/browsertrix-crawler#732

@kelson42 kelson42 changed the title Videos are not playable on kiwix-desktop Windows Zimit Videos are not playable on kiwix-desktop Windows Dec 11, 2024
@kelson42
Copy link
Collaborator Author

I've asked the question to webrecorder team to have a bit more details about where mp4 comes from: webrecorder/browsertrix-crawler#732

@benoit74 Thank you, I think we have two issues:

@kelson42 kelson42 modified the milestones: 2.4.0, 2.5.0 Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants