convert H264 video to raw YUV format

后端 未结 1 527
遥遥无期
遥遥无期 2021-01-31 17:05

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条回答
  •  无人及你
    2021-01-31 17:58

    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
    

    0 讨论(0)
提交回复
热议问题