我在使用X264 Fourcc编解码器进行VideoWrite时遇到了ffmpeg错误,导致程序崩溃。我已安装所有依赖项,如何解决这个问题?以下是我正在使用的示例代码。
VideoWriter oVideoWriter ("path.mp4", CV_FOURCC('X','2','6','4'), 15, frameSize, false);
操作系统:Ubuntu 14.04 64位
控制台错误:
[libx264 @ 0x8d6220] broken ffmpeg default settings detected
[libx264 @ 0x8d6220] use an encoding preset (e.g. -vpre medium)
[libx264 @ 0x8d6220] preset usage: -vpre <speed> -vpre <profile>
[libx264 @ 0x8d6220] speed presets are listed in x264 --help
[libx264 @ 0x8d6220] profile is optional; x264 defaults to high
Could not open codec 'libx264': Unspecified errorOpenCV Error: Unsupported format or combination of formats (Your version of Gstreamer doesn't support this codec acutally or needed plugin missing.) in CvVideoWriter_GStreamer::open, file /home/mbox140/Development/opencv-2.4.9/modules/highgui/src/cap_gstreamer.cpp, line 518
terminate called after throwing an instance of 'cv::Exception'
what(): /home/mbox140/Development/opencv-2.4.9/modules/highgui/src/cap_gstreamer.cpp:518: error: (-210) Your version of Gstreamer doesn't support this codec acutally or needed plugin missing. in function CvVideoWriter_GStreamer::open
请为我提供任何解决此问题的方案。
ffmpeg
命令是什么? 实际的完整ffmpeg
控制台/日志输出是什么? - llogan