Project

General

Profile

Feature #790

ffaudio-core changing requirements

Added by Jim Turner about 6 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Minor
Assignee:
-
Category:
plugins/ffaudio
Target version:
-
Start date:
April 21, 2018
Due date:
% Done:

0%

Estimated time:
Affects version:

Description

Heads up: Playing some streams, the following for example will cause audacious to spew the following warning repeatedly every few seconds due to (I presume) recent changes to ffaudio-core:

http://bbnmedia-lh.akamaihd.net/i/BibleBroadcasting_Englishios@87472/index_48_a-b.m3u8

NOTE: THIS stream must be added with the "M3U Playlist plugin" DEACTIVATED in order to play properly (another potential but separate issue) else it will add but NOT play!

WARNING ffaudio-core.cc:186 [ffaudio_log_cb]: <(nil)> Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later.

I'm not sure whether this "initialization" routine needs to be called once when the plugin is installed or should be repeated whenever a song/stream that uses it starts to play? NOTE: there's also a corresponding "int avformat_network_deinit(void)" function as well. I can research it further if you don't have time.

Regards,

Jim

capture_window.1524515778.png (880 KB) capture_window.1524515778.png playlist plugins snapshot Jim Turner, April 23, 2018 20:51
capture_window.1524515893.png (1.37 MB) capture_window.1524515893.png startup & warnings snapshot Jim Turner, April 23, 2018 20:52
capture_window.1524515900.png (1.06 MB) capture_window.1524515900.png main screenshot while playing Jim Turner, April 23, 2018 20:53
audacious_partial.dbg (4.88 KB) audacious_partial.dbg Pertinent debug output Jim Turner, April 23, 2018 20:54
config (336 Bytes) config current audacious config Jim Turner, April 23, 2018 20:54
1000.audpl (183 Bytes) 1000.audpl current playlist Jim Turner, April 23, 2018 20:54
capture_framedwindow.1524577374.png (1.13 MB) capture_framedwindow.1524577374.png Main playlist screen (4 streams) Jim Turner, April 24, 2018 13:56
audacious_partial2.dbg (245 KB) audacious_partial2.dbg Abbreviated debug output Jim Turner, April 24, 2018 13:56

History

#1 Updated by John Lindgren about 6 years ago

A couple of things don't make sense. First, I'm not sure how you are opening an M3U playlist with the M3U plugin disabled. Second, Audacious doesn't use (or shouldn't be using) any of FFmpeg's network support; all the I/O should be going through our VFS layer and the neon plugin.

When I tried to play the linked playlist, the M3U plugin seemed to read the playlist fine, but MPG123 tried to play the audio files and produced gibberish noise. Disabling MPG123 allowed the files to play (correctly) through ffaudio. HTTP I/O appeared to be routed through the neon plugin as expected.

#2 Updated by Jim Turner about 6 years ago

Looks like it does the exact same thing for you that it does for me - playing correctly when opened w/o M3u plugin (as a unified stream), which is the pbm: one must DISABLE m3u to open this (so-called) "m3u playlist"! Did you also get the warnings when playing correctly? Yes, it does go thru neon either way as expected (and plays properly, if m3u doesn't get it's hands on it first), but w/these warnings.

#3 Updated by John Lindgren about 6 years ago

No - I have the M3U playlist plugin enabled. I disabled MPG123 (the MP3 decoder).

#4 Updated by Jim Turner about 6 years ago

Not sure we're on the same page. Here's some screenshots and logs showing what I'm doing. I'm using the latest Audacious GIT as/of 4/21 (NOT Fauxdacious) In the screenshots the stream is playing correctly (with the warnings as shown). The "m3u" plugin is INACTIVE (as it MUST be, to play correctly when first added). Let me know if you need any other info.

Jim

#5 Updated by John Lindgren about 6 years ago

Let's resolve the issue of the M3U plugin first, because opening an M3U playlist without it is unsupported (I'm surprised that it's even possible).

What error do you get when you ENABLE the M3U plugin?

#6 Updated by Jim Turner about 6 years ago

Ok. If I'm reading what you said in your original response, playing it with m3u plugin ENABLED, I get the same thing you did: 4 tiny streams added and it plays the "gibberish" just as you described (like holding down the fast-forward button on an old VCR)! I'm attaching the screenshot of what it's playing along with the pertinent parts of the debug (-VVV) info.

It appears to me that, at least in the case of THIS url, that it 1) needs ffaudio to play it instead of mp3, and 2) Though it's "m3u8", it must be recognized and played as a single, continuous "stream", in which case the server returns (plays) a continuous (and contiguous) series of 10-second AAC streams in series as a single, indefinite stream. That's why I believe (if m3u is not allowed to get it's hands on it and Audacious instead adds it as a stream instead of a "playlist" and it correctly plays as such), Audacious probes it and ffaudio will then grab it and play it correctly as a single continuous stream, which I believe is how the station's authors intend. The fix would likely not be trivial as Audacious would need to somehow determine this whilst probing! If this is just a one-off "badly-behaving" playlist url, then this request should be rejected, but if other m3u8 streaming stations are (starting to)? do things this way, it might be worth looking into adding some probing code to handle it (I'm assuming you are more up-2-date knowledgewise on the direction that internet streaming is going than I am)!

Thanks!

Jim

#7 Updated by John Lindgren about 6 years ago

This is the first time I've heard of using an M3U container to wrap a "stream" in 10-second segments. I would say that's using the wrong technology for the job--other, better types of containers for streaming already exist.

I'm curious what FFmpeg is actually doing under the hood here. Is it sending a new HTTP request every 10 seconds for the next snippet? Or doing some kind of black magic to open an actual (continuous) stream with a different URL and/or protocol?

From the little we know, it sounds like it would take a bit of work to support this type of streaming. It's not a project that I would personally want to start on any time soon. Have you tried contacting the broadcasting station and asking them to provide a more standard streaming format as an alternative?

#8 Updated by Jim Turner about 6 years ago

Ok, if that's not proper for m3u8, then I wouldn't sweat it then, but I'll let you know if I start running into more of these, but please look at adding those init()/deinit() functions to ffaudio, as I assume that if not addressed, a future ffaudio release will likely break things!

I bet it IS sending a req. every 10" or so since I get that "initialization" warning a/b that same frequency, which IS the main issue of the request here. No, I haven't contacted them, since once I got it properly added into a saved playlist (initially, w/m3u turned off temporarily), it's been working fine since then. Those warnings spam up the .xsession_errors file though, so if you can address them, then we could call it good for now I suppose! If not, I'll eventually pbly. try to run that down and fix/test and eventually send a patch (for ffaudio).

Thanks,

Jim

#9 Updated by John Lindgren almost 6 years ago

  • Status changed from New to Rejected

Closing as unsupported (the particular weird format, that is) for the time being.

#10 Updated by Jim Turner over 4 years ago

UPDATE: John,

I think I have some new light to shed on this issue: This appears to be something called an "HLS" stream, aka "HTTP Live Streaming", and I'm beginning to run into MORE of them now! I don't know if Audacious wants to support this or not, but I'm guessing you may be getting requests from others on this in the future.

HTTP Live Streaming via .m3u8 "playlists": https://en.wikipedia.org/wiki/HTTP_Live_Streaming

Regards,

Jim

Also available in: Atom PDF