vb如何用avi的vfw系列api提取avi檔案里的wav音頻?
uj5u.com熱心網友回復:
upup
up
uj5u.com熱心網友回復:
https://blog.csdn.net/dengdun6257/article/details/102283225uj5u.com熱心網友回復:
把它簡單化,用shell呼叫FFmpeg:Private Declare Function GetShortPathName Lib "kernel32.dll" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
'設定輸出檔案
Dim S As String
Dim Inputfile As String '輸入檔案
Dim Outputfile As String '輸出檔案
Outputfile = "D:\OutPutFile.wav"
If Dir(Outputfile) = "" Then '檔案不存在則創建
FileNumber = FreeFile
Open cjlT1 For Binary As #FileNumber
Put #FileNumber, , Chr(0)
Close #FileNumber
End If
S = String(LenB(Outputfile), Chr(0))
GetShortPathName Outputfile, S, Len(S)
Outputfile = left(S, InStr(S, Chr(0)) - 1)
'設定環境變數以支持FFmpeg輸入檔案路徑
FileNumber = SetEnvironmentVariable("Path", FFmpegPath) '設定FFmpeg檔案所在路徑
S = "ffmpeg -i """ & Inputfile & """ -f wav -acodec pcm_s16le -ac 1 -y " & Outputfile
Call Shell(S, vbHide)
uj5u.com熱心網友回復:
https://bbs.csdn.net/topics/425942uj5u.com熱心網友回復:
https://blog.csdn.net/imxiangzi/article/details/80265978轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/8868.html
標籤:多媒體
上一篇:求助:vbs正則運算式匹配問題
