Page MenuHomePhabricator

Fix video2commons so it imports videos at max resolution & fix videos imported with low quality
Closed, ResolvedPublicBUG REPORT

Description

[cross-posting from the Wishlist - original author: Prototyperspective)

Video2Commons is widely used to import free-licensed videos from sites like YouTube to Commons.

It used to often import videos at a resolution lower than at the source.

This means the video isn't well-preserved on Commons and can be blurry. The (default) playback quality would be what could be tweaked down but the video on Commons I think should be at the max resolution (if it's useful).

An example video is here. If I create the webm using ffmpeg or download the video as described here, it's 4 times larger. These low-quality videos all have 640 × 360 pixels.

That problem got fixed in Oct. 2024 but I don't know if it truly got fully fixed and now it seems like there is a new or additional problem of videos being imported at lower quality (can't test the example there because the tool seems currently dysfunctional again). Fixing this is probably a community opportunity; please:

  1. Fix the remaining and/or new issues in V2C that result in videos being imported at lower quality than available at the source
  2. Identify somehow the videos that were imported at lower resolution than what's available at source – this link shows files imported via v2c which have the 640×360 resolution – however, some videos truly have that as max resolution and there may be additional problems where the resolution is different
  3. Upload the best-quality video as new revision for all of these low-quality files (files that are in use on Wikipedia or Wikidata would be good to prioritize; it's probably quite a few hundred files; the prior revision could subsequently be deleted)

Additionally, it seems like many NASA videos were also only imported at low quality (example) but it's unrelated to v2c. It would be great if that was also fixed and the method of #3 here could maybe also be used for that. I've asked about it here. It's better not really part of this wish but when either gets done it may be most productive to address both in one go.

Event Timeline

mikez-WMF changed the task status from Open to In Progress.Jan 30 2026, 3:25 PM
mikez-WMF assigned this task to Amdrel.
mikez-WMF triaged this task as Medium priority.

Apologies for not filing a ticket earlier to track the work done so far here! The second part to fix videos imported with low quality remains open and @Amdrel is having a hard time reproducing, but @Prototyperspective has provided some pointers in this discussion thread: https://meta.wikimedia.org/wiki/Talk:Community_Wishlist/W447 (thank you!)

@Amdrel

This revised list of 2k or so files from @Prototyperspective (thanks again!) may have better quality at source for half of the files:

https://commons.wikimedia.org/w/index.php?sort=create_timestamp_desc&search=deepcategory%3A%22Uploaded_with_video2commons%22+filewidth%3A640+filetype%3Avideo+insource%3Asource%3Dhttps%3A%2F%2Fwww.youtube.com%2Fwatch%3F&title=Special%3ASearch&profile=advanced&fulltext=1&ns6=1

Would it be possible to try to fix these? Then we can close this, and @Prototyperspective can file a followup wish that we can revisit in the future once we figure out a more scalable way to retroactively fix identified slices of low quality uploads.

I took a look at this query's 20 most recent results and 15/20 of the videos downloaded correctly. The remaining 5 videos are at a lower resolution than the original source. All of these improper videos were downloaded manually by the user prior to being uploaded to video2commons and were not fetched directly from YouTube directly by video2commons. Likely what happened was the manual method used to download these videos by users prior to uploading them to video2commons failed to download the full resolution versions. I downloaded each of these videos using yt-dlp and got the full resolution versions as we would hope would happen.

If users manually used yt-dlp or a similar tool to obtain these videos then it's possible that the lower resolution versions were downloaded due to the JS runtime not being properly configured to solve the challenge requests made by YouTube. This requires a bit of setup and is a new requirement imposed by yt-dlp. Also, one of the videos in the list is AI upscaled using YouTube's super resolution feature, and I'm not sure if we want to support that anyway. video2commons unfortunately gets blocked by YouTube occasionally and this could be causing users to download the videos via other means, resulting in poorer quality.

Thanks for looking it and sorry for not providing a set of affected files right away; here are some from the list of my uploads also linked at the talk page:

  • 640x but 1920x when downloaded
  • 640x but 1920 at source
  • 640x but 854 at source
  • 640x but 1920 at source

Thank you for the examples! I'm also running a script that should get a (mostly) complete list of videos with higher resolutions available. I'll update the thread with the list once it's complete.

The script finished and I found 135 videos in total that need re-uploads. Attached is a CSV file with the full list of titles and YouTube IDs. I excluded AI upscaled videos as well (new YouTube feature). It's actually a bit less than I expected.

It should be possible to write a script that automatically uploads new revisions of these, though I think by default only the original uploader can do that?

Edit: I didn't include files with greater than 640 width (480p) and less than 1280 width (720p) in this CSV. I can include those if needed. I noticed many files are missing from this. It's possible that yt-dlp isn't able to get the higher formats for many videos even on the latest version properly configured. If that's the case then there's only so much we can do.

Thank you @Amdrel ! cc: @Don-vip @Prototyperspective

I think we're running into a wall or rabbit hole for additional fixes of old videos. For additional slices of videos that need to be identified and fixed somehow, I can file another task (and wish) for tracking. We have to weigh continued investigation and fixes of old videos against other video2commons work we want to get to as there are still also many GitHub issues we want to investigate and fix.

Thanks you two! That's surprisingly few files Amdrel. If that's close to all they could be fixed manually. It would be great if you could put that on a new Commons report page where the file links are clickable and things are in columns of a wikitable. However, it seems to be very incomplete as all of the four example files list above (+this) are not included. yt-dlp does get the higher-res version for these so maybe you could adjust how the checking works. If there still are some issues, it would be great if you could file a corresponding yt-dlp issue. No, by default everybody can upload new file revisions and a script that uploads new versions of lots of files at once would be very useful – also for other issues if they occur.

Thank you! I filed a follow up task: T418575
And the spinoff wish for more visibility: https://meta.wikimedia.org/wiki/Community_Wishlist/W512