• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[MOD] Nexus 7 720p Video Recording

Search This thread

hillbeast

Inactive Recognized Developer
Feb 9, 2011
2,719
6,790
Dunedin
So I just got 720p video recording working on my Nexus 7 and felt you guys should know about this too. It's a simple fix as it's not a limitation of hardware or a kernel function or anything, rather it's just Google didn't add the media profile for 720p to tell it how to use 720p.

What firmware does this need?

It doesn't matter. If you're on the original N7 firmware or the latest builds from Google, it still works just fine. I'm now on JOP40C and it works just fine. One update.zip fits all. I do suggest keeping your original file as a backup though as it plays up with OTA updates if you have this mod installed.

You don't need to install this if you are running a CM based firmware (CM10, etc) as I have pushed the patch to the CM repositories and it will be preloaded on your Nexus 7. And no, it's not them stealing credit, I pushed the patch to them.


Download Link

Update.zip: http://d-h.st/8Cw

Video For Your Delectation

 
Last edited:

the.emilio

Senior Member
If you want, I can upload my ROM which contains it?

I know I'm not that far in to deving to make a flashable zip that can be universal for most of these roms. All I have done was port a rom to the EVO 4G. So... I guess if you upload the apk and associated edited files someone can do something or I will give it a shot.

Sent from my Nexus 7 using xda premium
 

sotoskawasaki

Senior Member
Feb 2, 2012
175
21
Limassol, Cyprus
I use the camera app from Modaco and sound works great when shooting videos. Its strange why yours isn't working. Anyway it would be great if someone made a flashable zip or an apk out of this. Great work there buddy!
 

oldlight

Member
Nov 11, 2008
44
4
I found 5 different media_profiles im cm10 source folder:
1. /development/tools/emulator/system/camera
2. /out/target/product/grouper/obj/PACKAGING/target_files_intermediates/cm_grouper-target_files_eng.<your user name>/SYSTEM/etc
3. /out/target/product/grouper/system/etc
4./out/target/product/grouper/
5. /device/panda
is it likely the file that you mentioned in number 3, right?
(sorry for my english)

Thanks in advance.
 
Last edited:

hillbeast

Inactive Recognized Developer
Feb 9, 2011
2,719
6,790
Dunedin
I found 5 different media_profiles im cm10 source folder:
1. /development/tools/emulator/system/camera
2. /out/target/product/grouper/obj/PACKAGING/target_files_intermediates/cm_grouper-target_files_eng.<your user name>/SYSTEM/etc
3. /out/target/product/grouper/system/etc
4./out/target/product/grouper/
5. /device/panda
is it likely the files that you mentioned in number 3, right?
(sorry for my english)

Thanks in advance.

I edited /device/asus/grouper/media_profiles.xml. Refer to this commit:

https://github.com/hillbeast/android_device_asus_grouper/commit/543f1d58abdb98567445ef5deebfa5b8eff0de03
 

superleeds27

Senior Member
Jun 21, 2010
5,441
716
Hull
I replaced the file in the system/etc folder with the 720p file from your ROM.

I opened the camera, but it just force closes. Any ideas?

Im using CodenameAndroid ROM
 

bennor3814

Senior Member
Jul 19, 2012
99
21
Added (copied) the relevant code from the OP to the /system/etc/media_profiles.xml file of my stock (build #: JRO03D), but rooted, Nexus 7 16gb. When attempting to record video the camera app closes with this error message; "Unfortunately, Gallery has stopped." With the option of "Report" or "Ok".

The camera app does not crash when taking a picture or when using the panoramic picture mode. The files are saved to the /sdcard/DCIM/Camera/ folder. It appears the crashed video files are there, two for each recording (one is "VID_xxxxxxxx_xxxxxx.3gp" the other is "VID_xxxxxxxx_xxxxxx.3gp.tmp", but neither play. Both are zero bytes in size.

Also, is there a way to change between 480p and the new 720p setting? Looked but didn't see an option to make that change in the camera app.
 
Last edited:

dawgpound6985

Senior Member
Nov 8, 2006
281
56
Works great on latest CM10 Nightly. Just did an adb pull on /system/etc/media_profiles.xml and added the 720p lines. Then I adb pushed it back and did a chmod and rebooted. Will this be merged into CM10?
 

bb12489

Senior Member
Jul 2, 2008
443
131
Cazenovia
OnePlus 9 Pro
This would be a great as a flashable zip! I'm currently deploying a bunch of nexus tablets at my work and i'm sure everyone would like to have the ability to use the camera to record 720p
 
Last edited:

hillbeast

Inactive Recognized Developer
Feb 9, 2011
2,719
6,790
Dunedin
Added (copied) the relevant code from the OP to the /system/etc/media_profiles.xml file of my stock (build #: JRO03D), but rooted, Nexus 7 16gb. When attempting to record video the camera app closes with this error message; "Unfortunately, Gallery has stopped." With the option of "Report" or "Ok".

The camera app does not crash when taking a picture or when using the panoramic picture mode. The files are saved to the /sdcard/DCIM/Camera/ folder. It appears the crashed video files are there, two for each recording (one is "VID_xxxxxxxx_xxxxxx.3gp" the other is "VID_xxxxxxxx_xxxxxx.3gp.tmp", but neither play. Both are zero bytes in size.

Also, is there a way to change between 480p and the new 720p setting? Looked but didn't see an option to make that change in the camera app.

Not sure what has gone wrong. I did a full recompile to add it so perhaps something else was changed by this file.





Works great on latest CM10 Nightly. Just did an adb pull on /system/etc/media_profiles.xml and added the 720p lines. Then I adb pushed it back and did a chmod and rebooted. Will this be merged into CM10?

I'm not a member of the CM team and I cannot understand how Gerrit works so I can't submit it so probably not. If someone can tell me then please do.

Sent from my Nexus 7 using xda app-developers app
 
Last edited:
  • Like
Reactions: umer936

bennor3814

Senior Member
Jul 19, 2012
99
21
Not sure what has gone wrong. I did a full recompile to add it so perhaps something else was changed by this file.
I think I fixed my issue. It may have been because the file permissions were incorrectly set when the file was saved. Permissions should be rw- r-- r--, instead when saved from the ES File Explore Editor after editing it was rw- --- ---.

I also rebooted the tablet after changing the file permissions just to be safe.

Sent from my Nexus 7 using Tapatalk 2
 

hillbeast

Inactive Recognized Developer
Feb 9, 2011
2,719
6,790
Dunedin
I think I fixed my issue. It may have been because the file permissions were incorrectly set when the file was saved. Permissions should be rw- r-- r--, instead when saved from the ES File Explore Editor after editing it was rw- --- ---.

I also rebooted the tablet after changing the file permissions just to be safe.

Sent from my Nexus 7 using Tapatalk 2

Ah yes that would cause it. The application wouldn't have been able to read the file.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 149
    So I just got 720p video recording working on my Nexus 7 and felt you guys should know about this too. It's a simple fix as it's not a limitation of hardware or a kernel function or anything, rather it's just Google didn't add the media profile for 720p to tell it how to use 720p.

    What firmware does this need?

    It doesn't matter. If you're on the original N7 firmware or the latest builds from Google, it still works just fine. I'm now on JOP40C and it works just fine. One update.zip fits all. I do suggest keeping your original file as a backup though as it plays up with OTA updates if you have this mod installed.

    You don't need to install this if you are running a CM based firmware (CM10, etc) as I have pushed the patch to the CM repositories and it will be preloaded on your Nexus 7. And no, it's not them stealing credit, I pushed the patch to them.


    Download Link

    Update.zip: http://d-h.st/8Cw

    Video For Your Delectation

    16
    media_profiles.xml got updated with JOP40C. hillbeast will have to update the OP with new files. ;) :good:
    No need. Works fine. Tested it myself and it works fine with no negative ramifications.


    Here is what changed between JZO54K and JOP40C. Just 3 lines with a higher min framerate for the video codecs. Nothing extreme I guess, but could improve the encoding quality just slightly.

    Attached are recovery flashable zips of your patched xml altered to reflect the JOP40C changes, and the Undo to revert back to 4.2 stock. JOP40D, JDQ39, and JWR66V are still exactly the same as this.

    Edit: All stock KitKat builds also still have the same codec file as JOP40D.

    [ Attachments removed since all custom ROMs now contain these fixes ]
    7
    I have paranoid rom installed and there is 720p recording and it works out of the box, is this same like that or this is maybe better.
    Sent from my Nexus 7 using xda app-developers app

    The 720p recording in all the ROMs now is because I submitted this page to CM. Any CM ROM has this mod now.

    Sent from my Galaxy S2
    6
    Nexus 7 720p Camera Instructions - no PC needed (rooted users only)

    So I just got 720p video recording working on my Nexus 7 and felt you guys should know about this too.

    720p video picture

    Here are my instructions to do this without using a PC(for rooted users):
    I used ES File Expolorer (nice program available in the play store)
    1- Open ES File Explorer and head to /system/etc/
    2- Find the file media_profiles.xml and copy it (long press the file and select copy from the menu)
    3- Go into any other directory and paste it there (temporarily)
    4- Go back to the /system/etc/ directory again and rename the media_profiles.xml to media_profiles.xml.old and save it (long press the file and select rename from the menu
    5- Now go back to the directory you copied the file to and long press it. When the menu comes up select cut and go to the /system/etc directory and hit paste up at the top
    6- Now just click on the file you just pasted and a list of editors will pop up.
    7- Select ES Note Editor (it comes with ES File Explorer) and locate the section in the file where it says
    Code:
        <EncoderProfile quality="480p" fileFormat="3gp" duration="30">
          <Video codec="h264"
                 bitRate="4000000"
                 width="640"
                 height="480"
                 frameRate="30" />
    
          <Audio codec="aac"
                 bitRate="96000"
                 sampleRate="44100"
                 channels="1" />
        </EncoderProfile>

    8- Add this code right after
    Code:
        <EncoderProfile quality="720p" fileFormat="3gp" duration="30">
          <Video codec="h264"
                 bitRate="16000000"
                 width="1280"
                 height="720"
                 frameRate="30" />
    
          <Audio codec="aac"
                 bitRate="128000"
                 sampleRate="48000"
                 channels="1" />
        </EncoderProfile>
    9- Once added click the back button on the bottom and a menu will show up on the bottom that asks you to save click that.
    10- Long press the file you just saved and select Properties at the bottom and make sure you give it the correct permissions (rw-r--r-- or chmod 644) by clicking the change button. There should be 4 check marks on that screen User read, User write, Group read, Other read. Click ok and ok again to save it.
    11- Reboot and enjoy.
    Don't thank me for this - thank hillbeast. If my instructions helped you then thank me too. Lol.



    Thanks hillbeast - I also noticed that you cannot take a screenshot while in the camera program - gives you a sd card storage in use error. So I took this with my SGS2.
    4
    hey hillbeast, post this one, I credited you in the updater-script
    goo.im- http://tinyw.in/udKH
    or from dev-host-http://d-h.st/hmD