Console #93 -- Git Peek, Let's Get Arrested, and LosslessCut
An Interview with Mikael of LosslessCut
Sponsorship
Select Star
Select Star is a data discovery platform that automatically analyzes & documents your data. From analyzing your metadata, query logs, and dashboard activities, Select Star will automatically create metadata context of lineage & popularity - where it came from, who’s using it, and how. Best of all, it’s simple to set up, and easy for both engineering and operations teams to use. Let us know you’re a Console subscriber and we’ll double your trial period. ✌️
Projects
git peek
git peek is the fastest way to open a remote git repository in your local text editor. Use it when you want to browse or search other people's code with your own editor.
language: JavaScript, stars: 514, watchers: 9, forks: 8, issues: 1
last commit: February 20, 2021, first commit: February 10, 2021
social: twitter.com/jarredsumner
repo: github.com/Jarred-Sumner/git-peek
lets-get-arrested
lets-get-arrested is a project intended to protest against the police in Japan from 2019.
language: HTML, stars: 4067, watchers: 50, forks: 1163, issues: 42
last commit: November 07, 2020, first commit: March 05, 2019
social: twitter.com/hamukazu
repo: github.com/hamukazu/lets-get-arrested
LosslessCut
The swiss army knife of lossless video/audio editing, LosslessCut aims to be the ultimate cross-platform FFmpeg GUI for extremely fast and lossless operations on video, audio, subtitle, and other related media files.
language: JavaScript, stars: 9235, watchers: 166, forks: 591, issues: 165
last commit: February 18, 2022, first commit: October 30, 2016
social: twitter.com/mifi_no
repo: github.com/mifi/lossless-cut
Already subscribed? Why not share Console with the best engineer you know?
An Interview With Mikael of LosslessCut
Hey Mikael! Thanks for joining us! Let’s start with your background. Where have you worked in the past, where are you from, how did you learn to program, what languages or frameworks do you like, etc?
I grew up in Rælingen, a suburb of Oslo in Norway. I've been interested in electronics and technical things since I was crawling around on all four. Then I started playing video games on my Dad's intel 286 and eventually Visual Basic piqued my interest for programming which I used to create many not-so-useful apps. After going through a lot of different tech stacks, I've now transitioned into working almost exclusively with Javascript: I do backends, embedded software and scripting in Node.js, Web apps in React, Mobile in React Native, and Desktop apps in Electron and this gives me almost unlimited possibilities for any kind of app without changing the mindset too much.
Who or what are your biggest influences as a developer?
I think the fact that I started working with web apps and that JavaScript eventually became such a ubiquitous language has influenced me into investing heavily in that tech. Maybe PHP with its low barrier of entry was what took me in this direction initially.
What's an opinion you have that most people don't agree with?
You don't have to write your code in Typescript in 2022
What’s your most controversial programming opinion?
Web apps are usually the best choice for everyone unless you have very specific needs that can only be achieved with native code
What is your favorite software tool?
I have 100s of npm packages (tools) that I've used over the years and they are all my favorite when it comes to solving their particular problem. Some app picks: WebTorrent, VSCode, Wireshark, FFmpeg, Rclone, sshuttle, youtube-dl, ngrok
And some npm modules: tldrlegal, license-checker, sharp-cli, pm2, svgo, @svgr/cli, fkill-cli, meow, json5, eslint
…and a lot more: https://github.com/sindresorhus/awesome-nodejs
If you had to suggest 1 person developers should follow, who would it be?
If you could teach every 12 year old in the world one thing, what would it be and why?
That almost none of the "free" things (tech) you use these days are really free and usually *you* are the product. Because people need to understand why things are free and how to avoid being addicted to such things and being taken advantage of.
If I gave you $10 million to invest in one thing right now, where would you put it?
Tesla shares
If I gave you $100 million to invest in one thing right now, where would you put it?
Tesla shares
What are you currently learning?
ES Modules and trying to make better Youtube videos
What have you been listening to lately?
I watch mostly Youtube for educational and news stuff
How do you separate good project ideas from bad ones?
The good ones come to life. If an idea motivates you enough that you will go through with implementing it, then chances are it’s a good idea, or at least you will find out soon. If you never find motivation to start working on it, then maybe it’s not such a good idea.
What’s the funniest GitHub issue you’ve received?
I think this one https://github.com/mifi/lossless-cut/discussions/710 - I forgot to answer but the person's Swedish (my neighbor country) and he's apparently very drunk or overtired when he wrote it 😄
Why was LosslessCut started?
Because I wanted to cut my long drone videos which contained a lot of useless footage, and I couldn't find any tool to do that. I knew I could do it with the ffmpeg command line but it's such a hassle, so I figured, hey, let's build something.
Who, or what was the biggest inspiration for LosslessCut?
Not really any inspiration, I just started with a HTML5 video player, then added a timeline, then added cutpoints, then it went from there, with many fans providing good feedback and UI suggestions along the way.
Are there any overarching goals of LosslessCut that drive design or implementation?
Must be fast and super easy to use without having to go through a lot of dialogs as part of the workflows. Use popular frameworks and libraries to make code and dependencies easy to maintain and upgrade.
What trade-offs have been made in LosslessCut as a consequence of these goals?
Size: Electron and FFmpeg are huge. So the app is over 100MB itself. For some people that’s a lot, although compared to the size of the files we’re usually cutting, it’s not really that much. Also the UX design is a bit untraditional so it can be confusing for many people who are used to NLE editors. Also, LosslessCut is very dependent on its dependencies future direction and maintenance. (e.g. FFmpeg, electron, and Node.js). Electron has taken some controversial turns lately:
In Electron version 9 a critical bug was introduced that affects a lot of Electron apps (even popular apps like VSCode and GitHub desktop) and all their users on MacOS Big Sur and newer. This has caused many electron app developers to stay put on old versions of electron, because they don’t want to break their app on MacOS. The problem is that the old versions are now unsupported and contain security vulnerabilities that are no longer being patched by the Electron team. Even 1 ½ years later, Electron continues development and adding new features and major versions without fixing the critical issue introduced in v9. High profile apps like VSCode added their own private patch for working around the issue in their own branch, but the bug was never fixed upstream.
Another issue has been the lack of focus on supporting ES Modules. As a big part of the npm ecosystem is moving to this new technology, leaving Electron users behind with CommonJS and forced to use old versions of these npm modules. This seems to have caused (along with other factors) a divide in the ecosystem of those who are for ESM and those who are against it.
Lastly, there has been a strong security focus in Electron in the newer versions (>v8), where the remote module has been removed, and Node integration has been advised against. The problem is that the new replacement for the remote module and Node.js does not work as well and it is far more complicated to set up. This has (IMO and many others) caused a much higher barrier to entry for creating Electron apps, and combined with the need to now use webpack or similar tools (like build-electron that I just created), makes many people lose hope in Electron and its future as a development platform. And the ease of simply calling Node.js from HTML/JS is no longer possible.
What is the most challenging problem that’s been solved in LosslessCut, so far?
One of these, I'm not sure:
1. Getting the app automatically built and correctly signed on CI for ease of release in Mac App Store and Microsoft Store. I documented the process in my blog.
2. Implementing a solution for streaming video data from ffmpeg through Electron into an HTML5 canvas to display the video feed - with seeking, kind of like simulating an HTML5 Video element using ffmpeg+canvas
Are there any competitors or projects similar to LosslessCut? If so, what were they lacking that made you consider building something new?
When I started out I think there was only AviDemux and VirtualDub that were free, but they were very buggy (crashed a lot) and/or not cross-platform and didn't have as many features.
What was the most surprising thing you learned while working on LosslessCut?
How many kind, thankful and generous people are out there, and that people are willing to also pay for an app that’s open source.
What is your typical approach to debugging issues filed in the LosslessCut repo?
Try to reproduce it by finding a similar file or ask the person to send over the failing file. If it's a known issue (e.g. working as intended) I try to update the help/troubleshooting and error messages to include common hints to prevent such future issues from being filed.
What is the release process like for LosslessCut?
Quite simple:
Commit changes
npm version ...
git push && git push --tags
Wait for build and draft in Github actions
Release draft on Github
Bump snap version
From here: https://github.com/mifi/lossless-cut/blob/master/developer-notes.md#release-new-version
Is LosslessCut intended to eventually be monetized if it isn’t monetized already?
It was never intended to be monetized, but eventually, it did become.
how so?
I accept donations and sell it on the Mac App Store and Windows Store for those who want a verified, signed, and well-tested build with auto-updates. But it is also free to download unsigned and more experimental builds from Github.
What is your main source of revenue of these?
Mac App Store and Windows Store.
How do you balance your work on open-source with your day job and other responsibilities?
I try to work in batches, where I take a few days or a week every x weeks to work on only LosslessCut and flush issues and implement features. Mostly when I have some extra time or when I feel like it. Without motivation, there's no point.
Do you think any of your projects do more harm than good?
It's funny you ask because I just recently released an npm module that I'm not very proud of, but it was kind of necessary. It has the potential to further fragment the npm ecosystem between ESM and CommonJS: https://github.com/mifi/commonify
Also, I built an open-source Instagram bot which is a bit controversial. One could argue that it causes harm to the Instagram algorithm and their business, but it was fun to make, and it works quite well.
What is the best way for a new developer to contribute to LosslessCut?
Just create a PR, or if it's a large change, then maybe first create an issue about what you'd like to implement so I can see if it's compatible with losslesscut's direction.
If you plan to continue developing LosslessCut, where do you see the project heading next?
I think it has matured quite well, but I plan on adding the most frequently requested features, which are not too complex. I don't want the code to turn into an unmaintainable, complex system. I will probably focus on customizable keyboard shortcuts and lossy, exact cutting next.
What motivates you to continue contributing to LosslessCut?
I feel ownership, fun and I feel obliged to continue working on it when people are buying it and supporting my work.
Are there any other projects besides LosslessCut that you’re working on?
Yes, many: see www.mifi.no - also I do consulting for various clients.
Do you have any other project ideas that you haven’t started?
Too many to discuss here! But one that I really want to make is an open-source (lossy) video editor based on web technologies (probably based on https://github.com/mifi/reactive-video)
Where do you see software development heading next?
I think AI / neural nets will become more and more part of our software.
Where do you see open-source heading next?
I see more and more companies and individuals supporting open source work, which is great. But usually, for the small unknown players, there is not much financial support. I don't see this changing anytime soon, because I don't think there's anyone who found a good solution to this problem.
Do you have any suggestions for someone trying to make their first contribution to an open-source project?
Just do it! But do follow contributor guidelines! Or else you might be wasting other developers' precious time.
P.S: We are now on Twitter as @ConsoleWeekly. Follow and tag us in your tweets!
Interested in sponsoring the newsletter or know of any cool projects or interesting developers you want us to interview? Reach out at console.substack@gmail.com or mention us @ConsoleWeekly!