Last modified: 2014-09-23 22:41:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30810, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28810 - Video thumbnails don't work (on live Commons?)
Video thumbnails don't work (on live Commons?)
Status: RESOLVED DUPLICATE of bug 41403
Product: MediaWiki extensions
Classification: Unclassified
UploadWizard (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 41371
  Show dependency treegraph
 
Reported: 2011-05-04 16:17 UTC by Neil Kandalgaonkar
Modified: 2014-09-23 22:41 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
thumbs (45.28 KB, image/png)
2012-10-25 14:31 UTC, Chris McMahon
Details
thumbs (40.98 KB, image/png)
2012-10-25 14:32 UTC, Chris McMahon
Details
thumbs (44.26 KB, image/png)
2012-10-25 14:32 UTC, Chris McMahon
Details
thumbs (67.60 KB, image/png)
2012-10-25 14:33 UTC, Chris McMahon
Details
UploadWizard with ogv and black box (154.88 KB, image/png)
2012-10-25 18:35 UTC, Andre Klapper
Details

Description Neil Kandalgaonkar 2011-05-04 16:17:14 UTC
When an OGV video file is uploaded, the requested preview is supposed to be available at a URL like this (the convention is "mid-(filename).jpg", which I believe corresponds to the middle keyframe, extracted without any scaling).

http://commons.wikimedia.org/wiki/Special:UploadStash/thumb/d4zwo6jo2olm526ap1h6d2v1hmphn91.ogx/mid-d4zwo6jo2olm526ap1h6d2v1hmphn91.ogx.jpg

This file is not available where UploadStash expects it, even after several minutes, so this isn't a thumbnailer-flakiness thing.
Comment 1 Neil Kandalgaonkar 2011-05-04 16:41:04 UTC
However, this seems to work just fine on commons.prototype, with the exact same file, and in fact a nearly identical URL, except for the hostname. 

http://commons.prototype.wikimedia.org/wiki/Special:UploadStash/thumb/d4zwo6jo2olm526ap1h6d2v1hmphn91.ogx/mid-d4zwo6jo2olm526ap1h6d2v1hmphn91.ogx.jpg

(Note that InstantCommons is not an issue since I abandoned both files before publishing).
Comment 2 Neil Kandalgaonkar 2011-08-18 21:52:14 UTC
Since Ian is taking this over, I figured I should brain-dump everything I know.

So this is what we know about thumbnails for video

- ogg thumbnails do work in Special:Upload, and after the file has been uploaded.
- ogg thumbnails work on commons.prototype.wikimedia.org (and properly configured local machines) for everything, even Special:UploadWizard

So, what are the differences?

- different ffmpeg config on the cluster? (unsure)
- files are mounted in NFS on the cluster (definitely a big difference)

And what's different between what UploadWizard does and what everything else does:

- we are doing something slightly unusual in that we are attempting to get a thumbnail for a file that is in the "temp" zone. This goes back to the definition of zones I told you about. Basically, a zone defines a mapping between a filesystem directory and a base URL. Also, there are some security characteristics associated with zones -- deleted and temp files are not normally served to most users.

the standard zones are
- 'public' -- the usual thing
- 'temp' -- files in the stash are here
- 'deleted' -- files that have been "archived"
- 'thumb' -- thumbnails

Note: the temp zone, is, if I recall correctly, not the same as the temporary directory that files are written into as PHP receives the upload. The 'temp' zone exists in NFS.

I had to do a lot of trickery to make thumbnails work for files in the "temp" zone and also be secure. We don't want people to be able to see thumbnails unless the file is published (which is the moment when presumably it has a good license). So, all thumbnails are public, but I hid the actual thumbnail URL from the user by streaming it through PHP. This is the real purpose of Special:UploadStash -- to stream files while hiding their scaler URL. Listing files is just a bit of functionality I threw in there for fun and debugging.

(I discovered later that img_auth.php (in the root of MediaWiki) does almost *EXACTLY* the same thing, for wikis which define some forms of security.)
Comment 3 Ian Baker 2011-08-24 00:01:47 UTC
Peter is going to upgrade all the scalers either this week or next.  He recommends that we see if moving them to the same OS release as all our dev environments fixes it before digging further.
Comment 4 Mark A. Hershberger 2011-09-06 19:48:46 UTC
pinging peter in IRC (and on this bug) to see if the image scalars are upgraded.
Comment 5 Brion Vibber 2011-09-06 20:05:35 UTC
To confirm -- is the prototype configuration using on-demand thumbnailing, a separate image scaler subcluster, and the $wgUploadStashScalerBaseUrl configuration option?

Things seem to go through a wildly different code path in this configuration, where it performs some sort of manually-proxied HTTP request instead of loading the file from the filesystem.

IIRC img_auth.php is handled by having the proxy configuration send those requests to the image scalers directly, so in the MW code nothing very clever has to happen.
Comment 6 Neil Kandalgaonkar 2011-09-08 01:11:42 UTC
(In reply to comment #5)
> To confirm -- is the prototype configuration using on-demand thumbnailing, 

yes

> a separate image scaler subcluster

no

>, and the $wgUploadStashScalerBaseUrl
> configuration option?

Okay, live, we use this in CommonSettings.php:

    $wgUploadStashScalerBaseUrl = "$urlprotocol//upload.wikimedia.org/$site/$lang/thumb/temp";

We could use this with commons.prototype.wikimedia.org but that would just point to the same server again.



> Things seem to go through a wildly different code path in this configuration,

Yup.


> where it performs some sort of manually-proxied HTTP request instead of loading
> the file from the filesystem.

Yes, if I understand the code, img_auth.php cannot be used with scaled images. It chops off any /\d+-px/ prefix. So you get the original no matter what you ask for, via the StreamFile interface.

The whole point here was to get thumbnails, in a way that nobody but the uploading user could access (since it wasn't published yet, hasn't been looked at by anybody). 

So, we assume that the scaler has NTP access to the temporary file in the temp zone. Then we request a scaled version via HTTP, and then pass the data to the client.

(Note that the client theoretically could have done this request directly from their browser, but they don't know the tmpnam the server gave their file. That's what makes it reasonably secure.)

What could be simpler? :(


> IIRC img_auth.php is handled by having the proxy configuration send those
> requests to the image scalers directly, so in the MW code nothing very clever
> has to happen.

I don't understand what you mean here.
Comment 7 Peter Youngmeisterarius 2011-09-13 23:51:49 UTC
all image scalers are now on ubuntu 10.04
Comment 8 Thehelpfulone 2012-04-30 16:38:17 UTC
So is this bug fixed?
Comment 9 Mark A. Hershberger 2012-05-01 13:33:38 UTC
(In reply to comment #8)
> So is this bug fixed?

It doesn't look like this has been fixed.  When I tried to upload [[File:Folgers.ogv]], I got a broken thumbnail.  But, really, I'm not sure if that is a good test.
Comment 10 Thehelpfulone 2012-06-22 19:42:47 UTC
Reassign to default assignee per bug 37789
Comment 11 Sumana Harihareswara 2012-10-25 06:18:28 UTC
Chris, can you reproduce this on 1.21wmf2 or git master?
Comment 12 Chris McMahon 2012-10-25 14:30:46 UTC
I believe this can be closed, but I would like to confirm that I truly understand what the root issue is.  

Using a version of UploadWizard from Oct 22 2012 on beta commons, I uploaded an ogv file http://commons.wikimedia.beta.wmflabs.org/wiki/File:Intelligent_risk_taking.ogv and saw correct thumbs in UW itself and on the resulting page in commons.  Screen shots attached.
Comment 13 Chris McMahon 2012-10-25 14:31:58 UTC
Created attachment 11234 [details]
thumbs
Comment 14 Chris McMahon 2012-10-25 14:32:19 UTC
Created attachment 11235 [details]
thumbs
Comment 15 Chris McMahon 2012-10-25 14:32:40 UTC
Created attachment 11236 [details]
thumbs
Comment 16 Chris McMahon 2012-10-25 14:33:05 UTC
Created attachment 11237 [details]
thumbs
Comment 17 Andre Klapper 2012-10-25 18:35:05 UTC
Created attachment 11240 [details]
UploadWizard with ogv and black box

I tried again. At least in UploadWizard it's the same black box as before. See screenshot. Might be specific to the file.
Comment 18 Chris McMahon 2012-10-25 18:56:52 UTC
It's browser-specific.  The thumb is black for me in FF but normal in Chromium.  I tried with both an ogv already on beta commons and also one new to beta commons.
Comment 19 Chris McMahon 2012-10-25 19:39:55 UTC

*** This bug has been marked as a duplicate of bug 41403 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links