. NET to play the video

Source: Internet
Author: User
Tags php open source project linux

Background

Often a friend of potato Youku may find that the video format is mostly in FLV format so let's start with the literacy. flv

FLV is the short name of Flash video, and the FLV streaming format is an audio format developed with the launch of Flash MX. Because it forms a very small file, loading speed is very fast, making the network watch video files become possible, it effectively solves the video file into the flash, so that the exported SWF file volume is huge, can not be used on the network is very good use of shortcomings.

More Reference Encyclopedia Http://baike.baidu.com/view/364757.htm

However, the resources on the user's hands are not necessarily in the FLV format, so a format conversion is required. Here are 2 tools

FFmpeg is an open source free Cross-platform video and audio streaming program that belongs to free software, using LGPL or GPL licenses (based on the components you choose). It provides a complete solution for recording, converting, and streaming audio and video. It contains a very advanced audio/video codec library Libavcodec, in order to ensure high portability and codec quality, Libavcodec Many codec are developed from scratch.

More Reference Encyclopedia Http://baike.baidu.com/view/856526.htm

MEncoder is a command-line mode of video processing software, mencoder support in almost all formats of video conversion, you can convert any format to any format, the conversion function can be said to be quite powerful. The current popular format converters, are based on mencoder development of the GUI, such as Storm transcoding, format factory and so on. It can be said that the converter can do, mencoder can do, but mencoder can do, the converter is not necessarily able to do.

More Reference Encyclopedia Http://baike.baidu.com/view/3353694.htm

But there are some differences between ffmpeg and mencoder in the field of application.

NET pick:

1, in the actual use, ffmpeg in Redhat and SuSE Linux under normal operation, but I SUSE Linux 10 compressed RM and RMVB Video, the press out of the sound of the film is not normal. It is normal to use Redhat compression when all other parameters are exactly the same. It seems that Suse is good for enterprise application, but the application of multimedia (in favor of personal aspect) or Redhat is better.

2,ffmpeg can also compress video, but the effect is better than mencoder. So basically I just use ffmpeg to grab the pictures in the video. You can use the ffmpeg-php Open source project program to crawl any frame of the picture, so that we can easily understand the content of the video.

3,ffmpeg compressed a WMV file, may use less than a minute, but mencoder compressed for several minutes, because mencoder need to calculate more things, so, need to spend more time.

4,mencoder Support video format is very much, such as common wmv,avi,mpg,rm,rmvb,mov,3gp,mp4, there are about hundreds, but I still can not test one by one, estimates are no problem. And FFmpeg does not support RM and RMVB format.

5, as a video compression, the requirements of the machine is relatively high, the system resources occupied relatively large, mainly to CPU and disk IO high requirements. The first two days of compressing a video, using the Debao pr2700d for 4 minutes, using the PR4800 12 minutes, using a Dell 2950 Vmware virtual machine for about 8 minutes. In combination, it is better to have a few CPUs, memory not less than 2GB, disk IO faster.

Practice

The above 2 tools all have the corresponding win platform version then we only need to start the software process with. Net. It's easy to take the time to grasp the various complex parameters of tools.

Just a simple demo.

We elect a very simple video the sample video from WINDOWS can be found in the directory C:\WINDOWS\clock.avi

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.