Page 2 of 5

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

PostPosted: Wed Sep 11, 2013 5:48 am
by tommypacker
http://pastebin.com/W9LCH6Fv
Here's the logcat of when I tried using the video recorder

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

PostPosted: Wed Sep 11, 2013 3:33 pm
by tytung
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).

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

PostPosted: Wed Sep 11, 2013 8:30 pm
by tytung
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?

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

PostPosted: Thu Sep 12, 2013 1:36 am
by tommypacker
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

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

PostPosted: Thu Sep 12, 2013 5:17 am
by tytung
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" .../>

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

PostPosted: Thu Sep 12, 2013 6:25 am
by tommypacker
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

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

PostPosted: Thu Sep 12, 2013 12:26 pm
by tytung
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

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

PostPosted: Fri Sep 13, 2013 12:46 am
by tommypacker
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?

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

PostPosted: Fri Sep 13, 2013 1:44 am
by Odysseus
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.

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

PostPosted: Fri Sep 13, 2013 4:00 am
by tommypacker
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