-1

I have the code:

def radio_create(self, url):
name = QMediaPlayer(self)
name.setMedia(QMediaContent(QtCore.QUrl(url))
return name

But it plays only mp3 files.

I need it to be able to play any kind of music or at least .aac. more details I'm making a streaming radio application and i want it to be able to play not only mp3 links live.

More details I'm making a streaming radio application and I want it to be able to play not only mp3 links live.

toyota Supra
  • 3,181
  • 4
  • 15
  • 19
aart17
  • 1
  • 2
  • If you're on Windows, you must install an [additional codecs pack](http://codecguide.com/about_kl.htm). – ekhumoro Apr 23 '23 at 11:26
  • I installed them, but how do I use them? – aart17 Apr 23 '23 at 14:17
  • @aart17 If you properly installed them, they should work directly, if you're still not able to play the other urls, then you're probably trying to open an incompatible format, a wrong url or an url that doesn't have a media streaming content. Can you give us some examples of your attempts? – musicamante Apr 23 '23 at 16:32
  • Yes I installed them, but nothing worked. I passed this link to the function https://icecast-vgtrk.cdnvideo.ru/vestifm_aac_64kbps – aart17 Apr 23 '23 at 18:39
  • oh, sorry, i install 'mega' version and his got it working. But I do not know how to implement this in the project, how to make the user install codecs along with my application? – aart17 Apr 23 '23 at 19:02
  • check your codecs, you are missing a or got a wrong codec, there isnt much you can do from your code, you need to check what type of codecs you have installed on your machine – lightshadown May 01 '23 at 02:13

1 Answers1

0

Conclusion: I should have downloaded codecs

aart17
  • 1
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 05 '23 at 02:48