Extension talk:OggHandler

Magic word not found [solved?]
Same error as below: (any more ideas after having updated my wiki?) Exact same backtrace using the trunk version for Mediawiki 1.15.3...

Solution: Was using the trunk version for Mediawiki 1.15.1

I'm getting the following error: (does anyone know what seems to be the problem?) Magic word 'ogg_noplayer' not found

Backtrace:


 * 1) 0 /var/www/hackerspace.lu/www/w/includes/MagicWord.php(244): Language->getMagic(Object(MagicWord))
 * 2) 1 /var/www/hackerspace.lu/www/w/includes/MagicWord.php(197): MagicWord->load('ogg_noplayer')
 * 3) 2 /var/www/hackerspace.lu/www/w/includes/MagicWord.php(542): MagicWord::get('ogg_noplayer')
 * 4) 3 /var/www/hackerspace.lu/www/w/includes/MagicWord.php(585): MagicWordArray->getBaseRegex
 * 5) 4 /var/www/hackerspace.lu/www/w/includes/MagicWord.php(630): MagicWordArray->getVariableStartToEndRegex
 * 6) 5 /var/www/hackerspace.lu/www/w/includes/parser/Parser.php(4278): MagicWordArray->matchVariableStartToEnd('File:Episode_On...')
 * 7) 6 /var/www/hackerspace.lu/www/w/includes/parser/Parser.php(1688): Parser->makeImage(Object(Title), 'File:Episode_On...', Object(LinkHolderArray))
 * 8) 7 /var/www/hackerspace.lu/www/w/includes/parser/Parser.php(1442): Parser->replaceInternalLinks2(' UNIQe7b0af...')
 * 9) 8 /var/www/hackerspace.lu/www/w/includes/parser/Parser.php(894): Parser->replaceInternalLinks(' UNIQe7b0af...')
 * 10) 9 /var/www/hackerspace.lu/www/w/includes/parser/Parser.php(327): Parser->internalParse('= HackerSpace P...')
 * 11) 10 /var/www/hackerspace.lu/www/w/includes/EditPage.php(1789): Parser->parse('= HackerSpace P...', Object(Title), Object(ParserOptions))
 * 12) 11 /var/www/hackerspace.lu/www/w/includes/EditPage.php(1157): EditPage->getPreviewText
 * 13) 12 /var/www/hackerspace.lu/www/w/includes/EditPage.php(469): EditPage->showEditForm
 * 14) 13 /var/www/hackerspace.lu/www/w/includes/EditPage.php(340): EditPage->edit
 * 15) 14 /var/www/hackerspace.lu/www/w/includes/Wiki.php(510): EditPage->submit
 * 16) 15 /var/www/hackerspace.lu/www/w/includes/Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 17) 16 /var/www/hackerspace.lu/www/w/index.php(116): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
 * 18) 17 {main}

Suggestion
The used namespace Image: change to Media: please

What the hell is link markup?
Good question...the change was mistaken on my part. I looked at the surface syntax and not at your code. The implementation type "link markup" was meant to gather together examples of parser extensions that modified the normal interpretation of ... syntax (a la Extension:Semantic MediaWiki). Yours most definitely does not - it adds a media type to $wgMediaHandlers. Apologies. Egfrank 07:19, 20 September 2007 (UTC)

Whole archive of files for OggHandler to download
Why you don't provide it? It's impossible (very long time) to get all files apart from http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/OggHandler and subdirs.

I am Windows user.


 * I have instaled SVN for Windows and resolve this task. --Tsim 21:48, 3 October 2007 (UTC)


 * For any checkout from SVN for mediawiki simply modify the path given for the source code

svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3

to whatever it is you wish to download. So, in this case, replace phase3 with extensions/OggHandler to get

svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/OggHandler

Alternatively, you can go into the link provided on the extension page, which points to viewvc and simply replace viewvc with svnroot, to get to the same place. Hope that is helpful to any who want to save time downloading OggHandler or other extensive extensions. --rowenrye 06:03, 8 March 2008 (UTC)

Is it possible to get files with TortoiseCVS ?
How to configure TortoiseCVS for this task?

--Tsim 17:08, 3 October 2007 (UTC)


 * You can not do this with any CVS client. It is a SVN repository. You should install TortoiseSVN or some other SVN client. Once you install it, you right-click in the File Explorer, select SVN Checkout, enter "http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/OggHandler" under "URL of repository," and something like "C:\\foo\bar\extensions\OggHandler" under "Checkout directory." Svemir Brkic 12:52, 28 October 2008 (UTC)

Fatal error: Declaration of OggTransformOutput::toHtml must be compatible with that of MediaTransformOutput::toHtml
I have installed OggHandler extension as in README.

At any page of my wiki get the error:

Fatal error: Declaration of OggTransformOutput::toHtml must be compatible with that of MediaTransformOutput::toHtml in C:\xampp\htdocs\WKI\extensions\OggHandler\OggHandler_body.php on line 452

--Tsim 21:40, 3 October 2007 (UTC)


 * You need to use MediaWiki 1.11. -- Tim Starling 10:44, 4 October 2007 (UTC)

I have installed v1.11. Now I can see on :Version page Hooks LanguageGetMagic	OggHandler::registerMagicWords

There is no strings like Media handlers OggHandler	Handler for Ogg Theora and Vorbis files, with JavaScript player.

ogg link look as Медиа:Video1.ogg

What can you advise else?

For ffmpeg I use this string: $wgFFmpegLocation = 'c:/xamp/util/ffmpeg'; --Tsim 10:48, 30 October 2007 (UTC)

Darn blank screen !!
I installed what I assume is the latest Ogg files and also FFmpeg ... I added cortado-ovt-stripped-0.2.2-patched.jar ...

I edited LocalSettings as the README file suggests and when I refresh my Wiki screen, i get a blank screen ..

If I hash out the includeonce line I get my Wiki screen back .. The install and Readme is rather cryptic, but

I'm sure I followed everything ... I get the OggHandler showing in the Versions page when I un-hash the includeonly line ..

What did I do wrong ??

--Dick 11:20, 4 November 2007 (UTC)
 * I downloaded the extension via SVN and do not have any problem. A blank screen generally means that the extension can't be loaded and usually because of a wrong path to the extension. Have a look at the logs of your httpd server (/var/log/httpd/mywikiserver.log on Gnu/Linux).--Nbrouard 07:52, 15 November 2007 (UTC)

Smaller Media player icon (without 2 CR) and inline icon (how to?)
Many thanks for your OggHandler. But we would like a prettier layout of the media player icon. We have a dictionary with a lot of terms being voice recorded, and it should look like this:

901

Studiem ekonomických a společenských podmíněností populačního vývoje na straně jedné a studiem důsledků populačního vývoje na ekonomické a sociální procesy se zabývá ekonomická a sociální demografie (104-1), 104-2). Zabývá se vztahy, které existují mezi populací a zdroji 1, kterými ekonomika dané společnosti disponuje a které jí umožňují vytvářet bohatství a zajišťovat služby n. realizovat produkci 2. V poslední době se důraz při tomto studiu soustřeďuje na vztah mezi populačním růstem (703-11) a jeho složkami a ekonomickým růstem (903-1), zejména s ohledem na spotřebu 3 , spoření 4  a investice 5.

Unfortunately, the OggHandler extension is not set on this wiki, but if you copy the above code on a working wiki, you will see how it is badly output and not operational.

In fact the input is because the recorded term is in the nominative form zdroje which differs from the text conjugated form. We ahve to warn the reader (and audio listener) that what he will listen is different of what is written.

And thus, after the icon, I would like an additional argument, which simply could be written. I could use a template, like the audio template on wiktionary for that additional useful feature but the main obstacle remains with a too huge Play Sound icon and two carriage returns (one before the icon and one after) which makes the layout horrible.

How could I do whithout entering the OggHandler source code? Many thanks. --Nbrouard 08:28, 15 November 2007 (UTC)


 * In fact the Ogg-handler extension is on this wiki. And as I did not want to pollute this wiki with an irrelevant ogg file, I used the En-us-student.ogg file of commons instead of a real Czech audio file. Thus we can see what I would like: a smaller media player icon for audio which won't break the line of text.--Nbrouard 18:10, 19 November 2007 (UTC)
 * Any hint? --Nbrouard 08:12, 21 November 2007 (UTC)

Is anyone there who installed OggHandler under MS Windows hosting?
Please write about your experience. --Tsim 10:24, 15 November 2007 (UTC)
 * Me not sorry. --Nbrouard 18:43, 15 November 2007 (UTC)

It was developed on Windows, it should work just as well there as it does on Linux. -- Tim Starling 06:26, 9 December 2007 (UTC)

FFmpeg Location
I've gotten Ogghandler and FFmpeg installed but I can't seem to make $wgFFmpegLocation set to a location outside of the wiki base directory. If I try to move FFmpeg inside of the wiki then it doesn't find the libraries. Could somebody give me some direction on how to resolve this. ffmpeg currently resides in /home/usr/bin the libraries in /home/usr/lib and the wiki at /home/usr/public_html/wiki/. Thanks. --LeeAtwood 02:37, 17 December 2007 (UTC)


 * I had to take --enable-shared of the ./configure

Larger Files
I have a problem with some fairly large video clips - when I try to upload my 50 Mb ogg/theora video file, all I get is a white page. I can upload such files by temporarily disabling OggHandler by commenting out the appropriate "require" line in LocalSettings.php, but if I enable OggHandler again and go to the Image:MyBigOggFile.ogg page, it again is just white. A 400kb 5 second clip encoded in the same fashion works fine.

Is there some way to work around this? We have a wiki with some instructional papers at my workplace, and we would really like to put instructional videos on it as well.

Technical details:


 * System: Mac OS 10.5.2
 * PHP Version: 5.2.5
 * MediaWiki: 1.11.1
 * MySQL: 5.0.41

The last few lines of wiki.log upon hitting the blank screen: Logged in from session File::getPropsFromPath: Getting file info for /Applications/MAMP/htdocs/wiki/images/e/e4/Eos.ogg MimeMagic::__construct: loading mime types from /Applications/MAMP/htdocs/wiki/includes/mime.types MimeMagic::__construct: loading mime info from /Applications/MAMP/htdocs/wiki/includes/mime.info MimeMagic::detectMimeType: no magic mime detector found! DjVuImage::getInfo: not a DjVu file MimeMagic::detectMimeType: extension mime type of /Applications/MAMP/htdocs/wiki/images/e/e4/Eos.ogg: application/ogg MimeMagic::guessMimeType: final mime type of /Applications/MAMP/htdocs/wiki/images/e/e4/Eos.ogg: application/ogg and then it just stops. Any ideas?

The cut-off point seems to be between 33 and 39.4 Mb.

"Maybe its your box running out of memory? how much memory did you give php? Mdale 20:15, 18 March 2009 (UTC)"

--Markus 14:32, 7 March 2008 (UTC) (updated 17:04, 14 March 2008)

Installation problems
Hi! I really need your extension. I've installed it (here is the test example: http://www.ossus.pl/biblioteka/Grafika:Akuku.ogg) and... not working. I didin't install FFmpeg beacouse i have no need to use ogg video - only audio. As far as I know FF mpeg is used for vide (am I right?) So could you help with it? I think it's some common problem, or my mistake, but I'm checking it stap by step again and agin and i didn't see any errors. --193.39.71.4 13:28, 7 April 2008 (UTC)

missing files ?
extensions/OggHandler/PEAR/File_Ogg/File/Ogg.php need there files in line 114: but seem not exist. Crochet.david 16:10, 14 April 2008 (UTC)
 * PEAR.php
 * PEAR/Exception.php


 * OggHandler currently requires that you have a basic PEAR installation. --brion 16:46, 17 April 2008 (UTC)

I got the same problem, and I don't manage to resolve it, is there somebody who can tell me how to do please?

error message
Now, i've got this :

Warning: array_keys [function.array-keys]: The first argument should be an array in /home/users/wikimedia/sousdomaines/membres/extensions/OggHandler/OggHandler_body.php on line 315 Crochet.david 15:45, 17 April 2008 (UTC)

Implementing a Flash player
People generally do not like having to install plugins or download additional software and while we Java player many computers do not have it installed either. However, even on the most locked down computer terminal in any library I've walk into they have flash. There was a discussion xiph mailing list and Tor-Einar Jarnbjo presented a working demo. It apparently require a 1.5-2.0 GHz computer to run well; the audio is choppy on my 930 MHz box, but I would prefer it over no sound.

Those interested on an implementing for MediaWiki may find this Article on using ActionScript to play sound useful. -- Dispenser 02:10, 24 November 2008 (UTC)

No sound with Cortado (Java)
I don't understand why but with the Cortado (Java) (selected) the player doesn't show up and there is no sound at all (I'm talkig about an Ogg Vorbis audio file). It worked once, when I installed it but the day after, it wasn't anymore. If someone have an idea why, thanks a lot. --Sanji-kun 19:08, 10 March 2009 (UTC)

I don't think this is the way it is supposed to be (small problem)


The thumbnail on the right shows on top an OggHandler thumb with the noicon parameter, and below a thumb with the icon. Both have the little enlarge icon that takes you to the same page that the blue 'i' icon takes you to. If both do the same thing them I'm wondering what the point of the blue icon is. If it were up to me then I would remove it from the code or not have it display by default. It would also be nice if the mouse over message on the enlarge icon were something like "description" rather than "enlarge." Not a big problem, but I don't think this is the way it was intended to work.

--Sftpbr 20:55, 9 April 2009 (UTC)

Why Only Uploaded Files?
Why does this functionality only work with uploaded files? Would it not be better to allow embedding of videos on other locations, e.g. YouTube? --Robinson Weijman 13:01, 26 May 2009 (UTC)

Why no controls for Safari?
When using HTML 5 and elements, OggPlayer.js does not set the attribute if the browser is Safari. Why?

Without :


 * The audio element is invisible
 * Audio and video elements cannot be controlled in any way by the user (including pausing or restarting them)

With :


 * Audio elements are visible and controllable
 * Controls appear across the bottom of video elements when the cursor hovers over them

I'm using Safari 4, with Perian providing support for Ogg. It's nice to have some level of support thanks to the HTML 5 elements (before, it would admonish me to install the Xiph components and fall back to the godawful Java player, even though QuickTime was perfectly capable of playing the files), but I'm flummoxed why you would make media uncontrollable for Safari users. 24.247.72.115 08:33, 12 July 2009 (UTC)

ffmpeg on 64 Bit systems
Pictures can not be extracted from ogg streams on (some) 64 bit systems; the error "/usr/bin/ffmpeg: error while loading shared libraries: libstdc++.so.6: failed to map segment from shared object: Cannot allocate memory" occures on generating the previews.

The problem can be solved by increasing LocalSettings.php' $wgMaxShellMemory: to double the available space from the default of 102400 to 204800 makes all working nicely again.

Revision 55041 broke OggHandler
OggHandler is currently broken in trunk.

I was getting the following error:

Magic word 'ogg_noplayer' not found Backtrace:
 * 1) 0 [WIKI_DIRECTORY]/includes/MagicWord.php(244): Language->getMagic(Object(MagicWord))
 * 2) 1 [WIKI_DIRECTORY]/includes/MagicWord.php(197): MagicWord->load('ogg_noplayer')
 * 3) 2 [WIKI_DIRECTORY]/includes/MagicWord.php(542): MagicWord::get('ogg_noplayer')
 * 4) 3 [WIKI_DIRECTORY]/includes/MagicWord.php(585): MagicWordArray->getBaseRegex
 * 5) 4 [WIKI_DIRECTORY]/includes/MagicWord.php(630): MagicWordArray->getVariableStartToEndRegex
 * 6) 5 [WIKI_DIRECTORY]/includes/parser/Parser.php(4278): MagicWordArray->matchVariableStartToEnd('thumb')
 * 7) 6 [WIKI_DIRECTORY]/includes/parser/Parser.php(1688): Parser->makeImage(Object(Title), 'thumb', Object(LinkHolderArray))
 * 8) 7 [WIKI_DIRECTORY]/includes/parser/Parser.php(1442): Parser->replaceInternalLinks2(' UNIQ4c2659...')
 * 9) 8 [WIKI_DIRECTORY]/includes/parser/Parser.php(894): Parser->replaceInternalLinks(' UNIQ4c2659...')
 * 10) 9 [WIKI_DIRECTORY]/includes/parser/Parser.php(327): Parser->internalParse('== Acceptable U...')
 * 11) 10 [WIKI_DIRECTORY]/includes/EditPage.php(1789): Parser->parse('== Acceptable U...', Object(Title), Object(ParserOptions))
 * 12) 11 [WIKI_DIRECTORY]/includes/EditPage.php(1157): EditPage->getPreviewText
 * 13) 12 [WIKI_DIRECTORY]/includes/EditPage.php(469): EditPage->showEditForm
 * 14) 13 [WIKI_DIRECTORY]/includes/EditPage.php(340): EditPage->edit
 * 15) 14 [WIKI_DIRECTORY]/includes/Wiki.php(510): EditPage->submit
 * 16) 15 [WIKI_DIRECTORY]/includes/Wiki.php(63): MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title), Object(User), Object(WebRequest))
 * 17) 16 [WIKI_DIRECTORY]/index.php(116): MediaWiki->initialize(Object(Title), Object(Article), Object(OutputPage), Object(User), Object(WebRequest))
 * 18) 17 {main}

This is for MediaWiki 1.15.1.

I've located the problem in this revision. After reverting these changes on my wiki OggHandler is working perfectly again.


 * SVN rev. 55041

--Xeoz 23:48, 22 August 2009 (UTC)


 * Run the 1.15 version of OggHandler. —Emufarmers(T 21:27, 23 August 2009 (UTC)


 * Oh, so the latest version is compatible with the latest mediawiki alpha? Sorry, I didn't check it with the in-development version of mediawiki. I figured if it was broke on 1.15 is must be broke for them all. --Xeoz 23:29, 23 August 2009 (UTC)

Latvian translation
Sorry mates. Can't figure out how to add translated OggHandler.i18n.php file.

/** Latvian (Latviešu) * @author Coool */                                                                                                                                                                                                                                                                               $messages['lv'] = array(                                                                                                                                                                                                                                                                   'ogg-desc'             => 'Ogg Theora un Vorbis failu apstrādātājs, kurš izveido JavaScript atskaņotāju',                                                                                                                                                                          'ogg-short-audio'      => 'Ogg $1 audio fails, $2', 'ogg-short-video'     => 'Ogg $1 video fails, $2', 'ogg-short-general'   => 'Ogg $1 multimedijas fails, $2', 'ogg-long-audio'      => '(Ogg $1 audio falis, garums $2, $3)', 'ogg-long-video'      => '(Ogg $1 video fails, garums $2, $4×$5 pikseļi, $3)', 'ogg-long-multiplexed' => '(Ogg audio/video fails, $1, garums $2, $4×$5 pikseļi, $3 kopumā)', 'ogg-long-general'    => '(Ogg multimedijas fails, garums $2, $3)', 'ogg-long-error'      => '(Nederīgs ogg fails: $1)', 'ogg-play'            => 'Palaist', 'ogg-pause'           => 'Pauze', 'ogg-stop'            => 'Apstādināt', 'ogg-play-video'      => 'Plaist video', 'ogg-play-sound'      => 'Atskaņot mūziku', 'ogg-no-player'       => 'Atvainojiet, izskatās, ka uz jūsu OS nav uzstādīts neviens atskaņotājs, kurš tiek atbalstīts. Lūdzu, lejupielādējiet atskaņotāju.', 'ogg-no-player-js'    => 'Atvainojiet, izskatās, ka ir atslēgts JavaScript vai arī nav uzstādīts neviens atskaņotājs, kurš tiek atbalstīts. Jūs variet lejupielādēt klipu vai lejupielādēt atskaņotāju, lai varētu atskaņot video klipus pārlūkprogrammā.', 'ogg-no-xiphqt'       => 'Izskatās, ka jums nav uzstādīts QuickTime XiphQT komponente. QuickTime nevar atskaņot Ogg failus bez šīs komponentes. Lūdzu, lejupielādējiet XiphQT vai izvēlieties citu atskaņotāju.', 'ogg-player-videoElement' => 'Pārlūkprogrammas iebūvēto', 'ogg-player-oggPlugin' => 'Pārlūkprogrammas spraudnis', 'ogg-player-cortado'  => 'Cortado (Java)', # only translate this message to other languages if you have to change it                                                                                                                                                              'ogg-player-vlc-mozilla' => 'VLC', # only translate this message to other languages if you have to change it                                                                                                                                                                       'ogg-player-vlc-activex' => 'VLC (ActiveX)', # only translate this message to other languages if you have to change it                                                                                                                                                             'ogg-player-quicktime-mozilla' => 'QuickTime', # only translate this message to other languages if you have to change it                                                                                                                                                           'ogg-player-quicktime-activex' => 'QuickTime (ActiveX)', # only translate this message to other languages if you have to change it                                                                                                                                                 'ogg-player-totem'     => 'Totem', # only translate this message to other languages if you have to change it                                                                                                                                                                       'ogg-player-kmplayer'  => 'KMPlayer', # only translate this message to other languages if you have to change it                                                                                                                                                                    'ogg-player-kaffeine'  => 'Kaffeine', # only translate this message to other languages if you have to change it                                                                                                                                                                    'ogg-player-mplayerplug-in' => 'mplayerplug-in', # only translate this message to other languages if you have to change it                                                                                                                                                         'ogg-player-thumbnail' => 'Rādīt statisku attēlu', 'ogg-player-soundthumb' => 'Nav atskaņotāja', 'ogg-player-selected' => '(pašreiz izvēlētais)', 'ogg-use-player'      => 'Izmantot atskaņotāku:', 'ogg-more'            => 'Vairāk…', 'ogg-dismiss'         => 'Aizvērt', 'ogg-download'        => 'Lejupielādēt failu', 'ogg-desc-link'       => 'Informācija par failu', );

Thumbnail is grey
Hello. I install OggHandler on a MediaWiki 1.5. I upload http://commons.wikimedia.org/wiki/File:Cat_claws.ogg the video play well, but the thumbnail looks very bad (a very bad jpg with a gray level). Is anybody have an idea? Thanks a lot. Bayo 19:51, 29 April 2010 (UTC)
 * I test using ffmpeg command line, and the result is ok. Bayo 20:32, 29 April 2010 (UTC)

Lay-out problems
1: When the control is placed in a right-aligned div or table, and the play-button is clicked, more than half of it disappears on the right side of the screen, also causing a horizontal scrollbar to be visible in the browser. A (QAD) temporary fix is to add  to its style, but then another problem shows:

2: The control is semi-transparent, so underlying text is visible, and (even worse!) it is almost impossible to click the pause-button (the mousepointer shows a "text"-cursor). - Erik Baas 22:17, 27 May 2010 (UTC)