Comments (11)
Hey perfect, glad to hear it man! Keep it up, knowing JavaScript will be really important in the coming years.
from videodownloader.
Cool, thanks @mayeaux !
from videodownloader.
Sounds good, thanks @mayeaux ! =]
from videodownloader.
Awesome, thanks @mayeaux ! =]
from videodownloader.
@mayeaux , I figured it out!
Today, I went through your code again. I followed it from start to finish. I looked up and commented the purpose of each function. And, I finally realized that "youtube-dl" was an embedded executable file. And, that it was the key to downloading videos! =]
Then, I researched how to run an executable file in Swift, which turned out to be pretty simple.
And now, I just downloaded my first video in my MacOS application! Which, only really means that I setup "youtube-dl" and passed it a url in an arguments array. But, the important part is that it works!
Thank you @mayeaux , for your encouragement and clarification. Working through this project has definitely helped me understand JavaScript on a whole new level! =]
from videodownloader.
Hey thanks, but there's already a native version of it available here:
https://github.com/mayeaux/videodownloader/releases/download/1.0.0/videodownloader-1.0.0.dmg
That doesn't have the latest code, but basically Electron can be packaged as a native app for the different operating systems, that's one of the reasons I chose it. Let me know if that clears things up for you and thanks for the support!
from videodownloader.
Hi @mayeaux , thanks for getting back about this! To clarify, I'm trying to add your download feature into my own native MacOS app, which I'll use to download a list of video urls automatically.
For example, this is an app that another awesome developer and I have been building from his repo, which downloads a complete website into a single html file. It's been a lot of fun, and we're almost done - just fixing a few bugs. Then, we're going to open source it, and post it in his community.
My Swift is ok, but I struggle with JavaScript. Would it be ok to reach out to you for help troubleshooting? =]
from videodownloader.
My recommendation would be to use this as a project to improve your JavaScript. :) I'm already too stretched with projects but I wish you the best of luck! If you get super stuck with something feel free to reach out but I will leave this project to you, good luck!
from videodownloader.
We can leave this issue open maybe someone else will read this thread and want to join you.
from videodownloader.
Hi @mayeaux !
I went through your code line-by-line today, read up on the api, and tested some javascript in the browser, and in XCode. And, I think I kind of get what's happening. But, just to make sure, could you please help clarify a few things?
It seemed like a lot of the code was for the user interface, collecting user data, and formatting it to download videos. And, in terms of actually downloading videos, the heavy lifting was performed by the dependencies, right?
Dependencies:
ffmpeg
for converting the video from a data file to a video.
fs
for checking if a file exists and downloading files locally.
youtube-dl
for downloading videos from 110 sites.
ytdl-core
for downloading YouTube videos.
But, I don't understand how you're running an npm package in a native MacOS application. Does electron
manage the modules for you? And if so, did you have to rebuild the npm packages for electron
?
from videodownloader.
Yeah sorry it's a bit jumbled, it was made very quickly. You're basically correct in all your assumptions.
ffmpeg
though is for post-processing with youtube-dl
fs
is a native Node module
ytdl-core
I think I use for getting titles.
And Electron basically packages the modules in a way such that they can be accessed from the browser. I'm not totally sure how it works under the hood but it allows files from node_modules
to be called from what feels like the client side.
Hope that helps! And yeah the code is pretty simple so might as well dive in yourself I figure, a good way to learn Javascript for sure.
from videodownloader.
Related Issues (20)
- I download the video, it's just 51 minutes, but it's size is 12G HOT 3
- windows7 安装报错 HOT 2
- Is it possible to hard code the download directory? HOT 1
- Linux version? HOT 2
- test webhook
- Use youtube-dl package HOT 7
- please make deploy to heroku button HOT 1
- Linux version? HOT 1
- Changing file format upon downloading HOT 3
- Can't get onfocusout event to work for #saveAsTitle
- Don't allow title sizes over 255 characters HOT 2
- Yy
- SSL cert error HOT 1
- It doesn't work if I try to download as audio for dailymotion videos.
- Insecure string pickle HOT 3
- Where is the 100 supported websies list? HOT 2
- The SUID sandbox helper binary was found, but is not configured correctly HOT 9
- Video download
- resolution choice / arguments ? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from videodownloader.