Samsung Camera app - Galaxy Note 4 Developer Discussion (Devs., Only)

If you would like to know what section I am trying to work on next please skip down to the bottom of the OP
​
Back in the past I tried to increase the limit of the note 3s video recording size, I was able to increase the length of video but the file size limit seemed to always stop at 3.8GB (or in any case 4GB "4,294,967,296" FFFFFFFF). Now I would like to get this started back up fresh and new.
I am asking for the help of developers to help me find what is causing the video recording to stop at 3.8GB if the note 4 has this same problem which I imagine it will.
If interested in helping please comment here or message me. I am seriously dedicating 99% of my free time to figure this out due to wanting to record longer than 13 minutes (most I could get out of 4k on the note 3).
Also hoping to increase quality of pictures and of all video modes. I know how to decompile but not sure how to recompile or read everything in the file. So I am asking for others help on this project. I was pretty upset to fail on the note 3 but the note 4 looks to be another potential project.
Here are the smali files to look through. I have heard decompiling smali to java is illegal so I won't do that.
https://dl.dropboxusercontent.com/u/38128929/app.rar
Ok here's what I've found so far:
Oct 24th 2014
JPEG QUALITY
CameraSettings.smali - Line 2732 -
const/16 v0, 0x60
0x60 = 96%
0x61 = 97%
0x62 = 98%
0x63 = 99%
0x64 = 100%
RECORD TIME
CommonEngine.smali - Line 148 -
.field private static final MAX_DUAL_FHD_RECORD_TIME:I = 0x12c
CommonEngine.smali - Line 150 -
.field private static final MAX_DUAL_HD_RECORD_TIME:I = 0x258
CommonEngine.smali - Line 156 -
.field private static final MAX_SMOOTH_MOTION_RECORD_TIME:I = 0x258
CommonEngine.smali - Line 156 -
.field private static final MAX_UHD_RECORD_TIME:I = 0x12c
CommonEngine.smali - Line 158 -
.field private static final MAX_VIDEO_FILE_SIZE:J = 0xffffffffL
0x12c = 300 (in seconds) = 5 (minutes)
0x258 = 600 (in seconds) = 10 (minutes)
0x384 = 900 (in seconds) = 15 (minutes)
0xffffffffL = 4294967295 (in bytes) = 4 (Gigabytes)
There is more that goes in this section but I will have to find my notes to update
RECORD QUALITY
1920x1080 recording
MediaRecorderProfile.smali - Line 756 -
.line 72
:array_0
.array-data 0x4
0x2t 0x0t 0x0t 0x0t (Dont touch)
0x40t 0x66t 0x3t 0x1t (Adjust this for bitrate see notes below in red)
0xc0t 0xe1t 0xe4t 0x0t (Dont touch)
0x40t 0x5dt 0xc6t 0x0t (Dont touch)
0x1et 0x0t 0x0t 0x0t (FPS but not sure if the note 4 can handle higher)
0x2t 0x0t 0x0t 0x0t (Dont touch)
0x3t 0x0t 0x0t 0x0t (Dont touch)
0x0t 0xe8t 0x3t 0x0t (Audio bitrate in bits "see notes below in yellow")
0x2t 0x0t 0x0t 0x0t (Dont touch)
0x80t 0xbbt 0x0t 0x0t (Sampling rate in hz "see notes below in Green")
.end array-data
0x40t 0x66t 0x3t 0x1t = 0x136604 = 1271300 = 12Mbits
so
0x80t 0x84t 0xet 0x1t = 0x1E8480 = 2000000 = 20Mbits
Not sure about this section yet
0x80t 0xbbt 0x0t 0x0t = 0xbb80 = 48000
so
0x00t 0x7dt 0x0t 0x0t = 32000 (According to alexhc18 that decreases background hissing)
Here is what has been accomplished so far:
Version 5
October 25th 2014 - Turned JPEG quality up to 100% from 96% (Verified)
October 25th 2014 - Changed DUAL FHD max record time from 5 minutes to 10 minutes (Tested up to 20 min - Needs more verifications)
October 25th 2014 - Changed DUAL HD max record time from 10 minutes to 30 minutes (Needs Verification)
October 25th 2014 - Changed UHD max record time from 5 minutes to 30 minutes (Appears to stop at 5 Min)
October 25th 2014 - Changed SMOOTH MOTION max record time from 10 minutes to 30 minutes (Needs Verification)
November 1st 2014 - Changed FHD from 20mbit to 40mbit (Verified)
October 25th 2014 - Changed SMOOTH MOTION from 28mbit to 40mbit (Verified)
October 25th 2014 - Changed UHD from 24mbit to 65mbit (Verified)
October 31st 2014 - Themed the camera with transparency set at 30% to make buttons less obvious (v4t).
October 31st 2014 - Themed the camera with a greenish tint and all new icons (v4g - thanks to Kevinoliva113)
November 1st 2014 - Set UHD/WQHD to max record limit of 20 minutes (Verified)
Now coming down the next subject. I need help finding what "sets" the resolution for slowmo, right now the resolution is 1280x720 but I'd like to kick it up to 1920x1080. I think the note 4 should be able to handle that.

Mine

kevinrocksman said:
Mine
Click to expand...
Click to collapse
Hey Kev...I'm here but fear I have very little to add. I'm just getting into smali and decompiling as of the note 3 (and real lightly at that) I am though interested in increasing my knowledge of such things so will add what I can, absorb what I can and help out with what I can. I appreciate your devotion to this project, been watching for some time now and loving the increased quality.

louforgiveno said:
Hey Kev...I'm here but fear I have very little to add. I'm just getting into smali and decompiling as of the note 3 (and real lightly at that) I am though interested in increasing my knowledge of such things so will add what I can, absorb what I can and help out with what I can. I appreciate your devotion to this project, been watching for some time now and loving the increased quality.
Click to expand...
Click to collapse
Alexhc18 wrote this a long time ago for the exynos version, maybe u could take a look at it and see what he did to enable the "enable take a picture while recording in smooth motion":
Default recording mode is "smooth motion" with posibility to make photos in this mode. To switch to 1920x1080x30 go to settings, video, video size - 1920x1080 (or else).
This version with 4Gb video file size limit, for SD cards formated to fat 32 and internal flash memory:
http://forum.xda-developers.com/attachment.php?attachmentid=2388493&d=1384291954
http://forum.xda-developers.com/attachment.php?attachmentid=2388496&d=1384292045
http://forum.xda-developers.com/attachment.php?attachmentid=2388497&d=1384292117

kevinrocksman said:
I am asking for the help of developers to help me find what is causing the video recording to stop at 3.8GB if the note 4 has this same problem which I imagine it will.
Click to expand...
Click to collapse
Just a longshot here.. and probably completely wrong.. but the whole 3.8gb number made me think of the 4gb limit with 32 bit architecture.
3.8GB would be maximum of ram you could have, therefore maybe its just hard coded to stop there to prevent errors?
I know it saves to disk, but because you can edit video and it has to compress it would require a sizable amount of open memory. If you tried to edit an 8gb video into memory you would have to split it first, and the phone is not designed to do that.
Note 3 was like that too..
Oh and yeah the FAT32 Filesystem on SD cards is going to be an issue as well since by default it will write to the memory card if one is inserted.

louforgiveno said:
Hey Kev...I'm here but fear I have very little to add. I'm just getting into smali and decompiling as of the note 3 (and real lightly at that) I am though interested in increasing my knowledge of such things so will add what I can, absorb what I can and help out with what I can. I appreciate your devotion to this project, been watching for some time now and loving the increased quality.
Click to expand...
Click to collapse
chaosrecords said:
Just a longshot here.. and probably completely wrong.. but the whole 3.8gb number made me think of the 4gb limit with 32 bit architecture.
3.8GB would be maximum of ram you could have, therefore maybe its just hard coded to stop there to prevent errors?
I know it saves to disk, but because you can edit video and it has to compress it would require a sizable amount of open memory. If you tried to edit an 8gb video into memory you would have to split it first, and the phone is not designed to do that.
Note 3 was like that too..
Oh and yeah the FAT32 Filesystem on SD cards is going to be an issue as well since by default it will write to the memory card if one is inserted.
Click to expand...
Click to collapse
I probably should have deleted that part, but what I'm hoping is if someone figures out how to "cut" the video into 4gb sections like "open cam" does"

chaosrecords said:
Just a longshot here.. and probably completely wrong.. but the whole 3.8gb number made me think of the 4gb limit with 32 bit architecture.
Click to expand...
Click to collapse
It's completely wrong. I use exFAT as a filesystem on my 64 GB MicroSDXC card and i have copied over 10-15 GB MKV videos over to the card and have been running them directly on the phone.
The OS is supporting exFAT out of the box, so the filesize shouldn't be a problem as long as you don't use FAT32 filesystem on your MicroSD card.
Now, does anyone know if the internal storage is FAT32 or exFAT?
Because if someone is recording a video via the internal storage while the filesystem for it would be in FAT32, then it's not a suprise why the recording would stop at 4 GB. But if the filesystem on the internal storage actually is exFAT, then it's a limitation on the camera app to automaticly stop when it reaches 4 GB.

Tom-Helge said:
It's completely wrong. I use exFAT as a filesystem on my 64 GB MicroSDXC card and i have copied over 10-15 GB MKV videos over to the card and have been running them directly on the phone.
The OS is supporting exFAT out of the box, so the filesize shouldn't be a problem as long as you don't use FAT32 filesystem on your MicroSD card.
Now, does anyone know if the internal storage is FAT32 or exFAT?
Because if someone is recording a video via the internal storage while the filesystem for it would be in FAT32, then it's not a suprise why the recording would stop at 4 GB. But if the filesystem on the internal storage actually is exFAT, then it's a limitation on the camera app to automaticly stop when it reaches 4 GB.
Click to expand...
Click to collapse
The filesize when recording is set to ffffffff which is 4gb If u try setting it higher then the came4a freezes. I have a 128gb sdcardtl that ive tested this on

kevinrocksman said:
The filesize when recording is set to ffffffff which is 4gb If u try setting it higher then the came4a freezes. I have a 128gb sdcardtl that ive tested this on
Click to expand...
Click to collapse
Yeah. I just did test to be sure, but yeah, it stops recording at 4k and 1440p when the filesize have reached 4 GB (4096 MB) in size even on a MicroSDXC card that have exFAT as a filesystem.
So it's a camera app limitation.
Also, have you tried to remove the whole line of code for the time limit thing on UHD & WQHD video recording on the camera to see it the camera / video recording works that way witout any time limitations?

Tom-Helge said:
It's completely wrong. I use exFAT as a filesystem on my 64 GB MicroSDXC card and i have copied over 10-15 GB MKV videos over to the card and have been running them directly on the phone.
The OS is supporting exFAT out of the box, so the filesize shouldn't be a problem as long as you don't use FAT32 filesystem on your MicroSD card.
Now, does anyone know if the internal storage is FAT32 or exFAT?
Because if someone is recording a video via the internal storage while the filesystem for it would be in FAT32, then it's not a suprise why the recording would stop at 4 GB. But if the filesystem on the internal storage actually is exFAT, then it's a limitation on the camera app to automaticly stop when it reaches 4 GB.
Click to expand...
Click to collapse
Tom-Helge said:
Yeah. I just did test to be sure, but yeah, it stops recording at 4k and 1440p when the filesize have reached 4 GB (4096 MB) in size even on a MicroSDXC card that have exFAT as a filesystem.
So it's a camera app limitation.
Also, have you tried to remove the whole line of code for the time limit thing on UHD & WQHD video recording on the camera to see it the camera / video recording works that way witout any time limitations?
Click to expand...
Click to collapse
That limit is for any video setting even 1080 or slowmo. The line cant be deleted or nill becauwe there are so many lines rhat go off that variable

Tom-Helge said:
It's completely wrong. I use exFAT as a filesystem on my 64 GB MicroSDXC card and i have copied over 10-15 GB MKV videos over to the card and have been running them directly on the phone.
The OS is supporting exFAT out of the box, so the filesize shouldn't be a problem as long as you don't use FAT32 filesystem on your MicroSD card.
Now, does anyone know if the internal storage is FAT32 or exFAT?
Because if someone is recording a video via the internal storage while the filesystem for it would be in FAT32, then it's not a suprise why the recording would stop at 4 GB. But if the filesystem on the internal storage actually is exFAT, then it's a limitation on the camera app to automaticly stop when it reaches 4 GB.
Click to expand...
Click to collapse
Unless samsung would have no way of knowing if teh consumer would use an older 16GB sdcard or upgrade from some POS that used a 2GB sdcard until they could get a newer one they would have to assume some people would use fat32. if there is someone with fat32 then perhaps it was easier for them to code the camera to stop for all storage mediums at 4GB's rather than code their camera app to detect fat32 cards and adjust and then also make sure the file manager app couldnt copy those 4GB files over.

shabbypenguin said:
Unless samsung would have no way of knowing if teh consumer would use an older 16GB sdcard or upgrade from some POS that used a 2GB sdcard until they could get a newer one they would have to assume some people would use fat32. if there is someone with fat32 then perhaps it was easier for them to code the camera to stop for all storage mediums at 4GB's rather than code their camera app to detect fat32 cards and adjust and then also make sure the file manager app couldnt copy those 4GB files over.
Click to expand...
Click to collapse
There is code in there for checking remaining space. Not sure if there is a code to check format though

shabbypenguin said:
Unless samsung would have no way of knowing if teh consumer would use an older 16GB sdcard or upgrade from some POS that used a 2GB sdcard until they could get a newer one they would have to assume some people would use fat32. if there is someone with fat32 then perhaps it was easier for them to code the camera to stop for all storage mediums at 4GB's rather than code their camera app to detect fat32 cards and adjust and then also make sure the file manager app couldnt copy those 4GB files over.
Click to expand...
Click to collapse
This limitation of 4gb, is not Samsung related. This problem occurs with any camera application. And more, it occurs with all (it seems) smartphones android.
This is a Android limitation. Well, i don't know, how it is with lollipop
https://forums.oneplus.net/threads/video-recording-lenght.77539/
http://forum.xda-developers.com/showthread.php?t=2452789
http://forum.xda-developers.com/verizon-lg-g3/help/4gb-video-recording-limit-t2917037
http://forum.xda-developers.com/xperia-u/issues/q-xperia-p-recording-video-t2319334
http://forum.xda-developers.com/showthread.php?t=1599934
http://android.stackexchange.com/qu...ord-a-45-minute-1080p-video-with-external-mic
Surely that is a good hobby for those who want to overcome this limitation. Maybe is nothing more than a hobby.

Well i accomplished 1920x1080 in slow mo but it only works right when at 1/42 speed. 1/4 and 1/8 speed freak out
Here are the videos:
1/2 slow mo 1080: http://youtu.be/SeVldi602nk
1/4 slowmo 1080: http://youtu.be/YSgH2rSCp9g
Not sure why 1/4 freaks out

I figured the slow mo problem out. When recording ar 1/2 speed ur recording at 60fps. When recording at 1/4 and 1/8 it records at 120fps. The phone cant handle 1080 at 120fps

kevinrocksman said:
I figured the slow mo problem out. When recording ar 1/2 speed ur recording at 60fps. When recording at 1/4 and 1/8 it records at 120fps. The phone cant handle 1080 at 120fps
Click to expand...
Click to collapse
Still though, having an option to choose 1080p 1/2 instead of the regular 720p makes a big change.

quadlt said:
Still though, having an option to choose 1080p 1/2 instead of the regular 720p makes a big change.
Click to expand...
Click to collapse
Doing it without breaking 1280x720 is the hard part

Rajada said:
This limitation of 4gb, is not Samsung related. This problem occurs with any camera application. And more, it occurs with all (it seems) smartphones android.
This is a Android limitation. Well, i don't know, how it is with lollipop
https://forums.oneplus.net/threads/video-recording-lenght.77539/
http://forum.xda-developers.com/showthread.php?t=2452789
http://forum.xda-developers.com/verizon-lg-g3/help/4gb-video-recording-limit-t2917037
http://forum.xda-developers.com/xperia-u/issues/q-xperia-p-recording-video-t2319334
http://forum.xda-developers.com/showthread.php?t=1599934
http://android.stackexchange.com/qu...ord-a-45-minute-1080p-video-with-external-mic
Surely that is a good hobby for those who want to overcome this limitation. Maybe is nothing more than a hobby.
Click to expand...
Click to collapse
Wouldnt adding this
SetApplicationAttribute(android:largeHeap,"true ") . no space after true and before " . Its crearing a smily. Ao i just put the space in
To the manifest.xml over come that problem. Or even increasing the internal sd io speed to 4096 ?

gav83collins said:
Wouldnt adding this
SetApplicationAttribute(android:largeHeap,"true ") . no space after true and before " . Its crearing a smily. Ao i just put the space in
To the manifest.xml over come that problem. Or even increasing the internal sd io speed to 4096 ?
Click to expand...
Click to collapse
When u say the manifest file are u talking about in the app? Also there is a ffffffff max limit in the camera app and the problem is there is nothing about ffffffff in 32 bit code so im not sure what to do there

kevinrocksman said:
When u say the manifest file are u talking about in the app? Also there is a ffffffff max limit in the camera app and the problem is there is nothing about ffffffff in 32 bit code so im not sure what to do there
Click to expand...
Click to collapse
Yeah. When you decompile the apps apk.
Oh ok i see. Il try looking into it later. Which of your versions is the most stable ?

Related

[Q] proper 480p and 720p camcorder?

Writing this thread to compile my discoveries about 480p and 720p.
Using asop roms, there's only 480p available... with default camera it kind of lags sometimes...with occasional audio sync issues.... but when i use lgcamera and mono recording with no aac encoding (very bad sound), there's audio issues... framerate can be bad at times though.
using sense roms, 720p never works well.... lags all the time, choppy and audio completely out of sync... 480p also mostly does not work well on default camera...
on lgcamera wth some low aac settings at 480p, you can get decent recordings but if you record for too long, you can have audio sync issues...
with aac disabled, at 480p, recording is decent with no audio sync issues but audio is horrible...
i am using a class 10 kingston sd card.
Can you guys share your experience? i would be satisfied to find the perfect setup for good 480p with good audio .(i know 720p is impossible on htc desire)... thx in advance for your contributions!
i just downloaded sd card tester.. my writing speed is 2.6mb/s and reading speed 9.92mb/s!! it's supposed to be a class 10 card!!! i think i got ripped off??
Take your card in reader if possible and test with crystalmark.
ok thx will try that...
look at that thread : http://forum.xda-developers.com/showthread.php?t=1523018
is there such thread for htc desire?? what the optimal settings for the media_profiles.xml?? does it work with runnymede aio rom?
SD Card Speed Increase!
yeahman45 said:
i just downloaded sd card tester.. my writing speed is 2.6mb/s and reading speed 9.92mb/s!! it's supposed to be a class 10 card!!! i think i got ripped off??
Click to expand...
Click to collapse
A CLASS 10 with only 2.6mb/s write and 9.92 read?!?!?! The read is average but the write is very low.
If you have root access, run this app and you'll notice a huge improvement in SD write and read speeds.
Here is an article on Android Police that shows proof of speed increases: http://www.androidpolice.com/2011/0...-200-with-a-simple-tweak-hands-on-benchmarks/
Here is the app I'm talking about:
https://market.android.com/details?...t=W251bGwsMSwxLDEsImNvbS5zZGluY3JlYXNlLml0Il0.
The performance difference is absolutely stunning.
After, run SD Tools https://market.android.com/details?...1bGwsMSwxLDEsImFsZXMudmVsdXNjZWsuc2R0b29scyJd to check if the speed difference.
You should try to switch the sliders between different values. Each SD card is different and one value may work for somebody but not you. I'm using 4096kb on my Lexar class 10 16GB and I get read speeds of 31mb/s and write speed of 9.2mb/s.

Looking for optimized video recording setup

Hello folks,
I tried to record decent 1080p video on my SGSII. Turned out that really gets a problem.
My device runs on Android 4.0.3 (IML74.XXLPQ) in combination with the Siyah kernel (3.0.32-Siyah-v3.2.5.2+ [email protected] #113). Secondrom is some CM9 ROM.
First, I just tried the stock Samsung camera app, but I can't work with the refocusing. Seems impossible to turn off the autofocus.
Besides that, the automatic white balance is crap. When I run through, wearing an orange shirt, it fu**s up the white balance and the picture gets a blue tint for a few seconds. Presets aren't the best, too.
I tried the ICS camera (while using CM9 secondrom). Same problems, but video stops recording after 16 minutes or so, and it doesn't proceed. I mean, what the f**k?
At this point, I'm looking for a camera app that:
- (optionally) has manual white balance (for me to set it using a white sheet of paper).
- can set the focus to fixed.
- records as long as I want it to, until the memory is full or I interrupt it. (When hitting 4GB, it will have to split, but it should automatically continue recording).
That was when I started looking for good camera apps. I tried some, and the best I could find until now was lgCamera. I used the free variant.
It works mostly like I want it to, though I have to set the white balance to some fixed setting. Focuses and fixes it. Everything seems to be okay.
Then it continuously stopped recording, after 4:17 minutes (@30Mbit/s), or after 1:32 minutes (@100Mbit/s). Looking at the files, it only uses 765 MB before stopping. Remember, it has to run as long as I don't stop it and there's memory left!
Of course, I used the free version, but the Play Store says:
Free version limitations:
-sometimes program shows BUYME dialog.
-program icon with red label FREE.
Click to expand...
Click to collapse
I tried the Pro version, but it keeps stopping.
BUT not enough with stopping recording! lgCamera also freezes some times. Especially while recording at 100Mbit/s (usind only 65) when stopping, it just freezes to death, leaving the phone unusable and I have to reboot. Yup, I waited whole 15 minutes, before I rebooted. I also saw how it worked like it should. Very slow when stopped, but hey, no freezes.
At this point, the app also should:
- never freeze! (Can't be that hard to find for an ex-mainstream phone...)
In addition to all that what I mentioned above, the phone loses battery like hell, of course. So I also look for a ROM which is very stable (!) and also very battery-saving while not limiting power used by the video recording app.
Aaand... And this one is a huge bummer... Absolutely every app with which I recorded produces unbelievable crappy framerates!
I set it to 30fps and I get random sh*t between 25 and 32 fps. This is a big downside, because I really get problems working with it in Adobe Premiere/After Effects and also encoding it. Even if I encode it to a “real” framerate, which all editing programs understand, it's still async!
So after I collected hours and hours of material, I don't really want to encode (assuming it would work) every single video (of whose every single one has a different framerate!), because it would take ages (and, of course, the encoding will cost a little quality)!
At this point, it has to:
- have conform fps output (29.970 or 30.000) or at least another fps which stays the same in every video!
- run on a stable, battery-saving ROM.
I don't need any other apps besides the recording one, because I will edit the video on my computer.
If you have read all this, I hope you also help me out.
Which ROM should I use as a pure video recording ROM?
Which app is a stable one for use on the SGSII and has the features I mentioned above?
Do you have any tips for me, how to get the perfect video?
I really hope anyone will help me with this.
Thanks in advance!
Great post.
I will be recording a conference using my SGS2 but, its a long video and I wanted to recorded without crashing the app after I stop the record as it happen using the deffault camera with ICS 4.0.3
Nice post.
I'm looking for exactly what you had written especially a camera application that can automatically resume recording after it reach 4Gb file limit.
I tried several program such as IgCamera and others application but it won't work.
After googling around and spend about a few hours, I found some methods that might workaround this issue.
A. Month External_sd card to NTFS.
This method might workaround 4Gb limit problem for FAT file system and with this I think that Camera application may not automatically stop when recording video file reach their limit.
From camera behavior , It seem that camera application can record video at maximum size upon maximum size of current file system.
Then , I suggest that if event "Reach max file size" occurred , android system whose monitor events will send some signal and command to stop camera application.
So if I can month external_sd card with NTFS file system , I can workaround this issue.
Unfortunately , After I read several topic and spend a few hours to find out how to month NTFS on my android device.
I'm still no luck . I got "fuse device is missing try modprobe fuse as root" and I read somewhere on internet,
someone said that this message may telling me that my kernel won't support the NTFS month.
Now I'm going to move forward to another kernel that have capable of month NTFS as native and trying to month external_sd in NTFS format in a few day.
B. Modify Camera.apk
This method can workaround 4Gb limit problem for FAT file system If you could modify camera.apk.
by modifying method that will be called when recording file reach 4Gb file limit, adding a few line of code to start a new record automatically. I think that this might work.
Some of xda member (Potatoman and rafalense), had successfully modified bitrate and audio sampling rate of camera application
(http://forum.xda-developers.com/showthread.php?t=1104051)
They grab some camera application for their phone , decompile binary source into .class to locate a sample rate of video. After they found an integer that represent a sample rate of video, they made another decompile binary source into a file called ".smali" with a lot less understandable than a class file then edit it and recompile the program.
But, This method won't only just modify a sample rate of video, we needed to modify some part of method.
Since modify Camera application won't easy like sample rate, you needed to grab your camera application from your phone, decompile a binary source, unsign , sign , compile and etc and it is a long story. So I decided to move to another method.
C. Automatic touch simulate program by period.
This workaround work without modify any of your file format , kernel or anything.
If you could find some application to trig the record button after some period of time. So file size limit event won't occur anymore.
Only concern about this method is automatic touch simulate program may not survive long enough to trig the record button for all day.
I'm finding these kind of application and if anyone whose read this topic and know these kind of application , please let me know.
D. Compile your Camera application from Opensource
This is a last method I will ever choose. This is a really hard method but really easy to explain.
This method is about download sourcecode of your rom , edit camera application at the first place then complie it yourself. Since I din't complete reading a guide for compile a rom , I suggest that inorder to make modified camera application work , you may need to compile all of rom.
From my phone manufacturer(samsung), they had released some sourcecode of for Galaxy S2 ICS ROM
For anyone whose interest please find it in the link below.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Update
Hi , all
I just successfully found a workaround for video file size limit issue.
This workaround is based on approach C. Automatic touch simulate program by period and it also need a root access.
All credit goes to Yahor Paulavets from
http://softteco.blogspot.com/2011/03/android-low-level-shell-click-on-screen.html
To complete this workaround , I write some shell script that send a low-level script via Scripting Layer for Android (SL4A) to stop video recording then send the same command again to start new record before its size reach 4 Gb. After finished writing shell script, I use terminal editor (with root access) to run this script when I start recording video.
That sound easy, but in fact, you need to capture a "touch event" with have difference signature based on the device.
Yahor Paulavets write some great article which explain how to capture this signature in the link below
http://softteco.blogspot.com/2011/03/android-clickonscreenxy-shell-script.html
____________________________________________________________________________________
Below are list of related topic that might help you
[1] Is there anyway around the 4GB video recording limit?
http://forum.xda-developers.com/showthread.php?t=1140483
[2] How to mount NTFS or EXT4 format microSD to tab
http://forum.xda-developers.com/showthread.php?t=1552674
[3] [MOD] Hacked Camera.APK for better audio quality, usage with any battery life & MORE!
http://forum.xda-developers.com/showthread.php?t=1104051
[4] App for long video recording
http://forum.xda-developers.com/showthread.php?t=1471449
[5] How can I bypass the 4gb limit on filesizes for HD Recording?
http://forum.xda-developers.com/showthread.php?t=1130973
[6] Month ExternalSD Card to NTFS for Android
http://forum.xda-developers.com/showpost.php?p=15167790&postcount=41
[7] Samsung opensource
http://opensource.samsung.com

[Q] Change Camera Video Bit rates

Hi
I want to know how to change de default values from the camera in GB
Im on XGAMER V2.0 but for me the bitrates are way too overkill, so i want to know how to change them to:
720p - 7.5 Mb/s
FWVGA - 3.5 Mb/s
VGA - 2.5 Mb/s
Ive tried modifying the values in the default_settings.xml, but it has no effect, and Ive been searching too, but, i dont know if im doing it wrong but i cant find anything about it, at least not for GB (There is a solution but is for the cyber shot mod).
I really appreciate your help, because the rom is almost perfect, except for (at least for me) the bitrates.
And sorry about my english =P
thanks
__________________________
My device is a xperia arc S, kernel doomlord v22, baseband 36
U can use LGcamera Pro
Sent from my LT15i using xda premium
zippii said:
U can use LGcamera Pro
Sent from my LT15i using xda premium
Click to expand...
Click to collapse
I'll try it
But, what i meant was that if a developer can ajust this values for an "improvement" in their rom, i can (at least) give it a try. I just havent found any file that have those values (the video bitrates). And that is what i want, to find and change the values for fwvga to not more than 3.5 mbps
Thanks
I have modified my /etc/media_profiles.xml to get lower bitrate and 864x480 size video with 16:9 ratio.
EDIT: I'm on Super Jelly Bean ROM - don't know about GB.
jtmnt said:
I have modified my /etc/media_profiles.xml to get lower bitrate and 864x480 size video with 16:9 ratio.
EDIT: I'm on Super Jelly Bean ROM - don't know about GB.
Click to expand...
Click to collapse
Yeah, ive tried that, but still nothing. But, exactly, what lines did you changed?
Hi,
Sorry for late reply, have been changing roms. Here's what I just changed in latest rom (LegacyXperia 4.2.2):
In /etc/media_profiles.xml look for a comment saying "Profiles for the back camera".
EncoderProfile section after that is commented out - between <!-- and -->
Remove the comment tags from beginning and end. Then modify values to your needs.
Code:
<EncoderProfile quality="720p" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="4000000"
width="864"
height="480"
frameRate="30" />
<Audio codec="aac"
bitRate="128000"
sampleRate="48000"
channels="2" />
</EncoderProfile>
I set bitrate to 4000000, width to 864, height to 480.
Thats it. Reboot and enjoy 16:9 ratio videos. Camera thinks its 720p, though it's not
But my TV plays it nicely, no freezes, quality OK.
17th_angel said:
Hi
I want to know how to change de default values from the camera in GB
Im on XGAMER V2.0 but for me the bitrates are way too overkill, so i want to know how to change them to:
720p - 7.5 Mb/s
FWVGA - 3.5 Mb/s
VGA - 2.5 Mb/s
Ive tried modifying the values in the default_settings.xml, but it has no effect, and Ive been searching too, but, i dont know if im doing it wrong but i cant find anything about it, at least not for GB (There is a solution but is for the cyber shot mod).
I really appreciate your help, because the rom is almost perfect, except for (at least for me) the bitrates.
And sorry about my english =P
thanks
__________________________
My device is a xperia arc S, kernel doomlord v22, baseband 36
Click to expand...
Click to collapse
hi. GB doesn't read media_profiles for bitrates. It's in the camera apk. If you want you may try Modded stock Camera 6mbps
zgmfx20 said:
hi. GB doesn't read media_profiles for bitrates. It's in the camera apk. If you want you may try Modded stock Camera 6mbps
Click to expand...
Click to collapse
Thanks
Ive open the apk in winrar to see if there ir a file with the bitrates but i havent found it. I think that the values are in hex but i need to know first which file or line is...
Thanks again
17th_angel said:
Thanks
Ive open the apk in winrar to see if there ir a file with the bitrates but i havent found it. I think that the values are in hex but i need to know first which file or line is...
Thanks again
Click to expand...
Click to collapse
You have to decompile the APK file to read the XML files.

video recording - 4GB limit

Hello.
Is it possibile recoder more 4GB size videos?
I've tryied with default camera app, but record stops after 4GB (about 33 minutes at 1080p).
I've tryied both on internal memory and 64 GB microsd class 10 (formatted in EXFAT).
How can i remove this limit?
Thanks
I think using an external sd card formatted in ext3/4
exfat supports files larger than 4GB so its not a file system limit.
Might be a firmware limit, something can be modified in the build props maybe ?
I think there's a 32 bit limit in the H.264 codec or MP4 container spec that causes this limit.
I just wonder how on Earth you need to record for +30 minutes/4 Gb video.
http://forum.xda-developers.com/showthread.php?t=2485063
Thanks. So, no solution with default app camera?
The only solution is open camera?
Thankd
Hi, don't know exactly what open camera does, but if it stops and restarts automatically (that's what I read), there's a better solution.
On the G4, camera fv-5 has no recording limit (one file).
I recorded 1080p continuously over an hour at 34mbits/s, file size around 15Gb on my external exfat 32Gb sdcard.
Sadly camera fv-5 doesn't support 4K video recording (hope it does in the near future).
bel57 said:
I just wonder how on Earth you need to record for +30 minutes/4 Gb video.
Click to expand...
Click to collapse
WHY ? I record my whole fishing day almost every time, so if you dont use it, others maybe do.
bel57 said:
I just wonder how on Earth you need to record for +30 minutes/4 Gb video.
Click to expand...
Click to collapse
Uses are many: road trip, family preparing the Christmas tree or just gathering, fixing something in your car / home then editing and uploading to YouTube to help others, framelapses *with sound*, session with grandma talking about ancestors, are just a few examples.
That's how on earth.
The fact you don't do these things doesn't keep others from doing them.
I just hit the same problem as it divided my video into 4 segments
So no solution for this i guess?
It look liked it collected the 4 into one file but when i sent it to youtube it only sent one segment of the total. *Sigh*
---------- Post added at 04:02 PM ---------- Previous post was at 03:59 PM ----------
Anyone knows how one can change the camera on the fly? Seems facebook can do it so why not the camera program?
Even my old Note 2 could do that feature.
Okay so I tested it with Open Camera to see if it was Android itself or the Stock Camera App. And Open Camera just continues to record I made a 14,5 GB file recording. So... The problem of cause is Open Camera have other issues like not wanting to record in 60 frames. So I'm going to delete it again and go back to stock so not to be confused with 2 Camera programs.
So I found a solution for gluing the video files together easy - the free Program is called AviDemux and it is very easy to just glue it all together and quickly have a file ready. It seems to just fix them together without recoding it all which can take a long time and I tried another free program, openshot which took a very long time to recode it all and had issues with the sound. You need to set it up by Frames and so forth and some times you just don't get the same number of Frames Per Second when recording on the mobile.
But AviDemux did it nicely - very nice program for doing it - you just load the first main file *Control O* and then attach one file after another to and let it fly. Control A to attach another file.
Output MP4V2 muxer or Mkv muxer

8k only 6min record

hi how i cam remove this 6min limit on 8k record
gcam or eny other software can do this?
or at list a automatics app that record 6min several time ?
plz help me thx
help me plz
While I do not have a source for this information handy I can remember that a review was pointing out that the lenght/time for 8k recording is limited due to available RAM or rather due to UFS 3.1 limited write rate.
But we can calculate things by our own:
If I'm correct UFS 3.1 is able to write like 1 GBps (on paper).
In reality an avarage 8k video recording with this phone is consuming ~1GByte per minute (what is ~16Gbps). A huge difference when it comes to writing on UFS 3.1 storage.
So we have the RAM only. RAM is full in like 8 minutes for 8 GB (in theory). Practically we have like 6GB as RAM buffer available (2GB for system). So you've got your 6 minutes in total. There is no "hack" available. oO
I hope I did not miss a thing within my simple calculations. ;D
I also think that there was a limitation also on 4k video recording which was about 4GB of video.
So what can i do to record more than 10 min in 4k gcam can do that ?
You can't do anything as this is an Android limitation in the system itself. If you need to record longer use 1080p mode.
1080p has no detail .. is there any thing else i can use ?
maybe a 3rd party app that can handle it
frozenline said:
1080p has no detail .. is there any thing else i can use ?
maybe a 3rd party app that can handle it
Click to expand...
Click to collapse
It's a hardware limitation, no app will do it. The phone's storage can't write as fast as the 8K camera spits out the video so it gets temporarily stored in RAM until you reach the limit, then, when the camera stops recording, it gets transferred to storage.
Unless you find a way to "add more RAM" or make your phone's storage "as fast as RAM" which you can't, then you are stuck with either 6min of 8K (which the phone doesn't do 8K really, it's supersampled 6K) or buying a purpose-built actual 8K camera.
With zram i can use more ram from the ufs 3.1
You know that zRAM is not "real" RAM? It's UFS and its slower then RAM. Beside that UFS 3.1 has a small amount of Cache (SLC) to reach those write speeds mentioned. So that is basically a burst speed for a short period of time to reach the 1GBps. Nonetheless its much slower then "real" RAM.
LPDDR - Wikipedia
en.wikipedia.org
Universal Flash Storage - Wikipedia
en.wikipedia.org
Memory bandwidth - Wikipedia
en.wikipedia.org
Just compare their Bandwidth (theoretical values). 1450 MB/s vs. 6400 MT/s.
While I'm not a hardware guru esp. when it comes to phone hardware. I'm pretty sure that there are other limitations as well beside the capabilities of the memory.
I bet there are other issues too. E. g. heat management (-> cpu throttling) or the battery also (not only the heat but drain, long time durability also).
thx for your answer bro
so there is no way to get more
i wish this phone has a sound to end of video so i know when its over and start next Trak automatically
frozenline said:
i wish this phone has a sound to end of video
Click to expand...
Click to collapse
You could use the clock functionality and set the timer to like 5:30 just before you start filming. On the other hand there is a timer running on the left side of the camera. ^^

Categories

Resources