C# software development with OpenGL ES - Touch Pro, Fuze Themes and Apps

I'm making a kind of music program mostly for entertainment value, using C# and OpenGL ES. I'm calling into Windows Media Player from my program.
I come from pre-existing 3D engines, so I'm just wondering what the best way to draw a pixel-precise image to the screen in OpenGL is - IE if I have a 64x64 bitmap and place it at 0, 0, I expect it to go from 0, 0 to 63, 63 and that's it. This way I can detect when the image has been touched - thus a bitmap button.
I tried using GDI, but it flickered terribly with the OpenGL rendering, even after placing the draw call after the OpenGL rendering was complete.
Does anyone have any pointers for me? Thanks in advance and thanks to the community for everything.

AndyCR said:
if I have a 64x64 bitmap and place it at 0, 0, I expect it to go from 0, 0 to 64, 64 and that's it.
Click to expand...
Click to collapse
If it's a 64x64 bitmap and it starts at 0,0, I would rather expect it to go to 63x63 otherwise buffer should represent a bitmap of 65x65, isn't it ?
It's like a byte, can have 256 values from 0 to 255

You caught me. I'll edit it to reflect that. (I thought it looked wrong, but decided not to change it.)

DrawTexOES(). You can look it up against the Khronos OpenGL ES docs, and my KaiserGL SDK in the Kaiser software thread.
Don't mix GDI with OpenGL ES.

Related

nexus one video conversion with handbrake

Hi,
Anyone tried using handbrake to do video conversion to mp4 h.264? I'm using 0.9.4 and not having much luck. All i get out is the audio. I can convert to 480x320 resolution on Videora but trying to get 800x480, or something close to that resolution. So i have this video i want to convert and in Handbrake i used the native 720x304 screen size at 24fps. I think i tried 29.997fps too. I am wondering if the bitrate needs to be some specific multiple like 768kbps or 1.5Mbps. Is there a configuration that will work with the Nexus? Thanks in advance.
[update] so i stumbled upon this link that may or may not help.
http://matthodology.com/n1/2010/03/02/convert-movies-for-viewing-on-nexus-one-using-handbrake/
i will try it out tonight and let you folks know.
[update2] hey what do you know, it works! i used the "iPhone & iPod Touch" preset and it looked pretty good. exciting! need to experiment with more videos. follow the instructions in the link and make sure you adjust the width appropriately. definitely don't try a resolution that is over the source resolution, that's just wasteful! hehe
I know the physical sizes of the iPod/iTouch are about the same, but isn't the resolution 2 times less?
Nexus One Resolution: 800 x 400 = 320,000 Pixels
Iphone Resolution: 480 x 320 = 153,600 Pixels
2.08 times less?
It would seem you are not getting near the resolution the phone is capable of.
my problem was Handbrake was saving everything as .m4a. Change your extension to .mp4 if you haven't already done so.
ccunningham83 said:
I know the physical sizes of the iPod/iTouch are about the same, but isn't the resolution 2 times less?
Nexus One Resolution: 800 x 400 = 320,000 Pixels
Iphone Resolution: 480 x 320 = 153,600 Pixels
2.08 times less?
It would seem you are not getting near the resolution the phone is capable of.
Click to expand...
Click to collapse
somehow that particular preset works, you can adjust the output resolution in the first tab. from what i'm seeing it seems like it's working. i will use a media tool to check the resultant file's resolution tonight. good point though.
The Windows Mobile part of the forum has a great application that has thus far worked great for me.
HD Encoder by projection:
http://forum.xda-developers.com/showthread.php?t=467112
I actually just got handbrake set up doing video conversions for the Nexus, but it's at home. If I remember correctly, I used the iPod settings, then changed a couple of values (namely setting the width to 800 by default and letting it keep aspect ratio) and set a preset. Looks fantastic on the Nexus, I'll try to see if I can export the preset somehow when I get home and send it your way.
Swervo said:
I'll try to see if I can export the preset somehow when I get home and send it your way.
Click to expand...
Click to collapse
Looking forward to this
try format factory... it has a preset for the N1
Handbrake is great , has alot of options, as usual it is only good if you know what you are doing, so we need a preset that WORKS.
right now I'm testing HD Encoder by projection, runnig it on Ubuntu usin Wine 1.2 Beta , well it has ceashed ... will test more.
The good thing is you have just 3 options ... so it's easy to use
OrganizedFellow said:
Looking forward to this
Click to expand...
Click to collapse
Rats, I can't seem to find a way to export a preset, so I'll just try to type out what I set. I know I started with the iPod preset:
On Picture, I have Width = 800, then click "Keep Aspect Ratio" and let it populate height. Anamorphic set to "None", Cropping set to "Automatic".
On Video Filters, everything is set to Off and unchecked.
On Video, Video Codec is H.264 (x264), Framerate is "Same as source", Avg. Bitrate is checked with the value of "1500"
On Audio, the one track is set as Source: Automatic, Audio Codec: AAC (faac), Mixdown: Stereo, Samplerate: 48, Bitrate: 128, DRC: 0.0.
Nothing special for Subtitles or Chapters
Advanced I've got:
Reference Frames: 1
B-Frames: 0
Motion Estimation Method: Uneven Multi-Hexagon
Subpixel Motion Estimation: 6
Motion Estimation Range: Default (16)
Analysis: All
8x8 DCT: Unchecked
CABAC Entropy Coding: Unchecked
Psychovisual Rate Distortion: Greyed, all the way left.
No Fast-P-Skip: Checked
No DCT-Decimate: Unchecked
Deblocking: Both on Default.
Hope that helps!
JHaste said:
try format factory... it has a preset for the N1
Click to expand...
Click to collapse
how do you like that converter so far? how long does it take you to convert a full movie like district 9? i'm using aimersoft.com and they also have a N1 preset and add subtitles from srt files. you guys can get it free via torrent
Nexus One Handbrake Preset
Swervo said:
Rats, I can't seem to find a way to export a preset, so I'll just try to type out what I set. I know I started with the iPod preset:
On Picture, I have Width = 800, then click "Keep Aspect Ratio" and let it populate height. Anamorphic set to "None", Cropping set to "Automatic".
On Video Filters, everything is set to Off and unchecked.
On Video, Video Codec is H.264 (x264), Framerate is "Same as source", Avg. Bitrate is checked with the value of "1500"
On Audio, the one track is set as Source: Automatic, Audio Codec: AAC (faac), Mixdown: Stereo, Samplerate: 48, Bitrate: 128, DRC: 0.0.
Nothing special for Subtitles or Chapters
Advanced I've got:
Reference Frames: 1
B-Frames: 0
Motion Estimation Method: Uneven Multi-Hexagon
Subpixel Motion Estimation: 6
Motion Estimation Range: Default (16)
Analysis: All
8x8 DCT: Unchecked
CABAC Entropy Coding: Unchecked
Psychovisual Rate Distortion: Greyed, all the way left.
No Fast-P-Skip: Checked
No DCT-Decimate: Unchecked
Deblocking: Both on Default.
Hope that helps!
Click to expand...
Click to collapse
Thanks for this.
I am able to export presets, so after I'm done converting "Fight Club", if the settings worked, I'll update my reply with the preset attached.
[edit]
15 hours to encode...fuxit.
The preset (using Swervo's info in the above post) is attached. Remove the .txt extension.
Just downloaded and installed Format Factory... where's the Nexus One preset?! Under Google, there are two for a device called GX... neither with the correct resolution.
uansari1 said:
Just downloaded and installed Format Factory... where's the Nexus One preset?! Under Google, there are two for a device called GX... neither with the correct resolution.
Click to expand...
Click to collapse
Did you find the nexus preset...I can't find it myself
I just use the iPhone/iPod Touch setting, the resolution is lower, but it looks fine and keeps the file size down. I've converted seasons of TV shows and it works great
icegad said:
Did you find the nexus preset...I can't find it myself
Click to expand...
Click to collapse
Yeah... go to HTC/Dopod 800X480 AVC. Default settings work perfectly.
How long does converting a 700mb video in format factory take.its been 3 hrs and I'm at 72%. Is this normal?
I use to have a BB and I used this guide:
http://forums.crackberry.com/f135/dvd-storm-walkthrough-pictures-107961/
It worked on my BB and it works flawlessly on my N1.
icegad said:
How long does converting a 700mb video in format factory take.its been 3 hrs and I'm at 72%. Is this normal?
Click to expand...
Click to collapse
It depends on your computer's specs... but even on my laptop, which is running a core2 duo with 3gb of ram, it takes about 60% of the time of the length of the movie, or maybe a little less.
lol, takes me 7-12 minutes to encode a 2hr movie to 80% of original size

Chisleu's "Things I Learned" Thread (GPS/Video convertion/etc/etc)

The first post is always updated to show the "how to do it quick" that I arrive at after my long series of "doing it painfully slow." All the other posts are simply notes I share while "doing it painfully slow."
I'm always trying to remember something I forgot, never something I remember.
I'm also new to the platform so I'm remembering things for the first time, which makes this a perfect time to document these learnings.
Sharing files over Wifi with Tablet:
http://www.redmondpie.com/access-ftp-sites-natively-in-windows-7/
I followed these simple directions to map the tablet's FTP sever as a network drive. What FTP server? I'm using "File Expert" which seems to work well. There are many other apps available as well.
Using an external bluetooth:
Download "Bluetooth GPS" from the market. This will allow you to import the gps data. You have to turn on GPS on the tablet and enable mock gps locations in the menus (instructions in application in market.)
Rooting my (just about any) Android Phone
SuperOneClick: http://forum.xda-developers.com/showthread.php?t=803682
Wow that was easy! Rooted my android 2.1 mb200 (Cliq) in 30 seconds. You need the drivers for your phone which you can get from the phone manufacturer's site. I got something called "MotoHelper" from Motorola's site.
Using your phone as a Wifi Hotspot:
android-wifi-tether is the program of choice. If your phone doesn't have a kernel that supports IP tables it won't work. Most phones probably don't have firewall capabilities loaded into them by default! If you want to do that: they support many phones. Check um out.
If you don't want to change the kernel and your phone is rooted, you can use the "Barnacle Wifi Tether" from the market. It turns the device into a mobile hotspot you can access with your android tablet. Works great!
Using your phone as an External Bluetooth GPS device:
Don't think it requires rooting. There are a lot of apps (a lot.. omg) that claim to do it. I was able to find ONE that actually works, for 10 minutes at least. It's only $1.50CDN (if you can get that **** to work) or $1.99 directly to unlock. Works great! It's in the market called "Bluetooth GPS Output". You can buy the $1.99 unlock code from their website. I spent hours hunting something free. haha
Watching video on CM7 (pre-hardware acceleration)
*NOTE* Getting audio in-sync is near impossible. I've given up. I don't think there is a way of accomplishing this without DSP support.
Download "MoboPlayer" and install w/ your favorite app installer. I use "File Expert" because of it's FTP server capabilites making copying super easy and wireless for me.
MoboPlayer is superior to RockPlayer for gingerbread (cm7) for software decoding. It has a silly "skip" button you have to hit when you start up. Not sure how to get rid of that. Yet.
Above is now depreciated with hardware accelerated video working in cm7.
Download the latest version of "Handbrake". I have attached a zipfile with a preset in it that you can import by clicking preset->import. You should then see a preset called "Chisleu High Quality (imported)" on the right side of the screen.
Step 1: Open your file to be converted
Step 2: Select the Preset
Step 3: Change your resolution if it is larger than 854x480.
854x480 is the maximum so set the width to 854 and make sure the width is under 480 (should be) but if not change it so the width and height are under 854x480.
It will always default to the original resolution if it is smaller than 854x480. It should default to 854x480 max if the source is higher resolution. If it doesn't include the 854x480 max, when you select it to encode a video, change the resolution to 854 width and save the preset.
Pairing/Using Zoom 9010 Bluetooth Mini Keyboard w/ NCEncore
Hit the button on the bottom of the keyboard. Go to the bluetooth menu and select the device to pair. It will ask for a pin. Type in 1234 into the tablet. THEN type 1234 into the keyboard and hit enter on the keyboard. Enjoy keyboard!
More to come!
These are notes I made while making the "howto" which is in the first post. The final steps needed are above. If you are hacking your way through this stuff and looking for insights, the stuff below could be helpful. If you are looking for "how do I do this fast" then don't read this stuff, just refer to the first post!!!
Watching video on CM7 (pre-hardware acceleration)
Rockplayer seems to work very well. I'm hoping to figure out the "ideal" formatting for software decode.
It seems everyone has their favorite way to pull this off... I'm using the free program "Handbrake" to convert video files over.
Well, I have reasonable quality video playing well but the sound is being a problem. With my last conversion, the sound will just stop playing after a while and you have to move the video slider around a little to get it to start back up. not good.
848x480 video seems to be pushing it and the quality isn't that much better than 720, so I'm going to limit myself to 720x480max video.
Sample rate 48 audio was very quiet, turns out 41 is too! Use the DRC slider in the audio tab -> 4 to help compensate. I also turned the volume on the speaker up 10db w/ thee "DSP Manager" that comes with the distribution. Helps to boost the volume to less silent levels. Workable, but headphones of some sort are still required IMHO.
Nope. Still crappy. Worried I won't be able to play anything past cartoons!
Update: Rockplayer sucks!!! (for me, on this platform, etc, etc)
http://moboplayer.com/moboplayer_en.html
At another's direction, the v7 "Neon" version of Moboplayer is EPIC. Works much better. It plays my encoding of "BBC Planet Earth - Jungles 1080p". On a side note, if you haven't seen the Planet Earth series, get it. It is super fun to watch. very interesting.
I used these settings:
720x400 (720 max w/ automatic height)
48k / 128kbps AAC/faac audio.
51 minutes is 765mb. Pretty huge.
I mostly used the direcitons provided here:
http://www.androidtablets.net/forum...using-handbrake-convert-video-nook-color.html
(3) On the Presets window, select High Profile.
(4) Click on the Source button, and load the video file you want to convert.
(5) Click the Browse, and select a destination and file name for the MP4 video file you will create.
(6) Go to the Picture tab. Set the Anamorphic menu to None. Enter 720 in the Width box, and check the Keep Aspect Ratio button. The Height should automatically adjust.
(7) Go to the Video Filters tab. Set Detelecine and Decomb to Off.
(8) Go to the Video tab. If you are using DVD source video, or standard resolution video, leave the Framerate option as Same as source. If your source is HD video (60fps), change the Framerate to 29.97.
(9) Go to the Audio tab. How many tracks appear? The goal is to end up with one track with an Audio Codec that shows up as AAC (faac) or MP3 (lame). If there are others, right click and remove them. On the remaining track, set Mixdown to Stereo, Samplerate to 48, and Bitrate to 128.
(10) Skip the Subtitles and Chapters tabs.
(11) Go to the Advanced tab. Set Maximum B-Frames to 0, and uncheck the CABAC Entropy Coding, 8x8 Transform, and Weighted P-Frames options.
Click to expand...
Click to collapse
I'm currently converting "Back To The Future 720p":
720x400:
average bitrate 800kbps (2pass)
44.1/128 MP3(lame)
Remember to jack up the DRC (I've been using the max setting of 4) which will help compensate for the low speaker volume. I also configured the DSP EQ for up to 5db of boost (mid range) curving down to 1db at the extremities.
Damn I love this platform.
EDIT: Retried my 854x480 conversion (high bitrate, 1gig/51minutes) It plays just great with MoboPlayer Neon. I'm going to watch the low bitrate encode of Back To The Future 720p (720x400 ~800kbps video 766meg/1:56). It is transfering now but my firewall isn't N-capable so it's slow!
I'm mainly checking to see if that quality is decent (low bitrate and 2 pass encoding)
Then I'm going to do a "final settings" encode to test out max quality.
I'm also going to do a 1024x600 video just to see if it's possible to play. I think it's probably overkill. I think the playback will suffer. 854 seems to really eat CPU as it is. We will see.
EDIT: Downloaded a 1 minute 1080p test video to use to test resolutions/such with to speed things up a bit.
http://www.fileserve.com/file/SdtfFxh/hd_other_sony_hd_experiment.m2ts
EDIT: Droid does!!! DRC doesn't! Specifically, it doesn't boost volume very much. It is really just normalization. Not encoding using DRC anymore. If you want to watch videos... use headphones.
EDIT: Wow, much faster using a 1 minute file plus the math is easy to determine 1 hour file sizes. hehe.
EDIT: 1024 width doesn't play.
EDIT: Uhm, maybe it does. for some reason MoboPlayer is calling it HD and trying to play in hardware. I can play the 854 w/ software decode so I'm reencoding... stop deleting stuff even if it doesn't work the first time dude...
EDIT: so.... many... variables....
EDIT: door to door salespeople suck... no this isn't an ipad, and no I don't want your cleaning products.
EDIT: Got a quality configuration working!
My 1 minute test video ended up at 5,487KB which puts us at roughly 330MB per hour. Acceptable size for me. This is a 2-pass 600kbps video stream. The 500kbps had noticeably less quality. Higher quality encoding does improve quality, but seems to have video sync issues.
Encoding a lower resolution (but longer) file now w/ my settings to test.
Successful video!!!! I converted Zombieland.720p into the format above and she plays wonderfully in software mode with no sync issues!!! Fantastic!!!
If you are looking to convert video for travel or the like, this is the ticket!
Feed your source material into HandBrake, select the Universal preset, get rid of the AC3 soundtrack if it's included in the source (since all you really need is the 2 channel stereo track), add subs if required, encode, put it on the NOOK Color, you're done.
No need for two-pass encoding as HandBrake's newer CRF based encoding methodology (for the x264 encoder) saves time and gets pretty much equal results in half the time.
People really overcomplicate this encoding for the NOOK Color, way too much. It's not that hard. The Universal preset will adjust the resolution to fit (the NOOK Color has a maximum video pixel width of 854, period), and it uses a good baseline profile (what the NOOK Color is designed to play) without issues.
Everything is already in that preset, ready to go, and you're not really going to get much better quality with all the fiddling, all the command line options, etc.
Source > HandBrake > Universal preset > drop AC3 track, set bitrate as desired for audio > Encode > Put it on the device > Enjoy the movie.
Simple.
I love different opinions!
br0adband said:
No need for two-pass encoding as HandBrake's newer CRF based encoding methodology (for the x264 encoder) saves time and gets pretty much equal results in half the time.
Click to expand...
Click to collapse
2 pass is vastly superior for file size. If you don't care about file size, ya you can use a larger file with great quality. But if you care about sizes (ie, using a CR of 40, which I did) it looks like crap. 2 pass encoding is vastly superior because it allows smaller size with dynamic bitrates and higher quality.
I'm not the "lazy" guy. I don't mind taking the time to figure out the way that is best for me. I am simply sharing that knowledge. A google search will reveal tons of different ways of doing this.
br0adband said:
Everything is already in that preset, ready to go, and you're not really going to get much better quality with all the fiddling, all the command line options, etc.
Click to expand...
Click to collapse
That preset is also 720 width, not 854. I'm trying to maximize quality, minimize file size, and stay compatible with the hardware accelerator. Of course, once hardware accel comes out, one can up the kbps to 1000-1200 if you wish, although I do not feel it is needed.
My setup generates files ~ 320mb per hour. Comparable static bitrate quality would be much larger.
br0adband said:
Simple.
Click to expand...
Click to collapse
Now that Handbrake has the ability to import presets, it's super easy for people. Import the file (once) select the file, select the preset, change the resolution. done. super simple.
Of course this is only intended for CM7 users.
chisleu said:
Flash 10.2 (leaked)
[...]I would expect it will work much better on nookie froyo. so much so that I'm going to use my SD card to boot nookie and try!
Click to expand...
Click to collapse
Did it work on Froyo, and if so, did you notice any improvement?
TJNooker said:
Did it work on Froyo, and if so, did you notice any improvement?
Click to expand...
Click to collapse
It "worked" on nookie froyo and rooted 2.1 (bn 1.1) to begin with (flash 10.1) but I would expect that 10.2 would give a dramatic improvement. The increase on CM7 was dramatic. I don't have a working froyo build to test though. enjoying CM7 too much.
br0adband said:
the NOOK Color has a maximum video pixel width of 854, period
Click to expand...
Click to collapse
Actually software viewers will play up to a 1024x600 file at full screen. Anything less is scaled (software) up to that.
The hardware encoder will up/down scale to 854x480.
Also I just used your instructions above which is RF:20 encoding. that's ~19mb per minute. Compared to ~5.5 w/ my settings. The quality is noticably higher, but it could be accomplished w/ 1000-1200kbps settings with 2 pass. (9-11MB/min)
Also video sync is still an issue for some reason. I'm not sure what the problem is anymore.
I'm on the new 3/15/11 test version including DSP video support. It works and it stays in sync but the framerate is garbage. It's roughly 5-15dps at any given time. Progress is sexy.
It looks like we really just need DSP support if we are going to play videos in sync.
chisleu said:
It "worked" on nookie froyo and rooted 2.1 (bn 1.1) to begin with (flash 10.1) but I would expect that 10.2 would give a dramatic improvement. The increase on CM7 was dramatic. I don't have a working froyo build to test though. enjoying CM7 too much.
Click to expand...
Click to collapse
How did you get flash running on stock eclair?
ace7196 said:
How did you get flash running on stock eclair?
Click to expand...
Click to collapse
I can not remember if I did or not. I believe there is a flash for 2.1 apk floating around if you look.
Chisleu,
why dint you try Vitalplaer neon. It has way better software encoding then rockplayer and moboplayer. Its the best I found so far fo xvid movies
zorvalth said:
Chisleu,
why dint you try Vitalplaer neon. It has way better software encoding then rockplayer and moboplayer. Its the best I found so far fo xvid movies
Click to expand...
Click to collapse
It seems to stay in sync more, but it also lags more. It also has ads on the bottom of the screen. I did try it, but as soon as I saw the ad I realized it wasn't for me.
But yes, unless it is lieing and really using the hardware to play, this is much better. I'm going to encode my test file to 1024x600 and see how it does in software with Vitalplayer Neon.
no 1024 didn't fly in software. Looks terrible, and lags/gets out of sync.
IMO, the argument is moot at this point. Vitalplayer isn't free, and software can't play video better than the hardware can (854x480)
Now that hardware acceleration is working the CM7 test it won't be long before it's in CM7, and I personally have no need for software acceleration.
Then again, for lower quality stuff that I don't want to reencode, vitalplayer is much better at staying in sync. Impressively so in fact.
I may buy it. Thanks for the tip.
I uploaded some test videos encoded to Nook specs at various bitrates so you could see and maybe avoid reencoding repeatedly to find a bitrate that works for you.
Original file is a 1080p Music Video for "Good Girl, Bad Girl" by Miss A. This is a k-pop group I love and they encourage redistribution of their music videos, so no issues there.
600kbps video 20mb
http://www.mediafire.com/?d42dmvva9vbigm2
1200kbps video 36.5mb
http://www.mediafire.com/?2lyb5qicpynz13a
2000kbps video 58.4mb
http://www.mediafire.com/?d42dmvva9vbigm2
I can not tell a difference between 1200 and 2000.
There is definitely a difference between 600 and 1200, but is the difference worth 4.3mb per minute? A 90 minute video would be an additional 387MB larger.
Maybe it is for you, and maybe it isn't, and maybe you will just go with 800 or 1000kbps if you want to split the difference.
These are just intended for you to have a jumping off point so you don't have to go to the lengths I have!
chisleu said:
It seems to stay in sync more, but it also lags more. It also has ads on the bottom of the screen. I did try it, but as soon as I saw the ad I realized it wasn't for me.
But yes, unless it is lieing and really using the hardware to play, this is much better. I'm going to encode my test file to 1024x600 and see how it does in software with Vitalplayer Neon.
no 1024 didn't fly in software. Looks terrible, and lags/gets out of sync.
IMO, the argument is moot at this point. Vitalplayer isn't free, and software can't play video better than the hardware can (854x480)
Now that hardware acceleration is working the CM7 test it won't be long before it's in CM7, and I personally have no need for software acceleration.
Then again, for lower quality stuff that I don't want to reencode, vitalplayer is much better at staying in sync. Impressively so in fact.
I may buy it. Thanks for the tip.
Click to expand...
Click to collapse
I don't know what you are downloading but Vitalplayer Neon is definitely free....
Sent from my NookColor
zorvalth said:
I don't know what you are downloading but Vitalplayer Neon is definitely free....
Sent from my NookColor
Click to expand...
Click to collapse
I miss the "ad" word in that sentence. It was meant to say "ad free".
I can't stand seeing ads. I don't mind paying for software I want, but I hate ads.
I bought the Vital Player Pro but we were unable to get it working and I was issued a refund. It would start up and immediately shutdown. I think there may be a problem with paid apps because I also can not get TapaTalk pro to work on my tablet. It keeps saying it isn't paid for. Tapatalk has much slower customer support than VitalPlayer did.
So now that hardware acceleration is enabled, do you still do the same handbrake encoding process as before? Or was that just a workaround for the software? Or because hardware acceleration is now enabled, are we able to handle more/different codecs?
br0adband said:
No need for two-pass encoding as HandBrake's newer CRF based encoding methodology (for the x264 encoder) saves time and gets pretty much equal results in half the time.
Click to expand...
Click to collapse
I apologize. This new 1 pass system is far superior to those of old. I bow to your wisdom. CF25 is about equal to 1200kbps video in both size and quality.
Thanks for posting up the sample vids. The first and third link are the same. Both go to Miss A Bad Girl Good Girl - Nook 2000.m4v
For me, the preset in the OP produces an image that is compressed horizontally. Anyone else seeing this? Using handbrake 0.9.5 and playing on the latest CM7 stock video player.

Video problems with Mobo switched to vital neon fixed, but not using hardware decoder

Hi All,
So I have read all the threads I could find about video players on the Nook Color, and I am still having a little trouble. I don't know if its normal, so I am looking for some help/advice/guidance. This is going to be long, but it's because I am trying to be as thorough as I can.
My Goal:
To have a 7" tablet that browses the web, reads/writes email, lets me IM, reads ebooks, plays video files from my video collection, plays music from my collection, runs Pandora, Netflix, and Hulu, and is capable of swype (slideit).
What I have:
I have a brand new Nook Color that I bought just for turning into a tablet to play with (3 days ago). I started by rooting with nooter, and flashing CM 7.0.3 stable (2 days ago) to the emmc through CWM. I have since updated to CM7 Nightly #144 (today - more on that later)
My problems:
So I was happy with everything in CM 7.0.3 except for its video playing capabilities. I was using Moboplayer (I didn't download any codecs or anything, just straight moboplayer from Market). I know that the advice of the professionals on here is to use handbrake to convert whatever video you want to watch to an exact format that is ideal for the Nook, however, I, like many other people on here, have tons of movies (7 TB), and I have tons of places that I play them (every console, psp's, ds's, laptops and netbooks aplenty, etc.). So I don't want to convert them, and I have read several threads where people are playing un-converted videos without problems. So I picked a random episode and tried to play it. Here are the specs of that video.
Total file size: 349MB
Video -
Length: 42:26
Frame width: 624
Frame height: 352
Data Rate: 1003kbps
Total bitrate: 1152kbps
Frame rate: 23 frames/second
Audio -
Bit rate: 149kbps
Channels: 2(stereo)
Audio sample rate: 48 kHz
While in 7.0.3 with Moboplayer the video runs ok and the audio is sync'd up fine, but its not silky smooth. It looks like its running at about 18fps. I don't know how to find the exact framerate, but it is just a little less then when it plays on my computer, and it is just barely low enough to cause enough chop to be annoying. So the first thing I tried was downloading Dalingrin's 042411 OC kernel for eMMC. I thought if I overclocked my processor, it might solve the problem, and my research on this forum led me to believe that was the right OC file for my version of CM. I set both the min and the max to 1300 and still had the problem. In my research I also found that many people were talking about how Dalingrin had unlocked hardware decoding in some of the newer CM nightlies. Also, the OC kernel already exists in the newer nightlies. So I downloaded the newest nightly. I am now on #144. Once I got back up and running, I downloaded Moboplayer and tried again. Same problem. Even overclocked. I saw someone mentioned using the Neon codec pack for moboplayer. For some reason the Neon codec pack doesnt show up in my market (although a bunch of other Moboplayer codec packs do). So I went to Moboplayers website and downloaded the Neon codec pack zip file. I tried to install it with CWM in recovery mode, but it keeps failing. Having done some more research I downloaded a player called VitalPlayer Neon (there is a non Neon version but I paid for and installed the Neon version). When I play that same avi file in VitalPlayer is starts it and a little window pops up at the very beginning that says "Software codec play!!" The video (and several others like it) plays silky smooth. I couldn't ask for a better video playing experience. However, if I go into the settings for VitalPlayer (Settings -> Decode Mode) and tell it to use hardware codec, when I try to play the file its says, "Can't be played!!" Am I missing something?
Summary - So my questions are:
1) Is there a way to monitor FPS?
2) Don't I want my video player running with Hardware codec?
3) Why isn't my video player running with hardware codec?
/** Note relavant to thread *
<rant>
When I am done, I am going to write (yet another) guide for how to do this the easiest way for someone looking for a tablet/ereader experience like I was, that doesn't mind paying a couple dollars to get it right. The advice I have gotten on this site has been AWESOME, I just wish it was compiled a little better. It seems like people try so hard to get the free apps to do what they want, that they miss the $1.49 app that does it perfectly. And you have to dig to find the non-free apps that do what you want. Theres a few threads where people are jumping through hoops, spending hours and days, and screwing up the CM installs to get swype to work when for $4.99 SlideIt is up and working perfectly in seconds. Money well spent for me. Also, the $1.49 for ezPDF was priceless compared to the hours I spent trying other pdf readers that wouldn't even remember what page I was on when I stopped reading. ezPDF should be the defacto standard for PDF reading IMO. I can even resize what I am reading to a legible size and it will wordwrap (text reflow) for me so I don't have to move left and right on each line.
</rant>
Thanks,
Josh
Not every zip file you see in Android is intended for flashing! Yikes! That zip you downloaded is most likely just compressing/wrapping an apk. Look in the zip.
Be glad it didn't run
I looked there, and I just see an apk.. http://update2.moboplayer.com/apk/armv7_neon-release.apk
And it says that moboplayer SHOULD automatically install a codec, so not sure it'd help but it's worth a try?
a) Just install the codec apk like any other, and MoboPlayer will automatically pick it up.
b) You can't use hardware decoding unless the resolution is at or below 854x480, period. Since your content (presumably) is higher resolution than that, software decoding is your only option. The good news is that (when overclocked) the Nook is indeed capable of dealing with pretty high resolutions, the bad news is that battery life will suffer.
Rodney
khaytsus said:
Not every zip file you see in Android is intended for flashing! Yikes! That zip you downloaded is most likely just compressing/wrapping an apk. Look in the zip.
Be glad it didn't run
I looked there, and I just see an apk.. [link removed because I am not allowed to post links yet -Josh]
And it says that moboplayer SHOULD automatically install a codec, so not sure it'd help but it's worth a try?
Click to expand...
Click to collapse
Hey Khaytsus,
I am glad it didn't run. In retrospect I definately should have known better then to try to let CWM "flash" this instead of "installing" it (so tired). That website does list it as an apk, but when you download it, it downloads as a zip. Should I have renamed it to apk and tried it? MoboPlayer didn't download anything when I started it, at least not that I saw (may have done it in the background). Either way I uninstalled it because VitalPlayer is working. I just need to see if I can make it do hardware decoding.
Thanks for the help!
Josh
rhester72 said:
a) Just install the codec apk like any other, and MoboPlayer will automatically pick it up.
b) You can't use hardware decoding unless the resolution is at or below 854x480, period. Since your content (presumably) is higher resolution than that, software decoding is your only option. The good news is that (when overclocked) the Nook is indeed capable of dealing with pretty high resolutions, the bad news is that battery life will suffer.
Rodney
Click to expand...
Click to collapse
Hey Rodney,
In Re b): Since my video is Frame width: 624 Frame height: 352, doesn't that mean my resolution is 624x352 ... < 854x480? If not, how can I check to see what resolution my video is? I got those stats by right clicking the avi file properties -> details.
You're right VitalPlayer plays that video beautifully. Thanks for the tip about the batter. I will keep an eye on it.
Thanks,
Josh
gijosh28 said:
In Re b): Since my video is Frame width: 624 Frame height: 352, doesn't that mean my resolution is 624x352 ... < 854x480? If not, how can I check to see what resolution my video is? I got those stats by right clicking the avi file properties -> details.
Click to expand...
Click to collapse
There's a bit more to it than that, actually. It must be in a MPEG-4 container using the H.264 codec with baseline profile level 3.0 or less. AVIs need not apply. =)
Rodney
Hey,
As an update to this thread, I used Chisleu's Handbrake profile from this thread, and converted the video with the specs above. The new video did play with hardware decoding in both the stock player, and VitalPlayer Neon. It did not look quite as good (just an iota of a difference) as leaving the file the way it was and letting the software decode it. However, when I ran the new file with software decoding it didn't look quite as good as it did with hardware decoding (again miniscule difference). Summary: The original file looked the best, but wouldn't play with hardware decoding. The Handbrake'd file looked just a tiny bit worse (hardly worth mentioning) with hardware decoding, and just a little worse still with software decoding. Below are the file specs from right-click -> properties -> details.
new Handbrake'd file = left / old as downloaded file = right
File Size: 186MB / 349MB
Length: 42:58 / 42:59
Video -
Frame Width: 624 / 624
Frame Height: 352 / 352
Data Rate: 475kbps / 988kbps
Total Bitrate: 603kbps / 1137kbps
Frame Rate: 23fps / 23fps
Audio -
Bit Rate: 128kbps / 149kbps
Channels: 2 stereo / 2 stereo
Audio Sample Rate: 44kHz / 48kHz
Also noteworthy: In refference to the battery suggestion, since I upgraded from CM 7.0.3 to CM 7 Nightly #144, my battery performance has been stellar.
Thanks,
Josh
gijosh28 said:
Hey,
As an update to this thread, I used Chisleu's Handbrake profile from this thread, and converted the video with the specs above. The new video did play with hardware decoding in both the stock player, and VitalPlayer Neon. It did not look quite as good (just an iota of a difference) as leaving the file the way it was and letting the software decode it. However, when I ran the new file with software decoding it didn't look quite as good as it did with hardware decoding (again miniscule difference). Summary: The original file looked the best, but wouldn't play with hardware decoding. The Handbrake'd file looked just a tiny bit worse (hardly worth mentioning) with hardware decoding, and just a little worse still with software decoding. Below are the file specs from right-click -> properties -> details.
new Handbrake'd file = left / old as downloaded file = right
File Size: 186MB / 349MB
Length: 42:58 / 42:59
Video -
Frame Width: 624 / 624
Frame Height: 352 / 352
Data Rate: 475kbps / 988kbps
Total Bitrate: 603kbps / 1137kbps
Frame Rate: 23fps / 23fps
Audio -
Bit Rate: 128kbps / 149kbps
Channels: 2 stereo / 2 stereo
Audio Sample Rate: 44kHz / 48kHz
Also noteworthy: In refference to the battery suggestion, since I upgraded from CM 7.0.3 to CM 7 Nightly #144, my battery performance has been stellar.
Thanks,
Josh
Click to expand...
Click to collapse
If you want the handbrake transcoded file to look as good as the original then you're going to need to match the video bitrates.
I generally transcode my videos with handbrake before I use them on my Nook. It doesn't take too long on my PC and the battery savings with hardware codecs is worth it to me.
Media playback is still a work in progress. The hardware codec "pickiness" isn't going to get much better but things like Flash and higher resolution and bitrates should improve in the not so distant future.
No miracles though =)
dalingrin said:
The hardware codec "pickiness" isn't going to get much better but things like Flash and higher resolution and bitrates should improve in the not so distant future.
No miracles though =)
Click to expand...
Click to collapse
/drool
Me thinks previously mentioned optimizations are coming along...... cannot wait!
dalingrin said:
If you want the handbrake transcoded file to look as good as the original then you're going to need to match the video bitrates.
I generally transcode my videos with handbrake before I use them on my Nook. It doesn't take too long on my PC and the battery savings with hardware codecs is worth it to me.
Media playback is still a work in progress. The hardware codec "pickiness" isn't going to get much better but things like Flash and higher resolution and bitrates should improve in the not so distant future.
No miracles though =)
Click to expand...
Click to collapse
If it gets no better then it already is, I am extremely satisfied. I left yesterday with a full charge at about 3pm. I went back to my room, watched an episode of Numb3rs (thats the file I was using for my tests above) with software decoding, played about an hour of airport mania, and read some Isaac Asimov for an hour. It is now 2AM (11 hours later) and my battery is at 74%. I even have the Bubbles live wallpaper which is supposed to eat up my battery. This thing is almost perfect in that it does everything I want, does it well, and does it efficiently. Thanks for your hard work on it Dalingrin.
Now if I could just figure out my music problem from the other thread, I'd be golden.
Josh
Are you streaming or copying to the nook and playing? If streamimg, you can use vlc convert and stream to transcode on the fly, otherwise handbrake is the way to go.

HElp..Cod 5

Heres what I am getting after running call of duty 5 world at war.
I Installed reinstalled installed reinstlled now I am tired.
Plz help to solve this problem
----- Initializing Renderer ----
execing ragdoll.cfg from disk
----- Client Initialization -----
----- Client Initialization Complete -----
Trying SMP acceleration...
...succeeded.
----- R_Init -----
Getting Direct3D 9 interface...
Pixel shader version is 3.0
Vertex shader version is 3.0
Shader model 2.0 code path is available.
Shader model 3.0 code path is available.
Using Shader model 3.0 code path because it is the best available path on this hardware.
Attempting 640 x 480 fullscreen with 32 bpp at 60 hz
Game window successfully created.
Creating Direct3D device...
Com_TouchMemory: 0 msec. Using sum: 0
Database: Assets Sync Started
Database: Assets Sync Finished
Loading fastfile code_post_gfx
Loading fastfile ui
Loading fastfile localized_common
Loading fastfile common
Loading fastfile patch
Initializing render targets...
Requested frame buffer to be 24-bit color with 8-bit alpha
DirectX returned a frame buffer that is 24-bit color with 8-bit alpha
Initializing static model cache...
Initializing dynamic buffers...
Initializing particle cloud buffer...
Creating Direct3D queries...
Loading fastfile 'code_post_gfx'
used 1.13 MB memory in DB alloc
ERROR: image 'images/logo_small_cod5.iwi' is missing
Couldn't load image 'logo_small_cod5'
Click to expand...
Click to collapse
I would ask this in the off topic gaming thread.
Looks like it's missing some file to me. If you have steam go to properties then something like verify files. It will check all your files and download any missing ones. If it's on disk just reinstall it I'd say. Cod 5 PC has to be the best though. Great graphics, console commands and custom maps
X10man
Sent from my Fender Stratocaster to your face via XDA Premium
IS there such a thread?
http://forum.xda-developers.com/showthread.php?p=17916356

Audio file as array in Android Studio or Eclipse

I don't know if its the right place but I would proceed anyway. In matlab software we can load an audio file in the form of an array and manipulate that values in the array. i have to create an android app which requires a similar kind of thing. Can I load an audio file in the form an array and manipulate the values inside it in an android application. If so please share any tutorial or link that might be of help...
Code:
File[] audioFilesArray = new File[<enter size of array here>];
That will give you an array that holds the object type of "File".
You can then access a specific file by doing
Code:
audioFilesArray[0]
That will return the File object of the first file in the array. Then you can do what you need with that specific file, like play it using the MediaPlayer class.
elesbb said:
Code:
File[] audioFilesArray = new File[<enter size of array here>];
That will give you an array that holds the object type of "File".
You can then access a specific file by doing
Code:
audioFilesArray[0]
That will return the File object of the first file in the array. Then you can do what you need with that specific file, like play it using the MediaPlayer class.
Click to expand...
Click to collapse
How do I assign the values in an audio file to this array? The values that are displayed in matlab when an audio file is loaded. I need to store the samples of audio file in this array. By samples here i meant raw bit of sound which represent the sound intensity in individual channel at an instant of time.
munirshah77 said:
How do I assign the values in an audio file to this array? The values that are displayed in matlab when an audio file is loaded. I need to store the samples of audio file in this array. By samples here i meant raw bit of sound which represent the sound intensity in individual channel at an instant of time.
Click to expand...
Click to collapse
It's really simple. You must convert wav (or another music type) to byte array
Example for one file define like WAY_FILE
Code:
ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedInputStream in = new BufferedInputStream(new FileInputStream(WAV_FILE));
int read;
byte[] buff = new byte[1024];
while ((read = in.read(buff)) > 0)
{
out.write(buff, 0, read);
}
out.flush();
byte[] audioBytes = out.toByteArray();
munirshah77 said:
How do I assign the values in an audio file to this array? The values that are displayed in matlab when an audio file is loaded. I need to store the samples of audio file in this array. By samples here i meant raw bit of sound which represent the sound intensity in individual channel at an instant of time.
Click to expand...
Click to collapse
I'm not exactly sure what you are trying to do here.. An what I posted previously will give you an array of files. Which you can access and assign using
array[0] where the 0 indicates the first file in that array. To assign it, you would just do
array[0] = new File(<some file location string here>);
Your last sentence, "raw bit of sound which represent the sound intensity in individual channel at an instant of time" i do not understand what you mean. By channel I presume you are referring to left and right audio channels?
How are you obtaining this "raw bit of sound"? If you can convert it to a byte array as the other person posted, then you can write it to a file. But you have to have some sort of input to write or read from.

Categories

Resources