BEFORE YOU READ ANY FURTHER, THIS MOD/PORT (WHATEVER) WILL PROPABLY ONLY WORK ON RED LENSED DEFYS! SORRY BUT IT SEEMS TO BE A HARDWARE THING! AND THERE ALSO MIGHT BE THE SLIGHT POSSIBILITY THAT IT IS LIMITED TO 3.4.2_145-003 VERSION ONLY! (AT LEAST THIS IS THE VERSION HANCOCKS ROM IS BASED ON AND THE SAME I TESTED IT WITH)
to make it short, i (kind of) ported the 720p recording capability of hankocks rom 1.11 to pays rom 3.3 (based on 3.4.2_145-003).
first of all, I AM NO DEVELOPER! so all props go to hankock! what i did was the following:
i took all the libs from hancocks rom which had something to do with camera & encoding (as you can see, not a very devlike procedure) and put them into my system/libs. then i took media_profiles.xml from hancocks rom and put it to my system/etc (of course i changed back permissions afterwards). first i used hancocks patched stock camera app and merged my and his build.prop so that the whole thing would run on my rom. and it worked perfectly. but this solution has 2 drawbacks:
1. hancock used 3gpp container, which is imho inferior to mp4
2. the audio encoding is very bad (amr_nb, 8kbps)
then i found out, that if i used lgcamera instead i would't need to change build.prop anymore and it still worked fine. besides of that, lgcamera is much more customizable settingwise. and by not modifying build.prop, i hope to enhance compatibility of this mod to other froyo versions.
and that is what my package contains:
-all libs with "enc", "cam", "camera" in therr names from hancocks rom (i know, i'm an amateur )
-media_profiles.xml from hancocks rom
-lgcamera 5.25 (free) btw. it works with the latest pro version from the market too
please use tenfars clockwork mod or other custom recovery to flash this update.zip. the built in original recovery won't work (doesn't accept signature). BEFORE YOU START, DON'T FORGET TO MAKE A NADROID BACKUP!!!
here you find an untouched video sample: http://forum.kut-btu.de/video/VIDEO00017.mp4
([email protected],8fps, mp4-container, video: [email protected]~10000kbit/s, audio: [email protected]/s, 44khz)
i know, seems very choppy but this is because i was walking constantly. framerate is quite good. my defy runs at 1,2ghz but i tested 720p rec @ 800mhz too and it worked the same. it might be necessary to apply sdcard read_ahead_kb patch (mine runs at 2560 kb instead of 128) to avoid slow framerate effect which could be observed on hancocks rom.
sadly, recording with .h264 codec is still not possible (and i doubt it ever will). hence the resulting video is no match for the 720p recordings of e.g. the samsung wave but imho it is still a lot better than stock and looks almost great
now i leave it to the real devs to optimize this, whatever it is.
DISCLAIMER:
I WILL NOT BE HELD RESPONSIBLE FOR ANY DAMAGES RESULTING FROM THIS MODIFICATION!
/edit:
mod works fine on the following froyo versions:
-3.4.2-117
-3.4.2-145 (as the mod comes from this version)
-3.4.2-155
mod doesn't work on:
-3.4.3-11
strange behavior detected:
after recording in 720p dmesg shows:
Timed out waiting for DSP suspend 3
pm_op()latform_pm_suspend+0x0/0x54 returns -1
PMevice C6410 failed to suspend:error -1
PM:Some devices failed to suspend
Click to expand...
Click to collapse
don't know, which impact this has on battery drain. after fresh reboot and w/o recording in 720p this problem doesn't show up.
Thnaks for this - i'll have a play with it later today
It works with Barebones 1.4... when im recording it seems little bit choppy, but playing it in MoboPlayer is good (smooth, maybe not 30 fps but its good!).
Thank you!
Antszej said:
It works with Barebones 1.4... when im recording it seems little bit choppy, but playing it in MoboPlayer is good (smooth, maybe not 30 fps but its good!).
Thank you!
Click to expand...
Click to collapse
great! since Barebones 1.4 is based on CEE 3.4.2-155-002 Deblur, we can add it to the compatibility list.
yes, the recording view seems choppy on my system too, but the resulting video is quite smooth (~23-24fps).
http://www.multiupload.com/APEW3UPMI0
Here is the sample.
juuu
I want this for green lens...
insestito said:
juuu
I want this for green lens...
Click to expand...
Click to collapse
sorry. i believe that 720p recording isn't impossible for green lense models. but i do believe that this patch based on hancocks mod will do the trick only for red lens defys. because it isn't just the color of the lens but a totally different sensor. perhaps someone figures out a mod for green lenses too.
But official Froyo is near, just wait, it should have 720p recording for EVERYONE.
I compare it to xd1 ROM files, and find the different files are,
720p_mp4venc_sn.dll64P
libOMX.TI.720P.Encoder.so
libOMX.TI.JPEG.Encoder.so
libOMX.TI.mp4.splt.Encoder.so
libOMX.TI.Video.encoder.so
Hope it can reduce the update size.
Antszej said:
But official Froyo is near, just wait, it should have 720p recording for EVERYONE.
Click to expand...
Click to collapse
what leads you to this assumption?
sunoldman said:
I compare it to xd1 ROM files, and find the different files are,
720p_mp4venc_sn.dll64P
libOMX.TI.720P.Encoder.so
libOMX.TI.JPEG.Encoder.so
libOMX.TI.mp4.splt.Encoder.so
libOMX.TI.Video.encoder.so
Hope it can reduce the update size.
Click to expand...
Click to collapse
feel free to modify the package everyone... my work is done
Worked like a charm for me, thanks!
ToTTenTranz said:
Worked like a charm for me, thanks!
Click to expand...
Click to collapse
u r welcome
Yep it works here too but i cant see much difference between WVGA and this 720p..its almost the same. Is there any app on market that has continuous autofocus while recording video(like barcode scanner) ?
I'll create this patch for the green lens?
insestito said:
I'll create this patch for the green lens?
Click to expand...
Click to collapse
is this a statement or a question?
derbestimmer said:
is this a statement or a question?
Click to expand...
Click to collapse
Question for you or any Dev, sorry...
Google translator is very bad...
insestito said:
Question for you or any Dev, sorry...
Google translator is very bad...
Click to expand...
Click to collapse
i don't think i will be any helpfull, cause i'm no dev. i just took the work of a dev and ported it to another rom. sorry. perhaps someone else is able to do it.
My problem with Hancocks ROM is that lgcamera records very light sound, no matter what encoding I chose (AMR_NB, AMR_WB or AAC). I am not even sure the software records sound on defy with encoding as AMR_WB and AAC.
Video works ok with MPEG4 encoding though with twp slight issues. One is video file bitrate is not the same as configured in lgcamera settings. The other one is framerate is always below 25 - not sure if SD card speed is the bottleneck.
shural said:
My problem with Hancocks ROM is that lgcamera records very light sound, no matter what encoding I chose (AMR_NB, AMR_WB or AAC). I am not even sure the software records sound on defy with encoding as AMR_WB and AAC.
Video works ok with MPEG4 encoding though with twp slight issues. One is video file bitrate is not the same as configured in lgcamera settings. The other one is framerate is always below 25 - not sure if SD card speed is the bottleneck.
Click to expand...
Click to collapse
with light sound, do you mean quiet or bad quality? strange when i set lgcamera from amr_nb to aac, it does use this codec at least the resulting video shows this in codecinfo. and i think the sound quality is slightly better too compared to amr. concerning the other two issues, i have the same experience. the framerate never goes over 23,9fps and when i force it to 25 or even 30, lgcamera won't start recording. youre right the bitrates of the resulting video are mostly lower then the bitrates chosen in lgcamera. 13 prduces ~10, 10 produces ~8 and 8 produces ~6 mbps. but imho there is a difference visible between 13 and 8mbps respectively 10 and 6 in the resulting video. at least on the computer you can see the difference.
Sent from my MB525 using Tapatalk
Related
China 2.2 Rom missing some file for 720P
libOMX.TI.720P.Decoder.so and libOMX.TI.720P.Encoder.so
I attached files from Milestone 2:
Maybe sombody have an idea to get 720P on Defy
http://webcache.googleusercontent.c...torola.com/message/307129+&cd=6&hl=de&ct=clnk
from BizzaBoy @ supportforums.motorola.com
"The DEFY camera modules is able to do 720p. It's a MT9P012 according to the boot log.
Looking at the kernel sources on opensource.motorola.com (drivers/media/video/mt9p012.c), there is a FRAME_1296_30FPS mode supported which reads in a 1296x972 frame that would be cropped down to 1280x720. From the code it appears that those smaller modes are achieved by skipping pixels. This also explains why there is no 720x480 mode, just a 648x486 internal mode.
Ok, next looking at TI's OMAP3 literature, it says that it can do up to 720p HD.
So at the end of the day the DEFY *should* do 720p, and a 2.2 update *might* enable that.
I personally would be extatic to have 720p. The DEFY is really mindblowing as a allround device, where I can record videos on our weekly ski-trips, but 640x480 @30fps really, really sucks. 640x480 @60fps would be great, or 720p @30fps. Overall the camera/camcorder interface needs some substantial work. You cannot switch to a explicitie white balance (only auto), which is a pain if you record video where the lighting changes and the camera software tries to readjust the white balance. The other thing that drives me nuts is that you cannot adjust the image quality settings for the jpeg encode. "
humm i'll check it too
walter79 said:
I found this in china 2.2 Rom.
/etc/cameraCalDef5M.bin and /etc/cameraCalDef8M.bin
Did Defy maybe have 8 MP Camera like Milestone XT720?
I renamed ...CalDef8M to CalDef5M and replaced the original 5M.bin
Camera is a bit faster.
I will search for a better camera app.
Click to expand...
Click to collapse
This is crazy!! all the stuff cpu overclock 1200Hz, Camara 8 MP, and Gpu!!
Fabulous!!
walter79 said:
I found this in china 2.2 Rom.
/etc/cameraCalDef5M.bin and /etc/cameraCalDef8M.bin
Did Defy maybe have 8 MP Camera like Milestone XT720?
I renamed ...CalDef8M to CalDef5M and replaced the original 5M.bin
Camera is a bit faster.
I will search for a better camera app.
Click to expand...
Click to collapse
Are you sure that quality of photos is better now? Have you seen if the resolution is bigger(in details, after take a photo)?
Sent from my MB525 using Tapatalk
aikidoka90 said:
Are you sure that quality of photos is better now? Have you seen if the resolution is bigger(in details, after take a photo)?
Sent from my MB525 using Tapatalk
Click to expand...
Click to collapse
Resolution is not bigger in default Camera.App But in my opinion cam is a bit faster.
I've taken 2 photo before and after renaming file, and i get the same photo, with same specification and resolution.
I've also tried with Pro Zoom Camera 5X and with Vignette, i get the same picture...
So i think we have "only" 5Mo in hardware...
Ok, it a 5MP Cam but 720p should possible.
Have a look to this page. (only google cache)
http://webcache.googleusercontent.c...torola.com/message/307129+&cd=6&hl=de&ct=clnk
"The DEFY camera modules is able to do 720p. It's a MT9P012 according to the boot log.
Looking at the kernel sources on opensource.motorola.com (drivers/media/video/mt9p012.c), there is a FRAME_1296_30FPS mode supported which reads in a 1296x972 frame that would be cropped down to 1280x720. From the code it appears that those smaller modes are achieved by skipping pixels. This also explains why there is no 720x480 mode, just a 648x486 internal mode.
Ok, next looking at TI's OMAP3 literature, it says that it can do up to 720p HD.
So at the end of the day the DEFY *should* do 720p, and a 2.2 update *might* enable that.
I personally would be extatic to have 720p. The DEFY is really mindblowing as a allround device, where I can record videos on our weekly ski-trips, but 640x480 @30fps really, really sucks. 640x480 @60fps would be great, or 720p @30fps. Overall the camera/camcorder interface needs some substantial work. You cannot switch to a explicitie white balance (only auto), which is a pain if you record video where the lighting changes and the camera software tries to readjust the white balance. The other thing that drives me nuts is that you cannot adjust the image quality settings for the jpeg encode. "
Kernel: https://opensource.motorola.com/sf/go/projects.moto_defy/frs.defy_latam.jorla_u3_6_14_5
Good, there is still a chance we could get 720p camcorder at some point, since both 3630-800 and MT9P012 are capable of it.
wow seems amazing
Have you get it work?
djsven said:
Have you get it work?
Click to expand...
Click to collapse
Have no time more testing this.
Our Camera component can't take pictures biggers than 5M, in the other thread that tal about 720p we can found the URL of datasheet component. Here I will try to paste it (remmember, buy a beer to BizzaBoy! )
trulydisplays. com/ccm/specs/5.0M%20Sensor%20Aptina%20MT9P012%20Spec.pdf
As I wrote , Acer Liquid use the same camera (MT9P012).
But no 720p for liquid but I think Liquid Steam has same camera with 720p support.
Hope this one help..
Thank you for working for us
what's next? i mean, to get VGA @ 120FPS or HD working?
I think must be easy modify the Android Kernel to accept the 120FPS but will be more complicated hack the Camera.apk to add this feature.
I would start to hack for HD Video. Maybe will be complicated for the Kernel but easaly for the application.
i will donate, if this works good
Thanks for your job master!!! i love you!!!!!!!
demolition23 said:
As I wrote , Acer Liquid use the same camera (MT9P012).
But no 720p for liquid but I think Liquid Steam has same camera with 720p support.
Hope this one help..
Click to expand...
Click to collapse
Yes, acer liquid stream is able to record video at 720p...and if it has the same camera, is a good new for us
aikidoka90 said:
Yes, acer liquid stream is able to record video at 720p...and if it has the same camera, is a good new for us
Click to expand...
Click to collapse
And here is the rom dump
http://www.megaupload.com/?d=UFO2LEVV
pls someone take a look..
Please reupload!
Link is no available
Hi,
I'm the developer of Videocam illusion app. I have just checked a problem with SE X10 audio recording speed (supports only 48.000 Hz recording). I will release a fix ASAP.
Regards,
Mobileillusion
EDIT 2:
I have just released version 1.5 of "Videocam illusion". I hope the audio recording problem of the previous version was fixed for the Xperia X10.
I have upload the apk, but I would prefer that you download it (and rate if you like) from the Android Market:
https://market.android.com/details?id=com.androidillusion.videocamillusion
Thanks for your support!
What's new on version 1.5
- New user interface
- Optimized video player
- New retro filter: Chicago
- Animated mask: 8mm
- More filters/effects/masks: color, blur & white border
- Adjustable filters & effects
- Front camera support (Android 2.3+ required)
- Zoom (if supported)
- Ready for Tablet
EDIT: Here the SE X10 bugfix release (with 48 KHz recording)
Thanks, I guess most of us have been wondering why the sound sounds like chipmunk/accelerated and so does the video.
excuse my English. take this opportunity to ask if there a way to increase the recording frames. In fact, when I started recording 15 fps, but after a few seconds down to 5-6 .... tanks
Hi,
Thanks for your application encd for your replay ....
I just wonder if it would be possible to have the video encoded not only in MOV but in MP4 and/or 3gp formats in order to be also enclosed in MMS ?
Regards
Hi again,
thanks for the feedback. I have changed the recording freq to 44.100 Hz.
Could you tell me if now is working propertly?
About the questions...
The app records MOV files (MJPEG format). I have developed the MJPEG encoder/decoder. The frame rate drops while recording because each frame must be encoded. I think I could speed up a little, but not a lot.
About MP4/3GP format Android Multimedia API doesn't support direct frame encoding to video. :-(
I'm working on a MP4 encoder, but right now speed sucks. I will try to optimize.
Regards,
Mobileillusion
Hi
I will test it in few minutes and let you know what are my impression
Regards
Is this the latest version? I just download videocam illusion from market today...it show version 1.o..
Getting between 7-13fps only 640x480
Sound still abit chipmunky but it's better than before. Hopefully you can update it again
Hi,
the atached file is a "SE X10 bugfix" version (1.0.1). I will release a new version in the Market with audio recording freq selector (not only 44.100 Hz) the next week.
Feel free to let us test out your pre-release and provide feedback to you
Dev, thank you for working on this. Much appreciated
Sent from my X10i using XDA App
Mobileillusion said:
Hi again,
thanks for the feedback. I have changed the recording freq to 44.100 Hz.
Could you tell me if now is working propertly?
About the questions...
The app records MOV files (MJPEG format). I have developed the MJPEG encoder/decoder. The frame rate drops while recording because each frame must be encoded. I think I could speed up a little, but not a lot.
About MP4/3GP format Android Multimedia API doesn't support direct frame encoding to video. :-(
I'm working on a MP4 encoder, but right now speed sucks. I will try to optimize.
Regards,
Mobileillusion
Click to expand...
Click to collapse
Tested
frame rate around 10-15 at 640x480
sound not perfect but much better
Thanks ...
as said an MPEG encoder would be much apreciated
Is this a patch which makes the free and pro version better or is it just a new free version?
ffortissimo said:
Is this a patch which makes the free and pro version better or is it just a new free version?
Click to expand...
Click to collapse
it is only a 44.100 Hz recording patch free version. I will update the Market versions (free/pro) with frequency selection ASAP.
Thanks for all the feedback!!!
X10 is screaming "i'm aliveeeee!!!!!"
thanks bro!
Well, you said Android's framework for 3rd party apps doesn't support direct frame encoding. Right?
Then what about using superuser to get over this framework?
All firmwares here are pre-rooted, so this wouldn't be a problem.
Adolf1994 said:
Well, you said Android's framework for 3rd party apps doesn't support direct frame encoding. Right?
Then what about using superuser to get over this framework?
All firmwares here are pre-rooted, so this wouldn't be a problem.
Click to expand...
Click to collapse
Hi Adolf1994,
you're right, direct frame video encoding is not available for 3rd party apps.
I have to investigate the Android source code to see how to directly access the encoder.If anyone can help me would be fine.
Regards
Much better, but it still takes the sound up a bit, maybe go up to 44.1Khz? Unless thats what was making it go up. Then i guess take it down.
Sent from my X10a running cm 6.1.3 V4.3 with included arc launcher.
Realorasz said:
Much better, but it still takes the sound up a bit, maybe go up to 44.1Khz? Unless thats what was making it go up. Then i guess take it down.
Sent from my X10a running cm 6.1.3 V4.3 with included arc launcher.
Click to expand...
Click to collapse
Hi Realorasz,
I have checked the problem and you're right. I think 8000 Hz works better (with no speed up), but also 48 KHz.
I will release a "quick version" soon.
Thanks!
PS: I'm right now also working on a full resolution image viewer "Gallery illusion HD" that supports big "jpgs" and displays pictures with no quality loss. Now is in public beta and can be download free on the Android Market. Any feedback would be appreciated.
Good to know
Hopefully make full use of the 720p camcorder once you're able to fully use the encorder, hopefully the ROM devs here can help you out.
I stumbled across this video created by khalpowers on the XT720:
http://vodpod.com/watch/5015769-hd-recording-30-fps-xt720
This tells me that it's possible to get 30FPS out of this phone. Mine is only recording at 21fps according to Windows.
Will using one of khalpowers' ROMs fix my camcorder app?
I've tried the lgcamera app and I still get only 21FPS.
If any of you have any insight into this I would really appreciate it.
So I installed khalpowers' camera update and things seem smoother now, but I don't get 30fps. In Fraps I'm getting between 21fps and 24fps. It's better than it was before, but still not quite as smooth as I would like. The shutter lag in the camera is also better after the update.
Is this phone even capable of 30fps at 720p? The specs seem to say it can only do 24fps.
It can only do 24 FPS.
try khals video settings in lgcamerapro app. it allows for recording in 30fps.
SickBeast said:
I stumbled across this video created by khalpowers on the XT720:
http://vodpod.com/watch/5015769-hd-recording-30-fps-xt720
This tells me that it's possible to get 30FPS out of this phone. Mine is only recording at 21fps according to Windows.
Will using one of khalpowers' ROMs fix my camcorder app?
I've tried the lgcamera app and I still get only 21FPS.
If any of you have any insight into this I would really appreciate it.
Click to expand...
Click to collapse
It turns out that the FPS thing is really difficult to evaluate. This is because the phone records variable bit rate. The actual rate recorded seems to depend on how much light is hits the camera sensor (i.e. brighter scenes get higher framerates and darker scenes get lower framerates which makes sense to me).
To make things even more confusing the file contains a number as a "guesstimate" of the frame rate. This guesstimate is what most programs show. Unfortunately, the guesstimate seems to be incorrect most of the time. IIRC the only thing we found that seemed to show us the actual framerate was Windows Media Player in Windows 7.
There's a lot more about this in Dexter's stock221v13 development thread. Page 126 of that thread seems to be in the middle of it http://forum.xda-developers.com/showthread.php?t=939644&page=126 I think it started here: http://forum.xda-developers.com/showthread.php?p=11630078#post11630078 but it's really spread out.
Can someone post a link to kahl's camera update and khal's LGCamera settings. And should I apply the update if I'm running StealEpicBlue, or the ROM already has the update?
Thanks.
Even with lgcamera and khal's settings, the files are still not 30fps. Even watching his sample videos, they don't look any smoother than what I'm getting with his "fix" installed on the default camcorder app.
Anyhow, I can live with 24fps. I just wanted to know if 30fps was possible, and it seems as though it's not.
Thanks everyone for your input.
Perhaps khal can chime in and confirm that his files are indeed 30fps. IMO Fraps is a good way to verify it.
Higher rate on xt just 24fps.....that video from eclair..now can produce better than that with airplane mode ..
So............... does we have Camupdate on StealEpicBlue or not?
Thanks.
yes..complete patches included with cam update...
khalpowers said:
yes..complete patches included with cam update...
Click to expand...
Click to collapse
That's why we all ♥ U!
On stock 2.1.1, I did that :http://forum.xda-developers.com/showthread.php?t=1088297
but, I mean it's already done in khalpowers ROM
Can someone post the best settings for LG Camera, please?
Thanks in advance.
This first post from me is going to be short. I welcome additional thoughts, of course. Sorry if this isn't the best place to drop this, but it's not a question and it's not anything in development!
First, an observation: the problem with 720p in CM10 is not bright light, it's the camera's ability to adapt to bright light from low light. In other words, the problem seems to be related to the light sensor. Although this is not completely new, what I noticed from playing around with LGCamera is that if I turn UP the video bitrate, the flickering is not as sever. The flickering will stop and stabilize when filming in consistent light. Any change in light quality will produce more sticking. This makes sense since 720p requires finer adjustments to light and dark than 420p. The other part of the equation is the h264 encoder. I'm guessing that certain values in the light sensor need to match up with the h264 encoder...
Second, I was playing around with these settings today: http://forum.xda-developers.com/showpost.php?p=17791551&postcount=20 I haven't had enough time to verify what makes a difference and what doesn't. I believe that some settings have helped a bit. Also, I felt that changing the ISO to 800 in camera and then switching to video improved the video, but that could be totally imagined! Essentially, what we need is ISO800 for the vidcam... I think!
Suggested fix that was here didn't work. I'm editing to see if I can correct the "Invalid User ID" error I keep getting on my XDA app. Started right after I went to correct this message.
if you think you have found a fix i'd suggest bringing it to the developer's attention, such as indeed posting this in the official thread.
Also your second post got chopped off lol
threi_ said:
if you think you have found a fix i'd suggest bringing it to the developer's attention, such as indeed posting this in the official thread.
Also your second post got chopped off lol
Click to expand...
Click to collapse
I'm just messing around right now. I don't think I've found a fix. A few things I've found: I can't find a way, using the included camera, to film above 25 fps. It doesn't matter what the settings are in media_profiles.xml, 25 is the cap. The cap should be a little above 30. I also can't force the camera to film above a bit rate of 6 Mbits/sec. I averaged around 8 Mbits on the stock camera and 10 in LG camera on GB. These settings will affect light responsiveness! Perhaps the oddest thing I've noticed is that the recording streams are inverted in JB. Everything I've filmed in GB has audio in stream 1 and video in stream 2. JB's streams are the other way around. EDIT: In fact, in GB 480p recordings use Stream 1 (or 0, depending on your player) for video and stream 2 for audio, but 720p recordings use Stream 1 for audio and Stream 2 for video. So, perhaps it's worth looking into the ways in which 720p recording is being "sent" to the codec.
In the process of sorting these things out, it would help if we could find out what the AVC h263 and MPEG4 profiles and levels were in GB. I'm not completely convinced that they are configured optimally for our phone.
[To Forum Mod: Is it possible to move this thread elsewhere? Possibly the Q&A section?]
I've spent more time on this than I intended today, so this will be brief(ish). I don't know if I've found a fix, but I may have discovered a good lead. This is definitely for people who can put together and test out kernel changes faster and more accurately than I can! The other day I thought I'd found something of use, a v4l2 driver modification for Crespo. I sent my findings over to Scotthartbti. The modification may still be of use, but there was an unanswered question: why is vidioc_dqbuf unable to to clear the buffer queue? If it's the preview screen size, the fix I discovered wouldn't repair everything. SO, when I read this morning that the kernel is actually based on a Rogers ROM with limited capabilities, I decided to run another diff on the JB kernel and the GB kernel from Samsung. What I discovered was that certain drivers s3c_bc.c and s3c_bc.h are absent from the JB kernel. These two files (?) contain information that sets screen and buffer size that I couldn't find replicated anywhere in the JB kernel. I don't think it's not there... so, in the process of trying to find out why these files might not be in the JB kernel, I discovered something better: the android exynos 3.4 Git. And surprise surprise! What is it that devs are fixing over there? Quite a few issues to do with s3c buffer size, particularly in s3c-fb, and the problem of the system ignoring preview frame size!
I suspect that some lingering bugs are being addressed here: https://android.googlesource.com/kernel/exynos.git/+/android-exynos-3.4
keep it up.
Thanks for working at this. I just learned how to pull a logcat and I nabbed one while barcode scanner was on. I'm running CM10 now and I ran CM9 until July. I wish I could help, but alas I am merely a padawan.
Thanks, reynaim. Yours looks pretty much like mine. It's useful to have that confirmation!
So, I've been working on this for awhile now, spending much more time than I ever thought I would. I'm not a developer. I taught myself html, css, and php and it looks to be following a similar route with c++ and python! I've learned a fair bit about how our phone works and I have some ideas about the problems with our camera. I'll list what I can here:
1. Google updated their camera code several revisions ago, but it appears Samsung either relied on aging code or has not released the actual code for the camera hal. Several commands that bind the driver layer to software are not up to date in our camera hal and may be part of the cause of the flickering. The way the camera works is that it calls up a preview, then dumps that information before it starts recording. I suspect that the camera is not clearing the buffer queue at that moment as it should. I am attempting to rewrite this portion of the driver, but it's laborious.
2. Let's be clear about what the problems actually are: Flicker in any transition of light conditions. I can get 720p to work in bright light if there are no shadows. The light sensor is not working with the camera correctly. Actually, the problem is the framerate. At the moment, the 720p stream is going through the wrong channel, as if it is running on a PAL device. Hence, not only is the datastream throttled, but the framerate is wrong. I tinkered a bit with the light sensor drivers - changed a few values here and there - but I haven't noticed a difference.
To note here: PAL = 25 fps, NTSC =30fps. Also, PAL = 50Hz, NTSC = 60 Hz. The Infuse may use a mixed mode that runs 30fps and 50Hz.
What you will notice as a user in addition to the flicker and stuck frames is that:
The video stream is stream 1. It should be #2 (you can check this most reliably in VLC on your computer or MX Player on your phone - VLC refers to the streams as 0 and 1).
FPS, despite media_profiles.xml demanding otherwise, will not rise above 25 and may drop to around 15.
Bitrate won't rise above 6Mbits/sec (interestingly, Android sdk has the bitrate capped at 8Mbits/sec). GB would ordinarily record at 10 - 11 Mbits/sec (there is a way to up the bitrate in JB, but it doesn't improve vid quality).
3. Some minor irritations can be corrected by adding the firmware packages back into the system folder. Add a directory called "firmware" to your system folder (so it should look like /system/firmware/), give it the permissions 754 (RWX,R-X,R-X), and add RS_M5LS_OI.bin, RS_M5LS_SI.bin, RS_M5LS_TB.bin (which you may find in an old GB backup). Give those the permissions RWX, R,R (or R-X, R-X for the last two - I'm not sure which is better!). Reboot. This gets rid of that odd lag you've probably noticed when you open up 3rd party cameras and they search for storage and sometimes crash as a result.
4. I don't think - I could be wrong! - that the problem is actually in fimc. Fimc is behaving normally. There are some curiosities in the current camera hal that fimc doesn't like.
5. In fact, it seems the camera hal was not written for an 8MP camera. Why doesn't Samsung release the camera hal? Does anyone know this? My best lead came when I bricked my phone and decided to take a couple of video logcats so I could at least pinch a few values and processes.
Its seems very long since update on this thread
Whizzpopper said:
Thanks, reynaim. Yours looks pretty much like mine. It's useful to have that confirmation!
So, I've been working on this for awhile now, spending much more time than I ever thought I would. I'm not a developer. I taught myself html, css, and php and it looks to be following a similar route with c++ and python! I've learned a fair bit about how our phone works and I have some ideas about the problems with our camera. I'll list what I can here:
1. Google updated their camera code several revisions ago, but it appears Samsung either relied on aging code or has not released the actual code for the camera hal. Several commands that bind the driver layer to software are not up to date in our camera hal and may be part of the cause of the flickering. The way the camera works is that it calls up a preview, then dumps that information before it starts recording. I suspect that the camera is not clearing the buffer queue at that moment as it should. I am attempting to rewrite this portion of the driver, but it's laborious.
2. Let's be clear about what the problems actually are: Flicker in any transition of light conditions. I can get 720p to work in bright light if there are no shadows. The light sensor is not working with the camera correctly. Actually, the problem is the framerate. At the moment, the 720p stream is going through the wrong channel, as if it is running on a PAL device. Hence, not only is the datastream throttled, but the framerate is wrong. I tinkered a bit with the light sensor drivers - changed a few values here and there - but I haven't noticed a difference.
To note here: PAL = 25 fps, NTSC =30fps. Also, PAL = 50Hz, NTSC = 60 Hz. The Infuse may use a mixed mode that runs 30fps and 50Hz.
What you will notice as a user in addition to the flicker and stuck frames is that:
The video stream is stream 1. It should be #2 (you can check this most reliably in VLC on your computer or MX Player on your phone - VLC refers to the streams as 0 and 1).
FPS, despite media_profiles.xml demanding otherwise, will not rise above 25 and may drop to around 15.
Bitrate won't rise above 6Mbits/sec (interestingly, Android sdk has the bitrate capped at 8Mbits/sec). GB would ordinarily record at 10 - 11 Mbits/sec (there is a way to up the bitrate in JB, but it doesn't improve vid quality).
3. Some minor irritations can be corrected by adding the firmware packages back into the system folder. Add a directory called "firmware" to your system folder (so it should look like /system/firmware/), give it the permissions 754 (RWX,R-X,R-X), and add RS_M5LS_OI.bin, RS_M5LS_SI.bin, RS_M5LS_TB.bin (which you may find in an old GB backup). Give those the permissions RWX, R,R (or R-X, R-X for the last two - I'm not sure which is better!). Reboot. This gets rid of that odd lag you've probably noticed when you open up 3rd party cameras and they search for storage and sometimes crash as a result.
4. I don't think - I could be wrong! - that the problem is actually in fimc. Fimc is behaving normally. There are some curiosities in the current camera hal that fimc doesn't like.
5. In fact, it seems the camera hal was not written for an 8MP camera. Why doesn't Samsung release the camera hal? Does anyone know this? My best lead came when I bricked my phone and decided to take a couple of video logcats so I could at least pinch a few values and processes.
Click to expand...
Click to collapse
Hi @Whizzpopper,
I was searching on Google for infuse 4g 720p recording on JB custom ROMs and found your thread,
it seems you had been gone throught very deep on this.
Have you found anything that help us on resolving this issue afterwards ?
yogi.306 said:
Hi @Whizzpopper,
I was searching on Google for infuse 4g 720p recording on JB custom ROMs and found your thread,
it seems you had been gone throught very deep on this.
Have you found anything that help us on resolving this issue afterwards ?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=38355903
Sent from my Galaxy Nexus using xda premium
yogi.306 said:
Hi @Whizzpopper,
I was searching on Google for infuse 4g 720p recording on JB custom ROMs and found your thread,
it seems you had been gone throught very deep on this.
Have you found anything that help us on resolving this issue afterwards ?
Click to expand...
Click to collapse
Indeed, I did leave the Infuse. There are so many variables, it's hard to say. The problem could be in the codec or in the settings used to interact with the codec (the media_profiles.xml or media_codecs.xml) or it could be in the kernel as Scott Hart used to suspect (don't know what he thinks now!). As you know, Samsung did not provide an honest release of the source for the Infuse.
Sorry I couldn't be of more help!
Thanks
Whizzpopper said:
Indeed, I did leave the Infuse. There are so many variables, it's hard to say. The problem could be in the codec or in the settings used to interact with the codec (the media_profiles.xml or media_codecs.xml) or it could be in the kernel as Scott Hart used to suspect (don't know what he thinks now!). As you know, Samsung did not provide an honest release of the source for the Infuse.
Sorry I couldn't be of more help!
Click to expand...
Click to collapse
Thank you for your updates,
Now Scott made a lot of improvement and fixed all most all the bugs for the kernel we are using in infuse 4g,
the only 720p recording and HDMi are not resolved yet, and i guess its not possible due to samasung not provided the source.
Thanks for your efforts on infuse.
Hello everyone,
As we all know that oneplus 2 supports hevc codec but by default it is not used as the primary video codec. So i've modified a system file to allow the camera to record with H.265 video codec by default.
*/
* * Your warranty is NOT void. * * I'm not responsible for bricked devices, dead SD cards, * thermonuclear war, or you getting fired because the alarm app failed. Please * do some research if you have any concerns about the modification * YOU are choosing to make these modifications, and if * you point the finger at me for messing up your device, I will laugh at you. * */
Steps:-
1)Take a nandroid backup.
2) Your device is rooted.
3)Download any file explorer that has access to system files. I prefer to use 'Root Browser'.
https://play.google.com/store/apps/details?id=com.jrummy.root.browserfree
4)Download the 'media_profiles.xml' , it will be linked below. (see post 2)
5)Open File Explorer and go to /system/etc and backup the original 'media_profiles.xml' in case you wanna revert back.
6)Now copy the modified media_profiles.xml file to /system/etc and replace it with the old one.
7)set permissions to rw-r-r (0644)
8)turn off the device> boot into recovery> clear cache only
9)restart and Enjoy
Special Thanks to @64ashg for spending his precious time creating the Magisk Module. [check post 2 for download]
This mod is working on some Nougat and Oreo ROMs.
Tested on Vertex ROM, RR, Pixel Experience,LineageOS 15.1
If it doesn't work on your ROM, report below. I'll see what i can do.
For OxygenOS - It isn't working. [Testing]
If you like the mod, you are welcome. And Don't be shy to hit the like button. Feel free to share the thread but do not mirror any download files. Just redirect everyone here.
I've made 3 files depending on user requirements.
1st[H.265 codec with Stock Bitrate](File Size won't be reduce, only the codec will change.)
4k - 42 Mbits
1080p - 20 Mbits
720p - 14 Mbits
2nd[H.265 codec with 50% reduced Bitrate] Consumes less storage space and use it only for day time shots. 1080p and 720p videos might pixilate while panning through scenes.
4k - 20 Mbits
1080p - 10 Mbits
720p - 7 Mbits
3rd[(Balanced) H.265 codec with 28% reduced Bitrate] Suitable for both day and night shots.
4k at 30 Mbits [Size-205 MB/min]
1080p & 720p at 15Mbits
Link for Magisk Module.
Balanced - https://mega.nz/#!egREXayA!MyXj7ZFs_xBgIZLH5uFz6HERdLWt38ZI3bG1VOMyQMw
is quality worse, almost same or same?
chxei said:
is quality worse, almost same or same?
Click to expand...
Click to collapse
Not a huge difference. Just a 5-10 % boost in the quality. Mostly noticeable in 4k and 1080p. But the compression is great. ?
The quality and also the compression is better?
Pierre2324 said:
The quality and also the compression is better?
Click to expand...
Click to collapse
Try it and let me know. ?
tusar8 said:
Try it and let me know.
Click to expand...
Click to collapse
I tested and its the same thing..looks like it didilnt changed the file.. (Stock bitrate) i get the same filesize,
Pierre2324 said:
I tested and its the same thing..looks like it didilnt changed the file.. (Stock bitrate) i get the same filesize,
Click to expand...
Click to collapse
Obviously it will create the same file size if you use the stock bitrate. Try the 50% reduced bitrate. Compare both 4k videos of h.264 and h.265.
tusar8 said:
Obviously it will create the same file size if you use the stock bitrate. Try the 50% reduced bitrate. Compare both 4k videos of h.264 and h.265.
Click to expand...
Click to collapse
With stock bitrates why would I use h.265 over h.264?
Pierre2324 said:
With stock bitrates why would I use h.265 over h.264?
Click to expand...
Click to collapse
If you are asking such a question, it clearly means that you don't know the difference between h.264 & h.265/hevc. H.265 exports video with the same quality as h.264 but reduces the file size by 40%(it doesn't automatically do its magic). You will need to adjust the bitrate for it to work. Now if anyone wants to record 4k video with H.265 and stock bitrate which is 42 Mbits, he/she can achieve the quality of the video normally where you will need to increase the bitrate upto 60/70 using h.264 codec.
tusar8 said:
If you are asking such a question, it clearly means that you don't know the difference between h.264 & h.265/hevc. H.265 exports video with the same quality as h.264 but reduces the file size by 40%(it doesn't automatically do its magic). You will need to adjust the bitrate for it to work. Now if anyone wants to record 4k video with H.265 and stock bitrate which is 42 Mbits, he/she can achieve the quality of the video normally where you will need to increase the bitrate upto 60/70 using h.264 codec.
Click to expand...
Click to collapse
Thanks for your answer so the quality should be better if we use same bitatres?
Pierre2324 said:
Thanks for your answer so the quality should be better if we use same bitatres?
Click to expand...
Click to collapse
Definitely. I've noticed 5% boost in quality. But it isn't that great as we all know that the quality of the video depends on many things like the sensor, framerate etc. So the big question, why should we use this mod?
Basically if we need to save our precious storage. ?
tusar8 said:
Definitely. I've noticed 5% boost in quality. But it isn't that great as we all know that the quality of the video depends on many things like the sensor, framerate etc. So the big question, why should we use this mod?
Basically if we need to save our precious storage.
Click to expand...
Click to collapse
ok one last thing, the framerate is not that good on h.265? and if I flash an update do I loose the codec file I changed?
Pierre2324 said:
ok one last thing, the framerate is not that good on h.265? and if I flash an update do I loose the codec file I changed?
Click to expand...
Click to collapse
Use oxygen camera at good lighting condition, it will constantly record at 30fps but at dark it drops to 20fps to brighten the video. So i use google camera at dark to have constant 30fps . And yes, you will loose the codec if you flash an update to your rom. And if you find 50% reduced bitrate video quality degraded, you can try the Balanced Bitrate file. It is good for both day and night time shots.
I can make a magisk module from the files, if users are using magisk..
I've made the same magisk mod for my 3t for ota survival.
64ashg said:
I can make a magisk module from the files, if users are using magisk..
I've made the same magisk mod for my 3t for ota survival.
Click to expand...
Click to collapse
That would be great. :good:
tusar8 said:
That would be great. :good:
Click to expand...
Click to collapse
Gimme some time, I'll upload it here
No sound!
I followed the instructions and use media_profiles(Balanced). And I recorded videos, unfortunately there's no sound when i play the videos. Need help please.
Tony Ralte said:
I followed the instructions and use media_profiles(Balanced). And I recorded videos, unfortunately there's no sound when i play the videos. Need help please.
Click to expand...
Click to collapse
Thanks for testing the mod.
Which ROM are you using?
And send me the original 'media_profiles.xml' and 'media_codec.xml' file from /system/etc folder.
tusar8 said:
Thanks for testing the mod.
Which ROM are you using?
And send me the original 'media_profiles.xml' and 'media_codec.xml' file from /system/etc folder.
Click to expand...
Click to collapse
I am using lineage OS 14.1.
I cannot put the link of the original files
Is there any other way to send you?