Fix Windows permissions access Issue while using 'ffmepg ffmplay' command. #846
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The widely reported "permissions" issues with "play" while using
ffmplay
player under windows is directly related to howNamedTemporaryFile
creates and deletes the temporal file, not allowing it to be accessed from a subprocess, which is what_play_with_ffplay
function does in the end.Also, the widely suggested workaround is to modify locally the "pydub" library to set the
NamedTemporaryFile
calldelete
parameter toFalse
.( No one should like to modify dependencies locally 😠 )
To avoid the need to modify the library code locally best approach is allow users to set this "delete" behavior on call.
As setting it to
False
will lead to non deleted temporal files left over it's interesting to let the user also choose the temporal folder to store them so he can deal with leftover temporal files later or whatever.Finally I documented the new two parameters specifying the will work only while using
ffmpeg
library.