Read frame from .flv video and write it to .avi video, doesn't work, need help

asked 2014-06-27 07:19:25 -0600

Shiloh gravatar image

updated 2014-07-01 11:40:58 -0600

Please help me... I'm using python2.7 in windows 7, my code is:

    import cv2

    vidT    =cv2.VideoCapture('c:\Users\Shiloh\Downloads\MYOS.flv')
    ttlframe=vidT.get(cv2.cv.CV_CAP_PROP_FPS)

    uk      =(int(vidT.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)),int(vidT.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT)))
    vidC =cv2.VideoWriter('c:\Output.avi',cv2.cv.CV_FOURCC('I','4','2','0'),ttlframe,uk)

    success,frame=videoCapture.read()
    while success:
        vidC.write(frame)
        success,frame=vidT.read()

no result..

I'm searching in google, and try to copy all file inside c:\opencv\3rdparty\ffmpeg to c:\python, and it works.. I have video result output.avi, but the next problem is the size is 0 byte..

edit retag flag offensive close merge delete