Live data from Hacker News

How to Run a Live Coding Stream on Twitch Using OBS

jordanlewis.org

71–80 of 193 posts

Re: How to Run a Live Coding Stream on Twitch Using OBS

#71

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 ev…

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 :)

Re: How to Run a Live Coding Stream on Twitch Using OBS

#72
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.

Re: How to Run a Live Coding Stream on Twitch Using OBS

#73

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 ev…

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.

Re: How to Run a Live Coding Stream on Twitch Using OBS

#74
post #34

Earlier quoted context omitted.

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.

It's just a case of taking the time to learn your tools. Take the time if you think it's worth it.

A few hours of dedicated learning will put you miles ahead of casual users. It's not at all unattainable.

Re: How to Run a Live Coding Stream on Twitch Using OBS

#75
post #4

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.

Re: How to Run a Live Coding Stream on Twitch Using OBS

#76
post #4

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.

What's important for most streams is how you audibly communicate with your audience, much less so what you are actually doing on screen.

Not that I think I would be an effective livestreamer.

Re: How to Run a Live Coding Stream on Twitch Using OBS

#77
post #44

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 wh…

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.

Re: How to Run a Live Coding Stream on Twitch Using OBS

#78
post #75
post #4

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--lik…

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.

Re: How to Run a Live Coding Stream on Twitch Using OBS

#79
post #40

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…

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 enco…

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

Re: How to Run a Live Coding Stream on Twitch Using OBS

#80
post #55
post #40

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…

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 me…

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

Post reply on HN