0

I am trying to write a small youtube client for the blind. I am using 3 packages, fast-youtube-search, sound-lib which uses bass dll, and os to pass on comments to youtube-dl. I for an example enter the following

os.system("youtube-dl.exe -x --audio-format opus --output .dl.opus https://www.youtube.com/watch?v=5Ex5mrhJsh8") The download seems to go fine, no errors show up. But this file then can not be played, the bass is giving error 41, unsupported file type, but it usually plays Ogg files. Is there something I am doing wrong here?

Samir Mughal
  • 255
  • 2
  • 7
simter
  • 1
  • 1
    Have you tried running that command in the command prompt as-is without going through python? – ewokx Jun 30 '20 at 00:39
  • As an aside, you might want to look into using the `subprocess` module instead of the `os` module for this. – AMC Jun 30 '20 at 01:49
  • I tried doing it with cmd as well and it resulted in the same behaveior. The file could be played with vlc but with nothing else. What is the difference between os.system or the subprocess module? – simter Jun 30 '20 at 18:33

0 Answers0