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
Guest User
Tech Writer
611
128.1k
Error in Live Server.
Oct 7 2020 1:18 AM
Upload video in live server firstly convert video in .mts format to .mp4 using FFMpeg Converter but convert video successfully .mp4 but i have face a problem it's video play in local but not upload in live server what is issue.
it' s my code
var wwwrootPath = webHost.ContentRootPath +
"\\wwwroot\\UploadVideo\\"
;
if
(CategoryVideo.FileName ==
null
|| CategoryVideo.FileName.Length == 0)
return
Content(
"file not selected"
);
var path = Path.Combine(
wwwrootPath,
CategoryVideo.FileName);
using
(var stream =
new
FileStream(path, FileMode.Create))
await CategoryVideo.CopyToAsync(stream);
string
fileExt = Path.GetExtension(CategoryVideo.FileName);
string
thisFileName = CategoryVideo.FileName;
if
(fileExt !=
".mp4"
)
{
string
input = path;
string
filenameWoExt = Path.GetFileNameWithoutExtension(CategoryVideo.FileName);
var ffmpeg =
new
NReco.VideoConverter.FFMpegConverter();
Convertvideo(input, Path.Combine(
wwwrootPath,
filenameWoExt +
".mp4"
), NReco.VideoConverter.Format.mp4);
thisFileName = filenameWoExt +
".mp4"
;
System.IO.File.Delete(path);
}
Reply
Answers (
1
)
Billing software development in tamil
suggest best code for bill front-end....