Answer the question
In order to leave comments, you need to log in
How to make mp4 to html5?
Good all day.
The situation is this: I record a video stream using Aforge.net from an ip-camera, the output is avi or mp4.
Then I need this recorded vidyushka to be played in the browser.
with avi I convert to mp4, I display it on the page - nothing comes out, in browser debugging there is an error 404 for this file, I checked the paths to the file, everything is fine.
I tried all options below the list of cmd commands:
//var cmdLine = pathToFfmpeg + "-i" + TempFileName + "-f mp4 -r 14 -s 640x480 -y " + DecodingFileName;
//var cmdLine = pathToFfmpeg + " -i " + TempFileName + " -vcodec mpeg4 -acodec aac -r 30 -s 640x480 -y " + DecodingFileName;
//var cmdLine = pathToFfmpeg + " -i " + TempFileName + " -acodec libfaac -ab 96k -vcodec libx264 -vpre slower -vpre main -level 21 -refs 2 -b 345k -bt 345k -threads 0 -r 25 -s 640x480 -y " + DecodingFileName;
//var cmdLine = pathToFfmpeg + " -i " + TempFileName + " -c:v libx264 -pix_fmt yuv420p -movflags faststart " + DecodingFileName;
,
where pathToFfmpeg is the path to ffmpeg, TempFileName is the path to the avi file, DecodingFileName is the resulting file (the required mp4 to be played in the browser).
I tried to transfer from mp4 to mp4, the same thing - when loading a video, it displays an error 404.
I generate a link to this video on the page.
After looking at the codecs of video files from other resources, I found that they have mp4 everywhere - H264 MPEG-4 AVC part10 avc1,
but I also have the same codec in the output file.
I implement on c# mvc 5, maybe IIS needs to be configured?
I will be very grateful for your help. this is my third day with this problem.
Answer the question
In order to leave comments, you need to log in
If 404 - look at the server logs, it is obvious that the paths are not at all normal. It's strange if you haven't done it in 3 days.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question