0

I have this segment of code

clip.write_videofile("tempClip.mp4")
mySegment = AudioSegment.from_file("tempClip", "mp4")

and I get this error

File "c:/Users/User/Desktop/myProgram.py", line 60, in <module>
    timeStamps = get_time_stamps(path)
  File "c:/Users/User/Desktop/myProgram.py", line 37, in get_time_stamps
    mySegment = AudioSegment.from_file("tempClip.mp4", "mp4")
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pydub\audio_segment.py", line 685, in from_file
    info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit)
  File "C:\Users\User\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pydub\utils.py", line 274, in mediainfo_json
    res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

I'm not sure what file it is referring to. Does it mean "tempClip.mp4" or is it in a library I am using. The program work on Linux Mint 19, just not on Windows.

0 Answers0