bpa wrote: 
> An extension to the LMS routine Slim::Utils::Scanner::parseOggHeader
> which already checks for ogg Flac, to also check for Ogg Opus solves
> this issue.
> 
> > 
Code:
--------------------
  >   > 
  >     # search for Ogg FLAC headers within the data - if so change the 
content type to ogf for OggFlac
  >     # OggFlac header defined: http://flac.sourceforge.net/ogg_mapping.html
  >     if (substr($data, 0, 5) eq "\x7fFLAC" && substr($data, 9,4) eq 'fLaC') {
  >             main::DEBUGLOG && $log->is_debug && $log->debug("Ogg stream is 
OggFlac - setting content type [ogf]");
  >             Slim::Schema->clearContentTypeCache( $track->url );
  >             Slim::Music::Info::setContentType( $track->url, 'ogf' );
  >             $track->content_type('ogf');
  >     # search for Ogg Opus header within the data - if so change the content 
type to opus for OggOpus
  >     } elsif (substr($data, 0, 8) eq 'OpusHead') {
  >             main::DEBUGLOG && $log->is_debug && $log->debug("Ogg stream is 
OggOpus - setting content type [ops]");
  >             Slim::Schema->clearContentTypeCache( $track->url );
  >             Slim::Music::Info::setContentType( $track->url, 'ops' );
  >             $track->content_type('ops');
  >     }       
  > 
  > 
--------------------
> > 
> 
> Shall I suggest to Michael to add it to LMS ?

Seems needed and this would suggest that support of opus live stream
never worked before. It's true that opus works when part of a YT content
using DASH, and I also tested with local opus files, but I don't think
I've ever tested it with webradio-like streams (not very many). And
today, in squeezelite 'ogg' is mashed up with vorbis, so when sending
streaming request, LMS says 'o' (ogg) but means vorbis. When it's ogf,
it says 'f' with a small trick reusing pcmsamplesize to say 'o' to tell
that flac is encapsulated in an ogg container. I added a 'u' strm format
when the format is 'ops', but I did not update the parseOggHeader



LMS 7.7, 7.8 and 7.9 - 5xRadio, 3xBoom, 4xDuet, 1xTouch, 1 SB2. Sonos
PLAY:3, PLAY:5, Marantz NR1603, JBL OnBeat, XBoxOne, XBMC, Foobar2000,
ShairPortW, JRiver 21, 2xChromecast Audio, Chromecast v1 and v2, , Pi
B3, B2, Pi B+, 2xPi A+, Odroid-C1, Odroid-C2, Cubie2, Yamaha WX-010,
AppleTV 4, Airport Express, GGMM E5
------------------------------------------------------------------------
philippe_44's Profile: http://forums.slimdevices.com/member.php?userid=17261
View this thread: http://forums.slimdevices.com/showthread.php?t=111959

_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter

Reply via email to