VP8 automatic resizing breaks ffmpeg-based players

RESOLVED FIXED in Firefox 47

Status

()

defect
P1
major
Rank:
15
RESOLVED FIXED
4 years ago
3 years ago

People

(Reporter: jijie.ouyang, Assigned: mreavy)

Tracking

41 Branch
mozilla47
Points:
---

Firefox Tracking Flags

(firefox47 fixed)

Details

Attachments

(2 attachments)

Reporter

Description

4 years ago
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.
Reporter

Updated

4 years ago
Severity: normal → critical
Priority: -- → P5
Component: Untriaged → Audio/Video: Recording
Product: Firefox → Core
Reporter

Comment 1

4 years ago
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.readAsDataURL(blob_object);
                reader.onloadend = function () {
                    //do someting: .e.g playing the resource in <video> element.
                    video.src = reader.result;
                    video.autoplay = true;
                }

Comment 2

4 years ago
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).

Comment 5

3 years ago
We ave the same problem with our product since version 41.
I found an example with a similar problem: https://simpl.info/mediarecorder/
(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
Status: UNCONFIRMED → NEW
Rank: 15
Ever confirmed: true
Priority: P5 → P1
Posted 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: https://bugzilla.mozilla.org/show_bug.cgi?id=1232045

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]
patch_turnoff_resize

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+

Comment 13

3 years ago
Tested the patch with our product and it works.
Duplicate of this bug: 1245775
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.

Comment 17

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8fd524b61720
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Duplicate of this bug: 1250345
Duplicate of this bug: 1250984
You need to log in before you can comment on or make changes to this bug.