c# - Trying to join two mp4 video files using ffmpeg but getting error -
i'm trying join 2 mp4 video files, i'm getting following error:
unable find suitable output format 'ffmpeg'.
ffmpeg: invalid argument
my code below:
processstartinfo startinfo = new processstartinfo(); startinfo.filename = "path ffmpeg"; startinfo.arguments = "ffmpeg -f concat -i "+path_to_text_file+" -c copy "+path_to_output_video; startinfo.useshellexecute = false; startinfo.redirectstandardoutput = true; try { process process = process.start(startinfo); while (!process.standardoutput.endofstream) { console.writeline("process standard output : " + process.standardoutput.readline()); } } catch (exception e) { console.writeline(e.message); }
my input text file like
file '/path/to/input0' file '/path/to/input1'
can point out i'm going wrong.
the first thing can see you're using "ffmpeg " part of argument. calling executable. when defining target filename. final command looks kinda this:
"\ffmpeg ffmpeg -f concat -i ...."
so if remove "ffmpeg" part argument , try again :-)
Comments
Post a Comment