###前提・実現したいこと
動画から物体の検出、追跡を行う
###発生している問題・エラーメッセージ
実行の際に以下のようなエラーが発生します。
2016-11-20 23:27:58.522 Python[56367:12147656] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[AVAssetWriterInput initWithMediaType:outputSettings:sourceFormatHint:] AVVideoSettings dictionary must specify a positive width' *** First throw call stack: ( 0 CoreFoundation 0x00007fffadc9d6fb __exceptionPreprocess + 171 1 libobjc.A.dylib 0x00007fffc2641a2a objc_exception_throw + 48 2 AVFoundation 0x00007fffaa39f140 -[AVAssetWriterInput dealloc] + 0 3 AVFoundation 0x00007fffaa39eacb +[AVAssetWriterInput assetWriterInputWithMediaType:outputSettings:] + 52 4 libopencv_highgui.2.4.dylib 0x00000001028ea132 _ZN26CvVideoWriter_AVFoundationC2EPKcid6CvSizei + 682 5 libopencv_highgui.2.4.dylib 0x00000001028e7dd3 _Z32cvCreateVideoWriter_AVFoundationPKcid6CvSizei + 69 6 libopencv_highgui.2.4.dylib 0x00000001028db848 cvCreateVideoWriter + 80 7 libopencv_highgui.2.4.dylib 0x00000001028dc24a _ZN2cv11VideoWriter4openERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEidNS_5Size_IiEEb + 58 8 libopencv_highgui.2.4.dylib 0x00000001028dc14b _ZN2cv11VideoWriterC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEidNS_5Size_IiEEb + 65 9 cv2.so 0x00000001020c322a _ZL32pyopencv_VideoWriter_VideoWriterP7_objectS0_S0_ + 561 10 Python 0x0000000101d2323d PyEval_EvalFrameEx + 27113 11 Python 0x0000000101d26f81 fast_function + 264 12 Python 0x0000000101d23159 PyEval_EvalFrameEx + 26885 13 Python 0x0000000101d1c65e PyEval_EvalCodeEx + 1617 14 Python 0x0000000101d1c007 PyEval_EvalCode + 48 15 Python 0x0000000101d3fa8c run_mod + 53 16 Python 0x0000000101d3fb2f PyRun_FileExFlags + 133 17 Python 0x0000000101d3f680 PyRun_SimpleFileExFlags + 702 18 Python 0x0000000101d50e1e Py_Main + 3094 19 libdyld.dylib 0x00007fffc2f1e255 start + 1 20 ??? 0x0000000000000003 0x0 + 3 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6 ###該当のソースコード ###試したこと ネットで調べましたが原因がわかりませんでした。 同じバージョン(macOS,opencv,python全て)の他のmacでは実行できます。 ###補足情報(言語/FW/ツール等のバージョンなど) MacOS Sierra OpenCV 2.4.13.1 Python 2.7.12
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/21 14:05