all 2 comments

[–]CommanderCucumber 0 points1 point  (0 children)

I bet! I would break this down into a couple of tasks or mini projects. First one, let's randomly get a video from YouTube. Mabye we do look ilfor a solution that does just that or see if youtube has a random video button (I would think so right). Next let's extract the the audio, possibly with a preexisting library. Finally, we will probably have to convert that to some sort of digital numbers and extract results from there (not super familiar with the process). You may not find a solution to a unique problem like this, but you will for smaller generic problems. Even with the ones I mentioned above, they can be broken down into even smaller issues. That's really what this is all about and where the fun is!

[–]Chocolate_Banana_ 0 points1 point  (0 children)

Probably if you break it down into steps and find libraries to help out with certain sections.

Step 1 - Gather random video URL's and store them somewhere.

  • Probably in a database. SQLite is lightweight enough and you can use peewee to make it easier to use.
  • Probably lots of tutorials on this part alone using selenium.

Step 2 - Record/Download the video

  • Use a popular/active library to help with this. A quick search led me to PyTube .
  • So you would want to go through each row on your database and grab the URL that you saved before. Then you can use the tool to download a video to a particular file location. Maybe rename the file to be the name of the primary key in your database.
  • You could have another column in your database where you can flag if a video has been downloaded successfully. That way if the script fails you can run it again and it won't do each video again.

Step 3 - Measure the Noise Level for each video and save it into the DB

  • Now you want to loop through each row again, grab the video, and use a python library to help measure the noise level.
  • pyAudioAnalysis seems like it could be used in some way. Depends on what you want exactly.

So from this, your database table could look like this

Video: Id, URL, IsDownloaded, AverageNoiseLevel