PDA

View Full Version : Error trying to play particular AAC stream



Paul Webster
2019-02-12, 08:22
I am working on supporting some newly announced Radio France streams in my plugin.
I have song names working ... but I cannot get the streams to play (they are not in TuneIn yet).

One example is
https://direct.mouv.fr/live/mouvrapfr-hifi.aac
which redirects to
https://chai5she.cdn.dvmr.fr/mouvrapfr-hifi.aac

Odd thing .... it plays in Chrome but not in Winamp or Mplayer.

This is Mouv Rap Francais
I am working with a freshly installed LMS via pCP so I might have missed something (I have installed pcp-lame).
LMS logging turned up shows:


[19-02-12 15:46:45.6966] Slim::Player::TranscodingHelper::enabledFormat (209) Checking to see if aac-mp3-*-* is enabled
[19-02-12 15:46:45.7009] Slim::Player::TranscodingHelper::checkBin (250) enabled
[19-02-12 15:46:45.7044] Slim::Player::TranscodingHelper::checkBin (252) Found command: [faad] -q -w -f 1 $FILE$ | [lame] --silent -q $QUALITY$ $BITRATE$ - -
[19-02-12 15:46:45.7084] Slim::Player::TranscodingHelper::getConvertCommand 2 (382) Rejecting [faad] -q -w -f 1 $FILE$ | [lame] --silent -q $QUALITY$ $BITRATE$ - - because required capability D not supported:
[19-02-12 15:46:45.7124] Slim::Player::TranscodingHelper::checkBin (242) Checking formats for: aac-test-squeezeplay-02:0e:8e:22:ae:82
[19-02-12 15:46:45.7162] Slim::Player::TranscodingHelper::checkBin (242) Checking formats for: aac-test-*-02:0e:8e:22:ae:82
[19-02-12 15:46:45.7204] Slim::Player::TranscodingHelper::checkBin (242) Checking formats for: aac-test-squeezeplay-*
[19-02-12 15:46:45.7240] Slim::Player::TranscodingHelper::checkBin (242) Checking formats for: aac-test-*-*
[19-02-12 15:46:45.7276] Slim::Player::TranscodingHelper::getConvertCommand 2 (443) Error: Didn't find any command matches for type: aac
[19-02-12 15:46:45.7315] Slim::Player::Song::open (410) Error: Couldn't create command line for aac playback for [https://chai5she.cdn.dvmr.fr/mouvrapfr-hifi.aac]
[19-02-12 15:46:45.7355] Slim::Player::StreamingController::_playersMessage (789) Unsupported sample-rate: https://chai5she.cdn.dvmr.fr/mouvrapfr-hifi.aac
[19-02-12 15:46:45.7434] Slim::Schema::RemoteTrack::get (392) https://chai5she.cdn.dvmr.fr/mouvrapfr-hifi.aac, title->https://direct.mouv.fr/live/mouvrapfr-hifi.aac
[19-02-12 15:46:45.7519] Slim::Player::StreamingController::_willRetry (1397) no retry data


Key bits ...
"capability D not supported"
"Didn't find any command matches for type: aac"
"Couldn't create command line for aac playback"
"Unsupported sample-rate"

Playback device is a Joggler running oldish version of JiveLite.
LMS running on an old RPi and faad is installed
/usr/local/slimserver/Bin/armhf-linux/faad
and it is able to run (shows Build: Apr 6 2017 along with other stuff).

Errors above imply to me that LMS is determining that this fails - before it has run faad.

Paul Webster
2019-02-12, 08:25
If I change the URL and request .mp3 then it works ....
https://chai5she.cdn.dvmr.fr/mouvrapfr-hifi.mp3

bpa
2019-02-12, 08:55
It plays OK in VLC.

It seems it is a 48kHz 32bit floating-point sample stream which is a bit unusual.

It should be in ADTS format ( https://wiki.multimedia.cx/index.php/ADTS ) and so the format would be endcoded in the first few bytes - the following are from the stream


ff f1 4c 80 3e 5f fc 21 1a 94 ed b6 91 03 b0 b1 90 a4 51 08 05 41 74 61 29 a5 c8 90 40 28 10 4d ...

The "ff f1"starts looks like ADTS but it would need a full header decode (see above wiki entry) to understand why LMS fails as faad handles ADTS.

edit:

streams plays OK on my LMS transcoding with faad. I think the problem is pcp cannot play it natively.

paul-
2019-02-12, 09:14
We are using the faad version that is in the LMS github.

Might be interesting to run it from and ssh session to see if there is some more verbose output from faad.

bpa
2019-02-12, 09:32
We are using the faad version that is in the LMS github.

Might be interesting to run it from and ssh session to see if there is some more verbose output from faad.

I think the problem is when a player tries to play natively rather than transcode.
Can you disable native AAC and see of thr stream plays

edit:

looking back at the LMS log - there are huge chunks of the log missing - to interpret it properly you need to include ALL of the transcoding matching log entries especially the first few lines which indicate what LMS is looking for. The process checks many matches and failures to finds "best" match and it can be hard to see what is happening and often mistake a match for the final choice.

There are some strange parts to it why is AAC being trancoded to MP3 and not Flac ? this is very odd.
Why the "sample rate not supported" - has the player disabled some sample rate ?
Too many odd thinsg and not enough info.

Paul Webster
2019-02-12, 23:20
Thanks for the feedback.

Once I found that requesting MP3 worked then I switched back to concentrating on getting the 6 new stations working with the plugin (they completely changed their metadata format from what is being used by the rest of the stations).
I'll try to do some more testing with the AAC stream over the next few days and report back.

Paul Webster
2019-02-14, 12:40
Not had occasion to try a longer session with LMS - but did try again with mplayer and it does play but takes a long long time trying various codecs before finally playing it.

Here is the part where it detects it


Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
libavcodec version 58.30.100 (internal)
Configuration: --enable-gpl --enable-postproc
INFO: libavcodec "aac" init OK!
AUDIO: 48000 Hz, 2 ch, floatle, 196.9 kbit/6.41% (ratio: 24609->384000)
Selected audio codec: [ffaac] afm: ffmpeg (FFmpeg AAC (MPEG-2/MPEG-4 Audio))
================================================== ========================
Building audio filter chain for 48000Hz/2ch/floatle -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[dummy] Was reinitialized: 48000Hz/2ch/floatle
Trying every known audio driver...
ao_dsound: Output Devices:
0 Primary Sound Driver <--
1 Speakers (Realtek High Definition Audio)
2 Realtek Digital Output (Realtek High Definition Audio)
ao_dsound: DirectSound initialized
ao_dsound: format floatle not supported defaulting to Signed 16-bit Little-Endian
ao_dsound: Samplerate:48000Hz Channels:2 Format:s16le
ao_dsound: Buffersize:192000 bytes (1000 msec)
ao_dsound: primary buffer created
ao_dsound: secondary (stream)buffer created
AO: [dsound] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: Windows DirectSound audio output
AO: Author: Gabor Szecsi <deje@miki.hu>
Building audio filter chain for 48000Hz/2ch/floatle -> 48000Hz/2ch/s16le...
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[libaf] Adding filter format
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
Video: no video
Freeing 0 unused video chunks.
Starting playback...
[libaf] Reallocating memory in module format, old len = 0, new len = 65545
Increasing filtered audio buffer size from 0 to 65536
Increasing filtered audio buffer size from 65536 to 131072

bpa
2019-02-14, 12:57
Not had occasion to try a longer session with LMS - but did try again with mplayer and it does play but takes a long long time trying various codecs before finally playing it.

It's understandable because 32bit floating pt is unusual, I think it is near the end of mplayer's list of things to try.

The stream plays OK on my Ubuntu system with a DAC and squeezelite (i.e. inbuilt faad support is OK)


[19-02-14 19:54:33.6548] Slim::Player::TranscodingHelper::getConvertCommand 2 (446) Matched: aac->aac via: -
[19-02-14 19:54:33.6550] Slim::Player::Song::open (409) Transcoder: streamMode=I, streamformat=aac
[19-02-14 19:54:33.6551] Slim::Player::Song::open (462) Opening stream (no direct streaming) using Slim::Player::Protocols::HTTPS [https://chai5she.cdn.dvmr.fr/mouvrapfr-hifi.aac]
[19-02-14 19:54:33.9092] Slim::Player::Song::open (483) URL is a song (audio): https://chai5she.cdn.dvmr.fr/mouvrapfr-hifi.aac, type=aac


I think your player setup (e.g. player options such as no resample or forced resampling) is messing with the playback and so forcing LMS to look to trasncode..