555 points · by jasonjmcghee · 2y ago · 196 comments
Note: Relies on Apple Silicon, and configured to only produce Apple Silicon builds.
I think the idea of recording everything you see has the potential to change how we interact with our computers, and believe it should be open source.
Also, from a privacy / security perspective, this is like... pretty scary stuff, and I want the code open so we know for certain that nothing is leaving your laptop. Even logging to Sentry has the potential to leak private info.
Also, the the sense of being back in that time seeing details that I otherwise probably would’ve forgotten was transformative.
In a similar vein to what you’ve done, but focusing specifically on web browsing, I’ve created a tool called ‘DownloadNet.’ It archives for offline use and fully indexes every page you visit. Additionally, it can be configured to archive only the pages you bookmark, offering another mode of operation. It’s an open-source tool, so feel free to check it out: https://github.com/dosyago/DownloadNet
If you take your work very seriously, I can see it being valuable to record it like athletes do. It would be tempting to use this on the “most important” days or when you’re “really ready”. At the very least, there’s a burden of choice and memory. I don’t know about security implications, but it seems valuable to randomly record a day per month and send it to yourself a week later. Or in the case of this tool, select some period for extra review.
After reviewing a few days I learned to start focusing on one thing at a time.
It was cringeworthy to see how ineffective multitasking by switching between a few tasks was.
Oh, I also made a tool to do this! Never open-sourced, since it’s an utter pain to set up and the UX is terrible, but amazingly useful all the same.
Incidentally: how does DownloadNet work? My tool uses a browser extension to send the full-text of each webpage to a server, but yours doesn’t seem to have a corresponding extension, so I can’t see how it would retrieve the text.
I love this API for almost everything browser related. I built my RBI product atop this (BrowserBox: https://dosyago.com), and I think it's a drastically underrated API.
Also, it works out of the box in Edge, Brave, Chromium, and many parts of CRDP are supported by Firefox and Safari^1
1: See for example: https://github.com/WebKit/webkit/tree/main/Source/JavaScript...
It used to be "local by default" but now I think that might be changing to "local if you want".
They have also in the past been a perfect creator of commercial software as far as I know:
- generous free edition
- paid versions work forever with its current feature set
I typically set it to auto delete after 14 days and disallow screenshots from my ordinary browser (because meetings and passwords), Slack and Teams (meetings) etc.
Turns out, on my slow computer it was faster to clean up a megabyte of HTML with regular expressions before giving it to Firefox than just rendering it as-is - by about 30 seconds per search result page.
Perhaps it's possible to sanitize often visited websites with DownloadNet? (currently getting aggravated by reddit hiding images via JS code to prevent download / viewing in another tab...)
Many years ago, I remember using a utility called: privoxy, on Linux/Unix, for that very purpose. No idea if it’s still viable, but thought I’d mention it, in case you’re serious?!
If you're passionate enough you could contribute a write-up, some code sketch or even a full PR of how this works. I'm sure you're probably too busy for that, or just not interested, and that's OK. I really appreciate the contribution you've already made with this idea.
I think allowing folks to filter, or sanitize (for whatever purpose really, sanity, focus, etc), sounds very useful.
Thanks! :)
Where did everything else go? This ran and disappeared like a miner.
the localhost:22120 didn't load anything.
I wrote a PNG DB to split PNG images into many blocks and have each block stored in a DB. If there are several equal blocks, it is only stored once. Via a hash table, the lookup for such blocks is made fast. With this PNG DB, I have a compression rate of about 400-500%. https://github.com/albertz/png-db
Some of the scripts I used to analyze the screenshots are here, but in the end, it was not really so successful and reliable: https://github.com/albertz/screenshooting
In the end, that lead to another project, where I just was storing that information more directly, i.e. what application was in the foreground, what file was open. https://github.com/albertz/timecapture
https://github.com/kaetemi/second_capture/blob/master/second...
Tesseract?
What was the performance (of the OCR) like?
I had a poor man's version of this with TimeSnapper Classic, a free Windows utility that takes a screenshot every n seconds then lets you view a timelapse at the end of the day to show how you spent your time.
After a few weeks my disk was starting to fill up with screenshots. I browsed the folders and noticed that most of the screenshots looked almost identical. "I should come up with some kind of image codec optimized for image sequences, that diffs against the previous image to save space." Then realized I had basically reinvented GIF / video codec haha. So I wrote a script to shove the timestamp (filename) into the image itself (with ImageMagick), and convert them to video with ffmpeg. 99.9% size reduction!
This looks a lot more useful though.
Really puts things into perspective.
Is there a tool recording your browsing behavior. That would be smth I'd try for starters :D
I use singleFile ( browser extension) - saves a copy of every webpage I view on Chrome and FireFox. I use a program AutomaticScreenshotter to record my screen activity to capture other non browser activity. Enables me to work what I was doing on my PC at any past date. All files are saved in a Year/month/day dir structure. Finding stuff - use windows search at present.
I also use ditto to save all copy and pastes in a mysqldb.
I've been doing this since before 2010 ( the dir structure) THe extensions and screengrabs , only started that about 3-4 years ago.
I've often wonder if forensic PC investigation tools would /could also be used ( my with some mods to help produce a PC timeline of my activity.
Just curious, what is relying on apple silicon?
I also don't understand the chatGPT component, and what it is trying to tell him. Though I'm sure if you just threw the URL and the screenshot to chatGPT, you could ask it questions about that source.
I'm not sure how useful this is tbh, or how I would use it. I'm not saying it isn't useful, just that I'm not sure how I would use it, or why it is useful.
> I also don't understand the chatGPT component You give it context from the "recording" and it answers questions you give it with that context info.
But if you / someone can get it to be efficient enough, awesome!
I wouldn't be surprised if the battery issue is problematic, likely will result in at least some kind of battery life reduction, but perhaps not 30 or 50% at 0.5fps.
I haven't looked into the code, but if you're running ffmpeg, then battery life will likely take a hit depending on what exactly you're doing. Video encoding _can be_ heavy on the CPU/GPU.
At such slow rates you don't need to create video - you just keep the individual images.
OCR doesn't need to be real-time, but can be done in batch mode or when the machine is idle.
I've been curious how Rewind worked under the hood because I've been playing with an idea in my head: an AI assistant that helps you protect your attention.
You would describe the kind of content that you consider a distraction, and any other constraints you have (e.g. "Don't let me watch cat videos unless I'm on a break".
And whenever it sees you watching anything that fits your prompt, it'll pop up on the screen and start a conversation with you to try and understand whether you actually need to consume the content you're looking at.
An AI that intervenes when you're going off track (based purely on how YOU define going off track). Current website blocking approaches aren't useful because they're all-or-nothing. I don't ever want to block entire sites because often there's useful content there relevant for my work. I want to block content on a much more granular level.
And I'd love for an "attention audit" at the end of each day. Attention is our most valuable asset, and I believe protecting it is a worthwhile endeavor... I'd just like some help doing so :).
Might be worth checking out Ollama and bakllava. https://ollama.ai/library/bakllava
Maybe the model is a bit too slow, but I'm sure smaller ones will come out soon. You can likely fine tune to do exactly what you need.
I'd love to better understand the problems you're facing that makes you want to use a tool like this.
Couldn't find your email, but if you're interested in chatting, you can find mine in my bio. Would appreciate it!
I wonder if the screenshots can easily be categorized as "time wasting" vs "productive" (possibly via ML model?). Could optionally gamify statistics. Example last hour: 78% productive, 12% hacker news, 10% inactive. You could go for your own high score (e.g. 3 x 100% hours in a day would probably be a great day for me!).
PS: love the video demo. I figured out what this does in < 30 seconds. Thank you!
PPS: (very tangental) video speed controller (browser addon) now works with loom videos - a few months ago that wasn't the case.
It even already does the "high score" thing you are talking about, LOL
They will be very upset
Find the latest flashy thing on Twitter / GitHub, spin it up with a waitlist, then send a16z your deck.
let configuration = ImageAnalyzer.Configuration([.text])
let nsImage = NSImage(cgImage: image, size: NSSize(width: image.width, height: image.height))
let analysis = try await ImageAnalyzer().analyze(nsImage, orientation: CGImagePropertyOrientation.up, configuration: configuration)
let textToAssociate = analysis.transcript
let newClipboardText = ClipboardManager.shared.getClipboardIfChanged() ?? ""It's like law enforcement tracking everything we say. They aren't catching many people right now, but wait until the future when they start working backwards with logs.
i often do things like
history | rg ..
it helps when you roughly know what you want to find, but want to check some detail you forgot
I debounce the livetext analysis on history so you should be able to spin fast without issue
- takes screenshots every two seconds - records all the text via ocr - builds full text search with sqlite - allows you to go back in time however far and select/copy text from there
No meeting recording / audio recognition. Kinda irks me. Easy to add though.
https://help.rewind.ai/en/articles/7791703-ask-rewind-s-priv...
Would be even more amazing with a locally running LLM
I have tried Rewind in alpha/beta, it was cool, but it was never something I felt like I needed. That being said things change, and maybe I'll change my mind when it's part of the OS in a seamless way, but it's sketchy for as long as it's not offline: let alone the privacy consequences of running Rewind ;)
On a more serious note, I wonder if such tools hinder creativity. By not remembering things directly, one could build the habit of relying on such tools for everything. Given creativity is the ability to recombine past memories into future ones...
This would inevitably end up ingesting secrets, right? Like say from my password manager? Or API keys in my terminal?
Lots of ways for this to go sideways even if the data stays local.
What’s the plan there?
Could you name some?
Couple things -- 1) Do you ever plan on introducing shortcuts to toggle rem as opposed to using the menu-bar option?
2) What's storage like? Will rem's size keep getting larger and larger until I purge all? Or will I eventually get to select how long I want to 'remember' something (without manually having to 'start' and 'stop')?
3) One bug I've caught a few times is - once I toggle timeline and just slide back to view previous 'memories', >50% of the time my device won't let me exit out of the 'timeline' and I'll have to exit out of rem (cmd+opt+esc) and re-open it.
But all in all, very happy with this!
I don't know if I am a basic programmer or lack the idea on how do folks go build something like this from scratch with no Swift programming language. If I was OP, I would first do bunch of Swift tutorials.
This will be wishful thinking but it is a legitimate side project to make a clone of this to work on Linx oe WIndows on programming language I am most comfortable in, Java and C#. I have zero background in building anything in ML and not at all familiar with Direct X api or Linux Desktop API or Direct X.
The point I am trying to make is there is crap ton of API and tools to be familiar with before even taking the step to code.
How did OP crack this with no exp in Swift to build this? Is it simplar to build project on Apple Silicon and I should get one?
Mind you, I have 4 YOE and code in Java and C# doing vanilla web API and bit of WinFoem/DevExpress work.
As for being able to hack in Swift specifically... I'm comfortable in 5-6 languages, and play with many more. The language itself feels like a mix of C# and Kotlin to me. But I had no familiarity with Mac OS APIs or SwiftUI / MVVM etc. but there's lots of docs, despite them having effectively no examples.
The repo has a lot of room to grow in terms of quality, which is perfectly ok in my book.
Re: Apple Silicon - I should have just said "I built it on my laptop which is an M1 Air and it's managing to keep up with the screenshot -> OCR -> ffmpeg rendering pipeline and not completely drain the battery and have a strong suspicion it will require a lot more work to get it to perform the same on Intel computers"
As for clone it and build it in Linux / Windows - do it. And there are other comments here suggesting others want to do the same.
I personally want this thing, if I can impact speed of it happening positively, awesome.
I want to record everything and have this nice big dataset which is what I've experienced (on my laptop) the last X amount of time, and be able to do stuff with it - whether it's chat with a local llm or have a really good way to search back in time. I _constantly_ need things from the past.
Someone else has previously looked into how Rewind.ai may be doing its thing under the hood and there are more details about it here: https://kevinchen.co/blog/rewind-ai-app-teardown/ OP may have used some of the info there.
As for OCR on Windows, there seems to be that functionality available on an OS level: https://medium.com/dataseries/using-windows-10-built-in-ocr-...
There's a Power Toy that uses it, which is where I found out about it. I have no idea how it compares to Live Text or how good it is.
As for storage what is the plan/expectation for preventing the DB from blowing up? After running the app for 30 minutes the DB was 32mb in size. Not huge but over a days worth (16hrs) or so of solid use it begins to creep up (~1gb).
(32mb * 2) * 16 = ~1gb/day
Not sure how this would be feasible over the course of a year or even several months.
I myself am really bad at documenting findings while doing research or bugfixing so I started at recording all my daily activities for both replaying research sessions and also for my future me in case something is not clear in the docs.
Then I knew rewind and I was happy to know that I am not alone. This REM is the confirmation that this definitely has great use cases :)
I’d rather prefer the recording phase to be as lightweight as possible so I am recording the full mp4 video and plan to re-encode at a lower rate at night. But there is a compromise between recording quality and file size, I do not want end up with several Petabytes of videos.
What codec do you recommend for this use case? Lossy video codecs usually are very efficient for real images (just like the comparison between jpg/png) and I am sure a video format that is PNG based should be more efficient in space while preserving text quality.
I am very interested in read your thoughts about this.
rem does OCR in memory before streaming to ffmpeg. But it works on the screen grabs of the video anyway.
Yeah, it's a pretty different use case than other video. Curious too if there are "screen recording optimized" codecs.
Like non-contiguous diffing. Instead of "diff from last frame", "diff from frame X"- and/or some sort of quad tree hash lookup
- Insanely useful with some changes.
- Needs local llama support for privacy.
- Needs pause/record functionality, ideally w/ preset exclusions, again privacy.
- If this could evaluate in real time at some point and start intelligently adding value at that point it has the chance to change things.
My guess is that in 10 years this will seem absolutely archaic. Now, it feels a bit like magic.
As far as real time stuff and local llama- absolutely, on the roadmap.
I’ve been exploring / experimenting with embedding spaces and local models a lot.
I recently switched to MacOS, and I'm missing this very much.
I have been considering the idea of using a similar app to this (or rewind.ai), but I have the concern that it might aggravate my situation. Just imaging my checking self watching 12 hours of video footage already gave me chill.
I would appreciate if anyone with a related or similar situation can share their experience using those apps. Since this is fairly sensitive, my email is also in the profile if anyone want to contact me directly.
If this application monitors, stores and analyses social media presence, email, etc. Could the application present to the user a profile similar to what Google has for the user?
For example, would be interesting to know how Spotify or Netflix sees me in technical and/or social terms.
This idea for such application comes from Yuval Harari.
I'm just wondering how you manage the limitation of context length.
The last 15 frames.
It's a terrible approach! But I had to start somewhere. Actively experimenting with properly leveraging embedding search.
But I've had a hard time finding CPU + RAM efficient vector indexing + search that meets my expectations. Been doing a lot of personal experimentation and research in this space.
Is there a known approach to be able to maintain a large embedding space that you can insert into efficiently and search accurately without needing to load / maintain the entire thing into memory?
Eventually I had to stop because the fan was going crazy, plus I couldn't bear seeing how slow and error-prone I was at typing and at generally operating the computer (it never felt that way when I'm using the computer, but watching myself using it is a different story)
and totally. Haven’t added direct local interaction yet, but on the roadmap.
If anyone has any suggestions, I'd be more than grateful.
Maybe once we actually add support for interacting with local llms directly.
If that’s a WIP or even just on the ToDo list, you could post a request to that subreddit asking if anyone is interested in helping implement it. That’s not too spammy, and you’ll get reply notifications you wouldn’t see if I posted it.
- how much disk storage does this use, say per hour of typical computer use
- how much CPU/battery life impact does it have
But - I built it in a few days and haven't spent time on optimization. This can be clearly seen in the binary size too. First build I released was 165MB, and after I took a step back, fixed the build process, and built a custom build of ffmpeg, it's now 3MB. Seeing as Rewind is a 211MB dmg, they aren't doing a ton of optimization either, so I think there's tons of room for improvement.
Purpose for doing this would be to get a database I can search/query when I kind of know what I'm looking for, but I cannot remember exactly what it was. Being able to query "show me all websites I've never visited before, but visited first time in week 35" would help me a lot to find those easier.
Also just having a recorded log of everything I'm doing would be helpful to see where I'm spending my time the most.
This kind of approach the only way I know how to be able to go back in time and recognize / resurrect your thought process.
But there's little thorns it solves all over. Ever experienced knowing you did something X days ago but it's in the past and there's literally no way to go back and look at it? Ideally, it solves that.
Version control / history is great if the app supports it, but depending on how it works, "a month ago" might not be available.
Also, integrating with Ollama.ai or some other local LLM with an API server would be fantastic.
Or you can ise the release i uploaded.
I added instructions for how to use it once it’s open in readme.
Apologies for anything unclear!
VC economics are going to need to change with AI and I think many haven't got the memo.
Would an iphone version be possible
I’m super glad about this personally.
Seems a legitimate concern; unsure why op is receiving negative attention for saying so.
The demo i showed with chatgpt works just as well with openhermes2.5-mistral. But is instant with chatgpt instead of 20s