extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}
int main(int argc, char* argv[]){
AVFormatContext* pFormatCtx;
AVOutputFormat* fmt;
AVStream* video_st;
AVCodecContext* pCodecCtx;
AVCodec* pCodec;
uint8_t* picture_buf;
AVFrame* picture;
AVPacket pkt;
int y_size;
int got_picture=0;
int size;
int ret=0;
FILE *in_file = NULL; //YUV source
int in_w = 1920, in_h = 1
使用ffmpeg将YUV420P图像压缩到jpg图片
最新推荐文章于 2024-06-26 15:14:58 发布
本文介绍如何使用ffmpeg库将YUV420P格式的图像转换为JPEG图片,内容主要参照StackOverflow上的相关解答。
摘要由CSDN通过智能技术生成