View Full Version : Getting Theora competitive
buzzqw
15th June 2009, 11:01
what's about mpeg files ?
are mpeg2 file working ?
BHH
LigH
15th June 2009, 11:02
If you are asked about "file specifications", try to be as verbose as possible. MediaInfo usually creates a technically fairly verbose analysis.
Everyone who builds a tool based on libavcodec may chose how many input and output format he wants to enable while building. I still hope anyone may build ffmpeg2theora with included AviSynth support (which is merely enabling legacy AviFile VfW functions, not portable but compatible), no other way may be more useful for video quality testers using Windows.
nakTT
15th June 2009, 11:15
what's about mpeg files ?
are mpeg2 file working ?
BHH
Not working with .mpg files.
If you are asked about "file specifications", try to be as verbose as possible. MediaInfo usually creates a technically fairly verbose analysis.
Everyone who builds a tool based on libavcodec may chose how many input and output format he wants to enable while building. I still hope anyone may build ffmpeg2theora with included AviSynth support (which is merely enabling legacy AviFile VfW functions, not portable but compatible), no other way may be more useful for video quality testers using Windows.
Which part of the info shown by the MediaInfo that I should post here? Please advice, newbies here.
buzzqw
15th June 2009, 11:17
you don't give any information
ffmpeg2theora works with mpeg2 file.
so start writing
1) your os
2) version of ffmpeg2theora
3) post ffmpeg2theoraanalyze.txt
4) error messages, on analyzing AND encoding
5) post queue
otherwise i cannot help
BHH
tofans
15th June 2009, 12:48
I've done a little demo page, on which you can compare the quality between theora 1.0, theora 1.1a2 and H.264
http://html5.funpic.de/bbb.html
(audio on the H.264 version is a bit off, I'll fix it asap)
Keiyakusha
15th June 2009, 14:31
tofans
What should I use to play h264 version?
Sagittaire
15th June 2009, 16:49
I make little comparison ... and even MPEG 4 ASP (XviD, DivX ...) is really better than Theora and really by far.
Theora is never on par with PSNR too with x264 and by far.
tofans
15th June 2009, 17:43
What should I use to play h264 version?
On Windows, Chrome and Safari will work with H.264 streams. Latest chrome nightly-builds should support both, Ogg-Theora and H.264.
EDIT: Added flash based H.264 playback: http://html5.funpic.de/bbb_flash.html
(Disclaimer: My demo is not intended to proof any visual quality advantages of any codec whatsoever. This said, I don't guarantee that I got the maximum visual quality out of the used codecs.)
Keiyakusha
15th June 2009, 18:08
On Windows, Chrome and Safari will work with H.264 streams. Latest chrome nightly-builds should support both, Ogg-Theora and H.264.
EDIT: Added flash based H.264 playback: http://html5.funpic.de/bbb_flash.html
Thanks, I guess I need to try Chrome. I hopes at least someone will write libavcodec based h264plugin for firefox...
By the way why it's not possible to make browsers simply use system directshow decoders?
hellfred
15th June 2009, 21:34
Here (http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-June/020237.html) one can find a quite long thread which covers Theora FUD and browser support. There is a link (http://people.xiph.org/~greg/video/ytcompare/comparison.html) to a comparison with latest theora-thusnelda encoder, which was created as reaction to the thread.
benwaggoner
15th June 2009, 23:30
I can't exactly explain this turn of events, but I have somehow found myself defending x264 on Slashdot.
http://tech.slashdot.org/comments.pl?sid=1268327&cid=28341513
Here's some quick samples I whipped out using the same settings in hellfred's link.
http://cid-bee3c9ac9541c85b.skydrive.live.com/browse.aspx/.Public/BBB%7C_Compare?lc=1033
Net net, x264 can handily beat the high bitrate samples at the low bitrate.
I got an email from Greg Maxwell about my comments on the encodes. It seems that he and Xiph think that Theora is more competitive than the opinion I see here. I don't mean to take away from Xiph's impressive refactoring of the codebase they had to start with, with some very impressive speed and quality improvements.
But they're really setting themselves up for disappointment if they're shooting for efficiency-critical markets.
CruNcher
16th June 2009, 00:06
H.264 is mostly the corporate Research industries baby sure a codec that has been given for free some years ago to the community wont change much ;) but the start to more has been done and who knows what the future might bring for OVA :) Btw youtube supports High Profile :)
Though consumers have been left alone by the industry once again going the medium quality way for HD Mobile CE devices :(
iwod
16th June 2009, 16:44
Thanks, I guess I need to try Chrome. I hopes at least someone will write libavcodec based h264plugin for firefox...
By the way why it's not possible to make browsers simply use system directshow decoders?
I would love to know too......Otherwise we could never get Hardware acceleration.
Gokumon
16th June 2009, 16:59
I would love to know too......Otherwise we could never get Hardware acceleration.
Why? I wasn't aware that DirectShow filters were the only way to get hardware acceleration.
iwod
16th June 2009, 17:19
Well Downloaded all sample clips........... my conclusion - Greg Maxwell is very loyal to Ogg.
Unless my decoder is specially tuned with heavy post processing and magic, BOTH Theora encodes were equal or worst the Youtube variant. ( The H.263 Flash movie was bad...... so i prefer Theroa, although i consider they are both not very good.)
Now, considering it is using the Latest and Greatest Theora Encoder comparing to
1. Quite possibly the worst H.263 Encoder on the planet.
2. A Not very good H.264 Encoder.
Nuff Said. I wish everyone could download the sample and see for yourself.
smok3
16th June 2009, 18:38
On Windows, Chrome and Safari will work with H.264 streams. Latest chrome nightly-builds should support both, Ogg-Theora and H.264.
EDIT: Added flash based H.264 playback: http://html5.funpic.de/bbb_flash.html
assuming safari uses qt engine? (which should be quite limited), then we are left with chrome, how is that working?
hellfred
16th June 2009, 19:04
I am using windows port of MPlayer from http://oss.netfarm.it/mplayer-win32.php to view the files (MPlayer-rtm-svn-29355.7z).
For viewing the files, just drag and drop them on mplayer.exe.
Comparing bbb_theora_325kbit.ogv with bbb_youtube_lowquality_327kbit.flv, Theora wins for me:
fewer blocks, better constant quality throughout the file, less ringing around the title.
Comparing bbb_theora_486kbit.ogv with bbb_youtube_h264_499kbit.mp4, the two clips are next to on pare, slight advantages in the high motion scenes for Theora.
The mp4 video caught up, not displaying major artifacts anymore. The improvement in visual quality in the Theora video is not that great, but the lower bitrate Theora video was of better quality, so no surprise there.
Comparing bbb_theora_325kbit.ogv and bbb_youtube_h264_499kbit.mp4 with BigBuckBunny_x264_480x272p24_391-112.mp4 form benwagoner, I have to say that video encoded by benwagoner is the winner: Next to no ringing around the text, less blocks in the view high motion scenes, more constant quality throughout the whole clip. X264 rate control wins.
BigBuckBunny_480x272p24_2ch_391-64.wmv cannot keep up with the X264 clip BigBuckBunny_x264_480x272p24_391-112.mp4 but is clearly better than the Theora version (fewer blocks, less ringing). Postprocessing? I have used MPlayerC to watch the wmv file and have never touched any setting for wma playback.
Please note, that I am not a pro when it comes to comparing of videos.
So why do I come to another conclusion than iwod, who does not see any advantage for Theora clips over the Youtube videos? Maybe MPlayer does not use any post processing which was may be turned on in the flash based solution iwod used.
For my part, the Theora videos can easily compete with the Youtube variants, but does look noticeable worse than X264 and WMA9.
Gusar
16th June 2009, 21:25
By the way why it's not possible to make browsers simply use system directshow decoders?
Arora (http://code.google.com/p/arora/) does. At least in theory it should. Arora uses the Phonon multimedia framework, which on Windows uses DirectShow.
*.mp4 guy
16th June 2009, 22:53
Huh, looks like they are still using the jpeg derived quantization matrices.
benwaggoner
17th June 2009, 02:44
I am using windows port of MPlayer Comparing bbb_theora_325kbit.ogv and bbb_youtube_h264_499kbit.mp4 with BigBuckBunny_x264_480x272p24_391-112.mp4 form benwagoner, I have to say that video encoded by benwagoner is the winner: Next to no ringing around the text, less blocks in the view high motion scenes, more constant quality throughout the whole clip. X264 rate control wins.
Rate Control + CABAC + 8x8 blocks + lots of great perceptual optimization.
I imagine (DS?) that doing per macroblock rate distortion is a very powerful technique for low-noise long-GOP animation content like this, as the algorithm would be able to use ligher compression all the way back to the IDR for macroblocks that make perfect references for the rest of the GOP.
BigBuckBunny_480x272p24_2ch_391-64.wmv cannot keep up with the X264 clip BigBuckBunny_x264_480x272p24_391-112.mp4 but is clearly better than the Theora version (fewer blocks, less ringing). Postprocessing? I have used MPlayerC to watch the wmv file and have never touched any setting for wma playback.
I doubt MPlayer is doing any preprocessing, so the file wouldn't look as good as it would in WMP which will automatically apply adaptive deblocking and deringing in postprocessing.
So why do I come to another conclusion than iwod, who does not see any advantage for Theora clips over the Youtube videos? Maybe MPlayer does not use any post processing which was may be turned on in the flash based solution iwod used.
I don't know of Flash using any postprocessing with H.264, just H.263 and VP6.
For my part, the Theora videos can easily compete with the Youtube variants, but does look noticeable worse than X264 and WMA9.
Perhaps the take home should "YouTube encoding no better than Theora!" not "Theora able to match YouTube H.264 quality!"
That said, the encoding settings I used were tuned much more for quality than speed; YouTube wouldn't use quite as good settings. Still, why aren't they aren't at least using CABAC? Decode load isn't that bad at 500 Kbps. Maybe they're still sweating PowerPC Macs? High Profile should be a no brainer, as it's supported everywhere that YouTube targets Main Profile, and it has no decode perf hit.
iwod
17th June 2009, 04:30
It is very late last night @ 2am. So just in case i will check it out again when i off work today using Mplayer.
I was using WMP on Windows 7 RC1 with Win7Codec 1.17. And to me theora definitely gives more ringing compare to H.264. H.263 were about the same.
May be Doom9 should start the long disappeared Codec Comparison to sort this out.
hellfred
17th June 2009, 07:33
I doubt MPlayer is doing any preprocessing, so the file wouldn't look as good as it would in WMP which will automatically apply adaptive deblocking and deringing in postprocessing.
I want to emphasise that I was using MediaPlayerClassic (MPlayerC) for viewing the wma file, not MPlayer and its build in WMA decoder.
Manao
17th June 2009, 08:03
Still, why aren't they aren't at least using CABAC? Decode load isn't that bad at 500 KbpsI guess it's for mobile phones.
juGGaKNot
17th June 2009, 08:23
I got ffmpeg2theora from http://v2v.cc/~j/ffmpeg2theora/download.html v24, what is better, stable or thusnelda build ?
I use start "encode" /b /low /max /wait "%mypath%\bin\ffmpeg2theora-0.24-thusnelda.exe" -o "%mypath%\%mymovie%.ogv" -V 4000 --optimize -keyint 25 -a 1 -c 2 "%mypath%\%mymovie%.avi"
-pp fulrange does not work. it says that the profile is wrong.
Also for muxing aac audio what muxer should i use ?
thnx
benwaggoner
17th June 2009, 17:07
I guess it's for mobile phones.
But wouldn't they need Baseline then?
benwaggoner
17th June 2009, 17:10
I got ffmpeg2theora from http://v2v.cc/~j/ffmpeg2theora/download.html v24, what is better, stable or thusnelda build ?
Thusnelda.
None of the versions have good documentation from what I've seen, though, particularly for rate control. I'm manifestly unclear what their buffering model is.
I wish I knew what Smoothness was doing under the hood as well.
Seems like of surprising they haven't implemented 2-pass encoding yet. Were I heavily refactoring a codec, I'd do 2-pass first since basic PSNR rate distortion rate control is much easier to design with a full analysis pass.
Manao
17th June 2009, 17:14
Baseline + bframes gives a huge boost quality wise, and doesn't add too much complexity (at least, if compared to cabac).
Mr VacBob
17th June 2009, 21:34
Sharpness and optimize don't seem to do anything in thusnelda - looks like they were in vp3 and were removed. Haven't read the ratecontrol yet.
benwaggoner
17th June 2009, 22:38
Baseline + bframes gives a huge boost quality wise, and doesn't add too much complexity (at least, if compared to cabac).
But how does the player know it can handle the bitstream? Some kind of special code?
Sergey A. Sablin
18th June 2009, 07:00
But how does the player know it can handle the bitstream? Some kind of special code?
- profile_idc = 77 + CAVLC, or
- profile_idc = 66 + constraint_set0_flag = 0 may work also
Mr VacBob
18th June 2009, 07:27
Comment from thusnelda alpha1:
/*The buffer size is set equal to the keyframe interval, clamped to the range [8,256] frames.
The 8 frame minimum gives us some chance to distribute bit estimation errors.
The 256 frame maximum means we'll require 8-10 seconds of pre-buffering at 24-30 fps, which is not unreasonable.*/
There is no other way to control maxrate. Also, the code uses 12 instead of 8.
Isn't this one of the most important things to fix if they want web video?
benwaggoner
18th June 2009, 16:42
There is no other way to control maxrate. Also, the code uses 12 instead of 8.
Isn't this one of the most important things to fix if they want web video?
Yeah, I'd think. GOP==buffer duration's not a bad default, but there's plenty of cases where you don't want that to be true.
If anything, this would result in a bitrate that's too consistant for progressive download scenarios.
It does suggest that "fair" comparisons with Theora-as-a-bitstream should use 1-pass CBR with GOP==buffer. I imagine Xiph must be planning a proper 2-pass VBR encoding mode. Although they're mainly coming from an audio background, and historically audio guys don't sweat rate control with the same pathological itensity as video guys.
For stuff like YouTube, it's better to have quality constant and bitrate variable than bitrate constant and quality variable. Theora doesn't have much deblocking, and so really suffers from QP spikes.
xiphmont
23rd June 2009, 18:51
Theora doesn't "try" to avoid anything. In fact, the Software Freedom Law Center says that Theora being patent-free is completely made up:
BBB is not from the SFLC.
More than that, the SFLC is representing Xiph.Org on patent concerns. If they're 'telling' you something significantly different than what they're telling us, through third parties no less, I suggest you need to check your sources. Given that they're our lawyers on this subject, if they knew something/anything about infringement, willful or otherwise, they'd be obligated to inform us immediately. To be clear, to date they have not.
[edit: something else that was touched on. IIRC, On2 owned a single patent concerning VP3 having to do with a variable encode-side-only dead zone in the quantization matrix. They called it 'ZeroBin'. None of the new Thusnelda encoders use it or read on it. The 'patent grant' was more to do with covering any future On2 patents. Not directly relevant to anything above, just an interesting factoid for you all.]
Monty
Director, Xiph.Org
xiphmont
23rd June 2009, 18:54
Huh, looks like they are still using the jpeg derived quantization matrices.
Yes. No AQ yet, and only stock jpeg matricies. That's on the dev list for next release.
(FTR, some of the demo7 stuff was using flat matricies just to show even something that simple was an improvement over the JPEG example matricies)
Any news for Demo 8 update? I am still hoping Theora 1.1 to prove me wrong
On Windows, Chrome and Safari will work with H.264 streams. Latest chrome nightly-builds should support both, Ogg-Theora and H.264.
EDIT: Added flash based H.264 playback: http://html5.funpic.de/bbb_flash.html
(Disclaimer: My demo is not intended to proof any visual quality advantages of any codec whatsoever. This said, I don't guarantee that I got the maximum visual quality out of the used codecs.)
What did you use for H.264? X.264 ?? Default Settings?
tofans
7th July 2009, 19:48
What did you use for H.264? X.264 ?? Default Settings?
Sorry, forgot to add the command line to the page. Fixed now...
This is the command line is used for the second pass:
x264 -o bbb.mp4 --ref 5 --me umh --mixed-refs --8x8dct --trellis 1 --subme 8 --b-adapt 1 --bframes 3 --b-pyramid --weightb
--bitrate 500 --pass 2 --no-psnr --no-ssim --threads auto --direct auto input
@ iwod:
H.264 - theoretical standard - upper case H + dot
x264 - practical implementation - lower case x, no dot
nakTT
9th July 2009, 07:18
@ iwod:
H.264 - theoretical standard - upper case H + dot
x264 - practical implementation - lower case x, no dot
Will x264 be affected by the soon to be imposed ruling on H.264 on 2010?
nurbs
9th July 2009, 08:15
What ruling? If you mean the changes in the patent fees then if you are using x264 or any other H.264 encoder and paying the fees (i.e. if you are the owner of Youtube) you will be affected, if you aren't paying anyway because you are just backing up DVDs at home you won't be directly affected.
Dark Shikari
9th July 2009, 08:20
Will x264 be affected by the soon to be imposed ruling on H.264 on 2010?2010 is merely when the patent licensing terms for all MPEG formats are updated. There's nothing special about it.
Nor do they apply to ordinary users and consumers, as most of the terms have lower limits of ~100k units distributed or similar.
nakTT
9th July 2009, 08:21
What ruling? If you mean the changes in the patent fees then if you are using x264 or any other H.264 encoder and paying the fees (i.e. if you are the owner of Youtube) you will be affected, if you aren't paying anyway because you are just backing up DVDs at home you won't be directly affected.
I see, glad to hear that. So x264 will still be free for the end user then. Thanks for the clarification.
:thanks:
@ iwod:
H.264 - theoretical standard - upper case H + dot
x264 - practical implementation - lower case x, no dot
Thanks for the correction. I do know the difference between the two. The dot in x264 was a typo, never knew there is a different between x or X though.
2010 is merely when the patent licensing terms for all MPEG formats are updated. There's nothing special about it.
Nor do they apply to ordinary users and consumers, as most of the terms have lower limits of ~100k units distributed or similar.
I hope they lower the fees so that people dont bother with other codec. And ends all the debate once and for all.
hellfred
23rd July 2009, 22:15
An initial implementation of adaptive quantization (https://trac.xiph.org/changeset/16314) and a first update of the quantization matrices (https://trac.xiph.org/changeset/16312) has hit the svn repository of the theora thusnelda branch. Looks like work in progress, as the next demo page has not yet been posted and no alpha release is being prepared.
Hellfred
benwaggoner
24th July 2009, 00:41
An initial implementation of adaptive quantization (https://trac.xiph.org/changeset/16314) and a first update of the quantization matrices (https://trac.xiph.org/changeset/16312) has hit the svn repository of the theora thusnelda branch. Looks like work in progress, as the next demo page has not yet been posted and no alpha release is being prepared.
Sounds promising. Thusnelda is definitely screaming out for DQuant. With the combination of DQuant with adaptive quant matricies and hopefully Theora could see a big reduction in blockiness on challenging parts of the content.
Getting rate control modes beyond fixed quant and 1-pass CBR with GOP duration=buffer duration is the other big thing needed. Most of the proposed uses of Theora are progressive download, so a good old-fashioned peak limited 2-pass VBR would be a big help as well to keep those QP spikes down.
Max of S2D
26th July 2009, 14:24
Tested the latest build I could find, and quality looks halfway between MPEG2 and x264. Truly unexpected.
The thing that pisses me off is that the current Theora decoder implementation in Firefox is AWFUL.
benwaggoner
26th July 2009, 22:51
Tested the latest build I could find, and quality looks halfway between MPEG2 and x264. Truly unexpected.
Pretty much the entire universe of codecs is along the MPEG-2 to x264 range :).
Do you have some samples? My most recent Apples-to-Apples tests using a build from a few weeks ago is here.
http://cid-bee3c9ac9541c85b.skydrive.live.com/browse.aspx/.Public/Island%20Compare
In order to make it as much about bitstream instead of rate control issues, I had the other encoders match the current Theora limiitation of 1-pass CBR and GOP length=Buffer duration.
The thing that pisses me off is that the current Theora decoder implementation in Firefox is AWFUL.
Do we know if it's the decoder per se, or the media pipeline integration? Having media playback sharing the same threading model as a mult-tabbed browser each of which could have multple videos playing back, and also with Javascript and other processing. Plus making sure the networking stack is keeping the video buffers full while allowing other things to come down...
The nice thing about a plugin model is that it becomes its own process and can grab its share of resources kind of ignoring the rest of the browser. Which definitely has its downsides as well, but at least is simple.
Max of S2D
26th July 2009, 22:57
My tests have given Theora an encoding quality a bit under WMV9's.
As soon as it goes over it I'm probably going to use Theora for publishing my masters...
benwaggoner
27th July 2009, 11:05
My tests have given Theora an encoding quality a bit under WMV9's.
As soon as it goes over it I'm probably going to use Theora for publishing my masters...
Which WMV9 implementation? It's not like that's been standing still either.
By the way, the free version of Expression Encoder 3 incldues all the WMV features. I probably should have mentioned that earlier :).
http://blogs.msdn.com/expressionencoder/archive/2009/07/22/9845044.aspx
In this release we have taken on board your feedback and simplified the product line. There are now two versions: Expression Encoder and Expression Encoder with IIS Smooth Streaming. We have retired the Express version and, instead, have made all the features in Expression Encoder available for free with no more 30 day limit.
So what do you get in Expression Encoder with IIS Smooth Streaming?
CODECs (AC3 Decode, MPEG2/TS Decode, AVC-HD Decode, H.264 Encode, AAC-LC Encode/Decode)
Unlimited Screen Capture (Expression Encoder can capture up to 10 minutes)
IIS Smooth Streaming
Other than that, all functionality in the Expression Encoder is freely available with no time limit (Full VC-1 encode, Live encoding, Overlays, Screen Capture up to 10 minutes).
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.