A
A
Alexander2021-06-02 20:41:40
css
Alexander, 2021-06-02 20:41:40

Why does Safari take a long time to load videos?

Please tell me what could be the reason for the long loading of the videophone in the Safari browser?
What are the best video codecs to use for video in html5?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Yuriev, 2021-06-03
@axrising

about codecs for the web:
https://habr.com/ru/post/442020/
if you read the article in full, then the question "which video codecs are better to use" will fall off by itself, moreover, the options for codecs for the web and how to apply them in the tag are relevant today, except that AV1 support has expanded significantly (but the hardware is in its infancy)
in terms of why it takes a long time - I guess, because it first loads the video, and only then it starts playing, then with this introductory info it remains to guess, you probably have mp4 /H.264 and the so-called moov-atom is at the end of the container, not at the beginning, and safari only starts playing the file when it gets to it. But this is a naked theory in response to a rather vague question.
You can force drag a moov atom to the beginning of an mp4/H.264 file using ffmpeg:

ffmpeg -i input_video_file.mp4 -vcodec copy -acodec copy -movflags faststart output_video_file.mp4

Y
yan1tsk1y, 2021-06-02
@yan1tsk1y

Please tell me what could be the reason for the long loading of the videophone in the Safari browser?

Honestly, I can’t say like this, please provide your device model and OS version.
What are the best video codecs to use for video in html5?

Almost any, but still better use the most common, for example, mp4

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question