OSDN Git Service

Merge remote-tracking branch 'x86/oreo-x86' into pie-x86
[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. FFmpegExtractor is a extractor plugin.
9 4. libstagefright_soft_ffmpegvdec plugin is video decoder
10 5. libstagefright_soft_ffmpegadec plugin is audio decoder
11
12 ================================================================================
13 Why is named nam[NamExtractor]?
14 ================================================================================
15
16 Namtso, or Lake Nam, is one of the three holy lakes in Tibet Autonomous Region
17 and should not be missed by any traveler to Tibet. In Tibetan, Namtso means
18 "Heavenly Lake." It is famous for its high altitude and imposing scenery.
19
20 I used to travel there in 2011 Sep.
21
22 ================================================================================
23 Requirements
24 ================================================================================
25
26 1. android_frameworks_native:
27 https://github.com/omxcodec/android_frameworks_native.git
28 branch: cm_maguro-10.1
29
30 2. android_frameworks_av:
31 https://github.com/omxcodec/android_frameworks_av.git
32 branch: cm_maguro-10.1
33
34 3. android_external_ffmpeg
35 git@github.com:omxcodec/android_external_ffmpeg
36 branch: cm_maguro-10.1
37
38 ================================================================================
39 How to build
40 ================================================================================
41
42 1. Get the Source
43    in your "android/external" folder, run:
44    stagefright-plugins(branch: master):
45        git clone git@github.com:omxcodec/stagefright-plugins.git stagefright-plugins
46    ffmpeg(branch: cm_maguro-10.1):
47        git clone git@github.com:omxcodec/android_external_ffmpeg.git ffmpeg -b cm_maguro-10.1
48
49    android_frameworks_native and android_frameworks_av:
50        you should merge my android_frameworks_native(branch: cm_maguro-10.1) and
51    android_frameworks_av(branch: cm_maguro-10.1) code. once you do, you should pay attention to
52    the "USES_NAM" flag, it is only in the "android/frameworks/native" and "android/frameworks/av"
53    directories.
54  
55 2. Compile
56    add USES_NAM flag to COMMON_GLOBAL_CFLAGS in your android build system(e.g. my device: maguro)
57    vi vendor/samsung/maguro/BoardConfigVendor.mk and add this line to it
58        COMMON_GLOBAL_CFLAGS += -DUSES_NAM
59    then compile your android source tree again!
60
61 3. Install
62    adb root
63    adb remount
64    adb sync // sync your android build system to your phone or pad
65    reboot   // reboot your phone or pad
66
67 4. Run
68    get test media files:
69        wget http://movies.apple.com/media/us/ipad/2012/tv-spots/apple-ipad-this_good-us-20120307_848x480.mov
70        wget http://movies.apple.com/media/us/ipad/2012/80ba527a-1a34-4f70-aae8-14f87ab76eea/tours/apple-ipad-feature-us-20120307_848x480.mp4
71        wget http://ftp.kw.bbc.co.uk/hevc/hm-10.0-anchors/bitstreams/i_main/BQMall_832x480_60_qp22.bin
72
73    let us suppose your media files locate at "/sdcard/Movies/" folder.
74    one console window, you should run:
75        adb logcat -c  //clears (flushes) the entire log and exits.
76        adb logcat
77    and other cosole window, you should run:
78    test FFmpegExtractor plugins:
79        adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-this_good-us-20120307_848x480.mov -t video/*
80        adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-feature-us-20120307_848x480.mp4 -t video/*
81    test SoftFFmpegVideo decoder plugin:
82        cd android/external/stagefright-plugins/tools folder, run:
83        adb root
84        ./install // install my scripts
85        adb root && adb shell set-vdec-sw1 // let omxcodec choose software decoder
86        adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-this_good-us-20120307_848x480.mov -t video/*
87        adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/apple-ipad-feature-us-20120307_848x480.mp4 -t video/*
88
89    test HEVC(H.265) decoder:
90        cd android/external/stagefright-plugins/tools folder, run:
91        adb root
92        ./install // install my scripts
93        adb root && adb shell set-vdec-drop // disable drop video frames
94            adb shell am start -a android.intent.action.VIEW -d file:///mnt/sdcard/Movies/BQMall_832x480_60_qp22.bin -t video/*
95
96    run it and enjoy!
97
98 ================================================================================
99 Features
100 ================================================================================
101 Input formats:
102     MP4 / MOV / 3GP
103     TS / PS
104     AVI
105     ASF / WMV / WMA
106     Matroska (MKV)
107     Real(RM,RMVB)
108     WAV
109     FLV
110     SWF
111     APE
112     DTS
113     FLAC
114     WAV
115     OGG
116     Raw HEVC(H.265) bitstreams
117
118 Video decoders:
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     RV (Real Video)
126     VP8
127     FLV1
128     DIVX
129     HEVC(H.265)
130
131 Audio decoder:
132     MP2 (MPEG Layer 2)
133     MP3 (MPEG Layer 3)
134     AAC (MPEG-4 part3)
135     AC3
136     WMA 1/2
137     WMA 3
138     RA (Real Audio)
139     APE
140     DTS
141     FLAC
142     VORBIS
143     
144 ================================================================================
145 Known issues
146 ================================================================================
147 1. some .mov movies do not av resync when seeking
148 2. some video stream ended while seeking
149 3. more video and audio codecs codec to be integrated
150 4. more formats to be integrated
151
152 If you need help with the library, or just want to discuss nam related issues, 
153 you can contact me: Michael Chen (omxcodec@gmail.com)