How do I determine if my smartphone has a communication restriction? I want to send rough images to speed up my experience.

Asked 1 years ago, Updated 1 years ago, 101 views

Smartphones have communication restrictions, so if you get stuck with this restriction, the transmission of images from the server will be significantly slow and your experience will be very slow.

Therefore, the server wants to measure the speed of communication with the smartphone (download speed from the smartphone side), and if the standard value (for example, the speed of communication is less than 100 kbs), we want to increase the speed by sending rough images.

It would be possible if the server could know the speed of communication with the smartphone.
Is it possible for the server to know the speed of communication with the smartphone?

If you look into it, you can adjust the packet size to be sent with the ping command -s option, or download a large dummy file from your smartphone to check the connection speed.

network

2022-09-30 21:12

3 Answers

I thought it was a still picture question, so I didn't answer it, but if it's a video, it looks like this.There are several mechanisms, but I will write about the standardized HTTP Live Stream (HLS) method proposed by Apple.

The player reads the manifest file (for example, .m3u8 extension) before playing the video.This file contains multiple URLs that are determined by a combination of video bit rates, encoding methods, and screen size.Typically, the bit rate should be around 3 high, medium, and low.

#EXTM3U 
# EXT-X-STREAM-INF: PROGRAM-ID=1, BANDWIDTH=1280000, CODECS="vp8, vorbis", RESOLUTION=240x135
http://example.com/low.m3u8 
# EXT-X-STREAM-INF: PROGRAM-ID=1, BANDWIDTH=2560000, CODECS="vp8, vorbis", RESOLUTION=640x360
http://example.com/mid.m3u8 
# EXT-X-STREAM-INF: PROGRAM-ID=1, BANDWIDTH=7680000, CODECS="vp8, vorbis", RESOLUTION=1280x720
http://example.com/hi.m3u8

Follow the URL to load the following manifest file (.m3u8):This file contains multiple URLs for segment files (e.g., .ts and .webm extensions in the example below).

#EXTM3U
# EXT-X-MEDIA-SEQUENCE:0
# EXT-X-TARGETDURATION: 10
# EXTINF: 10,
http://media.example.com/segment1.webm
# EXTINF: 10,
http://media.example.com/segment2.webm
# EXTINF: 10,
http://media.example.com/segment3.webm
# EXT-X-ENDLIST

One segment is preceded by a keyframe (image of the entire screen), followed by a difference and inserted accordingly.Now you can play from any file and seek quickly.

While the player is playing a segment, it reads the subsequent segments one after another.If the download speed does not keep up with playback, switch to a group of files with a lower bit rate than the one shown in the first manifest.

Therefore, the server side does not need to know the communication status of the client side, and all bit rate changes are done on the client side.While both video sites and live streaming are typically distributed using CDNs, CDNs only provide copies of files, so you can't know the client's status in the first place. (Strictly speaking, CDN access logs are analyzed in real time to monitor delivery quality, not to control individual players.)

)


2022-09-30 21:12

Why don't you switch to the image load completion time?
For example, it's determined by whether or not to receive a load-completed callback within 3 seconds...


2022-09-30 21:12

This is a self-answer

It seems that adjusting the size of the data sent from the server with client bandwidth is already done on video sites such as YouTube.Monitoring the bandwidth during communication should help you determine the appropriate size of data.

YouTube offers free video quality switching with client bandwidth to users around the world, and like YouTube videos, it is likely to send data to users in a narrow bandwidth by returning client bandwidth as a response from clients while communicating.

Watch videos in the most comfortable environment on YouTube, so video quality is standard (240p or
depending on connection speed (bandwidth) 360p) to high resolution (720p or 1080p).This is why the image quality may change when you watch a video.

Source | https://support.google.com/youtube/answer/91449?hl=ja


2022-09-30 21:12

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.