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

Allways save the video as mp4 file? #65

Open
lovechang1986 opened this issue Mar 27, 2021 · 3 comments
Open

Allways save the video as mp4 file? #65

lovechang1986 opened this issue Mar 27, 2021 · 3 comments
Labels

Comments

@lovechang1986
Copy link

Hi,
How can I save the video as mp4 file while stream?

Here change the thread not pause and save the frame to a file allways?

# if there hasn't been any clients asking for frames in
# the last 10 seconds then stop the thread
if time.time() - BaseCamera.last_access > 10:
   frames_iterator.close()
   print('Stopping camera thread due to inactivity.')
   break
@miguelgrinberg
Copy link
Owner

This project uses Motion-JPEG streaming. Nothing to do with mp4. To write an mp4 file you have to use an encoder such as ffmpeg.

@lovechang1986
Copy link
Author

Thank you for rapid reply..
It's fine for not save frame to MP4, just a single jpg file.

My point is if I want to save the frame, modify the _thread function?

@miguelgrinberg
Copy link
Owner

I guess you can try it to see if it works?

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

No branches or pull requests

2 participants