Closed Bug 1213775 Opened 8 years ago Closed 7 years ago

VP8 automatic resizing breaks ffmpeg-based players


(Core :: Audio/Video: Recording, defect, P1)

41 Branch



Tracking Status
firefox47 --- fixed


(Reporter: jijie.ouyang, Assigned: mreavy)




(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0
Build ID: 20150929144111

Steps to reproduce:

Use MediaRecorder to record a video (larger than 2 second). Then create local url by URL.createObjectURL  on this blob object.  

Actual results:

Warning message was issued onto brower console when I set this local url into src abribute of <video>, it shows this local url could not be decode. But it working fine when the recoded video less  then or equal 2 second.

Expected results:

It always working fine before the Latest update of FireFox browser.
Severity: normal → critical
Priority: -- → P5
Component: Untriaged → Audio/Video: Recording
Product: Firefox → Core
This issue was occurred when I created URL from Blob object directly (URL.createObjectURL(blob_object) blob_object is a Blob object). But it working fine as below code.

                var reader = new FileReader();
                reader.onloadend = function () {
                    //do someting: .e.g playing the resource in <video> element.
                    video.src = reader.result;
                    video.autoplay = true;
Hi there, nobody taking care of it?
I you attach a video that cannot be decoded we might be able to figure out what is wrong with it. Also, a complete test case would help as well (using gUM in a jsfiddle for instance).
We ave the same problem with our product since version 41.
I found an example with a similar problem:
(to test in version 40 you must change in about:config media.mediasource.enabled to true and media.mediasource.whitelist to false).
I believe this is a dup, but want to verify before I dup it.
Severity: critical → major
Rank: 15
Ever confirmed: true
Priority: P5 → P1
Attached video test(1).webm
Recorded using the link in the last comment.  Local play in the Firefox 47 Nightly -> video is corrupt after a second or so.  Download and open via browser -> same problem.  Play in "Videos" on Fedora 22 -> plays no problem
Hi Bryce -- Is this a dup of the Playback bug you're fixing?  Thanks.
Flags: needinfo?(bvandyk)
(In reply to Maire Reavy [:mreavy] (Plz ni?:mreavy) from comment #8)
> Hi Bryce -- Is this a dup of the Playback bug you're fixing?  Thanks.

Hey, as you say, the issue described here looks like it may be a dupe of:

I've tested the attachment and the failure appears to be consistent with the above bug.

In case it is relevant the file appears to also not have cues, so it won't be seekable either (though I'm hoping to land a patch shortly to remedy that).
Flags: needinfo?(bvandyk)
Turns out this is not a dup of 1232045 because this problem is caused by the fact that the ffmpeg decoder does not support streams that use resize.  If I turn it off in the encoder, this problem goes away.  I believe the safest thing to do is to turn off resizing in the encoder.  We should make a note in MDN that anyone using resize to encode a stream (in another browser) may have problems playing it back in Firefox until ffmpeg is fixed.
Assignee: nobody → mreavy
Summary: URL generated by URL.createObjectURL for a video was damaged → VP8 automatic resizing breaks ffmpeg-based players
Attachment #8724517 - Flags: review?(jyavenard)
Comment on attachment 8724517 [details] [diff] [review]

Review of attachment 8724517 [details] [diff] [review]:

Going to ask ffvp8 author on what's the go is with this one.
Attachment #8724517 - Flags: review?(jyavenard) → review+
Tested the patch with our product and it works.
I believe this is related to 1232045, with there being two issues: we have resizing enabled in the encoder which creates files which are incompatible with our current playback capabilities (what this tick is addressing), and we that we are unable to playback files with resolution changes (bug 1232045).

Are there any references I could get regarding ffmpeg not handling resolution changes? I see a smattering of different issues when testing this file with VLC and mplayer. However, both do seem to be able to decode the frames.
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.