siddhartha 11 Posted April 12, 2015 Share Posted April 12, 2015 I can Play To just fine, but any time it try to resume, the video will play from the beginning and I get the undescriptive error 500 on the client (in Chrome or iOS). However, I can seek to any position. Is there a way to change the backend so the command code sent to the Viera is a Seek command and not a PlayFrom command when resuming? I've tried to make changes to the code myself, but my changes aren't picked up when I reboot the server. I also get the same error 500 if something is already playing on the Viera and I try to start a different video. Thanks for the amazing software! Link to comment Share on other sites More sharing options...
Luke 37133 Posted April 12, 2015 Share Posted April 12, 2015 It depends. If transcoding then it's a play from command and the server will seek to the position. If direct stream, then it's a play + seek. So we already have that. Ultimately the problem is that all of this requires separate testing on every device you want to support, and since nobody on the team currently has a Viera we are depending on the community to help out and find the problem. Link to comment Share on other sites More sharing options...
siddhartha 11 Posted April 12, 2015 Author Share Posted April 12, 2015 It's definitely not transcoding and is a direct play. This is what appears in the Chrome console when resuming (and failing): POST http://localhost:8096/Sessions/e3d5461518380e52a0a8002c53c05634/Playing?Ite…7f9cd534731fb6cffdf9e42&PlayCommand=PlayNow&startPositionTicks=23740000000 500 (HttpException) And this is what appears when seeking: http://localhost:8096/Sessions/e3d5461518380e52a0a8002c53c05634/Playing/seek?SeekPositionTicks=45241577500 Here is the log of the resume event: 2015-04-12 08:43:14.4265 Debug - HttpServer: HTTP POST http://localhost:8096/Sessions/e3d5461518380e52a0a8002c53c05634/Playing?ItemIds=a263869db7f9cd534731fb6cffdf9e42&PlayCommand=PlayNow&startPositionTicks=45180000000 Ip: 127.0.0.1:62285. Headers: Host=localhost:8096,Connection=keep-alive,Content-Length=0,Accept=*/*,X-MediaBrowser-Token=6f9dd0c672eb49f0b546fd8199ad16fe,User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36,Authorization=MediaBrowser Client="Dashboard", Device="Chrome 41.0.2272.118", DeviceId="ca289f04f641d58229607ec350edfabf7274a7c2", Version="3.0.5572.0", UserId="933db9c06f7ca5274cdecbc4208d424b",Origin=http://localhost:8096,DNT=1,Accept-Encoding=gzip, deflate,Accept-Language=en,en-CA;q=0.8 2015-04-12 08:43:14.4265 Debug - Dlna: VIERA - Received PlayRequest: PlayNow 2015-04-12 08:43:14.4265 Debug - Dlna: Found matching device profile: Panasonic Viera 2015-04-12 08:43:14.4265 Debug - Dlna: VIERA - Playlist created 2015-04-12 08:43:14.4265 Debug - Dlna: VIERA - Playing 1 items 2015-04-12 08:43:14.4265 Debug - Dlna: VIERA - SetAvTransport Uri: http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; DlnaHeaders: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01D00000000000000000000000000000 2015-04-12 08:43:14.4655 Debug - HttpServer: HTTP HEAD http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; Ip: 192.168.1.247:22802. Headers: User-Agent=Panasonic MIL DLNA CP UPnP/1.0 DLNADOC/1.50,Host=192.168.1.229:8096,getcontentFeatures.dlna.org=1 2015-04-12 08:43:14.4675 Debug - HttpServer: HTTP Response 200 to 192.168.1.247. Response time: 2.0001 ms. Url: http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; 2015-04-12 08:43:14.4675 Debug - HttpServer: Exiting HttpConnection.OnReadInternal because nread=0. ConnectionId: cae2ba6856554da0bd711d9b05d693da 2015-04-12 08:43:15.6865 Debug - HttpServer: HTTP HEAD http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; Ip: 192.168.1.247:61302. Headers: User-Agent=Panasonic MIL DLNA CP UPnP/1.0 DLNADOC/1.50,Host=192.168.1.229:8096,getcontentFeatures.dlna.org=1 2015-04-12 08:43:15.6865 Debug - HttpServer: HTTP Response 200 to 192.168.1.247. Response time: 0 ms. Url: http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; 2015-04-12 08:43:15.6865 Debug - HttpServer: Exiting HttpConnection.OnReadInternal because nread=0. ConnectionId: 0d2ae003d4b5467fa33d85662a45b184 2015-04-12 08:43:15.7021 Debug - Dlna: RestartTimer 2015-04-12 08:43:15.8113 Debug - HttpServer: HTTP GET http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; Ip: 192.168.1.247:49153. Headers: User-Agent=,Accept=*/*,Range=bytes=0-,Connection=close,Host=192.168.1.229:8096 2015-04-12 08:43:15.8425 Error - App: Error getting response from http://192.168.1.247:55000/dmr/control_2 *** Error Report *** Version: 3.0.5572.0 Command line: C:\Users\Peter Parker\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 Processor count: 4 64-Bit OS: True 64-Bit Process: False Program data path: C:\Users\Peter Parker\AppData\Roaming\MediaBrowser-Server Application Path: C:\Users\Peter Parker\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe The remote server returned an error: (500) Internal Server Error. System.Net.WebException at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 2015-04-12 08:43:15.8425 Error - DtoUtils: ServiceBase<TRequest>::Service Exception *** Error Report *** Version: 3.0.5572.0 Command line: C:\Users\Peter Parker\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 Processor count: 4 64-Bit OS: True 64-Bit Process: False Program data path: C:\Users\Peter Parker\AppData\Roaming\MediaBrowser-Server Application Path: C:\Users\Peter Parker\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe The remote server returned an error: (500) Internal Server Error. MediaBrowser.Model.Net.HttpException at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.<SendAsyncInternal>d__1e.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Common.Implementations.HttpClientManager.HttpClientManager.<SendAsync>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Dlna.PlayTo.SsdpHttpClient.<SendCommandAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Dlna.PlayTo.Device.<Seek>d__24.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Dlna.PlayTo.PlayToController.<SetPlaylistIndex>d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MediaBrowser.Dlna.PlayTo.PlayToController.<PlayItems>d__30.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at MediaBrowser.Dlna.PlayTo.PlayToController.<SendPlayCommand>d__1d.MoveNext() InnerException: System.Net.WebException The remote server returned an error: (500) Internal Server Error. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) 2015-04-12 08:43:15.8425 Error - HttpServer: Error processing request for /Sessions/e3d5461518380e52a0a8002c53c05634/Playing?ItemIds=a263869db7f9cd534731fb6cffdf9e42&PlayCommand=PlayNow&startPositionTicks=45180000000 *** Error Report *** Version: 3.0.5572.0 Command line: C:\Users\Peter Parker\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1 Processor count: 4 64-Bit OS: True 64-Bit Process: False Program data path: C:\Users\Peter Parker\AppData\Roaming\MediaBrowser-Server Application Path: C:\Users\Peter Parker\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe The remote server returned an error: (500) Internal Server Error. ServiceStack.HttpError No Stack Trace Available 2015-04-12 08:43:15.8425 Debug - HttpServer: HTTP Response 500 to 127.0.0.1. Response time: 1416.0118 ms. Url: http://localhost:8096/Sessions/e3d5461518380e52a0a8002c53c05634/Playing?ItemIds=a263869db7f9cd534731fb6cffdf9e42&PlayCommand=PlayNow&startPositionTicks=45180000000 2015-04-12 08:43:15.8581 Debug - HttpServer: HTTP GET http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; Ip: 192.168.1.247:11183. Headers: User-Agent=,Accept=*/*,Range=bytes=0-,Connection=close,Host=192.168.1.229:8096 2015-04-12 08:43:16.0043 Info - App: SessionInfoWebSocketListener Begin transmitting over websocket to 127.0.0.1:58072 2015-04-12 08:43:16.9059 Debug - HttpServer: HTTP GET http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; Ip: 192.168.1.247:19468. Headers: User-Agent=,Accept=*/*,Range=bytes=3007601233-,Connection=close,Host=192.168.1.229:8096 2015-04-12 08:43:16.9059 Debug - HttpServer: HTTP Response 206 to 192.168.1.247. Response time: 0 ms. Url: http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; 2015-04-12 08:43:16.9215 Debug - HttpServer: HTTP Response 500 to 192.168.1.247. Response time: 1063.4098 ms. Url: http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; 2015-04-12 08:43:16.9371 Debug - HttpServer: HTTP GET http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; Ip: 192.168.1.247:13118. Headers: User-Agent=,Accept=*/*,Range=bytes=5947188-,Connection=close,Host=192.168.1.229:8096 2015-04-12 08:43:17.9895 Debug - HttpServer: HTTP Response 500 to 192.168.1.247. Response time: 2178.2147 ms. Url: http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; 2015-04-12 08:43:20.2211 Debug - HttpServer: HTTP POST http://localhost:8096/Sessions/e3d5461518380e52a0a8002c53c05634/Playing/stop? Ip: 127.0.0.1:63295. Headers: Host=localhost:8096,Connection=keep-alive,Content-Length=0,Accept=*/*,X-MediaBrowser-Token=6f9dd0c672eb49f0b546fd8199ad16fe,User-Agent=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.118 Safari/537.36,Authorization=MediaBrowser Client="Dashboard", Device="Chrome 41.0.2272.118", DeviceId="ca289f04f641d58229607ec350edfabf7274a7c2", Version="3.0.5572.0", UserId="933db9c06f7ca5274cdecbc4208d424b",Origin=http://localhost:8096,DNT=1,Accept-Encoding=gzip, deflate,Accept-Language=en,en-CA;q=0.8 2015-04-12 08:43:20.5377 Debug - HttpServer: HTTP Response 500 to 192.168.1.247. Response time: 3600.6234 ms. Url: http://192.168.1.229:8096/videos/a263869db7f9cd534731fb6cffdf9e42/stream.mp4?Params=ce3dfd49a84bd9a952967c3fe30b4edd;uuid:4D454930-0100-1000-8001-20C6EBDA9D7C;a263869db7f9cd534731fb6cffdf9e42;true;;;;;;;;;;;45180000000;;;;;;;;; 2015-04-12 08:43:20.5533 Debug - HttpServer: HTTP Response 204 to 127.0.0.1. Response time: 332.2043 ms. Url: http://localhost:8096/Sessions/e3d5461518380e52a0a8002c53c05634/Playing/stop? 2015-04-12 08:43:20.9145 Info - App: SessionInfoWebSocketListener stop transmitting over websocket to 127.0.0.1:58072 Do you think this would be fixable by modifying something in the Viera's DLNA profile? Are there any debug flags I could set that would make the reporting more detailed for you? Link to comment Share on other sites More sharing options...
Luke 37133 Posted April 12, 2015 Share Posted April 12, 2015 no, you'll probably have to use something like wireshark to monitor the network traffic and get the response body that the viera sent along with the 500 status code Link to comment Share on other sites More sharing options...
siddhartha 11 Posted April 12, 2015 Author Share Posted April 12, 2015 More interesting is that certain videos (.avi, for example) won't even let me seek... Link to comment Share on other sites More sharing options...
siddhartha 11 Posted April 12, 2015 Author Share Posted April 12, 2015 This is the response packet from the viera: POST /dmr/control_2 HTTP/1.1 User-Agent: Microsoft-Windows/6.2 UPnP/1.0 Microsoft-DLNA DLNADOC/1.50 SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#Seek" Pragma: no-cache FriendlyName.DLNA.ORG: MediaBrowser Content-Type: text/xml; charset="utf-8" Host: 192.168.1.247:55000 Content-Length: 561 Accept-Encoding: deflate <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><m:Seek xmlns:m="urn:schemas-upnp-org:service:AVTransport:1"><InstanceID xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="ui4">0</InstanceID><Unit xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">REL_TIME</Unit><Target xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">01:30:30</Target></m:Seek></SOAP-ENV:Body></SOAP-ENV:Envelope>HTTP/1.1 500 Internal Server Error CONTENT-LENGTH: 497 Content-Type: text/xml; charset="utf-8" EXT: SERVER: Panasonic-VIErA/1, UPnP/1.0, Panasonic MIL DLNA SERVER CONNECTION: close <?xml version="1.0" encoding="utf-8"?> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <s:Fault> <faultcode>s:Client</faultcode> <faultstring>UPnPError</faultstring> <detail> <UPnPError xmlns="urn:schemas-upnp-org:control-1-0"> <errorCode>701</errorCode> <errorDescription>Transition not available</errorDescription> </UPnPError> </detail> </s:Fault> </s:Body> </s:Envelope> Link to comment Share on other sites More sharing options...
siddhartha 11 Posted April 12, 2015 Author Share Posted April 12, 2015 Here is the link that has the DLNA certification for the device just to confirm that it does in fact support resuming and seek: http://certification.dlna.org/certs/REG08712522(1).pdf Link to comment Share on other sites More sharing options...
siddhartha 11 Posted April 25, 2015 Author Share Posted April 25, 2015 (edited) I've narrowed this down to an issue with the ResponseProfiles. If I have malformed XML, it can resume video (albeit with an incorrect timestamp and pausing or fast forwarding simply goes to the beginning of the resume stamp, but at least it resumes!): <ResponseProfiles> <ResponseProfile container="ts" audioCodec="ac3,aac,mp3" videoCodec="h264" type="Video" orgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T" mimeType="video/vnd.dlna.mpeg-tts"> <Conditions> <ProfileCondition condition="Equals" property="PacketLength" value="192" isRequired="true" /> <ProfileCondition condition="Equals" property="VideoTimestamp" value="Valid" isRequired="true" /> </Conditions> </ResponseProfile> <ResponseProfile container="mkv" type="Video" mimeType="video/vnd.dlna.mpeg-tts"> </ResponseProfiles> Notice the lack of <Conditions /> and </ResponseProfile>... Still investigating. Edit: It looks like it simply resorts to using the default Viera profile and then does some transcoding and that's what allows resuming... Edited April 25, 2015 by siddhartha Link to comment Share on other sites More sharing options...
siddhartha 11 Posted April 25, 2015 Author Share Posted April 25, 2015 (edited) Okay, after a couple hours of testing, it looks like even when transcoding there are major issues. The start position gets passed to ffmpeg, and the transcoding stream is sent to the TV from that position, but once it's streaming, pausing, fast-forwarding, or rewinding will start playing from that same start position again. I'm not sure how to resolve this transcoding issue. For direct play, I have this feeling that the skip command is getting sent to the TV too early. And the 500 response from the TV (see below) is because it is still loading the stream and cannot process the command. Is there a way to delay the commands by a couple seconds? I do see that the seek command is supported... <UPnPError xmlns="urn:schemas-upnp-org:control-1-0"> <errorCode>701</errorCode> <errorDescription>Transition not available</errorDescription> </UPnPError> Edited April 25, 2015 by siddhartha Link to comment Share on other sites More sharing options...
Luke 37133 Posted April 25, 2015 Share Posted April 25, 2015 well, a delay is possible but some kind of event driven approach would be preferable Link to comment Share on other sites More sharing options...
siddhartha 11 Posted April 25, 2015 Author Share Posted April 25, 2015 well, a delay is possible but some kind of event driven approach would be preferable Is there a delay I can add in to one of the javascript files just to test it out, or does it need to be compiled into the server executable? Link to comment Share on other sites More sharing options...
siddhartha 11 Posted May 1, 2015 Author Share Posted May 1, 2015 Actually, I notice there is a delay prior to seeking on this line. Could this be increased to three seconds just for testing purposes? Link to comment Share on other sites More sharing options...
Luke 37133 Posted May 9, 2015 Share Posted May 9, 2015 does the two second delay not work? Link to comment Share on other sites More sharing options...
siddhartha 11 Posted May 11, 2015 Author Share Posted May 11, 2015 (edited) does the two second delay not work? I'm using the latest dev and still have the issue. I notice it takes about four seconds for the timecode to display at the top of the TV after the movie loads.. maybe a five second delay? Edited May 11, 2015 by siddhartha Link to comment Share on other sites More sharing options...
siddhartha 11 Posted May 15, 2015 Author Share Posted May 15, 2015 Of note, I can skip using the Remote Control functionality without issue. Link to comment Share on other sites More sharing options...
Luke 37133 Posted May 15, 2015 Share Posted May 15, 2015 i'll change it to 5, but not going any higher than that. if it will doesn't work then we have to just figure out the right way which is accurately determining when the player has started playing Link to comment Share on other sites More sharing options...
siddhartha 11 Posted May 15, 2015 Author Share Posted May 15, 2015 Hmmm, 3.0.5613.20788 waits just as long as before... In fact, the 500 error comes up almost instantaneously. Link to comment Share on other sites More sharing options...
Luke 37133 Posted May 17, 2015 Share Posted May 17, 2015 i've put up a dev build that waits for the transport state to switch to playing, then issues the seek command. please give that a try. thanks. Link to comment Share on other sites More sharing options...
siddhartha 11 Posted May 17, 2015 Author Share Posted May 17, 2015 (edited) The latest dev still doesn't work, but... I fixed it! When you do a resume, it doesn't actually execute a Seek() Task (line 371), but rather a _device.Seek() inside SetPlaylistIndex() Task (line 595). Therefore, the polling loop should be on line 611 of PlayToController.cs. It would look like this: private async Task SetPlaylistIndex(int index) { if (index < 0 || index >= Playlist.Count) { Playlist.Clear(); await _device.SetStop(); return; } _currentPlaylistIndex = index; var currentitem = Playlist[index]; await _device.SetAvTransport(currentitem.StreamUrl, GetDlnaHeaders(currentitem), currentitem.Didl); var streamInfo = currentitem.StreamInfo; if (streamInfo.StartPositionTicks > 0 && streamInfo.IsDirectStream) { var maxWait = 15000000; var currentWait = 0; while (_device.TransportState != TRANSPORTSTATE.PLAYING && currentWait < maxWait) { await Task.Delay(1000).ConfigureAwait(false); currentWait += 1000; } await _device.Seek(TimeSpan.FromTicks(streamInfo.StartPositionTicks)).ConfigureAwait(false); } } So resuming now works with a PlayTo from the web client, but it won't resume when browsing the Resume folder on the DLNA server... It looks like it's not passing the StartPositionTicks value when building the media URL. Edited May 17, 2015 by siddhartha Link to comment Share on other sites More sharing options...
Luke 37133 Posted May 17, 2015 Share Posted May 17, 2015 Good stuff, thanks! I will integrate this. In the future please just make a new post rather than editing. You posted a link earlier which I wanted to read but now it's gone. As far as the media url - yes, the resume position is in the url when transcoding, but not direct stream. I suspect what we're doing here is not really the right way to do it. I wonder if there is a way to embed the starting offset into SetAvTransportUri. Either that or we might just have to force transcoding when resuming from the Dlna Server (but not Play To). Link to comment Share on other sites More sharing options...
siddhartha 11 Posted May 18, 2015 Author Share Posted May 18, 2015 Sorry about editing. I didn't want to spam the thread. I had provided the link before, but it was just a suggestion to poll GetCurrentTransportActions (http://www.upnp-database.info/action.jsp?actionId=8724) to see if a seek is allowed. Link to comment Share on other sites More sharing options...
Luke 37133 Posted May 18, 2015 Share Posted May 18, 2015 Ok, thanks. Anyway I checked the code in and applied the same fix to changing audio + subs. Please try it out, thanks. Link to comment Share on other sites More sharing options...
siddhartha 11 Posted May 18, 2015 Author Share Posted May 18, 2015 Resuming works great! I'll test out audio and subs a little later. Link to comment Share on other sites More sharing options...
siddhartha 11 Posted May 18, 2015 Author Share Posted May 18, 2015 Audio and subtitles throw an error 500 on the web client. I traced the packets and the result is actually an "Error 705: Transport is locked". On the Viera interface, I can see the available audio streams and choose one just fine. I cannot see any of the different subtitles. I quickly tried clearing the Playlist and issuing a _device.SetStop() before creating the new playlist item with the different audio or subtitle, but in the audio case it didn't switch over and in the subtitle case it never loaded the stream. I'm not sure how subtitles work with respect to DLNA here, but I suspect it's burning them in on a transcode. I wonder if there is a way to pass them to the Viera and have it do the rendering... Link to comment Share on other sites More sharing options...
Luke 37133 Posted May 18, 2015 Share Posted May 18, 2015 yes via the profile 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