How to convert video from H.264 to H.265

2019-09-21 19:37发布

I write a Winform app have 2 function : play video (use vlc videolan active plugin) and convert video to H.265. But I dont know use which library for converting (example code if maybe). Anyone can help me. Thanks and best reagards.

3条回答
我只想做你的唯一
2楼-- · 2019-09-21 19:42

That's awesome, if anyone feel hard to understand then use Pavtube video converter can convert any video to any format easily. this software is stable and keep updating for users.

查看更多
ゆ 、 Hurt°
3楼-- · 2019-09-21 19:45

Yay, I solved it. I put code here for anyone need. First, download https://ffmpeg.zeranoe.com/builds/ (choose Shared), then copy all file in bin folder in this package to your project. Next, code :

string input = "E:\\ii.mp4";
string output = "E:\\oo.mp4";
Process proc = new Process();
proc.StartInfo.FileName = @"E:\\DuyProject\\Format_H264_H265\\ffmpeg\\ffmpeg.exe";
proc.StartInfo.Arguments = "-i " + input + " -c:v libx265 " + output;
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.UseShellExecute = false;
if (!proc.Start())
{
    Console.WriteLine("Error starting");
    return;
}
StreamReader reader = proc.StandardError;
string line;
while ((line = reader.ReadLine()) != null)
{
   Console.WriteLine(line);
}
proc.Close();
查看更多
对你真心纯属浪费
4楼-- · 2019-09-21 19:48

You can use FFMpeg with this command:

ffmpeg -i input.mp4 -c:v libx265 output.mp4
查看更多
登录 后发表回答