One thing that I was surprised not to see in the post was how to deal with editing files that have secrets (such as API keys or email credentials).
When I set up OBS, I overlayed a full screen image that says I'm showing something secret which had nothing but a small webcam feed in the bottom right so folks could still see me but not my desktop. It was assigned to a global hotkey toggle of course.
That would require no secrets. All it takes is a misclick into a .env file.
I’d assume you’re not coding on a production system so your secrets shouldn’t be too hard to revoke, cycle them after your stream and any time you leak them.
Secrets should really be stored in services, not files outside of maybe a single bootstrap file (unless you're working on the secret storage service itself).
I generate my secrets once, send them off to the secrets service, and then my service queries that service. I never see the secrets with my own eyes.
The idea is that you keep the name of the secret, and grant access to the secret manager via roles / policies which are generally open to devs on a subnet for a development environment but locked down in production environments.
I think we're probably agreeing with each other, except I'm not willing to call those things "secret." They're public. If you can plan to properly publicize something, great. But work _hard_ to make sure you're really okay publicizing it.
Let's say I live streamed implementing Stripe. There's no way to avoid not showing my test API keys if I'm going to show the end to end process of setting everything up. The best I could do is to roll the keys before I start the stream but this degrades the quality of the stream since it's not from scratch.
Of course those keys and anything else that's sensitive would be sitting in an .env file, and I'd also have an .env.example file showing how it's set up without anything sensitive being in there (I do this already in my pre-recorded videos). Even going as far as preventing the real .env file coming up when I fuzzy open files so I don't open it by accident and the contents of that file being ignored from multi-file searches.
Maybe the answer is simpler than that. Rotating a key should never be painful. If you accidentally reveal a key, it should be straightforward to change it (I'm sure your audience will understand if you take a one minute break).
The reveal wouldn't be by accident typically. It could be a necessary requirement based on the content you're streaming.
If you revealed a Stripe key only to change it 1 minute afterwards, you still need a process to change it in secret, which goes back to my original reply of setting up a dedicated "secret" scene so you can modify things in private.
You can switch to a different scene when handling sensitive details, like the camera feed or the "technical difficulties" scene. This is how I've seen folks deal with secrets in the past
- Not only I have seen secrets revealed on stream, like passwords and tokens and such... I have seen people working with databases full of personally identifiable information, and you could see names, phone numbers, e-mails and addresses on stream. There are irresponsible people out here.
- I have seen people doxxing themselves by showing their git identity, or some popup window with some licensing information such as "Registered to: John Doe", or when the autocomplete suggestions on their browser search bar shows "[Facebook favicon] John Doe".
As you can see, there are many, many ways to leak your identity on stream. If you want to have a discrete online presence, try to do all your work on a dedicated VM, or take measures such as using a dedicated browser for your stream related activities, a separate git identity, hide splash screens, and pay attention to detail at how things look before you go live.
Note that many streamers do not use a webcam, or don't show their faces on camera. Some do use a camera but still conceal their basic personal information.
There are benefits to streaming. It somehow makes you productive, because you don't want to look bad in front of your audience.
Plus, there are smart people on Twitch. A lot of lurkers that do not stream have an impressive amount of knowledge.
Money-wise, it's not worth it. The category that has the most programmers, "Science & Technology", has only 2,000 viewers at a time on a good day. That is very little compared to other categories. If you want to make money, publishing YouTube videos may be way more profitable than Twitch.
> Some do use a camera but still conceal their basic personal information.
That's really the critical bit. It's one thing to show your face on camera. It's another to show your name and address. The latter bits are regularly used to, e.g., SWAT streamers. Let's just say that streamers are all too familiar with legal trusts.
There is a mention of it, but it isn't clearly marked that this is in part specifically why: the article author takes a dual monitor approach and presumably restricts all secrets to the monitor that is never involved in any of the scenes (the main laptop monitor in this case).
Though with keyboard camera they probably should be more careful in which scenes show that if any of those secrets are typed rather than say copy/pasted.
This reminds me of a very funny moment I saw where a streamer was opening his beta invite key for a new game live and realized when he did that he had just leaked the key and someone was going to steal his invite, but he had a 10 second stream delay setup which give him just enough time to rush and enter the key before anyone else could use it.
Twitch has like 30 seconds delay, giving you plenty of time for this kind of moments. If you need more then 30 seconds, then you're out of luck and shouldn't be on Twitch in the first place.
And I would not recommend stay in low latency feature of Twitch. You are there to show people something, not to live chat with them. Opt-out of it and comeback to normal 30 seconds delay. Reasons to do this includes, but not limited to:
-1 -if gaming on a FPS, enemies might use your Twitch stream to find you. 30 seconds delay allows you to actually use counter-measures and employ disinformation tactics on your stream
-2 -if showing something, chat should be secondary, not primary. You're not on a live AMA, for that use Youtube LIVE (or chaturbate if that's your thing, I don't judge)
-3 -as said above, to give you time to react to your own mistakes
-4 -post processing for additional effects/reasons. Making a loop allows you to cut into mid-stream in some cases. This is an advanced use though, I only know of one twitcher that uses this
"You are there to show people something, not to live chat with them"
Many, many streamers expressly DO want to live chat with viewers. As a viewer, I don't like streamers that don't interact with chat. I may as well as watch a youtube video at that point. As a streamer, the entire point for me is to interact with people. If all I wanted to do was showcase something, I'd make youtube videos...
There are other methods one can use to avoid i.e. stream sniping besides having a long latency.
"You're not on a live AMA"
Twitch literally has a "Just Chatting" category. That said, there's nothing wrong with a streamer taking a break from the game to just chat for a bit. If you don't like that, instead of telling people how they should act, why not find a different streamer or use a different platform?
All youtube links because I do random old contests on leetcode/codeforces and usually at least one of the people above would have a screencast recorded (though unfortunately not always with commentary). Some of them also have twitch.
Jordan was a little vague in terms of how to get the iPad as a source. I know that QuickTime can capture i(Pad)OS devices as an input source so it might be some built in compatibility when the device is connected via lightning/USB, but another route is NDI. [1]
NDI is doubly useful as it:
1. is wireless over the local network
2. allows you to use your phone/tablet's camera as a video source, which can be a reasonable webcam stand in (although latency will never be as good, so possibly better as a sort of secondary vanity camera)
(3. definitely works on Windows)
There are apps on iOS that will share the screen content and camera content and a quick google seems to surface the same for Android.
As someone who used to work in TV too, the importance of good lighting cannot be stressed enough. It doesn't have to be expensive, but a reasonable, ideally diffuse source of light will make the biggest improvement to your stream vs an expensive camera (and some webcams may need manual adjustment via OBS to best utilise the available light).
This is great, thanks for pointing this out; I had jumped through a bunch of hoops trying out various camera streaming setups (RTMP mostly, held off on looking at NDI because I only wanted the additional camera angle for laughs), but I never got the latency under multiple seconds. I saw some people suggesting that wifi was causing the latency so I looked up some lightning->ethernet adapters before coming to my senses.
OBS recognized my iphone as a video source with zero configuration, and zero latency (ish? low enough that I can't tell).
Is it available as a video source directly in OBS? I know I can open it in QuickTime, but then you'd have to add a layer of window capture...
Personally I'm looking for a Windows solution primarily, but if I can open it directly in OBS, I might just run my MacBook and use the NDI plugin from the parent to stream that video to my PC.
> Using another layer of window capture doesn't work very well as I'm sure you know - it gets super laggy!
Oh, don't I know. I last looked into this when I had to produce a video explaining the FLP theorem. In the end I opted to just TikZ everything and avoid the iPad route because I couldn't get anything working acceptably well.
(Though I never tried just adding it as an video source directy, I assumed there had to be secret sauce in QuickTime.)
To be fair I think the green screen whiteboard trick was a much more valuable tip, I've done a similar thing in the past but it's probably less intuitive/widely documented than how to make your device's screen appear.
> There are apps on iOS that will share the screen content and camera content and a quick google seems to surface the same for Android.
I have been on the look for something like that in the past. I know of software sharing the camera via NDI, but it was my understanding that doing the same with the screen was not possible inside Apple's sandbox.
You can use AirPlay, of course, but then you're stuck with hoping that on the next OS update the AirPlay server software you're bought is updated quickly.
In terms of sandboxing, I think it may use APIs that are there for screen sharing on video calling apps. It shows a similar interface to the screen recording feature that was added in iOS 12.
Well I'll be damned. I wasn't aware screen sharing was available in video calling apps either. I suppose my last foray into this "rabbithole" must have been pre-iOS 12. Thanks!
Just spotted it's $10 now, so not a painless thing to try if you're on the fence. FWIW it's worked well for me, decent quality and the latency is not an issue at all for screen sharing, not immediate obviously, but for whiteboarding etc. definitely not an impediment (YMMV dependent on your local network).
Also while it isn't a 'universal' app with an iPad specific interface, the interface is just the button to start broadcasting the screen so other than looking a little awkward on launch, again it's not an issue in terms of the output, you'll still get the full screen.
I tried one of those AirPlay servers before and it worked... okay for me. I've got my PC on LAN and an access point across the room (albeit without direct line of sight) and I still had network hiccups.
Since it turns out connecting the iPad to a Mac via USB will make it show up as a video source in OBS (not just QuickTime), I'm inclined to run OBS on my MacBook (also on LAN) with the NDI plugin to stream the screen to my PC. If that falls through, I guess I'll bite the bullet and get the app.
I just wanted to thank Jordan Lewis for putting this article together. It gave me enough clues on how to implement the "whiteboard"/telestrator feature I've been trying to casually implement over the past 6-9 months. Even though I have 1,300+ hours streamed on Twitch, this still slipped through my grasp on how to get it implemented for some reason.
I was originally trying to implement this functionality by using NDI, but there were a few issues I ran into, namely resolution and framerate, neither of which I was happy about. Something about this article tipped me off to look up using USB to connect the iPad to the PC, which actually led me to setting up the streaming PC as an AirPlay receiver. After I made the switch over to using AirPlay, I had the whiteboard/telestrator functionality working on my OBS setup within 10 minutes.
Do a lot of programmers feel like they could be effective on a livestream? I might be in a minority, but my preferred coding style is very non-linear and sporadic, and wouldn't make for an enjoyable viewing experience.
I am way to self conscious for that... I dive deep into a problem for 10 hours and I try a bunch of stupid stuff along the way or make a bunch of mistakes and now I am broadcasting those to the world; and meanwhile either I am paying attention to the people and not working (I always want to get lost in a complete zone of concentration) or entirely ignoring them (which seems weird)... I will go for long stretches--like an hour--just staring at and reading the same data reports over and over again trying to cross reference all of the information, which would be ridiculously boring... I don't understand how people do these things other than as performance art, workshop instruction, or stunts: that people seem to do it and be productive on their own tasks indicates their brains work very different from mine ;P.
One thing you might enjoy is recording your screen for yourself, and then replaying it at 10x speed.
I’ve done this before and it allows you to get some of the feeling of “being watched” with none of the privacy or security problems.
Also sometimes it’s neat to see the crazy process of building something, particularly if there is ui or visual design tools involved.
Also, I do think there is a whole additional level of understanding needed to practice or “work out” in front of an audience. There is some flourish to it, even if you are mostly doing your thing, you may have more round corners than you might otherwise.
I run a piece of software called TimeSnapper on my machine that takes a snapshot every 10 seconds of the entire desktop area. I have recordings going all the way back to the very beginning of 2006. It is incredibly interesting to watch some of those old recordings to see what I was working on that month.
A month's worth of work in a couple of minutes. Captured way back in early-ish 2013. Sorry about the .flv, that's what web video kinda was back then if you wanted it to work on multiple browsers.
You can change the date +FORMAT for a more readable filename. See the date(1) manpage.
Caveats
You may need to change your DISPLAY to match your actual X11 server. You may need to add XAUTHORITY=$HOME/.Xauthority depending on your X11 ACLs. Probably doesn't work with Wayland, but nothing works with Wayland so YMMV.
CJ from Coding Garden does a phenomenal job with his streams. I've watched a few of his past streams on youtube and its refreshing. Its cool to see how he progresses through problems and is so endlessly positive.
https://coding.garden/
Daniel Shiffman from Coding Train does something similar, but more focused on P5.js and general interactive toys. https://shiffman.net/
You're not alone! I found your description really relatable. I find that I can only truly understand something when I know all the details, and why things are the way they are. That means in the beginning, when learning something new, I'm overwhelmed and not really confident in my knowledge.
He did all the things you mention and it was entertaining as well as informative.
I saw 50-150 live viewers.
I think quite a few people would like to see you work on something like a new tweak. Start or post an account with a specified stream time then post it here/reddit and see how many people subscribe.
I literally watch the live coding streams just for the mistakes! Not to make fun of them, but to learn from them and realize that everyone goes through this process!
I think it comes down to your "persona". For example George Hotz does multi-hour long coding streams that are all over the place, but they have some entertainment value because he's a bit of a kooky character.
It made me almost feel bad watching it, though. The dude is clearly so quick -- not even in coding, but just using a computer in general -- that given how much of my life I spend in front of this thing, I think I really missed a trick in not being extra attentive to trying to make sure I could maneuver my way around it as fast as he does.
Well, that’s in part true. You need to learn and practice your fundamentals if you want to improve your skills in a domain. In software development, learning your main tools is one of those.
You can always find people better than you. But if you focus on continuous improvement that number will shrink while the number that you are better than will grow.
It also helps that he doesn't actually accomplish anything and mostly just dicks around. Also "kooky character" is a pretty charitable way to describe him.
I do live coding with my clients when is kind of a "brainstorming" meeting. We throw ideas around, and I code fast and ugly to have something running on screen, usually maximum 2 minutes per idea, otherwise the client gets bored. After like 10 ideas, both of us agree on one main idea that gets implemented into production.
During this time I screen-share my entire screen, so we can draw fast on Paint, switch to code see how it behaves when implemented, mainly GUI elements only.
I usually use OBS during this kind of meetings to record everything, in order to have later review material in case I forget something. Also a nice side effect is that later on, if client is not happy with something I have hard proof that he did said/agreed on something.
I think a key to streaming is balance of audio and visual "stimulation." If you're not "doing" (as captured by OBS) something stimulating then you need to be saying something engaging. Some in theory if you're coding in python you might need say something to engage your; teaching, explaining your methodology or talking about current events around technology. If you're confident your audio stimulation will not be as strong you need to visualize something engaging. Sometime I did once via youtube was streaming myself writing a research paper creating maps in arcgis.
I've never done it, but I've toyed with the idea for one primary reason: accountability. I might just ignore the viewers, or maybe I'd interact and gain some insight about the problem at hand. Either way, just knowing that someone is watching and expecting me to do something (preferably on a schedule) would be a good motivator to actually do it.
I don't believe I would be productive on a livestream. That said, I think it would be like exercising a muscle I neglect - similar to the physical exercise I don't do :) I'd probably grow as a programmer if I were more comfortable searching for solutions in front of others.
I thought the same till I tried it, ended up being more fun than I realized. If you watch other streamers, you'll see that most aren't racing through - they're just casually coding...socially.
I think a lot of us turn to computers because at a young age The Social (tm) was hard. Some are very lucky to have a group of friends or coworkers they feel comfortable programming with.
I've seen a few streams of people who are like this, and they seem to do ok. One of the pidgin devs migrated their mercurial repos from bitbucket to their own self-hosted environment, live, on stream.
I think the personality of the person has a lot more to do about whether they keep the attention of their viewers. The ones who seem to get things done seem to speak out their internal dialog.
Watching someone "explore" is still entertaining, I think. You don't need to be a comedian, although that's fun, too. But what I like about livestreaming is that it's a pure, real form of seeing someone's brain in real-time.
It's really really fun. I do it a lot, am not very popular doing it, but get good engagement. Especially when the topic is something visually interesting.
I'm now at a point where it feels weird coding without saying my thoughts out loud or writing them down on paper. Like I don't know how to think unless there's some output.
And when watchers highlight a bug or tell me techniques to try that I haven't thought of, amazing.
I need to make better use of scenes and staging screens like OP is doing. My streams are significantly under produced right now.
I do stream live coding on twitch from time to time -- albeit I started out as a speedrun streamer. You have a point: if I were to write code in the same style I'm used to, it would probably be not that good. But, probably due to the very fact that I know I'm being watched, I noticed I employ a different style than usual: very neat, organized, logical, working on exactly one feature at a time and not allowing myself to wander too much. It definitely feels good and productive.
I think it’s what makes it fun. Your channel will likely never grow to be large, but then you get to interact with a healthier community at a slower pace. Jayne (Overwatch Coach) has been streaming on FB Gaming and has been enjoying the luxury of a smaller view count.
I would imagine most big streamers (let’s say 10K+) would enjoy a smaller community more than a larger one - if they could make the same amount of $$$.
It really depends on what I'm doing. If it's something I fundamentally don't know how to do and it requires all my concentration, I don't really do it on stream. But there's plenty that I know how to do but others don't. For example writing a parser/lexer can be interesting, but I generally only have to solve fairly local problems and not large structural ones.
Really hard things I _could_ do on stream...but I start to feel like it's too much of me staring really hard silently. I have to wonder how much of that is true and how much of that is personal anxiety. I do enjoy streaming though and should do it more.
I feel like I could fairly easily as long as I planned ahead exactly the work I need to do. As long as I get to the point where I'm translating a concrete plan of action into code I don't need to pay that much attention.
This would be an odd change to do on longer time scales. I do this kind of now, but I'll think for a few minutes and have maybe five to ten minutes of action planned out. Not precisely code just needing translating, more of a rough sketch to flesh out.
Depends how you define success. Streamers get viewers through consistent stream schedules and heavy viewer interaction + engaging "high-level" content where what you're doing is actually impressive (i.e. high level competitive gameplay in a video game).
By that definition no code streamer has been consistently successful on Twitch, Youtube Gaming, or any other platform. The closest to it would probably be Hikaru who is a GM chess player.
I used to do some livecoding myself. The answer is that it depends on the specific things you are working on. Some thing lend themselves very poorly for livecoding, but others work out pretty well.
For example, if you are doing interview practice, for Google style interviews, livecoding your interview practice is actually a pretty good experience.
Coding in front of an audience isn't much different than coding in front of an interviewer, if you think about it.
Non-linear coding can be enjoyable as long as the streamer is vocalising their thought processes.
I'm preparing to code on a livestream and honestly, I've thrown out any notion of being 'effective' out the window; chat engagement means distractions, and while I'm used to that I rather reserve some non-streaming quiet time for deep, focused work.
Enjoyable is relative. You won't get on the top charts by streaming this, but you will we watched by those interested in development. Even a handful of viewers can be pretty fun if they are chatting.
During quarantine, me and a couple of colleagues have been doing pair-programming sessions with three or more people. We were joking on doing a twitch stream. I think it could work.
having watched a lot of coding streams on twitch and have done a few myself, it is really varied, some are sometimes very focused on doing something specific and is just full steam ahead in knocking it out, some are very stop start with lots of reflection and changes of direction. But it is also interactive, people chime in and you end up in meta discussions or sidetracks, or people offer help, etc. So there is no real set style.
imo sporadic and non-linear makes for good content. Also, I've tried live-streaming coding before and I found I got a lot more done than if it had just been normal coding time, because you can't just idly check HN.
... how convenient, I am considering starting a live coding stream soon. Thanks for writing this and posting it!
(I have done some speedrunning livestreams, but not coding. Well, not in a Twitch setting anyway, I've done talks with lots of live coding and really enjoyed it.)
So I haven't done any live coding streams in a long time. But I recently recorded a completely unfiltered version of myself coding for a co-worker who is learning to program. I wanted him to see all of the ups and downs. All I did was turn on the recording and just went about my day like I normally do, all cussing and fiddling in my terminal like I normally do. Once you're on for 30 minutes or so you forget you're even recording.
It could be interesting to take this approach then "stream" it as well so you can provide feedback to people watching and also laugh at yourself a little bit.
I've done this a few times too and posted those on Youtube. Good times.
Streaming could be fun, but if you're streaming something you're actively learning (let's say a new piece of tech while you build something), for me it would be likely 50 minutes of Googling and 10 minutes of coding for every hour. That's how I talk myself out of not streaming because I personally would get bored watching someone Google things endlessly.
Yea, I think that's true for us for beginners I realized it might be super valuable. They don't have those skills down and there's usually this perception that if you're a good programmer that you don't run into a lot of the same workflow problems they do.
What they really get out of it is, oh okay this person's a human too but they think about the problems they run into in this way, I could do that too and get a little bit faster. And then also they don't discouraged thinking they're total "noobs"
I always like to explain, no I'm not a genius I've just been doing this a long time. So anything I have a good answer on? I learned that through fire and didn't just pull it out of my ass lol.
One thing I wanted to add is that as another commenter mentioned it can be a very "sporadic" activity. But what's interesting is that the craziness of programming really only happens at certain points, then at other points its very focused as everything just sort of falls into place.
One thing I was trying to demonstrate to my coworker is that with experience you know where you're probably gonna go from the start but you still have to do all the same mundane bullshit regardless to start :)
It's unlikely I'd ever share livestreams of my coding, but I do think there's value for any craftsman to watch recordings of their work.
Programmers have it especially easy in this regard since it doesn't require any cameras/lighting/tripods/line of sight whatever. Just record your desktop for a day and watch it in down time. I think you'll be surprised to see what deficiencies stand out as an observer that you've probably come to just live with due to complacency/habit. It helps prioritize areas to improve, and you can do this iteratively.
I’d love to do a live stream of my coding work with me explaining my process. Even if few/no people watched live, they might make for useful tutorials or at the very least a sort of video journal.
My main hitch is that I’m concerned about getting to comfortable and accidentally bringing up a config file that contains secrets, and then once those are streamed they’re out of my control.
I have a problem with diving into rabbit holes and spending more time on "being efficient" than sometimes just doing the work. Two things that have helped are
1) recording a "session" (I use snagit, but any screen recorder that lets you narrate works), where I describe what I'm working on, what the goal is etc. It seems silly, but even if the only person that's going to watch the video is me it somehow helps keep on task. And the video journal aspect is actually interesting.
2) Focusmate.com - this worked for me for a while, but I'm a secret uber-introvert, so I dreaded the introduction part of the process. But telling someone "I want to accomplish X in the next hour" and then having them watching over my shoulder really works.
Maybe you should try the live streaming, but just leave out the streaming part? :-)
Does anyone know of a good presentation system that does not consist of compressing raw pixels and sending that to the audience? It's a huge waste of bandwidth that I'd rather see used to provide reliable low-latency audio.
I'd love to be able to teach programming in a way that lets the students explore the live state of my working directory and follow along with file edits, but rendered locally on their machines at native resolution and with at least some degree of interactivity. Most collaborative editors I'm aware of are ill-suited for code, or don't seem to work well for more than one file at a time. Ideally, I'd like students to be able to open a read-only view of my entire IDE workspace, but exporting it over a network filesystem isn't quite live enough even with a short auto-save interval.
I think you'd be surprised how efficient video codecs with regards to bandwidth used, nobody sends raw pixels at all. Also with HLS latency can be very short with the right settings.
A few tips for coding screencasting:
For coding screencasts you should make sure that chroma subsampling isn't enabled when you're doing the encode of the video otherwise it may look worse with highly contrasting areas.
Decrease the encoding frame rate if its primarily going to be just a screencast without a lot of motion on the screen. At the expense longer mpeg segments (and more latency) you may want to increase the group-of-picture size.
There shouldn't be a reason that the encoded screencast looks worse then how it appeared to you unless the encoder you are using is just mashing the quality down.
> For coding screencasts you should make sure that chroma subsampling isn't enabled when you're doing the encode of the video otherwise it may look worse with highly contrasting areas.
What platforms support 4:4:4 video? Youtube, Twitch, Vimeo, ... all don't.
> I think you'd be surprised how efficient video codecs with regards to bandwidth used, nobody sends raw pixels at all. Also with HLS latency can be very short with the right settings.
We've all had enough experience with Zoom, Google Meet, Skype for Business, etc. in recent months to know that this is not something that works well out of the box. And that's before we get into issues like the fact that I'm using a 34" ultrawide monitor, and most streaming systems will have to downscale my desktop before encoding it, and the result won't look at all good for a viewer trying to watch on a 1080p laptop.
These systems are not OBS. You can pan and zoom as required to match your stream resolution, and it doesn't need to be the same as your desktop resolution.
I was referring primarily to the screen sharing features of the aforementioned services. In general, they're barely adequate for slideshow presentations, but the transitions are still going to be rough. And even when everybody in the virtual conference has a solid internet connection, the user experience is still a lot worse than when a PDF of the slides is emailed out before the meeting starts.
I find it simply amazing that all these "collaboration" tools aspire to little more than emulating the use-cases of broadcast television or a large lecture hall, and there a so few tools that try to enhance the experience in ways that are only possible when every participant has their own screen and computer.
Their badness is unrelated to the abilities of e.g. x264 compressing a screencast, because it really is quite good at that (near-losless quality at about one Megabit/s).
I think that you can do something like this with VS Code's Live Share[1] feature. And I think it's possible to do read-only sessions as well. Been a while since I looked at that feature though, so I'm not certain.
What you’re looking for sounds like Skypix, an Amiga based system for creating BBS UIs.
But, honestly, if your intention is to reach an audience rather than simply to geek out over an elegant technical solution (no harm in that!), then just go with streaming. It’s not your bandwidth, after all, if you’re using Twitch et al.
I guess, though, that streaming has the problem of not letting you copy the code, not being meaningfully interactive, etc.
> if your intention is to reach an audience rather than simply to geek out over an elegant technical solution
I'm not looking for a broadcasting solution along the lines of Twitch, so much as a solution to use with a specific audience of maybe a dozen students, that I want to be able to interact with to some degree.
Besides VSCode's LiveShare that was already mentioned, there are several tools that allow folks to collaboratively edit code: Floobits[1] and CodeTogether[2] are a couple that I've used successfully (I'm an IntelliJ IDEA fan, so like to stay in my IDE).
Scrimba pretty effectively (at least in terms of tech implementation) does this for frontend programming. I think the actual course content is relatively middling.
I love live coding streams. It's my personal opinion that the best programmers are the best debuggers, and that's something that's often language/domain specific and gets significantly more difficult as the codebase grows larger. In other words, it's hard to learn how to debug if you don't already work on a large project or within a certain language.
Watching people debug on twitch has definitely changed the way that I approach bughunting.
You guys should definitely check out Jordan's stream if you like the idea of watching someone fight the good fight against the dark-side of Go's opinionation.
I’m testing the Pi HQ camera with a C-Mount Tamron lens that gives similar bokeh for a total cost of around $100... but it is awkward and a little clumsy, and offers no autofocus, so you have to be careful to not move out of the prefocused area.
So in other words, it’s easier to just use a good mirrorless camera.
I have a similar setup to OP, but I bought a used Sony a6000 and the same lens on sale, so the camera and lens only cost me about $500. You could use the Sony kit lens too, and it would still be a huge upgrade over any webcam.
Any camera with an f/2ish lens will do it, even $150 ones (but it also depends on the size of the sensor). You might not be able to use it as a Webcam directly, though.
I've started playing with https://obs.ninja for work-related WebEx conferences. It's surprisingly competent and doesn't require any additional application installed on the phone (just the browser).
The "We'll Be Right Back" sound is from The Eric Andre Show. It's usually used to cut right as something really chaotic happens. Here's a very tame example by the standards of the show: https://www.youtube.com/watch?v=SVhme1eb8SI
Nice to see more! I started doing a live coding stream as well. It's an interesting medium.
I still get a bit nervous before I start streaming. I spend time rehearsing what I'm going to say and work on and how I'm going to present it... but I'm finding that is not very sustainable and am doing it more to have a dedicated couple of hours to hack on side projects and share my discoveries and knowledge with folks.
The interactive nature of it is neat and not as difficult as I had anticipated it would be but my audience is still only a handful of folks each week.
Give a try if you're thinking about it. You don't need pro equipment to get started with live coding. I use my phone for the camera and I pulled out my old 4-track and mic to record audio but it can be done with a headset and a webcam no problem.
Well, truth is, you need to code something "mainstream" to make it even worth it. (read as: have at least like 2 people watching or even just visit your channel once, not including yourself ...) Program some "Unity game prototype", some Java or JavaScript web dev, frontend or backend, put in buzzwords like Postgres and NodeJS and what else is relevant to people right now. You know, Twitch has a specific target audience after all. No one is gonna come for some bootloader programming on a STM32F0 (no vector table offset register after all!) or integration of a secure element from NXP including some crypto basics about ECC because people simply don't care there.
There was a twitch-like platform for live coding once, but obviously it flopped.
>There was a twitch-like platform for live coding once, but obviously it flopped.
I went searching for that exact site and couldn't find it (or maybe I did but regardless it was dead). I actually used it for about 5 maybe 10 minutes once upon a time because I thought the concept was cool. Watch me create a SaaS service on the fly. 3 minutes into it, I'm realizing I'm about to type in public IP addresses, log into secret management systems, pull data out of a CMDB which gives up a bunch of my internal system data... So I thought to only share a single monitor and use my second monitor for privacy related tasks. But then people can't see what I am doing and for long periods of time while i'm gathering CMDB data, no one sees any coding going on. At the end of the 10 minutes, I had about 12 viewers so I'm sure if I was doing somethign worthwhile it would increase a decent clip..
But live coding without planning is a security nightmare. Someone I knew once live coded their programming "homework" for a position they applied to and then shared their coding session with the interviewers. That takes the cake. He was hired on the spot, probably because he wasn't afraid to show his mistakes.
I use OBS to stream my maker sessions on https://m.youtube.com/c/StavrosKorokithakis/ and it works great. I really like how I can switch between scenes with hotkeys, and it's really easy to set up scenes to look like whatever you want.
I'd very much recommend it if you want to stream something. I'd also recommend just getting started, I've been wanting to stream for a while but was always embarrassed that it'd look like crap, but better something that looks like crap than nothing.
I love live coding streams but I don't understand why you'd stream a video of your keyboard at all times? From the screenshots it doesn't look like you'd be able to pick up on things like hotkeys when watching in real-time, but as mentioned in the article it does open the possibility for somebody to watch replays and figure out your passwords.
Keyboard cameras make sense to me if somebody is streaming eg starcraft where they're hitting 300 APM and it's impressive to watch, but I just don't see the appeal of it for coding.
Technically this is still kind of the best way of doing it.
Guy who wrote this article made a mistake, his keyframe interval is set to 0, which tells his encoder its free to do scene detection... however, he's exploiting the nature of the encoder (the scene never changes, as its a static image) to create extremely large GOPs, but not as big as manually setting it can go.
Twitch, as do other platforms, have recommendations, but they'll ingest pretty much anything you give them. This means, you can send them 15fps or lower with a ridiculously huge keyframe interval of 10 or more (Twitch recommends 2, 1 is a saner choice for low latency usage, 10 is still gives you enough ability to interact with viewers).
I've toyed with code/static optimized streams, and using x264 instead of HW encoding on a Nvidia Turing (currently the best HW encoder), and playing with custom args: -refs 16, -qmin above 10, -keyint_min set to keyframe interval * framerate (allows 1 I frame per GOP, the rest of the GOP could be near-zero bandwidth P frames), and -tune stillimage (which sets lesser known options which sorta helped here). Static views of an IDE would use extremely little bandwidth.
You'd be optimizing for the IDE view part of a stream, not the stream of you, which would be in a corner of the screen.
I haven't had a chance to play with Turing NVENC yet - how much of a real step up from Pascal is it? How does it compare to x264 veryslow quality wise (I know it'll beat x264 in realtime encoding, but I'm more interested in archival)
Its equivalent to x264 medium when using "quality" or "low latency quality. "High quality" just enables two pass on top of quality, which doesn't get it out of medium, but improves the bit distribution similarly to how two pass in x264 does.
All the gens of GCN through RDNA1 are on the spectrum of veryfast to fast, Pascal is fast; RDNA2 (due to inclusion in PS5 and XB2) meets Turing's new bar for quality (so no more low quality console streams on Twitch).
So, none of them compare to veryslow. Ampere will probably have a better encoder than Turing, but I think the fair comparison will still be against medium, not slow. The big change, afiact, will be work on h265, h264 for them is pretty much as good as they need.
If you’re looking to bring HDMI content into OBS easily and cheaply, check out my review on the $15 HDMI capture card that recently made the rounds here on Hacker News. Essentially this card has a native resolution of 1280x720, which is a good target if you’re trying to make text legible.
Hey, I can't link to it right now but there's a couple of Twitter threads about that card and some true USB3 1080p capable ones - they're about $50AUD on AliExpress. I still wonder why the manufacturer or seller filed off the names of the chips.
That looks like an Ergodox keyboard! I really want to get one of those...
It's not just that they're great ergonomically (which I truly need), but they're also highly programmable. I can imagine how a large set of macros could improve screencasts quite a bit.
More related to the article, I've used OBS for nearly all of 150+ screencasts and it's been fantastic. I tend to use Streamlabs OBS for Twitch and the fully open source OBS for all my YouTube videos. The plugin ecosystem is great.
Are there any line streams of hardware development? I'm getting into Kicad circuit design and it would be good to see how an experienced user works with it!
I have seen quite a number of hardware/embedded streams, but not a lot lately. Many of the streamers (both hardware and programming) are often new or mid level devs, there's a few super experienced programmers. I like watching Daniel (https://en.wikipedia.org/wiki/Daniel_Stenberg), https://www.twitch.tv/curlhacker who created curl, and pretty much has spent forever working on the project. He streams off and on.
I've streamed coding a few times on Twitch at my channel (14domino). My setup is much more similar to my coding setup so the font can definitely look small. Does anyone know a good way to advertise coding streams in general? I mostly get 2-3 viewers who are already my friends, and I doubt they're very engaged, but I do like streaming coding and would love it if people could learn something out of it. :)
It should be much like any other sort of marketing effort. Seek out some marketing books. Maybe pay a social media marketer to do some marketing for you if you don't feel you have the necessary skills or can't pick them up fast enough.
There's also good old fashioned networking, too. Find social coders with a similar style to you (and a reasonable audience) that you could be friends with / mesh well with. Try to make friends with them. Try to do streams after their regularly scheduled streams and encourage them to send their active audience along to your channel when they are done for the day. (That's what Twitch Raids are; Twitch built an entire viral networking tool for that.)
While that can help, it's not necessary. What is necessary is increasing the amount and/or consistency of time streaming (sticking to a solid schedule really helps) and always be talking and interacting with chat. It may take many months to build up an audience, but you can do it.
Cool. I use streamlabs and I have a much simpler set up for coding challenges. I wish I can make some commands for interacting with users though. Eg. A command for uses to point out mistakes in my code.
I can barely get 1-2 people to briefly look at my stream, and that’s without attempting to charge them anything at all. And meanwhile even popular people stream for free. Why should anyone pay upfront to watch a stream? Much better with Patreon, Twitch subscriptions and donations while allowing anyone to come see.
What do you think about running live coding stream on YT vs Twitch? I'm about to start streaming myself, but not sure what platform should I use. Last time I checked Twitch it looked a little bit overwhelming.
Not sure of what OS you utilize, but Twitch recently released an app called Studio for Windows/OS X that allows you to very easily stream your desktop to their service.
Probably stream to both simultaneously until you figure out which one works better for you.
If you get Twitch affiliate or partner I believe you can stream on both YouTube and Twitch still just not simultaneously, at least that is what I have read. Not sure many big streamers have tried so not sure on the details.
For the people on Linux using ultrawides, I recomment Xephyr at 1080p. You can put whatever you want to stream in there, and still have the real estate of the rest of your screen. It's super nice :)
Thank you for writing this! I'm preparing to stream and I'm swimming in all this new tech I haven't used before - everything is laid out so clearly in the post, it's awesome.
technical question -- I'm really impressed how OBS is able to abstract the "screen recording" functionality across different OSs (it works the same in Linux, Windows and OSX, with no difference in behavior that I've noticed).
How does screen recording work? Is it easy for OBS to just capture the video output buffer and start encoding it, regardless of the OS? Or do different OSs have very different strategies for this? What about hardware-level cursors? (I think that's a thing?)
> What about hardware-level cursors? (I think that's a thing?)
Software that wants to capture the desktop has to emulate the hardware cursor by getting the current cursor position and bitmap and blit it into its copy of the framebuffer. That's because the hardware cursor doesn't exist in the framebuffer, it's overlaid by the GPU during readout.
For the same reason screen-effects like "nightlight" don't affect the cursor in Windows, because the effect is applied as a shader, which can't touch the cursor. They could fix this by updating the cursor bitmap, but they don't.
I would love to know how to do it with Linux/Ubuntu. I tried with OBS and always run into a bunch of issues when trying to create something beyond a basic scene.
Audio-input-wise, I fail to understand why anyone whose objective is to capture their own voice, would choose a condenser over a dynamic microphone.
Dynamic microphone hardly those fan/AC/room nearby phone calls that the author had to reduce using software filters. Farther more, dynamic mics can deliver your voice with a touch of radiophonic note. What's more, they're usually more durable and cost less (you can get a very good dynamic mic like ATR2100 or Q2U for less than $100).
Yeah, your average side-address condenser really is not a good choice for livestreaming at all. Even the good ol' SM58 or its Made-in-China competitor, the AKG D5 are going to perform much better in terms of background rejection, and are obviously a lot cheaper.
The mics I mentioned have an internal pre-amp. Sure you can get even louder signal using external one, but they provide enough gain for one person speaking few inches from the mic.
Thinking about it a bit more, perhaps one reason to a condenser in this scenario is to easily hide the mic from the video. It's doable with a well a dynamic mic and some composition work too though.
Shameless promotion of my own video on setting up OBS; I created this for some of my friends and colleagues when we first started moving to all online teaching: https://www.youtube.com/watch?v=n5KGeiw3KV4 I will note that toward the end of the video on some finer tweaks, my scene was not correctly showing OBS cropping.
That said, this article does a great explaining the Twitch integrations. If you aren't looking into Twitch streaming, that portion can be ignored.
I've been using OBS for creating lecture videos for years. I use it mostly because when I started, it was one of the only free quality stream capture tools out there and I'd seen a few of the early Twitch streamers using it. Since I was teaching, I wanted to imitate the Khan Academy style drawings. The article uses an iPad, but I've gotten pretty comfortable with GIMP and a small Wacom tablet.
My setup (my equipment is a bit old, so it doesn't look like they are still sold):
Your two most absolutely crucial components are your sound and your lighting. The sound should get picked up well so the viewer doesn't need to adjust their volume to listen. I know some of my videos have fallen short in this quality because of the mic's positioning.
Also, think about your voice and enunciating your words. Since my lectures are public, 20% of my channel's traffic comes from India and Germany. You don't need to necessarily slow your words (like I did when I started), but you want to make sure each word can be heard cleanly. You may not realize you have a hard to understand accent because it just seems natural to you. You can also mitigate this with subtitles (I've used rev.com for ADA compliance).
Lighting is the other important aspect because if you are going to stream your face, it needs to look presentable. You don't want the lights shooting directly on your face though because that can wash out you texture and color. Like in the article, you want to bounce your lights off a white surface for a softer illumination. I'd recommend reading some indoor filming techniques to get a good setup, since you are effectively on camera.
Likewise, know your eye line. I like to have my camera at just above eye level so when I'm lecturing it looks like I'm talking to my students, rather than looking down/up wherever your webcam is. This was also a tip I gave to a friend last week before he presented at a conference. Acting for the Camera is a nice book you can peruse for small tips like understanding your frame.
Finally, you're going to be very clunky when you start, even if you are at extroverted person. You'll need to become comfortable performing in front of the camera no different than in front of a classroom or audience.
It seems like you've been doing this long enough that you've lost empathy for folks who are getting started. Pretty common for technical folks. OBS is not the most intuitive piece of software. For instance, "Scenes" will be new concept for folks. This was a great guide. Thanks OP for writing it.
When I set up OBS, I overlayed a full screen image that says I'm showing something secret which had nothing but a small webcam feed in the bottom right so folks could still see me but not my desktop. It was assigned to a global hotkey toggle of course.