とりあえず、libx265はリンクできているようなので、エンコードしてみる。
FFmpeg: How to generate a .mp4 with h.265 Codec?
macはサンプル動画が入っていないようなので、ここから拝借。
サンプルムービーダウンロード (sharp)
ffmpeg -i data/sample2_c.mpg -c:v libx265 -c:a copy output.mp4
以下出力内容。
--------------------------------------------------------------------------------------------------
ffmpeg version 2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Apr 3 2014 09:39:57 with Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libx265 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libvorbis --enable-libvpx --enable-ffplay --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 '
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mpeg, from 'data/sample2_c.mpg':
Duration: 00:00:24.93, start: 0.400422, bitrate: 1924 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv), 720x480 [SAR 8:9 DAR 4:3], max. 3000 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16p, 224 kb/s
x265 [info]: using cpu capabilities: MMX2 SSE SSE2Fast SSSE3 SSE4.2 AVX
x265 [info]: Main profile, Level-3 (Main tier)
x265 [info]: WPP streams / pool / frames : 8 / 4 / 2
x265 [info]: CU size : 64
x265 [info]: Max RQT depth inter / intra : 1 / 1
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut : 25 / 250 / 40
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / refs : 1 / 1 / 3
x265 [info]: Rate Control / AQ-Strength / CUTree : ABR-200 kbps / 1.0 / 1
x265 [info]: tools: rect amp rd=3 lft sao-lcu sign-hide
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Video: hevc (libx265) ([35][0][0][0] / 0x0023), yuv420p, 720x480 [SAR 8:9 DAR 4:3], q=2-31, 200 kb/s, 30k tbn, 29.97 tbc
Stream #0:1: Audio: mp2 (i[0][0][0] / 0x0069), 48000 Hz, stereo, 224 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video -> libx265)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 750 fps= 14 q=0.0 Lsize= 1296kB time=00:00:24.95 bitrate= 425.5kbits/s
video:605kB audio:663kB subtitle:0 data:0 global headers:0kB muxing overhead 2.213881%
x265 [info]: frame I: 8 Avg QP:34.84 kb/s: 3078.88
x265 [info]: frame P: 244 Avg QP:39.05 kb/s: 412.34
x265 [info]: frame B: 498 Avg QP:43.19 kb/s: 45.55
x265 [info]: global : 750 Avg QP:41.75 kb/s: 197.24
x265 [info]: 78 of 244 (31.97%) P frames weighted
--------------------------------------------------------------------------------------------------
一応エンコードはできた。
結構汚いな。。。
しばらくは勉強しながら、エンコードオプション、ビットレートなど調べます。
あと、vp9も既に使えるようです。