The below code i was using video resize using webjobs on my application. I want to configure(use) input and output path on my existing storage image container in Azure to the below code. Please advice. thanks in advance
- public static void ProcessQueueMessage(
- [QueueTrigger("blobcopyqueue")] string filename, TextWriter log,
- [Blob("textblobs/{queueTrigger}", FileAccess.Write)] Stream blobOutput
- )
- {
-
- string inputfile = string.Format(@"D:\home\site\wwwroot\video\{0}", filename);
-
- string outputFile = string.Format(@"D:\home\site\wwwroot\video-compress\{0}", filename);
- using (var engine = new Engine(@"D:\home\site\wwwroot\compress\ffmpeg.exe"))
- {
- string command = string.Format(@"-i {0} -vcodec h264 -b:v 250k -acodec mp2 {1}", inputfile, outputFile);
-
- engine.CustomCommand(command);
- }
- using (var fileStream = System.IO.File.OpenRead(outputFile))
- {
- fileStream.CopyTo(blobOutput);
- }
- }