转换C#代码中的视频文件格式 [英] Convert Video file format in C# code

查看:458
本文介绍了转换C#代码中的视频文件格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想转换任何视频文件格式,使用C#代码转换为avi视频文件。有没有办法像这样转换视频文件,请帮帮我。谢谢..

解决方案

简单的答案是否定的。您需要为每种格式指定特定的转换器(并且必须正确安装和许可等等)。这不是一件容易的事。但是,简单的方法是执行命令行工具,如vlc(能够这样做),例如:

C:\Program Files(x86)\VideoLAN \ VLC \vlc - 我假-vvv%1 --sout =#transcode {vcodec =h264,vb =512,fps =23.97,scale =1,acodec =mpga,ab =128, channels = 2,samplerate =44100}:standard {access =file,mux =dummy,dst =%_ commanm%.mp4} vlc:// quit 



使用

 System.Diagnostics.Process.Start()



to这样做。问候。


Hi,
I want to convert a any video file format to convert into avi video file using C# code. Is there any way to convert the video file like this, Please help me. Thank you..

解决方案

the simple answer is no. you need specific "converter" for each format (and it must be properly installed and licenced and so on). this is no easy task. however, the easy way is to execute a commandline tool like vlc (which is capable of doing so) e.g.:

"C:\Program Files (x86)\VideoLAN\VLC\vlc" -I dummy -vvv %1 --sout=#transcode{vcodec="h264",vb="512",fps="23.97",scale="1",acodec="mpga",ab="128","channels=2",samplerate="44100"}:standard{access="file",mux="dummy",dst="%_commanm%.mp4"} vlc://quit


use

System.Diagnostics.Process.Start()


to do so. regards.


这篇关于转换C#代码中的视频文件格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆