Ffmpeg 在avformat\u open\u输入中覆盖视频编解码器
我一直在尝试使用Ffmpeg 在avformat\u open\u输入中覆盖视频编解码器,ffmpeg,Ffmpeg,我一直在尝试使用avformat\u open\u input选择一个特定的视频解码器,如下所示(为简洁起见缩短): AVDictionary*options=NULL; 如果(解码器名称覆盖){ AVCodec*解码器覆盖=AVCodec按名称查找解码器(解码器名称覆盖); av音频集(&选项,“视频编解码器”,解码器覆盖,0); } avformat\u open\u输入(&stream->format,url,NULL,&options); 不幸的是,这似乎不起作用。这是使用特定解码器强
avformat\u open\u input
选择一个特定的视频解码器,如下所示(为简洁起见缩短):
AVDictionary*options=NULL;
如果(解码器名称覆盖){
AVCodec*解码器覆盖=AVCodec按名称查找解码器(解码器名称覆盖);
av音频集(&选项,“视频编解码器”,解码器覆盖,0);
}
avformat\u open\u输入(&stream->format,url,NULL,&options);
不幸的是,这似乎不起作用。这是使用特定解码器强制FFmpeg的正确方法吗?您是否查看了上的示例?