2014-09-03 55 views
14

我正在使用X264 Fourcc編解碼器VideoWrite中斷ffmpeg錯誤。我已經安裝了所有依賴關係。如何解決此問題。我一直在使用的示例代碼如下。檢測到的破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 

推薦我要這的任何解決方案。

+1

實際的'ffmpeg'命令(如果使用cli工具而不是API)?什麼是實際的,完整的'ffmpeg'控制檯/日誌輸出? – LordNeckbeard 2014-09-03 16:45:35

+0

@LordNeckbeard我用控制檯日誌更新了我的問題,請看看這個 – Ramakrishna 2014-09-04 06:26:18

+0

如果可能的話,請顯示** complete **控制檯輸出和命令。 – LordNeckbeard 2014-09-04 16:33:50

回答

0

的錯誤:

[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 

,你可能需要在命令-vpre perset(例如-vpre快)。 也許你的libx264太舊了。 我在使用2014年製造的ffmpeg時遇到同樣的錯誤。