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

Some videos (without audio) fail to extract #14

Closed
emcf opened this issue Apr 29, 2024 · 0 comments · Fixed by #15
Closed

Some videos (without audio) fail to extract #14

emcf opened this issue Apr 29, 2024 · 0 comments · Fixed by #15
Labels
bug Something isn't working

Comments

@emcf
Copy link
Owner

emcf commented Apr 29, 2024

error 'NoneType' object has no attribute 'write_audiofile' occuring on line video.subclip(start_time, end_time).audio.write_audiofile(audio_path, codec='pcm_s16le')

Could probably fix with a simple none check

audio = video.subclip(start_time, end_time).audio
if audio is None:
  transcription = None
else:
  audio.write_audiofile(audio_path, codec='pcm_s16le')
  ...
@emcf emcf added the bug Something isn't working label Apr 29, 2024
@emcf emcf linked a pull request Apr 29, 2024 that will close this issue
@emcf emcf closed this as completed in #15 Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant