将摄像头采集到的数据存成YUV文件
帧率:15fps
尺寸:320x240
色度格式:4:2:0
YUV文件下载地址:http://trace.eas.asu.edu/yuv/
使用ffmpeg
将avi -> YUV:
ffmpeg -i input.avi -s 320*240 -r 15 -pix_fmt yuv420p out.yuv
播放验证(yuv格式必须知道video_size, 否则播放花屏):
ffplay -f rawvideo -video_size 320*240 out.yuv
源数据是yuv444p -> yuv420p;
命令:ffmpeg -s 176*144 -pix_fmt yuv444p -i input.yuv -pix_fmt yuv420p output.yuv
yuv420p -> avi
ffmpeg -s 176*144 -pix_fmt yuv420p -i hall_qcif.yuv -vcodec mpeg4 out.avi