可以確定的是環境沒有問題,具體可能是命令列或者實作的問題,找了幾天試了很多辦法都沒有實作,大致內容如下:
管道:
NamedPipeServerStream p_from_ffmpeg
= new NamedPipeServerStream("from_ffmpeg", PipeDirection.InOut, 1, PipeTransmissionMode.Byte, System.IO.Pipes.PipeOptions.WriteThrough, 10000, 10000);
初始化
process = new Process
{
StartInfo =
{
FileName = @"D:\test\ffmpeg.exe",
Arguments =com,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardInput = true,
RedirectStandardOutput = true,
RedirectStandardError = true
},
EnableRaisingEvents = true
};
回呼資料
process.ErrorDataReceived += new DataReceivedEventHandler(OutError);
嘗試命令列:
var com = @"-i rtmp://pull-g.kktv8.com/livekktv/100987038 -vcodec -f \\.\pipe\from_ffmpeg";
var com=@"-i rtmp://pull-g.kktv8.com/livekktv/100987038 -c copy D:\test.mp4";
var com= @"-i rtmp://pull-g.kktv8.com/livekktv/100987038 -c: v flv -f flv \\.\pipe\from_ffmpeg";。。。。等等
要不就是提示無法找到對應輸出格式,路徑管道錯誤 不然就是什么都沒有顯示。
回呼可以輸出命令列引數,但是無法獲取二進制資料。。。求解
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/45914.html
標籤:VCL組件使用和開發
上一篇:c++builder XE2可以使用ZEOSDB控制元件嗎?
下一篇:企業需要的C++程式員
