INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Can't play FLAC using Library Server  (Read 5606 times)

sdawson

  • Guest
Can't play FLAC using Library Server
« on: January 31, 2006, 02:51:22 am »

This has been reported elsewhere, but I've not seen any resolution.

FLAC files won't play using library server. The client reports:

Media Center encountered errors while trying to play the last several files.
Please make sure that the path in your media library points to the right location.

Other file formats play fine (with the exception of anything that's ripped as an image with cue in any format, but that seems to be a known limitation at present).

Ideas anyone? I'm using MC 11.0.316, encoder version 1.5, decoder version 1.3.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: Can't play FLAC using Library Server
« Reply #1 on: January 31, 2006, 09:57:11 am »

I believe the problem with flac files is that they are not seekable. You have to play them with conversion.
Logged

sdawson

  • Guest
Re: Can't play FLAC using Library Server
« Reply #2 on: January 31, 2006, 06:15:03 pm »

Not sure about that one. I saw a message from the plugin developer in another thread that said he hadn't tested using Library Server, but was interested in feedback, which made me think it should be possible. You can seek fine when playing locally - the latest plugin has support for quick seeking I think (not that I know much about these things).
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Can't play FLAC using Library Server
« Reply #3 on: January 31, 2006, 07:23:05 pm »

I believe there are some problems because the FLAC plugins do not fully utilize the JRReader as the file interface.  The FLAC SDK has it's own set of file interfaces which is what I used at the time (because it made development easier).  However, I have been contemplating re-writing the plugins to use JRReader but it means I also have to rewrite the FLAC portions to use a different interface.  It's something that will eventually be worked out, but is not available at the present time.
Logged

sdawson

  • Guest
Re: Can't play FLAC using Library Server
« Reply #4 on: January 31, 2006, 07:43:10 pm »

OK, thanks for the reply Scott. I can play FLAC using Library Server if I convert on the fly to MP3 (which kind of negates the point of having everything in lossless  ;)). For some reason, if I convert on the fly to Ogg at highest quality (to try to conserve as much quality as possible), MC on the server crashes in the Flac input plugin. Oh well, I'm sure (or at least hope) all will be sorted in the fullness of time. I'd like to have my music collection in FLAC format, since it seems to be the most open of the lossless formats, and is being supported in hardware more and more.

Cheers.

Steve
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: Can't play FLAC using Library Server
« Reply #5 on: January 31, 2006, 11:31:22 pm »

I believe there are some problems because the FLAC plugins do not fully utilize the JRReader as the file interface.  The FLAC SDK has it's own set of file interfaces which is what I used at the time (because it made development easier).  However, I have been contemplating re-writing the plugins to use JRReader but it means I also have to rewrite the FLAC portions to use a different interface.  It's something that will eventually be worked out, but is not available at the present time.

From my experience doing the same type of conversion to using the JRReader on the Musepack input plugin I can say that your problem with the library server probably comes from not using the JRReader. The JRReader can do seeks on the network stream. If the plugin indicates that the input is seekable and it does seek properly, the library server will work.
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Can't play FLAC using Library Server
« Reply #6 on: February 01, 2006, 06:13:02 pm »

Thanks, Bob, that's what I figured.  To summarize:

Any problems with the flac plugins and the library server are a problem with the plugins, not MC.  When I eventually get time to rewrite the plugins, these problems will likely go away.
Logged

sdawson

  • Guest
Re: Can't play FLAC using Library Server
« Reply #7 on: February 01, 2006, 09:10:07 pm »

OK, thanks Scott. Obvious question, but one that has to be asked  ;)...do you intend to do this rewrite at some stage? Your answer will impact the lossless codec choice for me, since i want to be able to play via Library Server. If I know it will work one day, I'll stick with FLAC. Thanks for all the great work.
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Can't play FLAC using Library Server
« Reply #8 on: February 02, 2006, 07:58:11 pm »

OK, thanks Scott. Obvious question, but one that has to be asked  ;)...do you intend to do this rewrite at some stage? Your answer will impact the lossless codec choice for me, since i want to be able to play via Library Server. If I know it will work one day, I'll stick with FLAC. Thanks for all the great work.

Yes, I do.  It was something I thought I might get to over the holidays, but didn't.  Thanks for your support!!
Logged

sdawson

  • Guest
Re: Can't play FLAC using Library Server
« Reply #9 on: February 02, 2006, 08:46:16 pm »

That's great - I'll keep my eyes open!
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Can't play FLAC using Library Server
« Reply #10 on: February 05, 2006, 10:54:40 am »

Bob --

I started writing the code for using the JRReader and I get some errors related to the Input SDK (see post http://yabb.jriver.com/interact/index.php?topic=31761.0 in the developer forum).  The base class provided in the SDK is failing.
Logged

stanger89

  • MC Beta Team
  • Junior Woodchuck
  • *****
  • Posts: 67
Re: Can't play FLAC using Library Server
« Reply #11 on: April 04, 2007, 04:57:14 pm »

I realize this is a long dead thread, but I'm having a slight variation on this problem

On my LAN, I can play flac files from my library server via either transcoding or not.  However I use the library server (or is it media server in MC12) to stream music to work (over the internet), and I get the same "there were errors playing files" described above.

I've currently got a mix of WMA Lossless and FLAC in my library and the WMAL files play fine.  Looking at the logs I see with flac files entries like this:

Code: [Select]
2902093: 2380: Playback: CPlaybackEngImpl::Play: Start
2902093: 2380: Playback: CPlaybackEngImpl::Play: Playing http://stanger89.dyndns.org:80/^5c^5creadynas01^5cmedia^5cMusic^5cAnime^5cYoko Kanno^5cCOWBOY BEBOP O.S.T. FUTURE  BLUES^5c11 - Fingers.flac with type flac
2902103: 2380: Playback: CPlaybackEngImpl::Play: Finish (10 ms)

Followed by this:
Code: [Select]
2902203: 2380: Reader: CInternetReader::Close: Start
2902303: 2380: Reader: CInternetReader::Close: Finish (100 ms)
2902303: 2380: Reader: CInternetReader::Close: Start
2902403: 2380: Reader: CInternetReader::Close: Finish (100 ms)

However when I try and play a WMAL, I see this:
Code: [Select]
2931495: 2380: Playback: CPlaybackEngImpl::Play: Start
2931495: 2380: Playback: CPlaybackEngImpl::Play: Playing http://stanger89.dyndns.org:80/^5c^5creadynas01^5cmedia^5cMusic^5cRock^5cVan Halen^5cVan Halen^5c04 - Ain't Talkin' 'Bout Love.wma?codec=Ogg Vorbis&settings=Mode=0|Quality=2|Command Line=-q%204%2e99 with type ogg
2931505: 2380: Playback: CPlaybackEngImpl::StartPlayFile: Start
and then this:
Code: [Select]
2931535: 1008: Reader: CInternetReader::Open: Start
2931535: 1008: Reader: CInternetReader::Open: Opening http://stanger89.dyndns.org:80/^5c^5creadynas01^5cmedia^5cMusic^5cRock^5cVan Halen^5cVan Halen^5c04 - Ain't Talkin' 'Bout Love.wma?codec=Ogg Vorbis&settings=Mode=0|Quality=2|Command Line=-q%204%2e99
2931535: 2380: Playback: CMJWaveFeeder::Play: Finish (20 ms)
2931535: 2348: Reader: CInternetReader::Thread: Start
2931535: 2380: Playback: CPlaybackEngImpl::StartPlayFile: Playback type: MJ, nRetVal=1
2931545: 2348: Reader: CInternetReader::DownloadFromHTTPURL: Start

It appears with FLAC, it's never going to get the file, also, I note that the transcoding options aren't set with flac but are with WMAL

Any thoughts, this is with MC12 and the latest InFLAC plugin.
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Can't play FLAC using Library Server
« Reply #12 on: April 04, 2007, 05:15:18 pm »

What are the conversion setting set to (on the client)?

j

stanger89

  • MC Beta Team
  • Junior Woodchuck
  • *****
  • Posts: 67
Re: Can't play FLAC using Library Server
« Reply #13 on: April 05, 2007, 03:39:45 pm »

Well I've tried two ways (from two places) at work, it's Transcode Always to Ogg-Normal.  I tried from my parents house and I think I just left it as Don't Transcode there and got the same Error Playing Several Files, and the logs were very similar with respect to CInternetReader.
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Can't play FLAC using Library Server
« Reply #14 on: April 05, 2007, 03:58:55 pm »

On the server, try transcoding a FLAC file to an Ogg file. Does that work?

j

stanger89

  • MC Beta Team
  • Junior Woodchuck
  • *****
  • Posts: 67
Re: Can't play FLAC using Library Server
« Reply #15 on: April 05, 2007, 04:34:41 pm »

Apparently not, which is weird, because it appears to work via the library server on my LAN.  If I connect from a different PC with MC set to Transcode Always, all my flac files play, and the bitrate appears reasonable for transcoded (100-300kbps)...
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Can't play FLAC using Library Server
« Reply #16 on: April 05, 2007, 04:55:31 pm »

What's the error when you try to transcode the file?

Can you play a FLAC on the server machine?

j

stanger89

  • MC Beta Team
  • Junior Woodchuck
  • *****
  • Posts: 67
Re: Can't play FLAC using Library Server
« Reply #17 on: April 06, 2007, 09:32:19 am »

"Failed to convert 1 file.

Please ensure that your files exist, and are of a supported audio format."

As for if they play, well, nothing plays on my server because it's headless and I remote into it and it doesn't like the output format.

However I can transcode to FLAC->MP3 on the server.

Oh, thanks for the help.
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Can't play FLAC using Library Server
« Reply #18 on: April 06, 2007, 10:43:10 am »

Try it as a two step process: Flac->mp3 and then mp3->ogg. I'm still just guessing, but it sounds like the Ogg encoder isn't working...

j

stanger89

  • MC Beta Team
  • Junior Woodchuck
  • *****
  • Posts: 67
Re: Can't play FLAC using Library Server
« Reply #19 on: April 06, 2007, 02:30:32 pm »

It would appear that's the case.  Using Library Tools -> Convert Format, I get the same error going from WMA Lossless, FLAC, and MP3 to OGG.

I'll try a couple more across the internet experiments a little later this afternoon.  Like I said earlier, WMAL -> Ogg works from the library server across the internet.  And on my LAN it appears as though transcoding (library server) works for everything.

Is there any debugging I can turn on on the server that would help?
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Can't play FLAC using Library Server
« Reply #20 on: April 06, 2007, 04:01:32 pm »

First try a re-install of MC. Ogg should be working.

Second, verify that it *is* working over your LAN. If it is, we are probably chasing down the wrong path...

j

stanger89

  • MC Beta Team
  • Junior Woodchuck
  • *****
  • Posts: 67
Re: Can't play FLAC using Library Server
« Reply #21 on: April 06, 2007, 04:29:26 pm »

First try a re-install of MC. Ogg should be working.

I'll give that a try when I get back home tonight.

Quote
Second, verify that it *is* working over your LAN. If it is, we are probably chasing down the wrong path...

How about I put it this way, the logs say it's transcoding on the LAN, the bitrate meter appears as though it's transcoding on the lan (bouncing between 100-300kbps vs 900-1200 for lossless), and looking at the traffic via Wireshark, it's making HTTP GET requests for the files with the appropriate transcoding commands.  The one thing I haven't tried is setting it to really-crappy quality transcoding and listenning for the artifacts.

And one further data point, since I'm away from home at the moment, I decided to try using the library server over the internet, but this time to disable transcoding entirely (library server options on the client).  When I do this, I can still play WMAL's (takes a long time to buffer though), but if I try to play a FLAC, I instantly get the same "Media Center encountered errors while trying to play the last several files. Please make sure the path in your media library points to the right location." error.

However if I go into the log, get the URL it's trying to play and enter that in a web browser it finds the file and downloads it successfully.

One more data point, as noted above OGG transcoding works over the net for WMAL, as evidenced by the logs showing "?codec=Ogg Vorbis&settings= with type ogg" on the end of the file URL.  FLAC files played with "Always convert audio" don't show that.  However if I enter the URL to a flac file and manually append "?codec=Ogg Vorbis&settings= with type ogg" to it in a browser, it downloads and converts the file appropriately.

Thanks again for the help, I really appreciate it.
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Can't play FLAC using Library Server
« Reply #22 on: April 09, 2007, 12:24:51 pm »

Is the FLAC plugin installed on the work computer? That might explain this:

Conversion is set on the client, not on the server.
The client has to know what FLAC is to decide if it should ask for conversion or not.
Since it doesn't know what FLAC is, it doesn't ask for conversion and the server sends raw FLAC.
The client can't play it because it doesn't know what FLAC is.

Try installing the FLAC plugin on the work computer too, see if that fixes it.

If this is the problem, please let me know here. We should handle this more elegantly...

j

stanger89

  • MC Beta Team
  • Junior Woodchuck
  • *****
  • Posts: 67
Re: Can't play FLAC using Library Server
« Reply #23 on: April 09, 2007, 04:03:40 pm »

Is the FLAC plugin installed on the work computer? That might explain this:

I thought I'd tried that, but I just did it at my parents (also over internet) and it works now (didn't without the plugin).  So it looks like that's it.  I'll double check and see if that fixes it at work to.

Thanks again for the help!
Logged

stanger89

  • MC Beta Team
  • Junior Woodchuck
  • *****
  • Posts: 67
Re: Can't play FLAC using Library Server
« Reply #24 on: April 11, 2007, 06:39:14 pm »

I did a quick check at work and it appears to work now after installing the plugin, thanks!
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Can't play FLAC using Library Server
« Reply #25 on: April 12, 2007, 02:06:51 pm »

I added a fix for this, so that in the future you should be able to play FLAC files on the client without the plugin using conversion.

j
Pages: [1]   Go Up