Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP lebidou

16th January 2012, 12:59 AM   |  #1  
OP Member
Thanks Meter: 315
 
97 posts
Join Date:Joined: Nov 2010
More
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 05:14 PM.
The Following 79 Users Say Thank You to lebidou For This Useful Post: [ View ]
16th January 2012, 12:59 AM   |  #2  
OP Member
Thanks Meter: 315
 
97 posts
Join Date:Joined: Nov 2010
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 05:50 PM.
The Following 30 Users Say Thank You to lebidou For This Useful Post: [ View ]
16th January 2012, 12:59 AM   |  #3  
OP Member
Thanks Meter: 315
 
97 posts
Join Date:Joined: Nov 2010
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 10:51 AM.
The Following 29 Users Say Thank You to lebidou For This Useful Post: [ View ]
16th January 2012, 03:31 AM   |  #4  
rkoby13's Avatar
Senior Member
Flag You don't wanna know.....
Thanks Meter: 8,126
 
10,096 posts
Join Date:Joined: Mar 2011
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, 03:36 AM   |  #5  
PG101's Avatar
RC-RT Liaison - Devil's Advocate
Thanks Meter: 10,389
 
11,553 posts
Join Date:Joined: Aug 2008
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, 04:13 AM   |  #6  
Senior Member
Flag Melbourne
Thanks Meter: 707
 
1,260 posts
Join Date:Joined: Mar 2011
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, 04:16 AM   |  #7  
sekhargreen's Avatar
Senior Member
Flag Durgapur
Thanks Meter: 610
 
588 posts
Join Date:Joined: Jan 2010
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, 05:19 AM   |  #8  
GryTEcHoG's Avatar
Senior Member
Thanks Meter: 12
 
112 posts
Join Date:Joined: 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?
Last edited by GryTEcHoG; 16th January 2012 at 05:22 AM.
16th January 2012, 06:48 AM   |  #9  
rkoby13's Avatar
Senior Member
Flag You don't wanna know.....
Thanks Meter: 8,126
 
10,096 posts
Join Date:Joined: Mar 2011
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 rkoby13 For This Useful Post: [ View ]
16th January 2012, 07:34 AM   |  #10  
marcellusbe's Avatar
Senior Member
Flag Québec City
Thanks Meter: 4,638
 
746 posts
Join Date:Joined: Dec 2010
More
very good work!!

The Following 2 Users Say Thank You to marcellusbe For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes