もちろん、私は無料のウェブです。 しかし、2回の疑わしい比較( 1回と2回 )に基づいて多くの人が作成したTheoraの品質はH.264より優れているという結論は非常に急いでいます。
![クマは病気です](https://habrastorage.org/getpro/habr/post_images/a2b/04a/06f/a2b04a06f60777eea8bd01e3ba7017d7.jpg)
最初の比較では、テストビデオもコーデック設定もまったく表示されません。 2番目は、Youtubeから意図的にずさんなプリセットがH.264コーデック用に取得され、Theoraの設定はサイレントであると言います。
そこで、Ogg Theoraが何であり、このコーデックが何をできるかを自分で確認することにしました。
フォーマット比較
私が最初に気づいたのは、 Ogg Theoraの機能のリストです 。 比較のために、 H.264機能のリスト
混乱したもの:
- 最小ブロックサイズは8x8です(H.264では、最小は4x4です。これにより、小さな詳細をより適切に保存できます)
- 算術コーディングがない(15%を無料でプレイできる)
- 動き補償の半ピクセル精度(H.264の1/4ピクセル)
- Bフレームなし
これは、異なる形式の機能の説明を比較する場合のみです。
H.264機能リストがはるかに長いことに注意してください。 だから、知っているほど高度ではないコーデックが比較に勝つことは驚くべきことでした。
コーデックバージョン
Theora Binariesはサイトに表示されていませんが、source =(Found ffmpeg2theora builds。Version Theory 1.1.0(libtheora 1.1 20090822(Thusnelda))からコンパイルできませんでしたが、バージョン1.1.1はxiph.orgにあります。マイナーな修正のみが宣言されているので、大丈夫だと思うので、リングの青い角
比較のために、 x264コーデックを使用することにしました。 多くの設定と優れたコミュニティサポートを備えた、H.264コーデックファミリのかなり高度なメンバー。 さらに、オープンソース。 MSU Videogroupの最後の比較の結果によると、彼は2位になり、リーダーに少し負けました。 そのため、リングの赤いコーナーには
デコードには、AviSynth FFmpegSource2バージョン2.12のプラグインを使用しました。
比較テクニック
比較のために、幅640ピクセルの解像度で4つのビデオシーケンスを撮影しました。 ビットレートが500 kbpsの2つのパスでエンコードされます(サイズを取得する方がはるかに簡単です)。 Theora設定は、最高品質と最も柔軟なレート制御に設定されました。 x264の場合、2つのプリセットを取りました。1つ目はTheoraの機能(ハーフピクセルシフト、bフレームなし、8x8ブロックサイズなど)に似ています。2つ目はすべての機能がオンになっている通常のx264プリセットです。 MSU Video Quality Measurement Toolを使用して、 PSNRおよびSSIMメトリックで品質を測定しました 。
結果を時間内に揃えることは大きな問題なので、エンコード時間を評価しませんでした。 これは、より成熟したプロジェクトであるため、アセンブラーの最適化により、x264の速度が著しく向上する可能性が最も高いでしょう。
プリセット
Theora:
--soft-target --two-pass --optimize --speedlevel 0 --keyint 250
x264 analogue:
--bframes 0 --no-cabac --partitions i8x8,p8x8 --me umh --no-mbtree --no-psy --no-fast-pskip --no-dct-decimate --subme 1
x264 normal:
--bframes 4 --b-pyramid normal --partitions all --me umh --no-psy --trellis 2 --no-fast-pskip --no-dct-decimate --subme 10 --b-adapt 2 --direct auto
() , . , x264 ref=3.
- Battle
, - , , . . - Football
. use-case, . - Shuttle start
, . . - Toys and calendar
.
PSNR SSIM. , SSIM . , , SSIM . PSNR .
![SSIM SSIM](https://habrastorage.org/getpro/habr/post_images/bb6/2bb/d07/bb62bbd075059328a6934b90d454c20c.png)
![PSNR PSNR](https://habrastorage.org/getpro/habr/post_images/cef/471/043/cef4710432eab9df8c196c6d097344f8.png)
, Theora x264. x264 . .
.
Battle
PSNR , . , , x264 — .
.
![Source, battle, frame 389 Source, battle, frame 389](https://habrastorage.org/getpro/habr/post_images/392/b6e/bd5/392b6ebd56e0b52b0932cd858a697b71.png)
![Theora, battle, frame 389 Theora, battle, frame 389](https://habrastorage.org/getpro/habr/post_images/b92/ea0/390/b92ea0390659f2a4913a330588ba1f3e.png)
![x264 analogue, battle, frame 389 x264 analogue, battle, frame 389](https://habrastorage.org/getpro/habr/post_images/bbe/0c8/15d/bbe0c815d9ee6e38d520721eb83594c4.png)
![x264 normal, battle, frame 389 x264 normal, battle, frame 389](https://habrastorage.org/getpro/habr/post_images/0a4/12e/1e3/0a412e1e3d3dda8ac86d0f98af3f6905.png)
, x264
![Source, battle, frame 444 Source, battle, frame 444](https://habrastorage.org/getpro/habr/post_images/530/88b/17f/53088b17f16e193b9be8fcbda1f542b9.png)
![Theora, battle, frame 444 Theora, battle, frame 444](https://habrastorage.org/getpro/habr/post_images/f62/c2c/9bf/f62c2c9bf9e7d126120b12ad4628e747.png)
![x264 analogue, battle, frame 444 x264 analogue, battle, frame 444](https://habrastorage.org/getpro/habr/post_images/270/5e8/510/2705e8510b907cd0ead8ba099b023291.png)
![x264 normal, battle, frame 444 x264 normal, battle, frame 444](https://habrastorage.org/getpro/habr/post_images/4dc/372/c25/4dc372c25988ab6640ba15a57372bd1f.png)
Football
- . x264 .
![Source, football, frame 361 Source, football, frame 361](https://habrastorage.org/getpro/habr/post_images/c58/b9c/15c/c58b9c15ce42e86e84e1a5f8e2da33c1.png)
![Theora, football, frame 361 Theora, football, frame 361](https://habrastorage.org/getpro/habr/post_images/539/d71/792/539d71792932eea8de3593c6582937f3.png)
![x264 analogue, football, frame 361 x264 analogue, football, frame 361](https://habrastorage.org/getpro/habr/post_images/e1a/59e/386/e1a59e3861d12ca55ded7fee643f7313.png)
![x264 normal, football, frame 361 x264 normal, football, frame 361](https://habrastorage.org/getpro/habr/post_images/3b0/807/316/3b0807316fc62c60497742834706b526.png)
Shuttle start
. x264 - .
![Source, shuttle_start, frame 379 Source, shuttle_start, frame 379](https://habrastorage.org/getpro/habr/post_images/983/ba6/3c2/983ba63c229f9fedbb37540a91fd5566.png)
![Theora, shuttle_start, frame 379 Theora, shuttle_start, frame 379](https://habrastorage.org/getpro/habr/post_images/974/d54/f50/974d54f50ad8701ec2ca4a8a88912a05.png)
![x264 analogue, shuttle_start, frame 379 x264 analogue, shuttle_start, frame 379](https://habrastorage.org/getpro/habr/post_images/f4d/ba6/9d4/f4dba69d498f9a79f8ed46fc85497780.png)
![x264 normal, shuttle_start, frame 379 x264 normal, shuttle_start, frame 379](https://habrastorage.org/getpro/habr/post_images/9e0/9f5/d42/9e09f5d42b7a62ad000ba67f55c79dec.png)
Toys and calendar
. x264 , . . x264 , .
![Source, toys_and_calendar, frame 77 Source, toys_and_calendar, frame 77](https://habrastorage.org/getpro/habr/post_images/407/ced/af2/407cedaf2a98a27d74b1329bc2a70149.png)
![Theora, toys_and_calendar, frame 77 Theora, toys_and_calendar, frame 77](https://habrastorage.org/getpro/habr/post_images/384/c9d/09d/384c9d09d4de305a65a96271fa134643.png)
![x264 analogue, toys_and_calendar, frame 77 x264 analogue, toys_and_calendar, frame 77](https://habrastorage.org/getpro/habr/post_images/2cf/faa/e97/2cffaae97d561e524d016cbffb82c243.png)
![x264 normal, toys_and_calendar, frame 77 x264 normal, toys_and_calendar, frame 77](https://habrastorage.org/getpro/habr/post_images/eaf/1b3/8a7/eaf1b38a7f5b03c8e0a1b83e9086db60.png)
, , , . 5% , .
![](https://habrastorage.org/getpro/habr/post_images/28d/165/eea/28d165eeaf05849405b1e25e706060ee.png)
. , . . , .
- , - , . , x264 , Theora. Theora , x264 — , x264 normal. SSIM. SSIM x264 , , .
:
![SSIM SSIM](https://habrastorage.org/getpro/habr/post_images/726/2d3/489/7262d3489a0031d824bd7fbcbf7a6493.png)
2-4 .
x264
x264 . Ogg Theora. , , .
x264:
- b-
- --tune ssim --tune psnr, , ( Theora PSNR)
- ,
- ,
x264
x264 analogue . , , :
- , SSIM, PSNR
- 16x16
- -
H.264 — , Ogg Theora, /. , .
, . .
(25 )
(365 ) — , lossless- huffyuv.