如何编码视频?
本文介绍x265中的两种编码视频方法,一是采用命令行的方法;二是GUI的方式。
1、命令行的方法
(1)、第一种方式生成*.265格式的视频文件
第一种方式可以生成*.265格式的视频文件,对应的命令为:
x265 --input-res 352x288 --fps 30 hall_cif_352x288_300.yuv -o hall_cif_352x288_300.h265
(2)、第二种方式可以生成*.bin格式的视频流文件
第二种方式可以生成*.bin格式的视频流文件,对应的命令为:
x265.exe --preset fast --input hall_cif_352x288_300.yuv --fps 30 --input-res 352x288 --output out.bin --psnr --ssim --bitrate 128
两种方式生成的对应文件如下图所示:
除了这两种经测试可以使用的方式外,网址:http://x265.ru/en/encode/还提供了两种略有区别的命令行方式,如下图所示:
(3)、第三种命令行的方式,可以生成*.x265和*.csv