Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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.flv',cv2.cv.CV_FOURCC('I','4','2','0'),ttlframe,size)

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

no result...

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

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) 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.flv',cv2.cv.CV_FOURCC('I','4','2','0'),ttlframe,size)

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

no result...

click to hide/show revision 3
retagged

updated 2014-06-27 07:31:48 -0600

berak gravatar image

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

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.flv',cv2.cv.CV_FOURCC('I','4','2','0'),ttlframe,size)

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

no result...

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

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

is: import cv2

import cv2

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

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.flv',cv2.cv.CV_FOURCC('I','4','2','0'),ttlframe,size)

=cv2.VideoWriter('c:\Output.flv',cv2.cv.CV_FOURCC('I','4','2','0'),ttlframe,size)

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

success,frame=vidT.read()

no result...

result...

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

Please help me.. me... I'm using python2.7 in windows 7, my code is: 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.flv',cv2.cv.CV_FOURCC('I','4','2','0'),ttlframe,size)

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

no result...

no result..

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

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.flv',cv2.cv.CV_FOURCC('I','4','2','0'),ttlframe,size)
=cv2.VideoWriter('c:\Output.flv',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..

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

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.flv',cv2.cv.CV_FOURCC('I','4','2','0'),ttlframe,uk)
=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..

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

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..