Livecoding: create a podcast from YouTube videos
I'm taking a YouTube playlist and turning it into a Transistor.fm podcast.
Everything we said
Aaron Francis
Okay, I think I'm live. Okay. If you can see this, put something in the chat. Let's see. Am I live? Hey, I am live. I am live.
I just don't know if-- So I'm using Restream for the first time, and I'm streaming on LinkedIn also for some reason. Or at least I should be. Let's see if it actually is. Hey, there we go.
Let's see if it actually... I've never used Restream before. Cool, I can see chat. Oh, cool. Look, chat is coming in, uh, on the video as well. So what does this show me?
Great. It shows me that I'm live, and it shows I'm live on LinkedIn, but am I? Does- is anyone here from LinkedIn? I've never streamed on LinkedIn in my life, and I don't know how to tell if I'm live. Hot day in Syria, I believe that. Look, I guess I must be live on YouTube 'cause I'm seeing YouTube comments come in.
Hey, cool. This freaking rules. Good job, Restream. I still can't figure out if I'm live on, uh, LinkedIn. Hey. Ah, there I am. I'm live on LinkedIn. Maybe the first person to ever go live on LinkedIn. Cool.
Awesome. Oh, yeah, and, uh, I think somebody just said I'm definitely live on YouTube. I don't know how you would tell. View your channel maybe. Uh, live.
Hey, there it is. Ah, first success of the day. I figured out how to stream to LinkedIn, Twitter, and YouTube all at once. Nice. Um, I haven't seen any-- Oh yeah, there's LinkedIn chat. Emmett is on LinkedIn. So I haven't seen any Twitter chat, so I wonder if Twitter chat is coming in.
Um, I don't know. Just says loading. Of course it does. Hey, cool. It works. Look at that. All right, now I guess we gotta actually do something. Oh, how many API keys?
Hopefully zero. Hopefully, hopefully zero. Cool. This rules. I love having, uh, a unified chat. This is very cool. Huh, all right. Well, there's my email address. I don't really care about that, honestly. Okay, what are we doing?
Transistor.fm. Uh, Database School. Look at all these podcasts. Podcasts are so great. Um, this was the This Week, Next Week. That was the first one that I created from YouTube, which is gone now. Um, no MySpace stream.
No, I guess not. If Restream has MySpace, I would definitely stream to MySpace. YouTube slash ch-ch-ch-ch-ch. I probably want the YouTube Studio. Yeah, I don't care if y'all see that. All right, YouTube Studio, content, playlists.
This is what I'm after. Um, I need to get a-- I need to get artwork from Steve. How would you make dynamic bins for price ranges? I don't even understand the question. Um, so I don't know. All righty, PHP Storm, let's put-- Whoa, too many desktops.
Okay, let's put, let's put this guy here, this guy here. Last night, late last night, I was working on a bunch of SQLite videos, so this is what we're working with here. Uh, should I leave that open? I'm gonna leave that open. All right, let's do this thing.
So what I am trying to do, ch-ch-ch-ch, sync. I feel like we're getting close. What I'm trying to do is I'm trying to take these videos right here, where I talk to people about, uh, at the moment, SQLite, but hopefully in the future, a bunch of other, bunch of other databases as well.
Take these videos, which are great on YouTube, um, but strip out the audio and turn it into an actual podcast that people can subscribe to on Transistor. So that's the goal. Um, I'm doing it in Laravel, and the goal is to not actually run a server anywhere and to just use- To just use GitHub Actions to do all the work for me for free.
Um, light mode, it's the middle of the day. It's, uh, it's nine zero nine AM. Why would you use dark mode in the middle of the day? Um, can you teach us basics of Laravel package development? Yeah, maybe, maybe sometime. I've developed a few Laravel packages. Um, you know, at this point, I just basically copy the old package and strip it all out and start a new one, so I don't have to remember the boilerplate.
But Spotzie has a, uh, Laravel, uh, package skeleton that's good. Yeah, and they also have a, a course. Either Spotzie or Marcel, um, Pocio has a course on Laravel package development. Okie dokie. Um, what if we start easy and transition, transition this Guzzle stuff to the HTTP facade?
That seems nice. Uh, doo, doo, doo, doo, doo. So where do we do-- Let's pull all of this up here, 'cause Guzzle makes you do this wonkiness where you have to do, like, the getBody on the response and then cast it to a string. Um, so let's bring all of this up. We're gonna make this a little bit prettier.
I'll see if I can remember the HTTP stuff from memory, but the odds are not good. Um, so new client. I think it just goes like this, http with Auth, with Basic Aut- with Digest. See, already.
Um, all right. Let's look at... I think it's probably withHeader. Let's just go see if there's an X-API-Key down here, poking around down here somewhere. Um, this is the facade. Where's the actual binding factory? So I'm looking for an HTTP client.
Is there an X-API-Key? No. Basic Auth. So it sets auth. We're just gonna set our own header. There might be a better way to do this. So withHeader accepts name and value. So we're gonna take this name and this value.
Okay. And then I think it's-- Honestly, I think it's just get, and that returns, yep, URL plus, plus query. Um, is there a base, is there a base URL you can set? Base URL.
You sure can. Okay. So let's just say withHeader. Actually, let's set the base URL first withHeader, and then I think this can become a client if I need to reuse it later. I don't know if that's a client or a pending request. Um, we'll find out here in a second.
So I'm just trying to refactor this because HTTP facade is honestly quite a bit nicer. So now if I come down here, I think then I can put this here, and then does get accept query? Hooray. Um, I think it's probably just an array.
So we'll take show ID and put that guy there. And what does this return? This returns a HTTP client response. So response JSON, I think that's right. All right. That was straight from memory.
Have I done anything wrong? Uh, doo, doo, doo, doo, doo. Pending requests. Yeah, I think you're right. So I think that's a pending request. Where am I? Wrong directory. CD code, database school. What's the command? Sync? Pending request.
Cool. All right. Null, huh? Hmm. Have I done this wrong? Looks good to me. It looks good to me too, but I think I've done something wrong. Ch-ch-ch-ch.
What have I done wrong? Response. Let's just see what response is. Um, okay. Oh, this is HTML. I did something wrong for sure. Page you're looking for does not exist. Um, ah, bless you.
Bless you, chat. There's, there's some JSON. Cool. Nice. That already feels better. Okay, you just exposed your Transistor API key. All right, put it on the board.
One API key exposure so far. Let's see how many we can get. All right, so this is a better client. Um, I think I called this Transistor. Oh, that's so long. Um, we'll just do it that way. Is there a, uh, no op? You know how Eloquent has, like, model query, and then you can hop down to the next line?
Is there a chaining no op for HTTP that anybody knows of? Um, have I seen API clients You know, um, I don't know API Clients by Chris Oliver is. I'm sure it's exceptional.
I know that we have-- That's not gonna work. What am I thinking? Um, Saloon Laravel. This is what I've used in other places where it, like, lets you, uh, ba, ba, ba, ba, requests. It, like, lets you build out your own kind of API client. Oh, that's interesting, line-by-line highlighting or, um, borders.
I wonder what that's good for. Uh, so you can have a connector that's like forge connector. Here's the base URL, and then here are the requests to get servers and stuff like that. I've actually used it, and it's incredibly good. Um, so if I were-- If this was a real project, I would probably go all the way to do this. Um, this is one of, like-- This is one of the best third-party Laravel packages in my humble opinion.
All right. Uh, where are we? We are-- Okay, we have a new client that looks prettier. It's all about making things that look pretty. If we're gonna do it, we might as well do it, right? Um, I think this is supposed to be, uh, response. Yeah, I'll fix that later. All right, so we can get rid of that.
We can get rid of that. We can put this back down where it goes, which is remaining video existing. Oh, here it is, podcasts. Why don't we just keep these together? I don't know why I'm separating those like that. All right.
Podcasts. Pew, pow. There we go. Response transistor get, and then I think podcasts equals response JSON, and I think the key is data. God, I love that you can just put the key in there and not have to chain off of it. You can do that, right? Yes, key data. So DD-driven development.
Let's see what podcasts equals at that point. See if we're in a good spot. Podcasts. Cool. All right. Easy start. So we're back, and now transistor get the podcasts. Um, if we're not gonna reuse it, what are we even doing here?
Um, what is it complaining about get for? Oh, I don't care. Cool. Existing, remaining.
Let's see if we get all the way down here to this DD. Attributes on array, episode attributes. Have we mucked something up? Ch-ch-ch. So we got past that. Collect podcasts, which is our new response. Um, oh, I bet it, the JSON decoded it as an array, and historically we had decoded it as an object.
This is okay. Um, so if we DD an episode here, yeah, this is fine. I do not mind. Uh, where's video URL? Yeah, so it's attributes, and then where are you? Video URL. Yep, so we just gotta change it.
Ugh. Do I wanna change it? Yeah, I wanna change it. Attributes, and then I don't really care about objects versus arrays. I gotta be honest with you. Um, and then our little goofy test from yesterday. So parse that URL and then pull off the query. Yes, yes, yes.
Yes, yes. There are videos to upload. You should do that. Nice. Oh, man, guys, it's early. It's only nine something. So I wanna see... Like, I don't think chat shows up here. Doesn't show up in my notifications.
I guess it's just that Restream thing. Oh, I have a message. I wonder who it's from. Actually, I wonder if it's somebody saying, "Hey, you did something stupid." So I'm gonna check on my phone. Ah, no, I didn't do something stupid. Well, not that I know of.
Um, okay. Now what do we do? Now we should, um-- Let's see. Now we should download-- We should download the YouTube video that is not on Transistor. We should strip out the audio.
We should upload-- I think I've wrote, wrote all this down. Um, we should download, yeah. We should, yeah. At least I'm internally consistent. Um, okay. YouTube DLP. YT DLP. I think I have this. I think I do this in another place.
Where do you get your black tees? Unfortunately, right now I get them, I get them here, um, but they're just not as good as the price would suggest. Um, and I'm a connoisseur of the black tee. I think they're like $50, though. And I mean, I'm willing to pay that for a T-shirt, but it better last forever, and it just doesn't.
I think it's this one, the ExCotton tee. Um, so I am on the hunt for a new tee, and where I am, where I'm looking right now is Son of a Tailor Um, they will custom make T-shirts. Um, yeah, I don't, I definitely don't want, like, droopy neck. That would be the worst. Um, so they'll-- they are gonna custom make them.
I have a few that they made already, and they're wrong. Um, so they're gonna make new ones. Um, but these hopefully will last me forever. Uh, that's the goal. I feel like that guy's famous. Is that guy famous? Or maybe he just looks like a famous guy. Um, okay, so I'm gonna check.
I've done this before slightly or somewhat. Um, I need to find YouTube. There we go. Here's what I'm looking for. Ha ha. Let's take this guy. We're gonna yoink this. Actually, let's yoink this whole thing, and we're gonna come over here. Um, I think I want to narrow this down at this point to only process one.
Like I said, there's not gonna be-- there's never gonna be a day where I upload two of these things within, you know, one hour. So at this point, remaining is not empty, and we'll say remaining equals remaining first. So now we're down to just one. We should be down to just one video.
Great. This is the structure that we're working with. In fact, I'm gonna take that. Okay. I probably... You know, that exists. That's fine. I don't need all this information right here. This is what I'm after. All right. So given this, let's start looking over what I had done previously.
So symphony process. Uh, no, Laravel process. Cool. Even better. Process timeout. Could take a long time. Um, yeah, unreachable. That's fine. Could take a long time, so we're gonna let it run for ten minutes. All right. YouTube DLP. Do I have that? Ha ha, YouTube DLP.
Great. So I have it. And then episode ID. I think this has gotta be remaining. Um, this is why I have this here. Video ID. All right. So I'm gonna take... Uh, uh, uh, I should probably... There's gotta be a better way to pass all this stuff in, one, one
would think, right? Lime green text color. So do people like my setup, or do they not like my setup? Oh, lime green text color. I can't tell if that's, like, cool or like ew. Oh, no, that's an ew face. Dang, that's too bad. Um, where do you get your black tees? Uh, oh, thanks, man.
Uh, they fit my neck. YouTube DLP HP. Hmm. I'll tell you what, I don't like-- I don't think I like merino wool T-shirts. Big cotton guy. Just want something... I just want, like, a thick cotton shirt. Alfani crew neck. Hmm.
Have you ever tried Drizzle? No, I haven't. I'm not a JavaScript guy. I don't need it. Um, we have a, we have a very good ORM here, and I don't need it. Price ranges for probably... I don't-- I'm sorry. I'm sorry, Christionic. I just-- I don't understand the question enough to answer. Um, but I wish thee well.
What I wanna know is, um, Laravel process. I wanna know if there's a better way to pass arguments in, dash, dash. There's gotta be, right? Mm, mm, mm, sure's not looking like it. Um, process options.
That's the path, input, run. Oh, goodness. Man, I really thought there was a way to, like, pass those options in as an array or something, but that's fine. Eloquent is greater than Drizzle. I 100% agree with that.
I need a place to put this. So we're gonna say, um, storage path. What am I downloading here? An M4A? Um, let's just say that, uh, path equals storage path, strand eight characters, uh, .M4A.
That should give me, that should give me what I'm looking for. Database school storage, something, something, something M4A. Cool. That seems good to me. Uh, so let's take that, come back down here. Our path is going to be this.
In fact, let's, uh, let's short-circuit this whole thing and come back up here and just hang out for a second. So, um, that's the path. The remaining, I'm just gonna make an array, so I don't have to keep hitting these APIs. Remaining equals, and we'll uncomment all of that.
Title is who cares? Okay. All right. Yep, yep, yep. That needs a comma. That doesn't need two commas. That needs one, and that's probably fine.
So let's see what this command looks like. Is that right? That is right. Okay. Now, YouTube DLP, da, pa, pa, pa, put it there, verbose. Now, I'm gonna run this manually and see if it actually works.
Okay, running. Huh, huh, huh. Hey, thanks, Nicola. Cool, it's downloading. Implode args, yeah, that's true. Yeah, passing it as LS comma LS, that might work.
Hi, everyone. So it looks like all the chat is coming from YouTube. Um, why wouldn't you give Drizzle a try? Um, I, I have very limited time in my life. Um, I'm sure that Drizzle is, is wonderful.
I don't have a whole lot of time to, like, explore stuff that I don't actually use. Um, and I don't... I'm just-- I'm, I'm not curious about it. Like, I just... That's just not my ecosystem. Um, I'm very happy, I'm very happy where I am, and I don't have enough time to just, like, explore everything, so.
And if I did, it wouldn't, it wouldn't, like... It would just be a cursory overview. It'd be like, "Ah, I used Drizzle for a day, and here are my thoughts." And that feels kinda icky to me. Like, to be honest, you should use it for, like, months and months and months and see how it lives. Um, so that's why. I'm sure it's great. I just don't care. There are a lot of things, my goodness, there are so many things I don't care about.
Um, and I'm never gonna, I'm never gonna, like, try to convince people that I do care about something, 'cause that feels also icky. Um, so I'm just gonna keep talking what I, what I wanna talk about, and hopefully I can cast a broad enough net to make a living, but we'll see.
All right, um, cool. So it downloaded as WebM and then deleted it. Let's see. Storage. Hey, there we go. M4A. Well, I am here with Ben Johnson, and Ben, I have something to show you that I did not warn you about.
Unidentified
I got the audio, tell me.
Aaron Francis
Do you, do you rec- Boom. Um, I am also streaming on Twitter and I, and I think LinkedIn, so seems like, uh, YouTube is the only place where the comments are coming in. Let's see. See, I just thought that, like, those would be... What is this? Oh, that's something... Oh, uh, what's it called? Must have tweeted that.
Restream must have ch- tweeted that. That's kinda cool. Huh, wish I knew that. Um, that's all right. LinkedIn, I know. I'm about to become a LinkedInfluencer. Just came up with that. Um, I just-- Here's the thing. I don't know if a single person besides Emmett is watching over here. Can you tell? Like, if you, if you click in...
All right. What? Are there-- Oh, man, Matt Swanson. Feed is very choppy over here, yeah. See, and I don't think I got that synergy comment. I don't-- Hey, there's a test from Twitter. Thank you. Um, LinkedIn does have streaming. Apparently, it's bad, 'cause I'm watching it right now and it's frozen.
Unidentified
Oh, I see. That's true.
Aaron Francis
There we go. Um, yeah. Um- Cool. Yeah, streaming everywhere. So, do, do, do. Big tuna, here we go. I have the audio. So next step, open, check storage, confirm audio is there.
Audio is there. That is podcast- Well, I am here with Ben ... fifty-four thirty-six is the time, and fifty-four thirty-seven is the time. I will allow one second loss. That is totally fine by me. Um, now, okay, so we have confirmed, with our fake little array here, we have confirmed that that command works.
So I think this is streaming the output back to us. So let's run this command again, but through PHP instead. Um, do I need to wait? I probably need to wait. Process wait? Probably. Okay. Um, clear this out, AR sync.
Boom, there we go. We're downloading it again. So fast now. Okay, so what have we confirmed? We've confirmed the YouTube DLP command is correct. We end up with an M4A. Um, I think that's it. That's all we needed to confirm, so that's good. Okay.
Do I want to... I'm just gonna put this in its place, and we're just gonna, shroomp, see ya. All right, so we're just pretending we're starting down here. Now what do I need to do? Yep, got you up there. Don't need you. Process wait throw, that's a good idea.
If it fails, it should fail. Good idea. Download missing episodes, yes. Strip audio, yes. Upload to Transistor. Oh, do, do, do, do, do. Transistor, Transistor API, docs, resume browsing.
What, what is this? What is this? I've never seen this in my life. Um- Yeah, I just want you to open it. All right. Ch-ch-ch-ch-ch. Episodes. I need to upload audio. Huh. I wonder if it's in here. It's probably in here. Hm, hm, hm. I bet there's, like, a slash upload or audio, audio upload.
What, what, what? I want to scroll this side. Oh, no. Oh, no, I can't reach it. Audio upload. Hm, hm, hm. Audio URL, that seems right. Here we go. Authorize a URL for uploading a local audio file to be used when creating or updating a resource.
If you already have it publicly available, which I don't, but should I? No, I don't wanna set up an S3 bucket. Yeah, I don't wanna do that. All right. So this makes-- this leads me to believe... Okay, so this is not the file name you wish to upload.
Okay, I think I know what's happening here. So I think what's gonna happen, um, I think what's gonna happen is I'm gonna hit this endpoint with the, yep, file name.
It gives me back-- There you go. This is cool. So this gives me back a, um, it looks like a pre-signed... Yeah. This gives me back a pre-signed S3 URL that I then presumably hit, I presumably upload.
Yeah, there you go. Cool. This is very smart. Um, this is very smart of them. So what I do is I call Transistor. I say, "Hey, I'm gonna upload a file. Here's the name." They send me back a pre-signed URL so that I can hit S3 directly, meaning I don't have to go through Transistor's servers. Very smart. Good job, Justin.
Actually, good job, John. Um, and then I upload the URL. So there's no better way to figure out how it works than to try to make it work. So we need to-- I think I goofed up up here 'cause we are gonna need the client. So we're gonna make this, uh, we're gonna make this a...
See, I don't know if this is actually a client, that's the thing. But I wanna name it Client 'cause that's what it feels like. Um, shoot, I wanna name it Transistor. That's what I wanna name it. Okay. I do feel like this is a pending request, though. The question is, um, do pending requests clone themselves or do I have to clone it myself?
We are gonna find out. This is not-- This is Transistor now. All right. Um, okay. So I've got all this stuff. This is probably what I need right here. I don't wanna continually re-download it.
So I don't know if this is a good way to do development or a bad way, but it sure does work. Um, we're gonna take that random string and say, "Yep, I've already downloaded everything." Yep, yep, yep. And I'm just gonna hard code path equals storage path, that random string, .m4a.
Cool. So we'll delete that later when we're back in business. Okay, so now we are assuming that this command finishes, which it does. Um, then we need Transistor. What was it? I think it's probably post to v1/episodes/authorize.
Um, hello, Sebastian. Authorize upload. Ugh, underscore. Those Ruby people, they love their underscores in the URLs. Um, yep, I need to give it a file name. Oh, it's a get. Get out of here.
That's wild. Um, file name. I bet they don't care for the path. I bet they just want ch-ch-ch-ch. Oh, do I have to do the whole parse URL thing again? Parse URL path, and then what are the parts that come back?
Scheme, host, port, path, screen path, path, and I can pass that in as... Can I? We're doing it. We're going to the worst place on the internet. Component specify. I think I just want path.
Let's see what path looks like. Um, so if I were to do parse URL path, is it just a-- What's the constant? PHP, PHP URL path. Y'all are gonna laugh. I don't-- I have no idea if this works or not.
I'm not doing anything, am I? No, I'm not doing anything. Hm. That ain't it. Let's just do it all and see what the one I'm looking for is. No, give me all of them. Oh, come on.
That's not even-- That's not gonna work at all. Um, what am I looking for? I'm looking to get... You know what? I don't need to know what the real, I don't need to know what the real way to do it is. Who cares about the real way? If you know the real way to do this, tell me. After last path slash.
I mean, that's the way I'm gonna do it. I know that there's a way to do it better. There you go. Hope you upload this on YouTube, maybe. We've reached 100 messages with restream chat. Why, why do I care about that? I don't care about that. Get, get your stuff, get your growth hacks out of here. I don't care about that. Path info.
Yes. Uh, path info. See, you don't have to remember things, you just have to stream. Path info. Uh, ah, path info base name. So is base name its own base path? Um, let's look at path info. Can I pass in expected values?
Path info base name. Hey, look at that. All right. My old eyes, I gotta zoom in on that. Who said, who said path info? Oh my blues. Oh my blues? Uh, yeah.
Thanks. That was right. Good job. Good job, Oh my blues. Okay, so string after last would've been perfect. This is also good. In fact, one might say that is better. Response. So my question is, does the get this send?
Now, does send do a clone, or do I have to continually, continually clone this thing? I don't know. I don't know. I'm worried that I'm gonna be, um, I'm mucking up the pending request. Mm, meh, we'll find out later.
Um, all right, let's see what the response is. DD response JSON. I don't think I'm doing anything but asking Transistor to give me an upload URL. Hey. Man, this is, this is going better than I anticipated.
Um, okay. So I need to get the data out, and so we'll do that. It's wrapped up with data, so we'll grab that out. Um, and then I imagine I need this upload URL. Yep, I think that is correct. And I imagine I need that audio URL as well.
That's my guess. I bet the audio URL, I bet the audio URL is the final destination, and when I create the episode, I hand the audio URL back to Transistor as the point for, uh, fetching the actual episode.
So now the question is, how do I upload Ruby example? These guys, come on. Come on, John. Give us a, give us a Laravel example. Um, okay. So I've got the response. Uh, I'll just override it. That's fine.
Should I... Do I? I do. Yeah. Do I like that better? I kinda do. I kinda do like that better. Um, is it throw? Do you do throw before? Yeah, throw before and then JSON. So that will, if the request doesn't come back with any sort of 200, it actually throws before it tries to get the JSON.
Um, all right. So actually not create a new episode, um, not yet, 'cause we haven't actually uploaded to Transistor. So Transistor put. We gotta go check the HTTP facade, 'cause I need, I need to put a file.
Laravel HTTP facade. Um, file. God, there's this, you know, Laravel just does it right, man. Just freaking does it right. Look at this, attach, and you don't even have to read it.
You can just pass it a stream. Man, there's not even anything to do. Like, I don't have to do anything. This is just me copying and pasting out of the docs. Thanks, Laravel. Thanks for making my life easy. Um, okay. Let's come back here.
They do claim, however, they are expecting a put. Actually, it's not... At this point, it's not they. This is AWS is expecting a put. Um, so yeah, I actually am not gonna reuse this Transistor client because I'm going to a different base URL.
So, um, attach attachment. What is that first word, that first param supposed to be? The name and then the file name. What? Is this like local name and remote name? Um, I don't understand what name and file name is.
Hang on. This method accepts the name of the file and its contents. So the name of the file and its contents. If needed, you may provide a third argument, which will be considered the file's file name. The file's file name? The file's file name? What is the file's file name?
Uh, yeah, SQLite course is launching in like two weeks. Um, the file's file name. That feels so philosophical. I'm gonna skip that. I don't know what that is. Also, I don't know why, I don't know why you need the
name. Boy, I'm real confused about what's the remote name and what's the local name. File name, file data, file name. That's how I feel. Um, I am-- I have to imagine that this is the remote, like when you put it on S3 or like that's the file name it ends up with, and then this other name is the local name.
I honestly don't know because I'm passing through... I'm gonna open the freaking file right here. Boy, oh boy, oh boy. Uh, do, do, do, do. So we want to fopen with path just for reading. I don't need a temporary variable for that, so I'm gonna put that there, fopen path.
Attach attachment. What does this mean? Um, does anybody know file name defaults the same as name? Yeah, I think you're probably right. Um, let's file name equals that. File name. We're just gonna try this and see what happens.
Put to... Where did we put this? We put this to the response. We unwrapped data already, so we just need attributes, uh, upload URL. And then let's go ahead and throw if it doesn't work, and then let's output
the... I still need that response. Um, upload. Yeah, that's fine. Upload. Upload. No, that's confusing 'cause this is actually the upload. Mm, mm, mm, what shall we call this? Um, authorization and upload.
Now I want to DD the authorization 'cause that contains the final URL, the audio URL, and the upload. The authorization is already data. All right. Well, we're about to find out.
Um, so we're not doing any YouTube querying. We've got this hard-coded, we've got this hard-coded, um, and then we're gonna ask Transistor for a place to throw it. Then we're gonna try to throw it, um, and then we're gonna see what happens. Well, you tell me.
What is this supposed to return? Um, after a successful two hundred response, you may use the audio URL. All right. Well, let's just click on this. It's downloading. I don't want you to download, you doofus. Oh, it's downloading twice now.
Um, no, do not open in Apple Music. Um, it's ninety-four point two megs, which seems right.
God, I guess I gotta open it. It's not playing. I just don't know if it actually uploaded. I've, I've never opened, I've never opened Apple Music in my life. What am I even-- What am I doing here? I feel like this should play. If it worked, it should play. It doesn't seem like it worked, I gotta be honest.
Um, but why is it ninety-four? Maybe the headers are wrong or something. Oh, I bet that, I bet that's it. I bet I didn't pass a content type, so it doesn't know for sure. Let's try this again. Um, do they say anything about content type here? Yeah, there we go. Um, content type for audio MP4.
Is it just MPEG or- Audio MP4. Cool. All right, let's try this again. I think-- So what I think happened is I think it uploaded, but S3 sees it as just a blob, and so when I try to play it in the browser, it's like sending back a blob with no header, which means Chrome is like, "Sure, I'll download it." And then Apple Music's like, "I don't know what to do with this." With header.
Is there a content type? Of course, there's a content type. Um, yeah, cool. So I think it was just... Wasn't it just audio MP4? I think it was audio MP4. Sorry for filling up your bucket, Transistor.
Presumably, they delete these after some period of time if they're not associated with episodes. All right, let's try this one. Hey, good so far. Hmm. Oh, it's M4A.
Did I screw that up? Audio M4A MIME type or content type. Hmm, did I mess that up? Is it... Boy, if there's something I don't know a lot about, it's, it's content
types. I don't know. Let's try again, M4A. Um, I am trying to take a YouTube playlist and turn it into a Transistor podcast. "Do you stream on Twi-Twitch as well?" No, I don't. Um, I don't super love Twitch.
I feel like there's a whole vibe there that I'm not really a part of. Um, did it download again? I think it, yeah, freaking downloaded again. That makes me feel like it's not working. So no, I don't, I don't spend any time on Twitch. Um, which is fine.
No, that's fine with me. Um, I wonder what I'm doing. Oh, I should just see how I do this. Um, oh, look, there's good stuff there. See, this is using the Guzzle stuff, and I didn't set a, I didn't set a, uh, MIME type on that at all.
Bye, Josh. Thanks for hanging out. Um, yeah, Twitch. Yeah, it's just there's a whole thing on Twitch. Yeah, you have-- That's exactly right. You have to have more caffeine, and you constantly have to be like, um, you constantly have to be like, "Hey, thanks for the sub. Wow, hype train." And I'm just like, I don't really...
And it feels bad to go on Twitch where people are expecting those things and then not do those things. It feels like I'm being a bad citizen of the web or something. And so it's just like, eh, I'm just not gonna do it. Um, try audio M4A, X M4A.
The super energetic route is incredibly tiring to me. Um, yeah, I think I'm gonna skip this part and just throw it at Transistor and see what they do with it. Um, okay, so now I actually-- You just, you absorb this. This just is a 200, and once it's done, it's done. So we'll throw if it's not right.
We'll throw if it's not right, but we're just gonna carry on. Um, I need to create an episode. Get out of here, Apple Music. Nobody uses you. I need to create an episode. So let's come over here, episodes. I need to not get an episode. Authorize, I don't wanna do that either. I need like a little sub-menu over here.
Create an episode. Post to V1 episodes. Show ID is required. All right, so let's try this again. Or for the first time. Transistor. Uh, what did I just say? Post. Post to slash- No, that'll reset the base path. Post to episodes, um, with body.
Do I have to say, like, with JSON, or can I just say with body? Application JSON. Base URL. Yeah. Yeah, maybe TypeScript indeed.
Um, better luck uploading. You're making an M4A instead of MP3. I, I have no idea. I don't, I don't know why. Um, I think with MP3, you need a separate... Let's see. YouTube DLP. Audio format MP3.
We could try that. Let's upload it to Transistor first and see what happens. If that doesn't work, we will, um, we'll use an MP4. Nope, we'll use an MP3. Okay, so with body, what do I need? I think I need a show ID.
Get out of here. Don't need you. Uh, I don't need you either. Show ID, audio URL So show ID is something that I have up above. Audio URL is from the authorization attributes audio.
So I have that. Um, the show ID I should probably make into, um... So I'm uploading-- No, I'm creating an episode called show ID or with a show of...
Why, why are you, what are you complaining about? Is this not right? String content or stream interface. I just wanna attach JSON. Request data.
Oh, you can just pass it through like that. Cool. That is what I shall do then. Post. There you go. How do you like me now? Okay. Is this Laravel? This is Laravel. Um, I don't know. People keep asking about my PHP Storm config. I think I need to, like, figure out what exactly it is, um, 'cause I've spent a lot of time customizing it so that all the crappy stuff goes away.
Um, and I love it now. It's great, but I don't remember everything that I did, so I'll have to, I'll have to do that. Hello from the Philippines. Thank you, Michael. That, I, uh, that's nice to hear that I'm cool. Um, you know, I'm streaming on, I'm streaming on LinkedIn, so I don't know if that qualifies me as cool, but maybe other things qualify me.
I can export my settings? How do I do that? Somebody tell me how I... Vinit, tell me how I export my PHP Storm settings. All right. Transistor post. Um, I don't know if episode makes any sense. Um, uploaded? Don't I have an upload?
File name, authorization, episode. I feel like episode makes plenty of sense, actually. B- I am a boomer. I'm a millennial boomer. Um, I'm not, like, an actual boomer, 'cause I'm not, you know, 60 or whatever, but in my, in my, uh, in, in my habits and preferences, I'm kinda boomer-y, honestly.
You know what it is? You know what it actually is? I am not a maximizer. There's a thing called, uh, maximizers and satisficers, and I'm a satisficer. I find something that I like, I find something that, like, works well enough for me, and I just-- that's what I just stick to. So if we were to go to, uh, define satisficer.
Is that how you spell it? Satisfice. Uh, accept an available option as satisfactory. That is what I do all the time. Define, I think it's, um, as opposed to, there you go, maximizer. Maximizers want to ensure they get the most out of everything, and satisficers tend to adopt a, "Oh, this is good enough." That's me.
I'm very much a "this is good enough." I find something that I like, like T-shirts or a style of Nike shoe. I find something that I like, and then I just buy it over and over and over, and I never really think about it again, because I'm happy. Um, so there's your little, there's your little rant on, uh, satisficers versus maximizers.
Neither one is right nor wrong, it's just I am, I happen to be a satisficer. Did you just... Nope, sure didn't. Um, Volt great for solo dev? Sure. I like Volt. I don't prefer Volt's, uh, React style, whatever that is. Like the, maybe that's Volt altogether.
Um, I prefer the class style. Um, I prefer the class style, LiveWire, instead of the, you know, the state and the, all that stuff. Feels too much like React to me. Create a new episode. I think that's what we're doing right here. Um, why don't we go ahead and, uh, audio URL.
Oh, extremely importantly, we need to put the video URL in there, 'cause the video URL is how we're keeping track of, that's how we're keeping track of uniqueness or identity across, uh, across uploads. So where do I get the video URL? I think I get it... I think I'm just gonna construct it.
So remaining is an array, so I'm gonna say that the video URL, I feel like I did this somewhere else. Um, there we go, right there. All right, so I'm just gonna reconstruct this video URL and pass that in to transistor.
Remaining video ID. So that's the video URL, which is super important. Um, I think, I think Jeffrey, last time I checked, I think he's using, um, Vimeo, because when I created my first l- uh, video course site, I looked at what Jeffrey was doing and just copied his, uh, choices, so I chose Vimeo.
Um, okay. So I think this is going to give us what we want. Let's go ahead and add, um- Let's add the title. Where do I get the title? I think that's on remaining. Yep. Description, I think that's on the remaining, the remaining episode, uh, description.
Okay. I'm gonna put a fake title and description in here. Title, description. Um, I think that must be, like, an internal ID, but I just don't care about it. Um, okay, so we're pretending that we're downloading it. We're pretending to wait for it, then we actually are getting an authorization, and then we're uploading, upload the audio to S3, Transistors
S3 bucket. Um, get the authorized upload URL for the media. Path info, love that. Love a good path info. All right. Post to episodes. Show ID is show ID, which I think is the only required field, weirdly.
Um, show ID, audio URL. Yep, yep, yep. Description, that's fine. Explicit image, keywords, number, season, summary type, I don't care about that. Title, yes. Video, yes. Cool. All right. Well, see what happens.
Episode. We will post it and then throw, and then we will DD the episode body. All right. This is it. This is the moment of end-to-end truth. We're gonna see if this works. Two unpublished episodes. I wonder if it publishes it, or I wonder if it uploads it in draft mode.
It's got to. Surely, it does. Come on. Come on, come on. So we're uploading the audio, which could take a second. Come on. Oh. What?
What? Definitely thought I put this in there. Um, did I m-- Is this malformed? Oh, I think it is malformed. It's supposed to all be wrapped in an episode key. Iggy. That feels like it's my fault.
Episode. A little bit goofy 'cause it's like, well, I'm hitting the episode endpoint. Um, but hey, it's fine. It's a reasonable decision a reasonable person would make. All right. Let's see. While that is uploading, I gotta zoom in while that uploaded.
It's already done. Um, okay. I like your videos, other approaches. Yeah, you're welcome. Thanks. Yeah, I think Wistia is prohibitively expensive, I think. Um, correct. Vimeo is based on number of minutes uploaded per month, and I don't think there's a bandwidth limitation, which is kind of surprising.
Um, you can also get, you can also get, like, free outbound bandwidth with Cloudflare R2 in some ways. Um, my business partner, Steve, has figured out how to do that, and so we might be hosting the SQLite videos on R2. Um, ch-ch-ch-ch, I think it's like ban-- Um, Backblaze and Cloudflare have some sort of, like, bandwidth alliance or something like that.
How far are you with the SQLite course? Um, these are the videos I need to record today. So this is probably 12 videos I need to record today. Um, but those should be... I think I'm through the hard part. So here's, here's some of the docs, um, that I haven't covered yet, and here's some that I feel like I've covered well enough that I can put them on that side.
Um, the hard part with the SQLite stuff is I kinda have to go a lot lower, like a lot closer to the machine than I did in a, you know, for example, in my SQL course, because most people are gonna be running SQLite themselves. Um, you know, the goal is that when you put it in production, you're using Turso.
Um, but, you know, I have to cover stuff like configuring SQLite and changing the journal mode and just all of that kind of stuff. Um, so I feel a little bit like I'm, I'm below the level that I normally go to, um, 'cause most of my stuff is aimed at developers and not, you know, DBAs. But I think this still, for SQLite, the developer needs to know how to do all this stuff.
So the first two or three modules have been a little bit slow, but the second through... No, not the second. The fourth through ninth modules should be a lot quicker. So I was up here last night at 10:30 recording some videos, some SQLite videos. I think it worked.
I don't know why I'm, I don't know why I'm vamping. I think it worked. Um, I think we can just go check to see if it worked. Title. Okay, so this is odd. I didn't get, um, I would have preferred an E-E3 there. Um, we'll have to try again.
But what I care about, yeah, see? What am I doing here? Why is that, why is that the case? Um- I feel like I'm doing something silly with this audio. I mean, I guess we could-- So this is my aaronfrancis.com, and I feel like it's doing the exact same thing.
Audio format is M4A, which is the same. Then authorize upload, put it to the upload URL. Body is F open. I just don't understand. Oh, increment number.
That's cool. I should do that. Increment number. That's nice. Good job, Aaron. I feel like I'm doing something goofy here. Here's a question. Is this audio any good? I think we already discovered that it was, right? So now we're in de-debug mode. Well, I am here with Ben Johnson.
Yes, the audio is good. So the audio is good here. This is good audio. Then I get the authorized with the file name. The file name is fine. The file name is good. I'm doing something wonky. Yep, M4A. Authorize upload.
File name, file name. I just-- I'm so curious. Attach name, file name. I'm just so curious what this second param is for. Rather, this second file name param, the third param altogether.
This is so interesting to me. Here's a question. Let's go down to the factory, and let's check attach. What does it actually do? If it's an array, okay, so it's not an array. Multi-part, yes. Array filter. Pending files is name, contents, headers, and file name.
Okay. Um, pending files, where do you get used? Find usages. Um, just once. We write it in two places. Send. That's interesting. What do you do, send? Huh.
Send the request. Huh, that's odd. Um, all right. Let's look for somebody saying, "Do you see anything in the log of..." Yeah, I'll answer some of those in a second. All right. Should we, should we try to just
see... Actually, let's run this first. So we're in debug mode here, so we're gonna try some things that may feel silly. Uh, we're gonna run this one first and see if that had any effect. And then we're gonna-- So while that's running, we're gonna change... Where is M4A?
Let's change this to MP3. Oh, F, I gotta re-download that, don't I? Okay. All right, let's see if that worked. Episodes. Hey, E3. That worked. Yeah. Hmm. Hmm.
Did our video URL get set? Yeah, that's cool. That worked. All right. Let's try the whole freaking shebang with, um, MP3. So we're actually gonna go ahead and fully download it. MP3. And we'll dump out whatever the path is here, and then we're gonna actually download it.
So we're gonna start YouTube DLP with MP3 format. Uh, da, da, da. Verbose. Yes, yes, yes. File name. Um, okay. Let's just, just for make sure. I don't have M4A anywhere in this file, do I?
No. All right. We're gonna try it all the way through. Well, not all the way through. Close to all the way through. Oh, let's answer some questions while this is running. Uh, can we have dark mode, please?
No. Um, does the file you're writing locally play back? Yes. Both local. Can you do f- do a file name on both local? I don't understand that. Hello, MC. Hello from South India. It is worth trying MP3. I totally agree. Uh, Ramiz, what is your view on Laravel React with InertiaJS?
Good for bi-big projects. Yes, 100%. I think, um, I think Inertia is, I think Inertia is the secret weapon, frankly. Um, there's just nothing better, in my opinion, than Laravel on the back end. And while I don't prefer React, I understand that a lot of people do, and so I think putting them together is wonderful.
I think that's a great idea. Um, no dark mode. No. No, sorry. No dark mode All right. Let's see if that worked. So, um, the route we're going down now is to see if an MP3 worked Well, I am here- Ha ... with Ben Johnson, and Ben, I have something to- An MP3 worked.
Oh, it was easy. Um, I have heard of Hybridly. Um, I've heard of Hybridly, and I think it's very, very good. I wish-- My desire would be for Hybridly and Inertia to merge and somebody to get paid to work on Inertia.
That's my, that's my dream. Um, yeah, MP3. So here's, here's a great thing about what we just did. We didn't solve the problem. We just kind of eliminated it. I don't know, I don't know what the problem was. Who knows what the problem was? Nobody can say. Um, I mean, honestly, are we done? I think the final thing we would need to do is, is publish the episode.
Um, oh, that's a good point about the file headers. Um, oh, yeah, sorry, I missed that question. Um, AR is PHP Artisan, and sync is just this single command that we're working on here. So it syncs YouTube with Transistor.
Sync YouTube videos to Transistor as audio. Let's put that in parentheses. That makes sense, doesn't it? Cool. All right, let's walk through it from top to bottom. First, we're gonna set up a pending request with Transistor and our private key that I kept private for at least three minutes today, so that was good.
Um, that was very, very good of me. Then we're gonna go check the videos on YouTube, and we're gonna map them, uh, we're gonna map them into a sane format. In fact, I don't think we ever use that internal video ID. Um, in fact, I don't think we care.
Why would I care about created at? I wouldn't. I don't. So we're gonna map it into a sane format, and then we are going to call Transistor. Just, do I like that formatting better? I think I do.
I think it's small enough to go on one line. Um, we're gonna call Transistor and say, "Hello. Give me all of the podcasts on Transistor." And then what we're gonna do is we're gonna collect those. Ah, here's a question. Is there a collect method on here? Oh.
Oh, this is great. Look at that. Cool, cool, cool, cool. So freaking Laravel. Freaking Laravel. So I don't need to collect it, 'cause I've collected it, and this can become existing. See, now that this is on its own line, I feel like that's gotta go like that.
Um, all right. Get the episodes, collect the data, map the... This is nonsense. This is crazy. Um, so what this is doing is this is taking all of the V equals, you know, ID and timestamp equals whatever, and tracking codes equals whatever, and it's, uh, taking all of these things and filling the results array with that, which results
is just, isn't that a terrible name? Um, uh, query params. I don't like that it's two words, but it is descriptive. And I wish this could be a one-line or a short closure. This is passed by reference, um, so there's no way around that, to my knowledge.
Uh, where did it do? Then all we care about is the V equals, because those are, those are the YouTube video IDs. Uh-huh, uh-huh, uh-huh. And then we're gonna take the videos. Yep, we're gonna take the videos from up here.
Why am I splitting these up? I feel like this should go down here. These should go together. What is this return? Oh, it must be an array, 'cause I'm accessing it as an array. Um, do I use videos ever again?
I don't. So we're gonna get rid of this remaining, and we're just gonna make that remaining. That feels better, and then I can pop that guy onto a new line. That feels much better. Um, okay. So we get all of the videos, then we get the results out of the response, then we map over them and turn it into something usable, and then we reject anything that already exists in
the existing episodes, which leaves us with any that need to be uploaded. Um, remaining feels a little... Remaining is fine. Remaining is fine. So if there aren't any remaining, then bail early. Otherwise, just take the first one.
We're gonna run this every hour, so on the just insane chance that there are two videos in an hour, it'll just pick up the next hour. All right. That was for testing. We don't need that Then what are we gonna do? So we have the first one, so now we're down to just a single array that is shaped like this, and we're gonna make up a storage path.
We need to, um, unlink the path later. I'm just gonna carry this around with me. Um, then I can take that and put testing code there. Great. So we make up a storage path of a random MP3. Uh, this is just a one-liner. Let's get that up on its own. There we go. Um, still...
Yep, yep, yep. Output. I don't-- Do I super care about verbose? I don't think I do at this point. Um, and then we can output everything. Feels like that should be, like, one of those short closures, right? Um. Mm, nope. All right.
Then I'm going to run the process, wait, and throw if it fails. And then I can move... Let's, let's move this up here. You know, guys, I should've done it this way all along. File name is that. That's what I should've done all along. Hey, you live and you learn, right?
All right. Um, process, wait, throw. Authorize, yes, yes, yes. File name, yes, yes, yes. Upload. Um, create the actual episode. Upload. When can I unlink? I think after I put, I can unlink the...
I can delete the... Ah, it doesn't matter, 'cause it's gonna be running on GitHub actions, but that's fine. We'll be a good citizen anyway. And then I post the episode. Oh, what are you doing, you big goofus? Increment the number. Description is gonna come from YouTube. Title is gonna come from YouTube. Audio URL, we're gonna reconstruct that, 'cause that is the key by which we track identity.
And then I need to figure out how to make it a draft. Publish.
There we go. All right, we found the way to publish. That's the last thing we gotta do. Oh, wow. Is it actually in the documentation? Transistor accepts AAC, WAV, MP3. That's funny. Um, turns out reading the docs, very helpful. Yeah, I don't...
I, I'll be honest, I don't know the first thing about containers and encoding and all of that stuff. Um, you find you program better when you speak out loud? Uh, I don't know. I don't know if it's better. Um, it's definitely not worse, unless you think I'm bad at this, in which case it's so much worse.
You should see me when I'm not streaming. Um, but if you think this is very good, then sure, yeah, it's the same. Um, okay. Let us keep going. I have no idea how many people are here, which is interesting. I wonder if I were to check on, um, Twitter, what I would see. See, 1515 views?
That seems like there's no way there's 1,500 people here. That's what I don't understand. Um, God, these are the days. Good job, Jordan. That's what I don't understand about Twitter's live stream. Oh, wow, there's 123 on, uh, on YouTube.
That's pretty good. It doesn't discount views when users leave. Yeah, that's what it... That's what I thought. All right, let's publish this episode. One of draft, scheduled, or published. Okay. Um, so now that we're here, I bet we need the episode ID.
Do we get that back? Yeah, we get that back as a part of... There you go. All right. So, um, let's say that we're gonna do this. We're gonna do throw JSON.
The key is data. Can I do, like, data.id? Do we know if that works? Data get. Hell yeah. We can do dots. Perfect. 'Cause they use data get under the hood, so we can use dots out here. Data.id. So this becomes, uh, episode ID.
Then we can say transistor is probably post. Patch. Wow. Good job. I mean, that's like, that's like super technically correct. Um, patch URL and data. Patch, man.
That's crazy. Episodes. S- I think it's status, and the status is published One of published.
Yep, so I'm hitting, hitting publish, or I'm hitting... Well, that's weird. I'm hitting publish with the status of published. Publish with the status of published. Should we just run the whole thing, like, from, from checking YouTube to downloading to publishing? I feel like we should. Uh, uh, um, let's...
If we're gonna check, we need to delete these, um, we need to delete these draft episodes. Oh, man, this is a pain. Ugh, they're drafts. Oh, silly, silly, silly.
Okay, getting close. One more we gotta delete. That should leave us with... Let's add some, let's add some logging so we know what we're doing here. Um, okay. Uh, doo, doo, doo, doo. Um, no, not prompts info, uh, this info.
There are... Hmm. I'm gonna mess something up with the logging, and it's all gonna break. There are, uh, doo, doo, doo, episodes on YouTube that need to be published.
All right, so there are that many episodes on YouTube that need to... That's not, that's not even close to what that is. Um, that's on Transistor that are already published. Feels a little too wordy. Um, mm, mm, mm.
See, that's not even that's, uh, it's not, it's not a collection. Come on, Aaron, get it together. Okay, and that should show us the IDs.
Yep, and then, mm-hmm, there are no episodes that need to go on Transistor. I'm hoping that this is just going to work. There are episodes that need to go on Transistor.
Um... Oh, if we're gonna do it, let's go ahead and do it. Um, file name, file name. I don't want all of that output right now. Mm, mm, mm, mm.
Uploading. I think are line and info the same thing? One can never be sure. Uh, ch, ch, ch. And then deleting file. I think we're there. Just wanna make sure.
Um, episode uploaded ID. Episode ID. Um, yeah. God, why do I keep switching between, uh, line and info?
Episode published. All right. I'm gonna check chat to make sure y'all haven't caught something stupid that I've done. Uh, hard to see light mode. Yeah, sorry. Too many buttons to delete. Yeah. Quick question, besides storing the audio version of the video, wouldn't playing back the audio from YouTube directly be better?
I don't understand. Um, people want to subscribe to an audio-only thing so that it can download. So that's why I'm creating an audio podcast. This is harder than JavaScript. Yeah, dunno. Beats me.
I like it. Um, okay, I think that's it. Shall we run it? Shall we see if it worked, and then we can push it to GitHub and make GitHub do all the work for us? Database School has two videos, you know, fake videos on here. Um, let's run it.
What's the worst that could happen? I could leak my keys, and y'all could bankrupt me. That's probably the worst that could happen. Okay, two episodes on Transistor. They are those two. There are episodes that need to go to Transistor. Uh, the file name where we're putting this stuff is wtx Is there an extra light mode?
Actually, watch my face. Like, watch the color of my face. Ah. That's act- that's extra light mode. I have a button I can push to turn it down. Um, ah. Ch-ch-ch-choo. This stack is...
Hey, it looks like it worked. Oh, interesting. There's the difference between info and line. Line just puts out a lame, uh, ooh, I almost said, almost said a bad word. Puts out a lame color, where info puts out nice and green. Um, this is Laravel. This is the stack. Uh, another service in transition, storing to S3, et cetera.
Yep, yep, yep, yep, yep. People want the pod. People don't want, uh, people don't wanna have to rely on bandwidth to get to YouTube if they're, like, on a train or something. I understand trains exist in certain places. Display buddy. I need to turn the brightness of that monitor back up.
There we go. Now I can actually read your chat. All right. I think it worked. I don't know what we're all waiting around listening to me for. Um, hey. Yes. Distributed SQLite Lightstream. Boy, I sure feel like that should've published though, don't you?
Um, I feel like that should've published. Why did that not publish? Why did that not published? So, uh, we gotta figure that out, first of all.
But distributed Lightstream, Lightstream audio. Well, I am here with Ben Johnson, and Ben, I have something to show you that I did not warn you about.
Unidentified
Tell me.
Aaron Francis
Audio. Description. Bingo, bango, bongo. There we go. I do feel like there should be line breaks there. Video URL. So in theory, um, I gotta figure out why that didn't publish. In theory, I should be able to run this again, and it should say, "No episodes ready." Hey.
Aha, unlimited power. Um, 10:38. Guys, I gotta get to work. One of the great things about working for yourself is you can do just whatever you want. The, the not having a job part of not having a job is pretty awesome. The not having a paycheck part of not having a job is worse, I will admit.
Ugh. If there's one th- if there's one thing I miss about the old company, it is their promptly deposited paychecks. That's for sure. That was a good thing. We had a good thing going there. We had fun, didn't we? Didn't we have fun? Um, let's try... Um, okay, so this, this is the episode ID.
This is the episode ID. Um, we're gonna skip everything. We're gonna skip everything. In fact, we're gonna take this episode ID, and we're just gonna yoink this, and we're gonna come to the very top.
Oh, heck yeah. It's right after that. Um, um, yeah, let's just dd response. It might be, it might have gotten a 422, and I didn't throw, and so it might have just said, "You did this wrong," and I wasn't listening.
Oh, F me. I did it again. You turkey. Come on, man. Read the docs. You're always talking about reading the docs, and then like a big old goofus, you just don't read the docs. All right. Episode. Gotta wrap it in episode. Let's try this again. Did it work?
Did it work? Did it work? Ta-da. Feels good, man, must admit. Feels good, man. All right, so let's yoink, kill all that.
Come back down here. And what did we change? We changed that. And for future safety, we'll add a throw on there. Do I have a... Am I not throwing anywhere else? No, I'm throwing everywhere. I don't want to think something succeeded when it didn't actually succeed.
Heck yeah. Cool. It worked. I did it. I'm the smartest man alive. This is great. Um, all right, let's take a look, just RQ at this deploy workflow.
I feel like that shouldn't be called deploy Um, so we're gonna set up DLP, set up PHP, composer install. I don't need that ID anymore. I do need to paste my-- shh, you're not gonna fool me twice. Um, sync. I don't need to commit anything.
I don't need to deploy to Vapor. I don't need to deploy to Vapor. All right. Here is... I actually wanna do this on push too, just because, um... So this is the GitHub Action. We'll do it on workflow_dispatch.
I don't remember what that is. I think maybe that's so I can run it manually. That's fine. Um, I think this is gonna be called main. All right. Um, let's see. Okay, let's see.
React can be harder than PHP. How do you... You're currently at work. Uh, yeah, I guess I'm currently at work, but nobody's paying me for it. Ten thirty-eight. I am in the Lone Star State. There is only one, um, state in the Central Time zone. Don't listen to these other people. There's only one. It's just Texas.
Yeah, adds a button to trigger it manually. Cool. That's what I want. Deep in the heart of Texas. That's right. GitHub Actions have a ton of flexibility. You better believe it. All right. Um, here, let's try this. I wanna see if this new button I rigged up... Hey, cool. It's all blurry now, right?
So now I can do stuff. I can go look at all these, uh, secret keys and not get in trouble for it. Um, so let me go create... I'm just afraid I'm gonna show something that I shouldn't.
I'm gonna create a private repository called database-school. Okay. So that seems fine, right? Uh, you wish, Josh. All the windows are boarded up in here. Can't see anything.
Um, set up in GitHub desktop. Yes, let's do that. I'm just, I'm just setting this up as a Git repository, and I'm, I'm scared, so I've blurred everything.
It's not your connection. Fear not. We're almost there.
I'm just making sure that I don't be a doofus again. Um, okay, I don't think I'm doing anything silly. Yeah.
Ah, I should've just done it from the freaking command line, huh? Hmm. This is okay. Give me two seconds. I'm almost done. Just making sure I don't accidentally... In GitHub, I get super scared 'cause there's, there's good stuff in here. This is where all the secrets live. I want to delete that repository.
Oh, now I gotta freaking confirm. Guys, I just want this to run on GitHub Actions and see that I never have to think about it again. Okay. Yep, yep, yep. Okay, here comes database-school.
Okay. First, commit to main, and let's push it up. Okay, I think it worked. All right. We're back, baby. Um, yeah, so I think this is gonna fail 'cause I, in all that time that I had the screen blurred, I didn't set the YouTube key.
So what were you doing? I don't really know. Um, all right. So it is running. Set up PHP. Yep, yep, yep. Set up YouTube DLP. Cool, man. Composer install. Awesome. Google API key is required. Hey, we all saw that coming, didn't we?
Except for me. Blur. Um, very happy with my new blurring abilities. YouTube API key, 'cause I had to freaking roll these keys yesterday like a big old dummy. Um, so I'm gonna go to Settings. I'll show you. I'm gonna go to Settings, Secrets and variables, Actions, Manage environment secrets, New environment.
Nope. That's probably not what I want. Repository secrets. Uh, YouTube API key. Yeah, right. There we go. YouTube API key is set to that. And let's just go check. Okay, cool.
That is-- So this sync content step in the GitHub Action, I'm gonna pass YouTube API key as an env variable, and it's gonna come from the secrets, uh, YouTube API key, which is the thing that I just set up. Um, is there a reason why you do this in GitHub Actions instead of Forge deploy?
Yeah, 'cause I'm actually not deploying it anywhere. Like, there's, it doesn't go anywhere. It just goes on GitHub, and GitHub is gonna be, GitHub's gonna be the runner for everything. Um, how do you do that git empty commit thing? 'Cause I just wanna... Oh, I think I can probably just rerun it from here, right?
Um, rerun. Here's the thing. Uh, is there aren't any episodes required? There's nothing that needs to be uploaded, so I gotta delete this guy again. See, now it makes sense that it's a published episode. Yeah. Okay.
All right. Let's rerun this, having put my YouTube API key into the GitHub secrets. Let us rerun this job. And let's see if this works. Who's this guy? Hey. Who's, who are you, Max Diamond?
Git commit allow empty. Yeah, that's the one. Yeah, it's the one. You're running the Artisan command with GitHub. Bingo. Bingo bongo. Boy, um, there's a lot of chat here. Wah-wah, something failed. See, F, I knew that that was potentially a problem.
Um, GitHub Actions can be run on Cron. Yes, it can. It is very cool. Um, hey, you're from Collin County. I'm from Dallas County. Mm, mm, mm. Why are you watching Corn? I don't know what the answer to that is. Uh, I think Theo needs a little...
He's leaking keys. Well, we all leak keys, don't we? Uh, hey, you could define throw on the HTTP client for Transistor. It'll be on all requests. That's a pretty good idea. Huh, I like that. I answered the Forge deploy script. You're running Artisan.
Yes, yes, yes. AI response. Get out of here, Max. You and Josh and the other Neuromancer guy, you guys are trouble. Uh, Transistor, it said Transistor has zero episodes. Did it really? So here's the thing. Um, I think with YouTube DLP, to get it into MP3, it requires FFmpeg.
I think that's why I went M4A or MP4 earlier, um, 'cause there, look, it's downloading. It downloaded the whole thing, and then it tried to convert it. Um, all right. So somebody says, somebody says there's a set up FFmpeg. Let's try that. Uh, GitHub Actions, set up FF... Too many Ps.
FFmpeg. Is this the good one? Is this the one that I want? Probably. Not my computer, not my problem. Let's just see if it works. Uh, set up DLP. Do I need to do anything else?
Set up MPEG, FFmpeg three point one. Sure. Who cares? Is that gonna be... Oh, man. Oh, man. Oh, man. Oh, man. Um, what's the best way to find out?
Just freaking try it. Uh, okay. Let's get rid of storage. These guys are cluttering everything up. Did I get them all? Did I miss one? I got them all. All right. Yep, that's fine. Commit to main. All right.
Let's see if FFmpeg is there now. Yep. Mm-hmm. And now we've entered that part of the stream where we're just debugging GitHub Actions, so it could, uh, this could take the rest of the year, honestly.
All right. So it's setting up FFmpeg. Hopefully, it will be available. There are zero episodes on Twitter. No. Or on Transistor. There should be at least two, right? There are episodes that need to go on Transistor. You know what?
Hey, dummy. Oh, you gotta put your Transistor key in there, you big goof. Come on, man. Gotta step your game up. Uh, secrets, secrets, secrets. I do know that you can't see the secrets anymore, so I'm, I'm happy there.
But I gotta put a new one in. So I need to put, um... What is it expecting? Transistor key. Boy, I super thought I forgot to blur. I have, uh, I'm gun-shy now. All right.
I have a transistor key there now, and what's going on here? What's going on here? No, what's going on here? I don't know. I don't know where it is anymore. Uh, so now in here, sync content, I need to do the same deal. Transistor key.
So it said there were zero episodes because it-- honestly, it returned a four-oh-nine or whatever, four-twenty-two. So it's not four-twenty-two. Four-oh-three maybe. Um, all right. Let's run this bad boy again. We're about to see this thing work once and for all. Yep, that failed.
Why did that fail, though? That's an interesting question. Yeah, there we go, four-oh-one unauthorized. All right, friendos. Let's see what's going on. Nice blur feature. Thank you. Somebody DMed that to me yesterday after I dorked it up so many times.
Are you live on Twitter? I think so. I hope so. Someone should make something to run GitHub Actions locally. Yeah, that exists, but I feel like, um... I, I forget what it's called. That exists, but I feel like it-- there's just no way it can be the same. There's no way. A fifteen-second stream buffering.
Well, well, well. That is interesting. Act, yeah, that's the package. That's right. Um, fifteen-second stream buffering. Well, that's kinda cool. Hey, look. Ah. Ah. Did we do it?
Did we do it? We did it. Published directly from GitHub Actions. Ha-ha! I never have to look at this again. It's gonna run every hour, it's gonna pull that playlist, and it's gonna publish episodes.
This freakin' rules. First try. Yeah. Definitely, definitely first try. When I edit this, uh, together for a YouTube video, it's gonna be like, "Oh, yeah, you just gotta look out for all these, all these little edge cases that I definitely know about." How cool is that?
This is great. I'm super pumped. Um, let's freakin' do it again. Let's do it again. Let's do it again. Uh, let's delete these other two. So these are the old, uh, ones that I hard-coded. We gotta type in the nuclear launch codes to delete these episodes. Um, oh, do I care if the first three are out of order?
You know what? Of things I care about, that's not on the list. In fact, there are, um, there are very few things that I care about. But the things I care about, I care about deeply. But there are just so many things I don't care about. I feel like that's a superpower. All right, so yeah, I don't think I can help you improve anything.
Um, no, I thought there was like workflow dispatch would let me run it with a button. Oh, it does. Whoops, my bad. Uh, run workflow from main. Yeah, yeah, yeah, yeah, yeah, yeah, yeah. So state of the union.
We've got one episode up here. We've got three episodes over here. We should be able to run this GitHub Action for free, and it should upload one episode. Do I care that it's not two? I do not, 'cause I'm gonna run this once every hour. Um, so this should now start backfilling the other two episodes.
Doesn't care about us. Do care about you, but I don't care about arguing with people on the internet. Um, how do you make your tabs rounded? See, this is a great one. Uh, how do you make your tabs rounded on Chrome? I have no idea. I have no clue how that happened. Don't know where it came from.
It looks cool. Don't know. Haven't ever investigated it. Just, I feel like the same with my item. It's like I just... This is just kinda what it looks like. Um, I don't have a lot of dot files. It's just like, I don't know, just kinda, just kinda make it work. Not very sophisticated. Okay.
Max Diamond is not a troll. Well, I don't know if he's a troll, but he's friendly. Um, I think I like friendly trolls. I don't like mean trolls, and I also don't like mean people that aren't trolls. You can be mean and not a troll, and you're just mean, and I don't... Why would you be mean when you could be not mean?
Have you ever thought about that in your life? Um, okay. Hey, it worked. Life is easy. Programming is fun. Boom. Ra-ra-ra-pa-pa-doo. I don't... Well, I, I actually do want that to be episode one. That's fine. Um, let's run it again. Let's get all three of those bad boys on there. Uh, ch-ch-ch-ch-ch-ch.
Run workflow, run workflow. This should put the third one on there, and then, friendos, I think we're done. I think we freaking did it. So here's the question. Um, yeah, Neovim. Neovim is great. Ne- Neovim is great. That's awesome. That's another one where I'm like, "Huh, I'm happy that you're happy." I'm satisfied using PhpStorm like a doofus, like a big nerd.
Um, that's fine with me. Starting to feel the same. Oh, that's great. I love that. I love that, Josh. Um, then run it again so it works without new episodes. I don't understand that. Um, won't GitHub Action cron job stop after some time if no activity?
That's a good question. I think it actually does. I think it's, like, some number, some number of months or something it'll stop if nothing's been pushed. Um, just had to check the hair there for a second. And, uh, yeah, I feel like that could be a problem. You know whose problem that is?
My future problem, not my current problem. Why be mean when you can be cute? That's a great question. It's a great question. Why would you be mean? So what do we do when CI/CD is running? We check on Twitter, see what's going on.
What's going on? This is great. This is great. This whole get the HVAC guy on the show, that was great. Um, X won't load. That's interesting. I wonder if it's not working for people on Twitter. Hmm. That would be a pity, wouldn't it? Especially just to be learning that now.
Oh, I think this should be... Hey, I just made that video. Looks like he just wrote an article. Um, hmm, hmm, hmm. It would be a real shame if it's not actually working on Twitter. Oh, it's working on Twitter just fine.
You goofus. All right. I think that's it. Are we done? Offline multiplayer first, SQLite. So can I change these? Hey, yeah, sure can. I'm gonna change that one to number two. Save changes. Um, now they're all out of order.
Um, let's change this one to episode number one. And let's... Can we change this created at date? Published at. You know what we can do? You can just delete it.
Um, actually, this offline multi first player, multiplayer should be number three. This is so stupid. Um, okay. All right, I'm gonna let these run. What do you guys wanna talk about while these run? And then I'm gonna log off. So, boy, is this gonna put the last two in the wrong order?
It might. We're gonna run it again. All right. What do you guys wanna talk about? Let's go to DM and then... Okay, let's go up more. Let's go up more. Future self will always find a solution. Yeah, hair looks good. Thanks. Sometimes I feel, like, sometimes I feel like it gets a little too tall over here, and I feel like the side-- I'm trying to do a thing, but I feel like the sides are getting a little, sides are getting a little puffy.
I'm trying to keep those down. Plugins look like in PhpStorm. Yeah, I don't, I don't think I have any. Like, I don't use Laravel Idea or anything. Um, you should just use whatever makes you get the job done. I agree. Um, oh, sorry, Max. My bad, dog. Um, OBS Studio. No, remind me later.
I'm doing a thing right now. 1800 Twitter live. I just don't know if I believe that. Um, the course from Renick is good. Michael, the course from Renick is good. It's still, um, it's a little bit out of date, but it's still, it's still good. Um, hey, thanks, Lemna. Oh, Josh.
How do you do that? That's a great idea. How do you set the title of a workflow from within the workflow? That's a great idea. Uh, the Renick course is not necessarily out of date. It's just, like, six years old, and so there might be new methods or changed methods.
Um, I still, I still recommend it. Whoa. Race conditions. Man. That's funny.
I did a manual one and- Josh is correct. It did the cron one at the same time. You know whose problem that is? Future me. All right. So Josh had a great idea. Um, uh, pa, pa, pa.
Josh had a great idea to set the... Let's see, um, 'cause it would be cool if you could come in here and see, like, published episode name. So let's see, um, set title, GitHub Action. Set output? Name? Murr, what do you do? Workflow commands.
S-s-s-s-s-s. Setting an output parameter, adding a job summary. Output name, you think that's right? Just don't run it manually. Honestly, that is, that is correct. Selected color. Mm.
Job summary could fit, I agree, but I thought if there's a way to set the, the workflow name, that would be even cooler. Workflow command parameter, toolkit, annotations. Does anyone know if this is actually possible to set
the name of the... Job summary. Job summary could work if that's the best we can do. I wanna set the name...
I think I might have to do, like, a job summary. I can't figure out how to make this... I wanna set publish new database school episodes. I want that to be the actual name of the episode that was just published. I feel like that would be weird if you could, um... I feel like that would be weird if you could rename the workflow from within the workflow.
Weird in, like, a that's super awesome kinda way. There we go. All three episodes are live, and as long as I don't ever manually run it when one of the scheduled ones is running, we won't have any race conditions. Let's make sure that when we run it again, it handles...
This should just be a no-op. Um, it should just handle that just fine. Yeah, I know that I can get, I know that I can, um, get... Like, I know that I can pass the name of the episode, but I'm wondering how do I set... Like, after I get the name of the episode out, how do I set it in GitHub actions?
This is the step that makes that happen. Um, let's look real quick at output s- uh, job summary. Let's just, um... Let's just see what the job summary looks
like regardless. Is that, is that gonna work? Um, we're s- we're firmly into being extra at this point, but might as well.
Um, okay. So what else, what else do we wanna talk about? Run name. Oh, hang on. Run name. We might have a winner. GitHub Actions run name.
Hmm. The name for workflow is very... This might be right. Do we think this is right?
Oh, whoa, whoa. Who's, who's coming in here and shouting with the all caps? Hello, TargetX. Um, yeah, I'm taking videos from, uh, from a YouTube playlist and uploading them to Transistor via GitHub Actions with Laravel. Um, one minute ago should say... Uh, this part should say no new episodes.
Yeah, no new episodes. Oh, Cynthia, uh, did the summary work? Publish summary? Oh, that's... I don't wanna click in. Ain't nobody got time for that. Um, merp, merp, that's gone.
Um, can I just put this- Where can I put this? Where can I put the run name? Um, why is everyone shouting now? What are we doing? This is so-- It's so much shouting.
Am I shill for SQLite? Yeah, the course will come out in two weeks. Let's call it, let's call it two weeks. I feel, I feel, um, not qualified to handle this run name thing. Because what I need to get-- So what I need to get for run name is I would need to get some output from this command here, but I think run name has to go, like, way up, way
up here or something with inputs. I just, I don't think I can make this happen. If y'all think I can make this happen, tell me somewhere else, 'cause I don't feel like I can do that right now. See, it can refer-- it can reference GitHub and inputs, but it can't reference an output of a previous step.
So that's fine. It would've been nice, but honestly, that's a bonus. Um, so y'all, I think we're done. I think we did it. Um, the thing I wanna work on next time, um... Oh, Aaron, where did you put that? Where in the world did you put that?
Bench. Yes, this is right. The thing I wanna work on next time is this command. So this is, um, this is a command I'm writing for the SQLite course that...
God, that's fast. God, that is so fast. Um, spins up, it spins up, like, 25 different, I think, you know, right now it's 25. Spins up 25 different processes and hammers a SQLite database with a bunch of reads and writes. Um, but I think this could be, I think this could be prettier. I think this could be more configurable.
Um, let me just show you this command. It's kinda awesome, I'm not gonna lie. It's very awesome. This is it. Um, yeah. So this is what I wanna do next time. I find streaming is very, uh, very helpful for getting stuff done, surprisingly, even with all you turkeys trying to distract me.
All right. So this bench command, which we'll look at next time, um, you can have a number of processes. We can turn this down to 10, and we can run this again. And so it waits, it gets 10 processes going, and then it just slams it with 25,000 queries each and then reports back the response times.
We can make it 50. Let's, let's go, let's make it 50. And then boom, there we go. SQLite go brr, right? Okay. So yep, there we go. Um, it's so great. I love it so much. It spins up the same process. So there's one, there's one, like, supervisor and one, and, you know, 50 or 10 or whatever children, but they're the same command.
It's just a matter of passing in child, um, child instead of not child. And then it does all this running stuff and drawing stuff and counts up a bunch of stuff, and then the children processes, the child processes, um, spin themselves up.
But I don't let them start until everybody has spun up, 'cause I don't want, I don't want everybody to start. Like, I don't want one process to start while Laravel's still spinning up, you know, 99 others, and the timing gets all wonky. Um, you can see right here, this is not actually benchmarking anything, 'cause it's just a select one. Um, and then I write the timings to a JSON file, and then in the parent process, it reads all the timings and averages them down.
So we get percentile reads, percentile writes, and that's what constructs this table here, reads and writes. So that's what I wanna work on tomorrow, um, because I super-duper need this to work for the course so that I can prove to haters that SQLite is awesome. So hey, what do we got? Missed, uh, missed a bunch of chat.
We're gonna... Oh, do I switch to cam only? I could switch to cam only, but then y'all lose the chat that's on there, so that's no good. Um, I should change... Oh, cool. The blur actually doesn't blur out the chat. Nice. So, so smart, Aaron. Um, SQLite, need to make some money before then.
We're all so excited. How much will it cost? No idea. Um, I love this stream so much. Thank you for shouting. Laravel Zero is awesome. Laravel Zero, Zero rules. Run name, but not necessary. Totally extra. Open source. Ah, open source. Those are the worst. Um, we can come in and do it. Isn't the community awesome? I should make this open source.
Why would I not do that? Why would I not do that? Should I make this open source? Why would I not do that? Why would I... There's no reason. This should be open source. Uh, bench command would cost you 60K on Vercel. Yeah. Yeah, it certainly would, and it would not be very fast.
Um- What if we did that against Postgres or MySQL? That'd be great. It would be interesting to find. Um, need a cam plus chat, just talking scene. Yeah. Yep, yep, yep. Yep, yep, yep. Oh, here's the problem, Levi. I don't know what do it means. What is-- What are we... I've already moved on mentally. Open source it? I should open source it, is that what you're saying?
Is that what do it means? Um, it's gonna make no sense being open sourced as a database school, but that's fine. Okay. All right. I need all the good people of chat to tell me, am I doing something stupid here?
I haven't committed anything. There's no .env in here. My secrets are still secret. Even if I open source this repo, nobody can see the secrets. I think this is okay. I don't think there are any secrets in here. I think this is okay.
There's no secrets in the actions output. I think they're pretty... They're, they're pretty careful about that. And if there are secrets, you're about to see 'em. Um, no, it would be in the sync content. And I think... Yeah, there you go. Secrets are redacted in their logs.
Yeah. What's the worst that could happen? What's the worst that could happen? Any string that equals a secret will, will be removed. That's pretty boss, I gotta admit. That's, that's super cool. Good for them. Um, is this down in the danger zone?
Yeah. Change to public. All right. It's been good knowing you. Anyone can fork. Yep. Um, yep, yep, yep, yep, yep. That's it.
It's public. Ta-da. Um, no, I never had a secret in commit history. Not in this one. I mean, in other ones, yes. Um, I swear, if you say... If there's something that actually leaked, uh, double-check before you do it.
I did. First star. Did he really get the first star? Two. Look at that. I don't... I just... I, I really don't even know how to view the stargazers without starring it myself. I don't care. Um, I confirmed my two FA earlier to set the secret.
Um, so I was already in pseudo mode or whatever. Pseudo? Pseudo? Nice. Well, I guess I'm gonna log off. Um, under About section. Under the About section. There we go. Hey, look at that, friendos.
Just the gang. Just the gang. All right, is there anything else you wanna know before I call it a stream day and actually start getting to work? Anything? Anything? Anything? Gotta wait for the latency. Nothing? No chats? No chats?
No chats. All right. Nice stream. Thank you. I appreciate that. I do like streaming. Thank you, Josh. Uh, thoughts on Filament? Filament's great. Filament is really, really great. Um, how are you doing? I am doing w-well. You're welcome, Jack.
I do enjoy streaming. I am tired, Chirkum, if that's a question. I am quite, quite sleepy. Not just like today, just kinda like existentially. Um, you're welcome, Timur. Team-Timur. Timur. Aw, that's very nice of you.
Thank you. Hey, there he is, the guy that took down Amazon S3 himself. Not in like a technological way, but in like a political way. He, he really made them dance, didn't he? Hello, AJ. You were here. You are, you are here, Dustin. You're not just were, you are.
All right. Well, this was fun. The, uh, repo is live and open source. Um, if you ever need to take a YouTube playlist and turn it into a transistor podcast, I got you. You can do that. So now I just need to get some artwork made by producer Steve, upload it here, upload it here, and then people can start listening to these episodes, um, as audio offline
whenever they want. So thanks for hanging out. This was fun. I do enjoy, I do enjoy doing this. I, I like it a lot more than streaming on Twitch. It's just I, I, I really like y'all. It's a good crowd. Um, all right. Until the next time. I will see you on Twitter. So long.