Summary of video conversion using FFMPEG + mencoder (C #)

Source: Internet
Author: User

the success of YouTube has sprung up domestic video websites, recently, a friend asked me to help him write a program that converts various video formats to FLV , here we will share with you the difficulties and experiences encountered in programming.

1, use the engine: FFMPEG + mencoder
2, FFMPEG Latest Version: http://ffdshow.faireal.net/mirror/ffmpeg/
mencoder New Version: http://www5.mplayerhq.hu/MPlayer/releases/win32/
3, conversion speed comparison: in general, FFMPEG conversion speed is faster than mencoder
4. Conversion format requirements: Rm, rmvb, and RT files can only be converted using mencoder. For speed reasons, I basically use FFMPEG conversion, so I didn't test the format that mencoder can convert in detail (which of the following friends knows, please tell me, I will add it ).
5. The pure audio format can only be converted using mencoder. To determine whether the audio format is pure, you can use the command FFMPEG-I "full file path" to obtain the output and then analyze it.
6. The effect of FFMPEG conversion in. mov format is relatively poor. mencoder is recommended for conversion. mencoder is recommended for wmv8 FFMPEG.
7. Video Rate Output: you must first obtain the width and height of the source video file (which can be analyzed after the output is obtained through FFMPEG-I "full file path) set the size of the output file based on the ratio of height to width.
8. Possible difficulties: because FFMPEG and mencoder are both command line tools (of course, you can also download Source Code and change it to com ), in C #, you can only use process. I mentioned earlier that to obtain the output information (obtain the video information, obtain the current conversion progress, and obtain the time to complete the conversion), you must set process. startinfo. useshellexecute = false; process. startinfo. createnowindow = true; then process must be obtained through asynchronous programming. standardoutput and process. the value of standarderror. For more information, see (MS-help: // Ms. msdnqtr.2003feb. 2052/cpref/html/frlrfsystemdiagnosticsprocessclassstand Ardoutputtopic.htm) (you must install msdn to check it ).

This article aims to help you avoid detours, and does not provide actual solutions and relevant source code downloads. If you need the source code, you must pay for it (if you are interested, you can send an email cxbsky # hotmail.com ).
If you have any other questions, please refer to this document.ArticlePublish a message.

References:
Http://wf.xplore.cn/read.php/90.htm

Baidu and Google search FFMPEG mencoder also have many related webpages

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.