[Q] Change Codec Packages? - Motorola Droid X2

Is this possible? I've googled and can't find a clear answer. IN THEORY.. couldn't we add a codec package to the firmware, and then change the build.prop to suit the codec of choice?
In the build.prop line:
camcorder.720p=mp4, h264, 30, 12000000, aac, 128000, 44100, 2
mp4=Video Codec
h264=Video Encoding*works alongside mp4*
30=fps
12000000=pixels to capture or its the BIG NUMBER(30fps=this) for fps*
aac=audeo codec
128000=hz to capture at top*
44100=hz to capture at bottom*
2=LEDs in Flash
*indicates not too sure but will find out after this post.
But anyway, if we change this line of code to meet what codecs we want, we could then possibly fix the 720p problem with our phones. AND POSSIBLY get 1080p recording on our phone.
From what I have researched, the codecs are in the kernel. BUT since we have 2nd init.d, couldn't we tweak this at boot to run a script to hijack the kernel and goto the codec(s) of choice?
discuss.

Interested and watching.
Sent from my rooted and debloated X2!

I read up last night and an app can call for its own Codec.. I'll post a source when i'm at a computer
Tapin' the Talk on my GBP7

I Know I've Read About MX Video Player. Not Sure If That's The One You're Referring To.

This sounds awesome. You rock.
Sent from my DROID X2 using XDA App

As of right now, we cannot hijack the kernel with 2nd-init. However, kexec (what 2nd-init uses) can hijack the kernel on its own. There has been work done over at Atrix about it and some people were planning on picking up there work (because they stopped when bl was unlocked).

Related

rhod FRX05 video playback - codec/app-tips?

Hi,
with WiMo i was able to play podcasts (h264/aac, 368x208, ~200kBit/s) somewhat smooth with TCMP. With android i get - well - with some luck a frame per minute. I would have said its because of a incomplete/non-optimized GPU-Driver but Youtube (SD) plays fine so for me this looks more like a codec/app-issue. Has anyone already looked for a solution? Any tips on codecs/apps that should work?
SD works, yes. HD/HQ youtube does not however, and I think it's related to a scaling issue.
We're not done with the port... I think this is a pretty minor bug considering the other major ones we have out there....
arrrghhh said:
SD works, yes. HD/HQ youtube does not however, and I think it's related to a scaling issue.
Click to expand...
Click to collapse
...hm… for me exactly this looked like a codec-thing… i dont know the mobile side but for pc i remember something like VP6 for SD and X264 for HD on Youtube. But thanks for the tip, i'll look into this direction too.
arrrghhh said:
We're not done with the port...
Click to expand...
Click to collapse
…and it will never be completely done - otherwise there would be no need for our lovely legacy-forums here
arrrghhh said:
I think this is a pretty minor bug considering the other major ones we have out there....
Click to expand...
Click to collapse
As you already said in another thread: Everyone has his own priorities
Just see this thread as my notepad - i collect my results/ideas here, if someone has made own tests he can add his results and if someone wants to have a look on his own he knows what has been tried already…
B2T: With the described movie i have about 10-20% free CPU-cycles so this should not be the bottleneck. hw3d has no effect (guess this doesnt really affect 2d acceleration). Changing from fullscreen/stretched to original size showed also no difference
adlerweb said:
Just see this thread as my notepad - i collect my results/ideas here, if someone has made own tests he can add his results and if someone wants to have a look on his own he knows what has been tried already…
B2T: With the described movie i have about 10-20% free CPU-cycles so this should not be the bottleneck. hw3d has no effect (guess this doesnt really affect 2d acceleration). Changing from fullscreen/stretched to original size showed also no difference
Click to expand...
Click to collapse
Not a bad idea, I'd like to see this bug squashed.
I've heard it was a scaling issue - have you tried different resolutions? I know someone tried the native resolution of our RHOD, but that didn't work either... I guess I'd be surprised if it is codec, as you can get frozen frames on YouTube HQ and audio plays just fine. I am by no means an expert here tho .
arrrghhh said:
Not a bad idea, I'd like to see this bug squashed.
I've heard it was a scaling issue - have you tried different resolutions? I know someone tried the native resolution of our RHOD, but that didn't work either... I guess I'd be surprised if it is codec, as you can get frozen frames on YouTube HQ and audio plays just fine. I am by no means an expert here tho .
Click to expand...
Click to collapse
I am no expert either but would not the codec be contained in the software such as Utube. And the Multimedia architecture would mostly bypass the Processor. So the problem to me would seem to be routing and timing issue. Thus the beggining frames play but stop due to the loss of coordination.
BigOnes69 said:
I am no expert either but would not the codec be contained in the software such as Utube. And the Multimedia architecture would mostly bypass the Processor. So the problem to me would seem to be routing and timing issue. Thus the beggining frames play but stop due to the loss of coordination.
Click to expand...
Click to collapse
I don't even get any frames to play at the beginning.
It starts with a black screen with audio...
If I skip ahead, I can randomly get freezes of images, but that's about it.
arrrghhh said:
I don't even get any frames to play at the beginning.
It starts with a black screen with audio...
If I skip ahead, I can randomly get freezes of images, but that's about it.
Click to expand...
Click to collapse
What you say supports what I am saying about routing and timing. I am thinking in general terms not specifics and I am no expert.
BigOnes69 said:
What you say supports what I am saying about routing and timing. I am thinking in general terms not specifics and I am no expert.
Click to expand...
Click to collapse
I would think its the processors job to coordinate the frame of reference for the timing. The actual MMS stuff would use that frame of reference to process the video according to the codec provided in the software. The routing and or timing could be screwed because HTC needs a way to get around patent laws. The could have done something as simple as changed polarity or phase or something more complicated as recode with another chip. The audio would works because its simple to process. Our drivers are not doing what needs to be done to process the information. It would have nothing to do with the codec which is contained in the software. Like I said I am guessing.
BigOnes69 said:
I would think its the processors job to coordinate the frame of reference for the timing. The actual MMS stuff would use that frame of reference to process the video according to the codec provided in the software. The routing and or timing could be screwed because HTC needs a way to get around patent laws. The could have done something as simple as changed polarity or phase or something more complicated as recode with another chip. The audio would works because its simple to process. Our drivers are not doing what needs to be done to process the information. It would have nothing to do with the codec which is contained in the software. Like I said I am guessing.
Click to expand...
Click to collapse
Then again the Architecture in our older phones might not be fast enough to process the HQ resolutions.
No, this isn't a question of processing power, it's a matter of having the right codecs installed. I've seen Youtube HQ working on my phone before, running one of tiad8's FroyoX builds with camera kernel, months ago.
The behavior you see where you can skip around and see one good frame, but otherwise nothing, is caused by the actual encoding of the video, and the current codec lacking support for it. (The difference between B frames, I frames, and P frames, if you care to look that up...)
highlandsun said:
No, this isn't a question of processing power, it's a matter of having the right codecs installed. I've seen Youtube HQ working on my phone before, running one of tiad8's FroyoX builds with camera kernel, months ago.
The behavior you see where you can skip around and see one good frame, but otherwise nothing, is caused by the actual encoding of the video, and the current codec lacking support for it. (The difference between B frames, I frames, and P frames, if you care to look that up...)
Click to expand...
Click to collapse
Interesting.
So what do we need to do to get the codec support? I'm assuming the kernel clocks are finally right as well...
found it.
http://www.youtube.com/watch?v=mYW1DIi4ZzY
yankees2450 said:
found it.
http://www.youtube.com/watch?v=mYW1DIi4ZzY
Click to expand...
Click to collapse
That is based off of Tiads cut and paste Blazn if I am correct which was good for video playback but everything else was buggy. This proves HQ can work on our phones.
My question here is wouldnt the Codec that was required by the utube app. be contained within that app. or if it was not when it tried to play back and the codec was missing you would get nothing or a reference to download the required codec such as happens with other operating systems.
Or if the codec is contained in our current version intact. Then it is not referencing the codec properly which goes back to what I originally said about timing and the coordination with the MMS architecture on the phone. It looks as though Tiad had found the proper channeling. Did he leave anyone any information about this before he left this forumn?
BigOnes69 said:
That is based off of Tiads cut and paste Blazn if I am correct which was good for video playback but everything else was buggy. This proves HQ can work on our phones.
My question here is wouldnt the Codec that was required by the utube app. be contained within that app. or if it was not when it tried to play back and the codec was missing you would get nothing or a reference to download the required codec such as happens with other operating systems.
Or if the codec is contained in our current version intact. Then it is not referencing the codec properly which goes back to what I originally said about timing and the coordination with the MMS architecture on the phone. It looks as though Tiad had found the proper channeling. Did he leave anyone any information about this before he left this forumn?
Click to expand...
Click to collapse
He never gave anyone anything useful from his builds.
He was just slapping stuff together, and would see what stuck to the wall.
I heard people had issues with his builds on HQ youtube, and I even tested his junk and wasn't able to get HQ to work... so I think it's just more BS from him.
yankees2450 said:
another junk from tiad8
could this be true?
http://www.neopeek.com/viewtopic.php?f=84&t=6544
Click to expand...
Click to collapse
There's a reason he's banned here. Let's not repost more of his crap here, thanks.
arrrghhh said:
I've heard it was a scaling issue - have you tried different resolutions?
Click to expand...
Click to collapse
Well... Most of my podcast have different resolutions and none worked so far. Also should scaling not be disabled when the Player is set to "original size"?
BigOnes69 said:
I am no expert either but would not the codec be contained in the software such as Utube.
Click to expand...
Click to collapse
I dont know for youtube but most 3rd party video-players i've seen say that supported codecs are device dependent so i guess they are in the rootfs, not the app.
BigOnes69 said:
because HTC needs a way to get around patent laws
Click to expand...
Click to collapse
OK, maybe, but afair do most companys not charge people/companys for playback - only encoding… And "free" codecs like theora or webm would not be affected
BigOnes69 said:
Then again the Architecture in our older phones might not be fast enough to process the HQ resolutions.
Click to expand...
Click to collapse
As said: 20% cpu left and works on Wimo -
I've managed to get "working" video with ffmpeg's default avi-output (think it was divx/mp3) but colors where disorted. My android died yesterday and i had no time to reinstall so i could not test further atm.
adlerweb said:
OK, maybe, but afair do most companys not charge people/companys for playback - only encoding… And "free" codecs like theora or webm would not be affected
Click to expand...
Click to collapse
I think I remember reading the issue the with getting decent video playback wit the MSM GPU is is getting information on the hardware. The codec used to play HQ video on Windows mobile comes from HTC and is written specifically for the MSM7x chipset using proprietary information - information which is not available to everyone, or can only become available for a price and an NDA.
Perhaps there is binary blob that can be used?
toadlife said:
I think I remember reading the issue the with getting decent video playback wit the MSM GPU is is getting information on the hardware. The codec used to play HQ video on Windows mobile comes from HTC and is written specifically for the MSM7x chipset using proprietary information - information which is not available to everyone, or can only become available for a price and an NDA.
Perhaps there is binary blob that can be used?
Click to expand...
Click to collapse
Perhaps a binary blob could be dug up, but we couldn't use it in the AOSP builds. Only custom builds would be able to use it, or individuals will just have to integrate it themselves.
arrrghhh said:
Perhaps a binary blob could be dug up, but we couldn't use it in the AOSP builds. Only custom builds would be able to use it, or individuals will just have to integrate it themselves.
Click to expand...
Click to collapse
That would be fine with me.
toadlife said:
That would be fine with me.
Click to expand...
Click to collapse
Ok... My point is, source is preferred.
If we can't get source, so be it - but a proprietary blob does very little good in the scope of this type of project. I want everyone to have the best Android experience possible, I don't want just a few builds working correctly and others borked. That sucks.

Enable h.264 high profile encoding on 4.5.91 on kernel?

First off, this may sound like a post for Q&A, but bear with me.
I known 4.5.91 is supposed to enable some high profile decoding, but not all. Is it possible for devs to build into their upcoming kernels (and there are a LOT incoming) to enable our Atrix to play most formats no-prob? Like the usual .mkv format for series and what not?
What I am aiming for here is to make that handbreak method unnecessary, so we can, for example, download a torrent directly on our cellphones, press "play"and enjoy without the need of a computer.
I thought you could play them with the gingerbread update?? Which i have with hktw... I haven't tried to play mkv on the ATT 4.5.91 but i assume it still does. Still don't get why you posted this here.
Viamonte said:
First off, this may sound like a post for Q&A, but bear with me.
I known 4.5.91 is supposed to enable some high profile decoding, but not all. Is it possible for devs to build into their upcoming kernels (and there are a LOT incoming) to enable our Atrix to play most formats no-prob? Like the usual .mkv format for series and what not?
What I am aiming for here is to make that handbreak method unnecessary, so we can, for example, download a torrent directly on our cellphones, press "play"and enjoy without the need of a computer.
Click to expand...
Click to collapse
Still q&a section post friend.
Sent from my MB860 using XDA Premium App
Its not really a question as there is a similar thread there and I already now the Atrix STILL cant handle some formats, specially audio. Its a request for the devs.
Viamonte said:
Its not really a question as there is a similar thread there and I already now the Atrix STILL cant handle some formats, specially audio. Its a request for the devs.
Click to expand...
Click to collapse
Wrong post please do not post in the wrong place this is called DEVELOPMENT and if your not developing something than don't post it here
I think hi profile isn't possible on tegra2 that being said who knows what's possible with our bl unlocked
Sent from my MB860 using XDA App
Thread moved to proper forum.

Droid 2 Global: Patch for smooth video playback over cifs without freezes

When I use cifs for streaming video for my phone, i noticed many freezes during playback, that makes watching uncomfortable. Having many hours on finding way to fix this problem, i got source code of opencore and began to understand it's architecture.
As result i found that file source filter in chain didn't perform any stream buffering, so i patched source code of libopencore_common and force the use of asynchronous reading mode within 256Kb buffer size. (16 buffers of 16Kb each)
After replacing original file by patched, video playing from network through cifs stopped to freeze and stutter.
Installation:
Mount /system for rw access
Replace original /system/bin/libopencore_common.so by patched file
Reboot phone
Based on android 2.2 opencore sources, so i don't recommend install this over gingerbread updates. Though may still work, why not to try?
Don't forget to make backup just in cause. This can save a bunch of time, if this isn't work for your device.
PS. For those who interests: i patched oscl_file_io.cpp, method Oscl_File::OpenFileCacheOrAsyncBuffer and oscl_file_async_read.cpp
PPS. Perhaps this work also for Droid 2 and Milestone 2, cause those two have same opencore implementation as D2G
What Android version are you running on your D2G, Is this still a problem with the new Gingerbread update?
Oh.. I so sorry for forgetting, it's last froyo update 2.4.330 for D2G (last year update), gingerbread not released yet, as i know.
However, probably i won't upgrade my device to gingerbread, as far as froyo suits very well for me.
I found way to trick system and put file in internal storage as fully functional sd card, enabled buffering for video playback, installed cifs support, hardware 720p decoder, writed simple cli tool that displays text on screen for output of custom boot scripts, and did some other small tweaks. I don't want setup all from beginning, cause new update unlikely increase computing power of cpu in this phone, in fact the only thing i prefer.
Excellent work my friend. You are a credit to this community. Thanks.
Sent from my DROID2 GLOBAL using XDA App

Need advice on odex files

If anyone can help me with this question I would greatly appreciate it. I am trying to figure out if I can install an odexed apk (blurCamera) into a deodexed rom (eclipse 1.1). The reason for this is because the only camera app that records video without freezing and lag is the stock blurCamera.apk from 2.3.4, but only the odexed version. So if I can install this apk into eclipse what permissions do I have to set for the odex file? Or if u know of a camera app that actually works that would be great too. Any help would be great. I have a 9 month old son that I want to take video of, but stock 2.3.4 just doesn't function near as good as eclipse, even with supercharger and speedy installed.
Thanks in advance for any help!
Have you tried the apk from the stock, deodexed zip put up by peperm1nt? It should work but it won't display the thumbnail preview at the lower right if you're using the aosp gallery.
Sent from my DROID X2 using xda premium
Nope I didn't even see that one. I'll give it a shot though and see how that works. Thanks!
I have found that HD recording seems to always be jumpy for me.
using the DVD or VGA settings allow for smoother recordings
Well what us the point in having a phone that claims it can record in 720p hd when u have to set it to record in standard def just to get a decent quality video? If I knew how to adjust the bitrate it records in I think I could fix it, but that us way above me. I read in another post that the bitrate is too high.... Just an idea if anyone with some expertise on this wants to help me I will be glad to do anything I can. I do know some coding stuff, but I'm still a noob
I get no issues on 720p recordings with the stock camera. I get some tearing on playback on the phone periodically but when played back on a pc, etc it looks great.

[Q] Is it possible to record any video with CFR (Constant Frame Rate)?

Here's what I want to do: I'd like to be able to take multiple videos throughout the day and then at the end of the day join them together as one video to upload to YouTube.
Here's the problem: I can't join videos together that are VFR (variable framerate). They need to be converted to CFR first. However, no matter how I try converting them, I always end up with audio/video sync problems. I've spent days and done lots of research and tested several programs/methods to accomplish this. There's still more for me to try, but so far I've not been successful.
Which brings me back to: If I can just get the RAZR to record videos with a constant framerate, the above problem(s) should be eliminated.
My current favorite camcorder app is the LG Camera ("LG" having no relation to the electronics manufacturer). It has many options and blah blah blah. One of the options is to set the framerate. Offers selections as low as 2 FPS up to 60 FPS. Unfortunately (and I have emailed the dev about this), changing this setting doesn't seem to have any effect.
This could be because of a firmware limitation of the device itself, or it could simply be a bug with the app. I don't know yet. I'm trying to find out.
I did find another post around here about recording videos at 120 FPS or something like that. Seems that making some edits to the build.prop file made the phone think it was recording at that FPS but the resulting file showed otherwise. Well, I'm not looking for any real high FPS for my videos. I figure somewhere around 30 should be good enough. The only thing I really want to know is if there is any possible way I can force the camera to record at a constant framerate.
Perhaps the build.prop file can be edited to allow this. I'm not sure. I certainly hope this is possible one way or another, though.
Thanks for your time.
I was one of the people doing the 120fps experiments, and as you noted, nothing worked. I'm thinking the cpu is simply sending a stream of data that the phone must accept.
I'm pretty sure the phone records in a variant of motion jpeg, and simply takes up to 30 stills per second. I've edited these files myself, and it's a pain in the a**.
You need to find a setting in your video editing app that allows for variable framerate content. VFR for short.
Also, .avi containers doesn't support VFR content. You need to save to MKV, MP4, WMV or ASF. Probably more containers, but those are common.
Thanks for the response.
Well, bad news and good news.
Bad news is, I was never able to find any program that could properly convert and/or join the video files without blatant sync problems as a result.
The good news is that the above is not 100% true. After posting my question, I had received some help elsewhere and ended up using ffmpeg and MEncoder (both command line tools for video processing). ffmpeg converts the files to CFR and then MEncoder joins them together. These two utilities combined with the automation power of AutoHotkey allowed me to create an AHK script that will convert and join all the videos successfully simply by dropping the files in the folder and running the script.
In the rare case someone else comes here with the same problem, here's the video-help thread that brought me to this solution: ~~~ Okay, I can't post links. In that case, here's a sample command line for converting the file to CFR:
Code:
ffmpeg -i input01.mp4 -c:v mpeg4 -b:v 1800k -c:a copy -vsync 1 -r 25 temp_output01.mp4
You'll have to run ffmpeg separately on each file, I believe.
Here's a sample MEncoder command line for joining the converted files together:
Code:
mencoder input01.mp4 input02.mp4 input3.mp4 -vf harddup -ovc copy -oac mp3lame -lameopts cbr:br=128 -o joined_output.mp4
You can enter in as many input video filenames as you want to join together.
After I found a solution for converting and joining, I decided to leave this post up because I still wanted to find out if recording in CFR on the Droid was possible. I'm guessing it isn't. That's too bad.
I read about that actually, problem is that directly converting to CFR makes the video somewhat choppy. As you are either playing the same frame twice, or removing a frame to compensate for the fps you're using.
If I'm not too confused, you can interpolate the missing frames to make it appear smoother. At least in some video editors.
Yeah. Fortunately, so far I haven't noticed any obvious issues with the final video.

Categories

Resources