Hi!
What's the proper way of thumbnail generation for Ogg media handler, so it will work like at commons?
First, I've downloaded and compiled latest ffmpeg version (from git://git.videolan.org/ffmpeg.git) using the following configure options:
./configure --prefix=/usr --disable-ffserver --disable-encoder=vorbis --enable-libvorbis
The prefix is usual for CentOS layout (which I have at hosting) and best options for vorbis were suggested in this article: http://xiphmont.livejournal.com/51160.html
I've downloaded Apollo_15_launch.ogg from commons then uploaded to my wiki to check Ogg handler. The file was uploaded fine, however the thumbnail is broken - there are few squares at gray field displayed instead of rocket still image.
In Extension:OggHandler folder I found ffmpeg-bugfix.diff. However there is no libavformat/ogg2.c in current version of ffmpeg. Even, I found the function ogg_get_length () in another source file, however the code was changed and I am not sure that manual comparsion and applying is right way. It seems that the patch is suitable for ffmpeg version developed back in 2007 but I was unable to find original sources to successfully apply the patch.
I was unable to find ffmpeg in Wikimedia svn repository. Is it there?
Then, I've tried svn co https://oggvideotools.svn.sourceforge.net/svnroot/oggvideotools oggvideotools but I am upable to compile neither trunk nor branches/dev/timstarling version, it bails out with the following error:
-- ERROR: Theora encoder library NOT found -- ERROR: Theora decoder library NOT found -- ERROR: Vorbis library NOT found -- ERROR: Vorbis encoder library NOT found -- ogg library found -- GD library and header found CMake Error at CMakeLists.txt:113 (MESSAGE):
I have the following packages installed: libvorbis-1.1.2-3.el5_4.4 libvorbis-devel-1.1.2-3.el5_4.4 libogg-1.1.3-3.el5 libogg-devel-1.1.3-3.el5 libtheora-devel-1.0alpha7-1 libtheora-1.0alpha7-1
ffmpeg compiles just fine (with yasm from alternate repo, of course).
But there is no libtheoradec, libtheoraenc, libvorbisenc neither in main CentOS repository nor in aliernative http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/
However it seems these is libtheoraenc.c in ffmpeg; what is the best source of these libraries? It seems that there is no chance to find proper rpm's for CentOS and one need to compile these from sources?
Dmitriy
I recommend using the static binaries hosted on firefogg or if you want to compile it your self using the build tools provided there: http://firefogg.org/nightly/
Also I would suggest you take a look at TimedMediahandler as an alternative to oggHandler it has a lot more features such as WebM, timed text, and transcoding support. http://www.mediawiki.org/wiki/Extension:TimedMediaHandler
A live install is on prototype if you want to play around with it: http://prototype.wikimedia.org/tmh/
If you run into any issue, please report them on the bug tracker or directly to me. https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&...
peace, --michael
On 07/08/2011 04:18 AM, Dmitriy Sintsov wrote:
Hi!
What's the proper way of thumbnail generation for Ogg media handler, so it will work like at commons?
First, I've downloaded and compiled latest ffmpeg version (from git://git.videolan.org/ffmpeg.git) using the following configure options:
./configure --prefix=/usr --disable-ffserver --disable-encoder=vorbis --enable-libvorbis
The prefix is usual for CentOS layout (which I have at hosting) and best options for vorbis were suggested in this article: http://xiphmont.livejournal.com/51160.html
I've downloaded Apollo_15_launch.ogg from commons then uploaded to my wiki to check Ogg handler. The file was uploaded fine, however the thumbnail is broken - there are few squares at gray field displayed instead of rocket still image.
In Extension:OggHandler folder I found ffmpeg-bugfix.diff. However there is no libavformat/ogg2.c in current version of ffmpeg. Even, I found the function ogg_get_length () in another source file, however the code was changed and I am not sure that manual comparsion and applying is right way. It seems that the patch is suitable for ffmpeg version developed back in 2007 but I was unable to find original sources to successfully apply the patch.
I was unable to find ffmpeg in Wikimedia svn repository. Is it there?
Then, I've tried svn co https://oggvideotools.svn.sourceforge.net/svnroot/oggvideotools oggvideotools but I am upable to compile neither trunk nor branches/dev/timstarling version, it bails out with the following error:
-- ERROR: Theora encoder library NOT found -- ERROR: Theora decoder library NOT found -- ERROR: Vorbis library NOT found -- ERROR: Vorbis encoder library NOT found -- ogg library found -- GD library and header found CMake Error at CMakeLists.txt:113 (MESSAGE):
I have the following packages installed: libvorbis-1.1.2-3.el5_4.4 libvorbis-devel-1.1.2-3.el5_4.4 libogg-1.1.3-3.el5 libogg-devel-1.1.3-3.el5 libtheora-devel-1.0alpha7-1 libtheora-1.0alpha7-1
ffmpeg compiles just fine (with yasm from alternate repo, of course).
But there is no libtheoradec, libtheoraenc, libvorbisenc neither in main CentOS repository nor in aliernative http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/
However it seems these is libtheoraenc.c in ffmpeg; what is the best source of these libraries? It seems that there is no chance to find proper rpm's for CentOS and one need to compile these from sources?
Dmitriy
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
* Michael Dale mdale@wikimedia.org [Fri, 08 Jul 2011 10:52:52 -0700]:
I recommend using the static binaries hosted on firefogg or if you
want
to compile it your self using the build tools provided there: http://firefogg.org/nightly/
Hi Michael, thank you for the tips.
Static binary for ffmpeg wasn't completely static, it was linked against different version of libc, so it refused to run. Maybe that binary was compiled in different distro. However, ffmpeg2theora.linux from the same page worked just fine in CentOS 5.6.
Also I would suggest you take a look at TimedMediahandler as an alternative to oggHandler it has a lot more features such as WebM,
timed
text, and transcoding support. http://www.mediawiki.org/wiki/Extension:TimedMediaHandler
This extension is more complicated. Forutunately it has a better README file - there are recommended configure options for ffmpeg compilation which I was looking for. It was not easy to compile ffmpeg with recommended transcoding options, but I finally managed to do that. However README should mention that the user should run php update.php, otherwise extension complains about missing DB tables. Is it really necessary to have as much as 6GB of shell memory? Because I have only 1GB at this shell.
A live install is on prototype if you want to play around with it: http://prototype.wikimedia.org/tmh/
The samples are nice.
If you run into any issue, please report them on the bug tracker or directly to me.
https://bugzilla.wikimedia.org/enter_bug.cgi?product=MediaWiki%20extensions&...
Yes, I have an issue - I run MediaWiki 1.17.0 (r6), however it seems that trunk version of TimedMediaHandler is already designated for improved 1.18 Skin / Linker:
2011/07/11 15:04:06 [error] 21984#0: *1006 FastCGI sent in stderr: "PHP Warning: array_merge(): Argument #1 is not an array in /var/www/wiki/universe/extensi ons/TimedMediaHandler/TimedMediaHandler.hooks.php on line 87" while reading response header from upstream, client: 193.233.48.78, server: x.x.x.x, reque st: "GET /load.php?debug=false&lang=ru&modules=startup&only=scripts&skin=universe&* HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "x.x.x.x", re ferrer: "http://x.x.x.x/index.php/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1..." 2011/07/11 15:04:07 [error] 21984#0: *1009 FastCGI sent in stderr: "PHP Warning: array_merge(): Argument #1 is not an array in /var/www/wiki/universe/extensi ons/TimedMediaHandler/TimedMediaHandler.hooks.php on line 87" while reading response header from upstream, client: 193.233.48.78, server: x.x.x.x, reque st: "GET /index.php/skins/universe/images/vakosha.png HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "x.x.x.x", referrer: "http://x.x.x.x/ index.php/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Version"
One probably should create new Linker(), that's how I do in my Extension:QPoll (although I haven't checked it with 1.18 yet).
TimedMediaHandler is r91852. Dmitriy
Yes, locally patched both issues, now runs fine. $wgExcludeFromThumbnailPurge is not defined in 1.17, made a check. BTW, it is a bit evil to exclude some extensions from Purge. Maybe there should be another action "Superpurge"?
Linker::link() was called statically in TranscodeStatusTable class. Created new Linker() and now it works. I haven't committed into svn, don't know if anyone cares of backcompatibility.
BTW, if I'd was an leading developer (who makes decisions), I'd probably make MW 1.16 an LTS (long time support) version for legacy setups and extensions.. Though maybe that is unneeded (too much of burden for non-profit organization).
Dmitriy
Thanks for this thread, Please do commit fixes for 1.17, If not obvious already I have really only been targeting trunk. While the extension has been around since before 1.16, it would be very complicated to restore the custom resource loader it was using before there was a resource loader in core.
In terms of Superpurge, that is essentially what we do with the "transcode status table" on the image page that lets users with the given permission purge the transcodes. We did not want to make it too too easy to purge transcodes cuz once purged a video could be inaccessible for devices / browsers that only had webm or only had ogg support, until the file was retranscoded.
--michael
On 07/11/2011 04:48 AM, Dmitriy Sintsov wrote:
Yes, locally patched both issues, now runs fine. $wgExcludeFromThumbnailPurge is not defined in 1.17, made a check. BTW, it is a bit evil to exclude some extensions from Purge. Maybe there should be another action "Superpurge"?
Linker::link() was called statically in TranscodeStatusTable class. Created new Linker() and now it works. I haven't committed into svn, don't know if anyone cares of backcompatibility.
BTW, if I'd was an leading developer (who makes decisions), I'd probably make MW 1.16 an LTS (long time support) version for legacy setups and extensions.. Though maybe that is unneeded (too much of burden for non-profit organization).
Dmitriy
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
I run MediaWiki 1.17.0 (r6) and use TimedMediaHandler is r91852. I always prefer to run stable MW and latest extensions. Is it wrong idea?
2011/07/11 15:12:51 [error] 21984#0: *1029 FastCGI sent in stderr: "PHP Warning: array_merge(): Argument #1 is not an array in /var/www/wiki/universe/extensi ons/TimedMediaHandler/TimedMediaHandler.hooks.php on line 87 PHP Fatal error: Using $this when not in object context in /var/www/wiki/universe/includes/Linker.php on line 175" while reading response header from upstrea m, client: 193.233.48.78, server: 94.127.69.133, request: "GET /index.php/%D0%A4%D0%B0%D0%B9%D0%BB:Apollo_15_launch.ogg HTTP/1.1", upstream: "fastcgi://127.0. 0.1:9000", host: "94.127.69.133", referrer: "http://94.127.69.133/index.php/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0..."
The wiki was running just fine, some weidness appeared when I've installed UploadWizard, but now I've disabled it. Now it fails again. Interesting, why Special:Version and Special:ListFiles fail, they used to work before. I need a time to investigate. Dmitriy
On 08/07/11 21:18, Dmitriy Sintsov wrote:
Hi!
What's the proper way of thumbnail generation for Ogg media handler, so it will work like at commons?
This is documented in the OggHandler README file:
http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/OggHandler/README
In short, you should use oggThumb.
In Extension:OggHandler folder I found ffmpeg-bugfix.diff. However there is no libavformat/ogg2.c in current version of ffmpeg. Even, I found the function ogg_get_length () in another source file, however the code was changed and I am not sure that manual comparsion and applying is right way. It seems that the patch is suitable for ffmpeg version developed back in 2007 but I was unable to find original sources to successfully apply the patch.
That patch is not needed for the latest version of ffmpeg, since the bug that it fixes was fixed upstream. However, as the README file says, there are other bugs that are not fixed, which is why you should use oggThumb.
-- Tim Starling
On 12.07.2011 8:30, Tim Starling wrote:
On 08/07/11 21:18, Dmitriy Sintsov wrote:
Hi!
What's the proper way of thumbnail generation for Ogg media handler, so it will work like at commons?
This is documented in the OggHandler README file:
http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/OggHandler/README
In short, you should use oggThumb.
I have difficulties compiling this old software, even though I've succesfully complied last ffmpeg with the long list of options suitable for transcoding (specified in TimedMediaHandler README file) so I have large list of video libraries and their headers installed (it was not easy, CentOS multimedia support seems to be low comparing to Ubuntu or Fedora).
-- checking for module 'vorbis>=1.2.3' -- package 'vorbis>=1.2.3' not found -- checking for module 'vorbisenc>=1.2.3' -- package 'vorbisenc>=1.2.3' not found -- Theora encoder library found -- Theora decoder library found -- ERROR: Vorbis library NOT found -- ERROR: Vorbis encoder library NOT found
whereis libvorbis libvorbisenc libvorbis: /usr/lib/libvorbis.so /usr/lib/libvorbis.a libvorbisenc: /usr/lib/libvorbisenc.so /usr/lib/libvorbisenc.a
ldconfig -p|grep vorbis libvorbisfile.so.3 (libc6) => /usr/lib/libvorbisfile.so.3 libvorbisfile.so (libc6) => /usr/lib/libvorbisfile.so libvorbisenc.so.2 (libc6) => /usr/lib/libvorbisenc.so.2 libvorbisenc.so (libc6) => /usr/lib/libvorbisenc.so libvorbis.so.0 (libc6) => /usr/lib/libvorbis.so.0 libvorbis.so (libc6) => /usr/lib/libvorbis.so
rpm -qa|grep vorbis libvorbis-1.1.2-3.el5_4.4 libvorbis-devel-1.1.2-3.el5_4.4
ls /usr/include/vorbis/ codec.h vorbisenc.h vorbisfile.h
What do I miss in the system to have oggThumb successfully complied?
In Extension:OggHandler folder I found ffmpeg-bugfix.diff. However there is no libavformat/ogg2.c in current version of ffmpeg. Even, I found the function ogg_get_length () in another source file, however the code was changed and I am not sure that manual comparsion and applying is right way. It seems that the patch is suitable for ffmpeg version developed back in 2007 but I was unable to find original sources to successfully apply the patch.
That patch is not needed for the latest version of ffmpeg, since the bug that it fixes was fixed upstream. However, as the README file says, there are other bugs that are not fixed, which is why you should use oggThumb.
ffmpeg with the following options ./configure --prefix=/usr --enable-gpl --enable-version3 --enable-postproc --enable-libvorbis --enable-pthreads \ --disable-shared --disable-ffserver --disable-ffprobe --enable-postproc \ --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-bzlib --enable-libtheora \ --enable-libspeex --enable-libvpx --disable-encoders --disable-decoder=vp8 --disable-muxers \ --enable-encoder='bmp,dvvideo,ffv1,ffvhuff,flac,gif,huffyuv,libdirac,libschroedinger,\ libtheora,libvorbis,libvpx,mjpeg,pbm,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_s16be,\ pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32be,pcm_s32le,pcm_s8,pcm_u16be,pcm_u16le,pcm_u24be,\ pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,pgm,pgmyuv,png,ppm,rawvideo,tiff,vorbis,zlib' \ --enable-muxer='aiff,crc,dv,gif,image2,image2pipe,matroska,matroska_audio,md5,mjpeg,\ null,ogg,pcm_f32be,pcm_f32le,pcm_f64be,pcm_f64le,pcm_s16le,pcm_s24be,pcm_s24le,pcm_s32be,\ pcm_s32le,pcm_s8,pcm_u16be,pcm_u16le,pcm_u24be,pcm_u24le,pcm_u32be,pcm_u32le,pcm_u8,rawvideo\ ,wav,webm,yuv4mpegpipe'
creates thumbnails for my test videos, however I am unsure about variety of formats / codecs of course.
Dmitriy
On 13/07/11 01:45, Dmitriy Sintsov wrote:
-- checking for module 'vorbis>=1.2.3' -- package 'vorbis>=1.2.3' not found -- checking for module 'vorbisenc>=1.2.3' -- package 'vorbisenc>=1.2.3' not found
CentOS 5 only has libvorbis 1.1.2, not 1.2.3. You will need to do a source install of a newer version of libvorbis.
-- Tim Starling
wikitech-l@lists.wikimedia.org