Jump to content

Roku3 MKV Skips Forward


dwyatt

Recommended Posts

Hi All,

 

I've encountered a perplexing issue on a few MKVs recently. These are TV shows that I *ahem* acquired from the internet. 720p mkv with 6 channel AC3 audio. Direct playing them from my Roku3.

 

The problem is that at a few places throughout playback it will jump forward to another spot in the video. Sometimes the jump is a minute, other times a few minutes. It is 100% repeatable too. If I rewind to before the skip then it will skip again at the exact same spot and jump to the same spot. If I rewind to just after the skip then it doesn't skip until it encounters another of these glitches (there are 5 or 6 in this file).

 

I can't reproduce the problem in any other media player (VLC, windows media, Emby web player, Emby windows 10 app, Windows 10 TV & Movies app, etc). They all work perfectly fine like you would expect with no hint of a problem.

 

I'm not sure this is an Emby problem, it could be the Roku media player that Emby uses? Just wondering if anyone has any suggestions on how to fix this. It's super frustrating having to rewind a bunch throughout playback and make sure I get it to just after the skip. I wish the media player displayed seconds on the current position ...

 

Let me know if there are any logs or anything I could look at to see if there is anything showing up there ...

 

Oh, and the problems exists with both the official Emby channel (v2.16) and the Neon Bright Lights channel as well.

 

Link to comment
Share on other sites

Did some digging for log files. Found the Emby server log and I think I am seeing the error below everytime I see a skip in the video.

2015-11-15 20:14:01.3525 Info - HttpServer: HTTP GET http://10.0.2.100:8096/emby/Videos/b23db3fb29da61ad5319b90319cd2c9a/stream?static=true&mediaSourceId=b23db3fb29da61ad5319b90319cd2c9a&api_key=22b44d2fe50048ecae0b9e698811162d
	Ip: 10.0.2.35:43199. Headers: Connection=close,Host=10.0.2.100:8096,User-Agent=Roku/DVP-6.2 (046.02E03672A)
2015-11-15 20:14:01.3681 Error - HttpResultFactory: Error streaming data
	*** Error Report ***
	Version: 3.0.5781.1
	Command line: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
	Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
	Processor count: 2
	64-Bit OS: True
	64-Bit Process: False
	Program data path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server
	Application Path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
	Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
	System.IO.IOException
	   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
	   at SocketHttpListener.Net.ResponseStream.InternalWrite(Byte[] buffer, Int32 offset, Int32 count)
	   at SocketHttpListener.Net.ResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
	   at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
	   at System.IO.Stream.CopyTo(Stream destination, Int32 bufferSize)
	   at MediaBrowser.Server.Implementations.HttpServer.StreamWriter.WriteToInternal(Stream responseStream)
	InnerException: System.Net.Sockets.SocketException
	An existing connection was forcibly closed by the remote host
	   at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
	   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
	
2015-11-15 20:14:01.3837 Error - HttpAsyncTaskHandler: Error occured while Processing Request: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
	*** Error Report ***
	Version: 3.0.5781.1
	Command line: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
	Operating system: Microsoft Windows NT 6.1.7601 Service Pack 1
	Processor count: 2
	64-Bit OS: True
	64-Bit Process: False
	Program data path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server
	Application Path: C:\Users\Administrator\AppData\Roaming\MediaBrowser-Server\System\MediaBrowser.ServerApplication.exe
	Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
	System.IO.IOException
	   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
	   at SocketHttpListener.Net.ResponseStream.InternalWrite(Byte[] buffer, Int32 offset, Int32 count)
	   at SocketHttpListener.Net.ResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
	   at ServiceStack.Formats.HtmlFormat.SerializeToStream(IRequest request, Object response, IResponse httpRes)
	   at ServiceStack.HttpResponseExtensionsInternal.WriteErrorToResponse(IResponse httpRes, IRequest httpReq, String contentType, String operationName, String errorMessage, Exception ex, Int32 statusCode)
	   at ServiceStack.ServiceStackHost.OnUncaughtException(IRequest httpReq, IResponse httpRes, String operationName, Exception ex)
	   at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse(IResponse response, Object result, ResponseSerializerDelegate defaultAction, IRequest request, Byte[] bodyPrefix, Byte[] bodySuffix)
	   at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse(IResponse httpRes, IRequest httpReq, Object result, Byte[] bodyPrefix, Byte[] bodySuffix)
	   at ServiceStack.Host.RestHandler.<>c__DisplayClass5.<ProcessRequestAsync>b__0(Object response)
	   at ServiceStack.Host.Handlers.ServiceStackHandlerBase.HandleResponse(Object response, Func`2 callback, Func`2 errorCallback)
	InnerException: System.Net.Sockets.SocketException
	An existing connection was forcibly closed by the remote host
	   at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
	   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
Link to comment
Share on other sites

legallink

After digging deeper into technical specs of the Roku, We've got to know that Roku only plays MKV files encoded with H.264 codec. If the MKV is encoded with other video codecs, we will fail to play MKV on Roku 4. Now we would throw a quick tutorial up how to convert and play MKV with Roku 4 easily. 

Can you elaborate on this?  Do you mean it won't direct stream it or it won't play it at all?

Link to comment
Share on other sites

@@dwyatt, Can you post the media info you see in the server for that problem video? You can use the blue neon night app, and force transcoding of that video. Click the "more..." option instead of choosing "play". Select "Force transcode". Now hit "play". When forcing transcoding does it still skip forward?

Edited by speechles
Link to comment
Share on other sites

The above error from the log just indicates that the client disconnected because it saw something it didn't like. it's not a server error. it's just what happens on the server when the client hangs up.

Link to comment
Share on other sites

legallink, on 16 Nov 2015 - 08:09 AM, said:legallink, on 16 Nov 2015 - 08:09 AM, said:

Can you elaborate on this?  Do you mean it won't direct stream it or it won't play it at all?

 

Ignore that guy, he's a spammer. The link goes to his product for converting MKVs.

 

speechles, on 16 Nov 2015 - 08:59 AM, said:speechles, on 16 Nov 2015 - 08:59 AM, said:

@@dwyatt, Can you post the media info you see in the server for that problem video? You can use the blue neon night app, and force transcoding of that video. Click the "more..." option instead of choosing "play". Select "Force transcode". Now hit "play". When forcing transcoding does it still skip forward?

 

Media Info below. I don't see any difference between it and other episodes that work fine. I'll try transcoding tonight and see what happens. My server is super old (rocking first gen Core 2 Duo hardware ... like 10 years old at this point) and generally can't handle transcoding (at 720p anyways). Perhaps I'll drop the bitrate way down and see if that works.

 

Quote

Media Info

 

Video

Codec H264

Profile High

Level 41

Resolution 1280x718

Aspect ratio 16:9

Anamorphic No

Interlaced No

Framerate 23.97602

Bitrate 4192 kbps

Bit depth 8 bit

Pixel format yuv420p

Ref frames 5

CABAC Yes

 

Audio

Codec AC3

Layout 5.1

Channels 6 ch

Bitrate 437 kbps

Sample rate 48000 khz

Default Yes

 

Container mkv
Path \\hal9000\TV Shows\Brooklyn Nine-Nine\Season 3\Brooklyn Nine-Nine S03E07 - The Mattress.mkv

 

Luke, on 16 Nov 2015 - 09:00 AM, said:Luke, on 16 Nov 2015 - 09:00 AM, said:

The above error from the log just indicates that the client disconnected because it saw something it didn't like. it's not a server error. it's just what happens on the server when the client hangs up.

 

Yeah, I figured as much. I think it definitely must be the Roku choking on the stream or something ... not really sure how these things work :) Oh, and should have mentioned my Roku is attached by GigE, not wifi. And this skip is nearly instantaneous. It jumps and then does the normal quick loading bar thing and resumes playing. No errors whatsoever on the Roku3 (unless there are some in the logs ... not sure how to access those though).

Edited by dwyatt
Link to comment
Share on other sites

@@dwyatt

 

The ac3 audio bitrate is higher than 384kb/s. That is the only thing immediately jumps out. The video stream appears in spec. What occurs in the video during "the jump"? Specifically right when it occurs. The bitrate on the audio must be spiking and throwing off synching. If so there is no work around except to reencode the ac3 audio track and keep the bitrate below or constantly at 384kb/s.

Edited by speechles
Link to comment
Share on other sites

@@speechles

 

Looking through the rest of the episodes in the series, every episode has the same audio bitrate (437 kbps) and none of the other ones have the same problem. The one other episode with the same problem (different show) has an audio bitrate of 375 kbps.

 

I just tested this same episode with transcoding and the problem disappeared. Unfortunately my server can't handle anything higher than 1Mbps without having a several minute delay at the start of every episode so that's not a long term solution.

 

I think the next test I will do is re-encoding the audio in this episode to a lower bitrate. Any suggestions on a program to do this?

Link to comment
Share on other sites

@@Luke

 

Yup, it is 100% consistent. I can skip backwards to before the jump, hit play, and it will jump at the exact same place (and to the exact same place). Starting another file and then going back to the first one and it still does the same thing.

 

Just encountered another file with the same problem. Media info for this one below. Is there any sort of Roku log I could access to see if there are any errors being logged?

 

 

Video
Codec H264
Profile High
Level 41
Resolution 1280x720
Aspect ratio 16:9
Anamorphic No
Interlaced No
Framerate 23.97602
Bitrate 2521 kbps
Bit depth 8 bit
Pixel format yuv420p
Ref frames 5
CABAC Yes

 
Audio
Codec AC3
Layout stereo
Channels 2 ch
Bitrate 375 kbps
Sample rate 48000 khz
Default Yes
 
Container mkv
Path\\hal9000\TV Shows\Homeland\Season 5\Homeland S05E07 - Oriole.mkv​
Link to comment
Share on other sites

On further checking, this is a problem inherited from the firmware update to OS 7. We need for roku themselves to address the situation. This is a bug they've introduced which affects their internally developed roku media player app too. No need to encode to a different anything. Blame roku for dropping the ball.

 

Heres a thread showing the other guys having same problem:

https://forums.plex.tv/discussion/194145/error-writing-media-104-connection-reset-by-peer

Edited by speechles
Link to comment
Share on other sites

On further checking, this is a problem inherited from the firmware update to OS 7. We need for roku themselves to address the situation. This is a bug they've introduced which affects their internally developed roku media player app too. No need to encode to a different anything. Blame roku for dropping the ball.

 

Sent from my Nexus 7 using Tapatalk

 

How do you know that?

Link to comment
Share on other sites

I found videos exhibit same behavior in my own collection. As well as our friends at plex ( https://forums.plex.tv/discussion/194145/error-writing-media-104-connection-reset-by-peer ). Nothing yet from roku but their roku media app developed internally skips the same way on the videos i have. Conclusion, it is rokus fault. :)

 

Sent from my Nexus 7 using Tapatalk

Link to comment
Share on other sites

Are you "direct-play" or "direct-stream" the video? The regular emby app makes this hard to tell it will always call both "direct play". So use the blue neon night one, and when on the problem video use the " more..." option and change this to force a play method. Do this before you play a video and see it shows up next to "more...". Dont leave this auto. Choose directplay, then play the video. Then choose directstream and try. Do both cause the same skipping?

 

To use true direct play (directplay) you must be using unc paths, or path substitution. You cannot use drive letters.

 

Sent from my Nexus 7 using Tapatalk

Edited by speechles
Link to comment
Share on other sites

Hmm, good question. Everything is setup with UNC paths but not sure which it defaults to. Will test both ways in a bit (have to wait for current show to finish otherwise the wife will not be too happy :P).​

Link to comment
Share on other sites

Alright, so DirectPlay doesn't seem to work at all ... (just flashes black and goes back to the menu). DirectStream does the skipping thing.

Link to comment
Share on other sites

As far as the roku app goes they are the same thing. The app does not play your files directly over the file system.

Link to comment
Share on other sites

  • 3 weeks later...
Guest asrequested

Try running the file through MKVtoolnix. I've had a few files that don't play quite right, and after remuxing with MKVtoolnix, they work perfectly. It only takes a minute, depending on the file size.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...