
FFmpeg
Kayee2012
这个作者很懒,什么都没留下…
展开
-
【FFmpeg】 图像缩放
在用FFmpeg时遇到需要将截屏的图像(1920*1080)转换为 1024*768的问题。//截屏的编码上下文 //假设这里视频截图分辨率为1920*1080AVCodecContext *pVideoCodecCtx = m_pVideoFormatCtx->streams[nVideoIndex]->codec;......//输出的编码上下文AVCodecConte...原创 2018-04-10 14:43:28 · 2528 阅读 · 0 评论 -
【FFMPEG】打印 av_log 的输出
在使用FFMPEG库的时候,如果有使用上的错误,FFMPEG 通过av_log 可以打印相应的消息到标准输出里。但有时候我们并没有标准输出,那么这个时候应该怎么处理呢? 方法:使用 av_log_set_callback 获取 av_log的打印输出。 示例如下:void Init(){ ... av_log_set_callback(&FFMPEG_Callba...原创 2018-07-05 16:50:01 · 2788 阅读 · 0 评论 -
【FFMPEG】"width / height not divisible by 2" 解决方法
出现该错误的原因是在于:视频的宽度必须是32的倍数,高度必须是2的倍数解决方法: if (screen_width % 32 != 0) { screen_width = screen_width / 32 * 32; } if (screen_height % 2 != 0) { screen_height = screen_height / 2 * 2; }...原创 2018-07-05 16:58:07 · 7709 阅读 · 1 评论