小编asa*_*bah的帖子

写入文件时出现ffmpeg osx错误:"无法识别的选项'preset'.错误拆分参数列表:找不到选项

我有以下简单的Python代码:

yellow_output = 'test_videos_output/solidYellowleft.mp4'
clip1 = VideoFileClip("test_videos/solidYellowLeft.mp4")
yellow_clip = clip1.fl_image(process_image)
yellow_clip.write_videofile(yellow_output, audio=False)
Run Code Online (Sandbox Code Playgroud)

"process_image"函数只返回您提供的内容(为测试目的而创建).

在OSX 10.11.6上运行Python 3.5.4,ffmpeg 2.8.6

我收到错误:

OSError: [Errno 32] Broken pipe

MoviePy error: FFMPEG encountered the following error while writing file test_videos_output/solidWwhiteright.mp4:

 b"Unrecognized option 'preset'.\nError splitting the argument list: Option not found\n"
Run Code Online (Sandbox Code Playgroud)

视频文件未生成; 如何摆脱这个错误; 所以我可以生成MP4文件?

注意:相同的代码在Ubuntu 16.04上运行愉快

python ffmpeg moviepy osx-elcapitan

1
推荐指数
2
解决办法
1159
查看次数

C++需要一个中间变量来接受<vector <vector int >>中的迭代器

以下生成错误:

int main() {

  mat_int mat1(5, vector<int>{1,2,3});
  mat_int mat2(5, vector<int>{4,5,6});

  for (auto it1 = mat1.begin(); it1 != mat1.end() ; ++it1) {
        for (auto it11 =  *it1.begin(); it11 != *it1.end(); it11++)
            cout << *it11;
        cout << '\n';
    }
}
Run Code Online (Sandbox Code Playgroud)

编译器不接受内部循环迭代器; /home/asabbah/programming/C++/vectors1.cpp:16:28:错误:'class __gnu_cxx :: __ normal_iterator*,std :: vector >>>没有名为'begin'的成员

但是,如果我插入一个临时变量:

vector<int> temp = *it1;
Run Code Online (Sandbox Code Playgroud)

然后:

for (auto it11 = temp.begin(); it11 != temp.end(); it11++);
Run Code Online (Sandbox Code Playgroud)

一切顺利.

知道为什么会这样吗?

c++ pointers iterator c++11

-1
推荐指数
1
解决办法
66
查看次数

标签 统计

c++ ×1

c++11 ×1

ffmpeg ×1

iterator ×1

moviepy ×1

osx-elcapitan ×1

pointers ×1

python ×1