windows下
265转YUV
ffmpeg.exe -i Fengjing_1-265-4096x2048-25fps-YUV420-CBR_8192Kb-GOP_25.h265 -vcodec rawvideo -an fengj.yuv
>ffmpeg.exe -i Runners-265-3840x2160-25fps-YUV420-CBR_8192Kb-GOP_25.h265 -vcodec rawvideo -an run.yuv
YUV转264
>ffmpeg.exe -video_size 3840x2160 -i Runners.yuv -vcodec h264 runner_transfer.264
265转264
>ffmpeg.exe -i Fengjing_1-265-4096x2048-25fps-YUV420-CBR_8192Kb-GOP_25.h265 -vcodec h264 fen.264
264转265
>ffmpeg.exe -i fen.264 -vcodec hevc fen.265
计算PSNR 图像重建质量
>ffmpeg.exe -video_size 3840x2160 -i run.yuv -video_size 3840x2160 -i Runners.yuv -filter_complex "psnr" run_compare.yuv
[Parsed_psnr_0 @ 000000000250a8e0] PSNR y:31.878077 u:36.466274 v:37.998030 average:33.039546 min:32.640968 max:34.266845
[Parsed_psnr_0 @ 000000000067aa80] PSNR y:38.300376 u:38.447542 v:38.367751 average:38.335779 min:36.026962 max:40.531240
D:\BaiduYunDownload\ffmpeg-20160915-6f062eb-win64-shared\ffmpeg-20160915-6f062eb-win64-shared\bin
>ffmpeg.exe -video_size 4096x2160 -i fengj-80Mbps.yuv -video_size 4096x2160 -i Fengjing_1.yuv -filter_complex "psnr" fen_compare-80Mbps.yuv
frame= 285 fps= 29 q=-0.0 Lsize= 3693600kB time=00:00:11.40 bitrate=2654208.0kbits/s speed=1.15x
video:3693600kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
[Parsed_psnr_0 @ 0000000002530a20] PSNR y:45.068100 u:45.140264 v:45.098371 average:45.085089 min:43.606612 max:48.820960
>ffmpeg.exe -video_size 4096x2160 -i run-80Mbps.yuv -video_size 4096x2160 -i Runners.yuv -filter_complex "psnr" Runners-80Mbps.yuv
video:3240000kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[Parsed_psnr_0 @ 0000000000660540] PSNR y:38.436361 u:38.424423 v:38.404795 average:38.429094 min:37.732499 max:44.588748
LINUX下
265转264
wigewige@ubuntu:~/share/develop/kandao/hisi/yak/KD-Hisi3519v101-SRC/mpp_big-little/sample/venc$ ffmpeg -i stream_chn0.h265 -vcodec h264 ss.264
wigewige@ubuntu:~/share/develop/kandao/hisi/yak/KD-Hisi3519v101-SRC/mpp_big-little/sample/venc$ ffplay ss.264 -vf "scale=1920:1080"
也可以转和播放,只是虚拟机转换/播放相对慢一些。
y4m转yuv
wigewige@ubuntu:~/share/develop/kandao/hisi/yak/KD-Hisi3519v101-SRC/mpp_big-little/sample/venc$ ffplay station2_1080p25-ffmpeg.yuv -video_size 1920x1080
参考
http://blog.csdn.net/thomashtq/article/details/44940457
http://www.cnblogs.com/mlj318/p/3781591.html
http://m.blog.chinaunix.net/uid-9525959-id-5750362.html
http://stackoverflow.com/questions/19840960/comparing-psnr-of-two-videos-possibly-with-ffmpeg
https://trac.ffmpeg.org/wiki/FilteringGuide
http://www.cutey.us/2015/09/tools-to-calculate-psnr