First, as you all known, Touch pro2 can't record VGA video in H.264 format(the resolution is limited to 352x288), it's really a pity. And if you want a VGA res, you just can use a MPEG4 format and finally get a video full of noise and blocks...... After I buy my Touch Pro2, I always try to find a way to enhance the video recording quality. And finally found it!
If you have the software "BsB tweaks" in your ROM, you can see it has such two tweaks:
Video Format--Enable hidden video recording format
(Add H.264, Motion JPEG,3GPP2 to the format list)
Video BitRate--Improves Video recording in MPEG4
I should tell you that, this two tweaks is not useful on Touch Pro2 (I don't know if they have any effects on other phones).The first one makes you could record in H.264 format, but only with a resolution up to 352x288. The second one has no use at all.
But from BsB tweaks, I know that there're some Reg keys handle the video recording parameters, So I spend whole night on these keys, and find many interesting things
1.Enlarge video recording Bitrate and Framerate:
Value function
"HKLM\SOFTWARE\HTC\Camera\Recparam\<...>\<Bitrate;VSBitRate;FrameRate>"
These Reg Values control the video recording Bitrate and FrameRate, if you want to enhance the quality, you can write down a bigger number.
For example, change
"HKLM\...\Recparam\H264Large\BitRate" to 600000(dec)
"HKLM\...\Recparam\H264Large\VSBitRate" to 600000(dec)
"HKLM\...\Recparam\H264Large\FrameRate" to 20(dec)
(Tips: Large equals to CIF, Medium equals to QVGA, etc...)
then when you set the Capture format to H.264 and Resolution to CIF(352x288),finally you will get a *.3gp video at 600kbps(VBR)@20fps.
Now a new question comes out: what's the upper limit Bitrate of Touch pro2 to record a H264 video?
I have done the test and find out that you could record a H.264 video as high as [email protected](352x288) ! Maybe you have thought that MSM7200 couldn't be so powerful to encode 1000kbps H.264, but it really works fine!
So,if MSM7200 could support 1000kpbs bitrate,then it should have enough power to record a VGA H.264 video! Go next!
2.Crack H.264 VGA video record limitation on Touch Pro2:
Don't wasting time on the HTC video recording program, whatever you do finally you just can use the resolution no more than CIF(352x288) when H.264 format is selected.
Now the way out is here:"HKLM\SOFTWARE\HTC\Camera\P2\"
When I delete it, the HTC video recording program can't start anymore. Now you know, this Reg Key has the Values to decide which format and resolution the recording program should use
Value function
"HKLM\SOFTWARE\HTC\Camera\P2\CaptureFormat"
When set to "10(hex)", the video format is MPEG4 (*.mp4 V:MPEG4, A:AAC);
When set to "2000(hex)", the video format is H.264 (*.3gp V:H.264, A:AAC);
Other value not tested.
"HKLM\SOFTWARE\HTC\Camera\P2\MainCamCaptSize"
When set to "20(hex)", the video resolution is 352x288;
When set to "1000(hex)", the video resolution is 640x480;
Other value not tested.
PS: Check if there is a Key "H264VGA" in "HKLM\SOFTWARE\HTC\Camera\Recparam\", if you can't find it, please create it manually and copy all Values from "H264Large", set BitRate & VSBitRate to 1000000(dec) and FrameRate to 20(dec).
When you set CaptureFormat=2000(hex) and MainCamCaptSize=1000(hex),then start HTC Video Recording, you'll get a VGA H.264 video with great quality!
3.Try 1000kbps VGA MPEG4 video recording:
Besides H.264 format, you can also enlarge the BitRate (in HKLM\...\Recparam\MPEG4VGA) of MPEG4 formate to get a excellent quality MPEG4 video.
Compare between MPEG4(1000kbps,VGA,20fps) and H.264(1000kbps,VGA,20fps), I find that MPEG4 has a better quality on rapid motional scene, because it's variable bitrate is up to 1600kbps, and H.264 is limited to 1000kbps. MPEG4 also has a higher average famerate, act more smooth than H.264. On the other hand, H.264 has a strong advantage on slow motional scene. Altogether, MPEG4 has a surprising better quality than H.264 at 1000kbps VGA mode.
4.Attention:
1.Don't set the bitrate more than 1000000, if you set it as 1100000, you could find that the actual bitrate break down to 128kbps! That is why the BsB tweaks didn't work, it tweaks the MP4VGA bitrate to 4194304(dec) !
2.Don't set the framerate more than 20, or you'll get a less framerate.
3.MSM7200 handles MPEG4 and H.264 recording in HW mode, so lowering the bitrate is useless to get a smoother video. You just need to keep the bitrate less than 1000kpbs then MSM7200 will work best enough.
4.When you decide to record a VGA H.264 video, a overclock is recommonded. Just use WiMoSpeed to oc to 710MHz!
5.Don't open HTC Camera's setting panel in video recording mode, that will lock the H.264 VGA mode again and the resolution goes back to CIF!
6.Only tested on T-Mobile Touch Pro2 with EnergeRom, other MSM7200/7201 phones should work too.
===========================
Cab and Reg files for this topic:
Enable MPEG4 & H.264 VGA recording at 1000kbps: MSM7200_H264VGA_Tweaks.cab
Unlock the H.264 VGA limitation: vgaunlock.reg (included in MSM7200_H264VGA_Tweaks.cab, but if you click out the HTC Camera's setting panel and the resolution go back to 352x288, you may need it to turn on VGA again.)
A sample recorded by Touch Pro2 @VGA H.264 format
===================================================
Complete name : I:\DCIM\100MEDIA\VIDEO0072.3gp
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 1.98 MiB
Duration : 19s 466ms
Overall bit rate : 854 Kbps
Encoded date : UTC 2011-02-01 3:20:40
Tagged date : UTC 2011-02-01 3:20:40
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 19s 466ms
Bit rate mode : Variable
Bit rate : 825 Kbps
Maximum bit rate : 978 Kbps
Width : 640 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate mode : Variable
Frame rate : 14.127 fps
Minimum frame rate : 4.286 fps
Maximum frame rate : 30.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.190
Stream size : 1.91 MiB (97%)
Language : English
Encoded date : UTC 2011-02-01 3:20:40
Tagged date : UTC 2011-02-01 3:20:40
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Codec ID : 40
Duration : 19s 392ms
Bit rate mode : Variable
Bit rate : 27.5 Kbps
Maximum bit rate : 33.2 Kbps
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 16.0 KHz
Compression mode : Lossy
Stream size : 65.2 KiB (3%)
Language : English
Encoded date : UTC 2011-02-01 3:20:40
Tagged date : UTC 2011-02-01 3:20:40
I have never been able to record in H.264 or MOTION JPEG. I can select them but everytime I wanna record my phone freezes. It has been this way no matter which rom I use. How do I get these two formats workin? Is it common for for these formats not to work?
porkenhimer said:
I have never been able to record in H.264 or MOTION JPEG. I can select them but everytime I wanna record my phone freezes. It has been this way no matter which rom I use. How do I get these two formats workin? Is it common for for these formats not to work?
Click to expand...
Click to collapse
OC to 768MHz? I think this is too high for your phone, MSM7200 use HW mode to encode video, It's video DSP maybe unstable even while your CPU works fine.
If you have tried without OC, I would say that your phone really need a repair
And you could depress the clock lower than 518MHz,for example:400MHz then try again, maybe it works.
PS: Did you try EnergyROM?
Thanks!!! could you please post some video tests on YouTube?
XMarinE said:
Thanks!!! could you please post some video tests on YouTube?
Click to expand...
Click to collapse
I really want to do this, but there is a Great FireWall in my country which makes us can't visit YouTube, Twitter or Facebook, because there're many "disharmonious" information on such sites and we're "protected" by the Goverment...
But I could show you two video captures(my Laptop's desktop),left one on H.264 and right one on MPEG4, both has a 640x480 resolution and the bitrate as high as 1000kbps, I promise there're video's captures but not photos
dmc_universe said:
OC to 768MHz? I think this is too high for your phone, MSM7200 use HW mode to encode video, It's video DSP maybe unstable even while your CPU works fine.
If you have tried without OC, I would say that your phone really need a repair
And you could depress the clock lower than 518MHz,for example:400MHz then try again, maybe it works.
PS: Did you try EnergyROM?
Click to expand...
Click to collapse
From day 1 the hidden formats have never worked. I use BSB TWEAKS to show them but they just freeze my camcorder. This happens whether i am overclocking or not. Yes i have tried ENERGY roms but still nothing. Could I be doing something wrong with BSB TWEAKS? I ask because my friend has the same settings and these formats do not work on her device either. It would be great if I had the reg entries for HKLM/SOFTWARE/HTC/CAMERA so I could compare them to my registry.
porkenhimer said:
From day 1 the hidden formats have never worked. I use BSB TWEAKS to show them but they just freeze my camcorder. This happens whether i am overclocking or not. Yes i have tried ENERGY roms but still nothing. Could I be doing something wrong with BSB TWEAKS? I ask because my friend has the same settings and these formats do not work on her device either. It would be great if I had the reg entries for HKLM/SOFTWARE/HTC/CAMERA so I could compare them to my registry.
Click to expand...
Click to collapse
Oh, the Default format of HTC Camera really sucks, here is my Camera.reg, pls flash the newest EnergyROM and import it then try again.
By the way, what's the version of your TP2? Mine is T-Mobile without the front Camera, maybe there is something wrong with your front camera Reg setting.
Check the Value "2ndCamCaptSize" under "HKEY_LOCAL_MACHINE\SOFTWARE\HTC\Camera\P2", try set it as 10(hex) or 20(hex).
Or hard reset your TP2, then only change the value "HKEY_LOCAL_MACHINE\SOFTWARE\HTC\Camera\P2\EncodeFormat" to 7FFFFFFF(hex), which add H.264, Motion JPEG and 3GPP2 to you format list (do not use BsB tweaks), and try again.
And, if you really can't use H.264 whatever you do, why not try a 1000kbps MPEG4, it has even better quality that H.264 in VGA mode.
So... what's the way to go?
install the CABs, do the reg edits, both?
Chillout said:
So... what's the way to go?
install the CABs, do the reg edits, both?
Click to expand...
Click to collapse
Just install the CAB that's OK.
And you could also do the reg edits if you want to adjust the recording parameters yourself
The vgaunlock.reg is used to set the recording format back to H.264 VGA when you:
1.want to try another format (for example, MPEG4), then you want to use H.264 again;
2.click out the HTC Video Recorder's setting panel by mistake, this would pull down the H.264 recording resolution to 352x288.
porkenhimer said:
From day 1 the hidden formats have never worked. I use BSB TWEAKS to show them but they just freeze my camcorder. This happens whether i am overclocking or not. Yes i have tried ENERGY roms but still nothing. Could I be doing something wrong with BSB TWEAKS? I ask because my friend has the same settings and these formats do not work on her device either. It would be great if I had the reg entries for HKLM/SOFTWARE/HTC/CAMERA so I could compare them to my registry.
Click to expand...
Click to collapse
mine crash too. When i put settings in h.26 or whatever and push record it freezes or camera stop working
thank's! I will be useful
someone testedthis on xperia x1?
Hi all,
Is there any way to get AAC encoding working in Froyo? So it can be used for video recording?
Gary.
whatsisnametake2 said:
Hi all,
Is there any way to get AAC encoding working in Froyo? So it can be used for video recording?
Gary.
Click to expand...
Click to collapse
AAC stands for 'Advanced Audio Codec' and it is used to encode the audio stream in Froyo too. The bad news is that the codec settings in 2.2 where pushed too low and that's the reason the sound in video clips to be such low quality. I don't think that there is a way of changing the settings.
According to the media_profiles.xml file in system/bin, video recording actually uses amrnb codec for audio, which is a terribly low quality sound. From what I have been able to find out so far, AAC isn't actually enabled in Froyo at all. I tried editing the media_profiles file to enable AAC for video but it doesn't seem to make any difference...
This is what MediaInfo says about a video I shot while Gingerbread wasn't released yet.
Audio
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Codec ID : 40
Duration : 1mn 5s
Bit rate mode : Constant
Bit rate : 32.0 Kbps
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 8 000 Hz
Stream size : 253 KiB (0%)
Language : English
Encoded date : UTC 2011-02-07 11:14:03
Tagged date : UTC 2011-02-07 11:14:03
Click to expand...
Click to collapse
I don't know what it says in the xml files - the fact is that the files are encoded with aac but the settings are so low that the result is just terrible.
EDIT:
These are the settings from a video shot with Gingerbread:
Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 4
Format profile : LC
Codec ID : 40
Duration : 30s 441ms
Bit rate mode : Constant
Bit rate : 63.8 Kbps
Nominal bit rate : 96.0 Kbps
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 44.1 KHz
Stream size : 237 KiB (2%)
Title : SoundHandle
Language : English
Click to expand...
Click to collapse
As you can see both the bitrate and the sample rate are higher which results in better quality, but the codec is virtaly the same.
You're right
Thanks for that tkolev - very interesting. I guess I should have checked that myself first. You're quite right, it is indeed very low quality AAC.
So question is, how to change the AAC encoding settings in Froyo. Doesn't seem to be in that media profiles file, because AAC encoding isn't even mentioned in there...
whatsisnametake2 said:
Thanks for that tkolev - very interesting. I guess I should have checked that myself first. You're quite right, it is indeed very low quality AAC.
So question is, how to change the AAC encoding settings in Froyo. Doesn't seem to be in that media profiles file, because AAC encoding isn't even mentioned in there...
Click to expand...
Click to collapse
I don't think you can do that. Upgrade to GB is the only way I know of to get better sound in videos.
EDIT: Actually the stupidity of limiting the sample rate to 8 khz led me to believe that HTC used a microphone with a very low frequency response because that's the only logical reason they might have in using such low settings. Fortunately this is not the case.
Sent from my Desire HD using XDA App
LGCamera
Just as an update to this. I found the solution to the sound quality problem in video in froyo roms. A camera app called LGCamera. You can set everything the way you want it, including bitrate for the video, and file format (eg MP4 rather than 3gp), and also crucially AAC sample rate and bitrate for audio. Very nice. Video quality seems to be at least as good as stock app, possibly slightly better. This is at 8mb bitrate, haven't tried the higher bitrates yet....
does aac work on lgcamera on froyo?
I have a issue with the video recorder in CM7. I had this in RC1v2 and also in latest nightly, don't know in versions before that.
I can't use the high and youtube resolution setting. I can select them, but when I press the record button nothing happens. The other settings, for example wide, do work.
Is this normal? If not is there a sollution to solve this?
I installed Nordic rom and reinstalled CM7 latest nightly, that didn't solve my issues.
However changing the frame rate for the encoder profiles (in media_profiles.xml) to 24 did. (this was a suggestion in the developers forum). Now I can use all resolution settings.
My defy has red lens.
During testing I also noticed that the standard bitrate for the high and wide recording setting are really high.
For a 640x480 (high) mp4 video it is 10000 kb/s
For a 848x480 (wide) mp4 video it is 8000kb/s
This a lot higher then most good looking xvid 720p movies I have , which are around 2000 kb/s.
I now use 1300 kb/s (high) and 1500 kb/s (wide) which seems to give usable results but with a lot smaller videos.
Which settings do other people use/suggest?
Try the newest LG Cam (free) from market an set it to these parameters:
video resolution: 848x480
video encoder: mpeg4
video file format: mpeg4
video bitrate: 8
video framrate:24
audio encoder: ACC
audio samplerate: 44100
audio bitrate: 62900
and check force autofocus before capture
This works great on mey Defy (red lense)!
After much experimentation, I have found that the epic prefers 5:3 aspect ratio. If you want the maximum in clarity and optimized file size for your videos, here are the settings I came up with. Adding more to either bitrate wont help the quality.
Customized MP4 Movie (*.mp4) template in Freemake
Video Code: MPEG4 (NOT h.264 or x264)
Frame Size: 1000x600 (5:3 ratio)
Video Bitrate: 1280
Video framerate: 24
Encode Passes: 2
Audio Codec: AAC
Audio Bitrate: 160
Sample rate: 44100
Audio Channels: 2
Disable Audio: No
A/V Sync: Default
These settings work great on my Arnova 10b (Capacitive) and my Touchpad. They would also work great in an iPad or XBOX. I used the high resolution to fill the screen of my Arnova without stretching. It works fine on my Epic.
Here the question: Why 5:3? Any other aspect ratio does not actually fill the screen. If you make a 800x600 (4:3) video, you will find that the player does not actually fill the screen. Thoughts?
The screen resolution is 800x480, which is 5:3...
Just make the video 800x480, and it won't have to do any scaling.
Interesting. Gonna check my videos and see what res I have them in, because they look awesome as it is.
LunaticWolf said:
The screen resolution is 800x480, which is 5:3...
Just make the video 800x480, and it won't have to do any scaling.
Click to expand...
Click to collapse
I did that resolution... It worked great for my epic.. I settled on the resolution I used because it worked awesome on all my devices.. even my touchpad. The cost in file size is almost nothing between the two resolutions.
Ok, I have a 720p video.. it looks amazing at its normal resolution of 1280x720.. no cropping that I can notice..
I'm an editor by trade.
What you're looking for is H.264 in .mp4. I tend to go for a video bitrate that hangs out around 1.5mbps and AAC stereo audio at 160kbps, 44.1kHz. There are quite a few artifacts in the shadows, but for watching a movie on an airplane it'll suffice.
The key to both a sharp picture and long battery life is to properly prepare the video. When your video is under or over 800px wide the Epic has to perform scaling to make it fill the screen (or sacrifice filling the screen if it is under). This scaling is an additional calculation it must perform, which hits the battery, and is a transformation on a lossy codec - a quality killer. If you have the render power (48 i7 cores and segmented processing makes for fast work) you can always hit it with mild sharpening for that extra pop.
Export your video at 800 pixels wide by whatever makes the correct aspect ratio. It's a bit of simple algebra, set up a proportion, cross-multiply, divide, and bang.
ex:
(1280/720)=(800/x)
1280x=720*800
1280x=576,000
x=450
800x450 <-- use this for any 16x9 broadcasts
(1.85/1)=(800/x)
1.85x=800
x=432
800x432 <-- use this for movies presented in 1.85:1, 2.35:1, and 2.40:1.
If it's 4x3 export at 640x480.
I just scale up to 4k. Looks pretty good =D
What settings is everyone using for their video encodes?
I'm not asking how to get it to work, but wondering whats the optimum settings people have found to balance quality and size.
I used to just hit iphone4 preset in handbrake or encodeHD @ 1500 bitrate, as my old phone had same res and couldn't handle hi profile. But our shiny new OneXs can handle hi profile and 720p.
i always use the highest quailty setting regardless of output file size
This page has some recommendation that sounds reasonable. (balance between quality and file size)
http://www.playbluraysoftware.com/?p=462
Format: .mp4
Video Settings
Codec: h264
Size: 1280*720
Bit Rate: 1,200 kbps
Frame Rate: 24fps
Audio Settings
Codec: aac
Sample Rate: 44,100 hz
Bit Rate: 128,000 bps
Channels: Stereo