News for hackers. Stuff that matters.
Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @11:49AM (#16224122)
Hi, I'm James and I wrote RetroClip. It's just a little side project, but I think it's neat and so I decided to release it.

I really enjoy technical how it's made blog posts, and I also enjoy elaborate desktop UI recreation web pages[1], so I made both for this project and I hope you like them. If you've got any comments or questions, I'll be pressing Cmd-R on this page.

[1] https://www.realartists.com/retroclip/

Re:Show HN: RetroClip – Instant Replay for Your Mac by jmiserez on Wednesday January 24, 2018 @01:41PM (#16225135)
Wow. Not only did you develop RetroClip, but then you developed it again just so you could put up a live demo version in the browser. And it actually works!

That's some dedication...! (and definitely worth 5$)

EDIT: It seems like it doesn't work with DRM content. Or more accurately, Netflix refuses to work while it's running. Unfortunate, but expected (and not your fault).

Re:Show HN: RetroClip – Instant Replay for Your Mac by bajsejohannes on Thursday January 25, 2018 @01:54AM (#16229280)
I really enjoyed the blogpost!

> we knew we had to get with the times

There are already too many of us working on the web side of things! :p It's lovely to see someone crafting a fast native application instead of yet another electron app. Speaking of which, do you have any recommended literature for learning more about the things you're writing about?

Re:Show HN: RetroClip – Instant Replay for Your Mac by freewizard on Wednesday January 24, 2018 @01:53PM (#16225274)
Nice work!

I'm impressed by the CPU footprint. Shouldn't be a surprise as it's all hardware now but still great to see this which makes me comfortable let it running along.

Is there a way to change store path?

Also I changed hot key twice and seems both keys are in effect now.

Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @02:05PM (#16225371)
RE: Store Path. Unfortunately, no. In order to write outside of the app sandbox container, an entitlement has to be approved by Apple, and they only would only approve ~/Movies/<AppName>/.

RE: Two Hot Keys. Ruh-Roh. Thanks for the bug report. I'll investigate. EDIT: Will be fixed in next update. :) As a quick workaround, just quit and relaunch RetroClip and the old hotkey will be unbound, leaving just your new one active.

Re:Show HN: RetroClip – Instant Replay for Your Mac by glhaynes on Thursday January 25, 2018 @06:11PM (#16235625)
Can you not use Powerbox to allow the app to write to user-chosen folders outside of the app sandbox container? Or maybe that's the entitlement you mean and Apple wouldn't grant it? Anyway, cool app. Nice work and nice writeup!

https://developer.apple.com/library/content/documentation/Se...

Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Thursday January 25, 2018 @07:21PM (#16236050)
Yeah, I guess I could use a security scoped bookmark. Might be worth adding.
Re:Show HN: RetroClip – Instant Replay for Your Mac by miles on Wednesday January 24, 2018 @11:18PM (#16228724)
> RE: Store Path. Unfortunately, no. In order to write outside of the app sandbox container, an entitlement has to be approved by Apple, and they only would only approve ~/Movies/<AppName>/.

In that case, a symlink would work nicely: https://tinyapps.org/blog/mac/200805230700_change_imovie_sav...

Re:Show HN: RetroClip – Instant Replay for Your Mac by oneeyedpigeon on Thursday January 25, 2018 @03:47AM (#16229640)
Did you consider making it available to a wider audience outside the app store, or do the economics just not work out? Curious to have an up-to-date analysis.
Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Thursday January 25, 2018 @07:23PM (#16236060)
I mean, everyone has the Mac App Store at this point, right? I think the drawbacks of the Mac App Store are obviously numerous and well documented around the web, but I'm not sure that lack of ubiquity is one of them.
Re:Show HN: RetroClip – Instant Replay for Your Mac by stats_n_trends on Thursday January 25, 2018 @01:54AM (#16229281)
How does this work with multiple monitors? Can I request the option for more control & longer record times? i.e. be able to set it any where between 1s-600s?

For context I downloaded OBS as much like you I was playing Fortnite BR and getting tired of having only static screenshots showing my win. OBS is ok but a performance hog. So your program looks awesome except 60 seconds is to short, sometimes the awesome play I want to share took longer than 60 seconds..

Also I play using an egpu on a second monitor so I only want to record that monitor playing. No reason to record the monitor showing discord.

Edit: I see you recommended quicktime for videos over a minute but as you've mentioned that takes up way too much diskspace to just leave running while you're playing. So I'm really hoping for some more options on the recording length.

Re:Show HN: RetroClip – Instant Replay for Your Mac by Flimm on Thursday January 25, 2018 @10:06AM (#16231200)
It looks like you can configure it to pick one monitor or the other. It would be better for it to record all monitors, since the whole point of this app is to enable retroactive screen recording, and so I would like to choose the monitor after the recording is done.
Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Thursday January 25, 2018 @07:30PM (#16236099)
I mean, I could do longer, it just takes more memory. 120s is probably doable though.
Re:Show HN: RetroClip – Instant Replay for Your Mac by stats_n_trends on Saturday January 27, 2018 @06:29PM (#16248721)
If I understand correctly increasing the duration just increases the amount of ram required right? How much does 60 seconds take on average?

Personally I'd like to set it to 5 mins which is what I have it set at for OBS's replay buffer. I find its much easier to trim a video than it is to merge multiple videos together.

I guess what I'm really asking is what are the real downsides to giving the user custom duration controls. So long as you provide the appropriate warnings / dialogs in a text box underneath the selections (OBS does that)? It seems like that would only increase the utility of product.

TLDR: Awesome piece of software that I think would be made even better if you gave the user more flexibility with custom durations.

Re:Show HN: RetroClip – Instant Replay for Your Mac by pkamb on Wednesday January 24, 2018 @01:13PM (#16224879)
I love the "elaborate desktop UI recreation web page", and it's inspiring me for my next Mac app's website. Do you have any resources to recommend?
Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @02:03PM (#16225348)
I can't really recommend the approach in general. From accessibility or search engine optimization standpoints, what I've done is a disaster.

It's more just an objet d'art type thing, just this sort of stylized recursive, I dunno, joke thing. It was fun to make and for some reason Nick and I find the concept hilarious, but it's also ridiculous. When I told my family about it their response, to a person, was "but why?"

You're of course welcome to view source on the page and copy anything you like (it is just a web page after all), but if I was trying to market something serious, I would definitely do it differently.

Re:Show HN: RetroClip – Instant Replay for Your Mac by jmiserez on Wednesday January 24, 2018 @02:13PM (#16225429)
What's really cool is that if you save a video, then play it, and then save a video again, the small overlay player will actually show up in the second video.

Did you have to take care of that yourself?

Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @02:45PM (#16225686)
Yeah, I render the video into the canvas, as opposed to positioning a video element on top of it, so that the capture will work recursively.
Re:Show HN: RetroClip – Instant Replay for Your Mac by frakkingcylons on Wednesday January 24, 2018 @08:30PM (#16228050)
This is hilarious. Great app by the way!
Re:Show HN: RetroClip – Instant Replay for Your Mac by archagon on Wednesday January 24, 2018 @09:44PM (#16228357)
Hi! I’m also working on a side project that has to capture screen data in real-time. Do you by chance know if there’s a way to exclude a window from the capture without resorting to the slow CGWindowListCreateImage API?

[1]: https://github.com/archagon/degausser

Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @10:16PM (#16228479)
Sorry, I don’t. I mean, you could of course identify the unobscured area of the window and paint over it pretty quickly, but if you wanted to draw what’s behind that I don’t know of a way to do that efficiently.
Re:Show HN: RetroClip – Instant Replay for Your Mac by archagon on Wednesday January 24, 2018 @10:38PM (#16228547)
Bummer! Just thought I'd ask.

Really neat project, by the way: I love seeing technically elegant solutions to these kinds of singular problems! Did you run into any Mac App Store sandboxing restrictions with respect to capturing the screen?

Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Thursday January 25, 2018 @12:17AM (#16228945)
No sandbox problems to report :)
Re:Show HN: RetroClip – Instant Replay for Your Mac by Operyl on Thursday January 25, 2018 @01:36AM (#16229227)
Dunno if I should be impressed or going “what the hell?” Seems kind of absurd that they enforce the sandbox pretty heavily in the MAS just to let things like that get by pretty easily. Apple confuses me.
Re:Show HN: RetroClip – Instant Replay for Your Mac by azag0 on Wednesday January 24, 2018 @01:48PM (#16225218)
I guess it's not really that surprising, but recording a 4K display eats about one and a half core on Core i5, 2.7 GHz.
Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @02:07PM (#16225381)
Is this with the real Mac RetroClip? That sounds really high, like way higher than expected. Is it an older machine without a hardware video encoder?
Re:Show HN: RetroClip – Instant Replay for Your Mac by azag0 on Wednesday January 24, 2018 @05:34PM (#16227002)
Macbook Pro, 13-inch, 2015, Intel graphics 6100. So I guess not. The 4K display is connected via displayport, and runs downscaled at 2560x1440.
Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @06:48PM (#16227455)
OK, I would expect that setup to perform really well (like just a couple % CPU use in activity monitory). If you have a chance, can you send a sample[1] to support at realartists.com? I'd love to see what's taking all that time.

[1] https://developer.apple.com/legacy/library/documentation/Dar...

Re:Show HN: RetroClip – Instant Replay for Your Mac by stuntkite on Wednesday January 24, 2018 @09:54PM (#16228385)
I find the fact that you can do this in the DOM without special permissions kind of spooky! Does that mean that websites can be grabbing my screen if they are running in the background?

Thanks for your detailed writeup! I bought the app and am gonna use it!

Re:Show HN: RetroClip – Instant Replay for Your Mac by mygo on Wednesday January 24, 2018 @11:57PM (#16228871)
websites can't grab your screen (say, they can't grab what you have on your excel window, or what's your taskbar, etc), but they can grab what is inside their browser tab. Which is what his example is doing.
Re:Show HN: RetroClip – Instant Replay for Your Mac by stuntkite on Friday January 26, 2018 @02:47AM (#16237599)
I think the Window Server hack they are doing could definitely be used for interesting exploits. He isn't just recording the DOM that's for sure.
Re:Show HN: RetroClip – Instant Replay for Your Mac by digitxpc on Wednesday January 24, 2018 @10:26PM (#16228517)
There's a service called Smartlook (https://www.smartlook.com/) that does exactly this, at scale, for user analytics.
Re:Show HN: RetroClip – Instant Replay for Your Mac by tbodt on Wednesday January 24, 2018 @03:30PM (#16226028)
How much of a speed boost did compositing the mouse cursor yourself get you? If it's big, I'd be really interested in hacking OBS to do this, so I can stream and use my computer at the same time.
Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @03:45PM (#16226131)
I haven't tried OBS in a while, but a few years ago I was really into the Heroes of the Storm beta early on and I streamed it a little on Twitch.

I actually wrote my own streamer because I wasn't happy about the resources that OBS required. Some of the code from that streamer I ended up dusting off, repurposing, and improving to write RetroClip.

Now, it's been a while, so what I'm about to say may no longer apply to current versions of OBS, and my observations may have been wrong in the first place, but when I took a tour through the OBS codebase, I felt like it was maybe supporting too broad of a feature set and supporting too many platforms to be able to attain optimal performance. Like, I'm not trying to crap on it, as it's an incredibly impressive piece of software, I'm just saying that there seemed to be a lot of data copying, cross platform concerns, and extension points, and the pipeline for getting video in from the screen and then out to the network just had a lot of work along the way, work that could be avoided if your only goal was to run on macOS and send just the screen contents to twitch as fast as possible.

So I doubt that a micro-optimization like my cursor compositing hack is going to be of benefit to OBS. I did that to avoid doing any copies at all of the raw image data in code that I control, and I would guess getting to zero data copies in OBS would be a long journey. There's probably a lot of lower hanging fruit in terms of macOS specific optimizations that can be done first.

Re:Show HN: RetroClip – Instant Replay for Your Mac by tbodt on Wednesday January 24, 2018 @03:47PM (#16226148)
Just fired up OBS and it turns out it was defaulting to software encoding, and I switched it to hardware encoding and it's now quite a bit smoother.

Do you have your streamer program posted on GitHub or something? I want it.

Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @04:03PM (#16226283)
Sorry, I don't. It would need some dusting off to to compile on recent macOS (it depends on OpenSSL which they removed I think in 10.11, so I'd have to switch to SecureTransport or something). It also doesn't do any of the things that I think are table stakes for twitch streams these days like animated interactive overlays, webcam control, etc, all it did was stream the screen and the audio (i did mux system and mic audio).

My understanding is that like 99% of the traffic on twitch is basically the top 0.1% of channels, and all of those streamers mostly just use dedicated streaming boxes or have super beefy PCs. The market for a bare bones feature set twitch streamer for people playing games on Mac laptops has got to be pretty small. Maybe it's just you and I. :) So, that's why I kinda lost interest in it.

Re:Show HN: RetroClip – Instant Replay for Your Mac by stats_n_trends on Wednesday January 24, 2018 @11:21PM (#16228736)
Count me in.. It’s at least 3 people...
Re:Show HN: RetroClip – Instant Replay for Your Mac by bcjordan on Thursday January 25, 2018 @12:43AM (#16229035)
This is incredible! Especially inspired by your success with WebAssembly.

In some version of reality, you run with this and go on to create a fantastically useful web-based desktop system and define a new category :)

Re:Show HN: RetroClip – Instant Replay for Your Mac by fcoury on Wednesday January 24, 2018 @07:41PM (#16227763)
Hey there. So the app isn't really working for me. It shows the icon very quickly on the menubar and disappears. What's the best form to collect information about what could've happened?
Re:Show HN: RetroClip – Instant Replay for Your Mac by btown on Wednesday January 24, 2018 @12:22PM (#16224391)
How much is the Pro upgrade? It's unclear from the website as it's an in-app purchase.

Also, this is a pretty amazing technical accomplishment, and an incredibly well-written blog post. Huge kudos.

Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @12:26PM (#16224429)
5 bucks. :)
Re:Show HN: RetroClip – Instant Replay for Your Mac by pidg on Wednesday January 24, 2018 @02:11PM (#16225417)
(or £4.99 in the UK, which is $7.10. But we're used to paying more! Also, bought :) )
Re:Show HN: RetroClip – Instant Replay for Your Mac by thought_alarm on Wednesday January 24, 2018 @02:50PM (#16225708)
Actually, that's £4.15, or $5.90, plus 20% VAT. But the GPB has been gaining value recently. 6 months ago it would have been more like $5.30 in the UK vs. $4.99 in the US.
Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @02:43PM (#16225673)
Yeah, sorry. Apple decides how the price translates across different currencies.
Re:Show HN: RetroClip – Instant Replay for Your Mac by Kudos on Wednesday January 24, 2018 @01:15PM (#16224895)
A fair price, nice work! :)
Re:Show HN: RetroClip – Instant Replay for Your Mac by xophishox on Wednesday January 24, 2018 @02:22PM (#16225493)
Any way we will see an update which allows us to capture 'only' a specific window. ie recording terminal session for replay?
Re:Show HN: RetroClip – Instant Replay for Your Mac by TheTon on Wednesday January 24, 2018 @03:01PM (#16225783)
It's a good idea. I'll think about it.

I definitely would recommend using ScreenFlow for capturing screencast type videos where the content is at least a little bit pre-meditated. It will let you crop the screen after the fact, pan around, and do all sorts of neat edits. It's really well done and worth the money. It might fit your use case better. I'm not affiliated with it any way, just a happy user.

Re:Show HN: RetroClip – Instant Replay for Your Mac by xophishox on Wednesday January 24, 2018 @03:43PM (#16226123)
we actually have something in linux we use, which allows us to set a 'position' for recording (sets a border to record in) basically, and we mainly use it for confirming terminal output / quick runs of stuff while on screen shares, or in slack.

Its nothing thats 'ever' predetermined to be shown, its all stuff thats either on demand, or 'how did you do that' rather quickly.

being able to just hit a button, after i did the 'thing' would be super beneficial.

Re:Show HN: RetroClip – Instant Replay for Your Mac by simonhamp on Wednesday January 24, 2018 @03:18PM (#16225928)
This is frickin cool man! Great work. Can’t wait to try it out. Thank you
Re:Show HN: RetroClip – Instant Replay for Your Mac by JepZ on Wednesday January 24, 2018 @03:42PM (#16226117)
Damn cool demo page :-D