HK1148399A - Rtsp based stream media playing method and system thereof on mobile terminal - Google Patents
Rtsp based stream media playing method and system thereof on mobile terminal Download PDFInfo
- Publication number
- HK1148399A HK1148399A HK11102429.4A HK11102429A HK1148399A HK 1148399 A HK1148399 A HK 1148399A HK 11102429 A HK11102429 A HK 11102429A HK 1148399 A HK1148399 A HK 1148399A
- Authority
- HK
- Hong Kong
- Prior art keywords
- media
- client
- media data
- server
- rtsp
- Prior art date
Links
Description
Technical Field
The present invention relates to the technical field of wireless network applications, and more particularly, to a method and a system for playing streaming media by a mobile terminal based on RTSP.
Background
It is quite common for mobile terminals to implement streaming media, which is generally based on Real Time Streaming Protocol (RTSP), P2P, RTP, etc., wherein the RTSP is an application level protocol that controls the transmission of real time data. RTSP provides an extensible framework that enables the controlled, on-demand of real-time data, such as audio and video. The protocol aims at controlling multiple data transmission connections, providing a way for selecting transmission channels, such as UDP, multicast UDP and TCP, and providing a method for selecting a transmission mechanism based on RTP. The RTSP is a communication mode based on a C/S framework, and the interaction mode is as follows: i.e. the intercommunication between the client and the server, the transfer of media data on the network stream after agreement between the two parties.
The Chinese patent application with the application number of 200510135458 and the name of 'an adapting method of a streaming media mobile terminal' discloses a method for playing streaming media, which comprises the following steps: a. the mobile equipment terminal reports terminal capability information to the streaming media system; b. the streaming media system reads corresponding equipment capacity information from the configuration server according to the received terminal capacity information, and updates repeated parts in the equipment capacity information corresponding to each item of terminal capacity information according to a preset priority, and the equipment capacity information with high priority replaces the equipment capacity information with low priority; c. and selecting and matching the media content according to the equipment capability information, sending the matched media content to a cache region of the streaming media system after finding the matched media content, and sending the media content from the cache region of the streaming media system when the media stream transmission is started. Although the method can realize the information interaction between the client and the server, the method does not consider the actual situation of the existing network bandwidth, thereby causing the poor actual playing effect of the client in the playing process.
When a user plays a movie, the client notifies the streaming media system of the supported media playing format, the streaming media system searches the media playing format supported by the client from the server, and sends the found information to the client. If the flow of the network bandwidth of the user is small, and the streaming media system finds a playing format (such as AVI) with low compression rate from the server, the client will not be smooth when playing the media, and the situation of buffering pause often occurs; if the network bandwidth of the user has a large traffic and the streaming media system finds a playing format (such as 3 GP) with a high compression rate from the server, the playing format has a small capacity but the image is not clear enough, so that the user cannot enjoy a clear playing effect. Therefore, the prior art does not consider the actual situation of the network bandwidth of the user, so that the actual playing effect of the client is not good in the playing process.
Therefore, how to consider the actual situation of the network bandwidth and how to improve the playing quality for the user becomes a problem to be solved at present.
Disclosure of Invention
In view of this, the present invention provides a method and a system for playing streaming media by a RTSP-based mobile terminal, so as to improve the playing quality of a user.
The embodiment of the invention is realized as follows:
a method for playing streaming media by a mobile terminal based on RTSP comprises the following steps:
a. the client sends the supported media types to the server;
b. the server finds out a media data set matched with the media type from a media database;
c. selecting media data with code rate less than or equal to and closest to network bandwidth downlink rate from the media data set;
d. and the server sends the media data to the client.
Preferably, in the method for playing streaming media by using an RTSP-based mobile terminal, if the media data with a bitrate less than or equal to and closest to the network bandwidth downlink rate cannot be found from the media data set, the server sends the media data with a bitrate greater than and closest to the network bandwidth downlink rate to the client.
Preferably, in the method for playing streaming media by an RTSP-based mobile terminal, before step a, the method further includes:
the client acquires an available method from the server and transmits an RTSP address of the client to the server;
the server provides the relevant method for the client to use.
Preferably, in the method for playing streaming media by an RTSP-based mobile terminal described above, the step a further includes:
and the client sends the RTSP address and version, the player version and the media types supported by the client to the server.
A RTSP-based system for playing streaming media by a mobile terminal comprises an acquisition module, a matching module, a selection module and a sending module;
the acquisition module is used for acquiring the media types supported by the client;
the matching module is used for finding out a media data set matched with the media type from a media database of the server;
the selection module is used for selecting the media data with the code rate less than or equal to and closest to the network bandwidth downlink rate from the media data set;
the sending module is used for sending the media data to the client.
Compared with the prior art, the technical scheme provided by the embodiment of the invention has the following advantages and characteristics:
according to the scheme, the invention can select the optimal media data for the user according to the network bandwidth of the client and the supported media types so as to improve the playing quality of the user. After knowing the media types supported by the client, the server finds out a media data set matched with the media types from the database, wherein the media data set contains a plurality of media data, and then selects the media data with the code rate less than or equal to and closest to the network bandwidth downlink rate from the media data set, wherein the selected media data not only accord with the media types of the client, but also accord with the actual situation that the network bandwidths of each user are different. When the code rate of the media data is less than or equal to and closest to the downlink rate of the network bandwidth, the user does not have the condition of pause buffering in the playing process, so that the requirement of the user for smoothly playing the media is met. And the media data with the best playing effect and the best definition is selected on the premise that the user plays smoothly, so that the requirement of the user on playing high-definition media is met. Therefore, the invention can solve the defects of unsmooth playing media and unclear playing effect in the prior art, thereby realizing the requirement of selecting the media with the highest definition to play on the premise of smoothly playing the media.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method according to another embodiment of the present invention;
FIG. 3 is a flow chart of a method according to yet another embodiment of the present invention;
FIG. 4 is a block diagram of a system according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for playing streaming media by a RTSP-based mobile terminal, where the method includes:
step 101, a client sends a supported media type to a server;
step 102, the server finds out a media data set matched with the media type from a media database;
103, selecting media data with code rate less than or equal to and closest to network bandwidth downlink rate from the media data set;
and 104, the server sends the media data to the client.
The playing effect of the user actually depends on the downlink rate of the network bandwidth and the code rate of the media data, wherein the downlink rate is the data volume that the user can download per second, and the unit is kbps, namely kilobits per second. The code rate is the number of data bits transmitted per unit time during media data transmission, and generally, the unit used is kbps, i.e. kilobits per second. The popular understanding is that the sampling rate is higher, the higher the sampling rate in unit time is, the higher the precision is, and the closer the processed file is to the original file. But the file size is proportional to the sampling rate, i.e. the higher the bitrate, the larger the video file. In terms of audio, the higher the code rate, the smaller the compression ratio, and the smaller the sound quality loss, and the closer to the sound quality of the sound source. In terms of video, the higher the code rate, the smaller the compression ratio, and the smaller the picture definition and sound effect loss, the closer to the uncompressed picture and sound quality.
The present embodiment selects the best media data for the user according to the actual situation of the network bandwidth and supported media types of the client, so as to improve the playing quality of the user. After determining the media types supported by the client, the server finds out a media data set matched with the media types from the database, wherein the media data set contains a plurality of media data, and then selects the media data with the code rate less than or equal to and closest to the network bandwidth downlink rate from the media data set, wherein the selected media data not only accord with the media types of the client, but also accord with the actual situation that the network bandwidths of each user are different. When the code rate of the media data is less than or equal to and closest to the downlink rate of the network bandwidth, the user does not have the condition of pause buffering in the playing process, so that the requirement of the user for smoothly playing the media is met. And the media data with the best playing effect and the best definition is selected on the premise that the user plays smoothly, so that the requirement of the user on playing high-definition media is met. Therefore, the invention can solve the defects of unsmooth playing media and unclear playing effect in the prior art, thereby realizing the requirement of selecting the media with the highest definition to play on the premise of smoothly playing the media.
Referring to fig. 2, fig. 2 is a flowchart of a method according to another embodiment of the present invention, the method including:
step 201, the client sends the supported media types to a server;
step 202, the server finds out a media data set matched with the media type from a media database;
step 203, selecting media data with code rate less than or equal to and closest to network bandwidth downlink rate from the media data set;
step 204, judging whether the media data is found, if so, executing step 206; if not, go to step 205;
step 205, the server sends media data with code rate greater than and closest to the network bandwidth downlink rate to the client;
step 206, the server sends the media data to the client.
In this embodiment, on the basis of the previous embodiment, a step of determining is added, that is, if the media data with the code rate less than or equal to and closest to the network bandwidth downlink rate cannot be found in the media data set, the server sends the media data with the code rate greater than and closest to the network bandwidth downlink rate to the client. The purpose of this is to find the media data which is relatively suitable for the user when the server can not find the media data which is most suitable for the user, although the code rate is larger than the downlink rate of the network bandwidth, the media data with the code rate closest to the downlink rate of the network bandwidth is still needed, so that the user can find the relatively clear image media for the user when playing the media, although the user needs short buffer.
Referring to fig. 3, fig. 3 is a flowchart of a method according to another embodiment of the present invention, the method including:
step 301, the client acquires an available method from the server and transmits an RTSP address of the client to the server;
step 302, the server provides the relevant method for the client to use;
step 303, the client sends an RTSP address and version, a player version, and a media type supported by the client to the server;
step 304, the server finds out a media data set matched with the media type from a media database;
305, selecting media data with a code rate less than or equal to and closest to the network bandwidth downlink rate from the media data set;
step 306, the server sends the media data to the client.
In this embodiment, the client first obtains the available methods of the server, such as playing, stopping, pausing, and other operation methods, and transmits the RTSP address of the client to the server. After receiving the request information of the client, the server provides the relevant methods for the client to use.
Referring to fig. 4, fig. 4 is a block diagram of a system for playing streaming media by a RTSP-based mobile terminal, where the system includes an obtaining module 4021, a matching module 4022, a selecting module 4023, and a sending module 4024;
an obtaining module 4021, configured to obtain a media type supported by the client 401;
a matching module 4022, configured to find a media data set matching the media type from a media database of the server 403;
a selecting module 4023, configured to select, from the media data set, media data with a code rate less than or equal to and closest to a network bandwidth downlink rate;
a sending module 4024, configured to send the media data to the client 401.
It should be noted that the embodiments shown in fig. 1 to 4 are only preferred embodiments described herein, and those skilled in the art can design many more embodiments based on the description herein, so that the present invention is not limited to the embodiments provided, and various modifications to these embodiments will be obvious to those skilled in the art, and are intended to be protected by the present invention.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill in the art would understand that information, messages, and signals may be represented using any of a variety of different technologies and techniques. For example, the messages and information mentioned in the above description can be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or any combination thereof.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (5)
1. A method for playing streaming media by a mobile terminal based on RTSP is characterized by comprising the following steps:
a. the client sends the supported media types to the server;
b. the server finds out a media data set matched with the media type from a media database;
c. selecting media data with code rate less than or equal to and closest to network bandwidth downlink rate from the media data set;
d. and the server sends the media data to the client.
2. The method for playing streaming media by a RTSP-based mobile terminal according to claim 1, wherein if the media data with the code rate less than or equal to and closest to the network bandwidth downlink rate cannot be found from the media data set, the server sends the media data with the code rate greater than and closest to the network bandwidth downlink rate to the client.
3. The RTSP-based method for playing, by a mobile terminal, streaming media according to claim 1, characterized in that before step a, it further comprises:
the client acquires an available method from the server and transmits an RTSP address of the client to the server;
the server provides the relevant method for the client to use.
4. The method for playing streaming media by a RTSP-based mobile terminal according to claim 3, wherein the step a further comprises:
and the client sends the RTSP address and version, the player version and the media types supported by the client to the server.
5. A RTSP-based system for playing streaming media by a mobile terminal is characterized by comprising an acquisition module, a matching module, a selection module and a sending module;
the acquisition module is used for acquiring the media types supported by the client;
the matching module is used for finding out a media data set matched with the media type from a media database of the server;
the selection module is used for selecting the media data with the code rate less than or equal to and closest to the network bandwidth downlink rate from the media data set;
the sending module is used for sending the media data to the client.
Publications (1)
| Publication Number | Publication Date |
|---|---|
| HK1148399A true HK1148399A (en) | 2011-09-02 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10911506B2 (en) | Methods for quality-aware adaptive streaming over hypertext transfer protocol and reporting quality of experience | |
| KR102119287B1 (en) | Device for obtaining content by choosing the transport protocol according to the available bandwidth | |
| US20140108622A1 (en) | Streaming media transmission method, device, and system | |
| US20100262711A1 (en) | Systems, methods, and apparatuses for media file streaming | |
| CN111512609B (en) | Method and user equipment for streaming data from a UE to an ingestion point in a network | |
| CN101848205A (en) | RTSP based stream media playing method and system thereof on mobile terminal | |
| JP7753449B2 (en) | Client, Server, Receiving Method and Sending Method | |
| US11197051B2 (en) | Systems and methods for achieving optimal network bitrate | |
| CN102065339A (en) | Method and system for playing audio and video media stream | |
| CN105556922B (en) | DASH in the network means adaptive | |
| WO2013017165A1 (en) | Shaping media traffic based on manifest file in http adaptive streaming | |
| KR20130005873A (en) | Method and apparatus for receiving contents in broadcast system | |
| US20130060958A1 (en) | Method and apparatus for playing back recorded content in wireless communication system | |
| JP2005537742A (en) | Streaming multimedia data | |
| KR20120138310A (en) | Apparatus and method for providing adaptive multimedia service | |
| US10404606B2 (en) | Method and apparatus for acquiring video bitstream | |
| KR100739172B1 (en) | Video transmission method of mobile terminal using pseudo streaming technology | |
| CN106604085A (en) | Video sharing method and video sharing device | |
| HK1148399A (en) | Rtsp based stream media playing method and system thereof on mobile terminal | |
| US20140244798A1 (en) | TCP-Based Weighted Fair Video Delivery | |
| KR20160090521A (en) | Method for providing streaming service through device-to-device communication, server and system | |
| KR20200018890A (en) | Wireless streaming method |