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

Added a check to make sure ffmpeg is installed before processing media streams #115

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nikitiuk0
Copy link

@nikitiuk0 nikitiuk0 commented May 14, 2024

I was getting a quite annoying error inside an infinite loop about ffprobe. I am not very familiar with ffmpeg tool, so it took me a couple of hours to realize that I didn't have ffmpeg on my laptop. This check should clarify the problem before trying to parse media stream.

...
Downloading ./videos/2024-05-13 05_03_30-2024-05-13 05_04_46.mp4...
[Errno 2] No such file or directory: 'ffprobe'
Warning: Could not calculate length from stream.
Downloading ./videos/2024-05-13 05_03_30-2024-05-13 05_04_46.mp4...
[Errno 2] No such file or directory: 'ffprobe'
Warning: Could not calculate length from stream.
Downloading ./videos/2024-05-13 05_03_30-2024-05-13 05_04_46.mp4...
[Errno 2] No such file or directory: 'ffprobe'
Warning: Could not calculate length from stream.
...

It will return the following error with this check if ffmpeg is not installed:

Traceback (most recent call last):
...
  File "/Users/.../pytapo/media_stream/downloader.py", line 110, in download
    convert = Convert()
              ^^^^^^^^^
  File "/Users/.../pytapo/media_stream/convert.py", line 21, in __init__
    raise Exception('ffmpeg is not installed')
Exception: ffmpeg is not installed

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

Successfully merging this pull request may close these issues.

1 participant