Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream to file leads to WinError 2 Exception #11

Open
osskar12 opened this issue Apr 20, 2021 · 1 comment
Open

Stream to file leads to WinError 2 Exception #11

osskar12 opened this issue Apr 20, 2021 · 1 comment

Comments

@osskar12
Copy link

Hi, i am trying to capture video on Python using the Ps3eye and pseyepy using this code:

from pseyepy import Camera,Stream
c = Camera()
s = Stream(c, file_name="test_movie.avi")

I got everything to work, using Display(camera) i can see the video, but the saving of the video using Stream results in the following exception:

Exception` in thread Thread-9:
Traceback (most recent call last):
File "C:\Users\osswa\anaconda3\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\Users\osswa\anaconda3\lib\site-packages\pseyepy\io.py", line 193, in run
ff = self.klass(timestamps=True, **mpm)
File "C:\Users\osswa\anaconda3\lib\site-packages\pseyepy\io.py", line 96, in init
self.proc = sp.Popen(self.cmd, stdin=sp.PIPE, stderr=sp.PIPE)
File "C:\Users\osswa\anaconda3\lib\subprocess.py", line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\osswa\anaconda3\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system can't find the specified file

No video file is created, but a test_movie_time_0.txt file is created in the folder of the python script.

I assume theres something wrong with my FFmpeg, but i cant find the issue. I set the system PATH variable to the FFmpeg\bin folder, and using the basic ffmpeg commands with already existing files works as well.

@osskar12
Copy link
Author

I still couldn´t solve this issue.

Could the reason be line 85 in io.py?

self.cmd =     ['/usr/local/bin/ffmpeg',
....
]

As far as i understand, '/usr/local/bin/ffmpeg' is a path in Linux, but i am using Windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant