Jump to content


Photo

Blue Neon Light - Ending File Playback


  • Please log in to reply
13 replies to this topic

#1 moviefan OFFLINE  

moviefan

    Advanced Member

  • Alpha Testers
  • 851 posts
  • Local time: 12:58 PM

Posted 20 October 2016 - 06:34 PM

Recently it started happening that when a video I am watching on my Roku3 with Blue Neon Light ends, it jumps back to a randomly selected place in the video that was just playing and keeps going.  

 

When I click play/pause to look at the progress bar it shows it is at the very end with 0 mins left, yet it continues playing until I manually stop it.

 

Anyone else notice this behavior?



#2 Happy2Play OFFLINE  

Happy2Play

    Trial and Error

  • Moderators
  • 13826 posts
  • Local time: 12:58 PM
  • LocationWashington State

Posted 20 October 2016 - 07:10 PM

Sounds like that old Transcoding bug, believe it had something to do with hls.  Is your media transcoding, then at the end loops back to a random point, and if you let it do it long enough it finally stops.  But who actually waits that long.


Edited by Happy2Play, 20 October 2016 - 07:13 PM.


#3 moviefan OFFLINE  

moviefan

    Advanced Member

  • Alpha Testers
  • 851 posts
  • Local time: 12:58 PM

Posted 20 October 2016 - 07:20 PM

Yah this sounds about right.  Not sure if it ever stops.  I always stop it because I dont want to rewatch that random scene again.



#4 speechles OFFLINE  

speechles

    Advanced Member

  • App Developer
  • 3966 posts
  • Local time: 12:58 PM

Posted 21 October 2016 - 12:34 AM

That is the effect of direct stream copying video streams that arent keyframe(i-frame aka fullframe) aligned perfectly on 3 second intervals. Emby handles hls by slicing video into 3 second chunks with an hls manifest (m3u8). This is when the video stream is copied, rather than transcoded to add these keyframes(i-frames). Without them aligned exactly at 3 seconds the video length may be longer than the manifest actually states. Instead of 3 seconds it might be 3.02 or 3.1 or 3.0025. It has to align on keyframes so the next keyframe on or after 3 seconds is taken as the start of the next and so forth. These mis-aligned chunks actually expand the runtime past the actual end. This is the repeat you see. It will replay some of the buffer it has of the video randomly at the end over again. This is unavoidable unless you want to trigger a full transcode. Most people want to save cpu cycles so want to direct-stream copy as often as possible. This acheives that at the cost of that weird repeat at the end. Mostly AVI container will have this effect since that container cant be direct-streamed, but the video and audio streams inside usually can both be copied.

 

tl;dr  Blame hls for the issue as @Happy2Play stated.


Edited by speechles, 21 October 2016 - 12:40 AM.


#5 moviefan OFFLINE  

moviefan

    Advanced Member

  • Alpha Testers
  • 851 posts
  • Local time: 12:58 PM

Posted 21 October 2016 - 02:02 AM

Thanks for the explanation.

 

For me the AVI container isn't the case.  It's all been on MKV container.

 

Anyway, sounds like I just have to deal with it.  



#6 moviefan OFFLINE  

moviefan

    Advanced Member

  • Alpha Testers
  • 851 posts
  • Local time: 12:58 PM

Posted 14 November 2016 - 06:50 PM

Is this also the reason that moving back in the file doesn't seem to work?

 

If I try to just go back a little bit, even after the file has just started playing, it seems to pick some other random point in the episode.  If I stop playing, and then resume, it picks up at the right spot.  But navigating back and forth with the arrows no longer appears to work.



#7 lorac OFFLINE  

lorac

    Advanced Member

  • Members
  • 362 posts
  • Local time: 12:58 PM
  • LocationVancouver, Canada

Posted 15 November 2016 - 05:30 PM

I see this issue in both the blue neon and official emby app. All files are MKV. I don't know if it happens with X264 files but most X265 files it seems to occur.



#8 dcook OFFLINE  

dcook

    Advanced Member

  • Members
  • 866 posts
  • Local time: 03:58 PM

Posted 10 March 2017 - 10:31 PM

@speechles

 

You mentioned in your post that you can avoid the repeating of the video by trigger a full transcode, can you tell me how I can set the Emby server or the Roku to do a full transcode?

Is there a way I can turn off direct stream so transcoding MUST be used therefore not having this video repeat issue anymore?

 

 

 

That is the effect of direct stream copying video streams that arent keyframe(i-frame aka fullframe) aligned perfectly on 3 second intervals. Emby handles hls by slicing video into 3 second chunks with an hls manifest (m3u8). This is when the video stream is copied, rather than transcoded to add these keyframes(i-frames). Without them aligned exactly at 3 seconds the video length may be longer than the manifest actually states. Instead of 3 seconds it might be 3.02 or 3.1 or 3.0025. It has to align on keyframes so the next keyframe on or after 3 seconds is taken as the start of the next and so forth. These mis-aligned chunks actually expand the runtime past the actual end. This is the repeat you see. It will replay some of the buffer it has of the video randomly at the end over again. This is unavoidable unless you want to trigger a full transcode. Most people want to save cpu cycles so want to direct-stream copy as often as possible. This acheives that at the cost of that weird repeat at the end. Mostly AVI container will have this effect since that container cant be direct-streamed, but the video and audio streams inside usually can both be copied.

 

tl;dr  Blame hls for the issue as @Happy2Play stated.



#9 speechles OFFLINE  

speechles

    Advanced Member

  • App Developer
  • 3966 posts
  • Local time: 12:58 PM

Posted 11 March 2017 - 01:53 PM

@speechles

You mentioned in your post that you can avoid the repeating of the video by trigger a full transcode, can you tell me how I can set the Emby server or the Roku to do a full transcode?
Is there a way I can turn off direct stream so transcoding MUST be used therefore not having this video repeat issue anymore?

The server controls this part. To force a full transcode you need to drop the maximum video bitrate for the app below the bitrate of the video stream for that item. The server will attempt to copy the video stream if the bitrate allows it to speed up the transcoding. That is why you have to drop the bitrate to force the server to reencode the videostream entirely with new keyframe indices. This may cause quality issues if you drop things too far.

#10 dcook OFFLINE  

dcook

    Advanced Member

  • Members
  • 866 posts
  • Local time: 03:58 PM

Posted 11 March 2017 - 03:41 PM

@Luke or @ebr is there a way you can add a setting in the server or perhaps per library that would force transcode on or off?

 

I don't see any other way to fix the repeating of random seconds at the end of every video, if transcoding will fix the issue then we should be transcoding

 

 

 

The server controls this part. To force a full transcode you need to drop the maximum video bitrate for the app below the bitrate of the video stream for that item. The server will attempt to copy the video stream if the bitrate allows it to speed up the transcoding. That is why you have to drop the bitrate to force the server to reencode the videostream entirely with new keyframe indices. This may cause quality issues if you drop things too far.



#11 speechles OFFLINE  

speechles

    Advanced Member

  • App Developer
  • 3966 posts
  • Local time: 12:58 PM

Posted 11 March 2017 - 03:53 PM

@Luke or @ebr is there a way you can add a setting in the server or perhaps per library that would force transcode on or off?

I don't see any other way to fix the repeating of random seconds at the end of every video, if transcoding will fix the issue then we should be transcoding

I can make this happen in the blue neon app with a little creativity. Since the app controls the direct play profile which includes bitrate there is some magic we can do.

How about a setting, called "h264 workaround" and by default it is NO. When turned to YES it uses the below method:

If the item video stream is h264 then take that items video stream bitrate, subtract 1 from it, and send this as the device profile max bitrate. This will cause full transcoding and make the bitrate loss as minimal as possible.

This will accomplish what you want and avoid the "repeat loop at the end" scenario. The new app will have to do something along these lines too, more than likely.

Edit:

@dcook

it works!!!!11!!eleven!!shift

I will have a new blue neon app shortly that includes this. Yay!!

Edited by speechles, 11 March 2017 - 04:44 PM.


#12 speechles OFFLINE  

speechles

    Advanced Member

  • App Developer
  • 3966 posts
  • Local time: 12:58 PM

Posted 11 March 2017 - 06:23 PM

74008fbb8b6a4992f95f66479c7571d4.jpg

Okay, not going to use a preference. It is too many clicks of the remote to change back and forth as a preference..

Instead..Ive redesigned the play method forcing via the more menu. Since "force directplay" never could work, this has been removed. In its place, a single "force direct" method. Now transcode has two settings. One, will transcode, but allow directstream and respect your max bitrate. The other will transcode too, but if the videostream is h264 the app will do a full transcode at the video bitrate minus one. This makes it easy to change on-the-fly quickly.

@dcook I will have a new release shortly for you to test. ^__^

Edited by speechles, 11 March 2017 - 06:26 PM.


#13 speechles OFFLINE  

speechles

    Advanced Member

  • App Developer
  • 3966 posts
  • Local time: 12:58 PM

Posted 13 March 2017 - 01:35 AM

@speechles

You mentioned in your post that you can avoid the repeating of the video by trigger a full transcode, can you tell me how I can set the Emby server or the Roku to do a full transcode?
Is there a way I can turn off direct stream so transcoding MUST be used therefore not having this video repeat issue anymore?

https://emby.media/c...ght#entry430703

Can confirm using the "Force Transcode w/o DirectStream" option will work as you have asked for. It is included in the latest update. Feel free to try it out and let me know what you think.

Edited by speechles, 13 March 2017 - 02:52 AM.


#14 dcook OFFLINE  

dcook

    Advanced Member

  • Members
  • 866 posts
  • Local time: 03:58 PM

Posted 13 March 2017 - 06:57 PM

So far I have not seen any repeating video!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users