New issue
Advanced search Search tips

Issue 646582 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Compat



Sign in to add a comment

Video does not send ended event

Reported by j...@jwplayer.com, Sep 13 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Example URL:
http://m1.fwmrm.net/m/1/96749/91/66011/73252/AdobeBand_1274346193.mp4

Steps to reproduce the problem:
1. Go the the video URL.
2. In developer tool console, add ended event listener. 
video.addEventListener('ended', function(e) {console.log(e)});
3. When the video completes, observe that the ended event never gets fired.

What is the expected behavior?

What went wrong?
The ended event is not fired from the video.
This works correctly in firefox browser.

Did this work before? N/A 

Is it a problem with Flash or HTML5? HTML5

Does this work in other browsers? N/A 

Chrome version: 52.0.2743.116  Channel: n/a
OS Version: OS X 10.10.5
Flash Version: Shockwave Flash 22.0 r0
 
Cc: sande...@chromium.org
If you disable accelerated video decode in chrome://flags does it work?

Comment 2 by j...@jwplayer.com, Sep 13 2016

Yes, it works if I disable accelerated video decode.
This video encounters a decode error before completing playback, therefore the ended event does not fire. There is an error emitted.

The error message coming back from Mac OS X's decoder is not helpful (code -12909, "(null)"). I don't see anything obviously wrong with the stream, but I'll take a look. What I can say for sure is that it's failing after we push the last frame, which is an odd place to fail.

Comment 4 by j...@jwplayer.com, Sep 13 2016

Thank you for looking into this!
Labels: -Type-Bug Type-Compat
I can now confirm that there is a problem with the stream, but I can't tell you precisely what it is without a lot of work. My standard debugging tool (Intel Video Pro Analyzer) likes the stream just fine.

However, if you just play it with ffplay, it outputs the message "[h264 @ 0x7f5b043f19a0] decode_slice_header error" at the end, which is consistent with what the OS X decoder reports.

My advice is to re-encode and verify that the result plays with cleanly with ffplay.
Status: WontFix (was: Unconfirmed)
Well, it turned out to not be too hard to debug. There are two extra AUD/SEI pairs after the last slice, but inside what the MP4 metadata claims to be the last frame.

This is totally invalid (for a few reasons), but could be worked arounf with a trivial change to the MP4 metadata. (Not that I know of any tools to easily do that, but I can tell you which bytes to edit with a hex editor...)

If there is evidence that this is a common problem on the web, we can write a layer to strip away such invalid NALUs, but for now I'm going to close this as WontFix.

Comment 7 by j...@jwplayer.com, Sep 13 2016

Great, thank you so much!

Sign in to add a comment