0

there is an online radio station and i have a m3u8 url from that like below:

http://example.com/live/playlist.m3u8

I can capture the audio with ffmpeg with this command:

ffmpeg -i "http://example.com/live/playlist.m3u8" -c copy test.aac

I want to play this streaming with in my PyQt app and i don't need to store the content.

But i don't know how to pass the content from ffmpeg to my python app and play that with QMediaPlayer.

AlexMercer
  • 301
  • 3
  • 10
  • 1
    QMediaPlayer is intended to play a media resource, not directly reproduce the contents of an video/audio stream. You can use [QMediaPlaylist](https://doc.qt.io/qt-5/qmediaplaylist.html) possibly with `load(QUrl('http://...'))`. – musicamante Sep 03 '21 at 10:35
  • @musicamante Does it accept m3u8 url? – AlexMercer Sep 03 '21 at 10:44
  • Have you tried it? – musicamante Sep 03 '21 at 11:23
  • @musicamante Yes but i got this error: `DirectShowPlayerService::doRender: Unknown error 0x80040218.` – AlexMercer Sep 03 '21 at 13:06
  • Please [edit] your post and provide a [mre] of what you tried – musicamante Sep 03 '21 at 13:12
  • 1
    @AlexMercer The QMediaPlayer backends don't have built-in support for all audio/video formats. If you're on Windows, you will usually need to [install some extra codecs](https://codecguide.com/about_kl.htm). – ekhumoro Sep 03 '21 at 17:37

0 Answers0