convert H264 video to raw YUV format

十年热恋 提交于 2019-12-03 04:14:36

问题


Is it possible to create a raw YUV video from H264 encoded video using ffmpeg? I want to open the video with matlab and access Luma, Cb and Cr components frame by frame.


回答1:


Yes you can, you just have to specific the pixel format. To get the whole list of the format:

ffmpeg -pix_fmts | grep -i pixel_format_name

For example if you want to save the 1st video track of an mp4 file as a yuv420p (p means planar) file:

ffmpeg -i video.mp4 -c:v rawvideo -pix_fmt yuv420p out.yuv


来源:https://stackoverflow.com/questions/20609760/convert-h264-video-to-raw-yuv-format

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!