Giter VIP home page Giter VIP logo

nightcoreify's Introduction

nightcoreify

A nightcore artist at work.

Nightcore is mind-numbingly simple. It's just a speed-shift of a pre-existing track, with anime artwork and a visualizer slapped on top. The harsh reality is, we are wasting human minds on the creation of such low-effort "music."

I decided to take matters into my own hands and automate the process. This is a Python script that:

  • finds and downloads a random (somewhat, see below) song from YouTube
  • finds and downloads a random anime artwork from Reddit
    • I broke tradition and went with Reddit rather than Pixiv because their API is so much friendlier.
  • renders a new video, using FFmpeg, with sped up audio + image + audio visualizer
  • uploads the finished product to YouTube

I currently have this script running in an AWS Lambda function, scheduled with an EventBridge rule, and uploading here every 6 hours. It's deployed on top of this Lambda layer for FFmpeg.

Clarification on "random" YouTube videos

There's no easy way to find a totally random video on YouTube, much less one belonging to a certain category (music in my case), at least that I can find, so I had to get a little creative. To find a "random" video, the script generates a 4-character string prepended with v= (total of 6 characters), and searches for it in the music category. This typically returns videos whose IDs start with the 4-character string, but sometimes there will also be videos whose titles contain the 4-character string.

To reduce automatic copyright claims, the script also needs to check the copyright status of a video. This is not easy to do with YouTube's API, so it uses a naïve scraping solution.

$100 bounty opportunity!

aayushg.com/ideas has offered a $100 grant for this repo to pull songs from Spotify and/or TikTok and add copyright checks to uploaded videos. Specifically, it could nightcore the top unposted TikTok song or songs from a chosen Spotify playlist, instead of a random song!

Help wanted!

This bot's YouTube channel keeps getting flagged for adult content, because of the subreddits it links to. I've chosen the bot's subreddits after a quick search, but I don't browse them myself and have no idea what's posted there on a daily basis. If you know of subreddits that absolutely do not contain anything suggestive, receive frequent submissions and match the theme of nightcore, please add them to the SUBREDDITS tuple in nightcorei.py and submit a pull request.

Requirements

Side note: if you dig through the commits in this repo, you'll find that this used to be a Node.js script. I originally wrote it in Node to keep my options open in terms of cloud providers, but rewrote it in Python after I was sure I'd stick with Lambda.

License

This software is released under a MIT License.

nightcoreify's People

Contributors

thomashuss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nightcoreify's Issues

Hey Bro

I'm new to software, please explain to me with simple logic or a gif with a picture.

image

NOT AN ISSUE [Question]

Any way to convert this to soundcloud? Make it pull its music from souncloud and post it there?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.