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

Save videos directly to the filesystem (electron-only) #1358

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rafaellehmkuhl
Copy link
Member

@rafaellehmkuhl rafaellehmkuhl commented Sep 23, 2024

This PR changes the behavior of the Electron-based application.

Instead of saving the video chunks, video files and telemetry logs to the IndexedDB, we now save them directly to the filesystem.

The main advantage for the user is that it stops risking losing videos on a browser cache cleanup, which was the main cause of video loss. As a side-effect, the user has also the video files directly on their machine, without the need to download them, keeping everything always organized and in sync.

Kapture.2024-12-11.at.05.21.07.mp4

The implementation is done over the renderer/main IPC system, so we don't leave unnecessary filesystem permissions for the client, making everything safe.

Fix #1292.

@rafaellehmkuhl rafaellehmkuhl force-pushed the video-on-filesystem branch 4 times, most recently from 23b0794 to 5ecff0a Compare September 23, 2024 21:30
@rafaellehmkuhl rafaellehmkuhl force-pushed the video-on-filesystem branch 5 times, most recently from f31bfea to 53fa3e4 Compare November 7, 2024 18:30
@rafaellehmkuhl rafaellehmkuhl force-pushed the video-on-filesystem branch 4 times, most recently from c21cbe7 to 461da63 Compare November 29, 2024 22:25
@rafaellehmkuhl rafaellehmkuhl force-pushed the video-on-filesystem branch 8 times, most recently from c22259b to fa42f76 Compare December 10, 2024 20:12
When the extension was unknown, the video file was being generated with two dots in the end (e.g.: 'video..webm'). This also created a side-effect of the system not being able to find the correspondent telemetry logs and leaving them behind when clearing the videos.
For that an abstraction layer was created. It coordinates the usage of the IndexedDB for the browser version and the filesystem for the Electron version.
@rafaellehmkuhl rafaellehmkuhl marked this pull request as ready for review December 12, 2024 17:19
@rafaellehmkuhl rafaellehmkuhl changed the title [WIP] Save videos directly to filesystem (on Electron version) Save videos directly to filesystem (on Electron version) Dec 12, 2024
@rafaellehmkuhl rafaellehmkuhl changed the title Save videos directly to filesystem (on Electron version) Save videos directly to the filesystem (electron-only) Dec 12, 2024
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.

Support recording videos to the filesystem instead of the browser DB
1 participant