hudl / HudlFfmpeg

Hudl.Ffmpeg framework
Apache License 2.0
112 stars 32 forks source link

How should I format paths? #73

Closed GuerrillaCoder closed 7 years ago

GuerrillaCoder commented 7 years ago

I cannot get sample code to run, I just get a file not found exception.

In part of your documentation you use forward slashes, in other you use a single backslash (which causes an invalid escape character error for me). I have tried also with double backslashes but I am always getting a "The system cannot find the file specified" excaption.

Here is my complete code but I have tried the paths several different ways:

            var outputPath = @"E:\\Videos\\prospecting\\output";
            var FFmpegPath = @"E:\\Program Files\\ffmpeg\\binFFmpeg.exe";
            var FFprobePath = @"E:\\Program Files\\ffmpeg\\FFprobe.exe";

            ResourceManagement.CommandConfiguration = CommandConfiguration.Create(outputPath, FFmpegPath, FFprobePath);

            var filterchain = Filterchain.FilterTo<VideoStream>(new Concat());

            var outputSettings = SettingsCollection.ForOutput(new CodecVideo("libx264"));

            var commandFactory = CommandFactory.Create();

            commandFactory.CreateOutputCommand()
                          .WithInput<VideoStream>(@"c:\\Users\\mikey\\Videos\\part2-proper.mp4")
                          .WithInput<VideoStream>(@"E:\\Videos\\prospecting\\New Video Saved Folder\\2001 Travel.mp4")
                          .Filter(filterchain)
                          .MapTo<Mp4>(@"E:\\Videos\\prospecting\\output\\joined.mp4", outputSettings);

            commandFactory.Render();
GuerrillaCoder commented 7 years ago

I had issue with path, my bad