Error using YoutubeAudioLoader

While using YoutubeAudioLoader as shown in this course, I am getting an error of:

DownloadError: ERROR: [youtube] jGwO_UgTS7I: jGwO_UgTS7I: Failed to parse JSON (caused by JSONDecodeError(“Expecting value in ‘’: line 1 column 1 (char 0)”)); please report this issue on Issues · yt-dlp/yt-dlp · GitHub , filling out the appropriate issue template. Confirm you are on the latest version using yt-dlp -U

I tried with a couple of different youtube videos (including the exact one shown in the course) and get the same error.

@sameer.s.mahajan I have the same error. Did you manage to solve it?

Just to give an update I changed the imported libraries to

from langchain_community.document_loaders.blob_loaders.youtube_audio import (
from langchain_community.document_loaders.generic import GenericLoader
from langchain_community.document_loaders.parsers import (

Then I installed ffmpeg with brew install ffmpeg.

For more info I followed the instructions in a comment on reddit, but sadly I am not allowed to put links here… You can find the thread searching for “Unsure of how to provide ffmpeg location”, it’s the last, very long, comment by dj_k3b4b

Everything seems to work now. Hope it helps!

Thank you. installing ffmpeg solved the problem. I didn’t have to change the imports as they were already correctly mentioned in the course and matched what you posted here.