VideoCapture Does Not Work in Anaconda

后端 未结 7 884
谎友^
谎友^ 2020-12-09 12:58

I am using ubuntu 14.04, and have anaconda python installed. I used conda install opencv and conda install cv2 to install opencv. However I am unable to use the VideoCapture

相关标签:
7条回答
  • 2020-12-09 13:41

    I found another way to get the video writer to work. I actually installed ImageMagik on my computer, and then I set the animation path to where I installed ImageMagik. I wonder if the same could be done for ffmpeg?

    plt.rcParams["animation.convert_path"] = "C:\ProgramFiles\ImageMagick\magick.exe"
    #Here I am loading a matplotlib.plot as the animation, so it could be different than for you, but the point is that by specifying the path to imagemagik I was able to write a video to a file.
    anim = animation.FuncAnimation(fig, animate, frames=len(mylist), init_func=init, interval=300, blit=True)
    anim.save('output.gif', dpi=80, writer='imagemagik')
    
    0 讨论(0)
提交回复
热议问题