FORUMS

New Xposed for Lollipop 5.0 Update Fixes Major Bugs

Senior Recognized Developer rovo89 has patched Xposed for Lollipop 5.0 to … more

Download Sony’s new AOSP-like concept for Xperia Z3

Over in our forums, Recognized Contributor Jozinek has posted a very … more

OnePlus 2 vs Moto X Style: Which is The Better Flagship?

Two big industry names have announced their newest flagship phones within the … more

Making Your Own Xposed Modules Is Easier Than You Think

Close to the heart of XDA is the Xposed Framework by Rovo89. Most of … more

[CM7] Video Drivers : Play YouTube HQ Videos smoothly on CM7 [update 2, 19/01]

119 posts
Thanks Meter: 331
 
By lebidou, Senior Member on 15th January 2012, 11:59 PM
Post Reply Subscribe to Thread Email Thread
Video Drivers for Cyanogen 7 alpha7

I've been working on porting Galaxy S's libs for hardware video decoding to our beloved Galaxy 3, and here is the result !

What does it do ?
It allows video decoding for h264, h263 and mpeg4 encoded videos. Basically, YouTube HQ, Vimeo, Dailymotion videos, including 480p versions. Also .mp4 and .m4v files from SD Card.

What does it NOT do ?
It doesn't decode WMV9. It is not responsible for Audio/Video syncing. It is not responsible for auto rotation. AVI files don't play. It won't make you coffee.

Is there issues ?
Some h264 files played locally (from SD Card) may not work because the MFC device doesn't support h264 Profiles higher than Baseline.
Videos with resolution higher than 832x512 won't play, the MFC device doesn't support them.

When you paused a video, the screen went off, and you unlock the screen : the screen is black. Tap it, press play.
When you paused a video, and you're seeking through it, the picture doesn't change. It actually does the seeking, just press play.

What do I do if there a problem with a video ?
PM me with a link to the video, a description of the problem. Add the result of the following commands :
Code:
adb logcat > logcatdump.txt
adb shell dmesg > dmesgdump.txt
adb shell ls -l /system/lib/ > systemlibdump.txt
NOTE: remove 'adb' and 'adb shell' if you're doing it from Terminal Emulator.


If you have any other questions, there is this thread.

Have a nice time playing videos on CM7!
Last edited by lebidou; 19th January 2012 at 04:14 PM.
The Following 79 Users Say Thank You to lebidou For This Useful Post: [ View ]
 
 
15th January 2012, 11:59 PM |#2  
OP Senior Member
Thanks Meter: 331
 
More
[CM7] Video Drivers : Play YouTube HQ Videos smoothly on CM7
How does it work ?

When you start your phone, stagefright (the piece of software that handles media playback/recording in Android), scans for files it knows. Here is a list for what it looks for:
Code:
".mp3", ".mp4", ".m4a", ".3gp", ".3gpp", ".3g2", ".3gpp2",
        ".mpeg", ".ogg", ".mid", ".smf", ".imy", ".wma", ".aac",
        ".wav", ".amr", ".midi", ".xmf", ".rtttl", ".rtx", ".ota",
        ".mkv", ".mka", ".webm", ".ts", ".flac"
If a file you want to play doesn't have one of these extensions, you'll need a third party player, like MX Video or QQPlayer.

When you open a file, lib stagefriht "sniffs" the file to know if it knows how to extract frames from it. For example, it doesn't know how to extract frames from .avi files, but does for .mp4

When it got a frame, it looks for a matching decoder, and goes for hardware ones if available. For example, it will find a decoder for mpeg4, but won't know what to do with xvid or divx.

For h264, MPEG4 and H263 it will use these libs to decode. Stagefright sends it the encoded frame, the lib copies it to the MFC input buffer, ask MFC to decode it, crop it if necessary, while copying the decoded frame to the output buffer.

Then stagefright displays it.

Now, about h264. There are several 'profiles', depending on the target device. Baseline for mobile devices, Main for computers, High for Blurays and HD-DVD.
Our phones can decode Baseline, not Main, not High. Many .mkv files out there use h264 with either Main or High profiles and thus won't be decoded.
Main and High use and different compression algorithm and add features the MFC don't know about and its initialization will fail.

To sum it up:
- .AVI, .FLV, .WMV and any other extension not listed above can't be opened without a third party software.
- All h264 encoded files can't be played, due to hardware limitations.
- The libs just decode the frame, it is not responsible for which frame is sent to it, for skipping frames, for aspect ratio, for A/V sync, for low content quality.
- It doesn't make kitten videos any funnier.
Last edited by lebidou; 19th January 2012 at 04:50 PM.
The Following 30 Users Say Thank You to lebidou For This Useful Post: [ View ]
15th January 2012, 11:59 PM |#3  
OP Senior Member
Thanks Meter: 331
 
More
[CM7] Video Drivers : Play YouTube HQ Videos smoothly on CM7
Download Links

CWM Flashable :
MFC Drivers Update 2

Sources :
https://github.com/gaelph/MFC-Drivers-for-s5p6442

Revert Zip:
MFC Revert zip


Change Log

19/01/12 : Update 2 : Fixed a bug preventing h263 encoded videos to be played.

16/01/12 : Update 1 : Reworked the crop code, fixes 2 bugs where colors weren't displayed correctly. Also should save a nanosecond in computing.

15/01/12 : Initial Release.
Last edited by lebidou; 20th January 2012 at 09:51 AM.
The Following 29 Users Say Thank You to lebidou For This Useful Post: [ View ]
16th January 2012, 02:31 AM |#4  
m1trand1r's Avatar
Senior Member
Flag You don't wanna know.....
Thanks Meter: 9,394
 
Donate to Me
More
thank to PG101 for moving ur thread here:P

~~~~~~~~~~~~~~~~~~~~~~~~~
Sent from Galaxy
Kyrillos' ROM v10 GWK74 beta
powered by
CM7-kernel 1.3 H.V.
~~~~~~~~~~~~~~~~~~~~~~~~~
16th January 2012, 02:36 AM |#5  
PG101's Avatar
RC-RT Liaison - Devil's Advocate
Thanks Meter: 11,543
 
More
Quote:
Originally Posted by rkoby13

thank to PG101 for moving ur thread here:P

~~~~~~~~~~~~~~~~~~~~~~~~~
Sent from Galaxy
Kyrillos' ROM v10 GWK74 beta
powered by
CM7-kernel 1.3 H.V.
~~~~~~~~~~~~~~~~~~~~~~~~~

Whats right is right
The Following 4 Users Say Thank You to PG101 For This Useful Post: [ View ]
16th January 2012, 03:13 AM |#6  
Senior Member
Flag Melbourne
Thanks Meter: 766
 
More
does this work well? like most youtube hq vids will work? cause i use youtube more on my phone then pc :P
16th January 2012, 03:16 AM |#7  
sekhargreen's Avatar
Senior Member
Flag Durgapur
Thanks Meter: 613
 
Donate to Me
More
Question Will it work on Froyo?
Will it work on Froyo? I noticed CM& tag. So is there possibility or you are developing another version for Froyo?

Good work.
16th January 2012, 04:19 AM |#8  
GryTEcHoG's Avatar
Senior Member
Thanks Meter: 12
 
More
will this able to play files from sdcard instead of from youtube?


Can you upload the file again in some other sites since wupload.com is not working for me?
Last edited by GryTEcHoG; 16th January 2012 at 04:22 AM.
16th January 2012, 05:48 AM |#9  
m1trand1r's Avatar
Senior Member
Flag You don't wanna know.....
Thanks Meter: 9,394
 
Donate to Me
More
Quote:
Originally Posted by GryTEcHoG

will this able to play files from sdcard instead of from youtube?


Can you upload the file again in some other sites since wupload.com is not working for me?

uploaded:P...

download here


~~~~~~~~~~~~~~~~~~~~~~~~~
Sent from Galaxy
Kyrillos' ROM v10 GWK74 beta
powered by
CM7-kernel 1.3 H.V.
~~~~~~~~~~~~~~~~~~~~~~~~~
The Following 2 Users Say Thank You to m1trand1r For This Useful Post: [ View ]
16th January 2012, 06:34 AM |#10  
marcellusbe's Avatar
Senior Member
Flag Québec City
Thanks Meter: 4,639
 
More
very good work!!
The Following 2 Users Say Thank You to marcellusbe For This Useful Post: [ View ]
16th January 2012, 06:47 AM |#11  
Darius_AWS's Avatar
Senior Member
Flag Lyon
Thanks Meter: 320
 
More
Thank you so much it's working great CM7 is almost perfect

Sent from my GT-I5800 using xda premium

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes