[go: up one dir, main page]

CN110662109B - Video playing method, electronic equipment and computer readable storage medium - Google Patents

Video playing method, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN110662109B
CN110662109B CN201910932753.9A CN201910932753A CN110662109B CN 110662109 B CN110662109 B CN 110662109B CN 201910932753 A CN201910932753 A CN 201910932753A CN 110662109 B CN110662109 B CN 110662109B
Authority
CN
China
Prior art keywords
video
transmission bandwidth
playback
video streams
video stream
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910932753.9A
Other languages
Chinese (zh)
Other versions
CN110662109A (en
Inventor
许江毅
杜欧杰
吴嘉旭
颜伟婷
李立锋
陈国仕
李鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
MIGU Culture Technology Co Ltd
MIGU Comic Co Ltd
Original Assignee
MIGU Culture Technology Co Ltd
MIGU Comic Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by MIGU Culture Technology Co Ltd, MIGU Comic Co Ltd filed Critical MIGU Culture Technology Co Ltd
Priority to CN201910932753.9A priority Critical patent/CN110662109B/en
Publication of CN110662109A publication Critical patent/CN110662109A/en
Application granted granted Critical
Publication of CN110662109B publication Critical patent/CN110662109B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4383Accessing a communication channel
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44227Monitoring of local network, e.g. connection or bandwidth variations; Detecting new devices in the local network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • H04N21/4621Controlling the complexity of the content stream or additional data, e.g. lowering the resolution or bit-rate of the video stream for a mobile client with a small screen

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

本发明提供一种视频播放方法、电子设备及计算机可读存储介质,该生成方法应用于电子设备,该视频播放方法包括:接收同一视频内容的不同分辨率的至少两路视频流,并检测传输所述至少两路视频流的第一传输带宽,根据所述第一传输带宽和每路视频流的视频比特率,确定所述电子设备在单独播放每路视频流时的播放流畅度;并行播放所述至少两路视频流,并展示每路视频流的播放流畅度的信息。本发明实施例可以向用户直观的展示各个视频流的清晰度和流畅度的区别,方便用户在同一画面内容的基础上进行清晰度和播放流畅度的比较。

Figure 201910932753

The present invention provides a video playback method, an electronic device and a computer-readable storage medium. The generation method is applied to the electronic device. The video playback method includes: receiving at least two video streams with different resolutions of the same video content, and detecting transmission The first transmission bandwidth of the at least two video streams, according to the first transmission bandwidth and the video bit rate of each video stream, determine the playback fluency of the electronic device when playing each video stream independently; parallel playback The at least two video streams are displayed, and the information of the playback fluency of each video stream is displayed. The embodiments of the present invention can intuitively show the difference between the clarity and fluency of each video stream to the user, so as to facilitate the user to compare the clarity and playback fluency on the basis of the same screen content.

Figure 201910932753

Description

一种视频播放方法、电子设备及计算机可读存储介质A video playback method, electronic device and computer-readable storage medium

技术领域technical field

本发明涉及图像处理技术领域,尤其涉及一种视频播放方法、电子设备及计算机可读存储介质。The present invention relates to the technical field of image processing, and in particular, to a video playback method, an electronic device and a computer-readable storage medium.

背景技术Background technique

目前,在主流的网络视频平台上,通常会针对同一视频内容提供一种或多种清晰度的视频媒体流(为简化说明,本文中也将视频媒体流简称为视频流),在播放器端则提供视频清晰度的切换按钮。用户点击上述切换按钮后,播放器弹出包括有一种或多种不同清晰度的清晰度列表供用户选择。用户选择特定的清晰度后,播放器加载该清晰度对应的视频媒体流进行播放。At present, on mainstream online video platforms, video media streams with one or more resolutions are usually provided for the same video content (to simplify the description, the video media streams are also referred to as video streams for short) on the player side. A toggle button for video resolution is provided. After the user clicks the above switch button, the player pops up a definition list including one or more different definition for the user to choose. After the user selects a specific definition, the player loads the video media stream corresponding to the definition for playback.

现有技术虽然提供了多种清晰度的选项,但是用户通常无法实时预览各清晰度的播放效果和播放流畅度,只能通过手动切换各清晰度,并由大脑记忆画面质量进行比对,显然该比对方式不够直观。Although the prior art provides options of various resolutions, users usually cannot preview the playback effect and playback smoothness of each resolution in real time, and can only manually switch the resolutions and compare the image quality by memory of the brain. This comparison method is not intuitive enough.

发明内容SUMMARY OF THE INVENTION

本发明的至少一个实施例提供了一种视频播放方法、电子设备及计算机可读存储介质,以解决现有视频播放方法中用户无法实时预览各清晰度的播放效果和播放流畅度的问题。At least one embodiment of the present invention provides a video playback method, an electronic device, and a computer-readable storage medium to solve the problem that a user cannot preview the playback effect and playback fluency of each definition in real time in the existing video playback method.

根据本发明的一个方面,至少一个实施例提供了一种视频播放方法,包括:According to one aspect of the present invention, at least one embodiment provides a video playback method, comprising:

接收同一视频内容的不同分辨率的至少两路视频流,并检测传输所述至少两路视频流的第一传输带宽,根据所述第一传输带宽和每路视频流的视频比特率,确定所述电子设备在单独播放每路视频流时的播放流畅度;Receive at least two video streams with different resolutions of the same video content, and detect the first transmission bandwidth for transmitting the at least two video streams, and determine the The playback fluency of the electronic device when playing each video stream independently;

并行播放所述至少两路视频流,并展示每路视频流的播放流畅度的信息。The at least two video streams are played in parallel, and the information of the playback fluency of each video stream is displayed.

可选的,在播放所述至少两路视频流之后,所述方法还包括:Optionally, after playing the at least two video streams, the method further includes:

接收用户针对所述至少两路视频流中的目标视频流的选择指令;receiving a user's selection instruction for the target video stream in the at least two video streams;

根据所述选择指令,停止并行播放所述至少两路视频流,并切换至所述目标视频流进行播放。According to the selection instruction, stop playing the at least two video streams in parallel, and switch to the target video stream for playing.

可选的,在接收同一视频内容的不同分辨率的至少两路视频流的步骤之前,所述方法包括:Optionally, before the step of receiving at least two video streams with different resolutions of the same video content, the method includes:

接收用户输入的清晰度预览指令,根据所述清晰度预览指令,请求所述视频内容的不同分辨率的至少两路视频流;或者,Receive a definition preview instruction input by a user, and request at least two video streams of different resolutions of the video content according to the definition preview instruction; or,

在所述电子设备播放所述视频内容的第一视频流的过程中,若检测到传输所述第一视频流的第二传输带宽的变化幅度超出预设幅度时,请求所述视频内容的不同分辨率的至少两路视频流。During the process of playing the first video stream of the video content by the electronic device, if it is detected that the variation range of the second transmission bandwidth for transmitting the first video stream exceeds a preset range, the electronic device requests a difference in the video content. Resolution of at least two video streams.

可选的,在所述第二传输带宽的变化幅度超出预设幅度时,所述方法还包括:Optionally, when the variation range of the second transmission bandwidth exceeds a preset range, the method further includes:

根据所述第一传输带宽,确定与第一传输带宽对应的所述至少两路视频流,其中,所述至少两路视频流的分辨率与第一传输带宽正相关。According to the first transmission bandwidth, the at least two video streams corresponding to the first transmission bandwidth are determined, wherein the resolutions of the at least two video streams are positively correlated with the first transmission bandwidth.

可选的,所述根据所述第一传输带宽和每路视频流的视频比特率,确定所述电子设备在单独播放每路视频流时的播放流畅度的步骤,包括:Optionally, according to the first transmission bandwidth and the video bit rate of each video stream, the step of determining the playback fluency of the electronic device when playing each video stream independently includes:

针对每路视频流,在所述第一传输带宽大于或等于该视频流的视频比特率时,根据该视频流的原始帧率,确定单独播放该视频流时的播放流畅度;在所述第一传输带宽小于该视频流的视频比特率时,根据该视频流的原始帧率与第一比值的乘积,确定单独播放该视频流时的播放流畅度,其中,所述第一比值为所述第一传输带宽与所述视频比特率的比值。For each video stream, when the first transmission bandwidth is greater than or equal to the video bit rate of the video stream, according to the original frame rate of the video stream, determine the playback fluency when the video stream is played alone; When the transmission bandwidth is less than the video bit rate of the video stream, the playback fluency when the video stream is played alone is determined according to the product of the original frame rate of the video stream and a first ratio, where the first ratio is the The ratio of the first transmission bandwidth to the video bit rate.

可选的,所述接收同一视频内容的不同分辨率的至少两路视频流的步骤,包括:Optionally, the step of receiving at least two video streams with different resolutions of the same video content includes:

计算所述至少两路视频流的视频分辨率的和值,并与所述电子设备的当前第一传输带宽相比较,确定所述第一传输带宽是否支持同步播放所述至少两路视频流;Calculate the sum of the video resolutions of the at least two video streams, and compare it with the current first transmission bandwidth of the electronic device to determine whether the first transmission bandwidth supports synchronous playback of the at least two video streams;

在所述第一传输带宽支持同步播放所述至少两路视频流时,接收所述至少两路视频流并进入所述并行播放所述至少两路视频流的步骤;When the first transmission bandwidth supports synchronous playback of the at least two video streams, receiving the at least two video streams and entering the step of playing the at least two video streams in parallel;

在所述第一传输带宽不支持同步播放所述至少两路视频流时,针对每路视频流,接收并缓存预设播放时长的视频流数据,并在所述至少两路视频流均缓存完毕后,进入所述并行播放所述至少两路视频流的步骤。When the first transmission bandwidth does not support synchronous playback of the at least two video streams, for each video stream, receive and cache video stream data with a preset playback duration, and when the at least two video streams are cached Then, enter the step of playing the at least two video streams in parallel.

可选的,所述并行播放所述至少两路视频流的步骤,包括:Optionally, the step of playing the at least two video streams in parallel includes:

将视频播放界面划分成多个显示区域,根据所述多个显示区域的位置,将所述视频内容的视频画面划分为多个子画面,每个显示区域分别对应于一路视频源中的一个子画面;The video playback interface is divided into a plurality of display areas, and according to the positions of the plurality of display areas, the video picture of the video content is divided into a plurality of sub-pictures, and each display area corresponds to a sub-picture in a channel of video source respectively. ;

将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域。The sub-picture corresponding to the display area in each video stream is rendered to the display area corresponding to each video stream.

可选的,所述接收同一视频内容的不同分辨率的至少两路视频流的步骤,包括:Optionally, the step of receiving at least two video streams with different resolutions of the same video content includes:

计算所述至少两路视频流的视频分辨率的和值,并与所述电子设备的当前第一传输带宽相比较,确定所述第一传输带宽是否支持同步播放所述至少两路视频流;Calculate the sum of the video resolutions of the at least two video streams, and compare it with the current first transmission bandwidth of the electronic device to determine whether the first transmission bandwidth supports synchronous playback of the at least two video streams;

在所述第一传输带宽支持同步播放所述至少两路视频流时,接收所述至少两路视频流,并进入所述并行播放所述至少两路视频流的步骤;When the first transmission bandwidth supports synchronous playback of the at least two video streams, receiving the at least two video streams, and entering the step of playing the at least two video streams in parallel;

在所述第一传输带宽不支持同步播放所述至少两路视频流时,接收所述至少两路视频流的首帧视频数据,并进入所述并行播放所述至少两路视频流的步骤。When the first transmission bandwidth does not support synchronous playback of the at least two video streams, receiving the first frame of video data of the at least two video streams, and entering the step of playing the at least two video streams in parallel.

可选的,所述并行播放所述至少两路视频流的步骤,包括:Optionally, the step of playing the at least two video streams in parallel includes:

将视频播放界面划分成多个显示区域,根据所述多个显示区域的位置,将所述视频内容的视频画面划分为多个子画面,每个显示区域分别对应于一路视频源中的一个子画面;The video playback interface is divided into a plurality of display areas, and according to the positions of the plurality of display areas, the video picture of the video content is divided into a plurality of sub-pictures, and each display area corresponds to a sub-picture in a channel of video source respectively. ;

在所述第一传输带宽支持同步播放所述至少两路视频流时,将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域;When the first transmission bandwidth supports synchronous playback of the at least two video streams, rendering the sub-picture corresponding to the display area in each video stream to the display area corresponding to each video stream;

在所述第一传输带宽不支持同步播放所述至少两路视频流时,将每路视频流的首帧画面中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域,所述首帧画面是根据所述首帧数据解码得到的。When the first transmission bandwidth does not support synchronous playback of the at least two video streams, rendering the sub-picture corresponding to the display area in the first frame of each video stream to the display corresponding to each video stream area, the first frame picture is obtained by decoding the first frame data.

根据本发明的另一方面,至少一个实施例提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的视频播放方法的步骤。According to another aspect of the present invention, at least one embodiment provides an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being The steps of the above-mentioned video playback method are realized when the processor is executed.

根据本发明的另一方面,至少一个实施例提供了一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时可实现上述视频播放方法的步骤。According to another aspect of the present invention, at least one embodiment provides a computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the above video playback method can be implemented.

本发明实施例可以针对同一视频内容,通过并行播放以及展示播放流畅度的方式,向用户直观的展示各个视频流的清晰度和流畅度的区别,方便用户在同一画面内容的基础上进行清晰度和播放流畅度的比较,相对于现有技术用户只能针对不同画面内容,凭借记忆各个画面的清晰度进而进行比较的方式,本发明实施例无需用户手动切换至各路视频流,且能够极大的方便用户直观的获取各个清晰度和播放流畅度之间的差异。The embodiments of the present invention can intuitively show the difference between the clarity and fluency of each video stream to the user by playing in parallel and displaying the smoothness of the playback for the same video content, which is convenient for the user to perform clarity on the basis of the same screen content. Compared with the playback fluency, compared with the prior art, the user can only compare the content of different pictures by memorizing the clarity of each picture and then comparing, the embodiment of the present invention does not require the user to manually switch to each video stream, and can be extremely It is convenient for users to intuitively obtain the difference between each definition and playback fluency.

附图说明Description of drawings

为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings that need to be used in the embodiments of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1为本发明实施例的视频播放方法的一种流程图;1 is a flowchart of a video playback method according to an embodiment of the present invention;

图2为本发明实施例的视频播放方法的另一种流程图;2 is another flowchart of a video playback method according to an embodiment of the present invention;

图3为本发明实施例提供的视频播放界面的一种示例;3 is an example of a video playback interface provided by an embodiment of the present invention;

图4为本发明实施例提供的视频播放界面的另一种示例;4 is another example of a video playback interface provided by an embodiment of the present invention;

图5为本发明实施例的视频播放装置的结构示意图;5 is a schematic structural diagram of a video playback device according to an embodiment of the present invention;

图6为本发明实施例的电子设备的结构示意图。FIG. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将参照附图更详细地描述本发明的示例性实施例。虽然附图中显示了本发明的示例性实施例,然而应当理解,可以以各种形式实现本发明而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本发明,并且能够将本发明的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present invention will be more thoroughly understood, and will fully convey the scope of the present invention to those skilled in the art.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。说明书以及权利要求中“和/或”表示所连接对象的至少其中之一。The terms "first", "second" and the like in the description and claims of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It is to be understood that the data so used may be interchanged under appropriate circumstances such that the embodiments of the application described herein can, for example, be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having" and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those expressly listed Rather, those steps or units may include other steps or units not expressly listed or inherent to these processes, methods, products or devices. In the description and the claims, "and/or" means at least one of the connected objects.

以下描述提供示例而并非限定权利要求中阐述的范围、适用性或者配置。可以对所讨论的要素的功能和布置作出改变而不会脱离本公开的精神和范围。各种示例可恰适地省略、替代、或添加各种规程或组件。例如,可以按不同于所描述的次序来执行所描述的方法,并且可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。The following description provides examples and does not limit the scope, applicability, or configuration set forth in the claims. Changes may be made in the function and arrangement of elements discussed without departing from the spirit and scope of the disclosure. Various examples may omit, substitute, or add various procedures or components as appropriate. For example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to some examples may be combined in other examples.

如背景技术中所述的,现有技术的视频平台在针对同一视频内容,虽然提供了多种清晰度的视频流,但是不支持实时预览各清晰度的播放效果和播放流畅度,为解决以上问题的至少一个,本发明实施例提供了一种视频播放方法,应用于电子设备,该电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。请参见图1,本发明实施例提供的视频播放方法,包括:As described in the Background Art, although the video platform in the prior art provides video streams of various resolutions for the same video content, it does not support real-time preview of the playback effect and playback fluency of each resolution. For at least one of the problems, an embodiment of the present invention provides a video playback method, which is applied to electronic devices, including but not limited to mobile phones, tablet computers, notebook computers, handheld computers, vehicle-mounted terminals, wearable devices, and pedometers. device, etc. Referring to FIG. 1, a video playback method provided by an embodiment of the present invention includes:

步骤11,接收同一视频内容的不同分辨率的至少两路视频流,并检测传输所述至少两路视频流的第一传输带宽,根据所述第一传输带宽和每路视频流的视频比特率,确定所述电子设备在单独播放每路视频流时的播放流畅度。Step 11: Receive at least two video streams with different resolutions of the same video content, and detect the first transmission bandwidth for transmitting the at least two video streams, according to the first transmission bandwidth and the video bit rate of each video stream. , to determine the playback fluency of the electronic device when playing each video stream independently.

这里,所述电子设备可以从提供上述视频内容的网络视频平台接收视频流,本发明实施例中,所述电子设备可以接收同一视频内容的至少两路视频流,这些视频流通常是针对同一视频内容的不同分辨率的视频流,由于是同一视频内容,因此各路视频流间的播放是同步的,也就是说,每路视频流的首帧视频画面以及后续的各帧视频画面的内容都是相同的,只是因为分辨率不同而存在清晰度的差别。Here, the electronic device may receive a video stream from an online video platform that provides the above-mentioned video content. In this embodiment of the present invention, the electronic device may receive at least two video streams of the same video content, and these video streams are usually for the same video. Since the video streams of different resolutions of the content are the same video content, the playback of each video stream is synchronized, that is to say, the content of the first video frame of each video stream and the following video frames are the same. are the same, but there is a difference in sharpness due to different resolutions.

另外,本发明实施例在接收上述至少两路视频流的同时,将检测传输所述至少两路视频流的第一传输带宽,该第一传输带宽受到电子设备的总带宽(该总带宽反映了设备的带宽能力,例如,具有100M带宽网卡的电子设备,其总带宽为100M比特)、电子设备到网络之间的传输链路带宽(例如,上述具有100M带宽网卡的电子设备通过一个10M的有线链路接入至网络,此时传输链路带宽为10M比特)以及视频流端分配给电子设备的数据传输带宽等因素的影响。通常,上述第一传输带宽小于或等于电子设备的总带宽。例如,在不考虑传输链路带和数据传输带宽时,如果电子设备与网络之间还存在除上述至少两路视频流以外的其他数据传输,则该第一传输带宽小于电子设备的总带宽;而如果电子设备与网络之间仅存在上述至少两路视频流的数据传输,则该第一传输带宽通常接近或等于电子设备的总带宽。具体的传输视频流的带宽的检测方式可以参考现有技术的实现,例如可以周期性检测各个进程的占用带宽,进而根据电子设备的总带宽,确定上述第一传输带宽,或者,分别对各个视频流对应的数据发送端进行独立的数据接收测试,以获取本设备到上述数据发送端的带宽,本发明实施例对此不做具体限定。In addition, the embodiment of the present invention will detect the first transmission bandwidth for transmitting the at least two video streams while receiving the above-mentioned at least two video streams, and the first transmission bandwidth is subject to the total bandwidth of the electronic device (the total bandwidth reflects the The bandwidth capability of the device, for example, an electronic device with a 100M bandwidth network card, its total bandwidth is 100M bits), the transmission link bandwidth between the electronic device and the network (for example, the above-mentioned electronic device with a 100M bandwidth network card passes a 10M wired cable The link is connected to the network, and the transmission link bandwidth is 10M bits at this time) and the data transmission bandwidth allocated to the electronic device by the video stream end. Generally, the above-mentioned first transmission bandwidth is less than or equal to the total bandwidth of the electronic device. For example, when the transmission link band and the data transmission bandwidth are not considered, if there is other data transmission between the electronic device and the network other than the above-mentioned at least two video streams, the first transmission bandwidth is smaller than the total bandwidth of the electronic device; However, if there is only data transmission of the at least two video streams between the electronic device and the network, the first transmission bandwidth is usually close to or equal to the total bandwidth of the electronic device. The specific method of detecting the bandwidth of the transmitted video stream can refer to the implementation of the prior art. For example, the occupied bandwidth of each process can be periodically detected, and then the above-mentioned first transmission bandwidth can be determined according to the total bandwidth of the electronic device. The data sending end corresponding to the stream performs an independent data receiving test to obtain the bandwidth from the device to the above-mentioned data sending end, which is not specifically limited in this embodiment of the present invention.

本发明实施例可以同时接收同一视频内容的至少两路视频流,而用户实际观看视频时,通常仅会选择其中一种清晰度的视频流,因此可能会存在同时接收多路视频流并进行播放时会发生卡顿,但仅接收和播放某一路视频流时却不会卡顿的问题。为了反映出用户实际观看某一路视频流时的播放流畅度,本发明实施例在确定电子设备单独播放每路视频流时的播放流畅度时,可以按照以下方式进行处理,这里,播放流程度可以通过视频播放的帧率来表征:In this embodiment of the present invention, at least two video streams of the same video content can be received at the same time, and when a user actually watches a video, usually only one of the video streams of the definition is selected, so there may be multiple video streams received and played at the same time. There will be stuttering from time to time, but there will be no stuttering problem when only receiving and playing a certain video stream. In order to reflect the playback smoothness when the user actually watches a certain video stream, in the embodiment of the present invention, when determining the playback smoothness when the electronic device plays each video stream independently, the processing may be performed in the following manner. Here, the playback stream level may be Characterized by the frame rate of video playback:

针对每路视频流:For each video stream:

1)在所述第一传输带宽大于或等于该视频流的视频比特率时,根据该视频流的原始帧率,确定单独播放该视频流时的播放流畅度。1) When the first transmission bandwidth is greater than or equal to the video bit rate of the video stream, according to the original frame rate of the video stream, determine the playback smoothness when the video stream is played alone.

具体的,可以直接将原始帧率作为单独播放该视频流时的播放流畅度。当然,本发明实施例也可以根据第一传输带宽与该视频比特率间的第一差值(第一差值为正值),来对所述原始帧率进行微调,并将微调后的结果作为所述播放流畅度。例如,在上述第一差值大于某个预设门限时,将原始帧率作为单独播放该视频流时的播放流畅度,而在上述第一差值小于预设门限时,则根据上述第一差值的大小,在原始帧率的基础上减去一个调整量,得到单独播放该视频流时的播放流畅度,该调整量通常可以与上述第一差值正相关。Specifically, the original frame rate can be directly used as the playback smoothness when the video stream is played alone. Of course, in this embodiment of the present invention, the original frame rate may be fine-tuned according to the first difference between the first transmission bandwidth and the video bit rate (the first difference is a positive value), and the fine-tuned result may be fine-tuned. as the playback fluency. For example, when the above-mentioned first difference value is greater than a preset threshold, the original frame rate is used as the playback smoothness when the video stream is played alone, and when the above-mentioned first difference value is less than the preset threshold, according to the above-mentioned first For the difference value, an adjustment amount is subtracted from the original frame rate to obtain the playback smoothness when the video stream is played alone. The adjustment amount can usually be positively correlated with the above-mentioned first difference value.

2)在所述第一传输带宽小于该视频流的视频比特率时,根据该视频流的原始帧率与第一比值的乘积,确定单独播放该视频流时的播放流畅度,其中,所述第一比值为所述第一传输带宽与所述视频比特率的比值。2) when the first transmission bandwidth is less than the video bit rate of the video stream, according to the product of the original frame rate of the video stream and the first ratio, determine the playback fluency when playing the video stream alone, wherein the described The first ratio is a ratio of the first transmission bandwidth to the video bit rate.

具体的,可以直接将原始帧率和第一比值的乘积,作为单独播放该视频流时的播放流畅度。当然,本发明实施例也可以根据该视频比特率与第一传输带宽间的第二差值(第二差值为正值),在上述乘积的基础上进行一个微调,将微调后的结果作为所述播放流畅度。例如,根据上述第二差值的大小,在上述乘积的基础上减去一个调整量,得到单独播放该视频流时的播放流畅度,该调整量通常可以与上述第二差值正相关。Specifically, the product of the original frame rate and the first ratio may be directly used as the playback smoothness when the video stream is played alone. Of course, in this embodiment of the present invention, a fine-tuning can also be performed on the basis of the above product according to the second difference between the video bit rate and the first transmission bandwidth (the second difference is a positive value), and the fine-tuning result is used as The playback smoothness. For example, according to the size of the second difference, an adjustment amount is subtracted from the product to obtain the playback smoothness when the video stream is played alone. The adjustment amount may generally be positively correlated with the second difference.

步骤12,并行播放所述至少两路视频流,并展示每路视频流的播放流畅度的信息。Step 12: Play the at least two video streams in parallel, and display information about the playback fluency of each video stream.

这里,本发明实施例可以在电子设备的视频播放界面上并行播放所述至少两路视频流,并展示每路视频流的播放流畅度(如帧率)的信息,具体的展示方式可以直接在每路视频流的画面上的预设位置显示对应的帧率。Here, in this embodiment of the present invention, the at least two video streams can be played in parallel on the video playback interface of the electronic device, and the information on the playback fluency (such as frame rate) of each video stream can be displayed. The specific display method can be directly displayed in the The preset position on the screen of each video stream displays the corresponding frame rate.

通过以上步骤,本发明实施例可以针对同一视频内容,通过并行播放以及展示播放流畅度的方式,向用户直观的展示各个视频流的清晰度和流畅度的区别。由于多个视频流之间的播放时同步的,也就是说,在并行播放时,各个视频流的画面的内容是相同的,这样方便用户在同一画面内容的基础上进行清晰度和播放流畅度的比较,相对于现有技术用户只能针对不同画面内容,凭借记忆各个画面的清晰度进而进行比较的方式,本发明实施例无需用户手动切换至各路视频流,且能够极大的方便用户直观的获取各个清晰度和播放流畅度之间的差异。Through the above steps, the embodiments of the present invention can intuitively display the difference between the clarity and fluency of each video stream to the user by playing in parallel and displaying the smoothness of playback for the same video content. Since the playback of multiple video streams is synchronized, that is to say, when playing in parallel, the content of the pictures of each video stream is the same, which is convenient for users to perform clarity and playback fluency based on the content of the same picture. Compared with the prior art, the user can only compare the contents of different pictures by memorizing the clarity of each picture and then comparing, the embodiment of the present invention does not require the user to manually switch to each video stream, and can greatly facilitate the user. Intuitively capture the difference between individual sharpness and playback smoothness.

如图2所示,本发明实施例提供的另一视频播放方法,除了包括如图1所示的步骤11~12外,还包括:As shown in FIG. 2 , another video playback method provided by an embodiment of the present invention, in addition to steps 11 to 12 shown in FIG. 1 , further includes:

步骤13,接收用户针对所述至少两路视频流中的目标视频流的选择指令。Step 13: Receive a user's selection instruction for a target video stream in the at least two video streams.

这里,用户可以根据自己对清晰度和播放流畅度的需求,选择自己期望的视频流,具体的选择方式有多种,例如,针对具有触摸屏功能的电子设备,可以通过触摸选择的方式,从多个视频流的视频画面中选择其中一个,该选择的视频画面所对应的视频流即为目标视频流,本发明实施例对此不做具体限定。Here, users can select their desired video streams according to their needs for clarity and playback fluency. There are various specific selection methods. For example, for electronic devices with touch screen functions, they can select from multiple One of the video pictures of the video streams is selected, and the video stream corresponding to the selected video picture is the target video stream, which is not specifically limited in this embodiment of the present invention.

另外,在上述步骤12中并行播放所述至少两路视频流时,本发明实施例还可以根据所述第一传输带宽的大小,自适应的向用户推荐候选视频流,所述候选视频流的分辨率与所述第一传输带宽正相关,从而提示用户在当前的网络环境下,所述候选视频流能够较好的适应网络环境,达到带宽的充分利用。In addition, when the at least two video streams are played in parallel in the above step 12, the embodiment of the present invention may further adaptively recommend candidate video streams to the user according to the size of the first transmission bandwidth. The resolution is positively correlated with the first transmission bandwidth, thereby prompting the user that the candidate video stream can better adapt to the network environment under the current network environment, so as to achieve full utilization of the bandwidth.

具体的,通过不同无线接入技术(RAT)的无线接入网络接入至网络时,网络传输速率之间存在明显差异。因此,作为一种实现方式,本发明实施例可以预先定义不同的无线接入技术(RAT)对应于不同的第一传输带宽,例如:Specifically, when accessing the network through radio access networks of different radio access technologies (RATs), there are obvious differences between network transmission rates. Therefore, as an implementation manner, this embodiment of the present invention may predefine different radio access technologies (RATs) corresponding to different first transmission bandwidths, for example:

A)在电子设备通过2G无线接入网络连接至所述视频内容对应的服务器时,所述第一传输带宽通常很小;A) When the electronic device is connected to the server corresponding to the video content through the 2G wireless access network, the first transmission bandwidth is usually very small;

B)在电子设备通过3G无线接入网接入时,所述第一传输带宽通常较小;B) When the electronic device is accessed through the 3G wireless access network, the first transmission bandwidth is usually small;

C)在电子设备通过4G无线接入网接入时,所述第一传输带宽通常较优;C) When the electronic device is accessed through the 4G wireless access network, the first transmission bandwidth is usually better;

D)在电子设备通过5G或WIFI无线接入网接入时,所述第一传输带宽通常非常好。D) When the electronic device is accessed through a 5G or WIFI wireless access network, the first transmission bandwidth is usually very good.

因此,在上述A)和B)的情况下,电子设备可以选择最低分辨率的视频流(省流量模式)作为候选视频流;在上述C)的情况下,电子设备可以选择中间档位的分辨率的视频流(如标清模式)作为候选视频流;在上述D)的情况下,电子设备可以选择较高或最高分辨率的视频流(如高清、超清或蓝光模式)作为候选视频流,并通过预设的显示方式以提示所述视频流为候选视频流,例如,通过高亮视频流的画面边框或者在视频流的画面上显示提示信息等。Therefore, in the cases of A) and B) above, the electronic device can select the video stream with the lowest resolution (traffic saving mode) as the candidate video stream; in the case of C) above, the electronic device can select the resolution of the middle scale. In the case of D) above, the electronic device may select a video stream with higher or highest resolution (such as HD, UHD or Blu-ray mode) as a candidate video stream, The video stream is prompted as a candidate video stream by a preset display manner, for example, by highlighting the frame of the video stream or displaying prompt information on the screen of the video stream.

当然,用户可以自行选择所述候选视频流作为目标视频流,也可以选择所述候选视频流之外的其他视频流作为目标视频流,本发明实施例对此不做具体限定。Certainly, the user may select the candidate video stream as the target video stream by himself or herself, and may also select other video streams other than the candidate video stream as the target video stream, which is not specifically limited in this embodiment of the present invention.

步骤14,根据所述选择指令,停止并行播放所述至少两路视频流,并切换至所述目标视频流进行播放。Step 14, according to the selection instruction, stop playing the at least two video streams in parallel, and switch to the target video stream for playing.

这里,在接收到所述选择指令后,电子设备将停止并行播放所述至少两路视频流,并切换至所述目标视频流,通过接收并播放该目标视频流,从而实现了用户期望的视频播放。Here, after receiving the selection instruction, the electronic device will stop playing the at least two video streams in parallel, and switch to the target video stream. By receiving and playing the target video stream, the video desired by the user is realized. play.

通过以上步骤,本发明实施例可以直观的展示各个视频流的清晰度和流畅度的区别,便于用户根据自己对清晰度和播放流畅度的需求,选择自己期望的视频流,改善了用户的使用体验。Through the above steps, the embodiment of the present invention can intuitively display the difference between the clarity and fluency of each video stream, which is convenient for the user to select the desired video stream according to his own requirements for the clarity and playback smoothness, which improves the usage of the user. experience.

本发明实施例中,用户在希望进行某个视频内容的多种清晰度的比较时,可以主动的去请求获取该视频内容的不同分辨率的至少两路视频流,向电子设备输入用于请求多路视频流的预设指令(假设为清晰度预览指令),从而触发图1/图2的流程,此时,在上述步骤11之前,上述电子设备可以接收用户输入的清晰度预览指令,根据所述清晰度预览指令,请求所述视频内容的不同分辨率的至少两路视频流,然后进入上述步骤11。In this embodiment of the present invention, when a user wishes to compare multiple resolutions of a certain video content, he can actively request to obtain at least two video streams of different resolutions of the video content, and input a request to the electronic device for The preset command of the multi-channel video stream (it is assumed to be a definition preview command), thereby triggering the process of Figure 1/Figure 2. At this time, before the above step 11, the above-mentioned electronic device can receive the definition preview command input by the user, according to The definition preview instruction requests at least two video streams of different resolutions of the video content, and then proceeds to step 11 above.

另外,本发明实施例也可以由电子设备主动触发图1/图2的流程,例如,在所述电子设备播放所述视频内容的其中一路视频流(假设为第一视频流)的过程中,若检测到传输所述第一视频流的第二传输带宽的变化幅度超出预设幅度时,请求所述视频内容的不同分辨率的至少两路视频流。例如,在第二传输带宽的增大或降低的幅度大于某个预设幅度(如30%)时,所述电子设备判断出当前的网络环境发生了较大变化,在新的网络环境下原本播放的视频流可能会发生卡顿,或者新的网络环境可以支持播放更高清晰度的视频流,此时可以向网络请求所述视频内容的不同分辨率的至少两路视频流,以更好的适应网络环境的变化,提供与当前网络环境相适应的视频流。In addition, in this embodiment of the present invention, the electronic device may also actively trigger the process of FIG. 1/FIG. 2. For example, during the process of the electronic device playing one of the video streams (assuming the first video stream) of the video content, If it is detected that the variation range of the second transmission bandwidth for transmitting the first video stream exceeds a preset range, request at least two video streams of different resolutions of the video content. For example, when the magnitude of the increase or decrease of the second transmission bandwidth is greater than a certain preset range (eg, 30%), the electronic device determines that the current network environment has undergone great changes, and the original network environment in the new network environment The played video stream may freeze, or the new network environment can support the playback of higher-definition video streams. At this time, at least two video streams of different resolutions of the video content can be requested from the network to better It adapts to changes in the network environment and provides video streams that are compatible with the current network environment.

进一步的,在所述第二传输带宽的变化幅度超出预设幅度时,所述电子设备还可以根据所述第一传输带宽,选择与第一传输带宽对应的所述至少两路视频流,其中,所述至少两路视频流的分辨率与第一传输带宽正相关。也就是说,在第一传输带宽较大时,所选择的至少两路视频流的分辨率的和值也较大,而在第一传输带宽较小时,所选择的至少两路视频流的分辨率的和值也较小。例如,在第一传输带宽较大时,可以从所支持的所有分辨率中,选择分辨率较高的视频流作为所述至少两路视频流,而在第一传输带宽较小时,可以选择分辨率较小的视频流作为所述至少两路视频流。Further, when the variation range of the second transmission bandwidth exceeds a preset range, the electronic device may also select the at least two video streams corresponding to the first transmission bandwidth according to the first transmission bandwidth, wherein , the resolution of the at least two video streams is positively correlated with the first transmission bandwidth. That is to say, when the first transmission bandwidth is relatively large, the sum of the resolutions of the selected at least two video streams is also relatively large, and when the first transmission bandwidth is relatively small, the resolution of the selected at least two video streams is relatively large. The sum of the rates is also smaller. For example, when the first transmission bandwidth is relatively large, a video stream with a higher resolution may be selected from all supported resolutions as the at least two video streams, and when the first transmission bandwidth is relatively small, a resolution may be selected. A video stream with a smaller rate is used as the at least two video streams.

电子设备的网络环境发生明显变化,其通常是由于网络切换引起的,特别的,在切换至不同RAT的无线接入网络时,通常会引起网络传输速率的明显变化。因此,作为一种实现方式,本发明实施例可以预先定义不同的RAT对应于不同的第一传输带宽,例如,在电子设备通过2G无线接入网络连接至所述视频内容对应的服务器时,所述第一传输带宽通常很小;而在电子设备通过3G无线接入网接入时,所述第一传输带宽通常较小;在电子设备通过5G无线接入网接入时,所述第一传输带宽通常较优;在电子设备通过5G或WIFI无线接入网接入时,所述第一传输带宽通常非常好。假设所述视频内容具有以下5种不同分辨率的视频流,分别对应为:省流量模式、标清模式、高清模式、超清模式和蓝光模式,上述各个模式的分辨率依次增高。在电子设备通过2G或3G无线接入网接入时,此时由于第一传输带宽较小,因此选择分辨率较小的至少两路视频流,例如可以选择省流量模式和标清模式作为所述至少两路视频流;在电子设备通过4G无线接入网接入时,此时由于第一传输带宽适中,因此选择分辨率适中的至少两路视频流,例如可以选择标清模式和高清模式作为所述至少两路视频流;在电子设备通过5G/WIFI无线接入网接入时,此时由于第一传输带宽较大,因此选择分辨率较大的至少两路视频流,例如可以选择超清模式和蓝光模式作为所述至少两路视频流。另外,需要指出的是,以上仅为本发明实施例在具体实现时的一个举例,并不用于限定本发明。The network environment of the electronic device changes obviously, which is usually caused by network switching. In particular, when switching to a radio access network of a different RAT, the network transmission rate usually changes significantly. Therefore, as an implementation manner, this embodiment of the present invention may predefine different RATs to correspond to different first transmission bandwidths. For example, when an electronic device is connected to a server corresponding to the video content through a 2G wireless access network, the The first transmission bandwidth is usually small; when the electronic device is accessed through the 3G wireless access network, the first transmission bandwidth is usually small; when the electronic device is accessed through the 5G wireless access network, the first transmission bandwidth The transmission bandwidth is usually better; when the electronic device is accessed through the 5G or WIFI wireless access network, the first transmission bandwidth is usually very good. It is assumed that the video content has the following five video streams of different resolutions, which correspond to: data saving mode, standard definition mode, high definition mode, ultra-definition mode and Blu-ray mode, and the resolutions of the above-mentioned modes are sequentially increased. When the electronic device is connected through the 2G or 3G wireless access network, at this time, because the first transmission bandwidth is small, at least two video streams with smaller resolution are selected. For example, the data saving mode and the standard definition mode can be selected as the At least two video streams; when the electronic device is accessed through the 4G wireless access network, at this time, because the first transmission bandwidth is moderate, at least two video streams with moderate resolution are selected, for example, SD mode and high-definition mode can be selected. At least two video streams described above; when the electronic device is connected through the 5G/WIFI wireless access network, at this time, due to the large first transmission bandwidth, at least two video streams with high resolution are selected, for example, ultra-clear can be selected. mode and Blu-ray mode as the at least two video streams. In addition, it should be noted that the above is only an example of the specific implementation of the embodiment of the present invention, and is not intended to limit the present invention.

考虑到所述第一传输带宽可能不足以支持同步播放所述至少两路视频流,作为一种实现方式,本发明实施例可以在第一传输带宽不支持同步播放所述至少两路视频流时,采用先缓存再播放的策略进行并行播放。Considering that the first transmission bandwidth may not be enough to support synchronous playback of the at least two video streams, as an implementation manner, in this embodiment of the present invention, when the first transmission bandwidth does not support synchronous playback of the at least two video streams , using the strategy of buffering first and then playing for parallel playback.

此时,在上述步骤11中,所述电子设备计算所述至少两路视频流的视频分辨率的和值,并与所述电子设备的当前第一传输带宽相比较,确定所述第一传输带宽是否支持同步播放所述至少两路视频流(在上述和值大于或等于第一传输带宽时,可以认为支持同步播放所述至少两路视频流,否则认为不支持)。在所述第一传输带宽支持同步播放所述至少两路视频流时,可以接收所述至少两路视频流并进入步骤12,以并行播放所述至少两路视频流,而在所述第一传输带宽不支持同步播放所述至少两路视频流时,针对每路视频流,所述电子设备可以接收并缓存预设播放时长的视频流数据,并在所述至少两路视频流均缓存完毕后,进入步骤12,以并行播放所述至少两路视频流。At this time, in the above step 11, the electronic device calculates the sum of the video resolutions of the at least two video streams, and compares it with the current first transmission bandwidth of the electronic device to determine the first transmission bandwidth. Whether the bandwidth supports synchronous playback of the at least two video streams (when the above sum value is greater than or equal to the first transmission bandwidth, it can be considered that the at least two video streams are supported synchronously, otherwise it is considered not to be supported). When the first transmission bandwidth supports synchronous playback of the at least two video streams, the at least two video streams may be received and the process proceeds to step 12 to play the at least two video streams in parallel, while the first When the transmission bandwidth does not support synchronous playback of the at least two video streams, for each video stream, the electronic device may receive and cache the video stream data of the preset playback duration, and cache the at least two video streams after the buffering is completed. Then, go to step 12 to play the at least two video streams in parallel.

在上述步骤12中,所述电子设备可以将其视频播放界面划分成多个显示区域,根据所述多个显示区域的位置,将所述视频内容的视频画面划分为多个子画面,每个显示区域分别对应于一路视频源中的一个子画面,图3给出了子画面与完整的视频画面的关系的一个示例,具体的,图3的视频播放界面300包括4个显示区域,分别对应于4种不同清晰度的子画面,分别为标清的子画面301、高清的子画面302、超清的子画面303和蓝光的子画面304,这些子画面均为完整视频画面的一个部分,它们共同组成了一幅完整的视频画面。然后,将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域。In the above step 12, the electronic device may divide its video playback interface into multiple display areas, and according to the positions of the multiple display areas, divide the video picture of the video content into multiple sub-pictures, each display The area corresponds to a sub-picture in one video source, and FIG. 3 shows an example of the relationship between the sub-picture and the complete video picture. Specifically, the video playback interface 300 in FIG. 3 includes 4 display areas, respectively corresponding to 4 sub-pictures with different resolutions, namely SD sub-picture 301, high-definition sub-picture 302, ultra-definition sub-picture 303 and Blu-ray sub-picture 304, these sub-pictures are all a part of the complete video picture, and they are common. form a complete video image. Then, the sub-picture corresponding to the display area in each video stream is rendered to the display area corresponding to each video stream.

通过以上步骤,本发明在并行播放所述至少两个视频流时,每个视频流的子画面组成了一个完整的视频画面,由于子画面的分辨率相对于原始视频画面并没有减小(该子画面即为原始视频画面的一部分,其位置和大小与其在原始画面中一致),因此能够很好的反映出单独播放该视频流时的清晰度的实际效果,另外还便于与并行显示的其他子画面进行清晰度的比较。Through the above steps, when the present invention plays the at least two video streams in parallel, the sub-pictures of each video stream form a complete video picture, since the resolution of the sub-pictures is not reduced relative to the original video picture (this The sub-picture is a part of the original video picture, and its position and size are the same as those in the original picture), so it can well reflect the actual effect of the definition when the video stream is played alone, and it is also convenient to be displayed in parallel with other video streams. Sub-pictures for sharpness comparison.

作为另一种实现方式,本发明实施例可以在第一传输带宽不支持同步播放所述至少两路视频流时,可以仅接收所述至少两路视频流的首帧视频数据,进而并行播放首帧视频数据对应的首帧画面的方式,进行多路视频流的比较,从而可以节约视频流数据的接收时间。As another implementation manner, in this embodiment of the present invention, when the first transmission bandwidth does not support synchronous playback of the at least two video streams, only the first frame of video data of the at least two video streams may be received, and then the first video stream may be played in parallel. The comparison of multiple video streams is carried out in the manner of the first frame picture corresponding to the frame of video data, thereby saving the receiving time of the video stream data.

此时,在上述步骤11中,所述电子设备可以计算所述至少两路视频流的视频分辨率的和值,并与所述电子设备的当前第一传输带宽相比较,确定所述第一传输带宽是否支持同步播放所述至少两路视频流。在所述第一传输带宽支持同步播放所述至少两路视频流时,接收所述至少两路视频流,并进入步骤12,以并行播放所述至少两路视频流,而在所述第一传输带宽不支持同步播放所述至少两路视频流时,则仅接收所述至少两路视频流的首帧视频数据,并进入步骤12。At this time, in the above step 11, the electronic device may calculate the sum of the video resolutions of the at least two video streams, and compare it with the current first transmission bandwidth of the electronic device to determine the first Whether the transmission bandwidth supports simultaneous playback of the at least two video streams. When the first transmission bandwidth supports the simultaneous playback of the at least two video streams, the at least two video streams are received, and the process proceeds to step 12 to play the at least two video streams in parallel, while the first When the transmission bandwidth does not support synchronous playback of the at least two video streams, only the first frame of video data of the at least two video streams is received, and the process goes to step 12 .

在上述步骤12中,所述电子设备可以将视频播放界面划分成多个显示区域,根据所述多个显示区域的位置,将所述视频内容的视频画面划分为多个子画面,每个显示区域分别对应于一路视频源中的一个子画面(与图3相类似)。然后,在所述第一传输带宽支持同步播放所述至少两路视频流时,将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域,而在所述第一传输带宽不支持同步播放所述至少两路视频流时,将每路视频流的首帧画面中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域,所述首帧画面是根据所述首帧数据解码得到的。In the above step 12, the electronic device may divide the video playback interface into multiple display areas, and according to the positions of the multiple display areas, divide the video picture of the video content into multiple sub-pictures, each display area They respectively correspond to a sub-picture in one video source (similar to Fig. 3). Then, when the first transmission bandwidth supports synchronous playback of the at least two video streams, the sub-picture corresponding to the display area in each video stream is rendered to the display area corresponding to each video stream, and When the first transmission bandwidth does not support synchronous playback of the at least two video streams, rendering the sub-picture corresponding to the display area in the first frame of each video stream to the display corresponding to each video stream area, the first frame picture is obtained by decoding the first frame data.

在以上两种实现方式中,本发明实施例均需要将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域,或者,将每路视频流的首帧画面中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域,具体的渲染方式有种,下面进行简单说明:In the above two implementation manners, in the embodiment of the present invention, the sub-picture corresponding to the display area in each video stream needs to be rendered to the display area corresponding to each video stream, or the sub-picture of each video stream needs to be rendered The sub-picture corresponding to the display area in the first frame is rendered to the display area corresponding to each video stream. There are several specific rendering methods, which are briefly described below:

第一种:采用与所述至少两个子画面相同数量的播放器,每个播放器对应于一路视频流;通过每个播放器,并行加载解码每路视频流,并将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域,这里由于每个显示区域的位置坐标是已知的,因此,可以分别将每个显示区域的子画面渲染至对应的显示区域。The first type: use the same number of players as the at least two sub-pictures, each player corresponds to one video stream; through each player, load and decode each video stream in parallel, and compare each video stream with The sub-picture corresponding to the display area is rendered to the display area corresponding to each video stream. Here, since the position coordinates of each display area are known, the sub-pictures of each display area can be respectively rendered to the corresponding display area. display area.

第二种:采用一个播放器进行渲染播放,具体的,分别从各路视频流中提取该视频源中与所述显示区域对应的子画面的视频数据,将从每路视频流中提取的视频数据合成,得到一路新视频流;通过播放器加载解码该新视频流,渲染至所述视频播放界面。The second type: use a player for rendering and playback, specifically, extract the video data of the sub-picture corresponding to the display area in the video source from each video stream, and extract the video from each video stream. Data is synthesized to obtain a new video stream; the new video stream is loaded and decoded by the player, and rendered to the video playback interface.

需要说明的是,以上仅是本发明实施例可以采用的并行播放方式,本发明还可以采用其他的播放方式,为节约篇幅,这里不再一一具体说明。It should be noted that the above are only parallel playback modes that can be used in the embodiments of the present invention, and other playback modes can also be used in the present invention. To save space, they will not be described in detail here.

另外,除了图3所示的并行播放方式外,本发明还可以采用图4所示的并行播放方式,如图4所示,图4的视频播放界面400包括4个显示区域,分别为标清的显示区域401、高清的显示区域402、超清的显示区域403和蓝光的显示区域404,与图4不同的是,这些显示区域显示的均为一个完整视频画面,且这些视频画面是针对同一视频内容的同步视频流,因此这些视频画面在播放未卡顿的时候应该都是相同的。这样,在上述步骤12中并行播放所述至少两路视频流时,可以将视频播放界面划分成多个显示区域,其中,每个显示区域分别对应于一路视频流;然后并行加载解码每路视频流,并渲染至每路视频流所对应的显示区域。例如,通过多个播放器(每个播放器分别对应于一个显示区域),通过每个播放器,并行加载解码每路视频流,并将每路视频流的视频画面渲染至对应的显示区域。In addition, in addition to the parallel playback mode shown in FIG. 3 , the present invention can also adopt the parallel playback mode shown in FIG. 4 . As shown in FIG. 4 , the video playback interface 400 of FIG. The display area 401, the high-definition display area 402, the ultra-clear display area 403, and the Blu-ray display area 404 are different from FIG. 4 in that all displayed in these display areas are a complete video picture, and these video pictures are for the same video Synchronized video streaming of the content, so these video images should all be the same when playback is not stuttered. In this way, when the at least two video streams are played in parallel in the above step 12, the video playback interface can be divided into a plurality of display areas, wherein each display area corresponds to one video stream respectively; then each video stream is loaded and decoded in parallel stream, and render to the display area corresponding to each video stream. For example, through multiple players (each player corresponds to a display area), through each player, each video stream is loaded and decoded in parallel, and the video picture of each video stream is rendered to the corresponding display area.

另外,需要说明的是,图3和图4中的各个显示区域的大小均是相同,且形状均为长方形的,本发明实施例还可以采用不规则形状的显示区域,显示区域间的大小、形状可以相同或不同。再者,各个显示区域可以是如图3或图4所示的平铺方式进行展示,也可以是通过层叠方式(即显示区域之间可能存在重叠)进行展示,本发明实施例对此不做具体限定。In addition, it should be noted that the sizes of each display area in FIG. 3 and FIG. 4 are the same, and the shapes are all rectangles. In this embodiment of the present invention, irregular-shaped display areas can also be used, and the size, The shapes can be the same or different. Furthermore, each display area may be displayed in a tiled manner as shown in FIG. 3 or FIG. 4 , or may be displayed in a stacked manner (that is, there may be overlap between display areas), which is not performed in this embodiment of the present invention. Specific restrictions.

请参见图5,图5是本发明实施例提供的一种视频播放装置的结构示意图,该视频播放装置50应用于一电子设备。如图5所示,该视频播放装置50包括:Please refer to FIG. 5. FIG. 5 is a schematic structural diagram of a video playback apparatus according to an embodiment of the present invention. The video playback apparatus 50 is applied to an electronic device. As shown in Figure 5, the video playback device 50 includes:

视频流接收模块51,用于接收同一视频内容的不同分辨率的至少两路视频流,并检测传输所述至少两路视频流的第一传输带宽,根据所述第一传输带宽和每路视频流的视频比特率,确定所述电子设备在单独播放每路视频流时的播放流畅度;The video stream receiving module 51 is configured to receive at least two video streams with different resolutions of the same video content, and detect the first transmission bandwidth for transmitting the at least two video streams, and according to the first transmission bandwidth and each video stream The video bit rate of the stream, to determine the playback fluency of the electronic device when playing each video stream independently;

视频流播放模块52,用于并行播放所述至少两路视频流,并展示每路视频流的播放流畅度的信息。The video stream playing module 52 is configured to play the at least two video streams in parallel, and display the information of the playing fluency of each video stream.

通过以上模块,本发明实施例可以向用户直观的展示各个视频流的清晰度和流畅度的区别,方便用户在同一画面内容的基础上进行清晰度和播放流畅度的比较。Through the above modules, the embodiment of the present invention can intuitively show the difference between the clarity and fluency of each video stream to the user, which is convenient for the user to compare the clarity and playback fluency on the basis of the same screen content.

根据本发明的至少一个实施例,上述的视频播放装置还可以包括以下单元(图5中未示出):According to at least one embodiment of the present invention, the above-mentioned video playback device may further include the following units (not shown in FIG. 5 ):

选择指令接收模块,用于接收用户针对所述至少两路视频流中的目标视频流的选择指令;a selection instruction receiving module, configured to receive a user's selection instruction for the target video stream in the at least two video streams;

播放控制模块,用于根据所述选择指令,停止并行播放所述至少两路视频流,并切换至所述目标视频流进行播放。A playback control module, configured to stop playing the at least two video streams in parallel according to the selection instruction, and switch to the target video stream for playback.

通过以上模块,本发明实施例可以基于用户的指令切换至目标视频流进行播放。Through the above modules, the embodiment of the present invention can switch to the target video stream for playback based on the user's instruction.

根据本发明的至少一个实施例,上述的视频播放装置还可以包括以下单元(图5中未示出):According to at least one embodiment of the present invention, the above-mentioned video playback device may further include the following units (not shown in FIG. 5 ):

触发模块,用于在接收同一视频内容的不同分辨率的至少两路视频流之前,接收用户输入的清晰度预览指令,根据所述清晰度预览指令,请求所述视频内容的不同分辨率的至少两路视频流;或者,在所述电子设备播放所述视频内容的第一视频流的过程中,若检测到传输所述第一视频流的第二传输带宽的变化幅度超出预设幅度时,请求所述视频内容的不同分辨率的至少两路视频流。The triggering module is configured to receive a definition preview instruction input by the user before receiving at least two video streams of different resolutions of the same video content, and request at least two different resolutions of the video content according to the definition preview instruction. two video streams; or, in the process of playing the first video stream of the video content by the electronic device, if it is detected that the variation range of the second transmission bandwidth for transmitting the first video stream exceeds the preset range, At least two video streams of different resolutions of the video content are requested.

通过以上触发模块,本发明实施例可以响应用户的指令或在网络环境变化时,触发所述视频流接收模块和视频流播放模块,以向用户直观的展示各个视频流的清晰度和流畅度的区别。Through the above triggering module, the embodiment of the present invention can trigger the video stream receiving module and the video stream playing module in response to the user's instruction or when the network environment changes, so as to intuitively display the clarity and fluency of each video stream to the user. the difference.

根据本发明的至少一个实施例,上述的视频播放装置还可以包括以下单元(图5中未示出):According to at least one embodiment of the present invention, the above-mentioned video playback device may further include the following units (not shown in FIG. 5 ):

视频流确定模块,用于在所述第二传输带宽的变化幅度超出预设幅度时,根据所述第一传输带宽,确定与第一传输带宽对应的所述至少两路视频流,其中,所述至少两路视频流的分辨率与第一传输带宽正相关。A video stream determination module, configured to determine the at least two video streams corresponding to the first transmission bandwidth according to the first transmission bandwidth when the variation range of the second transmission bandwidth exceeds a preset range, wherein the The resolution of the at least two video streams is positively related to the first transmission bandwidth.

根据本发明的至少一个实施例,上述的视频流接收模块51,还用于针对每路视频流,在所述第一传输带宽大于或等于该视频流的视频比特率时,根据该视频流的原始帧率,确定单独播放该视频流时的播放流畅度;在所述第一传输带宽小于该视频流的视频比特率时,根据该视频流的原始帧率与第一比值的乘积,确定单独播放该视频流时的播放流畅度,其中,所述第一比值为所述第一传输带宽与所述视频比特率的比值。According to at least one embodiment of the present invention, the above-mentioned video stream receiving module 51 is further configured to, for each video stream, when the first transmission bandwidth is greater than or equal to the video bit rate of the video stream, according to the The original frame rate, to determine the playback fluency when the video stream is played alone; when the first transmission bandwidth is less than the video bit rate of the video stream, according to the product of the original frame rate of the video stream and the first ratio, determine the individual Playback fluency when playing the video stream, wherein the first ratio is the ratio of the first transmission bandwidth to the video bit rate.

根据本发明的至少一个实施例,上述的视频流接收模块51,还用于计算所述至少两路视频流的视频分辨率的和值,并与所述电子设备的当前第一传输带宽相比较,确定所述第一传输带宽是否支持同步播放所述至少两路视频流;在所述第一传输带宽支持同步播放所述至少两路视频流时,接收所述至少两路视频流并触发所述视频流播放模块;在所述第一传输带宽不支持同步播放所述至少两路视频流时,针对每路视频流,接收并缓存预设播放时长的视频流数据,并在所述至少两路视频流均缓存完毕后,并触发所述视频流播放模块。According to at least one embodiment of the present invention, the above-mentioned video stream receiving module 51 is further configured to calculate the sum of the video resolutions of the at least two video streams, and compare it with the current first transmission bandwidth of the electronic device , determine whether the first transmission bandwidth supports synchronous playback of the at least two video streams; when the first transmission bandwidth supports synchronous playback of the at least two video streams, receive the at least two video streams and trigger all The video stream playback module; when the first transmission bandwidth does not support synchronous playback of the at least two video streams, for each video stream, receive and cache the video stream data of the preset playback duration, and perform the playback of the at least two video streams in the at least two channels. After all the video streams are cached, the video stream playing module is triggered.

根据本发明的至少一个实施例,上述视频流播放模块,还用于将视频播放界面划分成多个显示区域,根据所述多个显示区域的位置,将所述视频内容的视频画面划分为多个子画面,每个显示区域分别对应于一路视频源中的一个子画面;将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域。According to at least one embodiment of the present invention, the above-mentioned video stream playback module is further configured to divide the video playback interface into multiple display areas, and divide the video screen of the video content into multiple display areas according to the positions of the multiple display areas. sub-pictures, each display area corresponds to a sub-picture in a channel of video source respectively; the sub-picture corresponding to the display area in each channel of video stream is rendered to the display area corresponding to each channel of video stream.

根据本发明的至少一个实施例,上述的视频流接收模块51,还用于计算所述至少两路视频流的视频分辨率的和值,并与所述电子设备的当前第一传输带宽相比较,确定所述第一传输带宽是否支持同步播放所述至少两路视频流;在所述第一传输带宽支持同步播放所述至少两路视频流时,接收所述至少两路视频流,并触发所述视频流播放模块;在所述第一传输带宽不支持同步播放所述至少两路视频流时,接收所述至少两路视频流的首帧视频数据,并触发所述视频流播放模块。According to at least one embodiment of the present invention, the above-mentioned video stream receiving module 51 is further configured to calculate the sum of the video resolutions of the at least two video streams, and compare it with the current first transmission bandwidth of the electronic device , determine whether the first transmission bandwidth supports synchronous playback of the at least two video streams; when the first transmission bandwidth supports synchronous playback of the at least two video streams, receive the at least two video streams, and trigger The video stream playing module; when the first transmission bandwidth does not support synchronous playing of the at least two video streams, receiving the first frame of video data of the at least two video streams, and triggering the video stream playing module.

根据本发明的至少一个实施例,上述视频流播放模块,还用于将视频播放界面划分成多个显示区域,根据所述多个显示区域的位置,将所述视频内容的视频画面划分为多个子画面,每个显示区域分别对应于一路视频源中的一个子画面;在所述第一传输带宽支持同步播放所述至少两路视频流时,将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域;在所述第一传输带宽不支持同步播放所述至少两路视频流时,将每路视频流的首帧画面中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域,所述首帧画面是根据所述首帧数据解码得到的。According to at least one embodiment of the present invention, the above-mentioned video stream playback module is further configured to divide the video playback interface into multiple display areas, and divide the video screen of the video content into multiple display areas according to the positions of the multiple display areas. sub-pictures, and each display area corresponds to a sub-picture in a channel of video sources; when the first transmission bandwidth supports synchronous playback of the at least two channels of video streams, the display area of each channel of video streams corresponds to The sub-picture is rendered to the display area corresponding to each video stream; when the first transmission bandwidth does not support synchronous playback of the at least two video streams, the first frame of each video stream is compared with the display The sub-picture corresponding to the area is rendered to the display area corresponding to each video stream, and the first frame of the picture is obtained by decoding the first frame of data.

此外,本发明实施例还提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其中,所述计算机程序被所述处理器执行时可实现上述视频播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。In addition, an embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is executed by the processor During execution, each process of the foregoing video playback method embodiments can be implemented, and the same technical effect can be achieved. To avoid repetition, details are not described here.

具体的,参见图6所示,本发明实施例还提供了一种电子设备,包括总线61、收发机62、天线63、总线接口64、处理器65和存储器66。Specifically, as shown in FIG. 6 , an embodiment of the present invention further provides an electronic device including a bus 61 , a transceiver 62 , an antenna 63 , a bus interface 64 , a processor 65 and a memory 66 .

在本发明实施例中,所述电子设备具有折叠屏,所述折叠屏包括至少两个屏。所述电子设备还包括:存储在存储器66上并可在处理器65上运行的计算机程序。可选的,所述计算机程序被处理器65执行时可实现如下步骤:In an embodiment of the present invention, the electronic device has a folding screen, and the folding screen includes at least two screens. The electronic device also includes a computer program stored on the memory 66 and executable on the processor 65 . Optionally, when the computer program is executed by the processor 65, the following steps may be implemented:

接收同一视频内容的不同分辨率的至少两路视频流,并检测传输所述至少两路视频流的第一传输带宽,根据所述第一传输带宽和每路视频流的视频比特率,确定所述电子设备在单独播放每路视频流时的播放流畅度;Receive at least two video streams with different resolutions of the same video content, and detect the first transmission bandwidth for transmitting the at least two video streams, and determine the The playback fluency of the electronic device when playing each video stream independently;

并行播放所述至少两路视频流,并展示每路视频流的播放流畅度的信息。The at least two video streams are played in parallel, and the information of the playback fluency of each video stream is displayed.

可理解的,本发明实施例中,所述计算机程序被处理器65执行时可实现上述图1或图2所示的视频播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Understandably, in this embodiment of the present invention, when the computer program is executed by the processor 65, each process of the video playback method embodiment shown in FIG. 1 or FIG. 2 can be implemented, and the same technical effect can be achieved. Repeat, and will not repeat them here.

在图6中,总线架构(用总线61来代表),总线61可以包括任意数量的互联的总线和桥,总线61将包括由处理器65代表的一个或多个处理器和存储器66代表的存储器的各种电路链接在一起。总线61还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口64在总线61和收发机62之间提供接口。收发机62可以是一个元件,也可以是多个元件,比如多个接收器和发送器,提供用于在传输介质上与各种其他装置通信的单元。经处理器65处理的数据通过天线63在无线介质上进行传输,进一步,天线63还接收数据并将数据传送给处理器65。In FIG. 6, a bus architecture (represented by bus 61), which may include any number of interconnected buses and bridges, bus 61 will include one or more processors represented by processor 65 and memory represented by memory 66 The various circuits are linked together. The bus 61 may also link together various other circuits such as peripherals, voltage regulators and power management circuits, etc., which are well known in the art and therefore will not be described further herein. Bus interface 64 provides an interface between bus 61 and transceiver 62 . Transceiver 62 may be a single element or multiple elements, such as multiple receivers and transmitters, providing means for communicating with various other devices over a transmission medium. The data processed by the processor 65 is transmitted on the wireless medium through the antenna 63 , and further, the antenna 63 also receives the data and transmits the data to the processor 65 .

处理器65负责管理总线61和通常的处理,还可以提供各种功能,包括定时,外围接口,电压调节、电源管理以及其他控制功能。而存储器66可以被用于存储处理器65在执行操作时所使用的数据。Processor 65 is responsible for managing bus 61 and general processing, and may also provide various functions including timing, peripheral interface, voltage regulation, power management, and other control functions. Instead, memory 66 may be used to store data used by processor 65 in performing operations.

可选的,处理器65可以是CPU、ASIC、FPGA或CPLD。Optionally, the processor 65 may be a CPU, ASIC, FPGA or CPLD.

本发明实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述视频播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, implements each process of the foregoing video playback method embodiments, and can achieve the same technical effect, In order to avoid repetition, details are not repeated here.

计算机可读介质包括永久性和非永久性、可移动和非可移动媒体,可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer-readable media includes both permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology for storage of information. Information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Flash Memory or other memory technology, Compact Disc Read Only Memory (CD-ROM), Digital Versatile Disc (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, excludes transitory computer-readable media, such as modulated data signals and carrier waves.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above-mentioned serial numbers of the embodiments of the present invention are only for description, and do not represent the advantages or disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general hardware platform, and of course hardware can also be used, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.

以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above are only the preferred embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can be made. It should be regarded as the protection scope of the present invention.

Claims (10)

1.一种视频播放方法,应用于电子设备,其特征在于,包括:1. a video playback method, applied to electronic equipment, is characterized in that, comprising: 接收同一视频内容的不同分辨率的至少两路视频流,并检测传输所述至少两路视频流的第一传输带宽,根据所述第一传输带宽和每路视频流的视频比特率,确定所述电子设备在单独播放每路视频流时的播放流畅度;Receive at least two video streams with different resolutions of the same video content, and detect the first transmission bandwidth for transmitting the at least two video streams, and determine the The playback fluency of the electronic device when playing each video stream independently; 并行播放所述至少两路视频流,并展示每路视频流的播放流畅度的信息;Playing the at least two video streams in parallel, and displaying information about the playback fluency of each video stream; 其中,所述接收同一视频内容的不同分辨率的至少两路视频流的步骤,包括:Wherein, the step of receiving at least two video streams of different resolutions of the same video content includes: 计算所述至少两路视频流的视频分辨率的和值,并与所述第一传输带宽相比较,确定所述第一传输带宽是否支持同步播放所述至少两路视频流;Calculate the sum of the video resolutions of the at least two video streams, and compare it with the first transmission bandwidth to determine whether the first transmission bandwidth supports synchronous playback of the at least two video streams; 在所述第一传输带宽支持同步播放所述至少两路视频流时,接收所述至少两路视频流,并进入所述并行播放所述至少两路视频流的步骤;When the first transmission bandwidth supports synchronous playback of the at least two video streams, receiving the at least two video streams, and entering the step of playing the at least two video streams in parallel; 在所述第一传输带宽不支持同步播放所述至少两路视频流时,接收所述至少两路视频流的首帧视频数据,并进入所述并行播放所述至少两路视频流的步骤。When the first transmission bandwidth does not support synchronous playback of the at least two video streams, receiving the first frame of video data of the at least two video streams, and entering the step of playing the at least two video streams in parallel. 2.根据权利要求1所述的方法,其特征在于,在播放所述至少两路视频流之后,所述方法还包括:2. The method according to claim 1, wherein after playing the at least two video streams, the method further comprises: 接收用户针对所述至少两路视频流中的目标视频流的选择指令;receiving a user's selection instruction for the target video stream in the at least two video streams; 根据所述选择指令,停止并行播放所述至少两路视频流,并切换至所述目标视频流进行播放。According to the selection instruction, stop playing the at least two video streams in parallel, and switch to the target video stream for playing. 3.根据权利要求1所述的方法,其特征在于,在接收同一视频内容的不同分辨率的至少两路视频流的步骤之前,所述方法包括:3. The method according to claim 1, wherein before the step of receiving at least two video streams of different resolutions of the same video content, the method comprises: 接收用户输入的清晰度预览指令,根据所述清晰度预览指令,请求所述视频内容的不同分辨率的至少两路视频流;或者,Receive a definition preview instruction input by a user, and request at least two video streams of different resolutions of the video content according to the definition preview instruction; or, 在所述电子设备播放所述视频内容的第一视频流的过程中,若检测到传输所述第一视频流的第二传输带宽的变化幅度超出预设幅度时,请求所述视频内容的不同分辨率的至少两路视频流。During the process of playing the first video stream of the video content by the electronic device, if it is detected that the variation range of the second transmission bandwidth for transmitting the first video stream exceeds a preset range, the electronic device requests a difference in the video content. Resolution of at least two video streams. 4.根据权利要求3所述的方法,其特征在于,在所述第二传输带宽的变化幅度超出预设幅度时,所述方法还包括:4. The method according to claim 3, wherein when the variation range of the second transmission bandwidth exceeds a preset range, the method further comprises: 根据所述第一传输带宽,确定与第一传输带宽对应的所述至少两路视频流,其中,所述至少两路视频流的分辨率与第一传输带宽正相关。According to the first transmission bandwidth, the at least two video streams corresponding to the first transmission bandwidth are determined, wherein the resolutions of the at least two video streams are positively correlated with the first transmission bandwidth. 5.根据权利要求1所述的方法,其特征在于,所述根据所述第一传输带宽和每路视频流的视频比特率,确定所述电子设备在单独播放每路视频流时的播放流畅度的步骤,包括:5. The method according to claim 1, wherein, according to the first transmission bandwidth and the video bit rate of each video stream, it is determined that the electronic device plays smoothly when each video stream is played independently Degree steps, including: 针对每路视频流,在所述第一传输带宽大于或等于该视频流的视频比特率时,根据该视频流的原始帧率,确定单独播放该视频流时的播放流畅度;在所述第一传输带宽小于该视频流的视频比特率时,根据该视频流的原始帧率与第一比值的乘积,确定单独播放该视频流时的播放流畅度,其中,所述第一比值为所述第一传输带宽与所述视频比特率的比值。For each video stream, when the first transmission bandwidth is greater than or equal to the video bit rate of the video stream, according to the original frame rate of the video stream, determine the playback fluency when the video stream is played alone; When the transmission bandwidth is less than the video bit rate of the video stream, the playback fluency when the video stream is played alone is determined according to the product of the original frame rate of the video stream and a first ratio, where the first ratio is the The ratio of the first transmission bandwidth to the video bit rate. 6.根据权利要求1至5任一项所述的方法,其特征在于,所述接收同一视频内容的不同分辨率的至少两路视频流的步骤,包括:6. The method according to any one of claims 1 to 5, wherein the step of receiving at least two video streams of different resolutions of the same video content comprises: 计算所述至少两路视频流的视频分辨率的和值,并与所述第一传输带宽相比较,确定所述第一传输带宽是否支持同步播放所述至少两路视频流;Calculate the sum of the video resolutions of the at least two video streams, and compare it with the first transmission bandwidth to determine whether the first transmission bandwidth supports synchronous playback of the at least two video streams; 在所述第一传输带宽支持同步播放所述至少两路视频流时,接收所述至少两路视频流并进入所述并行播放所述至少两路视频流的步骤;When the first transmission bandwidth supports synchronous playback of the at least two video streams, receiving the at least two video streams and entering the step of playing the at least two video streams in parallel; 在所述第一传输带宽不支持同步播放所述至少两路视频流时,针对每路视频流,接收并缓存预设播放时长的视频流数据,并在所述至少两路视频流均缓存完毕后,进入所述并行播放所述至少两路视频流的步骤。When the first transmission bandwidth does not support synchronous playback of the at least two video streams, for each video stream, receive and cache video stream data with a preset playback duration, and when the at least two video streams are cached Then, enter the step of playing the at least two video streams in parallel. 7.根据权利要求6所述的方法,其特征在于,所述并行播放所述至少两路视频流的步骤,包括:7. The method according to claim 6, wherein the step of playing the at least two video streams in parallel comprises: 将视频播放界面划分成多个显示区域,根据所述多个显示区域的位置,将所述视频内容的视频画面划分为多个子画面,每个显示区域分别对应于一路视频源中的一个子画面;The video playback interface is divided into a plurality of display areas, and according to the positions of the plurality of display areas, the video picture of the video content is divided into a plurality of sub-pictures, and each display area corresponds to a sub-picture in a channel of video source respectively. ; 将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域。The sub-picture corresponding to the display area in each video stream is rendered to the display area corresponding to each video stream. 8.根据权利要求1所述的方法,其特征在于,所述并行播放所述至少两路视频流的步骤,包括:8. The method according to claim 1, wherein the step of playing the at least two video streams in parallel comprises: 将视频播放界面划分成多个显示区域,根据所述多个显示区域的位置,将所述视频内容的视频画面划分为多个子画面,每个显示区域分别对应于一路视频源中的一个子画面;The video playback interface is divided into a plurality of display areas, and according to the positions of the plurality of display areas, the video picture of the video content is divided into a plurality of sub-pictures, and each display area corresponds to a sub-picture in a channel of video source respectively. ; 在所述第一传输带宽支持同步播放所述至少两路视频流时,将每路视频流中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域;When the first transmission bandwidth supports synchronous playback of the at least two video streams, rendering the sub-picture corresponding to the display area in each video stream to the display area corresponding to each video stream; 在所述第一传输带宽不支持同步播放所述至少两路视频流时,将每路视频流的首帧画面中与所述显示区域对应的子画面,渲染至每路视频流所对应的显示区域,所述首帧画面是根据所述首帧视频数据解码得到的。When the first transmission bandwidth does not support synchronous playback of the at least two video streams, rendering the sub-picture corresponding to the display area in the first frame of each video stream to the display corresponding to each video stream area, the first frame of picture is obtained by decoding the first frame of video data. 9.一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,其特征在于,所述计算机程序被所述处理器执行时实现如权利要求1至8中任一项所述的视频播放方法的步骤。9. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that, when the computer program is executed by the processor, as claimed in the claim The steps of the video playback method described in any one of requirements 1 to 8 are required. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至8中任一项所述的视频播放方法的步骤。10. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the video playback method according to any one of claims 1 to 8 are implemented.
CN201910932753.9A 2019-09-29 2019-09-29 Video playing method, electronic equipment and computer readable storage medium Active CN110662109B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910932753.9A CN110662109B (en) 2019-09-29 2019-09-29 Video playing method, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910932753.9A CN110662109B (en) 2019-09-29 2019-09-29 Video playing method, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110662109A CN110662109A (en) 2020-01-07
CN110662109B true CN110662109B (en) 2022-10-18

Family

ID=69039758

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910932753.9A Active CN110662109B (en) 2019-09-29 2019-09-29 Video playing method, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110662109B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542876A (en) * 2021-07-09 2021-10-22 众立智能科技(深圳)有限公司 Method and system for realizing picture synchronization by LCD liquid crystal splicing
CN113726759A (en) * 2021-08-25 2021-11-30 烽火通信科技股份有限公司 Code rate self-adaption method, device, equipment and readable storage medium
CN113709451A (en) * 2021-08-25 2021-11-26 北京世纪互联宽带数据中心有限公司 Video contrast playing method and device
CN113835656A (en) * 2021-09-08 2021-12-24 维沃移动通信有限公司 Display method and device and electronic equipment
CN113891111B (en) * 2021-09-29 2023-11-21 北京拙河科技有限公司 Live broadcasting method, device, medium and equipment of billion pixel video
CN114827726B (en) * 2022-04-22 2025-05-27 Oppo广东移动通信有限公司 A method, device, system and storage medium for determining differences in video playback platforms
CN115866307A (en) * 2022-11-15 2023-03-28 北京集度科技有限公司 Video playing method, electronic equipment and computer program product

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110126346A (en) * 2010-05-17 2011-11-23 엘지전자 주식회사 Method of providing a resolution selection menu and a broadcast receiving device
US20130195204A1 (en) * 2012-01-19 2013-08-01 Vid Scale Inc. Methods and Systems for Video Delivery Supporting Adaptation to Viewing Conditions
CN103024598B (en) * 2013-01-10 2015-12-09 深信服网络科技(深圳)有限公司 Obtain method and device that Internet video plays fluency
CN103731719A (en) * 2013-12-19 2014-04-16 乐视网信息技术(北京)股份有限公司 Definition setting method and electronic equipment
CN105100876B (en) * 2015-08-28 2019-04-12 北京奇艺世纪科技有限公司 A kind of playback method and device of Streaming Media

Also Published As

Publication number Publication date
CN110662109A (en) 2020-01-07

Similar Documents

Publication Publication Date Title
CN110662109B (en) Video playing method, electronic equipment and computer readable storage medium
US9615112B2 (en) Method, system, player and mobile terminal for online video playback
EP3163866A1 (en) Self-adaptive display method and device for image of mobile terminal, and computer storage medium
JP7038226B2 (en) Video processing methods, devices, terminals and media
GB2587544A (en) Video acquisition method and device, terminal and medium
US10306179B2 (en) Image providing apparatus, control method thereof, and image providing system
JP2018512814A (en) Method, apparatus and system for processing video stream data
KR20230070316A (en) Hotspot list display method, apparatus, electronic equipment and storage medium
WO2020062684A1 (en) Video processing method and device, terminal, and storage medium
WO2020233142A1 (en) Multimedia file playback method and apparatus, electronic device, and storage medium
KR20150065069A (en) Display apparatus, method for displaying image thereof and computer-readable recording medium
US9509947B2 (en) Method and apparatus for transmitting file during video call in electronic device
US9363132B2 (en) Maximizing throughput of streaming media by simultaneously connecting to streaming media server over multiple independent network connections
US20150134846A1 (en) Method and apparatus for media segment request retry control
WO2017080175A1 (en) Multi-camera used video player, playing system and playing method
CN110740261A (en) Video recording method, device, terminal and storage medium
JP2025502887A (en) VIDEO PREVIEW METHOD, APPARATUS, READABLE MEDIUM, AND ELECTRONIC DEVICE - Patent application
KR101395613B1 (en) Method and Mobile Terminal for Managing Platform of Mobile Terminal for Seamless Content Use
US20250203128A1 (en) Live-streaming starting method, device and program product
CN115278308B (en) Media stream processing method, device, equipment and storage medium
CN105122305B (en) Mechanism for facilitating dynamic phase detection with high jitter tolerance for images in media streams
CN116700650A (en) Screen projection method, terminal equipment and storage medium
US10986156B1 (en) Quality prediction apparatus, quality prediction method and program
CN116527992A (en) Video playing resolution switching method and device
CN114945097A (en) Video stream processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant