embatman 0 Posted July 14, 2018 Share Posted July 14, 2018 Hi, I want to control my Pioneer N50-A via Emby over DLNA. Playing works fine, but I'm not able to pause or fast forward the audio. I think the problem is that the emby server transcodes my flac files, because of the cover art in the files. I guess that transcoded audio cant be paused, is this right? I already tried to build a DLNA profile, but I wasnt able to stop emby from transcoding. Maybe someone can give me an advice on this. My setup: Synology DS116 with Emby Server (192.168.10.59) iPhone to control the N-50A (192.168.10.46) Pioneer N50-A (192.168.10.44) Before this I used BubbleUPNP and a standard DLNA server of QNAP. With this setup I was able to play/pause/fast forward everything. I think the QNAP DLNA server just returned the original files without transcoding anything. When I use BubbleUPNP with Emby I am also not able to pause the audio. I hope you can help me, Niclas Server Log.txt Transcoding Log.txt Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 14, 2018 Share Posted July 14, 2018 Hi,it's transcoding flac to flac, which obviously it shouldn't be doing. Please try again with the next release of emby server as i think this may be resolved. Thanks. Link to comment Share on other sites More sharing options...
embatman 0 Posted July 14, 2018 Author Share Posted July 14, 2018 Hi, thanks for your fast comment. Is there a beta available to test it now or do I have to wait for the release? Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 14, 2018 Share Posted July 14, 2018 Betas are on the website, if available for your platform. Link to comment Share on other sites More sharing options...
embatman 0 Posted July 15, 2018 Author Share Posted July 15, 2018 I just tested with 3.4.1.33 on Windows and I have exactly the same situation. I also tried to replace the transcoded temporary file with the original one, which didn't had an effect. Maybe there is a problem with these DLNA flags that are sent? I am not sure if this can be an issue. Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 15, 2018 Share Posted July 15, 2018 Are you playing from the receiver, or using remote control from an Emby app to send to the receiver? Link to comment Share on other sites More sharing options...
embatman 0 Posted July 15, 2018 Author Share Posted July 15, 2018 If I play directly from the receiver everything works fine (play/pause/fast forward/backward), nothing gets transcoded (I don't see a transcode log) and I see a progress bar. I just tried that for the first time, sorry. If I use an Emby app to send the music to the receiver pause and fast forward isn't working. It looks like the receiver thinks that the file is a stream like internet radio because it doesn't show this progress bar. Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 15, 2018 Share Posted July 15, 2018 That's strange. I don't have a Pioneer receiver for testing but i tested both methods with devices that i do have and i was able to do both. Link to comment Share on other sites More sharing options...
embatman 0 Posted July 15, 2018 Author Share Posted July 15, 2018 Do you need more information to identify why this happens with my device? What can I do to solve this issue? Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 15, 2018 Share Posted July 15, 2018 You said you're on the beta. have you checked that it's still transcoding? Link to comment Share on other sites More sharing options...
embatman 0 Posted July 15, 2018 Author Share Posted July 15, 2018 Yes, I'm on latest beta for Windows. It is only transcoding when I send the music to the receiver via app. If I play directly on the receiver it is not transcoding. You can see this in the log. Server.txt Transcode.txt Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 18, 2018 Share Posted July 18, 2018 Would you mind performing a test, put this url in a browser and see if it results in a transcode log being generated? http://192.168.10.60:8096/audio/2d953656f41f40192e755d30a7d25ca0/stream.flac?DeviceId=5F9EC1B3-ED59-79BE-4530-745e1c8f961c&MediaSourceId=2d953656f41f40192e755d30a7d25ca0&Static=true&Tag=be71ae44d9bde2e8b381bb68034a31e4&dlnaheaders=true Thanks. Link to comment Share on other sites More sharing options...
embatman 0 Posted July 18, 2018 Author Share Posted July 18, 2018 I'm not at home, but I was able to try your link (just replaced the IP). Your link generates a transcode log and playback starts in Chrome. Thank you for looking into this. I also planned to test if this happens on another device (Marantz N6005) that I borrowed on friday. SpecialLinkLog.txt SpecialLinkTranscodeLog.txt Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 18, 2018 Share Posted July 18, 2018 Thanks, yea that would be a useful test. Link to comment Share on other sites More sharing options...
embatman 0 Posted July 20, 2018 Author Share Posted July 20, 2018 (edited) Ok, I just tested with the Marantz: The good things: No transcoding; play and pause works Bad things: Controls are a bit laggy; I can't control playback from iPhone if I started the playback on the laptop I think if we can get Emby to not transcode the songs for the Pioneer player everything should work. Is there anything I should test with one of the players? I borrowed the Marantz until tomorrow. EDIT: Interestingly Plex's DLNA server implementation has the same issue for the Pioneer (transcoding flac to flac), while the DLNA servers of QNAP and Synology work really well. Edited July 20, 2018 by embatman Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 21, 2018 Share Posted July 21, 2018 The main issue is that all of these require personal testing in order to really make them behave personally, and I just haven't tested with a Pioneer up to this point. Link to comment Share on other sites More sharing options...
embatman 0 Posted July 21, 2018 Author Share Posted July 21, 2018 Is there anything I can do to help investigate what has to be changed in Emby? Packet sniffing, some sort of debugging? Otherwise I may have the time to develop a patch in September, I think everything I need is open source, am I right? Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 26, 2018 Share Posted July 26, 2018 Can you try this url in a browser and let me know what happens? http://192.168.10.60:8096/audio/2d953656f41f40192e755d30a7d25ca0/stream.flac?DeviceId=5F9EC1B3-ED59-79BE-4530-745e1c8f961c&MediaSourceId=2d953656f41f40192e755d30a7d25ca0&Static=true&Tag=be71ae44d9bde2e8b381bb68034a31e4&dlnaheaders=true thanks. Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 26, 2018 Share Posted July 26, 2018 I think the issue is that we're sending this as a url to the Pioneer: http://192.168.10.60:8096/audio/2d953656f41f40192e755d30a7d25ca0/stream.flac?DeviceId=uuid:5F9EC1B3-ED59-79BE-4530-745e1c8f961c&MediaSourceId=2d953656f41f40192e755d30a7d25ca0&Static=true&Tag=be71ae44d9bde2e8b381bb68034a31e4&dlnaheaders=true but then it's double encoding all of the & to && Link to comment Share on other sites More sharing options...
embatman 0 Posted July 28, 2018 Author Share Posted July 28, 2018 I tried the following links and both are working without transcoding. Seems that you are right that there is an encoding issue on the Pioneer. http://localhost:8096/audio/2d953656f41f40192e755d30a7d25ca0/stream.flac?DeviceId=5F9EC1B3-ED59-79BE-4530-745e1c8f961c&MediaSourceId=2d953656f41f40192e755d30a7d25ca0&Static=true&Tag=be71ae44d9bde2e8b381bb68034a31e4&dlnaheaders=true http://localhost:8096/audio/2d953656f41f40192e755d30a7d25ca0/stream.flac?DeviceId=uuid:5F9EC1B3-ED59-79BE-4530-745e1c8f961c&MediaSourceId=2d953656f41f40192e755d30a7d25ca0&Static=true&Tag=be71ae44d9bde2e8b381bb68034a31e4&dlnaheaders=true I also compiled the beta branch and commented out line 324 in Device.cs (https://github.com/MediaBrowser/Emby/blob/beta/Emby.Dlna/PlayTo/Device.cs#L324). Now Emby should generate the link without the "amp;" and the Pioneer would just add one "amp;" to every "&" which would lead to the second link I tried. The log says that Emby successfully generates the link without "amp;" but the Pioneer answers to this exactly like before (with double "amp;") . public async Task SetAvTransport(string url, string header, string metaData, CancellationToken cancellationToken) { var avCommands = await GetAVProtocolAsync(cancellationToken).ConfigureAwait(false); //Commented this out //url = url.Replace("&", "&"); _logger.Debug("{0} - SetAvTransport Uri: {1} DlnaHeaders: {2}", Properties.Name, url, header); var command = avCommands.ServiceActions.FirstOrDefault(c => c.Name == "SetAVTransportURI"); if (command == null) return; var dictionary = new Dictionary<string, string> { {"CurrentURI", url}, {"CurrentURIMetaData", CreateDidlMeta(metaData)} }; Maybe the link that is displayed in the log is not the one that is actually sent. Another solution would be to get Emby to filter out this double "amp;". Do you have an advice on this? Are there any comptibility filters/layers I can use for this? Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 28, 2018 Share Posted July 28, 2018 That change will break other devices though. Link to comment Share on other sites More sharing options...
embatman 0 Posted July 28, 2018 Author Share Posted July 28, 2018 That change will break other devices though. I was just looking for a fast way to test if the pioneer works with another url. Link to comment Share on other sites More sharing options...
embatman 0 Posted July 28, 2018 Author Share Posted July 28, 2018 I had time to test some more. I changed line 216 in ServiceHandler.cs (https://github.com/MediaBrowser/Emby/blob/master/Emby.Server.Implementations/Services/ServiceHandler.cs#L216) which parses the URL. With the Pioneer the QueryString.Keys are parsed wrong because of the "amp;" before the real name of the key. I just replaced the "amp;" with nothing: private static async Task<Dictionary<string, string>> GetFlattenedRequestParams(IRequest request) { var map = new Dictionary<string, string>(); foreach (var name in request.QueryString.Keys) { if (name == null) continue; //thank you ASP.NET map[name.Replace("amp;", "")] = request.QueryString[name]; } I'm pretty sure there is a better way to implement a filter, but this works for testing. With that change there is no transcoding when using PlayTo to the Pioneer . The Pioneer also shows the progress bar and detects that the file is not a stream. But I am not able to play/pause or fast forward/rewind and the progress bar on the Emby UI is not working. The Pioneer seems to answer with Error 500 on the pause command as you can see in the log. Maybe you have another hint like the "amp;" one for me? Log.txt Link to comment Share on other sites More sharing options...
Luke 37230 Posted July 28, 2018 Share Posted July 28, 2018 I don't. That's just something that is going to take trial and error in order to figure out how to format the request in a way that will make the Pioneer happy. Since i don't have a Pioneer for testing, I'm unable to do that myself. If you try your earlier hack with just replacing the amp, does that allow seeking? Link to comment Share on other sites More sharing options...
embatman 0 Posted July 28, 2018 Author Share Posted July 28, 2018 Offtopic: Seeking was the word that doesn't came to my mind when I wrote fast forward/rewind. No, my hack has not allowed me to seek or to pause the audio. The seek command also results in Error 500. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now