Closed Bug 973504 Opened 10 years ago Closed 10 years ago

Media Recording - Cannot playback a recorded video on Firefox OS

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jsmith, Unassigned)

Details

Attachments

(1 file)

Build:

* Device: Flame (reference device)
* Version: 1.4
* Build ID: 20140213171421

STR

1. Go to http://mozilla.github.io/qa-testcase-data/webapi/mediarecorder/
2. Under "Setup Stream for Media Recorder by File", select:
** File: gizmo.mp4
** Media Type: video
** Mime Type: video/mp4
3. Select play on both sets of media controls to start playback of the video
4. Select start recording
5. When the file finishes playing back, select the generated blob URL

Expected

The recorded mp4 file should playback in video form.

Actual

The video fails to played back - an error is fired saying the video file is corrupt.

Additional Notes

This appears to be a general problem that happens with recording any video in any mime type, as this problem also reproduces with ogg video files. Interestingly enough, the same test case with ogg video files works fine on Desktop Firefox. So there's a Firefox OS-specific issue failing here.
Blocks: MediaEncoder
blocking-b2g: --- → 1.4?
Hi Jason, 
What's flame device? is nexus 4?
Flags: needinfo?(jsmith)
(In reply to Randy Lin [:rlin] from comment #1)
> Hi Jason, 
> What's flame device? is nexus 4?

No - it's the reference device.
Flags: needinfo?(jsmith)
(In reply to Jason Smith [:jsmith] from comment #2)
> (In reply to Randy Lin [:rlin] from comment #1)
> > Hi Jason, 
> > What's flame device? is nexus 4?
> 
> No - it's the reference device.

FWIW though - I think Paul reproduced this on a different device than I did. Check with him on what device he reproduced this on.
Hi Alfredo, could you check this?
Flags: needinfo?(ayang)
Paul reproduced it with this crash report https://crash-stats.mozilla.com/report/index/02eb9e52-2598-4d5c-ab74-f10282140217. It crashed at camera module when camera release.
Do you have the same crash report?
Flags: needinfo?(ayang) → needinfo?(jsmith)
(In reply to Alfredo Yang from comment #5)
> Paul reproduced it with this crash report
> https://crash-stats.mozilla.com/report/index/02eb9e52-2598-4d5c-ab74-
> f10282140217. It crashed at camera module when camera release.
> Do you have the same crash report?

Nope. I didn't crash in my case. We should open a separate bug for that crash though.
Flags: needinfo?(jsmith)
(In reply to Jason Smith [:jsmith] from comment #6)
> (In reply to Alfredo Yang from comment #5)
> > Paul reproduced it with this crash report
> > https://crash-stats.mozilla.com/report/index/02eb9e52-2598-4d5c-ab74-
> > f10282140217. It crashed at camera module when camera release.
> > Do you have the same crash report?
> 
> Nope. I didn't crash in my case. We should open a separate bug for that
> crash though.

Actually the crash seen here is bug 973696.
Blocks: 923038
Jason, can you try this branch?
https://github.com/zapion/qa-testcase-data/tree/gum-add-mp4

Follow Randy's test page, I create a video tag and load blob by fileReader.  IMO it may be related to createBlobURL but not video recording.
Flags: needinfo?(jsmith)
(In reply to Paul Yang [: pyang] from comment #8)
> Jason, can you try this branch?
> https://github.com/zapion/qa-testcase-data/tree/gum-add-mp4
> 
> Follow Randy's test page, I create a video tag and load blob by fileReader. 
> IMO it may be related to createBlobURL but not video recording.

I don't think that's right. There's a big difference between that test case & the test case on my site - the test page you are using is rendering the videos inline on the web page, where as the test page I'm using renders them post visiting a blob URL. The test page I have does work on Desktop, which makes me think there's a problem in when we have to handle the case of using the blob URL solely to playback a recorded video.

Rob - Why would a blob URL work fine to render a video inline, but fail in the case when we visit it directly on FxOS, but not Desktop Firefox?
Flags: needinfo?(jsmith) → needinfo?(roc)
Summary for Reference:

* Visit Blob URL on Desktop Firefox of recorded video - works
* Visit Blob URL on Firefox OS of recorded video - fails
* Playback video tag inline on Firefox OS of recorded video - works
Might be something wrong about Blob URL, I can't play even using ref. 1 with latest nightly desktop build
(In reply to Paul Yang [: pyang] from comment #11)
> Might be something wrong about Blob URL, I can't play even using ref. 1 with
> latest nightly desktop build

Works fine for me on desktop - see the dependencies on the webm encoder bug. I don't see this problem with WebM recorded videos. mp4 recorded videos won't playback, but that's expected - those can only JB-supported FxOS devices.
(In reply to Jason Smith [:jsmith] from comment #9)
> Rob - Why would a blob URL work fine to render a video inline, but fail in
> the case when we visit it directly on FxOS, but not Desktop Firefox?

Probably because loading a Blob directly into an <iframe> or browser tab opens a regular async Necko channel, whereas loading a Blob as the src for a video directly takes a special path that bypasses the async loading stuff.

Can you make a testcase that doesn't involve recording --- that just loads some binary data into a Blob and tries to make that the source of an <iframe>?
Flags: needinfo?(roc)
Attached file IFrame Blob Test Case
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #13) 
> Can you make a testcase that doesn't involve recording --- that just loads
> some binary data into a Blob and tries to make that the source of an
> <iframe>?

Tried that - that actually works. I tested the gizmo.mp4 file & it played back fine in the iframe.

Any other ideas?
Flags: needinfo?(roc)
So apparently whatever broke this is fixed now - I'm able to play a recorded video via a blob URL now.
No longer blocks: MediaEncoder, 923038
Status: NEW → RESOLVED
blocking-b2g: 1.4? → ---
Closed: 10 years ago
Flags: needinfo?(roc)
Resolution: --- → WORKSFORME
Component: Video/Audio → Video/Audio: Recording
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: