-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A way to limit video length/A way to edit start and end times for the video (i.g. 01:22-12:30) #57
Comments
you can read the documentary from ytdl |
any solution? |
I'm open to contributions / PRs, feel free to add this functionality |
i thought u need this one , but u need to install ytdl globally with npm i -g ytdl ytdl.getInfo("ID").then(info => {
if (info.length_seconds > 3000){
console.log("file is too big");
}else{
///
}
|
My code for 10 minutes
|
thanks @fdciabdul |
for getting video id , you just set the regex like this var videoid = url.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/);
console.log(videoid[1]); |
Idk what happened but for some reason now it only converts the first 10 seconds of videos into audio?? Is anyone else getting this problem |
nope , send your coding on here |
Oh wait nvm. Think it was just a problem with my server I guess because it works now |
Yeah wait actually. I still am getting the 10 second problem. But for me it only occurs for certain videos. Is this happening to anyone else? https://www.youtube.com/watch?v=wuO4_P_8p-Q |
function youtube_parser(url){
|
I'm trying to prevent users from being able to upload videos that have like a 10 hour long length so as to not bog up my servers. I can't seem to find anything about this on the docs or when searching online. Is this not a feature yet?
Also being able to edit start and end times to clip the video would be nice. I of course know that's possible with ffmpeg but if it could be done more efficiently at the beginning so that actually only the clipped portion of the video is captured/downloaded by the YouTube-mp3-downloader package. Thanks
The text was updated successfully, but these errors were encountered: