User talk:Malvineous

Hi, was wondering if you could help me with an extension I'm working on (as your Extension:FlvHandler seems to be the only extension I've seen using ImageBeforeProduceHTML hooks successfully, and that's where I have a problem). I'm trying to make the wiki display XCF images as multipage-documents. Now, my webserver is already configured such that requesting /images/f/f5/imagename.xcf/layername.png will pull a layer out of an XCF file; I've written an ImageBeforeProduceHTML function which generates javascript to request all the layers and display them as a stack. But I can't figure out how to force this to be called ... including an just gives me a text link to File:filename.xcf, and my hook function isn't called.

Do I need to implement the ImageHandler too? I can't seem to find any comprehensible documentation on that class, so any help would be much appreciated. -- 81.151.233.20 17:25, 23 May 2011 (UTC)


 * Hmm, it has been a while since I looked at this. I think ImageBeforeProduceHTML is only called before an tag is generated - so if you get a (red) text link to File::filename.xcf there would be no tag, and hence no call to ImageBeforeProduceHTML.  I would guess that yes, you do need to implement an ImageHandler.  This might not be such a bad thing, as it would mean you can then use .xcf files in other places (e.g. image galleries) if you make your ImageHandler generate a thumbnail.  Or you could take the easy way out and make the ImageHandler generate a blank image so that ImageBeforeProduceHTML will be called, but the .xcf file will just appear as a blank image if it's used somewhere else (e.g. actually visiting the uploaded file's preview page.) -- Malvineous 22:36, 23 May 2011 (UTC)


 * Thanks, I was guessing it'd be something like that. I'll have to try and get my head around ImageHandler I guess ... but it seems like an awful lot of extra effort (do you know if there's some way to just output the URI of the actual image as blah.xcf.png instead of blah.xcf and let mod_conversion handle the actual image processing?)
 * Or maybe I'd be better off using the ImageHandler from Extension:Xcf ... only just found that.
 * Many thanks -- 62.49.26.154 14:28, 24 May 2011 (UTC)


 * Well, still working on this ... I'm not sure what methods are missing from my ImageHandler class, and I can't find any coherent documentation on it. Did you have some? I've implemented every part I can understand, but [[Image:blah.xcf]] on any page still gets rendered as a (blue) text link to File:blah.xcf; and the thumbnail on the image page is still the "blank page" icon it used for unknown filetypes. I've tried inserting breadcrumbs (statements that log to a db table) in both the ImageBeforeProduceHTML hook, and all over the ImageHandler class, and none of my methods are even being called. I'm completely clueless here -- 90.215.170.74 21:34, 4 June 2011 (UTC)


 * It's difficult to say what the problem is without seeing the code. Perhaps you're not registering the hook correctly, so MediaWiki doesn't know it is supposed to call your code?  I didn't end up using any documentation, I just looked at the SVG handler that comes with MediaWiki and copied what I needed from there.  FlvHandler is probably a bit simpler, so all I can suggest is comparing your code against FlvHandler (particularly the part where it registers all the classes with the core code) to make sure you haven't omitted any steps. -- Malvineous 00:28, 5 June 2011 (UTC)

MassEditRegex
Hey Malvineous. Please look at Extension_talk:MassEditRegex. Regards, SVG 09:39, 2 August 2011 (UTC)
 * Thanks, I have been keeping an eye on the page but I just haven't had the time to sit down and figure out a proper fix! -- Malvineous 11:04, 2 August 2011 (UTC)

Starts with blank window, ffmpeg not working
I have two problems with this extension:

1.) When I start the video, I can hear the sound, but instead of the video there is only a white screen. When I pause the video and resume it, then the video plays normal.

2.) ffmpeg is installed and configured correctly imho, but it does not create thumbs, I only see fileicon.

Any advice is appreciated.


 * If you can hear sound then the extension is working, maybe Flash isn't installed properly. I'm not sure why ffmpeg isn't producing the thumbs, but some versions are not compatible with the various switches.  Try running the same ffmpeg command manually and see if you get any errors. -- Malvineous 09:50, 9 October 2011 (UTC)


 * I just installed the newest Flash plugin but without any effect: still my browsers (Firefox, Safari, Opera) are showing a blank window overlayed with fileicon and playing only the sound when I click the first time on the start button. When I pause the video and resume it, everything is ok: the overlayed fileicon disappears and the video is shown correctly. I use the newest flowplayer 3.2.7. Also ffmpeg is still not working within FLVHandler; on the command line it runs fine and generates a thumbnail as desired. I use the newest ffmpeg on a Debian server. FLVHandler is new - fetched yesterday via SVN. My MediaWiki is also up to date. Is there something wrong with the playlist parameter and config of flowplayer?


 * One problem is solved - the blank screen: The flv was not created correctly; I created it locally unter MacOS with ffmpeg and it seemed to be fine. Now I created it on my linux server with ffmpeg and the option -g 30 and flvtool2 -U. Now the video starts correctly within the flowplayer. But the creation of the preview thumb and the correct sizing of the video is still lacking, ffmpeg seems not to be called by FlvHandler at all.


 * You have to use the exact same ffmpeg command as FLVHandler otherwise you won't know whether it works properly. The command used is ffmpeg -vcodec png -i $input -ss 0 -vframes 1 -s $widthx$height -f image2 $output You should also confirm you can upload images, as it will fail if the images directory is not writable by the webserver. -- Malvineous 22:31, 11 October 2011 (UTC)


 * You can also try setting Manual:$wgDebugLogFile to see any error messages produced by FLVHandler. -- Malvineous 22:36, 11 October 2011 (UTC)


 * As already written the generation of thumbnails on the command line works without any problems. I replaced $input with /tmp/test.flv and $output with /tmp/test.png and it worked on the command line. Upload of images is no problem, I already uploaded several hundreds of images in this wiki. The only FlvHandler related output of debug is:
 * probes is Array
 * [ffmpeg] => Array
 * [cmd] => $path/ffmpeg -i $input
 * [regex] => /Stream.*Video.* (\d+)x(\d+),/
 * The video is not scaled correctly, so the probe to get the size fails and the generation of a thumb fails also.
 * [regex] => /Stream.*Video.* (\d+)x(\d+),/
 * The video is not scaled correctly, so the probe to get the size fails and the generation of a thumb fails also.
 * The video is not scaled correctly, so the probe to get the size fails and the generation of a thumb fails also.
 * The video is not scaled correctly, so the probe to get the size fails and the generation of a thumb fails also.


 * Can you confirm you are using the exact same ffmpeg command? It's just that you said it works with the "-g 30" option but FLVHandler does not use this option so I am unsure whether you are just running ffmpeg with minimal parameters or whether you are using the exact same parameters as FLVHandler.  It is possible if the probe to get the size fails then $width and $height are not correctly replaced, leading to an invalid ffmpeg command line.  Maybe you could insert an 'echo' statement before FLVHandler runs ffmpeg to see the exact command line after all the parameters have been replaced? -- Malvineous 22:25, 12 October 2011 (UTC)