[Q] Wideband AMR or AAC in Video recording - Nexus One Q&A, Help & Troubleshooting

Taken from:
http://developer.android.com/sdk/android-2.3-highlights.html
Support for new media formats
The platform now offers built-in support for the VP8 open video compression format and the WebM open container format. The platform also adds support for AAC encoding and AMR wideband encoding (in software), so that applications can capture higher quality audio than narrowband.
Click to expand...
Click to collapse
Implementing wideband codecs in video capture would be very nice as the platform now allows it, because at the moment, captured audio in videos is simply very, very bad (8kHz narrowband AMR).
Any dev willing to explain how hard would it be to implement this? Thanks.

Galaid said:
Taken from:
http://developer.android.com/sdk/android-2.3-highlights.html
Implementing wideband codecs in video capture would be very nice as the platform now allows it, because at the moment, captured audio in videos is simply very, very bad (8kHz narrowband AMR).
Any dev willing to explain how hard would it be to implement this? Thanks.
Click to expand...
Click to collapse
Can be done, but first we'll need to fix the video encoder framework problem currently found in gingerbread.

With the OTA ull have both AAC and amrwb encoding, no need to worry about that, just wait for the ota. i have seen the AOSP source for passion, there is implementation of all the new encoders

charnsingh_online said:
..just wait for the ota..
Click to expand...
Click to collapse
Isn't the libs part of AOSP?

No passion has some proprietary libs including camera n omx libs. We also need a new radio to go along with the encoders

charnsingh_online said:
No passion has some proprietary libs including camera n omx libs. We also need a new radio to go along with the encoders
Click to expand...
Click to collapse
One and half month after SDK and waiting...

Well, the OTA is here and the camera still encodes audio in AMR.
Damn.
edit: well, I was wrong! I hadn't looked at the actual file with a computer: it now has AAC audio, 16k sampling rate, 96kbps mono. It also uses the back mic (i don't know if that was the case before)
A higher sample rate would be very nice, but ah well, at least it's something

spamlucal said:
Well, the OTA is here and the camera still encodes audio in AMR.
Damn.
edit: well, I was wrong! I hadn't looked at the actual file with a computer: it now has AAC audio, 16k sampling rate, 96kbps mono. It also uses the back mic (i don't know if that was the case before)
A higher sample rate would be very nice, but ah well, at least it's something
Click to expand...
Click to collapse
Thanks for revivng the thread, I had problems finding it. So as aac is in the game now, is the sound better or just cosmetically better?

spamlucal said:
Well, the OTA is here and the camera still encodes audio in AMR.
Damn.
edit: well, I was wrong! I hadn't looked at the actual file with a computer: it now has AAC audio, 16k sampling rate, 96kbps mono. It also uses the back mic (i don't know if that was the case before)
A higher sample rate would be very nice, but ah well, at least it's something
Click to expand...
Click to collapse
How do you know its using the back Mic?

Related

Official YouTube App

Guys, I use sometimes the youtube app from Google.
Apparently this is easy and efficient application,
BUT it results in quite poor videos quality.
What is strange, on videos of X2 the video gets fullscreen and better quality there.
Is there any way to increase the videos quality on X1 form this native app??
The video quality automatically increases if you use wifi, but its not much of a quality boost. I hope Google issues a Youtube update with higher quality codecs enabled.
emuneee said:
The video quality automatically increases if you use wifi, but its not much of a quality boost. I hope Google issues a Youtube update with higher quality codecs enabled.
Click to expand...
Click to collapse
ok, I see...
Well, strange that on X2 the videos look very good.
Maybe it's an an optimised version of this app?

Camcorder - Any way to change audio encoder/bitrate?

n00b here. Recording a video with the audio at only 8000 Hz sounds like your camera is in a toilet. Are there any 3rd party camera apps that can do 16000 Hz, or maybe a hack for the default app?
I can successfully change bitrate and resolution for video encoding in build.prop, but changing any values for the audio just causes the camera app to force close. Failing at that, I looked up the AMRNB codec and found that it doesn't support 16000 Hz at all anyway. My next misguided idea was to change the default codec stuff from this
Code:
ro.media.enc.hprof.codec.aud=amrnb
...
ro.media.enc.hprof.aud.bps=12200
ro.media.enc.hprof.aud.hz=8000
ro.media.enc.hprof.aud.ch=1
to AAC, like it is in the Droid/Milestone
Code:
ro.media.enc.hprof.codec.aud=aac
...
ro.media.enc.hprof.aud.bps=96000
ro.media.enc.hprof.aud.hz=16000
ro.media.enc.hprof.aud.ch=1
I realize they are different phones, but I figured it was worth a shot. Failed again, naturally.
Can anyone shed some light on this? Why did HTC give us DVD resolution video with only telephone quality audio? That's like having an HDTV with only a piezo buzzer for a sound system. I do not understand this decision at all.
+1
I have noticed this as well, but I assumed it was a hardware restriction.
If there can be any light shed on this let us know!
Really good idea. I was thinking of adjusting the frame rate so that it always remained at a constant 24 fps, rather than going down to 9 fps in indoor conditions. Any suggestions?
gsmsosv said:
n00b here. Recording a video with the audio at only 8000 Hz sounds like your camera is in a toilet. Are there any 3rd party camera apps that can do 16000 Hz, or maybe a hack for the default app?
I can successfully change bitrate and resolution for video encoding in build.prop, but changing any values for the audio just causes the camera app to force close. Failing at that, I looked up the AMRNB codec and found that it doesn't support 16000 Hz at all anyway. My next misguided idea was to change the default codec stuff from this
Code:
ro.media.enc.hprof.codec.aud=amrnb
...
ro.media.enc.hprof.aud.bps=12200
ro.media.enc.hprof.aud.hz=8000
ro.media.enc.hprof.aud.ch=1
to AAC, like it is in the Droid/Milestone
Code:
ro.media.enc.hprof.codec.aud=aac
...
ro.media.enc.hprof.aud.bps=96000
ro.media.enc.hprof.aud.hz=16000
ro.media.enc.hprof.aud.ch=1
I realize they are different phones, but I figured it was worth a shot. Failed again, naturally.
Can anyone shed some light on this? Why did HTC give us DVD resolution video with only telephone quality audio? That's like having an HDTV with only a piezo buzzer for a sound system. I do not understand this decision at all.
Click to expand...
Click to collapse
YES!
I agree 100%. Maybe the idea was to create a suitable MMS birate/container solution w/ no regard to ANYONE else... there has to be a way. in fact I'm excited that you were able to at least play w/ the video and adjust bitrate & res. Care to share how to a layman?
AMR sounds like garbage. In addition to the incredibly low samling frequency, the bitrate is ~ 12.5Kbps. I would say that's a cut below telephone SQ.
Can any people in here far smarter than me, tell us if one can hackney a difference audio codec (say mp3?) as AMR seems too limited to work with. Or maybe a 3rd party app... why are there NONE?
this seems to make it seem possible:
http://developer.android.com/reference/android/media/CamcorderProfile.html
I would really love this on my Desire. Currently both video and audio are crap, audio especially. Here's a little demonstration I made, where I went to see which encoding type is better, mpeg4 or H.264:
http://www.youtube.com/watch?v=CgW28VE0eOo
justin.tv app mitigates this for now, as the video uploaded to justin.tv in near realtime is markedly better than the abysmal quality of the native android app, which just goes to show how dysfunctional it really is.
for now, I'll use justin.tv whenever recording videos... it goes to show that many android phones (inc. my hero) are capable of so much more in the hardware, and the limiting factor is crappy software devs and/or requirements.

[Possible MOD] Editing build.prop to enable 1080p video recording

There a way to change this part of the build.prop to enable 1080p video recording? I tried just changing the resolution to 1920X1080 and lowered the fps to 25 but it didnt do anything.
ro.media.dec.vid.wmv.enabled=1
ro.media.dec.aud.wma.enabled=1
ro.media.enc.hprof.file.format=3gp
ro.media.enc.hprof.aud.hz=44100
ro.media.enc.hprof.aud.ch=2
ro.media.enc.hprof.codec.aud=aac
ro.media.enc.hprof.aud.bps=128000
ro.media.enc.hprof.vid.bps=4000000
ro.media.enc.hprof.vid.width=1280
ro.media.enc.hprof.vid.height=720
ro.media.enc.hprof.codec.vid=h264
ro.media.enc.hprof.vid.fps=30
this would be great!!
Thatsball the phone is missing.
tassadar898 said:
There a way to change this part of the build.prop to enable 1080p video recording? I tried just changing the resolution to 1920X1080 and lowered the fps to 25 but it didnt do anything.
ro.media.dec.vid.wmv.enabled=1
ro.media.dec.aud.wma.enabled=1
ro.media.enc.hprof.file.format=3gp
ro.media.enc.hprof.aud.hz=44100
ro.media.enc.hprof.aud.ch=2
ro.media.enc.hprof.codec.aud=aac
ro.media.enc.hprof.aud.bps=128000
ro.media.enc.hprof.vid.bps=4000000
ro.media.enc.hprof.vid.width=1920
ro.media.enc.hprof.vid.height=1080
ro.media.enc.hprof.codec.vid=h264
ro.media.enc.hprof.vid.fps=30
Click to expand...
Click to collapse
Try that.
10 char
yea tried that didnt do anything. still 1280 X720
I just saw this myself. You may need to up the bit rate if you up the resolution though. Definitely worth playing around with though.
I've also tried this, I think the issue is that the video app doesn't have an option to attempt 1080 video recording. Perhaps a 3rd party app will allow it.
-James
LGcamera maybe?
Have to agree.
jmacdonald801 said:
I've also tried this, I think the issue is that the video app doesn't have an option to attempt 1080 video recording. Perhaps a 3rd party app will allow it.
-James
Click to expand...
Click to collapse
This is correct. It must be enabled in the system, but also in the application.
Sent from my MB860 using XDA App
could it be recording in 1080 but only showint 720 in the app?
aonavy said:
could it be recording in 1080 but only showint 720 in the app?
Click to expand...
Click to collapse
You could try moving the file to a PC and opening to see what the res is there, that'll let you know if it's recording in 1080 or not. But, more than likely, the app would have to allow it as well.
HD 1080 p capable
Capture – 720p MPEG4 and H.264 at 30 fps
Playback – 1080p MPEG4, H.264, WMV, Xvid at 30 fps
(Playback through HDMI is 720p at launch and will be upgraded to 1080p via SW upgrade post-launch)
Streaming – VGA in MPEG4, H.264, H.263 at 30 fps
from http://mediacenter.motorola.com/Fact-Sheets/Motorola-ATRIX-4G-Fact-Sheet-353b.aspx
why not beat motorola to this update
This phone should be able to do 1080p recording no problem. Several reviews before its release stated that if 1080p isn't supported then it would be possible to "enable it easily" via software. The bitrate will definitely need to increase. I'm curious to see if the 720p recordings would also benefit from an increase in kb/s. I am waiting for my Atrix upgrade.. I really want to try out the camera possibilities. I also agree that the kink here is the camera app/software needs to match the settings of the phone. The Atrix will be my first droid and I can't tell you how exited I am at the possibility of 1080p on my phone!
I will gladly test any scripts/apps that anyone posts. Just found this site and I LOVE IT! Thank you to all the devs (amateur and pro) who donate their time here. I plan on donating to a few key people once I get my phone!
*Also, is it possibly to enable more than one recording setting/profile in the "build.prop" file? If that question sounds dumb I'm sorry.
Well, before build.prop mod LGCamera fails to record at 1080p, after mod it records fine with some settings adjustment for the encoder. I, however, am at work for another hour so I cannot check the actual resolution of the recorded files.
Awesome! I'm hoping it works!
do we know for sure this phone has the hardware to handle 1080 recording?
lasersocks said:
do we know for sure this phone has the hardware to handle 1080 recording?
Click to expand...
Click to collapse
They already said it was coming in an update so yeah it is
sent from my Tegra Beast MB860
Upon viewing the recorded "1080p" videos from LGCamera at home... yes, they are in fact recorded at 1080p. It doesn't have the best framerate ever, most likely due to LGCamera, but it is 1080p.
I will check settings and see which looks the nicest...
edit: http://www.youtube.com/watch?v=sfmIPrXNV2w 1080p video from my atrix.
Diviance said:
Upon viewing the recorded "1080p" videos from LGCamera at home... yes, they are in fact recorded at 1080p. It doesn't have the best framerate ever, most likely due to LGCamera, but it is 1080p.
I will check settings and see which looks the nicest...
edit: http://www.youtube.com/watch?v=sfmIPrXNV2w 1080p video from my atrix.
Click to expand...
Click to collapse
I tried LGcamera also and 1080P seems to be working. Sweet.
Sent from my Bell Motorola Olympus.

1080P Video Recording!!!!!!

Alright don't chew my arse if I am not right, but I think I just might be...
Gspot image attached of a 10sec. sample video using the below settings and attached media_profiles.xml
What I have done is edited the build.prop with a new property using Prop Editor:
Code:
ro.media.camcorder.1080p=mp4,h264,60,24000000,aac,128000,44100,2
So property is:
Code:
ro.media.camcorder.1080p
Value:
Code:
mp4,h264,60,24000000,aac,128000,44100,2
I also made changes to the Media_profiles.xml file and have attached that file in zip format.
To install:
Unzip the file
using root explorer go to /System/etc
Rename media_profiles.xml to media_profiles.xml.bak
copy the new media_profiles.xml file to /System/etc
Change permissions to rw-r--r--
Reboot
Open up the camcorder
Goto Settings 1080P Shows HD+ on the screen when recording..
enjoy 1080P video recording...
FYI.. In 720p mode the same 10sec video had a file size of 14MB
In 1080 mode same subject matter video 10 sec. with a file size of 21MB.
Another build.prop edit:
ro.camcorder.videoModes=true
Default is false
This enables Video mode, which includes Video message, Normal, Slow motion, and Fast motion.
Hope this helps!!
The BIG question is, why do you want 1080P recordings? The optics can not really even support 720P and 1080P will not make it look better, probably even worse and the file will be twice as big. Playback of 1080P I can understand.
Just my 0.02
Cheers
nice post, but is the 1080p recording still only 24fps?
Also, to solve the spacing problem in the post, put the lines inside the Code tags
Code:
ro.media.camcorder.1080p=mp4,h264,60,24000000,aac,128000,44100,2
pederb said:
The BIG question is, why do you want 1080P recordings? The optics can not really even support 720P and 1080P will not make it look better, probably even worse and the file will be twice as big. Playback of 1080P I can understand.
Just my 0.02
Cheers
Click to expand...
Click to collapse
Being able to extract any frame and have it 2mp is pretty cool to me. It the highest resolution, if you're playing it on a nice full HD screen, it will fill every pixel. It does look better in 1080p
andy2na said:
nice post, but is the 1080p recording still only 24fps?
Also, to solve the spacing problem in the post, put the lines inside the Code tags
Code:
ro.media.camcorder.1080p=mp4,h264,60,24000000,aac,128000,44100,2
Click to expand...
Click to collapse
I'm actually glad that it's 24fps. If you think, any professional movie on a dvd only plays 24fps. When it gets up to 30fps, it plays faster and looks more like a home video, so I like the 24fps look better.
Thanks for this will try it out tonight!
Sent from my MB860 using XDA Premium App
Not work on Stock rom! At least for me...
It looks better but our software is not optimized to record 1080p yet. So videos are slightly choppy.
Sent from my MB860 using XDA Premium App
Works great on CherryBlur!
Still a little choppy during recording, but the output file is definitely 1080p at 24fps.
Playback is very smooth.
Nice find on the xml file.
Doesn't work for me too!!!
p.s. atrix has far more optics than just 2.5 mpx (1080p)
agurzhiy said:
Doesn't work for me too!!!
p.s. atrix has far more optics than just 2.5 mpx (1080p)
Click to expand...
Click to collapse
same as me
A agurzhiy and yusmiza... Did you change the permissions of the media_profiles.xml to rw-r--r-- and reboot after copying the file over and making the changes in the build prop?
does the front camera work? noticed in you xml you put the high setting for the front cam at 720P
Seems to work for me. At least 720 and 1080 the file sizes were different anyway (for the same time frame) Nothing to really test it on here at work.
edit: When taking pictures the 720 and 1080 file sizes are different also...though both say 3.8 mp still
i just edited myself!
Please tell me the version of your FW and is it a stock camera?
p.s. i do not care 1080, i need SloMo, but my buildProp has on default ro.camcorder.videoModes=true
Default was true for me
running Ken's GB beta 4 and yes stock camera
i'll try to copy your file. I found slomo and fastmo
but both of them, while playing are just usual video. Nothing faster, nothing slower, despite the fact that camera on slomo each second counts as 3 seconds (so it shows after 3 seconds that 9 seconds were recorded)
y2... Thanks for catching that!! I didn't realize I didn't put the front camera setting back to norm.. My front Camera doesn't work due to a swimming pool incident with my Atrix, but it will usually come up with a black screen.. now I get a FC.. I will make the appropriate changes and update the file.. Let me know if the new file lets the front cam work on yours...
agurzhiy said:
Doesn't work for me too!!!
p.s. atrix has far more optics than just 2.5 mpx (1080p)
Click to expand...
Click to collapse
the optics don't matter, it's the sensor. the sensor is also not able to capture constant data at the full 5 MP (video); it can take pictures at that level but it can't handle video at that level. that's why whenever you record a video on you digital camera, it's at a much smaller resolution, or why when you do burst-mode on some cameras, the maximum size is smaller than the regular MP rating.
agurzhiy said:
i'll try to copy your file. I found slomo and fastmo
but both of them, while playing are just usual video. Nothing faster, nothing slower, despite the fact that camera on slomo each second counts as 3 seconds (so it shows after 3 seconds that 9 seconds were recorded)
Click to expand...
Click to collapse
ag.. Mine records like you said counts as 3, but will play back slow. I do have the app HERE loaded as well...

[PATCH] Camera patch for grouper blobs

Alright, as promised, the camera patch for all ROMs using the grouper blobs.
First of all, a very big thanks to @Adam77Root, cause without him, none of this would have been possible.
This patch allows the camera to use the old nvomx, which fixes the encoder issues. However, this breaks the hardware decoder of the stock gallery. And using software decoder, lags are inevitable. But, you can still play HD videos using MX player.
To revert this, either restore a system backup, re-flash your ROM or flash the "Cam_revert_patch.zip" from the Attachment.
@ROM devs, please don't include this patch into your ROMs, but rather link to this thread. Not being able to use the read hw decoder can cause confusion and false bug reports, which is why I want people to read this first, before using the patch
Good idea!
tested the patch, works wonderfully. thank you!
As above working flawlessly as it should good work you are one step to make everything fully working
Sent from my LG-P880 using Tapatalk
Can anyone test Skype videocall? Because for me it doesn't work, it gives me the same error as without the patch (green screen instead of the video). I can record videos though.
Also it works with the new omni buils (the ones reverted to old blobs) and all other official roms that use old blobs.
qr decoding/skype still doesn't work - this is just a fix for video recording
I would really like a revert patch, because I would like to install the patch when I want to take a video and simply uninstall it when I want to use the gallery.
I also add that this patch breaks Youtube app
Nagass said:
I also add that this patch breaks Youtube app
Click to expand...
Click to collapse
Confirmed, output when playing a video is only black screen
breaks also flashplayer...
Nagass said:
I also add that this patch breaks Youtube app
Click to expand...
Click to collapse
JustChris20 said:
breaks also flashplayer...
Click to expand...
Click to collapse
Of course, it breaks almost all video decoding stuff, especially YT. This is why don't want devs to include it into ROMs.
MX player is more-less the only exception
in addition the recorded Videos are really "not good". The framerate is not stable. One video I recorded has 13 fps, the next 22 fps. Stable 25fps seems not possible.
So I would really appreciate a revert patch, dont want to flash all the rom again
Climuff said:
in addition the recorded Videos are really "not good". The framerate is not stable. One video I recorded has 13 fps, the next 22 fps. Stable 25fps seems not possible.
So I would really appreciate a revert patch, dont want to flash all the rom again
Click to expand...
Click to collapse
you were watching this videos on gallery app ?? or mx player with s/w decoding chosen? or on your pc?
i didnt faced such problem.. only when u watch video you recorded on gallery it OFC will lag...
I watched the videos on my pc, I read the framerate out with standard windows and also with adobe premiere pro cs5.
Climuff said:
I watched the videos on my pc, I read the framerate out with standard windows and also with adobe premiere pro cs5.
Click to expand...
Click to collapse
What's your recorded resolution?
About the revert patch, I'm on it
I recorded in 1080p H.264 with LED on and USB connected. Video was saved on internal storage.
Climuff said:
I recorded in 1080p H.264 with LED on and USB connected. Video was saved on internal storage.
Click to expand...
Click to collapse
What's the bitrate of the recorded vid?
BTW, revert patch added to the OP
laufersteppenwolf said:
What's the bitrate of the recorded vid?
Click to expand...
Click to collapse
this one which ended up with 13 fps is 11.5 mbits and this one which has 22 fps is 10.3 mbits.
Climuff said:
this one which ended up with 13 fps is 11.5 mbits and this one which has 22 fps is 10.3 mbits.
Click to expand...
Click to collapse
Will do some troubleshooting tomorrow, gonna let you know if I find anything
Alright, as already mentioned HERE, we have a new way to switch between video playing and recording, a more "on the go" version
For details and how to use it, please take a look into the linked post
Now, some more explanation, the new patch "nameless_patchV2" is not only for nameless, but all ROMs built using p880-dev's android-4.4 branch, such as NamelessROM, Omni, Thinkingbridge, ...
Just flash the patch and you can switch blobs as explained.
The patch for CM11 (the cm-11.0 branch) is in the making

Categories

Resources