Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Python Web Scraping Cookbook

You're reading from  Python Web Scraping Cookbook

Product type Book
Published in Feb 2018
Publisher Packt
ISBN-13 9781787285217
Pages 364 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Michael Heydt Michael Heydt
Profile icon Michael Heydt

Table of Contents (13) Chapters

Preface Getting Started with Scraping Data Acquisition and Extraction Processing Data Working with Images, Audio, and other Assets Scraping - Code of Conduct Scraping Challenges and Solutions Text Wrangling and Analysis Searching, Mining and Visualizing Data Creating a Simple Data API Creating Scraper Microservices with Docker Making the Scraper as a Service Real Other Books You May Enjoy

Ripping an MP4 video to an MP3

Now let's examine how to rip the audio from an MP4 video into an MP3 file. The reasons you may want to do this include wanting to take the audio of the video with you (perhaps it's a music video), or you are building a scraper / media collection system that also requires the audio separate from the video.

This task can be accomplished using the moviepy library. moviepy is a neat library that lets you do all kinds of fun processing on your videos. One of those capabilities is to extract the audio as an MP3.

Getting ready

Make sure that you have moviepy installed in your environment:

pip install moviepy

We also need to have ffmpeg installed, which we used in the previous recipe, so...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}