-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't assign requested address (os error 49) #5
Comments
Hi @trsdln! Thank you for the kind words :-) I think I have figured out the problem. I've put a candidate fix in the You can install from the source like this:
Would you minding installing and testing this new version? Thank you very much! |
Hi @gabrielmagno! Thanks for quick response. Your patch resolved this issue. Unfortunately,
I was wondering if there is a way to get more info from TV's AVTransportURI error response. |
Hey @trsdln. Thanks for following this up with me. Oh, that is too bad that Regarding the streaming server IP, you don't need to edit in the code, you could specify it with the
Now, coming back to the
|
Yes, I'm getting this message:
|
Doesn't look like this issue is platform related. I'm getting same 500 Error on both Linux and macOS. Notes on
async fn build_media_streaming_server(&self) -> Result<MediaStreamingServer> {
info!("Building media streaming server");
let local_ip;
let host_ip = match self.host.as_ref() {
Some(x) => x,
None => {
local_ip = get_local_ip().await?;
&local_ip
}
};
// .... |
Ok! I'm affraid I will not be able to fix it right now, but after we figure out the other problem, I will try to look into the
You are right, I will change this behaviour for the next release. For now, I'have mad some other changes in our test branch. Could you update it, run, and share the debug log again? Thanks! |
@gabrielmagno Sure. Here you go:
(I posted only new part. The rest of logs are unchanged) |
Not sure if that is really the case (probably not), but your render device is stating that it does not support When you run Would you mind sharing the content of Also, could you try playing the video using Thanks |
Log says
per http://upnp.org/specs/av/UPnP-av-AVTransport-v3-Service.pdf (page 53). Maybe streaming server is not running at the time of
response.xml<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0" xmlns:pnpx="http://schemas.microsoft.com/windows/pnpx/2005/11" xmlns:df="http://schemas.microsoft.com/windows/2008/09/devicefoundation">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
<friendlyName>[LG] webOS TV OLED48A16LA</friendlyName>
<manufacturer>LG Electronics.</manufacturer>
<manufacturerURL>http://www.lge.com</manufacturerURL>
<modelDescription>LG WebOSTV DMRplus</modelDescription>
<modelName>LG TV</modelName>
<modelURL></modelURL>
<modelNumber>1.0</modelNumber>
<serialNumber></serialNumber>
<UDN>uuid:dbf55052-6277-864f-1d0e-4ae37e5efe1d</UDN>
<pnpx:X_compatibleId>MS_DigitalMediaDeviceClass_DMR_V001</pnpx:X_compatibleId>
<pnpx:X_deviceCategory>MediaDevices</pnpx:X_deviceCategory>
<df:X_deviceCategory>Multimedia.DMR</df:X_deviceCategory>
<df:X_modelId>LG Digital Media Renderer TV</df:X_modelId>
<lge:X_LG_DLNA_DOC xmlns:lge="urn:lge-com:device-1-0">1.0</lge:X_LG_DLNA_DOC>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMR-1.50</dlna:X_DLNADOC>
<iconList>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/dmrIcon_48.jpeg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/dmrIcon_120.jpeg</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/dmrIcon_48.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>8</depth>
<url>/dmrIcon_120.png</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
<serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
<SCPDURL>/AVTransport/dbf55052-6277-864f-1d0e-4ae37e5efe1d/scpd.xml</SCPDURL>
<controlURL>/AVTransport/dbf55052-6277-864f-1d0e-4ae37e5efe1d/control.xml</controlURL>
<eventSubURL>/AVTransport/dbf55052-6277-864f-1d0e-4ae37e5efe1d/event.xml</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
<SCPDURL>/ConnectionManager/dbf55052-6277-864f-1d0e-4ae37e5efe1d/scpd.xml</SCPDURL>
<controlURL>/ConnectionManager/dbf55052-6277-864f-1d0e-4ae37e5efe1d/control.xml</controlURL>
<eventSubURL>/ConnectionManager/dbf55052-6277-864f-1d0e-4ae37e5efe1d/event.xml</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
<serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
<SCPDURL>/RenderingControl/dbf55052-6277-864f-1d0e-4ae37e5efe1d/scpd.xml</SCPDURL>
<controlURL>/RenderingControl/dbf55052-6277-864f-1d0e-4ae37e5efe1d/control.xml</controlURL>
<eventSubURL>/RenderingControl/dbf55052-6277-864f-1d0e-4ae37e5efe1d/event.xml</eventSubURL>
</service>
</serviceList>
</device>
</root> Re. https://github.com/gabrielmagno/nano-dlna: I already tried it before filing this issue. It didn't work as well, but with different kind of error. I will give it another try if this troubleshooting fails. Thank you! |
@trsdln could you test something for us? Turn on your TV, open a terminal in your PC, and then run this curl command (you don't have to have crab-dlna running):
Then post the full result/response of the command here. |
here you go:
|
just for fun I hosted video at separate server and ran similar request:
Looks like streaming server is indeed non running while calling |
@trsdln I think I figured out what is happening. To play a video we actually have to do two DLNA commands: It will not be so trivial because it will probably envolve handling async and threads. But I will think about how to handle this in code and come back to you soon. |
@trsdln actually I've checked, and the server is already not blocking and is being spawned to run in a thread. My hypothesis now is that the I added a explicit wait time now before sending the setavtransport URI. Let's see how it goes. Could you test again from the same branch? Thank you! |
@gabrielmagno I can confirm that streaming server is running properly before and after Here's response headers comparison between successful and failed Gerbera (used here #5 (comment))
crab-dlna
Not sure if extra headers matter in this case though. So, at this point I'm out of ideas how to troubleshoot it. UPDATE: I suspect TV is doing unexpected requests to streaming server. Not sure what this line means:
but it appears only after SetAVTransportURI. While doing regular download via browser it doesn't come up. |
You mentioned that you could serve the media file using a separate server, right? Let's do like we did before, but changing the First, do the
Not sure if I got it wrong, but when you do that you get a 200 response, right? Or does it still results in a 500 internal server error? If a 200 response is returned, then do a
|
@gabrielmagno My TV doesn't cooperate.
But
After that I wanted to retry first and second request, but in both cases I'm getting this error:
|
@trsdln Thanks for new tests. Your TV's behaviour is weird, but I would not put the blame totally on it. There could still be something that I'm missing about UPnP and DLNA. Well, my last suggestion would be to try another DLNA application to stream content to your TV. The best DLNA implementation that I know (that implements the "AV Transport" DLNA function is the Android BubbleUPnP app. This is just a suggestion, there are other software that you could also try. |
@gabrielmagno Thank you. BubbleUPnP works flawlessly. |
This is great app. I really like the idea.
list
function works as expected. However, while trying to play video I got this:It reproduces on both macOS (M1) and GNU Linux (x86_64). My TV runs WebOS.
The text was updated successfully, but these errors were encountered: