TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Narendhiran P
NA
147
2.6k
How add webjobs input and output path to the existing storage contain
Jul 8 2020 12:36 PM
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
)
{
//set the input file path
string
inputfile =
string
.Format(@
"D:\home\site\wwwroot\video\{0}"
, filename);
//set the input file path
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);
//you could change the command value as what you want to use
engine.CustomCommand(command);
}
using
(var fileStream = System.IO.File.OpenRead(outputFile))
{
fileStream.CopyTo(blobOutput);
}
}
Reply
Answers (
0
)
Attempting to send email in ASPNET MVC. Cannot connect to SMTP server
Is there any best way to resize video file size in asp.net mvc5.