WebFaction
Community site: login faq

Hi,

I'm trying to create a basic video file using OpenCV (in Python). I have the following code, which runs without any errors, but I don't see the output file created. I was wondering if anyone had ideas as to what was going wrong.

 from cv import *
    im1 = LoadImage("/home/laptop1.jpg")
    im2 = LoadImage("/home/laptop2.jpg")

    writer = CreateVideoWriter("/home/out.avi", CV_FOURCC('M', 'J', 'P', 'G'), 2.0, (im.width, im.height))                                           
    WriteFrame(writer, im1)
    WriteFrame(writer, im2)

Thanks!

asked 25 Apr '11, 16:36

iman453
491527
accept rate: 0%


Hi,

I personally have no experience with OpenCV but according to: http://mathnathan.com/2010/07/18/error1/

The problem could be using one of the codecs not supported by OpenCV.

You can see the above URL for more help.

Hope that helps!

permanent link

answered 25 Apr '11, 21:35

neeravk
1.5k3412
accept rate: 41%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×108

question asked: 25 Apr '11, 16:36

question was seen: 3,611 times

last updated: 25 Apr '11, 21:35

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM