Hardware video encoding (video recording) and decoding (720p video playback)

Android development for Google Nexus One
Moderator: Forum Moderator

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby tommypacker » Wed Sep 11, 2013 5:48 am

http://pastebin.com/W9LCH6Fv
Here's the logcat of when I tried using the video recorder
tommypacker
Junior Member
 
Posts: 41
Joined: Tue Sep 03, 2013 4:55 am
Country: United States (us)
Has thanked: 22 times
Been thanked: 10 times

Advertisement
 

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby tytung » Wed Sep 11, 2013 3:33 pm

tommypacker wrote:You were right, I just needed to remove the button_light_off script and the buttons tarted working. What is that for anyways?

Without the button_light_off script, HD2's button light will be on when touching the 'screen' (correct behavior is to press the hardware button).
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby tytung » Wed Sep 11, 2013 8:30 pm

tommypacker wrote:http://pastebin.com/W9LCH6Fv
Here's the logcat of when I tried using the video recorder


Thanks. Please try to edit /system/etc/media_profiles.xml and change mp4 to h264.
Original:
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">

New:
<EncoderProfile quality="480p" fileFormat="h264" duration="60">

Reboot and try again.

BTW, is 720p video playback working or not? If not, any logcat?
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby tommypacker » Thu Sep 12, 2013 1:36 am

tytung wrote:
Thanks. Please try to edit /system/etc/media_profiles.xml and change mp4 to h264.
Original:
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">

New:
<EncoderProfile quality="480p" fileFormat="h264" duration="60">

Reboot and try again.

BTW, is 720p video playback working or not? If not, any logcat?


I get a bootloop when I try to make thse edits both on my computer and phone
http://pastebin.com/YZ10M7Pc

I'll try out 720p playback
tommypacker
Junior Member
 
Posts: 41
Joined: Tue Sep 03, 2013 4:55 am
Country: United States (us)
Has thanked: 22 times
Been thanked: 10 times

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby tytung » Thu Sep 12, 2013 5:17 am

tommypacker wrote:
I get a bootloop when I try to make thse edits both on my computer and phone
http://pastebin.com/YZ10M7Pc

I'll try out 720p playback

F/MediaProfiles( 121): frameworks/av/media/libmedia/MediaProfiles.cpp:337 CHECK(fileFormat != -1) failed.

File media_profiles.xml is corrupted.

Update:
Sorry. My fault.
from m4v to h264
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
<Video codec="m4v" .../>

<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
<Video codec="h264" .../>
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby tommypacker » Thu Sep 12, 2013 6:25 am

tytung wrote:
File media_profiles.xml is corrupted.

Update:
Sorry. My fault.
from m4v to h264
<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
<Video codec="m4v" .../>

<EncoderProfile quality="480p" fileFormat="mp4" duration="60">
<Video codec="h264" .../>


Okay, so now we're at the point where the video recording stops successfully and doesn't freeze up the phone. However, the video fails to save
http://pastebin.com/89XsYM0G

Update:
I found this line interesting
V/CAM_VideoModule( 4239): Deleting video /storage/sdcard0/DCIM/Camera/VID_20130911_222253.mp4.tmp
tommypacker
Junior Member
 
Posts: 41
Joined: Tue Sep 03, 2013 4:55 am
Country: United States (us)
Has thanked: 22 times
Been thanked: 10 times

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby tytung » Thu Sep 12, 2013 12:26 pm

tommypacker wrote:
Okay, so now we're at the point where the video recording stops successfully and doesn't freeze up the phone. However, the video fails to save
http://pastebin.com/89XsYM0G

Update:
I found this line interesting
V/CAM_VideoModule( 4239): Deleting video /storage/sdcard0/DCIM/Camera/VID_20130911_222253.mp4.tmp


Okey, it's using software video encoder [OMX.google.h264.encoder].
Code: Select all
317:   I/SoftAVCEncoder( 2757): Construct SoftAVCEncoder
318:   I/OMXCodec( 2757): [OMX.google.h264.encoder] setVideoInputFormat width=640, height=480


When changing the codec from m4v to h264, we need to enable the hardware video encoder for h264 [OMX.qcom.video.encoder.avc] in /system/etc/media_codecs.xml

You can flash Desire_HW_video_decoding_and_encoding-h264_for_CM-10.2_update.zip directly.
Modified files media_profiles.xml and media_codecs.xml for h264 are included.

BTW, you could upload your logcat to http://logcat.miui.us/
The logcat will be highlighted so that it's more readable.
For example, your previous logcat. http://logcat.miui.us/2094001
Paste your logcat to GitHub Gist or any similar websites, and link it in your post if you need any help. (Don't forget to tell us your HD2 setup/configuration.)

Device: HTC HD2 (LEO512)
HSPL: 2.08.HSPL
Radio: Leo_RADIO_2.15.50.14
Bootloader: MAGLDR v1.13
Recovery: ClockworkMod Recovery 5.0.2.6

My work for Android on HD2:
Image
User avatar
tytung
Site Admin
 
Posts: 588
Joined: Sun Jun 09, 2013 2:12 pm
Country: Taiwan (tw)
Has thanked: 204 times
Been thanked: 1349 times

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby tommypacker » Fri Sep 13, 2013 12:46 am

tytung wrote:
Okey, it's using software video encoder [OMX.google.h264.encoder].
Code: Select all
317:   I/SoftAVCEncoder( 2757): Construct SoftAVCEncoder
318:   I/OMXCodec( 2757): [OMX.google.h264.encoder] setVideoInputFormat width=640, height=480


When changing the codec from m4v to h264, we need to enable the hardware video encoder for h264 [OMX.qcom.video.encoder.avc] in /system/etc/media_codecs.xml

You can flash Desire_HW_video_decoding_and_encoding-h264_for_CM-10.2_update.zip directly.
Modified files media_profiles.xml and media_codecs.xml for h264 are included.

BTW, you could upload your logcat to http://logcat.miui.us/
The logcat will be highlighted so that it's more readable.
For example, your previous logcat. http://logcat.miui.us/2094001


When I try uploading to that website, I get this error
Traceback (most recent call last):
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 716, in __call__
handler.post(*groups)
File "/base/data/home/apps/logcatbin/1.350841285131101349/main.py", line 91, in post
logcat.put()
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1070, in put
return datastore.Put(self._entity, **kwargs)
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/datastore.py", line 602, in Put
return PutAsync(entities, **kwargs).get_result()
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 612, in get_result
return self.__get_result_hook(self)
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 1601, in __put_hook
self.check_rpc_success(rpc)
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 1234, in check_rpc_success
rpc.check_success()
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 578, in check_success
self.__rpc.CheckSuccess()
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 133, in CheckSuccess
raise self.exception
OverQuotaError: The API call datastore_v3.Put() required more quota than is available.



Also, the zip says Desire, is that a mistake?
tommypacker
Junior Member
 
Posts: 41
Joined: Tue Sep 03, 2013 4:55 am
Country: United States (us)
Has thanked: 22 times
Been thanked: 10 times

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby Odysseus » Fri Sep 13, 2013 1:44 am

tommypacker wrote:
When I try uploading to that website, I get this error
Traceback (most recent call last):
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/ext/webapp/_webapp25.py", line 716, in __call__
handler.post(*groups)
File "/base/data/home/apps/logcatbin/1.350841285131101349/main.py", line 91, in post
logcat.put()
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1070, in put
return datastore.Put(self._entity, **kwargs)
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/datastore.py", line 602, in Put
return PutAsync(entities, **kwargs).get_result()
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 612, in get_result
return self.__get_result_hook(self)
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 1601, in __put_hook
self.check_rpc_success(rpc)
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/datastore/datastore_rpc.py", line 1234, in check_rpc_success
rpc.check_success()
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 578, in check_success
self.__rpc.CheckSuccess()
File "/base/data/home/runtimes/python/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 133, in CheckSuccess
raise self.exception
OverQuotaError: The API call datastore_v3.Put() required more quota than is available.



Also, the zip says Desire, is that a mistake?


I could be wrong, but it's probably not a mistake. Remember the HD2 isn't a native Android phone. Much of the development for it, especially early development, was lifted directly from the Desire and Nexus One. They have similar hardware so their setup will also be similar.
Current device: HTC Amaze 4G
Bootloader: HTC - Dev unlocked, S-on
Recovery: 4ext - smart flash enabled
ROM: CM-10 - Compiled and customized by me - thanks spostsstar89 - CM - Team Nightmare
Xposed framework - rovo89
GravityBox - C3C076

Previous device: HTC HD2 (TMOUS - LEO1024)
Final ROM: NexusHD2-JellyBean-CM10.1.3 v2.7 - Tytung
Had more lives than a cat, best handset I ever owned
Lesson: If it ain't broke, don't fix it!
RIP
User avatar
Odysseus
Recognized Contributor
 
Posts: 117
Joined: Sun Jul 07, 2013 10:44 pm
Location: Miami, FL
Country: United States (us)
Has thanked: 89 times
Been thanked: 132 times

Re: Hardware video encoding (video recording) and decoding (720p video playback)

Postby tommypacker » Fri Sep 13, 2013 4:00 am

Odysseus wrote:
I could be wrong, but it's probably not a mistake. Remember the HD2 isn't a native Android phone. Much of the development for it, especially early development, was lifted directly from the Desire and Nexus One. They have similar hardware so their setup will also be similar.

I hope this helps.

That not related to what we were talking about. I believe that you are mistaken

Sent from my Infuse 4G with Scott's BEANSTALK ROM
tommypacker
Junior Member
 
Posts: 41
Joined: Tue Sep 03, 2013 4:55 am
Country: United States (us)
Has thanked: 22 times
Been thanked: 10 times

PreviousNext

Return to Nexus One Android Development

Who is online

Users browsing this forum: No registered users and 0 guests