
Show HN: RetroClip – Instant Replay for Your Mac - kogir
https://www.realartists.com/blog/retroclip-instant-replay-for-your-mac.html
======
TheTon
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/](https://www.realartists.com/retroclip/)

~~~
stats_n_trends
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.

~~~
TheTon
I mean, I could do longer, it just takes more memory. 120s is probably doable
though.

~~~
stats_n_trends
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.

------
rbosinger
Wow! This could be awesome for QA work. So often our QA team will manage to
get our software into some weird state but not be entirely sure how they got
there. If they used this they could hit the keyboard-shortcut to save the last
60 seconds as soon as they got to the error or weird state.

I've sent them the link!

~~~
teleclimber
That's a great use case and I could really use that right now.

Now if retro clip could also record keystrokes* and mouse clicks that could be
even more helpful.

* OK, maybe keystrokes is a security issue? Not sure.

~~~
supermdguy
You could use something like xnee:
[https://www.gnu.org/software/xnee/](https://www.gnu.org/software/xnee/)

~~~
delinka
That says X11. Not going to work on macOS's Quartz.

~~~
supermdguy
Oh, you're right. I was thinking about linux for some reason.

------
conception
Ooooh this could be pretty fantastic for user debugging. Instead of "can you
recreate that problem?" Just hit the keys and send the clip of what they were
actually doing.

~~~
netsharc
For a better integration the replay would show logs (for a desktop app: the
logs of the client machine, for a web-app: HTTP logs) at the same time the
video is playing.

E.g. a webmail app, if I click a particular email I get an exception, when the
programmer who is debugging the problem is viewing the video, he would see
what the server logged a few seconds after I caused an XmlHttp request through
my click..

------
pkamb
How about an option to make the Notification Center alert open the saved
Finder location, rather than opening the movie in Quicktime?

Much easier to do something with the clip file, and you still have the easy
(and perhaps better) option to watch it with QuickLook.

~~~
TheTon
I'll think about it. In the meantime, I have a few pro tips that may be
useful.

One trick is you can drag the icon from the QuickTime's window's title bar (or
command click on it to reveal it in the Finder). Along with the ability to
drag things while doing Cmd-Tab and Cmd-` that was added to macOS at some
point, it makes it fairly easy to do drag and drop to other apps.

You can also use the Open Clips Folder menu item in the RetroClip menu.

Finally, you can also just disable the banner for RetroClip using the
notification center system preferences and have it be stealth, just like
screenshots are, and then just navigate to the ~/Movies/RetroClip folder in
the Finder directly.

------
stuaxo
Fantastic work. I wish there was something similar for Linux. it sounds like
you've made something that has minimal overhead.

I like the mouse-pointer hack, I guess you could take it further by only
adding it when the user wants to save the clips (and it gives the option of
having no mouse pointer, or maybe hiding it around the time when the mouse is
not moving or being clicked).

~~~
TheTon
I thought about that, but the problem is, I would have to decode and then re-
encode the video on save to composite in the mouse cursor. As far as I know,
there is no way to quickly and non-destructively composite an image on top of
h264 video.

~~~
TheTon
I should add, though, the idea of storing the mouse cursor separate from the
captured video is a really good one in general. I am pretty sure this is what
ScreenFlow does, because you can edit the mouse cursor in their app after a
video has already been recorded. The tradeoff is that they need to spend more
time and space during the recording phase to get really high quality source
video, and then they have an additional export phase when you want to save the
video out that does the rendering and lossy compression. That tradeoff is no
problem for them, but doesn't fit RetroClip's use case.

------
rocky1138
Does it record audio as well? This, to me, is the biggest downfall to
recording desktops on Macs.

~~~
TheTon
It doesn't. For some reason, which only the CoreAudio team could explain, it
is necessary to use a kernel extension to capture system audio on macOS.
Kernel extensions are not allowed in the Mac App Store (and rightly so), so
having it just work is unfortunately not possible.

That being said, I could easily add a feature to record any other input device
on the system, and then you can install the Soundflower kernel extension (or
one of Rogue Amoeba's other excellent utilities) to create a loopback audio
input device.

I always watch short video game replays with the audio off or on gfycat or
whatever where there is no audio anyway, and for capturing bug reports or
whatever I don't need audio either, so I didn't feel like I was missing much
without audio for myself.

All that said, if the CoreAudio team would come to their senses and provide a
userland API for doing system audio capture, I would definitely be on that.

~~~
aspenmayer
Monosnap records video and audio, and is available on the App Store. I don't
know offhand if they record off the built-in mic or if they hook the audio
stream some other way, however.

[https://itunes.apple.com/us/app/monosnap-screenshot-
editor/i...](https://itunes.apple.com/us/app/monosnap-screenshot-
editor/id540348655?mt=12)

~~~
Monosnap
[http://blog.monosnap.com/how-to-record-video-with-the-
system...](http://blog.monosnap.com/how-to-record-video-with-the-system-
audio/) \- here the guide how to record system audio.

------
FanaHOVA
> I got the idea to write RetroClip after playing the game Fortnite Battle
> Royale and winning, and then having nothing to show for it besides a static
> screenshot.

You should try Shadowplay or the equivalent from your GPU vendor :) Great job
on the project.

~~~
jsheard
OP is a Mac user - Nvidia Shadowplay and AMD ReLive only work on Windows.

------
pkamb
Can you expand a bit about your decision to ship this in the Mac App Store vs.
outside? Especially if a non-App Store build could get you things like audio
recording.

~~~
TheTon
Our main product we do sell outside of the app store. It's a much bigger and
more complex app, and I like not having to pay Apple a 30% cut on it, and I
also like the ability to push updates whenever I need to without having to do
app review.

That being said, what I like about the App Store, and I'm just getting my feet
wet on this with RetroClip, is that I think it's easier for users to trust you
on the App Store. The app sandbox gives people some confidence that an app is
going to be well behaved, and if it isn't then Apple can always pull it from
the store. That's not to say that our non-App Store stuff isn't well behaved,
it absolutely is and we take it very seriously, but being in the App Store
maybe makes it easier for users to have confidence in us.

I also think the in-app-purchase trial-ware model that a lot of developers
(myself included) are starting to adopt on the Mac App Store makes a lot of
sense to me. Even $5 is a lot to pay for software if you can't try it first,
and I think that was a big problem early on with paid software in the Mac App
Store.

~~~
wingerlang
If the target audience is gamers and QA-types of people, I don't think they
will care where they get it from.

------
fiatjaf
Really nice. What's the original intended use?

~~~
TheTon
Thanks! My original intended use was to win at video games (or at least fail
in amusing ways) and then post the replay clips to Reddit ;)

It's also useful for software development. If I had a nickel for every time I
got a screenshot in a bug report but incomplete repro steps, I could probably
buy a sandwich. So being able to retroactively get a video of what happened
can be super useful.

~~~
fiatjaf
Amazingly useful, I would say. Two use cases I hadn't thought of.

(Actually I just thought about jokes.)

------
djhworld
This is very slick and easy to use. You sell it well by comparing it to the
features on modern game consoles. I'm not sure when/if I'm going to use it,
but I like the idea that it's there if I need it!

My only criticism is it adds yet another menu bar item, but I understand the
reasons why that can be useful (and apps like Bartender mitigate this
somewhat)

~~~
TheTon
Thanks! I totally hear you about the menu bar. I used to laugh at Windows
machines with all the crap in the system tray, and now look what I've become.

------
miles
I'm on a Mac running 10.11 at the moment, so cannot test (10.12 or later is
required), but are the only choices for capture length 30 and 60 seconds?
Would be nice if this could be set by the user. Though for longer recordings,
would RetroClip offer any advantage (performance, file size, etc) over
QuickTime Player's built-in Screen Recording feature?

~~~
TheTon
If you want to do a longer recording and you want to keep the whole thing (or
substantially the whole thing), QuickTime Player is better. I also use, and
love, ScreenFlow for doing screen cast type videos. The difference is, I'm not
going to leave QuickTime Player or ScreenFlow recording all day because of
disk space concerns.

As for 10.11, it probably would work if I just changed the target OS, but for
a little side project I didn't feel like going through the trouble with
testing 3 operating systems.

~~~
_rs
How about an option for 5s or 10s? Kind of funny the non-pro version can do 5s
but the pro can't!

------
iforgotpassword
What's the actual video format? I mean, my knowledge is a bit dated, but don't
codecs like x264 usually have I B and P frames so you couldn't cut at an
arbitrary frame without reencoding. Do you just emit I frames or does x264
have some more advanced tricks available?

~~~
TheTon
It's not just I (key) frames. That would be really bad for quality or data
rate. There's an I frame every 1 second, which gives me a place to cut. In
general, not just for RetroClip, having I frames is important as it will allow
for efficient scrubbing through the video in a playback application.

~~~
iforgotpassword
Ah right so you technically don't save exactly 60.0 seconds, but I guess
that's OK ;)

Like I said my knowledge of this stuff mostly dates back to mpeg2 days and I
could have sworn the I frames were further apart, except on scene cuts.

~~~
TheTon
I actually pad it to avoid coming up short :)

------
eridius
This is pretty cool, but I'm seeing RetroClip take 300% CPU on my Late 2015
Retina 5K iMac. I thought it was maybe because I was watching a Twitch stream,
but it still used 300% CPU when I paused it, when the only thing actually
changing on the screen from frame to frame was a tiny animated GIF.

~~~
TheTon
Wow, that's not expected. Can you grab a sample[1] for me? I'll see if I can
find an iMac somewhere I can test on.

[1]
[https://developer.apple.com/legacy/library/documentation/Dar...](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/sample.1.html)

~~~
eridius
When I sampled it earlier it was doing a bunch of stuff in VideoToolbox. I’ll
check again when I get home this evening.

~~~
TheTon
Thanks. Sounds like we might have failed to open the hardware encoder and fell
back to software encoding for some reason. I’m going to try to get some time
on an iMac tomorrow and see if I can recreate the problem.

~~~
eridius
Ok I took a sample.
[https://gist.github.com/kballard/636fa3f6c09d6fc6e2a2a1efa33...](https://gist.github.com/kballard/636fa3f6c09d6fc6e2a2a1efa3354cc9)

I also checked the Console. Here's what I found:

    
    
      default	19:55:42.767418 -0800	RetroClip	GVA info: preferred scaler idx 1
      default	19:55:42.769327 -0800	RetroClip	AVD encoder error: kAVDPictureEncode CreateContext, unsupported resolution 5120 x 2880
      default	19:55:42.808188 -0800	RetroClip	Using metal device <BronzeMtlDevice: 0x7f80bf037200>
                                                                name = AMD Radeon R9 M395X
      default	19:55:52.609993 -0800	RetroClip	LSExceptions shared instance invalidated for timeout.

~~~
TheTon
My hero! Sounds like I should do some scaling for these 5k iMacs. I got away
with up to 3840x2400 resolution just fine in my testing on various macbook
pros, but I don't have any iMacs. I'm gonna go try one at the Apple Store
tomorrow (not buy obviously, I'm way too cheap for that, but just use it for a
minute).

EDIT: Yeah, I'm pretty sure 3840x2400 is the max supported by any recent Intel
CPUs, and older ones are less. The iMac Pro might be a special case because I
hear it uses its GPU for H.264 encoding. Anyway, querying what the max is for
a given machine and then scaling to fit it was an easy fix. Hopefully I can
get it deployed to the app store soon.

~~~
eridius
Finally just relaunched it again after the updates. it's now taking 10% CPU
while watching a Twitch stream and 1–3% CPU when not. That's _much_ better
than 300% CPU :D

------
bg0
I'd love to purchase the Pro but I can't see the price anywhere. Nothing in
the App Store or even when I click "upgrade to Pro" in the app itself no
information on how much it's about to charge me.

~~~
TheTon
It’s $5. I’m going to make it more clear in the next update.

~~~
bg0
Sweet thanks man. Love the simplicity

------
kruhft
I always wanted something like this for video, rather than just audio:

[http://plugin.org.uk/timemachine/](http://plugin.org.uk/timemachine/)

Thank you. I'll give it a try.

------
jhack
"Current generation video game consoles all have a feature where you can press
a button and capture the last minute or so of gameplay and I wanted this for
my Mac."

PS4 can record up to an hour, fyi.

------
andrewfromx
can't wait for the Mr. Robot episode where RetroClip is mentioned and the
hackers use the last 60 seconds of someone's screen without their knowledge.

~~~
TheTon
Well, it's totally sandboxed, no network connections are allowed either in or
out, and the video is only stored in memory, not on disk until you press the
keyboard shortcut, so it should be pretty secure.

------
atarian
This is actually a feature in the Nintendo Switch too. It will save the last
30 seconds of footage prior to you invoking the capture input.

~~~
TheTon
Yeah, my 4 year old son loves to spam the capture button. We have soo many
Mario Kart clips.

------
atomical
Cool. I actually wrote a golang project to do this on OSX. And then convert it
to a gif.

------
cecilpl2
Is there anything similar for Windows?

~~~
TheTon
Yes! Check out the Xbox app for Windows 10. GPU drivers also provide a similar
feature (nvidia’s is called shadowplay).

------
onassar
Are the streams or mp4 files being uploaded anywhere? Any transparency you can
offer about this not potentially causing privacy issues?

~~~
TheTon
It's totally sandboxed. It can't make network connections, in or out at all.
You can verify this yourself like so:

    
    
      $ codesign -d --entitlements - /Applications/RetroClip.app
      Executable=/Applications/RetroClip.app/Contents/MacOS/RetroClip
      ??qq?<?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
      <plist version="1.0">
      <dict>
        <key>com.apple.application-identifier</key>
        <string>EL9BUK3ZCV.com.realartists.RetroClip</string>
        <key>com.apple.developer.team-identifier</key>
        <string>EL9BUK3ZCV</string>
        <key>com.apple.security.app-sandbox</key>
        <true/>
        <key>com.apple.security.assets.movies.read-write</key>
        <true/>
      </dict>
      </plist>

------
Exuma
Very cool idea

