Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/opencv/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 从图像写入视频时未找到OpenCV:FFMPEG:tag_Python_Opencv_Video_Ffmpeg - Fatal编程技术网

Python 从图像写入视频时未找到OpenCV:FFMPEG:tag

Python 从图像写入视频时未找到OpenCV:FFMPEG:tag,python,opencv,video,ffmpeg,Python,Opencv,Video,Ffmpeg,我试图在Python和Ubuntu 14.04中使用图像编写视频,但出现以下错误: OpenCV:FFMPEG:tag0xffffffff/'����' 找不到(格式为“mp4/mp4 (MPEG-4第14部分)“ 下面列出了我正在使用的代码 import cv2 img = cv2.imread("image.png") height , width , layers = img.shape video = cv2.VideoWriter('video.mp4',-1,1,(width,he

我试图在
Python
Ubuntu 14.04
中使用图像编写视频,但出现以下错误:

OpenCV:FFMPEG:tag0xffffffff/'����' 找不到(格式为“mp4/mp4 (MPEG-4第14部分)“

下面列出了我正在使用的代码

import cv2
img = cv2.imread("image.png")
height , width , layers =  img.shape
video = cv2.VideoWriter('video.mp4',-1,1,(width,height))
video.write(img)
cv2.destroyAllWindows()
video.release()

你解决了这个问题吗?还想知道你是否找到了解决这个问题的方法