将yuv数据转换为h264
https://github.com/sking12345/yuvToh264
V4l2 capture the YUV image and then use x264 encoding into h264
https://github.com/licaibiao/v4l2_yuv_h264
写h264数据帧到文件,需要加数据头到文件才能播放
char nal_start[]={0,0,0,1};
fwrite(nal_start,4,1,fp);
fwrite(pkt->data+4,pkt->size-4,1,fp);
fclose(fp);