I want to open the m4a audio file for analysis but I am getting this error.
File "E:\audio stego\code.py", line 5, in <module>
song = AudioSegment.from_file('E:\\audio stego\\03 VALNDALUM UMMODU.m4a')
File "C:\ProgramData\Anaconda3\lib\site-packages\pydub\audio_segment.py", line 728, in from_file
info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
File "C:\ProgramData\Anaconda3\lib\site-packages\pydub\utils.py", line 274, in mediainfo_json
res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 108, in __init__
super(SubprocessPopen, self).__init__(*args, **kwargs)
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 1311, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
The problem is that you haven't avconv installed or in your PATH
.
To install it, you can follow these steps:
https://github.com/jiaaro/pydub#getting-ffmpeg-set-up
If you're on windows, there are a few steps to add the folder to your PATH
:
mingw
versions if you don't know what they do)libav
folderCut
windows
key and your R
key at the same time%userprofile%
. Another window will openPaste
environ
and click on Edit system variables
.Environment variables...
. You find two panels: one with User Variables for [user]
and one with System Variables
.User Variables
panel, find the Path
variable and double-click it.New
and enter %USERPROFILE%\libav\bin
.Ok
on every window to close them.