cmxl / FFmpeg.NET

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

Add parameter to set `startInfo.WorkingDirectory` #74

Closed SunSerega closed 1 year ago

SunSerega commented 1 year ago

I need to execute this command:

ffmpeg -dump_attachment:t "" -i {file}

If I specify anything other than "" as a path - the ffmpeg is going to try and (fail to) save all attachments into the same file. And %d doesn't seem to be supported here... The best solution I found is to set the working dir to a new empty folder, so as to not mix the output of this command with other files. But there doesn't seem to be functionality for that in xFFmpeg.Net rn - I don't see startInfo.WorkingDirectory being set anywhere.

cmxl commented 1 year ago

There is now an overload for ExecuteAsync where you can pass a workingdirectory. I will actually consider to make ExecuteAsync with the FFmpegParameters public so it is easier to add further properties to the arguments.