1. Introduction to Vitamio
1.1 What is Vitamio?
Vitamio is an audio and video playback component on the Android platform. It supports playing videos in almost formats and mainstream network video streams (http/rtsp/mms, etc.). Detailed Chinese introduction: Here.
Vitamio official website:/
Vitamio Weibo: /vitamio
VPlayer official website:
Vitamio Douban:/145815/
1.2 About Vitamio's name (excerpted from Douban official website)
Vitamio comes from the English word Vitamin (vitamin). I hope that Vitamio is as important as Android multimedia developers, just as Vitmain is indispensable to the human body.
The name of Vitamio comes from Vitamin, We hope the importance of Vitamio for Android multimedia developers as indispensable as Vitamin for human.
1.3 About the origin of Vitamio (excerpted from Douban official website)
We are a group of hardworking Coders with a hardworking name. We hate the tedious Android multimedia program development. We upgraded from version to different devices. After testing Samsung, htc, sony, and fucked, we got v880 again. We think these annoying things are destined to make our lives stupid. We don’t have time to study new technologies. The most outrageous thing is that we cannot focus on realizing our creative APP.
Often addicted to the spiritual world that saves the world, ordinary Coders can also become weird. As the first team to study Android media tools, we decided to put our Vitamio framework out for free to help Android multimedia developers realize their creative dreams :D, Dear boys, we are a high-quality multimedia framework from China.
First edition release date: Release in September 2011
1.4 Vitamio-related data
Since its release in September 2011, the number of users has exceeded 2,000W, and more than 1,500 developers have used Vitamio.
Domestic: Sohu Video, 91 Panda Video (Net Dragon), Haidilao, Gehua Co., Ltd., etc.
Abroad: Pak TV Global, Madani Channel, Deen TV, myTRANS, FPlayer, Radio Nepali, GNC LiveWell, MagicTV Streaming Player Free, Hispan TV Mobile, TV Italy, etc.
1.5 What are the advantages of Vitamio?
a). Powerful. Supports video playback in many formats and online videos. (It's useless not powerful and free, so it's ranked first)
b). Personally free. (However, enterprise use requires a purchase authorization)
(There are already a number of paid players based on Vitamio on Google Play, you can search for Vitamio keywords in it)
c). Seamless integration. Only Vitamio's Library project can be used, without downloading and installing the decoding package (the previous version of Vitamio requires downloading and installing the decoding package separately).
d). Easy to use. Calling is very simple and easy to use.
e). Free customization. The code of the playback interface is completely open, making it convenient to customize the playback interface, progress bar, etc.
d). Continuous update. 2012-7-9 has released a new version of the internal beta version, and the next version is expected to be released in early August.
e). Service follow-up. Vitamio official QQ group (171570336), providing developers communication and discussion. The forum is still under development.
1.6 The team behind Vitamio
Vitamio and VPlayer belong to the same team and the same company (). We are in Beijing, and the team currently has 5 members, 4 developers and 1 designer. We mainly develop VPlayer, supplemented by Vitamio :)
1.7 What is the relationship between Vitamio and VPlayer?
VPlayer is developed based on Vitamio, so Vitamio that VPlayer can play can also be played.
OPlayer is developed based on Vitamio and is a completely open source code as an example and demonstration product for promoting Vitamio. Although it is an amateur work, it still aims to officially release it to the market.
1.8 Vitamio and ffmpeg
FFmpeg provides software decoder and multiplexed outputs (demuxers). Vitamio uses the FFmpeg code under the LGPLv2.1 license, and the code can be downloaded from here.
/ABitNo/ffmpegandroid
2. Download and run Vitamio
2.1 Download
Vitamio 3.0 download. (Updated on 2012-10-23)
OPlayer 3.0 download. (Updated on 2012-10-24, please register one if you don’t have a taocode account)
2.2 Operation example
The two items after decompression are: VitamioBundle and Test, where VitamioBundle is Library (see here for Android Library), just run the Test example.
Notice:
1). Example: Using API 16, if you do not install and upgrade the latest Android 4.1, you will report an error. You can lower it to API 14 (Android 4.0) or API 15 (Android 4.0.3) in your settings.
2). The project file does not have a gen folder, please add it yourself.
3). Compile VitamioBundle first, and then compile Test. If there are still errors, clean the project and compile it in turn.
4). Modify the VideoViewDemo video path to the video path you want to test. Note that local videos use the setVideoPath method, and online videos use the setVideoURI method.
2.3 Integration Example
You do not want to refer to Vitamio in the form of Library. You can directly copy all the classes and resources in VitamioBundle to the target project. Note that the src, libs, and res directories must be copied, and there are also configurations in it.
With successful integration examples, you can take a look at the structure of OPlayer.
2.4 Custom InitActiviy, that is, decompressing the decoding package progress bar interface.
Here is the InitActivity code:
public class InitActivity extends Activity { public static final String FROM_ME = "fromVitamioInitActivity"; public static final String EXTRA_MSG = "EXTRA_MSG"; public static final String EXTRA_FILE = "EXTRA_FILE"; private ProgressDialog mPD; protected void onCreate(Bundle savedInstanceState) { (savedInstanceState); getWindow().addFlags(.FLAG_KEEP_SCREEN_ON); new AsyncTask<Object, Object, Object>() { protected void onPreExecute() { mPD = new ProgressDialog(); (false); (getString(getIntent().getIntExtra(EXTRA_MSG, .vitamio_init_decoders))); (); } @Override protected Object doInBackground(Object... params) { (getApplicationContext(), getIntent().getIntExtra(EXTRA_FILE, ), new () { @Override public void onNativeLibsInitCompleted(String libPath) { ("Native libs inited at " + libPath); (0); } }); return null; } }.execute(); } private Handler uiHandler = new Handler() { public void handleMessage(Message msg) { (); Intent src = getIntent(); Intent i = new Intent(); (("package"), ("className")); (()); (src); (FROM_ME, true); startActivity(i); finish(); } }; }
Code description:
The main thing is that you can write an initialization interface yourself and call this code in the thread.
3. Summary of Vitamio problems
3.1 Why can’t the official website be opened?
Since our department maintains several websites, we have changed them all on our own, so it’s not too late to do something wrong, you know.
3.2 case: Why is it always stopping at the decoding that is being decoded?
case : Couldn't load vinit: findLibrary returned null
case : Not allowed to bind to service Intent (act=)
case : $VitamioNotFoundException
case : : Library /data/data/null/libs/ not found
default : //All kinds of problems that cannot be run
return There is basically one problem, the problem that the Vitamio test version released on 2012-7-9 cannot coexist. It cannot coexist with VPlayer, cannot coexist with other Vitamio, and needs to be uninstalled cleanly. Note that changing the package name (package) is a new APK, and the previous ones need to be uninstalled.
3.3 Video/video stream (rtp, rtsp, etc.) cannot be played.
The following situations may occur:
a). The video itself has problems. You can use other players to play it to see if it can be played normally.
b). The local network speed is not good/the equipment configuration is too low, there is no way to do this
c). Video source card, lacks bandwidth, and direct access is slow, so there is no way to do this.
d). There are also problems with Vitamio using VPlayer, while other players are fine. This may be our problem. We are still constantly improving, especially the part of broadcasting online videos. This can be waited for the new version to be released :)
e). Can’t wait, so I’ll send us the video test address and brief description (vplayer@). We will try our best to reply. Thank you!
3.4 The lowest supported Android version of Vitamio
Currently, the project we are running supports Android 2.1 at the lowest support. The Android API Level selected by the sample project is 4.1, but it does not mean that it only supports 4.0 or above. You can see from it:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="15" />
If the compilation cannot be run, just delete the res/values-v11 and values-v14 in the VitamioBundle project, and make a slight change to other parts.
3.5 Why does a prompt box pop up requiring Vitamio Plugin to be installed
Because you are downloading and using the old version of Vitamio, please uninstall and download the version released on July 9, 2012. Please see this article 2.1 to download.
3.6 Does hard decoding support?
Currently, the part that supports hard decoding is not very mature and unstable, and will not be provided for the time being.
3.7 When will a new version be released?
Hey, please follow our official Weibo (/vitamio)! ! At present, we focus on VPlayer. After the new version is successfully launched, it should be able to speed up the release of Vitamio, so you can use VPlayer to test it first.
3.8 E/Vitamio(1557): : No content provider: (2012-8-6)
This is not an error, it is a normal handling. Now play the video like this: first open the URL as a ContentProvider. If it cannot be opened, open it directly as a URL.
3.9 What instruction sets of CPUs does Vitamio support? (2012-09-07)
ARMv6, ARMv6 VFP, ARMv7 VFPV3, ARMv7 NEON (Note: The version released on 2012-8-31 does not support ARMv6 CPU, VPlayer is no longer supported, but it will be added to Vitamio next time it is released)
3.10 The problem of sudden interruption in playing online videos
Maybe the video website has restricted it and some addresses that cannot be broadcasted have been added. Currently, Vitamio's processing is that it will be closed directly if it cannot be broadcasted. The subsequent version will be improved and skipped directly.
3.11 The frame return phenomenon occurs when dragging the progress bar (local playback, for example, dragging to 1:20, but skipping to 1:15 when playing) [2012-11-20 New]
This is a normal phenomenon, not a player problem. By default, seek to reach the nearest keyframe, there is no guarantee that there will be keyframes at any point in time. Unless you are intra-only encoding. (——From GoogleGeek)
4. Known issues and precautions (the new version refers to the version released on 2012-8-31)
4.1 Pay attention when confusing projects, and you need to ignore the class library in Vitamio! (2012-8-1 update)
-keep class .** { *; } -keep class .** { *; }
4.2 Not available in included projects
Otherwise, if VPlayer is installed, a conflicting error will be reported and cannot be installed. In other words, you can use VPlayer's MediaProvider directly, or write a scan service yourself, but the name cannot be the same.
5. Others
5.1 Code to call VPlayer to play video:
private void startPlayer(String url, String title) { Intent i = new Intent(); (new ComponentName("", "")); (""); ((url)); ("displayName", title); startActivity(i); }
The above is a detailed introduction to the components of Android Vitamio FAQ audio playback. Friends who hope to help Android develop audio playback.