You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These methods were created at #1332 and fdc51d2, but IMHO I think that are a misunderstanding of how copy.copy and copy.deepcopy works in Python.
coreader methods currently does a shallow copy (like copy.copy) but only taking into account filename parameter.
Clip.copy method is working like copy.deepcopy, but even for AudioClip the mask and audio attributes are checked in the instance.
Actual Behavior
The coreader functionality is not working. It's implemented as return AudioFileClip(self.filename, self.buffersize), but AudioFileClip accepts buffersize as a kwarg argument, so it's not taking the buffersize. The same applies to VideoFileClip.
The documentation of coreader methods are very poor, what are they supposed to do? I think that should be added an example, if they are really implemented and are not bad copy.copy-like code.
I'm not sure, are a failed copy, I'm thinking in two possible cases:
New instance with only filename as the same argument
New instance with filename and buffersize as same arguments
I suspect that are just weird copy code, and copy method should be used instead (ovewriting it in AudioClip to because a deepcopy in those are not needed).
Specifications
Python Version: 3.8.5
Moviepy Version: master
Platform Name: Ubuntu
Platform Version: 20.04
The text was updated successfully, but these errors were encountered:
mondeja
changed the title
'coreader' methods of 'VideoFileClip' and 'AudioFileClip' not working
'coreader' methods of 'VideoFileClip' and 'AudioFileClip' buggy
Jan 14, 2021
I have no opinion on the coreader methods. Feel free to scrap them, fix them, rename them, or implement proper copy methods if you like.
I've never used .coreader(), and I don't really know when I would.
mondeja
changed the title
'coreader' methods of 'VideoFileClip' and 'AudioFileClip' buggy
'coreader' methods of 'VideoFileClip' and 'AudioFileClip' are buggy
Jan 14, 2021
These methods were created at #1332 and fdc51d2, but IMHO I think that are a misunderstanding of how
copy.copy
andcopy.deepcopy
works in Python.coreader
methods currently does a shallow copy (likecopy.copy
) but only taking into accountfilename
parameter.Clip.copy
method is working likecopy.deepcopy
, but even forAudioClip
themask
andaudio
attributes are checked in the instance.Actual Behavior
The
coreader
functionality is not working. It's implemented asreturn AudioFileClip(self.filename, self.buffersize)
, butAudioFileClip
acceptsbuffersize
as a kwarg argument, so it's not taking thebuffersize
. The same applies toVideoFileClip
.The documentation of
coreader
methods are very poor, what are they supposed to do? I think that should be added an example, if they are really implemented and are not badcopy.copy
-like code.Steps to Reproduce the Problem
Expected behaviour
I'm not sure, are a failed copy, I'm thinking in two possible cases:
I suspect that are just weird copy code, and
copy
method should be used instead (ovewriting it inAudioClip
to because adeepcopy
in those are not needed).Specifications
The text was updated successfully, but these errors were encountered: