Fix errors in video files that can cause problems in BIIGLE
To modify the video files, download and install the tool FFmpeg.
The moov atom of an MP4 file is required by the browser to play the video correctly. If the moov atom is placed at the end of the video file, the entire file must be downloaded first before the video can be played. This can be fixed by moving the moov atom to the beginning of the file.
To check the current position of the moov atom in an MP4 file, run the following command.
Linux:
ffprobe -v trace -i input.mp4 2>&1 | grep -o -e type:\'mdat\' -e type:\'moov\'
Windows:
ffprobe.exe -v trace -i "input.mp4" 2>&1 | findstr "type:'mdat' type:'moov'
If type:'moov'
occurs at first in the command output, the video's moov atom position is valid. Otherwise, fix the position with the command below.
Linux:
ffmpeg -i input.mp4 -vcodec copy -acodec copy -movflags faststart output.mp4
Windows:
ffmpeg.exe -i "input.mp4" -vcodec copy -acodec copy -movflags faststart "output.mp4"
The output.mp4
file will have the moov atom at the correct position.