0

There are some large .Mp4 files encoded with FFmpeg in another project .

I use MediaElement.js to display the video for user (look after the video name in another server, copy it into a Webserver location , and play it) . for larger video files, they Cant be played . Does it mean MediaElement load whole Video file , and then play them? What should I do for buffering separate section , to avoid this issue?

This is the code I use :

   if ($('#player1')) {
        player = new MediaElementPlayer("#player1",
              {
                //...
                alwaysShowControls: true,
                success: function(mediaElement, domObject) {
                       mediaElement.play();
                                                           }
              });
        }

I found this link MediaElement.js - Flash Video Wont Play Until Fully Loaded , I 'm not sure if its useful for me or not?

Please let me know if any solution comes into your mind, Thanks .

Community
  • 1
  • 1
Sara N
  • 1,079
  • 5
  • 17
  • 45

1 Answers1

0

Refering to this link , https://superuser.com/questions/606653/ffmpeg-converting-media-type-aswell-as-relocating-moov-atom , I created a batch file which reads all video files and copy them with new name using this command:

ffmpeg -i input.mp4 -codec copy -map 0 -movflags +faststart output.mp4

It will copy the file with moving flag to start point with -movflags +faststart

Also I needed to add Mp4 MIME Type in IIS.

Community
  • 1
  • 1
Sara N
  • 1,079
  • 5
  • 17
  • 45