开发者
资源
文档评分
获取效率
正确性
完整性
易理解
在线提单
论坛求助

10bit使用参考

以YUV文件转换为MP4文件为例,提供在FFmpeg下使用HW265Enc编码器编码10bit序列的命令使用示例。

在输入命令行选项时,除了输出文件名写在末尾,其他FFmpeg内置参数写在“ffmpeg”命令后面。libhw265编码器参数写在“libhw265”后面。参数的分类和说明请参见表1

将10bit版本HW265视频编码器的动态链接库libhw265_10bit.so拷贝到“/usr/local/lib”目录并重命名为libhw265.so。

1
cp ~/dependency/lib/libhw265_10bit.so /usr/local/lib/libhw265.so

命令举例:

ffmpeg -pix_fmt yuv420p10le -s 1920x1080 -i input.yuv -bf 0 -c:v libhw265 -wpp_threads 4 output.mp4

显示信息参考示例如下:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
Input #0, rawvideo, from 'input.yuv':
  Duration: 00:00:40.00, start: 0.000000, bitrate: 1244160 kb/s
  Stream #0:0: Video: rawvideo (Y3[11][10] / 0xA0B3359), yuv420p10le, 1920x1080, 1244160 kb/s, 25 tbr, 25 tbn
File 'output.mp4' already exists. Overwrite? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> hevc (libhw265))
Press [q] to stop, [?] for help
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf61.1.100
  Stream #0:0: Video: hevc (hev1 / 0x31766568), yuv420p10le(progressive), 1920x1080, q=2-31, 200 kb/s, 25 fps, 12800 tbn
      Metadata:
        encoder         : Lavc61.3.100 libhw265
[out#0/mp4 @ 0xe9c4c70] video:78595KiB audio:0KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 0.007363%
frame= 1000 fps= 29 q=-0.0 Lsize=   78601KiB time=00:00:39.96 bitrate=16113.6kbits/s speed=1.14x