Commons:Village pump/Technical/Archive/2022/04
This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
API and list of video subtitles
Hi there, does anyone know if there is a way to retrieve a list of possible srt files for a given video? It seems easy enough to retieve them via API if you know what they are, eg here; so how does someone know which ones they can ask for? --JimKillock (talk) 21:01, 1 April 2022 (UTC)
- @JimKillock: Try action=query & prop=videoinfo & viprop=timedtext. NguoiDungKhongDinhDanh 00:26, 2 April 2022 (UTC)
- Thanks very much! --JimKillock (talk) 04:39, 2 April 2022 (UTC)
Related: API and video descriptions; license
Hi, is it possible to get the license and video description from the API also? I couldn't see it but I would have thought these should be available. --JimKillock (talk) 10:52, 2 April 2022 (UTC)
- @JimKillock: It is possible to get pages' content, but not licenses listed in, say, an array, as far as I know. About descriptions, if it was about the captions that are not stored in wikitext, then I'd say retrievable. Otherwise, no. Try this request if it helps: action=query & prop=videoinfo|revisions & viprop=timedtext & rvprop=content & rvslots=* & rvlimit=1 & wbetlanguage=uselang & wbetterms=alias|label|description. However, there's another workaround for this; you can parse pages' content to get the first element that has
description
and<langcode>
(de
,en
etc.). NguoiDungKhongDinhDanh 13:48, 2 April 2022 (UTC)- Thanks, that's basically what we are doing; I was a bit worried that this is adding expense to WM servers, and is at least a bit impolite. A developer is working on a WM » Peertube importer, which I am sure won't come under especially large use, but even so, I wanted to check. The code is going into yt-download, (see pull request) which everyone, including WM, seem to use for video plus data imports, so there is a potential cost to doing this inefficiently. --JimKillock (talk) 14:25, 2 April 2022 (UTC)
- @JimKillock: Both description and licence seem to be in
prop=videoinfo&viprop=extmetadata
, in both cases automatically extracted from the wikitext. That only seems to return the English description, though. Even settinguselang=de
doesn't seem to help. --bjh21 (talk) 15:15, 2 April 2022 (UTC)The link I gave above returns all descriptions inNguoiDungKhongDinhDanh 17:03, 2 April 2022 (UTC)response.query.pages[0].revisions[0].slots.mediainfo.content
(note that I usedformatversion=2
).- Didn't realize that you were talking about
{{{description}}}
. NguoiDungKhongDinhDanh 17:08, 2 April 2022 (UTC)
- Didn't realize that you were talking about
Cite Q
{{Cite Q}} is installed on this wiki, but doesn't work properly, because it relies on {{Citation}} and the version of that here is old, and has not been kept in sync with that on en.Wikipedia, from which it was forked, and which is well-maintained.
Can we update the latter? There may be some dependencies on related modules, also. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 16:29, 2 April 2022 (UTC)
Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Problems
- For a few days last week, edits that were suggested to newcomers were not tagged in the Special:RecentChanges feed. This bug has been fixed. [1]
Changes later this week
- The new version of MediaWiki will be on test wikis and MediaWiki.org from 5 April. It will be on non-Wikipedia wikis and some Wikipedias from 6 April. It will be on all wikis from 7 April (calendar).
- Some wikis will be in read-only for a few minutes because of a switch of their main database. It will be performed on 7 April at 7:00 UTC (targeted wikis).
Future changes
- Starting next week, Tech News' title will be translatable. When the newsletter is distributed, its title may not be
Tech News: 2022-14
anymore. It may affect some filters that have been set up by some communities. [2] - Over the next few months, the "Add a link" Growth feature will become available to more Wikipedias. Each week, a few wikis will get the feature. You can test this tool at a few wikis where "Link recommendation" is already available.
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
20:59, 4 April 2022 (UTC)
bigChunkedUpload.js
Hi, This needs care: User talk:Rillke/bigChunkedUpload.js. Thanks, Yann (talk) 10:10, 6 April 2022 (UTC)
- @Yann: (I'm not the script creator) I cannot reproduce this; I'm able to use the script to upload the existing versions of the file you mentioned to File:Test.pdf. Does the issue only occur with a version of the file that you have not yet managed to upload to Commons? —wqnvlz (talk · contribs); 21:44, 6 April 2022 (UTC)
- @Wqnvlz: This error happened only once, but uploads frequently stop after the first chunk without any reason or error message. Yann (talk) 23:04, 6 April 2022 (UTC)
Automatic categorisation by file type
Is it possible to make {{Restoration}} more intelligent, so that instead of categorising every file to which it is applied into Category:Files requiring restoration, it uses, for example, Category:Images requiring restoration for images? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 11:32, 2 April 2022 (UTC)
- I changed the template's sandbox to switch on the file extension of the page name (currently only distinguishing Images and Files). I added a couple tests, using the new
pagename
anddemo
parametersare usedto simulate actual usage. I based this on the list of allowed file types at Special:Upload, so it's possible that there are odd historically allowed formats that I'm missing. —wqnvlz (talk · contribs); 12:03, 4 April 2022 (UTC)- @Pigsonthewing: Currently Audio and Image are the only subcategories, though. —wqnvlz (talk · contribs); 12:22, 4 April 2022 (UTC)
- @Wqnvlz: LGTM. Thank you. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:15, 4 April 2022 (UTC)
- @Pigsonthewing: I suppose the translations must be changed to say 'files' instead of 'images'. Is it worth it to switch the text based on the detected file type? Also, should the subcategories of Category:Files requiring restoration have {{Global maintenance category}} like the parent does? —wqnvlz (talk · contribs); 20:04, 4 April 2022 (UTC)
- @Wqnvlz: Changing the translations would be sensible. And yes to {{Global maintenance category}}. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 10:58, 7 April 2022 (UTC)
- @Pigsonthewing: I suppose the translations must be changed to say 'files' instead of 'images'. Is it worth it to switch the text based on the detected file type? Also, should the subcategories of Category:Files requiring restoration have {{Global maintenance category}} like the parent does? —wqnvlz (talk · contribs); 20:04, 4 April 2022 (UTC)
How are files with identical names but different extensions sorted in a cat?
does anyone know? are they sorted by the extensions then? like abc.jpg will come before abc.png? any example? RZuo (talk) 21:06, 9 April 2022 (UTC)
- Yes. The sort key as used by MediaWiki includes the entire filename, with extension. --bjh21 (talk) 22:41, 9 April 2022 (UTC)
SVG bug, but this time it's librsvg that's correct?
Anyone else seeing deformation of the blue part of File:Synthese+.svg when opening the file in a (Chromium-based) browser? Could it be:
- https://bugs.chromium.org/p/chromium/issues/detail?id=966044
- https://bugs.chromium.org/p/chromium/issues/detail?id=698007
- https://bugs.chromium.org/p/chromium/issues/detail?id=922247
? This seems to be a literal edge case; changing the radius by a miniscule amount causes it to go away. — wqnvlz (talk · contribs) 03:40, 1 April 2022 (UTC)
- This is a librsvg/thumbor bug, the chrome bugs do not matter. It is better to check if the issue is still present in librsvg 2.50, because there is work being done to upgrade it to that version (or switch to resvg), see phab:T216815. Until then you could try to find and use a workaround in the file itself.--Snævar (talk) 10:14, 10 April 2022 (UTC)
Tech News: 2022-15
Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Recent changes
- There is a new public status page at www.wikimediastatus.net. This site shows five automated high-level metrics where you can see the overall health and performance of our wikis' technical environment. It also contains manually-written updates for widespread incidents, which are written as quickly as the engineers are able to do so while also fixing the actual problem. The site is separated from our production infrastructure and hosted by an external service, so that it can be accessed even if the wikis are briefly unavailable. You can read more about this project.
- On Wiktionary wikis, the software to play videos and audio files on pages has now changed. The old player has been removed. Some audio players will become wider after this change. The new player has been a beta feature for over four years. [3][4]
Changes later this week
- The new version of MediaWiki will be on test wikis and MediaWiki.org from 12 April. It will be on non-Wikipedia wikis and some Wikipedias from 13 April. It will be on all wikis from 14 April (calendar).
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
19:42, 11 April 2022 (UTC)
Need help with pdf file error
Hi, File:Kembang Rampe Kasusastraan Bali Purwa Wewidangan I Buku II.pdf originally was uploaded on 6 April, doing fine, and it was used for Balinese Wikisource proofreading competition: s:ban:Indéks:Kembang Rampe Kasusastraan Bali Purwa Wewidangan I Buku II.pdf. Then I was trying to fix one of the page, p.146, I was given the jpg of the correct file, edited it in my Adobe Acrobat X,
- I uploaded it (12 April 2022 15.16), it showed error 0x0 size, although checking individual page file is okay (https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Kembang_Rampe_Kasusastraan_Bali_Purwa_Wewidangan_I_Buku_II.pdf/page146-1004px-Kembang_Rampe_Kasusastraan_Bali_Purwa_Wewidangan_I_Buku_II.pdf.jpg), but now it failed to display in the wikisource: https://ban.wikisource.org/w/index.php?title=Kaca:Kembang_Rampe_Kasusastraan_Bali_Purwa_Wewidangan_I_Buku_II.pdf/146&action=edit
- Then I reverted it back (12 April 2022 15.18)
- Since this is not the first time it happened in Commons, then I tried to do some tests on File:Test.pdf, until the last one (12 April 2022 15.44), which at the time it was uploaded, was working.
- Then I uploaded the same file back to File:Kembang Rampe Kasusastraan Bali Purwa Wewidangan I Buku II.pdf (12 April 2022 15.48), lo and behold, it was broken again, and even the file in Test.pdf was also broken. Not only that, the original file (6 April 2022 14.05) was also broken. Broken here means it shows 0x0 dimension, and wasn't able to be displayed in Wikisource Pages. Each version are working correctly when downloaded.
- Then I reverted it back again, to no avail. ( 12 April 2022 15.50) Now the original file is broken, and I can't repair it.
- I tried using other tools online: https://www.adobe.com/acrobat/online/add-pages-to-pdf.html, and reupload again (12 April 2022 16.06), still not working.
Any help would be appreciated! Bennylin (yes?) 16:17, 12 April 2022 (UTC)
Why are category redirects not actual redirects?
Commons has over 500,000 category redirects, however none of these function as actual MediaWiki redirects. Why? Nosferattus (talk) 18:12, 10 April 2022 (UTC)
- @Nosferattus: Short answer: Categories cannot be redirected using
#redirect
syntax. See also en:WP:CATRED. NguoiDungKhongDinhDanh 18:26, 10 April 2022 (UTC)- @NguoiDungKhongDinhDanh: I just tested replacing a category soft redirect with a hard redirect, and it worked fine.[5] I imagine what you mean by "categories cannot be redirected" is that files placed in a redirected category aren't automatically put in the target category instead, but that's also true of the current soft redirects. What is the advantage of using soft redirects? An obvious disadvantage is that software can't distinguish between our category redirects and regular categories, which I imagine is why we get so many files mistakenly uploaded to category redirects. Nosferattus (talk) 18:37, 10 April 2022 (UTC)
- @Nosferattus: Imagine going to a redirect category to recategorize the misplaced pages and get redirected automatically to the opposite of your destination. That is the difference. On the other hand, I'm quite surprised that
#redirect
-ing really work. NguoiDungKhongDinhDanh 18:43, 10 April 2022 (UTC)- @NguoiDungKhongDinhDanh: Hmmm, that's a good point, although I'm not sure if the trade-off of getting more mis-uploaded files is worth it. Regardless, thanks for explaining it to me! Nosferattus (talk) 18:49, 10 April 2022 (UTC)
- @Nosferattus: Imagine going to a redirect category to recategorize the misplaced pages and get redirected automatically to the opposite of your destination. That is the difference. On the other hand, I'm quite surprised that
- @NguoiDungKhongDinhDanh: I just tested replacing a category soft redirect with a hard redirect, and it worked fine.[5] I imagine what you mean by "categories cannot be redirected" is that files placed in a redirected category aren't automatically put in the target category instead, but that's also true of the current soft redirects. What is the advantage of using soft redirects? An obvious disadvantage is that software can't distinguish between our category redirects and regular categories, which I imagine is why we get so many files mistakenly uploaded to category redirects. Nosferattus (talk) 18:37, 10 April 2022 (UTC)
- Wait... Do people only use the "{{Category redirect}}" template because of English-language Wikipedia policy rather than any underlying software issue? "The issue" with files categorised in redirects isn't really an issue as a bot automatically changes them, though this doesn't happen instantly. While the MediaWiki Upload Wizard for whatever reason cannot differentiate between redirects and actual target categories Hot-Cat can, so why can't we get the same software from Hot-Cat that correctly targets a file regardless of what you type into the MediaWiki Upload Wizard? This would actually make category redirects very useful and could make this a more multilingual project. --Donald Trung 『徵國單』 (No Fake News 💬) (WikiProject Numismatics 💴) (Articles 📚) 07:54, 13 April 2022 (UTC)
Wrong file uploaded
Hi. Can someone please delete File:Newsreel - State Visit to France of Their Imperial Majesties, 1961.webm? I uploaded the wrong file (It is a duplicate of File:Newsreel - A Prince is Born, 1960.webm) and I cannot upload the correct file because of its size. HeminKurdistan (talk) 11:11, 15 April 2022 (UTC)
- Done Tagged for deletion. You can also do that yourself by adding
{{subst:my bad upload}}
. NguoiDungKhongDinhDanh 13:45, 15 April 2022 (UTC)
Advanced searching for files
Hi! Is there a way to search for media files from specific category that used in one of the wiki only, for example, in fr.wikipedia.org? (please ping me in the response message, thanks!) — Pacha Tchernof (talk) 19:53, 18 April 2022 (UTC)
- @Pacha Tchernof: If you don't mind wrangling SQL, it's fairly easy to do through Quarry: quarry:query/62995. You can fork that query and adjust the category and target wiki as required. bjh21 (talk) 20:15, 18 April 2022 (UTC)
- @Bjh21, thank you so much! I don’t mind wrangling SQL at all! That’s the greatest solution! — Pacha Tchernof (talk) 20:31, 18 April 2022 (UTC)
Tech News: 2022-16
Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Changes later this week
- The new version of MediaWiki will be on test wikis and MediaWiki.org from 19 April. It will be on non-Wikipedia wikis and some Wikipedias from 20 April. It will be on all wikis from 21 April (calendar).
- Some wikis will be in read-only for a few minutes because of a switch of their main database. It will be performed on 19 April at 07:00 UTC (targeted wikis) and on 21 April at 7:00 UTC (targeted wikis).
- Administrators will now have the option to delete/undelete the associated "Talk" page when they are deleting a given page. An API endpoint with this option is also available. This concludes the 11th wish of the 2021 Community Wishlist Survey.
- On selected wikis, 50% of logged-in users will see the new table of contents. When scrolling up and down the page, the table of contents will stay in the same place on the screen. This is part of the Desktop Improvements project. [6]
- Message boxes produced by MediaWiki code will no longer have these CSS classes:
successbox
,errorbox
,warningbox
. The styles for those classes andmessagebox
will be removed from MediaWiki core. This only affects wikis that use these classes in wikitext, or change their appearance within site-wide CSS. Please review any local usage and definitions for these classes you may have. This was previously announced in the 28 February issue of Tech News.
Future changes
- Kartographer will become compatible with FlaggedRevisions page stabilization. Kartographer maps will also work on pages with pending changes. [7] The Kartographer documentation has been thoroughly updated. [8] [9] [10]
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
23:09, 18 April 2022 (UTC)
File usage
This image lists several Wikipedia articles where it is in use, such as Mobile, Alabama. Yet when I go to each Wikipedia article, the file is not used there. Not sure what the problem is. Thanks! Magnolia677 (talk) 10:19, 20 April 2022 (UTC)
- I figured it out. The image is on this template. Thanks anyway. Magnolia677 (talk) 10:24, 20 April 2022 (UTC)
Categories and subcategories on the same screen
Is there any way to display images in a given category and all its subcategories on the same screen at a given time? Sometimes the categorization on Commons gets too fine-grained. For example, I would often rather not click through a separate subcategory for every year of a subject to find the image I want. I want to see every image on a topic from every year on the screen at once. IronGargoyle (talk) 16:10, 22 April 2022 (UTC)
- i proposed a gadget for this: MediaWiki talk:Gadget-DeepcatSearch.js. RZuo (talk) 17:16, 22 April 2022 (UTC)
- Very cool! You say you proposed it. Does it work now? Or does it still need to be implemented? I know very little about javascript. IronGargoyle (talk) 17:32, 22 April 2022 (UTC)
- i wrote everything on the talk page. someone has yet to edit the main page to create the gadget.
- you can copy line 60-78 of User:RZuo/common.js to your js.--RZuo (talk) 18:59, 23 April 2022 (UTC)
- Very cool! You say you proposed it. Does it work now? Or does it still need to be implemented? I know very little about javascript. IronGargoyle (talk) 17:32, 22 April 2022 (UTC)
Tech News: 2022-17
Latest tech news from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. Translations are available.
Recent changes
- On many wikis (group 1), the software to play videos and audio files on pages has now changed. The old player has been removed. Some audio players will become wider after this change. The new player has been a beta feature for over four years. [11][12]
Changes later this week
- The new version of MediaWiki will be on test wikis and MediaWiki.org from 26 April. It will be on non-Wikipedia wikis and some Wikipedias from 27 April. It will be on all wikis from 28 April (calendar).
- Some wikis will be in read-only for a few minutes because of a switch of their main database. It will be performed on 26 April at 07:00 UTC (targeted wikis).
- Some very old browsers and operating systems are no longer supported. Some things on the wikis might look weird or not work in very old browsers like Internet Explorer 9 or 10, Android 4, or Firefox 38 or older. [13]
Tech news prepared by Tech News writers and posted by bot • Contribute • Translate • Get help • Give feedback • Subscribe or unsubscribe.
22:53, 25 April 2022 (UTC)
Help request on relgen.js
Dear interface admins,
I would like to request your help to update the Indonesian translation for relgen.js. The new translation is available here: MediaWiki talk:Relgen.js/i18n/id. The previous one has made some confusion for Indonesian users, where the email address for submitting the permission leads to permissions-idwikimedia.org (which is no such email address).
Thank you. ··· 🌸 Rachmat04 · ☕ 18:06, 27 April 2022 (UTC)
can't convert .mov-videofile for upload
Hello, I tried a lot to convert a mov-videofile from my Canon EOS 70D for upload. "Commons Video Convert" and "Video2commons" doesn't work. The file is 133 MB with 12 seconds playtime. Who can help me, because I have a lot of other similar files for upload. Thanks! --Mike Krüger (talk) 12:56, 23 April 2022 (UTC)
- for now v2c is broken for personal videos: Commons_talk:Video2commons#Is_this_software_still_maintained?. we have to wait until someone fixes it or creates a new video upload tool.
- you can use things like ffmpeg to convert mov to webm on your computer and then use uploadwizard.--RZuo (talk) 19:13, 23 April 2022 (UTC)
- Thanks! Not the best video-quality, but I got it. --Mike Krüger (talk) 15:55, 24 April 2022 (UTC)
- I convert my videos by my own via ffmpeg to control the video quality. I use the parameters (for videos without audio) "C:\...\File.mp4" -c:v libvpx-vp9 -minrate XXXk -maxrate XXXk -b:v XXXk -preset slow "C:\...\File.webm" (XXX replaced by number in Kilobytes). Bitrate varies by resolution. --PantheraLeo1359531 😺 (talk) 11:00, 29 April 2022 (UTC)
- Thanks! Not the best video-quality, but I got it. --Mike Krüger (talk) 15:55, 24 April 2022 (UTC)
Historical stats of size of all files and file number
Hey dear community,
I would like to visualize the size of the dataset on commons and the file count over time in a graph. I already looked, however chronological evolution especially on the amount of data is hard to find (I only found irregular records in the Wayback Machine). Are there historical datasets on both somewhere? Unfortunately https://commons.wikimedia.org/wiki/Special:MediaStatistics shows only the current state afaik.
Thanks and greetings, --PantheraLeo1359531 😺 (talk) 10:48, 29 April 2022 (UTC)
- The old Wikistats has some regular file statistics, but it only goes up to December 2018. Dylsss (talk) 03:33, 30 April 2022 (UTC)
- Thank you, I will look through it :) --PantheraLeo1359531 😺 (talk) 14:08, 6 May 2022 (UTC)
LicenseReviewerBot is inactive
User:LicenseReviewerBot has been inactive since early April 2022, could someone @Bd9a119b5d05019d7c923207398ef3c3: fixed it? --A1Cafel (talk) 06:46, 28 April 2022 (UTC)
- @Eatcha: --PantheraLeo1359531 😺 (talk) 10:56, 29 April 2022 (UTC)
- @PantheraLeo1359531: Eatcha has been inactive since November 2021. --A1Cafel (talk) 07:25, 15 May 2022 (UTC)