I have created a video player from the Media Source Extension API
. I have split the video
and audio
from the original.mp4 (1 minute duration)
. I have split the video
and audio
into small 5 second files (12 files in total)
. I'm getting each one of them and playing them together. But the video stops playing at around 45-47 seconds. I cannot understand to why the video is stopping/buffering. I cannot understand whether the problem is in the javascript
code or the video files?
I have uploaded all the resources here (https://drive.google.com/file/d/1NHc_yNRU0tvaU18aohLy74Js3y7UHD4N/view?usp=sharing). And written the commands I used to construct my video and audio files below. I have also noticed that this problem only occurs with Google Chrome
and works perfectly and smoothly on Microsoft Edge
. Thanks
Making the Media files:
Extracting video from original.mp4: MP4Box -single 1 original.mp4
Extracting audio from original.mp4: MP4Box -single 2 original.mp4
Splitting the video and audio into 5 second parts: ffmpeg -ss
starting-time -to
end-time -i
(video.mp4 OR
audio.mp4) (video_part.mp4
OR
audio_part.mp4)
Fragmenting all the video and audio parts: MP4Box -dash 1000 -rap -frag-rap
(video_part.mp4 OR
audio_part.mp4)
Then using the fragmented video and audio files to be played via the Media Source Extension API video player.
e.g. (video_part_dashinit.mp4 OR
audio_part_dashinit.mp4)