cmxl / FFmpeg.NET

.NET wrapper for common ffmpeg tasks
MIT License
611 stars 99 forks source link

Provide possibility to specify codec (lossless cut) #35

Closed bartekmotyl closed 3 years ago

bartekmotyl commented 4 years ago

Hi, I would like to be able to cut video (using ConvertAsync) but with lossless codec (-codec copy). I know I can use prepare the full, custom path and call ExecuteAsync but it would be nice ConvertAsync also supports custom parameters (or at least codec specification). Or maybe it is possible already somehow?

greetings Bartek

LwRed commented 4 years ago

Hello,

A little add to the FFmpegArgumentBuilder.cs could be :

if (conversionOptions.BaselineProfile) commandBuilder.Append(" -profile:v baseline "); if (conversionOptions.CopyVideo) commandBuilder.Append(" -c copy ");

In order to switch between 2 modes : .BaselineProfile or .CopyVideo

Thanks for your work, I love and use SVC !

Nightmare204 commented 4 years ago

I added some parameters in ConversionOptions. For this case use VideoCodec parameter that sets the Encoder to be used This should be available when #42 pull request is accepted

cmxl commented 3 years ago

PR has been merged