Episode: 2489 Title: HPR2489: CONTEXT IS EVERYTHING Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr2489/hpr2489.mp3 Transcribed: 2025-10-19 04:04:13 --- This in HPR episode 2,489 entitled, context in everything, it is hosted by Lost in Drunks and is about 19 minutes long and can remain an explicit flag. The summary is, rebound load of Lost in Drunks creates a tiny video from a large audio file. This episode of HPR is brought to you by an honesthost.com. Get 15% discount on all shared hosting with the offer code HPR15, that's HPR15. Better web hosting that's honest and fair at An Honesthost.com. Hello, this is Lost in Drunks and you'll have to forgive the sound quality I'm in the car, so it won't sound good and I apologize for that. But the choices do this in the car now while I have an opportunity or not do it at all, so there you go. Today's episode I want to call context is everything and because it is, it's going to require a little bit of background to make any sense. And this is going to sound like self-promotion, which on a certain level I suppose it is, but again, it matters to get this story up. I am a writer, a podcaster and a voice actor and I have produced three novels so far in a science fiction series I call Star Drifter and I have produced the audiobook versions of those novels as well. Now that's important, I have those books on several places on the internet and they're free for download, etc., etc. I even host them on my own server. So they're not hard to come by but they're not everywhere. Well, currently I spend a fair amount of my time on mastodon, the federated kind of Twitter-like service that exists. And one of the things about a mastodon, at least the server that I'm on, is that media files have a very hard limit. Now I can post links to my audio and have in the past, but that's not the same as actually offering it up on the site. As everyone knows, if you can offer something on the site, it makes a bigger impression. People are more likely to check it out. Plus, if they don't have to leave, that's a better thing, right? They can click it, they can listen and they can continue scrolling and doing whatever they want without ever actually leaving mastodon. So that was my goal, but because mastodon has a very hard limit on the media files you can upload, as well as it only offers static images and video files. And that's it. You can't attach just arbitrary content like a text file or something like that, and that's a security thing. And specifically, and most importantly, for this episode, you cannot attach audio only files. Now, mastodon is not alone in this. Most services don't allow you to do this. I don't think Twitter allows it, Facebook allows it, Google Plus, I don't think any of them allow it. And most of them, when asked or when people talk about it, they usually figure, well, it's because people will post pirated content and the music industry is litigation happy. They will sue anybody at any time for any reason whatsoever. So they just don't put the ability to attach audio files so that people don't put copyrighted music on them. I believe that that's probably true. I also believe it is short-sighted and largely erroneous because you already have sites like YouTube and SoundCloud and a whole bunch of others that routinely have to deal with this same problem. And they find ways of doing it without getting sued into extinction. In other words, I think it should be possible, but especially for something like a federated service as mastodon is, where individual people, not big corporations, but just regular folks are hosting this server and are therefore possibly opening themselves up to litigation. Yeah, it probably makes sense to take precautions in that regard. I mean, there are a lot of bad players out there and the music industry is litigation happy and they are likely to be petty and nasty about such things. So, okay, that's the state of things. I cannot put my audio content, my audiobooks up on mastodon in and of themselves. They have to be video. And now the video that mastodon offers up is web video. So it would be like HTML5, WebM, H264, that sort of thing, right? Well, as I say, there are also hard limitations on how big the file can be. And as far as I understand it, at least for the server that I use, the limitation is only eight megabytes. Well, the first book in the series, yeah, book is kind of a generous term. It's really a novella. It's in three parts and the very first part is 50 minutes long. Even encoded into halfway decent audio, it's something like 25 to 30 megabytes or more. That's not going to work. Obviously. And of course, it can't just be that. It's also got to be in video format, which often inflates the size terribly. So what are we looking at? First off, the end goal is to get it on there. To get it on there, it has to be in video format. It also has to be very small. Video in this case is going to be video with either no image or with a static image just sitting there. Now, no image actually greatly reduces the size of the finished video. But there were other reasons why I didn't want to just go in that direction. And I'll get into that in a little bit. So yes, we have to convert it. Now, it starts life as a wave file, which is over, I think it was about 260 megabytes in size. And that was a finished thing includes intro music and all of that other stuff. And that's just that one part. That's part one. So what's my process? I have to find a codec that will allow me to scrunch this down to a very small size. And then convert it into a video that will play in a modern web browser and something that will fit within the mastodon framework. Now, this is a series of challenges here. And I am not a coding guy. I am not a tech guy. I am a Linux user, but I'm a user. I'm not a developer. But this was a specific need. Now, there are tools that are available under Linux and other Unix-like systems. And many of them are actually cross platforms, so they're available for Windows and Mac and what have you. But they can be very difficult to use or difficult might be a, that's kind of a loaded word, right? Difficult to loaded word. They're unfamiliar to me and to a lot of people as it turns out. But okay, looking at the various choices that are out there for audio codecs, really, there's only one that's going to fit the bill here. And that's Opus. Now, there have been some really good episodes about Opus on HPR. And I strongly recommend that you do some research. And there's been a lot of talk and a lot of chatter about Opus. Now, I have also been a big critic of Opus myself in the past and still am in certain contexts. My biggest issue is that despite the fact that it has been around now for quite a while and it is now an open web standard, it is still not very well supported in a lot of audio or media players and devices. A lot of phones still have trouble playing it. Media players, classic iPod and Sans Eclipse and stuff like that still have trouble playing it. There's still not a tremendous amount of support for it even after all this time. Now, I think that's because MP3s are just ubiquitous. And I've got there before Opus and that's still pretty popular as well. But at any rate, Opus can do an awful lot of things. In many ways, it's your one-stop audio solution in a lot of ways. It can do streaming, it can do very high quality, and it can also, in the most important part, regarding this episode, it can be crunched down into a very small size. Now, I've been a Speaks fan for a long time and I have an awful lot of my content in Speaks format in various places. Speaks is deprecated. Opus is the new Speaks. And as I say, there are many reasons why it's a good choice. But it is not easy to wrap your head around because there are many options and many ways to scramble an egg here. But it is indeed the only choice available for this one particular job. And that is because Opus is a web standard and it will work in a WebM video. That matters. That matters a lot. And in fact, that made it the only choice. So, the first thing is to convert the large weight file into a small Opus file. Now, if you do it directly, you do end up with a much smaller file. However, if you take another step and convert the weight file into a flack file, also a free and open standard, if you do that step first, you actually end up with a smaller file at the end without sacrificing sound quality at this step. Just simply because you chose to do that. If you do something like a lossy audio, like you say, well, I'm going to start with my MP3 or my AUG. Well, that's lossy and you're going to a very lossy version at the very end. So, you don't want to do that. You want to start with something that's as good as it's going to sound and then get small. So, my first step was to convert the weight file to a flack file. Well, as it turned out, I already had flack files of the original because that's what I had exported when I first finished producing it. So, that was a step I didn't have to make. But I will have to do it with other audio content later on if I continue to do this. And I think I will. Once you have that flack file, and this is a stereo flack file, and it's a pretty high quality, I consider it pretty good anyway. It then goes into Opus Enk, which is part of the Opus Tools package that can be found in many most probably repositories for Linux and Unix-like systems. Opus Tools has three components or three tools packaged up, and they are command line tools. The first is Opus Enk, Opus OPUS ENC. The next is Opus Deck. Obviously, Opus Enk is Opus Encoder, Opus Deck is Opus D-Coder, and then finally Opus Info. And these are all one word, and they all do pretty much what they sound like. Now, before I get into the nuts and bolts of this, let me just say I'm not really going to do the nuts and bolts over audio. I'm not going to read out a long string of commands with flags and stuff like that because I think it's really easy to screw that up either on my end or on your end listening. What I'll do is I will put in what worked for me into the show notes, and you can use or not what you see there. And there may be good reasons not to use it, and that's what really this is all about. Remember, context is everything, and that's what this is all about, so hold on. Okay, so Opus is our weapon of choice for the audio, but it isn't audio that we're ultimately going to end up with. We need video. And for that, we use FFM Peg. I suppose you could also use AV Comf if you want, I don't know, for a while it was built as the successor to FFM Peg, and it's also kind of now faded away. It seems like FFM Peg is back to its former glory. It was always my personal preference anyway, but at any rate, the thing about FFM Peg in Opus, the thing they have in common is that they have options. In order to get what you need, they have many flags. Now, FFM Peg has got a huge number. It is a massive program, not in size, but in capability. And because it has a lot of capabilities, there are many parameters you can put in in order to get the exact kind of video file that you're after. Trying to figure that out. This is really the crux of this conversation, because again, I'm not really talking about how I did this, although I am. But by doing so, I'm hoping to illustrate a very common problem that I think we have in the sort of tech world, as I said, not that I'm really a part of it. But I am a user, and very often I need to use a tool that I don't understand very well, because it's not an easy process to learn how to use a lot of these things. Something like FFM Peg, if you need something that's very, very specific, that's the tool to use, because you can get very specific with it. Well, this time I needed something fairly specific, not. It's not necessarily brain surgery here, but we are talking about something that was definitely outside of my sphere of knowledge. How do I take this tiny opus file that I have just created, and again, the exact arguments that I used in opus ink, I will have those in the show notes. Same with FFM Peg, because I did solve this. I did get where I wanted to go with this, but getting there was a problem. And the biggest problem I don't think is that people don't care. Many people care. Many people want to solve a problem when you have it. I've noticed that to be true. Now very often their help isn't all that helpful. Very often they'll give you really completely useless answers like, oh, just forget about it and start over with something else. Or why do you want to do that? You should be doing this instead of actually addressing the question. They give you an answer, and the first instinct you have that comes to your head is that wasn't the question. If you could just stay focused on the question. So I don't have to write five paragraphs explaining why I need what I need. If we could just stay focused on the question, that would help an awful lot. Well, that's the first hurdle that you have to get over when you're dealing with this sort of problem, because of course the man page is a very good source of information. But much of that is, I don't want to say it's poorly written, but it's written for people who already understand what these tools do and how to do them. They're not written by people who don't know what they're doing. Clearly, naturally, you wouldn't want that, right? But the problem with that, of course, is that they don't understand the context that you're coming at it from. Someone who gets a piece of advice, well, first thing you got to do is install FFMP. If they're on an operating system that doesn't have it already installed, and if they're not familiar with it, that is to say they haven't used it before, anything you have to say beyond install FFMP is almost the waste of time, because there is a big learning curve involved in using this sort of thing. Unless, of course, they can follow your instructions precisely. Now, why couldn't they? Well, therein lies the problem. The fact is that FFMP has evolved quite a bit over the years, and as it has evolved many of its commands, many of its flags, many of its parameters have changed. So it is very possible that you'll do a search looking to solve a problem, the exact same problem you have, and you'll find a solution. You'll find someone who says, thank you, you know, solution solved. I got this thing done, and they describe a problem that sounds exactly like your problem, and you go to try it, and it doesn't work. This thing throws you errors left and right, and you don't understand them, because you don't understand FFMP, and by you, I mean me, because this is what happened to me over and over and over. Their instructions don't work. Not only sometimes do you have the problem where it just doesn't give you the results you're after, you also have basic problems like command not found. FFMP is installed, but all of the commands, all of the internal flags, none of those seem to apply. And that's because FFMP has not used those in years maybe. It's also entirely possible because FFMP is a cross platform program. Many people are using these on Mac and on Windows, and I don't know this for a fact, but it appears as though some of those flags are very specific to those operating systems. So you'll get flags that don't work for you invariably, regardless of whatever your operating system is. You'll look for advice, you'll look for a solution to your problem, and you will find that it doesn't solve your problem at all. And you won't find it once, you'll find it a dozen times, you'll find it 50 times, a hundred times, maybe you will never find a solution written out the way you need it, just like me. Okay. Now here was my exact goal. I wanted this very small video to also have a static image showing up. Now I've done this before, a static image showing up on videos. I've done this before, but if you do it in the way that I did it, you end up with a much bigger video than you can use. I ended up with, when I first tried this and using my previous solution, and it was an FFM peg thing, it was no good. I ended up with a video that was much, much bigger than I needed. I needed something no bigger than eight megabytes, and hopefully smaller than that for a little wiggle room, because you know that certain servers and certain operating systems will calculate size differently sometimes. So you don't want it to be too close, right? You want to leave it a little bit of space there. And I ended up with videos that were 30, 40, 50 megabytes in size. Well, why is that? Well, probably because every frame of this video at first, and it's possible to do it this way, every frame of this video was showing the static image over and over and over. That's no good. We can't have that. All right, we can't have a sequence of the same image. Those could all be different images, and then I would have a moving video. We don't need that. That's not what we want. We want the video player to understand that there's only one image. Just leave that one up. That's what we're after. Because if we can do that, and we can put in a very small image, then we've solved that problem. Now, I wanted this image up because Mastodon can be a little difficult to get multiple media files up. If you want to do multiple media files, you end up having a slideshow kind of effect on Mastodon. Again, this problem was very specific to the platform I was trying to present my content on. But it had to stay small. It had to stay under eight megs. I had to have a 50 minute audio that was that small and had an image presentation. So the people are scrolling down. They'll see this thing, right? Doesn't look great when it's done. I'll say that right off the bat. There are reasons for that too. But FFM Peg, forum after forum, help communities, audio communities, Linux communities, I went to many, many, many over a long period of time. I first started looking into this when I first got on the Mastodon. And actually, technically, you could say I started long before when I was looking for the solution the first time. You know, as I say, I've done it before, but not like this and not for this very specific situation. As a result, I found that one place after another after another after another will have great solutions and none of them work for me. Different people with different approaches to the same problem, different operating systems, different versions of FFM Peg, or maybe FFM Peg versus AVConf, right? Because while they were mostly the same, there were some differences. You have all of these variations on a theme going on at the exact same time. And what you end up with is a lot of solutions that solve problems that are not your own. None of them work, right? So how did I solve it? How did I end up going through all this? Well, long story short, I tried them all. Every one of those that I came across, if it seemed to apply, I tried it. If there was something about it that looked like it might work or a piece of that thing might work in another string, another set of commands and flags, I tried it. And I tried it and I tried it. Eventually, I finally hit upon something that worked. So that was a long, long process. And I want to emphasize that the solution I have is not going to be your solution. Almost certainly what it is that you have isn't going to function, just like all the other ones that I found didn't function for me. I'm offering this to you so that you can take a look at it and maybe find something in there that will work for you. The way I eventually found bits and pieces here and there that did work for me. So context is everything. Understanding what I need to do, the reason I need it, the operating system I'm working under, the version of software, the versions of software that I am using in order to get that job done, all of these things needed to be understood before this problem was solved. And the only person who really understood where I was coming from was me. Nobody online was ever going to get it because it would take far too long for me to explain and I would still miss important details. No one else is going to do it for you when it's something like this, at least in my experience. Unless they're sitting in the room with you and you can show them exactly what you need. It is very, very difficult to communicate what you're after when there's so many details and so many moving parts is very, very hard to really get the whole thing into context. So yes, I did solve it. I ended up with a final file size of about 6.8 megabytes. That is a video, a 50 minute video with a static image that someone could listen to it right there unmasked on if they want to. I also have links to a much better quality version of it on my own site. Make it convenient. Again, this whole thing is meant to promote my own work. Well, I think it could have a lot of applications outside of my own work. But I don't necessarily believe that a one-stop solution, me puking out some code or some commands, is going to help hardly anyone in and of itself because I don't have their context. Only they do. And unfortunately, this is not one size fits all type of stuff, especially if you have very specific needs. But anyway, that was just a few thoughts about a problem I had and a solution that I came up with. One that works pretty well for me, but probably won't work for you. This has been Lost in Bronx. If you have any comments on this, I encourage you to make them at Hacker Public Radio under this episode. But better yet, if you have solutions to this kind of problem, if you've run into this kind of problem and have thoughts about it, absolutely please make your own episode of Hacker Public Radio. You have opinions, you have a voice, and we want to hear it. Thanks for listening. Take care. You've been listening to Hacker Public Radio at HackerPublicRadio.org. We are a community podcast network that releases shows every weekday, Monday through Friday. Today's show, like all our shows, was contributed by an HBR listener like yourself. If you ever thought of recording a podcast, then click on our contributing to find out how easy it really is. Hacker Public Radio was founded by the digital dog pound and the infonomicom computer club, and is part of the binary revolution at binrev.com. If you have comments on today's show, please email the host directly, leave a comment on the website or record a follow-up episode yourself. Unless otherwise stated, today's show is released under creative comments, attribution, share a life, 3.0 license.