OSDN Git Service

cleanup README
[android-x86/external-stagefright-plugins.git] / README
1 ================================================================================
2 Stagefright Plugins for Android
3 ================================================================================
4
5 1. Enhance the Android multimedia framework providing additional Plugins for
6    user interaction
7 2. FFmpeg provides demuxers and av codecs;
8 3. NamExtractor is a extractor plugin, it would be loaded by Stagefright when 
9    Stagefright started.
10 4. NamExtractor will load FFmpegExtractor, MplayerExtractor and VLCExtractor.
11    but only FFmpegExtractor is implemented now.
12 5. FFmpegExtractor is the reference to "ffmpeg/ffplay" to achieve. 
13 6. libstagefright_soft_ffmpegvdec plugin is video decoder
14 7. libstagefright_soft_ffmpegadec plugin is audio decoder
15
16 ================================================================================
17 Why is named nam[NamExtractor]?
18 ================================================================================
19
20 Namtso, or Lake Nam, is one of the three holy lakes in Tibet Autonomous Region
21 and should not be missed by any traveler to Tibet. In Tibetan, Namtso means
22 "Heavenly Lake." It is famous for its high altitude and imposing scenery.
23
24 I used to travel there in 2011 Sep.
25
26 ================================================================================
27 Requirements
28 ================================================================================
29
30 CyanogenMod 9.x (Ice Cream Sandwich)
31 http://wiki.cyanogenmod.com/wiki/Galaxy_Nexus_(GSM):_Compile_CyanogenMod_(Linux)
32
33 FFMPEG-1.0 release
34 http://ffmpeg.org
35 ref: git://android.git.linaro.org/platform/external/ffmpeg.git
36
37 ================================================================================
38 How to build
39 ================================================================================
40
41 1. Get the Source
42    clone cm-9.1.0 source from CyanogenMod git:
43        repo init -u git://github.com/CyanogenMod/android.git -b cm-9.1.0
44    plz ref: http://wiki.cyanogenmod.com/wiki/Galaxy_Nexus_(GSM):_Compile_CyanogenMod_(Linux)
45
46    clone my sources from the omxcodec{github} git!
47    in your "android/external" folder, run:
48    stagefright-plugins:
49        git clone git@github.com:omxcodec/stagefright-plugins.git stagefright-plugins
50    ffmpeg:
51        git clone git@github.com:omxcodec/android_external_ffmpeg.git ffmpeg -b omxcodec-1.0
52
53    in your "android/external" folder, run:
54    cp stagefright-plugins/repo/local_manifest.xml ../.repo
55    cd ..      // go to android folder
56    repo sync  // sync "frameworks_base" code again!
57
58    "repo sync" sync "frameworks_base" code again! of course, you can merge my
59    android_external_ffmpeg code instread of "repo sync" frameworks_base. once you do,
60    so you should pay attention to the "USES_NAM" flag, it is only in the
61    "android/frameworks/base" directory
62  
63 2. Compile
64    add USES_NAM flag to COMMON_GLOBAL_CFLAGS in android build system
65        vi vendor/samsung/maguro/BoardConfigVendor.mk and add these lines to it
66            USES_NAM := true
67            ifdef USES_NAM
68                COMMON_GLOBAL_CFLAGS += -DUSES_NAM
69            endif
70
71    ffmpeg:
72        cd android/external/ffmpeg
73        mm ffmpeg  // NOT "mm", plz FIXME!
74
75        cd android/external/stagefright-plugins
76        mm
77
78 3. Install
79    adb root
80    adb remount
81    adb sync // sync your android build system to your phone or pad
82    reboot   // reboot your phone or pad
83
84 4. Run
85    get test media files:
86        wget http://movies.apple.com/media/us/ipad/2012/tv-spots/apple-ipad-this_good-us-20120307_848x480.mov
87        wget http://movies.apple.com/media/us/ipad/2012/80ba527a-1a34-4f70-aae8-14f87ab76eea/tours/apple-ipad-feature-us-20120307_848x480.mp4
88
89    let us suppose your media files locate at "/sdcard/Movies/" folder.
90    one console window, you should run:
91        adb logcat
92    and other cosole window, you should run:
93    test NamExtractor and FFmpegExtractor plugins:
94        adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-this_good-us-20120307_848x480.mov -t video/*
95        adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-feature-us-20120307_848x480.mp4 -t video/*
96    test SoftFFmpegVideo decoder plugin:
97        cd android/external/stagefright-plugins/tools folder, run:
98        adb root
99        ./install // install my scripts
100        adb root && adb shell set-vdec-sw1 // let omxcodec choose software decoder
101        adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-this_good-us-20120307_848x480.mov -t video/*
102        adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-feature-us-20120307_848x480.mp4 -t video/*
103
104    run it and enjoy!
105
106 ================================================================================
107 Features
108 ================================================================================
109 Input formats:
110     MP4 / MOV / 3GP
111     TS / PS
112     AVI
113     ASF / WMV / WMA
114     Matroska (MKV)
115     Real(RM,RMVB)
116     WAV
117
118 Video formats:
119     MPEG-1/2
120     MPEG-4
121     H.263
122     H.264 / MPEG-4 AVC
123     WMV 1/2
124     WMV 3 / WMV-9 / VC-1
125     Real Video
126
127 Audio formats:
128     MPEG Layer 1/2
129     MP3 - MPEG Layer 3
130     AAC - MPEG-4 part3
131     AC3 - A/52 (Dolby Digital)
132     WMA 1/2
133     WMA 3
134     Real Audio
135     AMR (3GPP)
136     
137 ================================================================================
138 Known issues
139 ================================================================================
140 1. some .mov movies do not av resync when seeking
141 2. some video stream ended while seeking
142 3. more video and audio codecs codec to be integrated
143 4. more formats to be integrated
144
145 If you need help with the library, or just want to discuss nam related issues, 
146 you can contact me: Michael Chen (omxcodec@gmail.com)
147