FFMPEG Python - Convert Audio Files to MP3 SUPER FAST ! ?
FFMPEG Python - Convert Audio Files to MP3 SUPER FAST ! ?
How to convert thousands of flac, wav, wma, aac, m4a, aiff, webm, ogg, opus or raw audio files to mp3 ?super fast? using ffmpeg and Python.
In this video we start off by simulating a bash for loop and converting the flac test files sequentially using ffmpeg to demonstrate that only one CPU core is used to transcode the group of flac files to mp3 files using this method. Leaving all of the other CPU cores essentially idling.
We then modify the python script with one simple change to use all of the available CPU cores to convert our flac files to mp3 files and this gives us a massive speed boost, we cut down the transcode time significantly.
Finally we increase our transcode speed even more by using variable bit rate (VBR) mp3 files instead of creating constant bit rate (CBR) mp3 files.
This allowed use to increase our transcode speed to over 725%? ( yes you read that right, Seven hundred and twenty five percent speed increase ) faster than our bash for loop method.
We could probably get this speed increase go a little higher if we were to use asycio instead of a thread pool as this would eliminate the thread creation overhead and thread banging wouldn't occur. I may test this in the future but I think over 725%? speed increase is pretty good for a 20 minutes rough python script.
Would be interesting to see how fast this would be on a 64 core AMD Threadripper.?
OS: Ubuntu 19.04
FFmpeg version: 7:4.1.3-0ubuntu1
Github: https://github.com/Linuxleech/flac-to-mp3
Subscribe: https://www.youtube.com/user/linuxleech?sub_confirmation=1
Blog: http://www.linuxleech.com
Twitter: http://www.twitter.com/linuxleech
Facebook: http://www.facebook.com/linuxleech
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «FFMPEG Python - Convert Audio Files to MP3 SUPER FAST ! ?», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.