Open gmav opened 5 years ago
Sorry for a late reply,
It looks like you are doing an encode concat, are the video and audio streams in the same input format? If so you can do a mux concat, basically you would add the two inputs to a txt file, then pass the txt through ffmpeg as an input with the Codec copy command, It will concatenate the two files end to end.
The input file looks like this
file 'c:\temp\vvv1.mp4'
file 'c:\temp\vvv2.mp4'
The output command, as i would recommend it, would look like this
ffmpeg -auto_convert 1 -f concat -i "c:\temp\mytextfile.txt" -c copy -shortest -movflags +faststart "c:\temp\output.mp4"
The code to do this in Hudl.Ffmpeg looks like this
var commandFactory = CommandFactory.Create();
var inputSettings = SettingsCollection.ForInput(
new AutoConvert(),
new FormatInput(FormatType.Concat));
var outputSettings = SettingsCollection.ForOutput(
new OverwriteOutput(),
new MovFlags(MovFlags.EnableFastStart),
new TrimShortest(),
new CodecAudio(AudioCodecType.Copy),
new CodecVideo(VideoCodecType.Copy));
commandFactory.CreateOutputCommand()
.AddInput("c:\temp\mytextfile.txt", inputSettings)
.To<Mp4>("c:\temp\output.mp4", outputSettings);
commandFactory.Render();
}
Hello i'm trying to concat two mp4 files, both contain video/audio stream. After some search i've found a working solution:
Is there a way to do it in a single stage?