Camcorder hack for (Much?) better video recording - HTC Wildfire S

OK,I guess most experienced people would know about this,but still,here goes.
If you have a root browser(downloadable from play store),then you can edit the media_profiles.XML found in system/etc.
This can be edited to get your video recording from 640*480 @ 24fps to 720*480 @ 30 fps.(This is excellent for viewing on the wildfire S.)While technically higher resolutions and frame rates are possible,the stock Gingerbread camcorder app doesn't seem to list it in settings.Plus,higher frame rates don't work properly for me anyway.
So,here's how to do it :
In media_profiles.XML,under encoder profile high, change the width to 720,height to 480 and frame rate to 30.
(I'm not really sure about the following part,although no harm in trying.I'm just not sure whether this is really necessary).
Under each of the encoders below that (h264,h263,m4v) make the maximum height and width to anything you want above 720*480 and frame rate(if below 30) to 30.Max bitrates can be changed too,if you want.
I think its possible to change the camera encoding quality too,although for general day to day purposes,It's not too useful.
I'm open to any suggestions/Improvements if found.
Thanks for reading!

have u tried it??

kye04 said:
have u tried it??
Click to expand...
Click to collapse
Well,yeah.I don't see how I could have known this otherwise.

Actualy on the stock 2.26 these values are 720/480/24 by default dunno what rom were you testing this at.

If you do it once,even if you completely reset it,it goes to 720*480/24.
Maybe it's an update by HTC,as initially it's supposed to be 640*480/24.
Anyway the main thing is changing the framerate to 30 fps.....really improves overall video recording.

Related

Recording video to h.264 codec on Evo?

This question is for developers. Can devs replace crappy compression codec on Evo recording cam to record with h.264 to improve quality of vids we shoot by far. Current cam codec is SO bad that 720p does no justice for the cam. Basically in my view camcorder is useless. H.264 would change the whole game for this phone. Would love to see the rom with h.264 video camera codec. Would any shead some light on this ?
stewie-droid said:
This question is for developers. Can devs replace crappy compression codec on Evo recording cam to record with h.264 to improve quality of vids we shoot by far. Current cam codec is SO bad that 720p does no justice for the cam. Basically in my view camcorder is useless. H.264 would change the whole game for this phone. Would love to see the rom with h.264 video camera codec. Would any shead some light on this ?
Click to expand...
Click to collapse
they cant do a whole lot with any camera settings till the source kernal is released. Who knows when that will be heh
stewie-droid said:
This question is for developers. Can devs replace crappy compression codec on Evo recording cam to record with h.264 to improve quality of vids we shoot by far. Current cam codec is SO bad that 720p does no justice for the cam. Basically in my view camcorder is useless. H.264 would change the whole game for this phone. Would love to see the rom with h.264 video camera codec. Would any shead some light on this ?
Click to expand...
Click to collapse
Do you even know what the current cam codec is?
It's MPEG-4 Part 2 (generally referred to as "MPEG-4"), which is most commonly known for it's implementations in divx/xvid.
It's not as trendy as H.264 (aka MPEG-4 Part 10 and/or AVC), but generally quality isn't what people take issue with when choosing h.264 over MP4 - it's filesize. When you get into higher resolutions with higher bit-depths, being able to compress a stream allows you to work around issues with slow write speeds.
I think you really aren't familiar with video encoding or codecs in general. You should educate yourself a bit more before announcing that a simple codec change will resolve the camera woes with the Evo.
h.264 is currently patent encumbered, which is part of why you don't see it implemented so widely.
Swapping out the codec isn't going to be a magic fix to improve this camera. It's limited by it's very design. Consider the 720p video a novelty and try to only shoot in situations with lots of ambient light and it'll be far more usable.
Petronic said:
Do you even know what the current cam codec is?
It's MPEG-4 Part 2 (generally referred to as "MPEG-4"), which is most commonly known for it's implementations in divx/xvid.
It's not as trendy as H.264 (aka MPEG-4 Part 10 and/or AVC), but generally quality isn't what people take issue with when choosing h.264 over MP4 - it's filesize. When you get into higher resolutions with higher bit-depths, being able to compress a stream allows you to work around issues with slow write speeds.
I think you really aren't familiar with video encoding or codecs in general. You should educate yourself a bit more before announcing that a simple codec change will resolve the camera woes with the Evo.
h.264 is currently patent encumbered, which is part of why you don't see it implemented so widely.
Swapping out the codec isn't going to be a magic fix to improve this camera. It's limited by it's very design. Consider the 720p video a novelty and try to only shoot in situations with lots of ambient light and it'll be far more usable.
Click to expand...
Click to collapse
I agree with you. But x.264 is not involved in any patent issues, is free, and works very will with the best container format available to date... mkv.
Now the phone will do hardware decoding of x/h.264 but you are right, I don't see any advantage other than the smaller file size. You are right again, on one of those P labeled cams the h.264 stream is much smaller than that of mpeg-2/dvd or others so it works well on those crappy hardware writers.
Changing the encoding profile of this camera would not fix your issues OP.
I've never seen bad quality from h.264 codec but then again i agree i have not research enough on the codecs comparison enough but that's why i'm asking. I just know it looks horrible. Somehow camera pics are acceptable. Thank you for the input.
stewie-droid said:
I've never seen bad quality from h.264 codec but then again i agree i have not research enough on the codecs comparison enough but that's why i'm asking. I just know it looks horrible. Somehow camera pics are acceptable. Thank you for the input.
Click to expand...
Click to collapse
I could encode an h.264 video in a low bitrate and low resolution and it would look bad. The codec is only one factor involved in the end result. Different codecs can squeeze better quality video into a smaller file size but it comes at the expense of CPU use and other bottlenecks. In this case I don't think the choice of codec is what is holding back the video. It's probably more about processing power and overall architecture.
I'm not sure that implementing x.264 compression for the EVO would solve anything. From my experience in order to have better quality with h.264 over h.263 it requires much more processing power due to the higher compression complexity.. This would all have to be done real time by the phone.
With the great hardware being sported by the EVO I wonder if a more unorthodox approach could be implemented to attain the highest quality possible.
How about this:
Capture video using a real time lossless compression. Maybe huffyuv?
Once captured let the phone recompress the source to x.264 or whatever via a background service or at a scheduled time like 3am or something
Maybe via this method a higher frame rate could even be achieved?
amdchip said:
I'm not sure that implementing x.264 compression for the EVO would solve anything. From my experience in order to have better quality with h.264 over h.263 it requires much more processing power due to the higher compression complexity.. This would all have to be done real time by the phone.
With the great hardware being sported by the EVO I wonder if a more unorthodox approach could be implemented to attain the highest quality possible.
How about this:
Capture video using a real time lossless compression. Maybe huffyuv?
Once captured let the phone recompress the source to x.264 or whatever via a background service or at a scheduled time like 3am or something
Maybe via this method a higher frame rate could even be achieved?
Click to expand...
Click to collapse
Uncompressed [email protected] with 8-bit color would be something like 45MB/s. (That's excluding audio.)
No current SD card supports those write speeds.
I'm not sure that you could losslessly compress it down to something that'd support even a class 6 card.
Petronic said:
Uncompressed [email protected] with 8-bit color would be something like 45MB/s. (That's excluding audio.)
No current SD card supports those write speeds.
I'm not sure that you could losslessly compress it down to something that'd support even a class 6 card.
Click to expand...
Click to collapse
Eeeeek!!
I checked it out and you are right on the money.
(8 bit @ 1280 x 720 @ 59.94field = 105 MB per/sec) / (2.33:1 huffyuv) = 45.06
Still I wonder if better video quality could be achieved via a capture now (large file size) compress later (small file size) solution.
Certainly, considering your well taken point, we would need to keep things within the requirements of the EVO's hardware (sd card included). Probably would need to keep the data rates within the EVO's stock microsd specifications in order for it to be viable for everyone.
The iPhone 4 can record in h.264 and its processor isnt *that* much more powerful than Snapdragon (and the camera is similar--same company, same sensor size, same features, just 5MP instead of 8MP). What it comes down to is lazy coding by HTC
I don't know if you guys have looked in the build.prop file but the settings are in there. I just don't have alot of time to play with them but here's what's inside. Sprint/HTC changed the line in 1.47,ro.media.enc.vid.m4v.bps, to 8000000 from 6000000 on 1.32, so I'm guessing that's how they upped the Mbits in the upgrade. I could be wrong and the change may need to be in the kernel also but play with them and see.
Code:
#
# This file describes the media capabilities and profiles
# using system properties.
#
# Note: The property key and value has some length
# limit as defined by PROPERTY_KEY_MAX and
# PROPERTY_VALUE_MAX, respectively
#
# WARNING: We may not use system properties for specifying
# media capabilities and profiles in the future
#
ro.media.enc.file.format = 3gp,mp4
ro.media.enc.vid.codec = m4v,h263
ro.media.enc.vid.h263.width = 176,1280
ro.media.enc.vid.h263.height = 144,720
ro.media.enc.vid.h263.bps = 64000,6000000
ro.media.enc.vid.h263.fps = 1,30
ro.media.enc.vid.m4v.width = 176,1280
ro.media.enc.vid.m4v.height = 144,720
ro.media.enc.vid.m4v.bps = 64000,8000000
ro.media.enc.vid.m4v.fps = 1,30
#
# Increase SKIA decode memory capability for progressive jpg file
#
ro.media.dec.jpeg.memcap = 20000000
I may not be a...
developer but when you are talking about codec you are talking my language (I am an editor). H264 isn't that great itself and won't make the EVO's footage look any better yeah you get some more detail out of the H264 but the real reason the camera doesn't look as good is the variable fps in different lighting conditions. The variable kills it. The cam should be fixed at 24fps or 30fps. If that can be done you will see a major difference. I'm not sold on the white balance either. Also I would love to have h264 but the difference in the two is compression. H264 is better but again FPS is key.
I agree as well as most of the other people that h.264 won't help by itself.
Though one thing it would help with is allowing to bump up to a higher bit rate and or FPS and still maintain speeds sufficient for Class 2 SD cards. So, even though it won't do anything by itself, it will help in that you could in theory record higher quality video to your phone.
billobob said:
The iPhone 4 can record in h.264 and its processor isnt *that* much more powerful than Snapdragon (and the camera is similar--same company, same sensor size, same features, just 5MP instead of 8MP). What it comes down to is lazy coding by HTC
Click to expand...
Click to collapse
Das troo, I emailed Omnivision about the issue, they said that their Evo is great there, and that I should contact HTC about it and had said they created the driver/software for it.
"Hi Steve,
I’m sorry to hear that you are experiencing issues video performance. The HTC EVO we have here works great. OmniVision only makes the sensor. HTC makes the drivers and software that run the sensor. Unfortunately, you will need to contact them with any issues.
Sorry, I couldn’t be more help.
Scott"
Then I had asked them if they have any samples they used. And sent me a video they just recorded.
"We just went outside and took this simple video. Hope it helps.
Scott"
Currently uploading right now, i'll edit the link.
EDIT: here you go
bit.ly/c0lwOb
What do you guys think?
FunYunZ said:
EDIT: here you go
bit.ly/c0lwOb
What do you guys think?
Click to expand...
Click to collapse
Not able to post links yet I'm guessing. Just type it out.
Holyrolla said:
Not able to post links yet I'm guessing. Just type it out.
Click to expand...
Click to collapse
you don't see the link? its a bit[dot]ly link. But yea i can't post links yet, so I used the URL shortening.
bit[dot]ly/ c0lwOb
That video is pretty clear, but jumpy as well (expected). Wondering if they tweaked it or installed the OTA update on it?
Holyrolla said:
That video is pretty clear, but jumpy as well (expected). Wondering if they tweaked it or installed the OTA update on it?
Click to expand...
Click to collapse
Thats what I wondered to, but I guess not.
We are using one of our employees phones he bought from Sprint. All of the drivers and software are stock and from HTC.
Scott
Good god, that video sample is hideous! Look at this video comparison done between the Evo and the iPhone 4 in the exact same scene. There's just no competition between the two.
Good god, our Evo sucks mighty ass in the 720p category.

GALNET's fix for choppy 720p recording in CM7/MIUI

ALL THE CREDIT FOR THIS FIX GOES TO GALNET
Galnet posted a fix for 720p choppy recording in the MIUI post.
The problem I found was that it didn't work for everybody.
So, after doing a tkdiff on the changed file for the fix: media_profiles.xml, I saw that the 720p fix is a change of the recording bitrate from 12,000,000 to 10,000,000.
For my phone it wasn't enough and I was still getting choppy recordings, so lowered the bitrate even further to 5,000,000 and now I have flawless 720p recording!!!
How to fix the issue:
1) Make /etc/ R/W (use root explorer)
2) Edit the file: media_profiles.xml and change the bitrate line:
<CamcorderProfiles cameraId="0">
<EncoderProfile quality="hd" fileFormat="mp4" duration="60">
<Video codec="h264"
bitRate="12000000"
to:
bitRate="5000000"
3) save the file
4) make /etc/ R/O again
5) enjoy 720p recording
NOTES
1) HD playback is still choppy -- so you have to transfer the file to your computer to test!!!
2) You can try and increase the bitrate from 5000000 to 10000000 (which was GALNET's original value) -- and if it is still good for you great.
THANKS A LOT GALNET!!!
Somebody knows what the bitrate is for 720p videos in Samsung roms?
JVP:
quality = 'high'
fileformat = 'mp4'
duration = '60'
video codec = 'h264'
bitrate = '10000000'
width = '1080'
height = '720'
framerate = '30'
HaTeNL said:
Somebody knows what the bitrate is for 720p videos in Samsung roms?
Click to expand...
Click to collapse
On XXJVP rom the bitrate for recorded 720p videos is ~12mbps
When on cm7 i found out that playing with different cpu governors influences the 720p choppiness more or less as well. Conservative governor messes 720p up, while on demand improved it....but didnt get rid of it.
Havent tried galnet's fix or their latest miui but on a pc the reported bitrate of 720p material from SGS is ~12mbps + ~2mbps audio track
Im on Doc kitchen jvp rom now with SGS2 camera app and works butter smooth. Its not just the recorded material that is smooth but also when panning around just after starting the camera app is very fluid (as opposed to cm7/miui)
Thanks! I also found out about this workaround by looking at the patch to 7.7, which diff showed a change from 12,000,000 (in 7.5) to 8,000,000. I don't recommend lowering that value to 5,000,000 because more kb/s = smoother video. Though I noticed something strange:
1. After upgrading to 7.7 (8,000,000 bitrate), I tried catching a HD video with MiuiCamera, that produced a very choppy video (still...) with unsynced audio.
2. I catched another 720p video with Android Camera, and the result was better, though I don't like the m4v container for the output files.
3. I used MiuiCamera to record another HD video, but this time it was perfect!
4. The following videos shot by MiuiCamera were still as good, even after a reboot, for now.
So, I don't think we require the Camera.apk to make MiuiCamera.apk work as it should. There is probably something about the governor or kernel ticks (HZ) which is clashing with the 720p recording. For the "record" (lol), I'm using the smartass governor on Zach's NEO 08, while scheduler and OC/UV don't seem to have a high relevance.
Also, why does MiuiCamera produce a 3gp video for 720p recordings, while it's clairly specified to use the mp4 container? I also used Avidemux and ffmpeg to check the video, and it has a 1280x720 resolution with H.264 and AAC codecs. So, why the 3gp extension?
EDIT: I forgot, have you understood why the m4v max bitrate was lowered to 2,000,000 while stock JVP has 12,000,000 ?
Any other feedback aside from this comment?? I would appreciate if you guys found a way recording a nice 70p vdieo from my phone
Currently on CM7 recording is bad, doen't work properly. Users from galnetMIUI forums claim that recording works fine with Chameleon release. Fix is not public, so... CM7 hasn't got proper 720p video recording
It isn't the unique change...
Probably some more changes in the kernel also.There was a thread on their forums, where a user said thar 720p recording works only with default kernel, while with custom kernels doesn't. It's quite annoying, using a stock/custom ROM based on official looks really slow for me, using CM7 feels really good and fast... but with the loose of recording, which I really need for my little girl's unique moments in life recording. The High setting for camera in CM7 makes recording possible, there are very small glitches sometimes, but it's a pitty to not use it a fully potential.
Thats not a "fix"? It just lowering the bitrate which means less smoothness and worse quality.
That aint a "fix" for the problem to me
Actually looking at the xml file mentioned in the first post, in the case of latest nightly of CM7 the value is 10000000. But, keep in mind that the post is from june, and in the meanwhile the real fix came with galnetMIUI chameleon (or something) which is later. So, they must have figured it out in the meanwhile...
worked for me
Worked for me.
I decreased HD bitRate from 10000000 to 5000000 bps
also decreased HIGH bitRate from 3000000 to 2000000
my video is now playing quite smooth.
Thanks
SGS I9000, Cyanogen 7.1.0
is this applicable to galnet miui weekly?
screwing around with the lgcamrecorder app settings may help?
on HD i' 10000000 too, but had ploblems on recording. record in format M4V, but look mediaprofiles it wrote as MP4. why it record different format?

Improved 720p recording for both font and back camera - mp4 format

Must have ROOT
EDIT**
I have just uploaded V2 of my profile - I have lowered the Bitrate slightly and changed from 3gp to mp4 file format.. I have also enabled 720p for the front facing camera - Let me know if the lowered bitrate still performs as well.
Folks,
This is my edited media_profile.xml for far better 720p recording.. thought I would share it..
I have upped the bitrate from just 1MB/s (default)to around 4MB/s.. for me, it is clearly better when played on my Monitor or Television.. smoother, more detail and appears clearer.
I have tried a higher bitrate but found this to be a good balance between size and quality.
I have also tried editing the xml for 1080p recording but cannot get higher than 14fps when recording so have not included it..
to install, just unrar the media_profiles.xml and copy it to /system/etc and reboot.... REMEMBER TO BACKUP YOUR ORIGINAL FIRST.
This has worked for me, but if you end up in a boot loop, pushing the original file should fix it.
Hope you enjoy it.
Bracken
Do you have a comparison video or anything? This is the kind of thing I want to see before flashing.
Nice find!
I can see the difference just watching play back on the xoom! Alot smoother...ill check out the HDMI when I get home.
Will this work on any Android device? Say my DX? I take way more video on that.
bracken21 said:
Must have ROOT
....
I have also tried editing the xml for 1080p recording but cannot get higher than 14fps when recording so have not included it..
...
Click to expand...
Click to collapse
have you a stock Kernel or Custom Kernel + overclocked CPU?
Works well, I have a similar hack for my Nexus.
Easy and simple improvement for video recording.
Using Hammerhead 2.1 & Tachi OCed kernel.
@bracken21 = does this affect the still camera picture taking?
Thank you very much, great mod.
Hi,
@Sergio PC -This does not affect the picture quality only the video..
@twister_65 -I had this completely on stock 3.1 with stock kernel and worked fined.. I'm now running it with Hammerhead 2.1 & Tachi OCed kernel.
Even OCed @1.6, when I enable 1080p recording there is no increase in FPS, it stays at around 14FPS.. I presume the actual sensor is not capable of [email protected]
@mradlauer - I have no idea if this could be done to the DX, I presume so, but what resolution, bitrate and FPS would depend on the device.. if its anything like the Xoom, putting in an unsupported profile may result in a boot loop ?
If there is interest I can upload another profile with settings as follows... but I find it pointless as 1080p @ 14fps is unwatchable.. I have tried increasing/decreasing the Bitrate but still only does 14fps.
1080p 6MB/s @ 14fps when high quality selected.
720p 4MB/s @ 30 when low quality selected.
720p @ 30fps for front facing camera.
Thanks
Bracken
720p for front would be awesome.
Great, i just would love to have it recording in MP4
€: Wait, trying it now
€²: Works Thx for This
Would changing any of these lines to 100 improve photo quality too?
<ImageEncoding quality="90" />
Stealyourface said:
720p for front would be awesome.
Click to expand...
Click to collapse
Front camera now enabled for 720p and file format changed to mp4
cheers
Bracken
truly great work here. thank you
im just surprised no one had done this sooner, but better late than never!!
ive only played wtih it for litterally 30 seconds however i noticed that upon pressing the record button for a video using the front facing camera, it zooms in and stretches the image vertically in the preview window. i dont think that it actually records it like this but it seems to be some sort of graphical glitch....maybe you could look into it?
id like to say thanks again. did you change anything for the still images in v2 or somthing? because i no longer see those weird lines when taking photos with the front facing camera.
THANKS!
crackmulah said:
however i noticed that upon pressing the record button for a video using the front facing camera, it zooms in and stretches the image vertically in the preview window. i dont think that it actually records it like this but it seems to be some sort of graphical glitch....
Click to expand...
Click to collapse
I've noticed the same issue when recording from the front camera
Excuse me, but trying this mod, I realized that the zoom in camera mode does not work. And 'this normal?
Thanks!
zoom isnt working in video mode for me either.
although i cant remember if we were ever able to.....
can you add this ?
I tried now, even the stock 3.1 does not allow it. Is there any mod ?
Regards!
Nice find.
Pretty easy to increase or lower the bitrate yourself.
I personally upped the bitrate to 35MB/s for 720p.
Adjusted the 480p resolution to 720x480 @ 20Mb/s for quick and easy converts straight to dvd with no resolution changes.
Adjusted the audio bitrate to 256kbps, sample rate to 48khz and enabled stereo recording.
Sweet stuff.
edit: Tried shooting for 60fps but it forced closed as soon as I tried to select video recording
Audionut11 said:
Nice find.
Pretty easy to increase or lower the bitrate yourself.
I personally upped the bitrate to 35MB/s for 720p.
Adjusted the 480p resolution to 720x480 @ 20Mb/s for quick and easy converts straight to dvd with no resolution changes.
Adjusted the audio bitrate to 256kbps, sample rate to 48khz and enabled stereo recording.
Sweet stuff.
edit: Tried shooting for 60fps but it forced closed as soon as I tried to select video recording
Click to expand...
Click to collapse
Do you mind posting your xml file... I personally like the tweaks you have done and would like the same..
Thanks in advance
Audionut11 said:
Nice find.
Pretty easy to increase or lower the bitrate yourself.
I personally upped the bitrate to 35MB/s for 720p.
Adjusted the 480p resolution to 720x480 @ 20Mb/s for quick and easy converts straight to dvd with no resolution changes.
Adjusted the audio bitrate to 256kbps, sample rate to 48khz and enabled stereo recording.
Sweet stuff.
edit: Tried shooting for 60fps but it forced closed as soon as I tried to select video recording
Click to expand...
Click to collapse
35MB/s is 2.1Gb per minute - that would give you around 15 mins recording on 720p on 32gb card. Plus with the size of sensor and optics, im guessing you wont see quality increase above 3MB - 4MB/s and even that is asking alot of the camera due to the noise levels and lack of light/detail passing through the small plastic lens. As for stereo recording, I thought the Xoom only had 1 mic ?
Being that bluray movies are around 34MB/s.. I think asking a small plastic lens on the xoom to do that a little much. Also the tegra 2 is listed at only supporting 20Mb... did you also amend the codec maximum bitrate as its currently set to around 5MBs.. if not, you will actually be recording @ 5MB/s.. Also, is 35MB/s over the write limit for xoom internal storage.. I could be wrong but even a class 10 cards only write at around 10MBs and reads @ 30Mbs ?
If you want to try 60fps, you would also need to amend not just the recording values but the codec preference and possible the memCap too.. ive not tried it yet, may give it a go.
Im not trying to have a go at you, just stating that your filling your xoom up for no reason... in a long winded blurbing kind away.. not had my coffee yet..
As for the problem with front camera zooming in on 720p, nothing I can do about this, that fix would be above my head.. My guess is that the google camera apk would need amended for 16:9... my knowledge of Android goes as far as this little dirty hack.
Cheers
Bracken
bummer on the zoom and front face stretch problem... Gonna have to revert to stock unless fixed in the future... Will subscribe for updates in case. Nice for folks that don't mind those couple details though
rockhumper said:
bummer on the zoom and front face stretch problem... Gonna have to revert to stock unless fixed in the future... Will subscribe for updates in case. Nice for folks that don't mind those couple details though
Click to expand...
Click to collapse
Hi, just revert to version 1, it keeps the front camera stock and rear camera is improved..
As for the people not being able zoom, you can't zoom in video mode using stock... well mines never has.
I wish I knew how to port the camera front the Samsung 10.1 tab, does any one know how?
Cheers
Bracken

[REQUEST][4.1.2][APP][MOD]Camera with ability to choose proper fps

Hello, respected developers!
As the topics concerning camera app are slowly fading down, I start a new one here.
I tried both existing mods/apps of a 4.1 standard camera and a custom apps like lgCamera. Still I can't get 25 fps in recorded videos even when I set it to this particular value. I can get it when i use AxelVoyager in-car videorecorder, but it's quite buggy and not that common-to-operate and this setting must be applied manually every time before I start record.
I need this 25 fps setting because my other video recordings are in PAL (25 fps) and it's not a common task to convert fps correctly to match each other.
As far as I can understand with my many-years-ago-IT-background, this should not be a problem for an experienced person to compile a version of a standard camera app with pathced media profiles that have 25 instead of 30 fps in 1080p and 720p HD media-profiles. So I kindly ask for that.
Thanks.

[MAGISK][MODULE] HEVC Recording Enabler v0.3

Hi, I've made a Magisk Module that enable HEVC / H265 Recording in the stock camera App.
This module enable HEVC/H265 video recording on OnePlus 6 and OnePlus 6T.
The bitrate values are the same as H264 and the HEVC code it's enabled for all the video profiles that previously used H264.
The audio codec it's still AAC and the audio bitrate doubles from 96 kb/s to 192 kb/s to get a better audio quality.
I've also made a diffrent fork that use half of the bitrate (and therefor half the space), it also keeps the original audio bitrate and change the audio codec to HEAAC to save space without losing quality
Why should I use HEVC instead of H264?
Basically, HEVC provide the same quality as H264, but using less of helf the bitrate, this means that you can record videos with the same quality but using less space, or, if you're more inclined to that, record video that use the same space but with better quality (less compression, therefore less artifacts and more details overall). This is the theory behind HEVC, pratically speaking I've noticed some differences, other users havent, so I guess the best way to find out if it really works it's by letting my beloved XDA users test this mod.
More info about HEVC on Wikipedia
Compatibility:
Should be compatible with every ROM since the mod change files in the /vendor partition, but I've tested only on OOS Open Beta 33
Original version changelog:
Code:
v0.3
- Change the audio bitrate from 96 kb/s to 192 kb/s
- Change audio codec from HEAAC to AAC (ha better audio quality for bitrate major than 128 kb/s)
v0.2
- Add HEVC support for all configurations previously used with H264
- Add HE-AAC support in HEVC encoded profiles
- Remove config files that doesn't affect the mod result
- Update HEVC encoder configuration to match the same limits has H264
v0.1
- Initial release
Half-bitrate version changelog:
Code:
v0.3
- Change the Bitrate multiplier, now it's 0.38 and the effective bitrate (checked on 4k60fps) it's 60.9 Mb/s
v0.2.1
- Change the Bitrate multiplier, now it's about 0.4 and use about half of the original space
v0.2
- Add HEVC support for all configurations previously used with H264
- Add HE-AAC support in HEVC encoded profiles
- Remove config files that doesn't affect the mod result
- Update HEVC encoder configuration to match the same limits has H264
v0.1
- Initial release
Download links:
Stock bitrate (same space, less compression, better quality)
Half bitrate (half of the space compared to original, quality should be similar)
For older version check the releases in the gitlab repo
Source links:
Stock bitrate
Half bitrate
How to check if it's working?
Shoot a video and then check which coded it's used, you can use this app
Let me know if you see improvements or not, thanks in advance!
Can you tell if this works on Stock OOS only or Custom ROMs too? Also on a side note, what's the benefit of this module? And I'm sure someone else will ask it too, but does this work with the Stock OOS Cam only or it will work with Gcam too?.
DarthVader said:
Can you tell if this works on Stock OOS only or Custom ROMs too? Also on a side note, what's the benefit of this module? And I'm sure someone else will ask it too, but does this work with the Stock OOS Cam only or it will work with Gcam too?.
Click to expand...
Click to collapse
In short, HEVC it's a coded that allow better picture quality compared to H264 (the coded used by default on OP6/6T) when using the same bitrate (occupying the same memory), I've made a short explanation in the readme of the repo with a handy chart about compression ratio comparison with H264
This module enable HEVC on stock camera for sure, I haven't check on GCam since it already has a built-in HEVC encoder, but I don't know if when disabled uses H264 or the stock defined by the media_profile.xml
DarthVader said:
Can you tell if this works on Stock OOS only or Custom ROMs too?
Click to expand...
Click to collapse
Should work on any ROM, but for now I've tried only on the latest OOS Open Beta
How to find it withing Magisk Manager? Just search HEVC?
Inviato dal mio ONEPLUS A6013 utilizzando Tapatalk
RikiBez said:
How to find it withing Magisk Manager? Just search HEVC?
Inviato dal mio ONEPLUS A6013 utilizzando Tapatalk
Click to expand...
Click to collapse
Right now isn't available on Magisk Manager, I'm waiting for approval, I don't know how much time it will take, but you can download it from here:
Stock bitrate
Half bitrate
eathtespagheti said:
Right now isn't available on Magisk Manager, I'm waiting for approval, I don't know how much time it will take, but you can download it from here:
Stock bitrate
Half bitrate
Click to expand...
Click to collapse
What exactly changes by enabling HEVC recording?..
Have no idea what that is...
cultofluna said:
What exactly changes by enabling HEVC recording?..
Have no idea what that is...
Click to expand...
Click to collapse
If you use the stock bitrate Module, you get better picture quality in videos for the same file size
If you use the half bitrate file you should get again better video quality but also smaller video files for the same length
Didn't work for me 10.3.1
eathtespagheti said:
If you use the stock bitrate Module, you get better picture quality in videos for the same file size
If you use the half bitrate file you should get again better video quality but also smaller video files for the same length
Click to expand...
Click to collapse
I recorded a 4k60 frame video with the stock camera for 30 seconds, then installed stock bitrate, recorded, then uninstalled and installed half bitrate and all three file sizes were the same and looked the same.
Then I tried 1080p60, same results with all three. all the same file size and quality.
Is there a special way to enable it besides just flashing via magisk?
eathtespagheti said:
...
Right now I don't have enough posts to be able to put links in thread, but I should be able to put links in replies if you ask me the download links, otherwise check my github / gitlab account and you'll find the source there, the username it's the same as here on XDA
Mod edit - Link to download added: https://gitlab.com/eathtespagheti/o...a8f64ddc6d0dbc/oneplus6-6t-hevc-recording.zip
Click to expand...
Click to collapse
Sir, I've added the download link to your OP. I hope this is fine with you.
Regards
Oswald Boelcke
Gytole said:
I recorded a 4k60 frame video with the stock camera for 30 seconds, then installed stock bitrate, recorded, then uninstalled and installed half bitrate and all three file sizes were the same and looked the same.
Then I tried 1080p60, same results with all three. all the same file size and quality.
Is there a special way to enable it besides just flashing via magisk?
Click to expand...
Click to collapse
Were you filming the same scene? A lot depend also on what you were filming, imho the quality difference it's noticeable only when watching the video in a good monitor or when you are editing, you notice that there are less artifacts in the details and the overall sharpness it better, but on the phone itself it's impossible to spot the difference. To be sure that the HEVC it's enabled try checking the codec info on the video, you can try with this app and in the format section it should say HEVC if the mod it's working, otherwise it will show AVC
Oswald Boelcke said:
Sir, I've added the download link to your OP. I hope this is fine with you.
Regards
Oswald Boelcke
Click to expand...
Click to collapse
Thanks I needed it ??
eathtespagheti said:
Were you filming the same scene? A lot depend also on what you were filming, imho the quality difference it's noticeable only when watching the video in a good monitor or when you are editing, you notice that there are less artifacts in the details and the overall sharpness it better, but on the phone itself it's impossible to spot the difference. To be sure that the HEVC it's enabled try checking the codec info on the video, you can try with this app and in the format section it should say HEVC if the mod it's working, otherwise it will show AVC
Yes, it says HEVC but the thing is I recorded stock camera 4k60 no modded camera, your stock bitrate, and the half bitrate and all 3 files sizes are the same.
I used a tripod and recorded a black sheet for 30 seconds.
Is there a trick? I could really use the half bitrate. Haha damn life saver.
Click to expand...
Click to collapse
Yes, it says HEVC but the thing is I recorded stock camera 4k60 no modded camera, your stock bitrate, and the half bitrate and all 3 files sizes are the same.
I used a tripod and recorded a black sheet for 30 seconds.
Is there a trick? I could really use the half bitrate. Haha damn life saver.
Click to expand...
Click to collapse
I think it's because the bitrate it's variable, so when you are filming something that's not changing and doesn't have much details in it (like a still black sheet for 30 seconds) the camera used the lowest bitrate possible to get that video anyway, try filming something in in movement that you can reproduce, I will do some tests too
eathtespagheti said:
I think it's because the bitrate it's variable, so when you are filming something that's not changing and doesn't have much details in it (like a still black sheet for 30 seconds) the camera used the lowest bitrate possible to get that video anyway, try filming something in in movement that you can reproduce, I will do some tests too
Click to expand...
Click to collapse
Tried 1080p60 just recording my keyboard on the floor. Same results. The bitrate is the same.
Gytole said:
Tried 1080p60 just recording my keyboard on the floor. Same results. The bitrate is the same.
Click to expand...
Click to collapse
Ok I've checked on my phone too, same bitrate between HEVC and AVC, maybe I've to change some other parameter in order to change the bitrate, I will post an update here when I'll have a free minute to recheck the files
eathtespagheti said:
Ok I've checked on my phone too, same bitrate between HEVC and AVC, maybe I've to change some other parameter in order to change the bitrate, I will post an update here when I'll have a free minute to recheck the files
Click to expand...
Click to collapse
You're awesome! Thanks for the quick replies, and like I said, you doing this, and saving me space is HUGE. Girlfriend and I are pumped hahaha
eathtespagheti said:
Were you filming the same scene? A lot depend also on what you were filming, imho the quality difference it's noticeable only when watching the video in a good monitor or when you are editing, you notice that there are less artifacts in the details and the overall sharpness it better, but on the phone itself it's impossible to spot the difference. To be sure that the HEVC it's enabled try checking the codec info on the video, you can try with this app and in the format section it should say HEVC if the mod it's working, otherwise it will show AVC
Thanks I needed it ??
Click to expand...
Click to collapse
I flashed your module and its working. If you can do anything with the bitrate it would be appreciated
Hi, thanks for the mod [emoji106] just a quick question for you. Is it possible to add Hevc to single shot pictures as well?
As you should be able to get the same quality pictures for half the size.
AndyBury said:
Hi, thanks for the mod [emoji106] just a quick question for you. Is it possible to add Hevc to single shot pictures as well?
As you should be able to get the same quality pictures for half the size.
Click to expand...
Click to collapse
Well seeing as how HEVC stands for High Efficiency Video Coding.... No
But there is HEIF, that's what you want.
Gytole said:
You're awesome! Thanks for the quick replies, and like I said, you doing this, and saving me space is HUGE. Girlfriend and I are pumped hahaha
Click to expand...
Click to collapse
Arkmars20 said:
I flashed your module and its working. If you can do anything with the bitrate it would be appreciated
Click to expand...
Click to collapse
After like two full days of trying I havent been able to reduce the bitrate, changing the default parameters seems to not affect in any way the camera settings, still choose some values automatically that are even different from what's written in the original config file without mod
AndyBury said:
Hi, thanks for the mod [emoji106] just a quick question for you. Is it possible to add Hevc to single shot pictures as well?
As you should be able to get the same quality pictures for half the size.
Click to expand...
Click to collapse
Causical said:
Well seeing as how HEVC stands for High Efficiency Video Coding.... No
But there is HEIF, that's what you want.
Click to expand...
Click to collapse
Well, AndyBury has a point! In fact the HEIF and HEVC are strongly related, and according to Wikipedia "The HEIF specification also defines the means of storing High Efficiency Video Codec (HEVC)-encoded intra images and HEVC-encoded image sequences" which surerly means something, but tbh I'm not so sure what's this something. Anyway I was already planning to trying enable HEIF via media_profiles, but seems something more complex than just adding a codec in a list, the only standardized usage of HEIF right now seems to be the one used by Apple on iPhones and Macs, I think that until Google doesn't implement in some way HEIF photos with camera we can't do anaything about it.

Categories

Resources