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

feature: dvr #14

Open
disconn3ct opened this issue Feb 26, 2022 · 2 comments
Open

feature: dvr #14

disconn3ct opened this issue Feb 26, 2022 · 2 comments

Comments

@disconn3ct
Copy link

disconn3ct commented Feb 26, 2022

Has anyone considered a basic dvr function? It looks like there is a spot in the (literal) pipeline where it has effectively standard mp4 video that could be diverted to a file as well as playback.

  • Connect USB storage, allow system to automatically mount it
  • When goggles attached, if usb storage is present, send it to a file as well as the player: | tee /storage/dvr-2220.mp4 |
  • During streaming, automatically run sync to flush the write cache periodically

Alternately:

  • OUTFILE=/dev/null
    • When storage is detected, OUTFILE=/storage/dvr-2221.mp4
  • Include | tee ${OUTFILE} | in the pipeline. This has a very minor performance cost for non-dvr playback, extraneously sending the stream to /dev/null
  • Still run the periodic syncs during streaming, which shouldn't impact except in dvr mode. (Ideally few/no writes should be going to the system device.)

In both approaches, closing the stream will automatically close the file. The periodic sync should defend (barely) against corruption on power-off, while still allowing a reasonable write cache. Corruption risks are primarily to the DVR storage, rather than the system volume.

I might hack something together if there is any interest. Having a second screen is huge for outreach where we fly but I don't want to lose my dvr

@sandstreamer
Copy link

+1

@cosmicc
Copy link

cosmicc commented Apr 29, 2022

I'm also going to hack together something to get it to at least dump the video out to a file. Let me know if you would like to get together on this.

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

3 participants