Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,426 Members 53,810 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
lebidou
Old
(Last edited by lebidou; 19th January 2012 at 04:14 PM.)
#1  
Member - OP
Thanks Meter 314
Posts: 93
Join Date: Nov 2010
Default [CM7] Video Drivers : Play YouTube HQ Videos smoothly on CM7 [update 2, 19/01]

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!
The Following 79 Users Say Thank You to lebidou For This Useful Post: [ Click to Expand ]
 
lebidou
Old
(Last edited by lebidou; 19th January 2012 at 04:50 PM.)
#2  
Member - OP
Thanks Meter 314
Posts: 93
Join Date: Nov 2010
Default [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.
The Following 30 Users Say Thank You to lebidou For This Useful Post: [ Click to Expand ]
 
lebidou
Old
(Last edited by lebidou; 20th January 2012 at 09:51 AM.)
#3  
Member - OP
Thanks Meter 314
Posts: 93
Join Date: Nov 2010
Default [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.
The Following 29 Users Say Thank You to lebidou For This Useful Post: [ Click to Expand ]
 
rkoby13
Old
#4  
rkoby13's Avatar
Senior Member
Thanks Meter 7117
Posts: 9,274
Join Date: Mar 2011
Location: You don't wanna know.....

 
DONATE TO ME
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.
~~~~~~~~~~~~~~~~~~~~~~~~~
Samsung Galaxy S II
Dualboot
[Secondary]Used for storing SlimSaber 4.3.1(2014/06/26) Reborn as a nandroid ready to boot
>>>DorimanX Power Core kernel<<|>>10.43v114 by cybernetus <<
 
PG101
Old
#5  
PG101's Avatar
RC-RT Liaison - Devil's Advocate
Thanks Meter 9654
Posts: 11,302
Join Date: Aug 2008
Quote:
Originally Posted by rkoby13 View Post
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
HTC One M8 & Nokia 8800 Arte (Carbon Black)
Retired: Motorola V3i, Nokia N91, Nokia 8800 Sirocco, Nokia N95, HTC Diamond, Sony Xperia X1, HTC HD, HTC HD2, iPhone 4, HTC Desire HD, HTC Sensation, HTC One X, HTC Butterfly, HTC One, SG Note 3!
Follow Me


| New? Here is a good starting point!! | Something needs a moderator's attention? |
Want a thread actioned? Don't forget to include the thread link in the PM you're about to send me!!

And remember - You are the result of 3.8 billion years of Evolutionary Success - ACT LIKE IT!!
The Following 4 Users Say Thank You to PG101 For This Useful Post: [ Click to Expand ]
 
alb3rtt
Old
#6  
Senior Member
Thanks Meter 681
Posts: 1,229
Join Date: Mar 2011
Location: Melbourne
does this work well? like most youtube hq vids will work? cause i use youtube more on my phone then pc :P
Phone: Black Nexus 5 32GB
Setup: Purity w/UBER Kernel and ART.
 
sekhargreen
Old
#7  
sekhargreen's Avatar
Senior Member
Thanks Meter 610
Posts: 588
Join Date: Jan 2010
Location: Durgapur

 
DONATE TO ME
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.

Awesome Xperia-nce SL, A.C.A., Sekhy's Galaxy 3 ROMs Collection

 
GryTEcHoG
Old
(Last edited by GryTEcHoG; 16th January 2012 at 04:22 AM.)
#8  
GryTEcHoG's Avatar
Senior Member
Thanks Meter 12
Posts: 112
Join Date: Jun 2011
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?
Nature Helped Technology, Now Technology should help Nature
 
rkoby13
Old
#9  
rkoby13's Avatar
Senior Member
Thanks Meter 7117
Posts: 9,274
Join Date: Mar 2011
Location: You don't wanna know.....

 
DONATE TO ME
Quote:
Originally Posted by GryTEcHoG View Post
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.
~~~~~~~~~~~~~~~~~~~~~~~~~
Samsung Galaxy S II
Dualboot
[Secondary]Used for storing SlimSaber 4.3.1(2014/06/26) Reborn as a nandroid ready to boot
>>>DorimanX Power Core kernel<<|>>10.43v114 by cybernetus <<
The Following 2 Users Say Thank You to rkoby13 For This Useful Post: [ Click to Expand ]
 
marcellusbe
Old
#10  
marcellusbe's Avatar
Senior Member
Thanks Meter 4633
Posts: 746
Join Date: Dec 2010
Location: Québec City
very good work!!

The Following 2 Users Say Thank You to marcellusbe For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes