[MDPI][412MB RAM] CM10 720p video recording 30 fps

Search This thread

miniuser123

Senior Member
Aug 17, 2012
204
1,641
is possible to have it for cm10.1?

Any chance we'll see a 720p ION kernel?

I'm working on cm11 ion version in my very limited spare time. Only partial success so far: got 720p@30fps working, but not surprisingly to me messed up video playback at the same time. The problem is that camera still uses pmem, while the new graphics drivers don't like pmem. Anyway I'm still trying...

Cm10.1 will only be considered when I'm done/given up with ion stuff or I find cm11 worse than my current cm10 rom.
 

Grof87

Senior Member
May 29, 2013
246
62
I'm working on cm11 ion version in my very limited spare time. Only partial success so far: got 720p@30fps working, but not surprisingly to me messed up video playback at the same time. The problem is that camera still uses pmem, while the new graphics drivers don't like pmem. Anyway I'm still trying...

Cm10.1 will only be considered when I'm done/given up with ion stuff or I find cm11 worse than my current cm10 rom.

I wish you best of luck and can't thank you enough for all the good work you've done.
 

SurajH

Senior Member
Sep 4, 2012
1,213
966
Dev pls release coconut too
U r the best with cm10 kernel now cm11 turn...
Please if possible coconut kernel test version.

Sent from my WT19i using XDA Premium 4 mobile app
 

Grof87

Senior Member
May 29, 2013
246
62
Will you maybe be releasing a test version of CM11 ION kernel build that you are using so we can test it? For smultron at least (you said earlier that you were using that device)?
 

miniuser123

Senior Member
Aug 17, 2012
204
1,641
Will you maybe be releasing a test version of CM11 ION kernel build that you are using so we can test it? For smultron at least (you said earlier that you were using that device)?

Well here is a test version for smultron for the brave ones. I'm not sure if it works because I made some mods after the compilation, but anyway here it is. For other devices wait for Mike to release official version.

http://www.mediafire.com/download/a...20140612-UNOFFICIAL-LegacyXperia-smultron.zip

The rom has one extra feature: you can go back to the classic webview engine instead of chromium. Unlike chromium it still has proper text reflow, but it isn't stable and totally unsupported. To enable: with root user issue: setprop persist.webview.provider classic
 

Grof87

Senior Member
May 29, 2013
246
62
Well here is a test version for smultron for the brave ones. I'm not sure if it works because I made some mods after the compilation, but anyway here it is. For other devices wait for Mike to release official version.

http://www.mediafire.com/download/a...20140612-UNOFFICIAL-LegacyXperia-smultron.zip

The rom has one extra feature: you can go back to the classic webview engine instead of chromium. Unlike chromium it still has proper text reflow, but it isn't stable and totally unsupported. To enable: with root user issue: setprop persist.webview.provider classic

Seems testing it will have to wait until tomorrow, mediafire download speed is very slow.
 

JOVICAMPEK

Senior Member
Oct 23, 2012
70
20
Well i found a bug in cm-11-20140612-IONLX720p-smultron with recording,the preview when recording is frozen but the playback is fine. Nice work nevertheless. I hope you can fix it. :laugh: :fingers-crossed:
 

RaphaelHam

Senior Member
Mar 9, 2013
368
109
Padang
Miniuser, can u build cm10 with Archi Optimization and include 720p video recording?
It'd be very great.

Sent from my WT19i using Tapatalk
 

miniuser123

Senior Member
Aug 17, 2012
204
1,641
Well i found a bug in cm-11-20140612-IONLX720p-smultron with recording,the preview when recording is frozen but the playback is fine. Nice work nevertheless. I hope you can fix it. :laugh: :fingers-crossed:

It shouldn't be frozen...Is it frozen for the whole duration of the recording? Or just a few seconds?
Logcat and dmesg please.....
 
The rom has one extra feature: you can go back to the classic webview engine instead of chromium. Unlike chromium it still has proper text reflow, but it isn't stable and totally unsupported. To enable: with root user issue: setprop persist.webview.provider classic


Did you enable webview yourself or did you add it from somewhere else? I'm curious to follow development on webview for kitkat roms. See this post for example, someone else was working on webview too. http://xdaforums.com/showpost.php?p=53430714&postcount=29
 

miniuser123

Senior Member
Aug 17, 2012
204
1,641
Did you enable webview yourself or did you add it from somewhere else? I'm curious to follow development on webview for kitkat roms. See this post for example, someone else was working on webview too. http://xdaforums.com/showpost.php?p=53430714&postcount=29

I just enabled the "legacy" webview the same way as it was in the pmem-cm11, With 4.4.3 it needed more changes to get the code compiled, the armv6 github sources helped me a lot. Anyway it is not the way forward because it will need more and more changes to get it compiled and is totally unsupported.
Fortunately google improved the chromium engine in 4.4.3 performance wise, still no text reflow though. Web-browsing experience is miles better in ics and jb.
 
  • Like
Reactions: tinyXperia

JOVICAMPEK

Senior Member
Oct 23, 2012
70
20
The preview is frozen as soon as I enter the recording mode, but I can tap the recording icon and the recording starts but he preview is still frozen. Here are the logs you requested, I will reinstall the rom and see what happens.
Edit: Reinstalled the rom and everything is working. I must have done something wrong.
 

Attachments

  • dmesg.txt
    52.8 KB · Views: 3
  • catlog.txt
    378.5 KB · Views: 2
Last edited:
  • Like
Reactions: miniuser123

outoflock377

Member
Sep 27, 2012
24
3
Hey, thanks for this mod and kernel, your work is amazing! But I have a question: why cpu is OC'ed to 1,2ghz and governor set to "performance" by default in performance settings? Is that set by you on purpose (to make video recording even better)? Battery standby time with you mod is very good but active usage time could be better :)
 

miniuser123

Senior Member
Aug 17, 2012
204
1,641
Hey, thanks for this mod and kernel, your work is amazing! But I have a question: why cpu is OC'ed to 1,2ghz and governor set to "performance" by default in performance settings? Is that set by you on purpose (to make video recording even better)? Battery standby time with you mod is very good but active usage time could be better :)

it's the default naa kernel setting. Change it with system tuner or init.d script for example.
 
  • Like
Reactions: outoflock377

Grof87

Senior Member
May 29, 2013
246
62
I've got that dreaded suspend_wakelock battery draining issue. I think I've already tried all the suggestions from mikes thread (gps and location services are off, I'm using 2G network, always scanning for WiFi is also off, haven't messed with performance settings, formated the sd card, tried using the phone without the sd card, cleared media storage app data and cache, completely disabled media storage app, reflashed with full wipe/format numerous times) any other suggestions? I don't have this problem when using your CM11 pmem build (or any other ROM).
 

Attachments

  • Screenshot_2014-06-18-17-06-49.png
    Screenshot_2014-06-18-17-06-49.png
    49.9 KB · Views: 190
  • Screenshot_2014-06-18-17-07-15.png
    Screenshot_2014-06-18-17-07-15.png
    26.5 KB · Views: 174

bejunk

Senior Member
May 9, 2013
1,991
2,304
Berlin
I've got that dreaded suspend_wakelock battery draining issue. I think I've already tried all the suggestions from mikes thread (gps and location services are off, I'm using 2G network, always scanning for WiFi is also off, haven't messed with performance settings, formated the sd card, tried using the phone without the sd card, cleared media storage app data and cache, completely disabled media storage app, reflashed with full wipe/format numerous times) any other suggestions? I don't have this problem when using your CM11 pmem build (or any other ROM).

hi i have same wakeclock like you sometimes, even i use my phone without mods like u but with SD. sometimes that bug dissappear for some time & nor more android system drain. i think theres some fault in mike sources (maybe upstream stuff from CM, some fixes, changes etc.) just want to say miniuser compile from mike his sources + his patches & thats why i thhink is wrong place. mike knows it, and if you experienced enough try logging (read outs) etc, if not just wait.
 
  • Like
Reactions: Grof87

Top Liked Posts

  • There are no posts matching your filters.
  • 81
    V2:

    It was tested by me only on latest cm10 nightly, but it is possible that it might work on top of other CM10 roms too (reported to work on SJB 8 too).

    Install:
    0. Make backup
    1. install latest cm10 nightly (20131006):
    http://download.cyanogenmod.com/?device=smultron
    2. flash kernel - DEVICENAME_naaashmem.img
    3. flash zip - cm10_enable720p_v2_allinone.zip or cm10_enable720p_v2.zip. The first one includes some useful mods not related to camera, read changelog (Other mods) below! The second one only includes stuff related to camera.

    Downloads at:
    https://www.mediafire.com/folder/1t1kwpbtbcl6w/cm10v2

    Use default camera app for best results!

    Changelog:
    -enabled video stabilization (forced on for now, might make it optional later)
    -disabled face detection in recording mode in default camera app to improve fps, it wasn't working anyway
    -no-copy patch for recording buffer to regain ram and improve fps
    -use ashmem instead of pmem for graphic buffers to regain even more ram (stock ics does this too). No issues found so far, performance is like before.
    -total ram: 412 MB, out of which 4 megs is always allocated for gr. buffers, so 408 MB really
    -stock ics like autobrightness enabled
    Other mods (only included in cm10_enable720p_v2_allinone.zip):
    -electron beam animation
    -faster scrolling, reduced scroll friction
    -more strick dalvik vm to save 1-1.5 MB ram per app.
    -fixed web browser crash on some video sites


    Sources:

    The kernel is based on
    https://github.com/nobodyAtall/msm7x30-2.6.32.x-nAa

    The files modified by me can be found at https://www.mediafire.com/folder/m0t4hx8ac4hhz/naa_kernel
    The changed files are to be copied here:
    arch/arm/mach-msm/

    Modified ramdisk file (init.rc) is also uploaded at the same place.

    My CM10 patches are here:
    https://www.mediafire.com/folder/gw8sy9ozc8cos/sourcepatch

    V1:

    I have been testing 720p recording in CM10 roms recently. It looks like it is not impossible to reach good fps in CM after all.
    It was inspired by the maker of MESA kernel an0nym0us_ who used stock camera lib in cm10. Big thanks to him!
    My test rom was SJB 8.0 and CM10 nightly 2013.10.06.
    Basically I did 3 modifications:
    1. Copied camera.semc.so to /system/lib/hw/
    2. Modified media_profiles.xml
    3. Modified pmem sizes in kernel. Used nAa kernel as base. Free ram is 388 MB at the moment. Still testing it...

    The result is good hd recording at near 29.7 fps. The smoothest results come in the camera app found in Super Jelly Bean 8.0. Other apps like stock CM cam and LGCamera produce around 25-27 fps but it can be improved with a tweak.

    So here is what to do:
    1. Flash kernel (mini_naa720p.img or minipro_naa720p.img or lww_naa720p.img or active_naa720p.img)
    2. flash zip in cwm (cm10_enable720p.zip)

    https://www.mediafire.com/folder/f28fff1i6i5v1/


    Make sure nothing is runnning (like mediascanner) when recording!

    Check video fps with ffmpeg in terminal emulator:
    Type
    Code:
    ffmpeg -i videoname.mp4

    If fps is only around 25-27 try this in terminal:

    Code:
    su
    renicesflinger.sh 0

    Pls report back if it's working for you, I was a bit tired when writing this...


    ---------------------------------------------------------------------------------------------------

    About the kernel: it's based on
    https://github.com/nobodyAtall/msm7x30-2.6.32.x-nAa

    I changed one file:
    arch/arm/mach-msm/board-semc_mogami.c

    The changed file can also be found at https://www.mediafire.com/folder/f28fff1i6i5v1/

    Current values are these:

    Code:
    #define MSM_FB_SIZE		0x200000
    
    #define MSM_PMEM_SF_SIZE	0x800000
    #define MSM_PMEM_CAMERA_SIZE		0xBE0000
    #define MSM_PMEM_ADSP_SIZE			0x1F80000

    I think 1 mb more ram can be regained...
    26
    Good news! Finally got the ion version working. Recording and playback are fine too. I will upload sources to github in a few days and release a test version for mini users.
    23
    For stereo recording try this file:
    http://www.mediafire.com/download/ak8ytyqtj18w65x/audio.primary.msm7x30.so
    Copy it to /system/lib/hw, set permisssion to 644 and reboot (or type killall mediaserver in terminal).

    It enables dual mic real stereo recording mode like in stock ics. Unfortunately volume is still very low, no improvement on that front:(.

    Regarding CM 10.1 and 10.2: my modification could be applied to them, but it should be based on kernel 3.4, because some things would be difficult to fix in the 2.6 kernel (bluetooth is the most problematic). I did some work on 10.2, but I went back to cm 10 because it had better performance imho.
    My only problem with cm10 that it has some terrible memory leaks in SystemUI and webkit. After browsing the net for half an hour, the memory usage of the browser is usually above 200 MBs... So I might leave cm10 in the future.

    Did you just pick my back mic patch for stereo recording or you made additional changes? I guess the latter.
    Can you share the source fix?

    About the new ION kernel now: I have tried your patches but didn't work out of the box and broke camcorder. The problem now is that we can't use the system heap for camera preview since it's ION and we want pmem. Now the only pmem heap we have is pmem_adsp and it's used only for camera and nothing else, I guess this could simplify your buffer copying code.

    I suggest either cm-10.1 or cm-11.0, cm-10.2 is the heaviest of all versions. But we have some problems: qcom released code needed for msm7x30 support up to android 4.2 and then dropped support. We can bringup cm-10.1 with ION kernel and it will be almost perfect in terms of functionality and support from qcom, but that requires porting the kernel again on top of jb 4.2 qcom branch and adapting the device trees for ION, so it can take some time. We have ported most of the code from qcom's 4.2 branches to cm11 and we have almost fully functional builds except some small audio issues.

    Now, it's up to you to choose on which branch you are going to work.

    EDIT: we are also working on bringing official Omni 4.4 support which seems to be much faster than cm but of course it misses a lot of features.
    21
    I haven't played with libgemini...
    I am trying to get rid of the inefficient memcopying which I mentioned earlier, 50 percent of the job done. It would be a breakthrough if it worked.

    I managed to make video encoding less cpu intensive by using the camera recording buffer as input for the encoder, no more stupid copying to temporary adsp buffer. Now getting 28 fps with stabiliztation on, and 29.5 fps with stabilization off. This should also allow us to free up some more pmem. I will try to clean up the code a bit next week and optimize pmem usage.
    21
    I don't have a hdpi device so I don't support them, but Mike's LX roms will possibly have 720p recording enabled in the future for all devices when migration to ION is done.

    For CM10 (my daily rom atm) I am planning to release an update for mpdi devices. It will have 400 mb usable ram, decent fps with video stabilizer.

    Hi,
    camera is already working on ION kernels so I thought to start working on 720p recording again. Have you made any updates to your code or it's the same as the patches you provided before?