avcodec相关内容

使用快速同步h264_qsv编码器时,ffmpeg avcodec_encode_video2挂起

当我使用mpeg4或h264编码器时,我能够使用ffmpeg 3.1.0的API成功编码图像以制作有效的AVI文件.但是,当我使用快速同步编码器(h264_qsv)时,avcodec_encode_video2会挂起一些时间.我发现使用1920x1080的图像时,avcodec_encode_video2很少会挂起.使用256x256图像时,该功能很可能会挂起. 我创建了下面的测试代码,演示 ..
发布时间:2020-11-04 02:48:19 其他开发

了解视频帧中的PTS和DTS

当从avi转换为mp4(x264)时,我有fps问题。最终问题是PTS和DTS值,所以在av_interleaved_write_frame函数之前添加的第12-15行: 1。 AVFormatContext * outContainer = NULL; 2. avformat_alloc_output_context2(& outContainer,NULL,“mp4”,“c:\\t ..
发布时间:2017-10-23 22:11:49 其他开发

ffmpeg :: avcodec_encode_video设置PTS h264

我想使用libavcodec将视频编码为H264 ffmpeg :: avcodec_encode_video(codec,output,size,avframe) / code> 返回一个错误,我没有正确设置avframe-> pts值。 我试过设置它到0,1,AV_NOPTS_VALUE和90khz * framenumber,但仍然得到错误非严格单调的PTS ffmp ..
发布时间:2016-10-22 19:35:03 C/C++开发

avcodec YUV到RGB

我试图使用libswscale将YUV帧转换为RGB。 这是我的代码: AVFrame * RGBFrame; SwsContext * ConversionContext; ConversionContext = sws_getCachedContext(NULL,FrameWidth,FrameHeight,AV_PIX_FMT_YUV420P,FrameWidth, ..
发布时间:2016-10-19 21:46:40 C/C++开发