基本思想:跟这大佬学习视频,坚持记笔记,推动学完视频,yuv420sp=NV12
首先保证window11电脑上配置了ffmpeg库,可以在命令行使用,测试视频
链接: https://pan.baidu.com/s/1zmjCmgVxSjqPDXVmbr-ghA?pwd=ayeu 提取码: ayeu
一、使用ffmpeg将mp4视频转成yuv格式
先播放一下视频
G:\>ffplay sxj731533730.mp4
ffplay version 4.4-full_build-www.gyan.dev Copyright (c) 2003-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-shared --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --en