480p and 1080p video appear to use the same bitrate

Bug #1434517 reported by James Henstridge on 2015-03-20
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical System Image
High
John McAleely
camera-app (Ubuntu)
High
Unassigned
libhybris (Ubuntu)
High
Jim Hodapp

Bug Description

I just recorded two 10 second videos of the the same object using my Nexus 4, one using the 1080p setting and the other 480p. Both videos came out at roughly 8MB, each with approximately a 6.3 Mb/s video bit rate and 96 kb/s audio bit rate.

This seems a bit weird to me: the only reason I can think of to offer multiple resolutions is to let the user pick the quality / storage space trade off they want. If the lower resolution videos take up just as much space as the high resolution ones, then this doesn't make sense.

I am running build 143 on a Nexus 4, which looks to have camera-app 3.0.0.516 installed:

    current build number: 143
    device name: mako
    channel: ubuntu-touch/devel-proposed
    alias: ubuntu-touch/vivid-proposed
    last update: 2015-03-20 07:05:06
    version version: 143
    version ubuntu: 20150320
    version device: 20150210
    version custom: 20150320

Changed in camera-app:
importance: Undecided → High
Changed in camera-app:
assignee: nobody → Florian Boucault (fboucault)
Bill Filler (bfiller) wrote :

I can confirm similar results recorded on Krilin:

1080p:
1920x1080
31fps
6617kbps
8.7mb filesize

480p:
640x480
31 fps
6452kbps
8.3mb filesize

@jamesh
What would you recommend for the settings at the lower resolution? What bitrate would be expected?

no longer affects: camera-app
Changed in camera-app (Ubuntu):
assignee: nobody → Florian Boucault (fboucault)
importance: Undecided → High
status: New → Confirmed
Changed in canonical-devices-system-image:
assignee: nobody → Bill Filler (bfiller)
milestone: none → ww02-2016
importance: Undecided → High
status: New → Confirmed
Ugo Riboni (uriboni) on 2015-12-08
Changed in camera-app (Ubuntu):
status: Confirmed → In Progress
assignee: Florian Boucault (fboucault) → Ugo Riboni (uriboni)
Bill Filler (bfiller) on 2015-12-15
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Ugo Riboni (uriboni) wrote :

I checked what Android does in their camera application.
Basically they seem to use an average bitrate of 12kbps in 1080p, 8kbps in 720p and 5kbps in 480p.
We agreed that we would try to do the same.

However, once I pass the correct bitrate setting down the stack from qtubuntu-camera, it seems that at some point that setting gets lost or ignored.

Jim Hodapp is looking into why this happens, since he's working on that part of the stack. So far it seems that the settings is making its way down to the level of the media framework, and he is looking to find if it gets passed to the video codec properly.

Ugo Riboni (uriboni) wrote :

Bug #1526407 tracks the problem above in libhybris (and down into the android framework)

Ugo Riboni (uriboni) wrote :

And the bitrates mentioned above are in MBps, not kbps.

Changed in canonical-devices-system-image:
milestone: ww02-2016 → ww08-2016
Bill Filler (bfiller) on 2016-01-26
Changed in canonical-devices-system-image:
assignee: Bill Filler (bfiller) → John McAleely (john.mcaleely)
Changed in libhybris (Ubuntu):
assignee: nobody → Jim Hodapp (jhodapp)
importance: Undecided → High
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libhybris (Ubuntu):
status: New → Confirmed
Simon Fels (morphis) wrote :

Its rather important when you set the video-param-encoding-bitrate parameter for the encoder. The code should look like

android_recorder_setParameter(recorder, "video-param-encoding-bitrate=2048");
...
android_recorder_prepare(recorder);
android_recorder_start(recorder);

The parameters are not applied if you set the parameter after you've called android_recorder_prepare

Can someone please verify we're doing it this way?

Florian Boucault (fboucault) wrote :

Hi Simon,

I have just checked in qtubuntu-camera and it is indeed done this way.

Changed in canonical-devices-system-image:
milestone: ww08-2016 → 11
Pat McGowan (pat-mcgowan) wrote :

not much activity on this one lately

Changed in canonical-devices-system-image:
milestone: 11 → backlog
status: In Progress → Confirmed
Changed in camera-app (Ubuntu):
status: In Progress → Confirmed
assignee: Ugo Riboni (uriboni) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers