国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
ffmpeg.exe與mencoder.exe實(shí)例轉(zhuǎn)換操作

using System.Diagnostics;


string ffmpegPath = Configure.ffmpegPath();              //ffmpeg.exe文件所在位置
string mencoderPath = Configure.mencoderPath();    //mencoder.exe文件所在位置

 

string orginalFile = strBaseLocation + @"old/" + fileName;   //轉(zhuǎn)換前文件所在全路徑
string targetFile = strBaseLocation + itemID + ".flv";           //轉(zhuǎn)換后文件所在全路徑

 

string argu = "";
if(fileName.ToUpper().EndsWith(".FLV"))  //不同文件類型使用不同轉(zhuǎn)換參數(shù)


                argu = "-i /"" + orginalFile + "/" -ab 56 -ar 22050 -b 500 -r 15 -s 500x350 /"" + targetFile + "/"";

else if (fileName.ToUpper().EndsWith(".WMV"))


                argu = @"-ffourcc FLV1 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -of lavf -oac mp3lame -lameopts aq=9:cbr:br=64:vol=2 -ovc lavc -lavcopts vcodec=flv:vbitrate=300:acodec=mp3:abitrate=56 -vf scale=320:290,expand=320:290:::1,crop=320:290:0:0 -ofps 18 -srate 22050 " + orginalFile + " -o " + targetFile;

else if (fileName.ToUpper().EndsWith(".AVI"))


                argu = "-i " + orginalFile + " -f flv -vcodec flv -ab 56 -ar 22050 -b 100 -r 15 -s 500x350 -qscale 7 " + targetFile;

 

//根據(jù)不同類型的文件進(jìn)行不同的轉(zhuǎn)換

if (!fileName.ToUpper().EndsWith(".FLV"))

{
        if (fileName.ToUpper().EndsWith(".WMV"))    //利用mencoder.exe將wmv文件轉(zhuǎn)換成flv文件
                              
                        System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(mencoderPath, argu);
                        startInfo.WindowStyle = ProcessWindowStyle.Hidden;

                        System.Diagnostics.Process.Start(startInfo);
        }

        if (fileName.ToUpper().EndsWith(".AVI"))     //利用ffmpeg.exe將avi文件轉(zhuǎn)換成flv文件
        {
                        System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(ffmpegPath, argu);
                        startInfo.WindowStyle = ProcessWindowStyle.Hidden;

                        System.Diagnostics.Process.Start(startInfo);    //隱藏dos轉(zhuǎn)換頁(yè)面
       }
}

else
{
         System.IO.File.Copy(orginalFile, targetFile);
}

 

if (System.IO.File.Exists(targetFile) && (new System.IO.FileInfo(targetFile)).Length > 10000)
{
       return "成功";

}
else

{

      return "失敗";

}

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
JAVA+ffmpeg+mencoder轉(zhuǎn)換視頻
java實(shí)現(xiàn)視頻上傳和播放SpringMVC + Mybatis + ckplayer+ffmpeg+mencoder
java調(diào)用ffmpeg執(zhí)行視頻轉(zhuǎn)換-轉(zhuǎn)載
ffmpeg編譯及使用
Java+Windows+ffmpeg實(shí)現(xiàn)視頻轉(zhuǎn)換
java實(shí)現(xiàn)視頻文件轉(zhuǎn)換為flv(帶文件縮略圖)
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服