jellyfin / jellyfin-plugin-dlna

GNU General Public License v3.0
10 stars 7 forks source link

Media playback issue on upnp/dlna renderer #11

Open MX10-AC2N opened 3 years ago

MX10-AC2N commented 3 years ago

Good morning all.. I have an audio amplifier connected (Harman Kardon AVR265), when I am on Jellyfin I can play my music directly on my amp. On the other hand my amp can only read MP3 or WMA, I also managed to stream my music with SWYH-RS ( https://github.com/dheijl/swyh-rs ) in LPCM WAV format. My problem is that Jellyfin transcodes some songs ( .ogg, .mpc, ...) in FLAC format (my amp cannot read this format) I try to edit a specific profile for my amp but it doesn't work no, how do you specify which transcoding to use ..? Another small problem, but quite unpleasant, when I start "instant mix", at the end of each song I again have the beginning of the song which starts again (for a few seconds) and then switch to the next song. It's strange because at this moment, the time bar only displays Naan: Naan Capture d’écran (23) Capture d’écran (25) Capture d’écran (27) On some songs I get stuck at the end of reading on Naan: Naan and I have to restart another song, I cannot simply start the next song by clicking on "next" ... Maybe it would be easier to use a method similar to SWYH-RS, my server reads the files and only streams in one audio format .. well I don't know too much .. Thank you again for this great app, hoping for a more functional upnp / dlna integration, I also come back to the web-radio integration (this will allow me to stream web radio in my amplifier ..) Have a good day..

BaronGreenback commented 3 years ago

For the transcoding, have you tried specifying the container type that your amp can play in the profile that it uses?

MX10-AC2N commented 3 years ago

Thank @BaronGreenback This is exactly what I am trying to do, I created a profile with the same name as my "Harman Kardon AVR265" amp but I am not sure if it is used when connecting with my amp Here is a copy of a transcode log https://paste.yunohost.org/luzodonovo.rb How do I know which profiles are used when connecting with an upnp device without profiles ..? Capture d’écran (37) Capture d’écran (38) Capture d’écran (39) I specify that I have tried with mp3, wma, wav as container for transcoding but no difference .. Thanks again..

BaronGreenback commented 3 years ago

First thing to check is that the correct profile is being selected.

Enable debug logging by changing default to debug in logging.default.json.

"Serilog": {
        "MinimumLevel": {
            "Default": "Debug",

The restart JF - try again, then take a look in the log file produced.

You're looking for the profile selection line.

MX10-AC2N commented 3 years ago

thank @BaronGreenback Sorry for my ignorance but where can we find the file to modify?

BaronGreenback commented 3 years ago

It's in the jellyfin configuration folder - Depending on your platform and how JF is run this can be in your profile folder, or \ProgramData\ in windows if run as a service.

MX10-AC2N commented 3 years ago

Hello, I was able to modify the file logging.default.json. For the moment I only have this in the last log ..

[2021-05-27 13:32:14.509 +02:00] [ERR] [70] Emby.Dlna.Main.DlnaEntryPoint: Error updating device info for "Harman Kardon AVR265" System.FormatException: String '0:00:00.-01' was not recognized as a valid TimeSpan. at System.Globalization.TimeSpanParse.TimeSpanResult.SetBadTimeSpanFailure() at System.Globalization.TimeSpanParse.ProcessTerminal_HMS_F_D(TimeSpanRawInfo& raw, TimeSpanStandardStyles style, TimeSpanResult& result) at System.Globalization.TimeSpanParse.ProcessTerminalState(TimeSpanRawInfo& raw, TimeSpanStandardStyles style, TimeSpanResult& result) at System.Globalization.TimeSpanParse.TryParseTimeSpan(ReadOnlySpan`1 input, TimeSpanStandardStyles style, IFormatProvider formatProvider, TimeSpanResult& result) at Emby.Dlna.PlayTo.Device.GetPositionInfo(TransportCommands avCommands, CancellationToken cancellationToken) at Emby.Dlna.PlayTo.Device.TimerCallback(Object sender)

MX10-AC2N commented 3 years ago

First thing to check is that the correct profile is being selected.

Enable debug logging by changing default to debug in logging.default.json.

"Serilog": {
        "MinimumLevel": {
            "Default": "Debug",

The restart JF - try again, then take a look in the log file produced.

You're looking for the profile selection line.

Here is a copy of my last .log but I cannot find any profile selection lines there. I am a little lost in the configuration that must be done to have the right trancoding for my upnp/dlna amp https://paste.yunohost.org/efixigased.vbs

BaronGreenback commented 3 years ago

The error that is being reported won't help at all. It looks like the AVR265 is reporting back an invalid timespan value.

The specs say it can be negative - but this format is incorrect.

That said, it JF should be able to handle it without crashing out. I would classify this a bug. (The good news is that the dlna version i'm currently working on, is able to correctly deal with this.)

Are you able to compile c# code on your system, as i'd be interested to see if the upcoming DLNA plugin release will solve your issue?

BaronGreenback commented 3 years ago

Just looking back at the information you've provided - I suspect it's also the cause of the NaN:NaN which you are seeing (short for Not A Number)

BaronGreenback commented 3 years ago

The second issue is one i've seen before. I'll check the unstable as this might have already been fixed. The issue is that ffmpeg (the transcoder) doesn't know the type of the file to process as it hasn't got an extension.

MX10-AC2N commented 3 years ago

Hi @BaronGreenback and thank you again for your feedback I can't find much info in my log files despite the modification in the file I have also enabled the DLNA debugger in the event log. But I still don't know whether or not I am using the profile I created for my amp.? How can I be sure that JF is using the profile I create, my amp has an " uuid:" maybe I should indicate it in the profile but I'm not sure where?

Are you able to compile c# code on your system, as i'd be interested to see if the upcoming DLNA plugin release will solve your issue?

I'm not sure but I want to give it a try, my JF is installed on Yunohost on an Armbian .. I can compile it with gcc.

PrplHaz4 commented 3 years ago

When playing something over DLNA, you should see a log entry like this, where Samsung Smart TV - test is the profile being used for playback.

You should only put minimal entries in the "Info -> Identification" fields of the DLNA profile - here's what I have where matching works. It was created by editing an existing profile and changing the name (the defaults don't ever get overwritten).

[02:11:34] [INF] Profile: Samsung Smart TV - test, Path: Unknown path, isEligibleForDirectPlay: True, isEligibleForDirectStream: True
[02:11:34] [INF] Profile: Samsung Smart TV - test, No video direct play profiles found for Unknown path with codec Unknown codec
MX10-AC2N commented 3 years ago

Thank @PrplHaz4 I don't understand why I can't find the profile info in my logs, yet I modified the file logging.default.json. in my JF configuration folder there is also a "loggin.json" file maybe I also have to make a modification of this file ... Capture d’écran (44)

I tried to make some changes in the profile for my amp using what my amp returns when I go to the page (http: //192.168.1.###/dd.xml) I made some a copy on https://paste.yunohost.org/edoxocoluy.xml

and here is what I filled as info in the profile under JF Capture d’écran (40) Capture d’écran (41) Capture d’écran (43)

and to finish the copy of my last log but still nothing concerning the profile selected for my amp. https://paste.yunohost.org/ijunilufuf.vbs

Thanks again, hope my feedback can help you. Have a good day..

PrplHaz4 commented 2 years ago

You may want to try again with the latest jf - this makes it sounds like it is identifying the profile properly but messes up reading the timespan:

[2021-05-29 10:23:27.561 +02:00] [ERR] [81] Emby.Dlna.Main.DlnaEntryPoint: Error updating device info for "Harman Kardon AVR265"
System.FormatException: String '0:00:00.-01' was not recognized as a valid TimeSpan.
   at System.Globalization.TimeSpanParse.TimeSpanResult.SetBadTimeSpanFailure()
   at System.Globalization.TimeSpanParse.ProcessTerminal_HMS_F_D(TimeSpanRawInfo& raw, TimeSpanStandardStyles style, TimeSpanResult& result)
   at System.Globalization.TimeSpanParse.ProcessTerminalState(TimeSpanRawInfo& raw, TimeSpanStandardStyles style, TimeSpanResult& result)
   at System.Globalization.TimeSpanParse.TryParseTimeSpan(ReadOnlySpan`1 input, TimeSpanStandardStyles style, IFormatProvider formatProvider, TimeSpanResult& result)
   at System.TimeSpan.Parse(String input, IFormatProvider formatProvider)
   at Emby.Dlna.PlayTo.Device.GetPositionInfo(TransportCommands avCommands, CancellationToken cancellationToken)
   at Emby.Dlna.PlayTo.Device.TimerCallback(Object sender)

Maybe you could simplify your identification down to just the serial number, as that string seems less likely to have parsing/regex issues...

HybridSarcasm commented 8 months ago

This has been open quite a while. Can this be re-produced with the current build? If so, please update the bug report details. Thanks!