Extension talk:FlvHandler

The player loads by won't play the video files. It says '''200 Stream not found. NetStream.Play.StreamNotFound, clip:'[Clip]'''

Then it displays the directory of where the file is.- 69.108.221.134
 * Is this a PHP error or a Flash applet error? What is the name of the FLV file?  If you look at the article for the video file itself, do you see the preview image?  Do you have a URL for your wiki I can look at to see the error? -- Malvineous 10:58, 14 May 2009 (UTC)


 * Here's a link with the videos. http://www.wikiaudio.org/index.php?title=Sandbox
 * I don't know what kind of error this is, I am a novice when it comes to development. I just follow instructions.
 * Btw I have another FLV extension installed and it seems to be doing roughly the same thing...not finding the FLV file to play but I know for a fact it's uploaded and in the directory the player is looking in - 99.167.101.80


 * Well the problem is that the FlvHandler code is trying to load the movie from http://www.wikiaudio.orgimages/e/eb/TEST.flv (note the missing slash between the 'org' and 'images'.) My guess is that you've changed the image path or upload path somewhere in your config (LocalSettings.php?) but left off a trailing slash somewhere.  I'm surprised you don't have the same problem uploading images to the wiki.  If you can find where that change has been made, both extensions should start working. -- Malvineous 22:28, 14 May 2009 (UTC)


 * I went to the localsetting.php file and on $wgUploadPath = "images"; and $wgUploadDirectory = "images"; I add a slash / before images.
 * It still didn't work and wouldn't allow for regular image uploads when I did this.
 * The other video player (the black one) showed a / slash before the word images in it's error display, so I know it recognized the change I made to LocalSettings.php
 * Is there anywhere else on the LogicSetting.php file you can think of? - 69.108.221.134


 * That's a tricky one. What's your $wgScriptPath set to?  That should start with a slash.  Otherwise can you stick your LocalSettings.php somewhere as a text file so I can see it? (with any passwords removed of course) -- Malvineous 10:32, 15 May 2009 (UTC)


 * The $wgScriptPath is set to     = "";
 * So in full it looks like this   $wgScriptPath       = "";
 * In short it looks like it isn't set to anything. What should it be set to ?
 * The LocalSetting.php:    http://www.yousendit.com/transfer.php?action=batch_download&batch_id=MnFqTkFsSWhtMExIRGc9PQ


 * Well it's the path to your index.php, so try setting it to a single slash and let me know if that makes a difference. (By the way, you can sign your messages here with ~ which automatically puts your name and the time in.) -- Malvineous 12:11, 15 May 2009 (UTC)


 * It kinda screwed up the site altogether, it made it look different and the sandbox and other pages wouldn't load. - 69.108.221.134 12:31, 15 May 2009 (UTC)


 * Actually just looking at your LocalSettings.php, you have all the extension require_once lines right at the top, before all the options are set. Does it make a difference moving those lines right to the end of LocalSettings.php?  Otherwise I'm afraid I'm out of ideas, I don't think MediaWiki is designed to install into the root directory of the webserver - you'll probably have to make a "wiki" folder and install into that (so your site is at http://www.wikiaudio.org/wiki/index.php instead.)  You can still "hide" this to make articles appear at nice addresses like http://www.wikiaudio.org/Main_Page, but I think the wiki itself needs to be in a subdirectory. -- Malvineous 12:57, 15 May 2009 (UTC)


 * Thanks for the help - suffice to say moving the required once messages didn't do anything. I will see about reinstalling in a WIKI folder sub directory. Could you keep this thread alive ( don't delete) and as I try and figure this out I will update for future troubleshooting etc. 207.47.18.254 13:09, 15 May 2009 (UTC)


 * BTW - can you think of anyway to modify the extension to accommodate the fact that we didn't install in a Wiki folder?? - 69.108.221.134 13:12, 15 May 2009 (UTC)
 * No problem, sorry I couldn't come up with a solution. There shouldn't be a need to reinstall the wiki, just moving it into a subfolder and setting $wgScriptPath, $wgUploadPath, etc. should be enough.  It might be possible to modify the extension though, in FlvHandler.php line 110 is where it generates the full URL to the .flv file.  If you change this from   to   then it should add in the extra slash that's missing from somewhere.  I've tried to follow the getUrl function but I can't see exactly where it gets the path from.  At any rate that change should make it work on your wiki, and break on everyone else's :-) -- Malvineous 00:52, 16 May 2009 (UTC)


 * We changed the directory to "Wiki" and still doesn't want to work. http://www.wikiaudio.org/wiki/index.php?title=Sandbox  Could you tell me exactly what to change the $wgScriptPath, $wgUploadPath and other LocalSettings to ? - 69.108.221.134 08:24, 16 May 2009 (UTC)


 * and the defaults should then be fine (so comment out any changes to $wgUploadPath, $wgUploadDirectory, $wgMath*) and it should work. You might need to purge the cache of any existing pages as they might still show old URLs (broken images) but the easiest way to check this is to edit the page and do a preview - if the image etc. works in the preview then all is well.  Don't forget to undo any changes to FlvHandler.php if you've applied my suggestion from above! -- Malvineous 08:35, 16 May 2009 (UTC)


 * I did both suggestions and still no dice. I tried changing the Flvhandler.php and it DID show an extra slash in the players window - but it still didn't play the file. The error simply displayed the slash.I also moved everything to a folder called Wiki and updated the localsetting.php file - didn't work. Anyway, thanks for your help. I appreciate it. - 69.108.221.134 08:49, 16 May 2009 (UTC)


 * That's very strange. The only other thing I can suggest is to try upgrading MediaWiki.  You're running 1.13.1 but I've only tested FlvHandler on 1.13.3 and 1.14.  If upgrading is too difficult (it's really quite easy though) you could try setting $wgUploadPath to "/wiki/images" but that should happen automatically.  The reason why modifying FlvHandler showed the slash but didn't work is because it was loading the file from "/images" but by that time you had moved everything into "/wiki/images".  If you modify FlvHandler.php again and set   then it will probably work, but again, it's a bit dodgy ;-) -- Malvineous 08:57, 16 May 2009 (UTC)


 * I upgraded to mediawiki 1.14, I made sure the directory was "Wiki" and then I modified the $strURL = $wgServer.'/wiki/'.$file->getUrl; to read accordingly and..holy crap..apparently it works! Thanks. If you ever have any audio related stuff you think I can help with feel free to ask. I appreciate this a lot! - 99.167.101.80 12:29, 16 May 2009 (UTC)


 * No worries, glad you got it working! That's a bit odd that you still had to modify the PHP file to get it to work, I might have to look into it in case I've generated the URL incorrectly (although it does work fine on my own MW installation.)  Would you mind posting an updated version of your LocalSettings.php again?  If I can replicate your config locally I might be able to see why it's not working.  -- Malvineous 12:46, 16 May 2009 (UTC)


 * Is there any way to have the movies go to the right. When I type [ [image:MOVE.flv|right]] or [[image:MOVE.flv|thumb]] it doesn't behave like a conventional image. I will upload my localsettings in a bit and add a link.


 * Local settings http://www.yousendit.com/download/MnFnUGhkbThqV0IzZUE9PQ - 99.167.101.80 15:01, 16 May 2009 (UTC)
 * Thanks for that, I've worked out what the problem is. In your LocalSettings.php you've set $wgUploadPath to "images" but this variable must start with a slash.  The default value is "${wgScriptPath}/images" which expands to "/wiki/images".  Since this is the default, if you remove both $wgUploadPath and $wgUploadDirectory from your LocalSettings.php, both FLV extensions will start working again.  I have also just released version r3 of FlvHandler, which includes a fix (so it will work, just like images do, even if you leave $wgUploadPath set incorrectly) and it also implements left and right floating alignment. -- Malvineous 02:24, 17 May 2009 (UTC)


 * Cool. I added it and it works too. If I wanted to generate the thumbnail ( it isn't generating) what exactly would I have to do?99.167.101.80 10:32, 17 May 2009 (UTC)


 * You'll need to contact your hosting provider and ask them to install FFmpeg on your webserver. -- Malvineous 10:56, 17 May 2009 (UTC)

Great job ! Although I noticed a bug in FlvHandler.php : variables $fp and $hp should be replaced with $frameParams and $handlerParams, respectively. --217.109.116.16 12:04, 12 May 2009 (UTC)
 * Well spotted, thanks for letting me know! I've uploaded version r2 which incorporates your fix. -- Malvineous 12:40, 12 May 2009 (UTC)