[B2G][SMS] The user can attach long videos to a MMS when recording a video through messaging but videos recorded through the camera are too large to attach

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
5 years ago
2 years ago

People

(Reporter: KTucker, Unassigned)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(b2g18 affected, b2g-v1.2 affected, b2g-v1.3T affected, b2g-v1.4 affected, b2g-v2.0 affected)

Details

(Whiteboard: permafail)

Description:
The user can attach long videos to a MMS when recording a video through the messaging app but videos recorded through the camera are too large to attach. Even a 1 second video will prompt the user that the file is too large to attach.

Repro Steps:
1)  Updated Buri to Build ID: 20131008004009
2)  Tap on the "Camera" icon.
3)  Tap on the "Video Camera" icon.
4)  Tap on the "Record" button and immediately stop the recording so that it is only 1 second long.
5)  Tap the "Home Button" on the phone.
6)  Tap on the "Messaging" icon.
7)  Tap on the "Compose New Email" icon.
8)  Tap on the "Paperclip" icon.
9)  Tap on "Video".
10)  Tap on the 1 second video that was just recorded.
11)  Tap on the "Checkmark" icon in the upper right corner to attach the video to the message.

Notice the error message "The file you have selected is too large".

12)  Tap "OK".
13)  The user should be taken back to the empty "New Message". Tap on the "Paperclip" icon again.
14)  Tap on "Camera" and then the "Video Camera" icon.
15)  Tap on the "Record Button" and record a 10 second long video.
16)  After stopping the recording, tap on "Select" to attach the video to the message.

Actual:
The user cannot attach recorded videos that were done through the camera but can attach videos recorded through the messaging app.

Expected:
The user should be able to record videos through the camera and attach them to messages without issue. The file size is always too large even a 1 second recording.

Environmental Variables
Device: Buri v 1.2.0 Mozilla RIL
Build ID: 20131008004009
Gecko: http://hg.mozilla.org/releases/mozilla-aurora/rev/decf58f0d596
Gaia: 313599c293f596519604070fa378ffc89e61e98f
Platform Version: 26.0a2
RIL Version: 01.02.00.019.056 

Notes:
Repro frequency: 100%
See attached: video clip
This issue occurs on Leo v1.1.1 Mozilla Rill

Environmental Variables
Device: Leo v 1.1.1.0 Mozilla COM RIL
Build ID: 20131001041206
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/c630289d6388
Gaia: 02b975e6ce12922928c74276ac7d19432a03f126
Platform Version: 18.1
RIL Version: 01.01.00.019.240 

The user can attach a video recorded through the messaging app but not from recording a video through the camera app.
The video can be seen on Youtube here:

http://youtu.be/T83gjRHW14s
This functionality was added in bug 879881 but maybe it never worked ?

Funnily, the email app does not use the "maxFileSizeBytes" activity property :-)

Dale, we're doing this in the Messages app: https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/compose.js#L478-L485

Does that look good ?
Flags: needinfo?(dale)
The functionality only works if the video is recorded via the activity, if you just open the camera and start recording we dont (nor do we want to) limit the videos to the lowest possible resolution in case they might be sent via sms.

I dont really know what an ideal resolution for this is, its pretty close to a WONTFIX though, I will needinfo David as there is other work being done on this stuff
Flags: needinfo?(dale) → needinfo?(dflanagan)
Mmm you're right, I really misread this bug.
Would it be possible to somehow use the maxFileSizeBytes property in the video app ? 
So that you can warn in advance the user that the file is too big: having a sign on it, or lessen the opacity (or both), + a message warning the user before it goes back to the Messages app ?
The video app records videos at a larger size if they are for display on the phone.  If you invoke the camera app from the MMS app and record a video that way, the video is recorded at a smaller size and limits the length of recording time so it doesn't get too big.

We don't want the camera app to record tiny videos by default, right?

ktucker: Are you sure this is a bug? What is the file size of the 1 second video that you recorded? I suspect it is actually too large.  Anything larger than 100-200kb is too big for an MMS, I think.

For photos, we reduce the size when we attach them to a text message. If we had some way of transcoding video to reduce its resolution, we could convert recorded video to a smaller resolution as part of the attachment process.  But I suspect that cannot be done on a mobile phone.

Perhaps there is a bug in the camera device code and the recorded videos are reserving a huge chunk of space for metadata in the file.... Maybe we could reduce that and get very short videos to fit in a MMS.  Or maybe the camera app could allow the user to set the video resolution.  But that would be a new user story with UX work, etc.

I'm inclined to agree with Dale that this is a WONTFIX.  But it would be interesting to know from the reporter what the actual file size of the shortest video he can record is.
Flags: needinfo?(dflanagan) → needinfo?(ktucker)
The default MMS max size is 300kB.

David, you didn't comment about my proposal in comment 6 ? (which I agree is a real story and not just a bug)
Flags: needinfo?(dflanagan)
Yes, I am pretty sure that this is a valid issue in response to comment 7. 

The issue here is that when you tap on the "1 second video" that the user just recorded from the video app, there is a "share button". When the user taps on the "share button" they can tap on "Messages". The video will always be too large to share. What is the point of having this functionality to share the video through messages if every video the user records with the video app will be too large to share? 

The smallest video that the user can record is 421 KB using the video app which is too large. This is from tapping on "Record" and then immediately tapping "Stop" as soon as the recording starts. I believe that this will frustrate the end user. Either "Messages" should be removed as a share option when recording videos through the Camera app or the user should be able to set the resolution lower manually when recording a video.
Flags: needinfo?(ktucker)
(In reply to Julien Wajsberg [:julienw] from comment #8)
> The default MMS max size is 300kB.
> 
> David, you didn't comment about my proposal in comment 6 ? (which I agree is
> a real story and not just a bug)

I didn't comment on that because it didn't make sense to me. If I understand this bug correctly, everything works fine when you got to mms, click attach, click camera and record a video.  I think it stops recording automatically when you reach the max size.  That case works.

The reported bug is for when the user records a regular video and then tries to attach it to an MMS message.
Flags: needinfo?(dflanagan)
(In reply to ktucker from comment #9)
> Yes, I am pretty sure that this is a valid issue in response to comment 7. 
> 
> The issue here is that when you tap on the "1 second video" that the user
> just recorded from the video app, there is a "share button". When the user
> taps on the "share button" they can tap on "Messages". The video will always
> be too large to share. What is the point of having this functionality to
> share the video through messages if every video the user records with the
> video app will be too large to share? 

If we modify every app that shares files to include the file size as part of activity request (actually the sum of all shared files in the request) then we could modify the MMS share activity handler to only respond to share requests for smaller files.  Arguably, this might be the wrong thing to do because the user wouldn't know why sharing via MMS was not an option.  This way at least they get an error message.

Unfortunately, I don't think we can do the same for the Pick activity.  Currently if the user goes to MMS, clicks attach, and then Video, they'll be able to pick videos, but all of them will be too big to attach, right?  So this is the same failure, and I don't think there is much we can do about it.

> The smallest video that the user can record is 421 KB using the video app
> which is too large. 

That surprises me.  I wonder why it is so big?  It might be worth investigating that.

This is from tapping on "Record" and then immediately
> tapping "Stop" as soon as the recording starts. I believe that this will
> frustrate the end user. Either "Messages" should be removed as a share
> option when recording videos through the Camera app or the user should be
> able to set the resolution lower manually when recording a video.
(In reply to David Flanagan [:djf] from comment #10)
> (In reply to Julien Wajsberg [:julienw] from comment #8)
> > The default MMS max size is 300kB.
> > 
> > David, you didn't comment about my proposal in comment 6 ? (which I agree is
> > a real story and not just a bug)
> 
> I didn't comment on that because it didn't make sense to me. If I understand
> this bug correctly, everything works fine when you got to mms, click attach,
> click camera and record a video.  I think it stops recording automatically
> when you reach the max size.  That case works.

My proposal was when you trigger the "pick" activity from the Messages app to the Video or Music apps. There the apps could filter out the media that are too big.
Duplicate of this bug: 931187
Whiteboard: burirun2 → burirun2, burirun1.3-2
Note: on my Android, the camera app has a "MMS mode" that the user could use when recording a video.
status-b2g-v1.4: --- → affected
Whiteboard: burirun2, burirun1.3-2 → burirun2, burirun1.3-2, burirun1.4-1
(Reporter)

Updated

5 years ago
Whiteboard: burirun2, burirun1.3-2, burirun1.4-1 → permafail
status-b2g-v1.3T: --- → affected
QA Whiteboard: [QAnalyst-Triage?]
status-b2g-v2.0: --- → affected
Flags: needinfo?(ktucker)
(Reporter)

Updated

4 years ago
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(ktucker)

Updated

4 years ago
QA Whiteboard: [QAnalyst-Triage+] → [QAnalyst-Triage+][lead-review+]
For this, we'd need a way to quickly reencode a video.
A video encoder is not cheap. I've found [1] which is basically ffmpeg built with emscripten. But it's quite huge.

Maybe it's possible to build a cheap mpg1 encoder (I remember me and a friend did one in C some years ago, I could try to find it back and see if it's compilable with emscripten).

Another possibility is to build a "video studio" app that we could access through an activity. This would allow the user to possibly cut the video, recompress it, etc. This is a _lot_ of work and I'm not sure we want to do it.

[1] https://github.com/bgrins/videoconverter.js
Mass closing of Gaia::SMS bugs. End of an era :(
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.