Closed Bug 1171751 Opened 9 years ago Closed 9 years ago

[Aries][Camera][Video] Camera cannot save low resolution video recorded for the Messages app.

Categories

(Core :: Audio/Video, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

VERIFIED FIXED
blocking-b2g 2.5+
Tracking Status
b2g-master --- verified

People

(Reporter: Marty, Assigned: jhlin)

References

()

Details

(Whiteboard: [3.0-Daily-Testing][Spark])

Attachments

(3 files)

Description:
If the user opens a camera share activity through an MMS attachment, the camera will be calibrated to record a low resolution video suitable for MMS file size limits. The camera cannot successfully record the video and presents the user with the error message: "Video not recorded. An error prevented Camera form recording the video."


Repro Steps:
1) Update a Aries to 20150604140701
2) Open the Messages app and compose a new message.
3) Select the attach (paperclip) icon and select Camera
4) Change Camera to Video mode and record a video

Actual:
The video is not saved, and the camera throws an error message.

Expected:
The video is saved and attached to the MMS properly.

Environmental Variables:
Device: Aries 3.0 (Full Flash)
Build ID: 20150604140701
Gaia: dbf8e12660af79aa118ad1c32b2efc99f9a79c7b
Gecko: 5b4c240e1a36
Gonk: 3af1ede0d0956cfbf9c549df7cd9a6807a9efdf2
Version: 41.0a1 (3.0)
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:41.0) Gecko/41.0 Firefox/41.0

Repro frequency: 8/8
See attached: Logcat, Video (URL)
This issue does NOT occur on Flame 3.0
The video is saved and attached to the MMS properly.

Environmental Variables:
Device: Flame 3.0
Build ID: 20150604010200
Gaia: 9e10483c5808f94f4a0a9f6afe30aae2c5b42b4c
Gecko: 98820360ab66
Gonk: 040bb1e9ac8a5b6dd756fdd696aa37a8868b5c67
Version: 41.0a1 (3.0)
Firmware Version: v18D-1
User Agent: Mozilla/5.0 (Mobile; rv:41.0) Gecko/41.0 Firefox/41.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(pbylenga)
[Blocking Requested - why for this release]:
Functional issue of a core app.
blocking-b2g: --- → spark?
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(pbylenga)
Summary: [Camera][Video] Camera cannot save low resolution video recorded for the Messages app. → [Aries][Camera][Video] Camera cannot save low resolution video recorded for the Messages app.
Andrew, can you take a look at this? It looks like the camera is definitely recording in low-resolution, but never succeeds at saving the file because an error is thrown.
Flags: needinfo?(aosmond)
Blocking as this may be a dogfooder use case.
blocking-b2g: spark? → spark+
The video records successfully and plays back fine locally on my laptop but it appears there is something different and/or wrong about it:

06-11 14:59:02.520  1583  1583 I Camera  : Content JS LOG: camera  video file ready  +350ms /sdcard/DCIM/100MZLLA/VID_0001.3gp 
06-11 14:59:02.520  1583  1583 I Camera  :     at log (app://camera.gaiamobile.org/js/main.js:2186:8)
06-11 14:59:02.540  1583  1583 I Camera  : Content JS LOG: camera  got video blob  +20ms 
06-11 14:59:02.540  1583  1583 I Camera  :     at log (app://camera.gaiamobile.org/js/main.js:2186:8)
06-11 14:59:02.540  1583  1583 I Camera  : Content JS LOG: camera  got new video  +2ms [object Object] 
06-11 14:59:02.540  1583  1583 I Camera  :     at log (app://camera.gaiamobile.org/js/main.js:2186:8)
06-11 14:59:02.580  1583  1583 W Camera  : [JavaScript Warning: "Media resource blob:app://camera.gaiamobile.org/bbe2b9d6-4cd6-4fd2-ae39-451be000de50 could not be decoded." {file: "app://camera.gaiamobile.org/index.html#pick" line: 0}]
06-11 14:59:02.580  1583  1583 W Camera  : Content JS WARN: not a video file delete it! 
06-11 14:59:02.580  1583  1583 W Camera  :     at onError (app://camera.gaiamobile.org/js/main.js:4585:7)
Looks like it failed to decode the metadata, but as for why, I see no clue:

06-11 14:59:34.930  1608  1889 I PRLog   : -1206302840[ae9db380]: Decoder=ae953eb0 Change machine state from NONE to DECODING_METADATA

06-11 14:59:34.930  1608  1889 I PRLog   : -1206302840[ae9db380]: Decoder=ae953eb0 Changed mNextFrameStatus to NEXT_FRAME_AVAILABLE

06-11 14:59:34.930  1608  1892 I PRLog   : -1206301088[ae9db580]: Decoder=ae953eb0 Dispatching AsyncReadMetadata

06-11 14:59:34.940  1608  1892 D GonkAudioDecoderManager: Configure audio mime type:audio/3gpp, chan no:1, sample-rate:8000
06-11 14:59:34.940  1608  1891 I PRLog   : -1206301672[ae9dba00]: Decoder=ae953eb0 Change machine state from DECODING_METADATA to ERROR
06-11 14:59:34.940  1608  1891 I PRLog   : -1206301672[ae9dba00]: MediaDecoderStateMachine::mState[ae9910c0] notifying watchers
06-11 14:59:34.940  1608  1608 W Camera  : [JavaScript Warning: "Media resource blob:app://camera.gaiamobile.org/489290da-620d-45f0-8f95-a172bc418848 could not be decoded." {file: "app://camera.gaiamobile.org/index.html#pick" line: 0}]
06-11 14:59:34.940  1608  1608 I PRLog   : -1225858732[b6a4a080]: Decoder=ae953eb0 ChangeState LOADING => ENDED
Flags: needinfo?(aosmond)
Component: Gaia::Camera → Video/Audio
Product: Firefox OS → Core
Here is the video file from comment 5. Playback is fine on Linux but does not decode on FFOS.
Sotaro, Paul, can you take a look at this?
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(padenot)
John might be also interested.
It seems nsMediaSniffer gets incorrect MIME type because of the 'isom' compatible brand in 'ftyp' box so a MP4Decoder will be created but it doesn't support H.263 decoding. I think in this case MediaOmxDecoder should be used instead.

Matthew, 3GPP video(H.263) blob recorded on B2G will be recognized as MP4 because of [1]. Is there any particular reason for the algorithm to accept 'isom'?

[1] https://dxr.mozilla.org/mozilla-central/source/toolkit/components/mediasniffer/nsMediaSniffer.cpp?from=nsMediaSniffer.cpp#50
Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(padenot)
Flags: needinfo?(kinetik)
I'm not sure, that code originates from bug 859711 where it was added by Marco.

The spec this sniffing code originates from (https://mimesniff.spec.whatwg.org/#signature-for-mp4) specifically ignores the ftyp, so I'm not sure why we're examining it at all...
Flags: needinfo?(kinetik)
(In reply to Matthew Gregan [:kinetik] from comment #11)
> I'm not sure, that code originates from bug 859711 where it was added by
> Marco.
> 
> The spec this sniffing code originates from
> (https://mimesniff.spec.whatwg.org/#signature-for-mp4) specifically ignores
> the ftyp, so I'm not sure why we're examining it at all...

 Thanks for the info. Turns out Paul already filed bug 868333.
Depends on: 868333
:jolin seems already working for this bug.
Assignee: nobody → jolin
blocking-b2g: spark+ → 2.5+
It works as expected after upgrading to latest foxfooding OTA:

Build ID               20150707033152
Gaia Revision          e6506d68e01489b57616f8b74e8773f938ce62b3
Gaia Date              2015-07-06 18:14:41
Gecko Revision         https://hg.mozilla.org/mozilla-central/rev/e271ef4c49ae
Gecko Version          42.0a1
Device Name            aries
Firmware(Release)      4.4.2
Firmware(Incremental)  eng.worker.20150619.224059
Firmware Date          Fri Jun 19 22:41:08 UTC 2015
Bootloader             s1
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Keywords: verifyme
This issue is verified fixed on the latest Spark build.
Low resolution video can be recorded and saved properly and is attached to the MMS message.

Environmental Variables:
Device: Aries 2.5
Build ID: 20150709163506
Gaia: fc6643dd3da2ccdf2ab284479643836bb3698644
Gecko: d656ef3c4936
Gonk: 2916e2368074b5383c80bf5a0fba3fc83ba310bd
Version: 42.0a1 (2.5)
Firmware Version: D5803_23.1.A.1.28_NCB.ftf
User Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0
Status: RESOLVED → VERIFIED
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage?]
Flags: needinfo?(ktucker)
Keywords: verifyme
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: