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
This can be needed if we give a file descriptor as input to the from_file method, but for the common case where the input is a filename, it should be used without copying in a first temporary file
Your System configuration
Python version:
Pydub version:
ffmpeg or avlib?:
ffmpeg/avlib version:
Is there an audio file you can include to help us reproduce?
You can include the audio file in this issue - just put it in a zip file and drag/drop the zip file into the github issue.
The text was updated successfully, but these errors were encountered:
…m_file
Rename from_file to from_file_using_temporary_files just in case there's
any case in which the new from_file doesn't work (I couldn't find any,
but just in case, I guess it would be nice to keep it maybe as
deprecated).
Add a new from_file function that does all the reading on memory with
pipes, not using any temporary file, which is faster and doesn't wear
down disks for heavy usages.
The new from_file function reads the input file and passes it to ffmpeg
using a pipe and then reads ffmpeg output using another pipe directly
to memory.
Since wav files have the file length in the header and ffmpeg can't
write it since it's working on a stream, we modify the resulting raw data
from ffmpeg before reading it using the standard method.
Fixesjiaaro#237
Might also fixjiaaro#209
Steps to reproduce
AudioSegment.from_file()
Expected behavior
It should load the audio efficiently
Actual behavior
It copies all the audio to a temporary file, then converts the temporary file to wav in a second temporary file, then load the wav
pydub/pydub/audio_segment.py
Line 469 in c95b814
This can be needed if we give a file descriptor as input to the
from_file
method, but for the common case where the input is a filename, it should be used without copying in a first temporary fileYour System configuration
Is there an audio file you can include to help us reproduce?
You can include the audio file in this issue - just put it in a zip file and drag/drop the zip file into the github issue.
The text was updated successfully, but these errors were encountered: