0

I can convert the file with the extension mp4 in my hand from the code line related to PowerShell to m3u8 format.

ffmpeg -i inputVideo.mp4 -profile:v baseline -level 3.0 -s 960x540 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls outputVideo.m3u8

But I want to automate this process using C#. I did as written in the document on Microsoft's site, but I could not add the relevant parameters. Has anyone done anything like this before? or how can I follow a path.

https://learn.microsoft.com/en-us/powershell/scripting/developer/hosting/adding-and-invoking-commands?view=powershell-7&fbclid=IwAR05LjyIa8Yv5YFVh-HcbWH5YqmaeQKJ8LzaGsCQxjvJBIepdLAx7E39y7Y

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • The parameter should not have dashes so they would be : .AddParameter("i", "inputVideo.mp4"). It also looks like you need to have full path name for any reference files. – jdweng Feb 26 '20 at 17:35
  • @jdweng like as .AddParameter("i", "inputVideo.mp4") .AddParameter("i", "baseline") .AddParameter("i","3.0") ? – İlyas ARUCA Feb 26 '20 at 18:00
  • No. .AddParameter("i", "inputVideo.mp4") .AddParameter("profile:v", "baseline") .AddParameter("level","3.0") Also if the file is not in same folder and the c# exe add pathname "c:\temp\inputVideo.mp4" – jdweng Feb 26 '20 at 18:15
  • thank you for the answer. I'll try again the way you say it, and share the result again. @jdweng – İlyas ARUCA Feb 26 '20 at 18:28
  • @jdweng Could you post this as answer so the OP can accept? – Theo Feb 26 '20 at 20:19

0 Answers0