android[Andrews] text Air video remote Play PC videos

Source: Internet
Author: User
Tags flv file

Apple iOS below. Currently using air video, the ability to play computer video directly from WiFi remotely, without watching video copying to the phone. Very useful! Recently called using Android. Outlook category seems to apply, looking for a long time not found. In careful thinking Airvideo works, video sites are similar and should be implemented in similar ways below Android.

Today in Huawei Glory 6 above the final verification passed a perfect solution. Put it up and share it with friends who have the same needs.

Let's talk about how Air video works:

1) Install air video serverserver below windows and set up a video file folder that you agree to watch remotely

2) Download airvideoclient via Apple's AppStore. and install

The Air video Apple client is charged and doesn't seem cheap. Of course, there's no such thing as a jailbreak.

3) Air Videoclient connects to the service side of Windows. You can see the list of video files for each folder on the server and select Play. Of

MP4 can play directly, rmvb\flv and so on need to convert the server to MP4 video stream, and then to the client on iOS

Note: Real-time conversion to see the CPU usage of Windows system is actually quite high. It's not green.

Inside the Apple Airvideoclient play the video player. The player that looks and plays Youku and other video sites directly. It looks like it's actually the same. It is doubtful that the Airvideo sends the MP4 video stream to the client, and the MP4 video stream under the Web environment may be the same. are interviewed via HTTP addresses. Of course, such a statement is only a test. all without basis. Based on this idea, just build a Web service. can provide video streaming through the web address on the phone. On your phone, you can watch videos on your computer.

detailed steps came, tossing a few days, I did not think the result can be so simple :

A) Download tomcat from the Web and install it. I downloaded the green version of TOMCAT5.5 from this address. Let's say you already have Tomcat, and you can skip this step.

Http://www.rsdown.cn/down/32748.html

A) You can lose weight after downloading. After deleting the contents of these folders, the whole folder is only about 5Mb (folders cannot be deleted)

webapps/

server/webapps/

conf/catalina/localhost/

b) Assuming that Tomcat is already installed, there are already catalina_home environment variables, and now it's time to download one. Need:

-Use text to edit Bin/startup.bat files

-With REM in front of line 11, gaze out the line. Otherwise, the system's catalina_home environment variable will still be used

REM if not "%catalina_home%" = = "" Goto gothome

c) to the Conf folder. The simplest server configuration file to use

-Rename Server.xml to Server-normal.xml

-Rename Server-minimal.xml to Server.xml

II) Tomcat default does not support the URL contains Chinese, which will cause the file name is called Chinese video can not play. Method:

Use text to edit Server.xml. Set the uriencoding for connector to Utf-8, such as:

<connector port= "8080" uriencoding= "Utf-8"/>

Address: http://www.williamlong.info/archives/469.html

III) Set the contents of the video file folder and agree to publish it through Tomcatweb.

Method:

Use text to edit Server.xml. Set host and context, after my changes such as the following

<context path= "/" docbase= "." debug= "0"/>

<context path= "/fd" docbase= "C:\FDOWNLOAD\" debug= "0"/>

</Host>

This allows you to access the video file of the C:\TDDOWNLOAD\ folder via the http://localhost:8080/address.

Access the video file of the C:\FDOWNLOAD\ folder via the http://localhost:8080/fd/address;

Four) enable Tomcat to support a direct web browser to view the list of folders below the file, and see the effects such as the following:

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvagfodq==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70 /gravity/southeast "alt=" Tomcat file display ">

Configuration method:

Use text to edit Conf/web.xml, find listings, and set the number of parameters to true.

<init-param>

<param-name>listings</param-name>

<param-value>true</param-value>

</init-param>

V) Install the UC browser on your Android phone. Believe that very many people have already used UC, this does not elaborate on the steps.

Note: Try UC and chrome on the same phone, and find that chrome can only download rmvb/flv and not play it, but UC can. Therefore, it is required to use UC

VI) at this time. Run Tomcat in the Bin folder under Startup.bat to start Tomcat and connect your phone and computer to the same network;
Next. Using UC should already be able to view Tomcat published Web pages, UC addresses such as: Http://192.168.1.123:8080/,IP address is the address of the computer Tomcat is located
Try clicking on the *. MP4 file. The following prompt appears. Select [Play Online]. Haha, MP4 has been able to look directly on the phone

VII) The revolution has not been successful, try the rmvb/flv file, found still can not see. Back to the Tomcat configuration file again

Use a text editor to open Bin/web.xml, and under MP4 settings, add rmvb and flv MIME types.

<mime-mapping>

<extension>mp4</extension>

<mime-type>video/mp4</mime-type>

</mime-mapping>

<mime-mapping>

<extension>rmvb</extension>

<mime-type>video/x-rmvb</mime-type>

</mime-mapping>

<mime-mapping>

<extension>flv</extension>

<mime-type>video/x-flv</mime-type>

</mime-mapping>

Next, reboot Tomcat and try clicking * again in UC. RMVB and *. FLV files, assuming all can be played. It means you're very lucky.

If not, I am sorry, I can only do this.

I use a cool 8150s low-end phone test. Also the same can't watch rmvb/flv video. But Glory 6 is very normal. This may be related to the Android OS version number, or the manufacturer's customization.

Other additions:

1) Chrome below Windows can only support playback of MP4. Suppose the browser does not support, but still want to see rmvb/flv on the phone, can trouble point, first use the format factory on the computer to convert to MP4 format

2) Air video, the format factory is using FFmpeg, Mp4creator and other open source projects to convert MP4 video stream. and is called through the command line. The mobile phone control computer conversion format for MP4, should be able to further study, but not professional is too waste of time

3) also tried to use the JSP file, to do video file display. The HTML5 that Android needs is easy, but looks like the result is no different from the previous configuration. HTML5 Web embedded video code in the proportion of the following

<divid= "video" style= "Position:relative;z-index:100;width:100%;float:left;" >

<video id= "Media" width= "100%" autoplay= "AutoPlay" controls>

<source src= "<%=path +file%>" >

</video>

</div>

Preliminary analysis of the results, video web page in order to support the same time in IE, Chrome, Android, iOS play video, you need to base on the HTTP request message header browser type inference, embedded different video playback code, and even provide a different video file format. iOS can really only support MP4 playback. Other formats are not supported ....

The slim and already configured green version of Tomcat can be downloaded from here: http://download.csdn.net/detail/hahu/7799861

Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

android[Andrews] text Air video remote Play PC videos

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.