Friday 19 May 2017

How to play mp4 video in html video tag in which the video is uploaded via multer

I have to play video in my website. The video is uploaded via multer with node.js and in express framework.The file is inserting to the database and the specified folder(file name like 1b47c24b20cc2465fbcb395fd1a9dfb4). I am uploading image also and its showing properly But video is not playing.

Here is my html code

<div class="form-group">
<label>Upload image</label>
<input type="file" name="file" id="file" ng-model="testimonial.file" ngf-select ngf-max-size="25MB" required">
<img ng-src="/images/" width="49" height="49" ng-model="testimonial.file" /><br/>
<label>Upload video</label>
<input type="file" name="video" id="video" ng-model="testimonial.video" ngf-select ngf-max-size="25MB" required">
<video width="320" height="240" controls>
<source src="/images/" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
</div>  

Please help me to find out the solution. and what is .ogg file how can i generate while uploading my video?



via Athi

No comments:

Post a Comment