我想播放使用libVLC和OpenCV从IP摄像头(H264-codec)获得的视频文件,因此我从this post获取了代码,然后在VS中创建项目2010,并将我的mp4文件放入项目文件夹(“5.mp4”)。当我开始它 - 我得到这个错误:使用libVLC打开mp4并在OpenCV中播放C++
main error: open of `5.mp4' failed
main error: Your input can't be opened
main error: VLC is unable to open the MRL '5.mp4'. Check the log for details.
这里是我的代码:
#include
#include
#include
#include
using namespace cv;
using namespace std;
struct VideoDataStruct {
int param;
};
int done = 0;
libvlc_media_player_t *mp;
unsigned int videoBufferSize = 0;
uint8_t *videoBuffer = 0;
void cbVideoPrerender(void *p_video_data, uint8_t **pp_pixel_buffer, int size) {
// Locking
if (size > videoBufferSize || !videoBuffer)
{