BobStrogg / teslacam-browser

A very simple TeslaCam browser
Creative Commons Zero v1.0 Universal
237 stars 32 forks source link

Feature Request: Play on click, Autoplay, Jump to event #33

Open jmtatsch opened 5 years ago

jmtatsch commented 5 years ago

Hello Chris,

First of all, thank you for this wonderful piece of software.

I have three tiny ideas how to improve the reviewing efficiency of recordings even further:

1) If you click an event time start the video playback automatically. Saves one click.

2) After one event playback has ended automatically start the next event playback. This could potentially be toggled with an "autoplay" switch like the "combine clips" switch. Saves two clicks.

3) Apparently the event that triggers writing the recording starts at the 8th minute of the 10 minute recording. It would make sense to mark that position on the timeline or even start playback from there. This should save a ton of time and you can always scrub back to get more temporal context from the pre-event recording if necessary.

mitchcapper commented 5 years ago

Agreed software looks great (haven't been able to test due to current firmware issue and negative time offset). I hope(assume) tesla will fix shortly, but if not may look into doing a command line tool to fix.

Checkboxes for these things does seem like good additions.

I would add a current time offset to the progress bar and total length (looking at the code these things are already known).

3) this requires more discussion. Not all video clips are 10 minutes long with inciting events seemingly happening earlier. Can you provide any documentation for the 8 minute idea? I would agree on some clips but other 10 minute clips it doesn't seem to line up. If there was a specific predictable offset we could potentially try to get a few frames of the action and show these optionally above the video. This would allow for potentially quickly deciding what the trigger is. Doing this in a browser is possible, would want to write a helper function to get a JPEG from a video at an offset but: https://stackoverflow.com/questions/13760805/how-to-take-a-snapshot-of-html5-javascript-based-video-player seems to outline the way to do so.

I will try to work on the timeline/autoplay there is agreement and do a PR, although it will require the next firmware update to come down so I have videos to test with.

mitchcapper commented 5 years ago

Looking at how some other projects do detection like: https://sentrycam.appspot.com/ if the event seems healthy (10 or 11 video files per camera) then it uses the time offset. Following the timestamp/offsetting is a bit convoluted but it seems to jump to the second to last file (so the 8 minutes) but will investigate further for success.