Closed Bug 896861 Opened 12 years ago Closed 12 years ago

[B2G][Helix][Camera]the video's format is 3gp, not MP4

Categories

(Firefox OS Graveyard :: Gaia::Camera, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: ysdingyu2013, Unassigned)

Details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; Tablet PC 2.0) Steps to reproduce: 1.Open the camera app and toggle to the video mode 2.start and stop a video recording 3.check the video format Actual results: The video's format is 3gp Expected results: Can firefox OS support video recording of MP4 format.
Component: General → Gaia::Camera
Severity: normal → critical
Priority: -- → P1
Currently video recording is done in 3gp format only. Sandip, are we planning to do this in the future at all?
Severity: critical → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(skamat)
Priority: P1 → --
Actual difference between 3gp and mp4 is ftyp and file extension. Other difference is 3gp restrict the video encoding profile in limited range. From this point of view, it is a reasonable request. v1.2 should have this capability. But I feel that actual amount of code change/all use cases decision are too large for 1.1 hd, I think. We need to make clear about relation ship to video in MMS and mp4/3gp video.
(In reply to Sotaro Ikeda [:sotaro] from comment #2) > Actual difference between 3gp and mp4 is ftyp and file extension. Other > difference is 3gp restrict the video encoding profile in limited range. From > this point of view, it is a reasonable request. v1.2 should have this > capability. But I feel that actual amount of code change/all use cases > decision are too large for 1.1 hd, I think. > > We need to make clear about relation ship to video in MMS and mp4/3gp video. Thanks for the insight Sotaro :) We will not consider this for v1.1HD as the scope is firm for 1.1. We can study the feasibility for v1.2 but I guess in the end it will be up to product decision. Also flagging product here.
Flags: needinfo?(ffos-product)
(In reply to Sotaro Ikeda [:sotaro] from comment #2) > We need to make clear about relation ship to video in MMS and mp4/3gp video. To support this, we might need a capability of re-encoding video from mp4 to 3gp(transform video to lower resolution).
We should mark it for v1.2 and not 1.1. However, CJ is checking internally on Video formats so I am adding him here to update (I will be on PTO) as it becomes final in the next few days.
Flags: needinfo?(skamat) → needinfo?(cku)
nom'ing this for koi? first. DingYu, this bug will not be fixed on v1.1HD. We're assessing if we will include it in v1.2.
blocking-b2g: --- → koi?
Flags: needinfo?(cku)
v1.2 still use mozCamera, instead of MediaRecord + gUM, we should discuss container format support separately.
Hi Wayne Chang: Have mozilla let telefonica know that this specification is not supported.
(In reply to C.J. Ku[:CJKu] from comment #7) > v1.2 still use mozCamera, instead of MediaRecord + gUM, we should discuss > container format support separately. gUM can only handle camera preview stream. Android camera hal provide a dedicated video stream only for recording video. It's buffers can not bound to texture. Then it can not be supported by gUM. Therefore, gUM can not handle a correct quality of Video recording.
(In reply to Sotaro Ikeda [:sotaro] from comment #9) > (In reply to C.J. Ku[:CJKu] from comment #7) > > v1.2 still use mozCamera, instead of MediaRecord + gUM, we should discuss > > container format support separately. > > gUM can only handle camera preview stream. Android camera hal provide a > dedicated video stream only for recording video. It's buffers can not bound > to texture. Then it can not be supported by gUM. Therefore, gUM can not > handle a correct quality of Video recording. You are right, and that's what we need to fix. We already notice this problem in WebRTC. In WebRTC, we need to real-time encode raw image into VP8, please refer to bug 896391.
One big problem of the preview stream is time-stamp. Camera hal does not provide timestamp for the preview stream. Then GonkNativeWindow provide it. In android case, it is SurfaceTexture(BufferQueue in JB). It regress video's quality a lot. The time-stamp needs to be provided by kernel layer.
For mozCamera API, we could support mp4 by modifying the media_profiles.xml for the target device. Taking unagi as an example, the default file format for cif profile [1] is using 3gp, changing file format to "mp4" will make GonkRecorder using mp4 container format. One more thing to do is modify the file extension in camera app. The current file extension is always .3gp [2]. [1] https://github.com/mozilla-b2g/android-device-unagi/blob/master/media_profiles.xml#L134 [2] https://github.com/mozilla-b2g/gaia/blob/master/apps/camera/js/camera.js#L31
Need info. Wanye/ Ding, is this fit your requirement? By modify this xml, you can define container format for recording
Flags: needinfo?(ysdingyu2013)
Flags: needinfo?(wchang)
Hi C.JKu As Shih-Chiang's suggestion, I do the same test in the helix version, it works fine, the video format is .mp4
Flags: needinfo?(ysdingyu2013)
Closing this here as WFM. Nothing to fix in this particular bug.
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: needinfo?(wchang)
Resolution: --- → WORKSFORME
Flags: needinfo?(ffos-product)
Resolved as worksforme - removing from koi? to-be-triage queue
blocking-b2g: koi? → ---
You need to log in before you can comment on or make changes to this bug.