Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: HLS / MP4 / MP4s playback problems (Read 2752 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

HLS / MP4 / MP4s playback problems

Hi there,

Rusty over at SomaFM sent out an email a few weeks ago, describing some test streams he has up of various HLS / MPEG-4 Audio streams. You can see that page here: https://hls.somafm.com/

I thought I'd check and see if foobar2000 can play these -- and it appears that there's a problem.

here's most everything I've tried -- hoping someone can help!



- I'm using 1.6.11, installed as portable into a separate folder (so that I'm sure it is a 'fresh' install).

When opening this location: https://hls.somafm.com/hls/groovesalad/FLAC/program.m3u8, the foobar console shows:

Code: [Select]
Components loaded in: 0:00.009187
No theme file found.
Configuration read in: 0:00.000126
foobar2000 v1.6.11 [portable]
User Interface initialized in: 0:00.029794
FFmpeg version: 4.4.1
Startup time : 0:00.084136
Could not list user components directory: Object not found
Opening track for playback: "https://hls.somafm.com/hls/groovesalad/FLAC/program.m3u8"
Could not read info (Unsupported file format) from: "https://hls.somafm.com/hls/groovesalad/FLAC/program.m3u8"
Unable to open item for playback (Unsupported file format):
"https://hls.somafm.com/hls/groovesalad/FLAC/program.m3u8"

inside of 'program.m3u8' is the following (this is a live stream so the .m4s files will have changed by the time this is read)

Code: [Select]
#EXTM3U
#ENCODER:StreamS Live HTTP Encoder v3.2.1.183
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:139240
#EXT-X-TARGETDURATION:10
#EXT-X-PROGRAM-DATE-TIME:2022-07-16T21:10:32.244Z
#EXT-X-MAP:URI="program_init.mp4"
#EXTINF:9.984,
program-20220716T211049Z.m4s
#EXTINF:9.984,
program-20220716T211059Z.m4s
#EXTINF:9.984,
program-20220716T211109Z.m4s
#EXTINF:9.984,
program-20220716T211119Z.m4s
#EXTINF:9.984,
program-20220716T211129Z.m4s
#EXTINF:9.984,
program-20220716T211139Z.m4s

The encoder that is creating this, is this product: https://www.indexcom.com/products/encoder/hls/

It seems like, 'out of the box', foobar2000 can't play this stream?

---
some other data points;
ffplay (as a standalone binary) will play the .m3u8

Code: [Select]
D:\foobar2000\ffmpeg>ffplay.exe https://hls.somafm.com/hls/groovesalad/FLAC/program.m3u8
ffplay version N-96800-ga0faf0d-ffmpeg-windows-build-helpers Copyright (c) 2003-2020 the FFmpeg developers
  built with gcc 8.3.0 (GCC)
  configuration: --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/swinokur/ffmpeg/
ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-
libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libs
nappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame--enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --ena
ble-liblensfun --enable-libvmaf --enable-libsrt --enable-demuxer=dash --enable-libxml2 --enable-opengl --enable-libdav1d --enable-libsvthevc --enable-libaom --enable-libvpx --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=
-lm --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxavs --enable-avresample --extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static --disable-shared --prefix=/home/swinokur/ffmpeg/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32 --enable-nonfree --enable-decklink --enable-libfdk-aac
  libavutil      56. 41.100 / 56. 41.100
  libavcodec     58. 72.100 / 58. 72.100
  libavformat    58. 39.100 / 58. 39.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 76.100 /  7. 76.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
[hls @ 00000000031d6ac0] Skip ('#ENCODER:StreamS Live HTTP Encoder v3.2.1.183')
[hls @ 00000000031d6ac0] Skip ('#EXT-X-VERSION:6')
[hls @ 00000000031d6ac0] Skip ('#EXT-X-PROGRAM-DATE-TIME:2022-07-16T21:20:41.268Z')
[hls @ 00000000031d6ac0] Opening 'https://hls.somafm.com/hls/groovesalad/FLAC/program_init.mp4' for reading
[hls @ 00000000031d6ac0] Opening 'https://hls.somafm.com/hls/groovesalad/FLAC/program-20220716T212128Z.m4s' for reading
[hls @ 00000000031d6ac0] Opening 'https://hls.somafm.com/hls/groovesalad/FLAC/program-20220716T212138Z.m4s' for reading
Input #0, hls, from 'https://hls.somafm.com/hls/groovesalad/FLAC/program.m3u8':
  Duration: N/A, start: 1390811.221333, bitrate: 0 kb/s
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Audio: flac (fLaC / 0x43614C66), 48000 Hz, stereo, s16, 0 kb/s
    Metadata:
      variant_bitrate : 0
      major_brand     : mp42
      minor_version   : 0
      compatible_brands: isomiso6hlsfmp42
      creation_time   : 2022-06-30T19:00:13.000000Z
[https @ 0000000007d8c300] Opening 'https://hls.somafm.com/hls/groovesalad/FLAC/program-20220716T212148Z.m4s' for reading
1390818.75 M-A:  0.000 fd=   0 aq=  308KB vq=    0KB sq=    0B f=0/0

using the ffmpeg decoder wrapper in foobar does not work, there is a ffprobe error: again from the console:

Code: [Select]
Opening track for playback: "https://hls.somafm.com/hls/groovesalad/FLAC/program.m3u8"
Launching ffprobe:
"D:\foobar2000\ffmpeg\ffprobe.exe" -of xml -show_format -show_streams -show_chapters -hide_banner "https://hls.somafm.com/hls/groovesalad/FLAC/program-20220716T211619Z.m4s"
ffprobe failed
Could not read info (Unsupported format or corrupted file) from: "https://hls.somafm.com/hls/groovesalad/FLAC/program.m3u8"
Launching ffprobe:
"D:\foobar2000\ffmpeg\ffprobe.exe" -of xml -show_format -show_streams -show_chapters -hide_banner "https://hls.somafm.com/hls/groovesalad/FLAC/program-20220716T211619Z.m4s"
ffprobe failed

This might be a configuration error on my part however? Here's what I did in the decoder wrapper configuration:




Re: HLS / MP4 / MP4s playback problems

Reply #1
inside of 'program.m3u8' is the following (this is a live stream so the .m4s files will have changed by the time this is read)
Code: [Select]
#EXTM3U
#ENCODER:StreamS Live HTTP Encoder v3.2.1.183
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:139240
#EXT-X-TARGETDURATION:10
#EXT-X-PROGRAM-DATE-TIME:2022-07-16T21:10:32.244Z
#EXT-X-MAP:URI="program_init.mp4"
#EXTINF:9.984,
program-20220716T211049Z.m4s
#EXTINF:9.984,
program-20220716T211059Z.m4s
#EXTINF:9.984,
program-20220716T211109Z.m4s
#EXTINF:9.984,
program-20220716T211119Z.m4s
#EXTINF:9.984,
program-20220716T211129Z.m4s
#EXTINF:9.984,
program-20220716T211139Z.m4s
I think this playlist is the problem. AIMP can't play it but VLC can play it.
MPV can play it too but it shows this error every 20 seconds:
Code: [Select]
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: Found duplicated MOOV Atom. Skipped it


There is another problem with the way foobar2000 stores the stream added through the Add Location menu when there is a redirection in the stream.
Example: I enter: http://www.radio.com/playlist.pls?station=radiorock
But the redirected real stream URL is: http://02-stream.com/radiorock?key=123456789
foobar2000 plays and saves the latter. But it won't work next time because of the token expiration.

foobar2000 should save and use the original URL just like other players do.

Re: HLS / MP4 / MP4s playback problems

Reply #2
I think this playlist is the problem. AIMP can't play it but VLC can play it
AIMP will play it if you tell it to look at the WMF codecs instead of Bass if there is a fail by adding the line "AllowSystemCodecs=1" to the "[BASS Decoder]" section of AIMP.ini in its Profile folder.  The latest XMPlay (3.8.5.41) will play it and even display track metadata.  Maybe something there that can help find the issue in Foobar?

Re: HLS / MP4 / MP4s playback problems

Reply #3
Hi,
Thanks for the tip on XMPlay - I tried downloading it but it doesn't appear to play the SomaFM HLS stream 'out of the box'.

Would you mind sharing your list of plugins / configuration that's needed to make it work?

thanks!



AIMP will play it if you tell it to look at the WMF codecs instead of Bass if there is a fail by adding the line "AllowSystemCodecs=1" to the "[BASS Decoder]" section of AIMP.ini in its Profile folder.  The latest XMPlay (3.8.5.41) will play it and even display track metadata.  Maybe something there that can help find the issue in Foobar?

Re: HLS / MP4 / MP4s playback problems

Reply #4
Be sure to download the xmplay.exe from the link here: https://www.un4seen.com/stuff/xmplay.exe .  I am using Windows 10 x64--the stream may not play on Windows 7 machines.

As far as plugins, here is what I have, these are the latest from the un4seen website, but most won't be relevant to the stream:
xmp-aac.dll
xmp-ac3.dll
xmp-alac.dll
xmp-ape.dll
xmp-asio.dll
xmp-ds.dll
xmp-dsd.dll
xmp-flac.dll
xmp-midi.dll
xmp-opus.dll
xmp-wasapi.dll
xmp-wavis.dll
xmp-wv.dll

Displays as below (non-stock skin) in control bar and "Message/Comments/Tags" tab:


Re: HLS / MP4 / MP4s playback problems

Reply #5
Thanks for the quick reply!

So yeah, there's clearly something different going on between Win7 and Win10 with regard to how the stream/URL is handled. If I move the folder containing xmplay over to a Win10 box - the FLAC HLS stream starts right up.

(is there any way of having xmplay display [for lack of a better word] the filter-graph that it is using?)



Be sure to download the xmplay.exe from the link here: https://www.un4seen.com/stuff/xmplay.exe .  I am using Windows 10 x64--the stream may not play on Windows 7 machines.

As far as plugins, here is what I have, these are the latest from the un4seen website, but most won't be relevant to the stream:
xmp-aac.dll
xmp-ac3.dll
xmp-alac.dll
xmp-ape.dll
xmp-asio.dll
xmp-ds.dll
xmp-dsd.dll
xmp-flac.dll
xmp-midi.dll
xmp-opus.dll
xmp-wasapi.dll
xmp-wavis.dll
xmp-wv.dll


Re: HLS / MP4 / MP4s playback problems

Reply #6
I probably should have tried this sooner, but MPC-HC 1.9.22 plays the HLS FLAC stream on Win 7 - downloaded, unzipped, ran it...

it doesn't display metadata but does play the stream fine.

Not sure if this is helpful for foobar development, but I guess it is another data point...


Re: HLS / MP4 / MP4s playback problems

Reply #7
Hey there,
It has been a while, I was hoping that one of the devs would be able to have a look at this.

btw, I just tried with the latest v2.0 b4 -- same behavior there as with 1.6.0

thanks!