V4l2 ---> yuv ---> h264

将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);

猜你喜欢

转载自www.cnblogs.com/dong1/p/10853136.html