Change maximum video size supported by server

1

I was testing a video on my page, but I came across a problem ....

The line of my code is basically just this:

<video id="video" src="arquivo.mp4" controls="true" />

Video resolution is the size of each frame set to 1920w x 1080h . The video is in .mp4 format. That is, the video is considerably large.

I tested the following browsers:

Firefox

Itdoesnotplayeithersoundorvideo,andthefollowingmessagestillappears:

  

Themedia link could not be decoded.

Chrome

Performs sound, but the video itself does not appear.

Opera

Reduced viewing by 50% to fit all video on screen Performs both sound and video.

Safari and Explorer I did not even try ... My question is whether there is a maximum (and what is?) Size requirement of the video to run on those browsers. Or if this goes from the server configuration, and if so, how to change so that it can be executed?

Edit

As commented by @GiancarloAbelGiulian, additional information: I am using wamp server v. 2.5.

Edit (2)

At the time I was testing locally, I just forgot to play on the server, the problem occurs in http as well.

    
asked by anonymous 21.10.2015 / 05:01

1 answer

2

According to your information, there may be one of these two problems:

  • Failed to decode the MP4 video from the browser; or
  • Video transfer from server failed due to server size file.
  • So here are two possible solutions:

    HYPOTHESES 1 - CORRECT DECODING OF THE VIDEO FILE

    Before tampering with your WAMP server settings, you have to make sure there are no encoding problems in the video file itself.

    All compressed video (AVI, MPG, MP4) always generates within itself a metadata index for audio and video search and synchronization. This index is for players to quickly and efficiently advance and rewind video without crashing or losing synchronization between streams during playback. When this index does not exist, or it has failures, the programs crash when trying to view the file or try to create a temporary index for the metadata of the file, only running it after completing this task. The longer the file, the longer it will take for the video to roll.

    MP4 videos have the problem of generating this metadata index only at the end of the FILE causing most browsers to download ALL of the multimedia content to start displaying it (ie, if they do not crash) .

    To solve this problem, we will use a small program called "My MP4Box Gui" that can adjust the MP4 files for transmission over the internet, creating the index of metadata at the beginning of the video. Just follow the steps below:

  • Download and install My MP4Box GUI ( link ).
  • Open the My MP4Box GUI and select "Options -> Hint For RTP / RTSP" this option that enables the reconstruction of the metadata index in the front of the file).
  • Click "Add" and select the MP4 video you want to make compatible for streaming via server (WAMP).
  • Click "Save As ..." and choose a folder and name to save the file.
  • Finally, click on "Mux" and wait for the new optimized MP4 video to be generated. The program takes about 1 minute to recreate the index of a video with 150MB.
  • HYPOTHESIS 2 - CONFIGURE WAMP SERVER TO ACCEPT BIGGER VIDEOS

    If the above hypothesis does not produce results, then the problem should be in relation to the transmission of the video by the server.

    Generally, WAMP Server limits by default the size of the video files accepted for upload and transmission, to ensure their efficiency in displaying the files.

    To configure the WAMP Server to accept videos larger than the default, follow these steps:

  • Go to the folder where WampServer is installed (usually in C: /Wamp/bin/apache/Apache2.4.4/bin) and open the file "ini.php" via notepad.
  • Open the file, give Ctrl + F to find the following lines:

    post_max_size = 8M and change to: post_max_size = 750M e

    upload_max_filesize = 2M and change to: upload_max_filesize = 750M

  • With these tips, I hope I have helped you!

        
    04.11.2015 / 01:47