WO2023185129A1 - Display device, server, media resource continuous playback method, and screen mirroring method - Google Patents

Display device, server, media resource continuous playback method, and screen mirroring method Download PDF

Info

Publication number
WO2023185129A1
WO2023185129A1 PCT/CN2022/141210 CN2022141210W WO2023185129A1 WO 2023185129 A1 WO2023185129 A1 WO 2023185129A1 CN 2022141210 W CN2022141210 W CN 2022141210W WO 2023185129 A1 WO2023185129 A1 WO 2023185129A1
Authority
WO
WIPO (PCT)
Prior art keywords
video
window
video stream
playback
display device
Prior art date
Application number
PCT/CN2022/141210
Other languages
French (fr)
Chinese (zh)
Inventor
赖园园
陈效总
佘祥顺
薛梅
庞秀娟
Original Assignee
聚好看科技股份有限公司
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
Priority claimed from CN202210334121.4A external-priority patent/CN116939302A/en
Priority claimed from CN202210743842.0A external-priority patent/CN116801027A/en
Application filed by 聚好看科技股份有限公司 filed Critical 聚好看科技股份有限公司
Publication of WO2023185129A1 publication Critical patent/WO2023185129A1/en

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/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Definitions

  • the present application relates to the technical field of display devices, and in particular, to a display device, a server, a media asset streaming method, and a screen projection method.
  • Smart TV is an important display device for people to watch TV series.
  • the video player on the smart TV has a continuous broadcast function and a function of skipping the beginning and end of the video.
  • the continuous broadcast function When the continuous broadcast function is turned on, the video player will automatically play the next episode of the TV series after playing one episode; when the skip opening and ending function is turned on, the video player will not play the opening and ending of each episode of the TV series.
  • the video player has the continuous broadcast function and the skip opening and ending functions enabled by default.
  • people usually sit and stand when watching TV series people tend to feel tired after watching multiple episodes of TV series continuously, which is not good for people's health.
  • the display device includes: a display; and a controller connected to the display.
  • the controller is configured to: the display displays a follow-up training interface, wherein the follow-up training interface
  • the interface includes a first window and a second window, the first window is used to play the first video, and the second window is used to play the third video obtained from the server.
  • Some embodiments of the present application provide a server, which is configured to: receive a query request sent by the display device when playing the first video, where the query request includes a user identification and playable duration; in response to the query request, Obtain the third video corresponding to the user identification from the follow-up video library; calculate the playback start time point and playback end time point of the third video according to the playable duration; send the third video containing the playback time to the display device.
  • the media asset identification of the three videos, the playback start time point, and the media asset information of the third video at the playback end time point enable the display device to play the second video from the first time before the end of the first video.
  • the video clip of the third video between the playback start time point and the playback end time point is also played within the second time, wherein the second video is the first video clip in the playback index table of the display device.
  • the video corresponds to the video corresponding to the next item of the item, and the third video is a video that prompts the user to exercise.
  • the third video is a fitness video that prompts the user to exercise; in response to receiving a window switching instruction before the second window plays for a preset duration, the first video is removed from the Adjust the current progress of the first video to the second window to continue playing, adjust the current progress of the third video to the first window to continue playing, and play to the second window.
  • the second window cancels the second window and adjust the first window to continue playing from the current progress of the second video; in response to playing the preset duration in the second window
  • the window switching instruction is not received, the second window is cancelled.
  • Some embodiments of this application provide a screencasting method, which includes:
  • a follow-up training interface is displayed, wherein the follow-up training interface includes a first window and a second window, the second window is used to play the fitness video obtained from the server; and receives the third training video sent by the terminal device.
  • a video stream wherein the first video stream is a video stream collected by the video recording device of the terminal device, and carries a symbol used to identify the posture of the terminal device when recording the video corresponding to the first video stream.
  • Identification information obtaining a scaling ratio according to the identification information, video playback parameters and the size of the first video stream, scaling the first video stream according to the scaling ratio to obtain a second video stream, and obtaining a second video stream according to the video Playback parameters and the size of the second video stream are used to obtain a layout offset parameter.
  • the video playback parameters include the size of the first window and/or the preset video stream size; and the layout offset parameter is obtained based on the layout offset parameter.
  • the two video streams are offset, and the offset second video stream is played in the first window.
  • Figure 1 is a schematic diagram of an operation scenario between a display device and a control device according to some embodiments
  • FIG. 2 is a hardware configuration block diagram of the control device 100 according to some embodiments.
  • Figure 3 is a hardware configuration block diagram of the display device 200 according to some embodiments.
  • Figure 4 is a schematic diagram of software configuration in the display device 200 according to some embodiments.
  • Figure 5 is a schematic diagram of a home page of a display device according to some embodiments.
  • Figure 6 is a schematic flowchart of a method for broadcasting media assets according to some embodiments.
  • Figure 7 is a schematic flowchart of a method for broadcasting media assets according to some embodiments.
  • Figure 8 is a timing diagram of a media asset broadcast method according to some embodiments.
  • Figure 9 is a schematic interface diagram of a media asset details page according to some embodiments.
  • Figure 10 is a schematic diagram of the playback interface of the first episode according to some embodiments.
  • Figure 11 is a timing diagram after the display device receives the query result according to some embodiments.
  • Figure 12 is a schematic diagram of the playback interface of the first episode according to some embodiments.
  • Figure 13 is a schematic diagram of the playback interface of the follow-up video according to some embodiments.
  • Figure 14 is a schematic diagram of the playback interface of the second episode according to some embodiments.
  • Figure 15 is a timing diagram after the display device receives the query result according to some embodiments.
  • Figure 16 is a step flow chart of a screencasting method according to some embodiments.
  • Figure 17 is a step flow chart of a screen projection method according to other embodiments.
  • Figure 18 is a schematic diagram of the scene of the screen projection method shown in Figure 17;
  • Figure 19 is a schematic diagram of the screen projection method shown in Figure 17;
  • Figure 20 is a step flow chart of a screen projection method according to other embodiments.
  • Figure 21 is a schematic diagram of the screen projection method shown in Figure 20;
  • Figure 22 is a step flow chart of a screen projection method according to other embodiments.
  • Figure 23 is a schematic diagram of the scene of the screen projection method shown in Figure 22;
  • Figure 24 is a schematic diagram of the screen projection method shown in Figure 22;
  • Figure 25 is a step flow chart of a screen projection method according to other embodiments.
  • Figure 26 is a schematic diagram of the screen projection method shown in Figure 25;
  • Figure 27 is a step flow chart of a screen projection method according to other embodiments.
  • Figure 28 is a schematic diagram of the scene of the screen projection method shown in Figure 27;
  • Figure 29 is a schematic diagram of the screen projection method shown in Figure 27;
  • Figure 30 is a scene architecture diagram of a screen casting method according to some embodiments.
  • the display device provided by the embodiment of the present application can have a variety of implementation forms, for example, it can be a TV, a smart TV, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc.
  • Figures 1 and 2 illustrate a specific implementation of the display device of the present application.
  • Figure 1 is a schematic diagram of an operation scenario between a display device and a control device according to some embodiments. As shown in FIG. 1 , the user can operate the display device 200 through the terminal device 300 or the control device 100 .
  • control device 100 may be a remote controller.
  • the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-distance communication methods to control the display device 200 through wireless or wired methods.
  • the user can control the display device 200 by inputting user instructions through buttons on the remote control, voice input, control panel input, etc.
  • a terminal device 300 (such as a mobile terminal, a tablet, a computer, a laptop, etc.) may also be used to control the display device 200 .
  • the display device 200 is controlled using an application program running on the terminal device.
  • the display device may not use the above-mentioned terminal device or control device to receive instructions, but may receive user control through touch or gestures.
  • the display device 200 can also be controlled in a manner other than the control device 100 and the terminal device 300.
  • the display device 200 can directly receive the user's voice command control through a module configured inside the display device 200 to obtain voice commands.
  • the user's voice command control can also be received through a voice control device provided outside the display device 200 .
  • display device 200 also communicates data with server 400.
  • the display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks.
  • the server 400 can provide various content and interactions to the display device 200.
  • FIG. 2 is a configuration block diagram of the control device 100 according to some embodiments.
  • the control device 100 includes a controller 110, a communication interface 130, a user input/output interface 140, a memory, and a power supply.
  • the control device 100 can receive input operation instructions from the user, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, thereby mediating the interaction between the user and the display device 200 .
  • the display device 200 includes a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 285, a memory, a power supply, and a user input interface 280. At least one.
  • the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, first to nth interfaces for input/output.
  • the display 260 includes a display screen component for presenting images, a driving component for driving image display, a component for receiving image signals output from the controller, displaying video content, image content, menu control interface components, and a user control UI interface. .
  • the display 260 can be a liquid crystal display, an OLED display, a projection display, or a projection device and a projection screen.
  • the communicator 220 is a component for communicating with external devices or servers according to various communication protocol types.
  • the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near field communication protocol chips, and an infrared receiver.
  • the display device 200 can establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220 .
  • the user input interface 280 can be used to receive control signals from the control device 100 (such as an infrared remote control, etc.).
  • the detector 230 is used to collect signals from the external environment or interactions with the outside.
  • the detector 230 includes a light receiver, a sensor used to collect ambient light intensity; or the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures, or , the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
  • the external device interface 240 may include, but is not limited to, any of the following: high-definition multimedia interface (HDMI), analog or data high-definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. or multiple interfaces. It can also be a composite input/output interface formed by the above-mentioned multiple interfaces.
  • HDMI high-definition multimedia interface
  • component analog or data high-definition component input interface
  • CVBS composite video input interface
  • USB USB input interface
  • RGB port etc.
  • It can also be a composite input/output interface formed by the above-mentioned multiple interfaces.
  • the tuner-demodulator 210 receives broadcast television signals through wired or wireless reception methods, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals.
  • the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box. wait.
  • the controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory.
  • the controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on display 260, controller 250 may perform operations related to the object selected by the user command.
  • the system is divided into four layers. From top to bottom, they are the Applications layer (referred to as the “Application layer”) and the Application Framework layer (referred to as the “Framework layer”). “), Android runtime and system library layer (referred to as “system runtime library layer”), and kernel layer.
  • Applications layer referred to as the “Application layer”
  • Application Framework layer referred to as the “Framework layer”
  • Android runtime and system library layer referred to as “system runtime library layer”
  • kernel layer referred to as the kernel layer.
  • the interface of the preset video on demand program can be directly entered.
  • the interface of the video on demand program can be as shown in Figure 5, including at least a navigation bar 510 and a content display area located below the navigation bar 510. 520.
  • the content displayed in the content display area 520 will change as the selected control in the navigation bar changes.
  • Programs in the application layer can be integrated into the video on demand program and displayed through a control in the navigation bar, or can be further displayed after the application control in the navigation bar is selected.
  • the content display area 520 includes 12 media asset controls, corresponding to media asset 1-media asset 12 respectively.
  • the display device after the display device is started, it can directly enter the display interface of the last selected signal source, or the signal source selection interface, where the signal source can be a preset video on demand program, an HDMI interface, or a live TV interface. At least one of the following: after the user selects different signal sources, the display can display content obtained from different signal sources.
  • the player of the video on demand program has a continuous broadcast function. After the continuous broadcast function is enabled, the player can automatically play the next episode of a media asset after playing one episode of the media asset. For example, for a TV series that contains multiple episodes, the player can automatically play the next episode after playing one of the episodes.
  • the player of the video on demand program can not only broadcast multiple episodes of a single media asset, but also broadcast a media asset set containing multiple media assets. For example, for a media collection containing multiple videos, the video on demand program can automatically play the next video in the media collection after playing one video.
  • the player of the video-on-demand program can also perform continuous playback of any number of videos. After playing one video, other videos recommended for the user can be played.
  • the player of the video on demand program can enable the continuous broadcast function by default. Users may easily feel tired after watching multiple long videos continuously, such as multiple episodes of TV series, which is not good for people's health.
  • the media asset serial broadcast method is used for prompts by playing during the ending and opening times of two adjacent media assets. Videos of users exercising allow users to exercise between watching two media assets, thereby reducing the fatigue caused by sitting for long periods of time and improving the viewing experience.
  • a video prompting the user to exercise may be delivered by the server.
  • the video that prompts the user to perform exercise may be a follow-up video
  • the follow-up video may be a video that the user has followed that day or a video in which the number of follow-up exercises by the user reaches a preset threshold within a preset period, for example, Videos that users have followed more than three times in the past week.
  • the server can deliver popular follow-up training videos, such as the video with the largest number of follow-up training users that day.
  • this application takes the user to continuously watch multiple episodes of the same TV series as an example. Since the sum of the time between the end and the beginning of the two episodes of the TV series is usually 3 ⁇ 5 minutes, and people exercising within these 3 to 5 minutes can usually relieve the fatigue caused by sitting for a long time. It should be understood that this media asset cascading method can also be modified to adapt to other media asset cascading scenarios. For example, when multiple movies are broadcast in a row, since the opening or ending of one movie can be as long as 5 to 10 minutes or even longer, the total time of the opening and ending of two movies in a row can be as long as 10 to 20 minutes or even longer. If the user exercises for 10 to 20 minutes for a long time, the user may feel more tired. Therefore, in this scenario, a video to prompt the user to exercise can only be played at the beginning or end of a movie.
  • some players have a function of automatically skipping the opening and ending credits. When playing to the end of a TV series, it will automatically jump to the main movie after the opening of the next episode of the TV series. If this function is turned on, it cannot be used. A video prompting the user to exercise is played at the beginning and end of the film. In addition, if the continuous broadcast function is not turned on, the player will not continue to play after playing an episode of TV series. At this time, the user may not have the need to exercise. If a video is played that prompts the user to exercise, it may give the user a bad impression. experience.
  • the user can manually set to turn off the function of skipping the opening and ending credits and enable the continuous broadcast function, or the player can also The default setting is to turn off the skipping of opening and ending credits and enable the continuous broadcast function.
  • the player of the video on demand program is configured to be able to turn off the function of skipping the opening and ending credits and enable the continuous broadcast function.
  • some versions of the video on demand program may not support the media asset cascading method provided by the embodiments of this application.
  • the video on demand program will support the media asset cascading method provided by the embodiments of this application.
  • the video on demand program may prompt the user to turn on the cascading function to experience the beginning and end of the media asset cascade. Physical exercise.
  • the media asset broadcast method provided by the embodiment of the present application includes the following steps:
  • Step S101 When the first window is played to the first time before the end of the first video, according to the next item corresponding to the first video in the play index table, start the layer above the first window
  • the second window is used to play the third video, wherein the first window is a full-screen window, the second window is a non-full-screen window, the next item corresponds to the second video, and the third video prompts the user Video of doing exercise.
  • an episode of a TV series that the user is watching may be called a first video, the next episode may be called a second video, and a video that prompts the user to exercise may be called a third video.
  • the details page data of the TV series may be set with a play index table.
  • the play index table is set with multiple items, each item corresponding to an episode.
  • the video on demand program is configured to continuously play the episodes of the TV series according to the play index table.
  • the main thread of the video on demand program may be configured to start multiple players and control each player independently.
  • the player used to play episodes of the TV series may be called a first player, and the player used to play the third video may be called a second player.
  • the main thread of the video on demand program may be configured to start multiple windows and control the content displayed in each window respectively.
  • One of the windows may be a full-screen window, and the full-screen window may be called the first window.
  • the other window may be a non-full-screen window, and the non-full-screen window may be called the second window.
  • the second window may be located in a layer above the first window. , thus occluding the first window.
  • one player can launch multiple playback windows and control each player independently.
  • the main thread of the video on demand program can start the first window and the first player, and play the content of the first player in the first window, that is, play the first window. Divide the episodes and monitor the playback progress in real time. For example, after the user clicks on the first episode, the video on demand program can play the first episode in the first window.
  • the main thread of the video on demand program can request information about the third video from the server.
  • the video on demand program can calculate the playable duration of the third video based on the ending duration of the first video and the opening duration of the second video, and send the playable duration and the user ID logged in to the video on demand program to the server, where the first The ending length of the video and the opening length of the second video can be obtained from the data on the media asset details page of the TV series issued by the server.
  • the server can determine a third video based on the playable duration and the user identification, and return the media asset information of the third video to the video on demand program on the display device.
  • the media asset information may include the playback address of the third video, so that the main thread can obtain the video stream of the third video from the playback address.
  • the media asset information may include the media asset identifier of the third video, so that the main thread may request the video stream corresponding to the media asset identifier from the server.
  • the main thread can generate a layer containing the second window and start the second player. , and then obtain the code stream of the third video from the server. After obtaining the code stream, play the content of the second player in the second window, that is, play the decoded image of the third video.
  • the second window can be located at the top of the first window.
  • a small window window is formed to form a picture-in-picture playback mode.
  • the volume of the second window can be smaller than the volume of the first window and greater than 0, so that the user can pay attention to the second window.
  • the first window and the second window may not form a picture-in-picture.
  • the first window may be adjusted to occupy the left half of the display screen, and the second window may be set to occupy the right half of the display screen. .
  • Step S102 If a window switching instruction is received before the second window is played for the preset duration, adjust the first video from the current progress of the first video to the second window to continue playing, and the The third video is adjusted from the current progress of the third video to the first window to continue playing.
  • the second window is played to the second time of the second video, the second window is cancelled, and all The first window is adjusted to continue playing from the current progress of the second video.
  • a window switching instruction can be issued to the video on demand program, and the main thread of the video on demand program can switch according to the window
  • the switching instruction switches the playback content of the second window to the playback content of the first window, switches the playback content of the first window to the playback content of the second window, and causes the first player to change the current content of the first video.
  • the progressed image is played in the second window, and the second player plays the currently progressed image of the third video in the first window, achieving the visual effect of switching the content of the two windows, wherein,
  • the second window continues to play the ending of the first video. After the ending of the first video is played, the second window automatically starts playing the opening of the second video.
  • the main thread can mute the second window.
  • the video on demand program Before receiving the window switching instruction, the video on demand program may control the volume of the second window to be smaller than the volume of the first window, for example, set the volume of the second window to be equal to the volume of the first window.
  • the user can notice that the third video is playing in the second window; after receiving the window switching instruction, the video on demand program can mute the second window so that the user can concentrate on practicing.
  • the main thread of the video on demand program can cancel the second window and change the playback of the first window.
  • the content is switched to the content of the first player, so that the second video resumes playing in the first window.
  • the main thread of the video on demand program can cancel the second window and close the second player.
  • the main thread of the video on demand program can cancel the second window and close the second player according to the window switching instruction. , and switches the playback content of the first window to the playback content of the first player.
  • the main thread of the video on demand program does not exchange the contents of the second window with the first window, but enlarges the second window and shrinks the first window. For example, displaying the second window in full screen, reducing the first window to a small window that is not full screen, and setting the small window at the top of the second window can also achieve the visual effect of switching the contents of the two windows.
  • the main thread can increase the volume of the second window and mute the first window.
  • the main thread of the video on demand program can close the second window and close the second player. And restore the first window to a full-screen window, and restore the volume of the first window to the volume before the second window was started.
  • the main thread of the video on demand program can close the second window and the second player according to the window switching instruction. , and restore the first window to a full-screen window, and restore the volume of the first window to the volume before the second window was started.
  • Step S103 If the window switching instruction is not received when the second window is played for a preset duration, cancel the second window.
  • the video on demand program can cancel the second window and close the second player so that the first window is no longer blocked by the second window, thereby no longer disturbing the user's viewing of the video in the first window.
  • the media asset serial broadcast method provided by the embodiment of the present application can promote users to actively exercise by playing videos prompting users to exercise during the ending and opening periods of two serial videos, and can reduce the symptoms caused by sitting for long periods of time. Symptoms of physical discomfort and make viewing the display more interesting and enhance the viewing experience.
  • Figure 7 also shows a schematic flow chart of a method for broadcasting media assets. As shown in Figure 7, the method includes the following steps:
  • Step S201 Receive the triggering instruction of the media asset control and enter the media asset details page.
  • the user can click a media asset control on the media asset recommendation page, and the main thread of the video on demand program on the display device can generate a trigger instruction for the media asset control, and request the media asset details page from the server according to the trigger instruction.
  • the interface data, and the media asset details page is displayed based on the interface data.
  • Step S202 Receive the diversity on-demand instruction and start the first window to play the diversity.
  • the media asset details page may display the episode controls corresponding to the multiple episodes.
  • the main thread of the on-demand program can generate an episode-on-demand instruction, start the first window and the first player according to the episode-on-demand instruction, and play the video code stream of the episode through the first window.
  • the episode being played can be called the first video.
  • the next episode of the episode may be called the second video.
  • Step S203 Calculate the playable duration of the third video.
  • the main thread of the video on demand program can calculate the playable duration of the third video before the first player plays to the end of the first video, for example, 50 seconds after the first player plays to the end of the first video. %, calculate the playable duration of the third video.
  • Step S204 Query the media asset data of the third video.
  • the main thread of the video on demand program can send a query request containing the playable duration and the user ID of the video on demand program login account to the server to query the media asset data of the third video.
  • the media asset data may include the playback address or media asset identification of the third video.
  • the third video is a video that the user has followed. If the server queries for a follow-up video whose video duration is less than or equal to the playable duration, it can send the media asset data of one of the follow-up videos to the display device. If it does not find a follow-up video whose video duration is less than or equal to the playable duration, it can , the media asset data of the follow-up video will not be returned to the display device.
  • the server obtains a follow-up video whose video duration is greater than or equal to the playable duration from all follow-up videos corresponding to the user ID, and then calculates the playback start time point startTime and the playback start time point of the follow-up video based on the playable duration.
  • the playback end time point endTime of the follow-up video enables the display device to play the video clips between the playback start time point startTime and the playback end time point endTime of the follow-up video.
  • the server obtains a video that the user has practiced on that day or a video that the user has practiced with for a number of times reaching a preset threshold within a preset period from all the training videos corresponding to the user ID.
  • Step S205 When the end of the video is about to be played, determine whether the media asset data of the third video has been received.
  • the main thread of the video on demand program may determine whether the media asset data of the third video has been received.
  • Step S206 If the media asset data of the third video is received, start the second window to play the third video.
  • the main thread of the video on demand program can start the second window and the second player, and start the second window from the third video. Extract the playback address from the media asset data, access the playback address to obtain the code stream data of the third video, and play the third video through the second window.
  • the second window is a small window that can be overlaid on the first window.
  • Step S207 Determine whether a window switching instruction is received within a preset time.
  • the main thread of the video on demand program can set a timeout task, and the timeout period of the timeout task can be set to 20 seconds. At some point within these 20 seconds, if the window If the window switching instruction is received, the timeout task will end at that moment. If the window switching instruction is not received, the timeout task will end after 20 seconds.
  • Step S208 If the window switching instruction is received within the preset time, switch the playback content in the second window to the first window for display.
  • the main thread of the video on demand program adjusts the first window to display the playback content of the second player.
  • Step S209 Switch the playback content in the first window to the second window for display.
  • the main thread of the video on demand program will also adjust the second window to display the playback content of the first player.
  • the main thread of the video on demand program can lower the volume of the second window, or directly adjust the volume of the second window to mute.
  • Step S210 When the title is about to be played, switch the playback content in the second window to the first window for display.
  • the main thread of the video on demand program switches the playback content of the second window to the first window for display.
  • the playback content of the second window can be switched to the first Window display.
  • Step S211 Cancel the second window.
  • the second window can be dismissed.
  • Step S212 When the timeout expires, cancel the second window.
  • the second window can be cancelled.
  • the playback content in the second window can be switched to the first window for display, and the second window can be cancelled.
  • the server can be provided with a terminal-oriented module, a film and television database, and a follow-up video library.
  • the terminal-oriented module is used to interact with the display device and other modules of the server (such as the film and television database and the training video library).
  • the terminal-oriented module can be provided with multiple interfaces with different functions, so that the display device can obtain different data through different interfaces.
  • the film and television database is provided with media asset data of a large number of film and television media assets such as TV series and movies.
  • the media asset data of each media asset may include media asset identification, detail page data and title and ending data, where the media asset identification It is a media asset ID.
  • the details page data can include media asset name, media asset duration, playback index table and playback address.
  • the title and tail data can include headLength (title duration), tailLength (end duration), media asset duration, title Duration and ending duration are both in seconds.
  • the film and television database and the training video database may also be collectively referred to as the media asset information database.
  • Steps S3001 and S3002 After the user clicks on a media asset control in Figure 5, the display device can obtain the media asset ID corresponding to the media asset control, generate a media asset details request including the media asset ID, and then send a request to the terminal.
  • the module's "video details query interface" /vod/media/detail sends the media asset details request.
  • the media asset corresponding to the media asset control clicked by the user can be called the target media asset.
  • the target media asset can be a media asset set including multiple episodes.
  • the media asset details request includes the media asset identification of the target media asset.
  • the media asset The identifier may be a media asset ID.
  • Step S3003 to step S3005 After receiving the media asset details request through the video details query interface, the terminal-oriented module can query the media asset information database for the media asset details data corresponding to the media asset ID and the title and ending data, and combine the media asset details data with The title and ending data is returned to the display device.
  • Step S3006 After receiving the media asset detail data and the title and ending data, the display device can display the media asset details page according to the media asset detail data.
  • the media asset details page can display multiple episode controls, and each episode control corresponds to one episode.
  • Steps S3007 and S3008 After the user clicks a diversity control on the media asset details page, the display device can generate an on-demand request corresponding to the diversity control and send the on-demand request to the terminal-oriented module.
  • the episode requested by the user can be called the first episode.
  • the first episode can be any episode except the last episode of the target media asset.
  • the first episode can also be called the first video.
  • the first episode can also be called the first video.
  • the next episode of one episode is the second episode, and the second episode can also be called the second video.
  • the on-demand request for the first episode may include a media asset identifier of the target media asset and a diversity identifier of the first episode, and the diversity identifier may be a diversity sequence number.
  • Steps S3009 to S3011 After the terminal-oriented module receives the on-demand request for the first episode, the media asset information library can obtain the video stream data of the first episode based on the media asset identifier and the episode identifier, and return the video of the first episode to the terminal-oriented module. stream data, and then the terminal-facing module returns the video stream data of the first episode to the display device.
  • Step S3012 The display device can start the first player to parse the video stream data of the first episode, and then play the first episode through the first window.
  • FIG. 10 a schematic diagram of the playback interface of the first episode according to some embodiments is shown. As shown in FIG. 10 , for example, the playback duration of the first episode is 46 minutes.
  • Step S3013 After starting the first window, the display device monitors the playback progress of the first window in real time.
  • the playback progress is the preset progress, for example, when the playback progress is 50%, that is, when the 23rd minute has been played, or there are 10 seconds left before the end of the first episode
  • the recommendation process of the follow-up video is started.
  • the recommendation process of following training videos can be used to obtain information about following training videos from the server.
  • the main thread of the video on demand program can synchronize the playback progress of the first window with the recommendation process of the follow-up video in real time, so that the recommendation process of the follow-up video can start and cancel the second window and the first window according to the playback progress of the first window. Actions such as switching the content played in the second window.
  • the recommendation process of the follow-up video may not be set, and the main thread of the display device obtains the information about the follow-up video from the server and performs the startup and cancellation of the second window, and the playback of the content in the first window and the second window. switch.
  • Step S3014 After the recommendation process of the follow-up video is started, the playback duration of the first episode can be obtained from the details page data of the target media asset. If the playback duration is less than the threshold duration, such as 5 minutes, the recommendation process of the follow-up video will automatically End, to avoid playing the follow-up video when the first episode's playback time is short, which would have a negative impact on the user's continuous viewing of the first and second episodes. If the playback time is longer than 5 minutes, you can calculate the ending duration of the first episode and the opening duration of the second episode, calculate the sum of the ending duration and the opening duration, and then subtract an offset of 5 seconds to get the length of the follow-up video timeLength (playable duration). If the playable duration is greater than 0, the subsequent logic of the follow-up video recommendation process will continue to be executed. If the playable duration is less than or equal to 0, the follow-up video recommendation process will automatically end.
  • the threshold duration such as 5 minutes
  • the recommendation process of the follow-up video will automatically End, to avoid
  • Step S3015 If the playable duration is greater than 0, the recommendation process of the follow-up video can generate a query request for the follow-up video.
  • the query request for the follow-up video includes a user ID and a playable duration, where the user ID can be customerId.
  • the recommendation process of the follow-up video can send the query request for the follow-up video to the "Fitness Follow-Up Recommended Clips" query interface /vod/media/gym/recom in the follow-up video library to obtain Follow the training video information.
  • Steps S3016 to S3018 The terminal-oriented module can query the playback record of the follow-up video corresponding to the user ID, obtain the follow-up video that the user has practiced the most in the recent period based on the playback record, and calculate the playback time based on the display device to play the video.
  • the terminal-oriented module can query the playback record of the follow-up video corresponding to the user ID, obtain the follow-up video that the user has practiced the most in the recent period based on the playback record, and calculate the playback time based on the display device to play the video.
  • the difference between the starting point and the end point is the same as the playable duration.
  • the starting point can be called the playback start time point startTime, which can be the 0th second of the follow-up video.
  • the end point can be called the playback end time point endTime.
  • the end point can be based on The sum of the starting point and playable duration is obtained.
  • the most recent period can be the last week or the current day.
  • the media asset data of the follow-up video includes the media asset identifier gymVideoId, playback start time point startTime, and playback end time point endTime of the follow-up video.
  • the terminal-oriented module can query the playback records of the follow-up videos corresponding to all users, thereby obtaining the most popular follow-up videos in the recent period, and calculate the starting point for the display device to play the follow-up media assets based on the playable duration. and the end point, and the query results containing the media asset data of the training video are sent to the display device, where the latest period of time can be the last week or the current day.
  • the terminal-oriented module can query follow-up videos whose duration and playable duration are within a preset difference range, and filter out a follow-up video to be issued from the queried follow-up videos based on user interest tags.
  • video calculate the starting point and end point of the display device playing the follow-up media assets to be distributed based on the playable duration, and deliver the query results containing the media asset data of the follow-up videos to be distributed to the display device, where the user Interest tags can be generated based on videos that users have followed.
  • the terminal-oriented module if the terminal-oriented module cannot query the follow-up video, it will return the query result of the media asset data that does not include the follow-up video to the display device.
  • the recommendation process of the follow-up video after receiving the query result, will end the recommendation process of the follow-up video if the query result does not contain the media asset data of the follow-up video.
  • the recommendation process of the follow-up video continues to execute the recommendation process of the follow-up video if the query result contains the media asset data of the follow-up video.
  • step S4001 and step S4002 the user inputs a window switching instruction. If the query result contains the media asset data of the follow-up video, the recommendation process of the follow-up video will be directed to the terminal when the end of the first episode is about to be played.
  • the module sends an on-demand request for the training video. For example, when the playback reaches 3 seconds before the end of the first episode, an on-demand request for the follow-up video is generated and sent to the terminal-oriented module.
  • the on-demand request for a follow-up video includes the gymVideoId, the media asset identifier of the follow-up video, the playback start time point startTime, and the playback end time point endTime.
  • Steps S4003 and S4004 After receiving the on-demand request for the follow-up video, the terminal-oriented module queries the video stream data between the playback start time point startTime and the playback end time point endTime corresponding to the media asset identifier gymVideoId from the follow-up video library, and This video stream data is returned to the display device.
  • Steps S4005 and S4006 After receiving the video stream data of the follow-up video, the recommendation process of the follow-up video starts the second window to play the follow-up video based on the video stream data.
  • the second window may be a small window located in the upper right corner of the first window, blocking part of the display screen of the first window.
  • the volume of the second window may be smaller than the volume of the first window to reduce interference with the playback effect of the first window.
  • the second window in Figure 12 displays a prompt to press the menu key to follow the practice in full screen, so as to prompt the user to press the menu key to display the second window in full screen.
  • the volume of the second window may be positively correlated with the volume of the first window to prevent the user from ignoring the sound of the second window due to the excessive volume of the first window.
  • Step S4007 When starting the second window of the recommendation process of following the training video, a timeout task can be started.
  • the timeout period corresponding to the timeout task can be 20 seconds.
  • Monitored user operations may include inputting a window switching instruction. If within the timeout period, it is detected that the user operation is to enter a window switching command, the system will respond to the command and end the timeout task.
  • the user inputs the window switching instruction by pressing the confirmation key or the menu key of the remote control.
  • Steps S4008 and S4009 The response of the recommendation process of the follow-up video to the switching window instruction is: adjust the first window to display the playback content of the second player, and adjust the second window to display the playback content of the first player. .
  • the above two steps can be executed at the same time or in sequence. When executed in sequence, the above two steps are not in any order. Adjusting the first window to display the playback content of the second player, and adjusting the second window to display the playback content of the first player realizes the visual exchange of the playback content of the two windows. After the volume of the second window is turned down, the audio of the second window becomes the background music of the first window. Alternatively, the volume of the first window can be turned down to mute to reduce the playback effect on the second window. interference.
  • the user when the first window plays the third video, the user can follow along according to the playing content of the first window.
  • the second window in FIG. 13 displays a prompt to press the menu key to continue watching the video, so as to prompt the user to press the menu key to exchange the playing content of the second window with the playing content of the first window.
  • the menu key can also be replaced by a return key or other keys.
  • the display device switches the playback content of the first window to the playback content of the second player, cancels the second window, and ends the recommendation process of the follow-up video.
  • Step S4010 When the second window plays the first episode, and after playing the end of the first episode, the main thread of the display device can send an on-demand request for the second episode to the terminal-oriented module, or the display device can also send an on-demand request for the second episode to the terminal-oriented module.
  • the display device can also send an on-demand request for the second episode to the terminal-oriented module.
  • an on-demand request for the second episode is sent to the terminal-oriented module.
  • the on-demand request for the second episode may include the media asset identifier of the target media asset and the episode sequence number corresponding to the second episode.
  • Steps S4011 and S4012 After receiving the on-demand request for the second episode, the terminal-oriented module may obtain the video stream data of the second episode from the media asset information library and return the video stream data of the second episode to the display device.
  • Steps S4013 and S4014 After receiving the video stream data of the second episode, the main thread of the display device can play the video stream data of the second episode after the end of the first episode is played.
  • Step S4015 When the title of the second episode is about to be played, the playback content of the second window and the first window can be exchanged.
  • the opening of the second episode may not be played. Finished, at this time, the playback content of the second window and the first window can be exchanged, and the second window can be cancelled.
  • Step S4016 When playing the feature film of the second episode, the second window is canceled and no longer blocks the display content of the first window. See the window shown in Figure 14.
  • step S40071 is executed: if no user operation is received within the timeout period, the second window is cancelled.
  • step S4017 is executed: playing the second episode in the first window.
  • the embodiment of the present application starts playing the third video prompting the user to exercise through the second window when the first window plays the end of the first video, which is beneficial to promoting the user to perform physical exercise, and the third video can be sustainable Playing until the end of the second video's title is helpful to ensure the user's exercise time; the user can use the window switching command to switch the third video in the second window to the first window for display, or do not perform the operation to make the second window display in the first window. Automatically exiting after playing for a period of time can meet the different needs of users for physical exercise and improve the user experience of watching continuous media resources.
  • the above media asset streaming method is also applicable on the above terminal equipment.
  • people can also cast the video on the above terminal device to a display device such as a television for viewing.
  • the aspect ratios of TV and mobile phone screens are generally very different, and mobile phones can capture videos in various postures such as horizontal screen recording and vertical screen recording. Therefore, the projected videos sent by mobile phones are often different from those used for playing projections on TVs.
  • the video playback window of the screen video does not match, which leads to problems such as incomplete video images and imbalanced proportions, seriously affecting the user experience. Therefore, when the TV receives the screen projection video stream sent by the mobile phone, how to adjust the screen projection video stream so that the screen projection video stream can adapt to the video playback window is an urgent problem to be solved.
  • the controller 250 displays a follow-up interface on the display 260 in response to the received trigger instruction, wherein the follow-up interface includes a first video playback window and a second video playback window (also called (as a first window and a second window), the second video window is used to play the fitness video obtained from the server;
  • the follow-up interface includes a first video playback window and a second video playback window (also called (as a first window and a second window), the second video window is used to play the fitness video obtained from the server;
  • the controller 250 when the controller 250 receives the first video stream generated by the terminal device based on its video recording device sent by the terminal device through the communicator 220, the controller 250 uses the identification information, video playback parameters and The size of the first video stream is used to obtain a scaling ratio, the first video stream is scaled according to the scaling ratio to obtain a second video stream, and the layout is obtained according to the video playback parameters and the size of the second video stream.
  • Offset parameter offset the second video stream based on the layout offset parameter, and control the display 260 to play the offset second video stream in the first video window.
  • the identification information includes: a first gesture identification or a second gesture identification; when the identification information includes a first gesture identification, the identification information is used to identify the terminal device to record the first gesture.
  • the posture when recording the video corresponding to the video stream is the portrait posture; when the identification information includes a second posture identification, the identification information is used to identify the posture when the terminal device records the video corresponding to the first video stream. Horizontal posture.
  • the video playback parameters corresponding to the first gesture identification and the video playback parameters corresponding to the second gesture identification are different.
  • the controller 250 adjusts the posture of the terminal device according to the scaling ratio.
  • the first video stream is scaled to obtain the second video stream, and the layout offset parameter is obtained according to the video playback parameter and the size of the second video stream, including: the controller 250 according to the width of the first video stream. and the target width to obtain the first scaling ratio; the target width is the width of the first video playback window or the width of the preset video stream size;
  • the controller 250 offsets the second video stream based on the layout offset parameter, including the controller offsets the second video stream in a height direction based on the first layout offset parameter. shift.
  • the first scaling ratio is the ratio of the target width to the width of the first video stream
  • the first layout offset parameter is the height of the second video stream to the first video playback window. half the difference in height.
  • the identification information when the identification information is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a horizontal screen posture,
  • the controller 250 obtains a scaling ratio according to the identification information, video playback parameters and the size of the first video stream, and scales the first video stream according to the scaling ratio to obtain a second video stream, including:
  • the controller 250 obtains the second scaling ratio according to the height of the first video stream and the target height; the target height is the height of the first video playback window or the height in the preset video stream size; using the The second scaling ratio scales the first video stream to obtain the second video stream;
  • the controller 250 obtains the layout offset parameter according to the video playback parameter and the size of the second video stream, including: the controller 250 obtains the layout offset parameter according to the width of the second video stream and the width of the first video playback window. , obtain a second layout offset parameter; and offset the second video stream in the width direction based on the second layout offset parameter.
  • the second scaling ratio is the ratio of the target height to the height of the first video stream; the second layout offset parameter is the width of the second video stream and the first video play window half the difference in width.
  • the communicator 250 offsets the second video stream based on the layout offset parameter, and controls the display to play the offset second video in the first video window.
  • the controller 250 is also configured to:
  • a third zoom ratio is obtained according to the size of the selected area and the size of the first video playback window; the trimming and playback instruction carries the size of the selected area and the size of the selected area.
  • the position information of a certain area is used to indicate video playback based on the video content of the first video stream in the selected area; the third scaling ratio is the smaller of the first ratio and the second ratio,
  • the first ratio is the ratio of the height of the first video playback window to the height of the selected area
  • the second ratio is the ratio of the width of the first video playback window to the width of the selected area. ratio;
  • Video playback is performed in the first video playback window based on the third video stream, and the third video stream is offset in the width direction based on the third layout offset parameter. Based on the fourth The layout offset parameter offsets the third video stream in the height direction, and controls the display to play the offset third video stream in the first video window.
  • the controller 250 obtains a third layout bias according to the third zoom ratio, the width of the first video playback window, the position information of the selected area, and the width of the selected area. Shift parameters, including:
  • the controller 250 calculates the third layout offset parameter through the following formula 1:
  • CLIP 3 (X+select_w/2)*R3-WL/2;
  • the controller 250 obtains a fourth layout offset parameter according to the third zoom ratio, the height of the first video playback window, the position information of the selected area, and the height of the selected area, including:
  • the controller 250 calculates the third layout offset parameter through the following formula 2:
  • CLIP 4 (Y+select_h/2)*R3-HL/2;
  • CLIP 3 is the third layout offset parameter
  • CLIP 4 is the fourth layout offset parameter
  • X is the distance from the left edge of the selected area to the left edge of the first video stream.
  • Y is the distance from the top edge of the selected area to the top edge of the first video stream
  • select_w/2 and select_h/2 are the width and height of the selected area respectively
  • R3 is the Three scaling ratios
  • WL and HL are the width and height of the first video playback window respectively.
  • FIG 16 is a schematic flowchart of a screen casting method provided according to some embodiments of the present application. As shown in Figure 16, the screen casting method provided by embodiments of the present application includes the following steps:
  • the first video stream is a video stream obtained through video collection by a video recording device of the terminal device, and carries an identifier used to identify the posture of the terminal device when recording the video corresponding to the first video stream. information.
  • the first video stream may be a video stream that is recorded in real time by the terminal device through a video recording device and sent to the display device. In other embodiments, the first video stream may also be a video stream sent to the display device when the terminal device displays the pre-recorded video on the screen.
  • the terminal device in the embodiment of the present application may be a mobile phone, and the video recording device of the terminal device may be a front/rear camera of the mobile phone.
  • the trigger instruction can be received first, and the monitor displays a follow-up training interface, where the follow-up training interface includes a first video playback window and a second video playback window.
  • the window is used to play fitness videos obtained from the server.
  • the triggering instruction may be triggered after the user performs an operation on the terminal device to trigger the display of the follow-up training interface.
  • the triggering instruction may also be an instruction received by the display device from another control device to trigger the display of the follow-up training interface.
  • the video playback parameters include the size of the first video playback window used to play the first video stream and/or the preset video stream size.
  • the scaling ratio may be obtained only based on the identification information, the size of the first video playback window, and the size of the first video stream, so that the size of the scaled first video stream is the same as that of the first video playback window. Adapt to the size of the window.
  • the scaling ratio may be obtained only based on the identification information, the preset video stream size, and the size of the first video stream, thereby scaling the first video stream to a video stream of the preset video stream size.
  • the scaling ratio can be obtained according to the identification information, the size of the first video playback window, the preset video stream size, and the size of the first video stream, so that the size of the scaled first video stream While adapting to the size of the first video playback window, it is more consistent with the aspect ratio of the original video.
  • the size of the first video playback window is 629 ⁇ 629.
  • the default video stream size can be set to 450 ⁇ 629.
  • the size of the first video playback window is 629 ⁇ 629.
  • the default video stream size can be set to 629 ⁇ 450.
  • the identification information includes: a first posture identification or a second posture identification.
  • the identification information includes a first posture identification
  • the identification information is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a portrait posture
  • the identification information includes a second posture identification
  • the identification information is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a horizontal screen posture.
  • the video playback parameters corresponding to the first gesture identification and the video playback parameters corresponding to the second gesture identification are different.
  • the video playback parameters include the size of the first video playback window for playing the first video stream and/or the preset video stream size.
  • different video playback parameters can be set for different gesture identifiers, That is to say, different gestures of the terminal device when recording the video corresponding to the first video stream may correspond to different sizes of the first video playback window and/or preset video stream sizes.
  • the identification information when the identification information includes a first posture identification, it indicates that the posture of the terminal device when recording the video corresponding to the first video stream is a horizontal screen posture.
  • the corresponding video playback parameters may be: The size of the first video stream is 1920 ⁇ 1080, and the size of the first video playback window is 626 ⁇ 629.
  • the identification information when the identification information includes a second posture identification, it indicates that the posture of the terminal device when recording the video corresponding to the first video stream is a portrait posture.
  • the corresponding video playback parameters may be: The size of the first video stream is 1080 ⁇ 1920, and the size of the first video playback window is 626 ⁇ 629.
  • the size of the first video stream is 1080 ⁇ 1920, and the scaling ratio is R, then the size of the second video stream is 1080*R ⁇ 1920*R.
  • the length or width of the first video stream can be adapted to the video playback parameters.
  • the length or width of the second video stream can be adapted to the video playback parameters, but the other of the length and width of the second video stream needs to be adjusted to adjust the length and width of the second video stream. All are compatible with video playback parameters.
  • a way to adapt the other one of the length and width of the second video stream to the video playback parameters is to adjust the second video stream between the length and the width when playing the video according to the second video stream.
  • the other one of the widths is offset in the direction. Therefore, in the embodiment of the present application, it is necessary to first obtain the layout offset parameter according to the video playback parameters and the size of the second video stream, so that subsequent playback can be based on the second video stream. Layout offset during video playback.
  • offsetting the second video stream based on the layout offset parameter may include: adjusting the origin of the coordinate system of the second video stream based on the layout parameter to offset the second video stream. offset.
  • offsetting the second video stream based on the layout offset parameter may also include: calculating each edge (top edge, bottom edge, left edge, etc.) of the second video stream based on layout parameter adjustment. edge and right edge) of the first video playback window, and then offset the second video stream according to the distance between the edges of the first video playback window corresponding to each edge of the second video stream.
  • the screen projection method when receiving the first video stream generated by the video recording device of the terminal device and sent by the receiving terminal device, will first play the video according to the identification information carried by the first video stream. parameters and the size of the first video stream to obtain the scaling ratio, then scale the first video stream according to the scaling ratio to obtain the second video stream, and obtain the second video stream according to the video playback parameters and the size of the second video stream.
  • the size obtains the layout offset parameter, and finally performs video playback in the first video playback window based on the second video stream, and offsets the second video stream based on the layout offset parameter.
  • the embodiment of the present application can zoom the first video stream according to the posture of the terminal device when recording the video corresponding to the first video stream, so that the obtained second video stream is in It is adapted to the video playback parameters in the horizontal or vertical direction; because the embodiment of the present application will also obtain the layout offset parameter according to the video playback parameters and the size of the second video stream, and based on the layout when playing the video The offset parameter offsets the second video stream, so this embodiment of the present application can make the second video stream adapt to the video playback parameters in another direction.
  • the example of this application can adapt the size of the screen projection video stream to the video playback window and/or the preset video stream size for playing the screen projection video stream in both horizontal and vertical directions.
  • another screen projection method provided by the embodiment of the present application includes:
  • the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries a message indicating that the posture of the terminal device when recording the video corresponding to the first video stream is vertical. Identification information of screen posture;
  • the display device 71 is a television and the terminal device 72 is a mobile phone.
  • the posture of the terminal device 72 when recording the video corresponding to the first video stream is a portrait posture.
  • the width refers to the number of pixels included in the pixel row (horizontally), and the height refers to the number of pixels included in the pixel column (vertical).
  • the size of the first video stream is the same as the resolution of the screen of the terminal device, for example: the screen of the terminal device
  • the resolution is 1080 ⁇ 1920
  • the size of the first video stream is 1080 ⁇ 1920.
  • the first scaling ratio is a ratio of a width of the first video playback window to a width of the first video stream.
  • the first scaling ratio is R1
  • the size of the first video stream is W1 ⁇ H1
  • the size of the first video playback window is WL ⁇ HL
  • the first scaling ratio R1 629/1080.
  • the size of the first video stream is 1080 ⁇ 1920
  • the size of the first video playback window is 626 ⁇ 629
  • the first scaling ratio R1 629/1080, then the first scaling ratio R1 is used.
  • the size of the second video stream obtained by scaling the first video stream by a scaling ratio is 629 ⁇ 1118.
  • the width of the second video stream has adapted to the first video playback window.
  • the first layout offset parameter is half of the difference between the height of the second video stream and the height of the first video playback window.
  • the first layout offset parameter is CLIP 1
  • the size of the second video stream is W2 ⁇ H2
  • the size of the first video playback window is WL ⁇ HL
  • the first layout offset parameter CLIP 1 1/2 ( 1118-629).
  • the screen projection method provided by the above embodiment is explained by taking the size of the first video stream as 1080 ⁇ 1920 and the size of the first video playback window 800 as 629 ⁇ 629 as an example. .
  • a first scaling ratio 629/1080 is obtained according to the width 1080 of the first video stream 81 and the width 629 of the first video playback window, and then the first video is scaled according to the first scaling ratio 629/1080.
  • the stream 81 is zoomed to obtain the second video stream 82.
  • the size of the second video stream 82 is 629 ⁇ 1118.
  • another screen projection method provided by the embodiment of the present application includes:
  • the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries a message indicating that the posture of the terminal device when recording the video corresponding to the first video stream is vertical. Identification information of screen posture;
  • the first scaling ratio is a ratio of a width in the preset video stream size to a width of the first video stream.
  • the first scaling ratio is R1
  • the size of the first video stream is W1 ⁇ H1
  • the preset video stream size is WS ⁇ HS
  • the first scaling ratio R1 450/1080.
  • the size of the first video stream is 1080 ⁇ 1920
  • the default video stream size is 450 ⁇ 629
  • the first scaling ratio R1 450/1080, then the first scaling is used
  • the size of the second video stream obtained by scaling the first video stream is 450 ⁇ 800.
  • the width of the second video stream is the same as the width of the preset video playback stream.
  • the first layout offset parameter is half of the difference between the height of the second video stream and the height of the first video playback window.
  • the first layout offset parameter is CLIP 1
  • the size of the second video stream is W2 ⁇ H2
  • the size of the first video playback window is WL ⁇ HL
  • the first layout offset parameter CLIP 1 1/2 ( 800-629).
  • the size of the first video stream is 1080 ⁇ 1920
  • the size of the first video playback window 1000 is 629 ⁇ 629
  • the preset video stream size is 450 ⁇ 629.
  • An example is provided to illustrate the screen projection method provided in the above embodiment.
  • a first scaling ratio 450/1080 is obtained according to the width 1080 of the first video stream 101 and the width 450 of the first video playback window, and then the first video is scaled according to the first scaling ratio 450/1080.
  • the stream 101 is zoomed to obtain the second video stream 102.
  • the size of the second video stream 102 is 450 ⁇ 800.
  • a layout offset parameter of 85 is used to achieve the display effect shown in Figure 21.
  • the aspect ratio of the video finally displayed in the screen projection method shown in Figure 20 is closer to the aspect ratio of the screen of the terminal device in the portrait mode, so the screen projection image of the terminal device can be better displayed.
  • another screen projection method provided by the embodiment of the present application includes:
  • the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries a message indicating that the posture of the terminal device when recording the video corresponding to the first video stream is horizontal. Identification information of screen posture;
  • the display device 121 is a television and the terminal device 122 is a mobile phone.
  • the posture of the terminal device 122 when recording the video corresponding to the first video stream is a horizontal screen posture.
  • the width here refers to the number of pixels contained in the pixel row (horizontally), and the height refers to the number of pixels contained in the pixel column (vertical).
  • the first scaling ratio is a ratio of a height of the first video playback window to a height of the first video stream.
  • the second scaling ratio is R2
  • the size of the first video stream is W1 ⁇ H1
  • the size of the first video playback window is WL ⁇ HL
  • the first scaling ratio R2 629/1080.
  • the size of the first video stream is 1920 ⁇ 1080
  • the size of the first video playback window is 626 ⁇ 629
  • the size of the second video stream obtained by scaling the first video stream by a scaling ratio is 1118 ⁇ 629.
  • the height of the second video stream has adapted to the first video playback window.
  • the second layout offset parameter is half of the difference between the width of the second video stream and the width of the first video playback window.
  • the second layout offset parameter is CLIP 2
  • the size of the second video stream is W2 ⁇ H2
  • the size of the first video playback window is WL ⁇ HL
  • the second layout offset parameter CLIP 2 1/2 ( 1118-629).
  • the screen projection method provided by the above embodiment is explained by taking the size of the first video stream as 1920 ⁇ 1080 and the size of the first video playback window 1300 as 629 ⁇ 629 as an example. .
  • a first scaling ratio 629/1080 is obtained according to the height 1080 of the first video stream 131 and the width 629 of the first video playback window, and then the first video is scaled according to the first scaling ratio 629/1080.
  • the stream 131 is zoomed to obtain the second video stream 132.
  • the size of the second video stream 132 is 1118 ⁇ 629.
  • another screencasting method provided by the embodiment of the present application includes:
  • the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries a message indicating that the posture of the terminal device when recording the video corresponding to the first video stream is horizontal. Identification information of screen posture;
  • the second scaling ratio is a ratio of a height in the preset video stream size to a height of the first video stream.
  • the second scaling ratio is R2
  • the size of the first video stream is W1 ⁇ H1
  • the preset video stream size is WS ⁇ HS
  • the first scaling ratio R1 450/1080.
  • the size of the first video stream is 1920 ⁇ 1080
  • the default video stream size is 450 ⁇ 629
  • the second scaling ratio R2 450/1080, then the second scaling is used
  • the size of the second video stream obtained by scaling the first video stream is 800 ⁇ 450.
  • the height of the second video stream is the same as the height of the preset video playback stream.
  • the second layout offset parameter is half of the difference between the width of the second video stream and the width of the first video playback window.
  • the second layout offset parameter is CLIP 2
  • the size of the second video stream is W2 ⁇ H2
  • the size of the first video playback window is WL ⁇ HL
  • the second layout offset parameter CLIP 2 1/2 ( 800-629).
  • the size of the first video stream is 1920 ⁇ 1080
  • the size of the first video playback window 1500 is 629 ⁇ 629
  • the preset video stream size is 450 ⁇ 629.
  • An example is provided to illustrate the screen projection method provided in the above embodiment.
  • a first scaling ratio 450/1080 is obtained according to the height 1080 of the first video stream 151 and the height 450 of the first video playback window, and then the first video is scaled according to the first scaling ratio 450/1080.
  • the stream 151 is zoomed to obtain the second video stream 152.
  • the size of the second video stream 152 is 800 ⁇ 450.
  • a layout offset parameter of 85 is used to achieve the display effect shown in Figure 26.
  • the aspect ratio of the video finally displayed in the screen projection method shown in Figure 27 is closer to the aspect ratio of the screen of the terminal device in the horizontal screen state, so the projection screen of the terminal device can be better displayed.
  • a screen projection method provided by another embodiment of the present application includes:
  • the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries an identifier used to identify the posture of the terminal device when recording the video corresponding to the first video stream. information.
  • the first video stream sent by the subsequently received terminal device can also be as shown in Figure 27 method for processing and display.
  • the trimming and playback instruction carries the size of the selected area and the position information of the selected area, and is used to instruct video playback based on the video content of the first video stream in the selected area.
  • the display device 171 is a television and the terminal device 172 is a mobile phone.
  • the terminal device 172 determines the selected area 1700 in response to the user operation, and sends a trimming playback instruction to the display device 171 for instructing video playback based on the video content of the first video stream in the selected area.
  • the size of the selected area and the selected area can be characterized by the position coordinates (x1, y1) of the upper right vertex of the selected area and the position coordinates (x2, y2) of the lower left vertex of the selected area. Location information for the region.
  • the third scaling ratio is the smaller of the first ratio and the second ratio
  • the first ratio is the ratio of the height of the first video playback window to the height of the selected area
  • the second ratio is the ratio of the width of the first video playback window to the width of the selected area.
  • the size of the selected area is select_w ⁇ select_h
  • the size of the first video playback window is 629 ⁇ 629
  • the third scaling ratio is R3, then there is:
  • the third scaling ratio R3 629/360.
  • the third scaling ratio R3 629/256.
  • the size of the first video stream is 1920 ⁇ 1080
  • the size of the first video playback window is 629 ⁇ 629
  • the size of the selected area is 480 ⁇ 270
  • the size of the third The scaling ratio R3 629/480
  • the size of the third video stream obtained by scaling the first video stream using the third scaling ratio is 2516 ⁇ 1415.
  • the controller is specifically configured to calculate the third layout offset parameter through the following formula 1, where the formula 1 is:
  • CLIP 3 is the third layout offset parameter
  • X is the distance from the left edge of the selected area to the left edge of the first video stream
  • select_w/2 is the width of the selected area
  • R3 is the third scaling ratio
  • WL is the width of the first video playback window.
  • the controller is specifically configured to calculate the fourth layout offset parameter through the following formula 2:
  • the fourth layout offset parameter is CLIP 4
  • the size of the third video stream is W3 ⁇ H3
  • the size of the first video playback window is WL ⁇ HL
  • CLIP 4 is the fourth layout offset parameter
  • Y is the distance from the top edge of the selected area to the top edge of the first video stream
  • select_h/2 is the height of the selected area
  • R3 is the third scaling ratio
  • HL is the height of the first video playback window.
  • the second video stream is offset in the width direction based on the third layout offset parameter
  • the third video stream is offset in the height direction based on the fourth layout offset parameter.
  • Offsetting may include: adjusting a coordinate system origin of the third video stream based on a third layout offset parameter and the fourth layout offset parameter to offset the third video stream.
  • offsetting the second video stream based on the layout offset parameter may also include: calculating each edge (top edge, bottom edge, left edge, etc.) of the third video stream based on layout parameter adjustment. edge and right edge) of the first video playback window, and then offset the third video stream according to the distance between the edges of the first video playback window corresponding to each edge of the second video stream.
  • the size of the first video stream is 1920 ⁇ 1080
  • the size of the first video playback window is 629 ⁇ 629
  • the size of the selected area is 480 ⁇ 270.
  • the distance from the left edge of the selected area to the left edge of the first video stream is 1000
  • the distance from the top edge of the selected area to the top edge of the first video stream is 400.
  • the third scaling ratio is determined to be 629/480.
  • the first video stream 181 is scaled according to the third scaling ratio to obtain the third video stream 182.
  • the size of the third video stream is 2516 ⁇ 1415, and then the first video is played according to the third scaling ratio.
  • the width of the window, the position information of the selected area, and the width of the selected area are used to obtain the third layout offset parameter 1310, and according to the third scaling ratio, the height of the first video playback window, the The position information of the selected area and the height of the selected area are obtained to obtain the fourth layout offset parameter 386.
  • video playback is performed in the first video playback window 1800 based on the third video stream 182, and the The third video stream is offset to the left by the third layout offset parameter 1310 and upward by the fourth layout offset parameter 386 to achieve the display effect shown in FIG. 29 .
  • the screen casting method provided by the embodiment of the present application further includes: receiving a second video stream sent by the server; and performing video playback in the second video playback window based on the second video stream.
  • the scene construction includes a fitness video server 191, a display device 192 and a terminal device 193.
  • the display device 192 can obtain the fitness video from the fitness video server 191 and play it in the second video playback window 1922; the user can watch the fitness video played by the display device 192 and follow the fitness video for fitness training; the terminal device 193 can record through the video
  • the device performs video recording to obtain the first video stream, and sends the first video stream to the display device 192.
  • the screen projection method provided by the embodiment of the present application is used.
  • a video playback window 1921 is used to play the screencast video.
  • embodiments of the present application also provide an electronic device, including: a memory and a processor, the memory is used to store a computer program; the processor is used to cause the electronic device to Implement the screen projection method described in any of the above embodiments.
  • embodiments of the present application provide a computer-readable storage medium.
  • a computer program is stored on the computer-readable storage medium.
  • the computing device implements The screen projection method described in any of the above embodiments.
  • embodiments of the present application provide a computer program product.
  • the computer program product When the computer program product is run on a computer, the computer implements the investment described in the second aspect or any embodiment of the second aspect. screen method.

Abstract

The present application provides a display device, a server, a media resource continuous playback method, and a screen mirroring method. The display device comprises a display and a controller connected to the display. The controller is configured such that: the display displays an exercise follow-along interface, wherein the exercise follow-along interface comprises a first window and a second window, the first window is used for playing a first video, and the second window is used for playing a third video obtained from the server.

Description

显示设备、服务器、媒资连播方法及投屏方法Display device, server, media asset streaming method and screencasting method
本申请要求2022年3月30日提交的申请号为202210334121.4和2022年6月27日提交的申请号为202210743842.0的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This application claims priority from Chinese patent applications with application number 202210334121.4 filed on March 30, 2022 and application number 202210743842.0 filed on June 27, 2022, the entire contents of which are incorporated into this disclosure by reference.
技术领域Technical field
本申请涉及显示设备技术领域,尤其涉及一种显示设备、服务器、媒资连播方法及投屏方法。The present application relates to the technical field of display devices, and in particular, to a display device, a server, a media asset streaming method, and a screen projection method.
背景技术Background technique
智能电视是人们观看电视剧的重要显示设备。相关技术中,智能电视上的视频播放器具有连播功能和跳过片头片尾的功能。连播功能开启后,视频播放器在播放完一集电视剧时会自动播放下一集电视剧;跳过片头片尾功能开启后,视频播放器不播放每集电视剧的片头和片尾。视频播放器默认开启连播功能和跳过片头片尾功能。然而,由于人们在观看电视剧时通常为坐立状态,因此,连续观看多集电视剧后,人们容易感到疲惫,不利于人们的身体健康。Smart TV is an important display device for people to watch TV series. In related technology, the video player on the smart TV has a continuous broadcast function and a function of skipping the beginning and end of the video. When the continuous broadcast function is turned on, the video player will automatically play the next episode of the TV series after playing one episode; when the skip opening and ending function is turned on, the video player will not play the opening and ending of each episode of the TV series. The video player has the continuous broadcast function and the skip opening and ending functions enabled by default. However, since people usually sit and stand when watching TV series, people tend to feel tired after watching multiple episodes of TV series continuously, which is not good for people's health.
发明内容Contents of the invention
本申请一些实施例提供了一种显示设备,该显示设备包括:显示器;控制器,与所述显示器连接,所述控制器被配置为:所述显示器显示跟练界面,其中,所述跟练界面包括第一窗口和第二窗口,所述第一窗口用于播放第一视频,所述第二窗口用于播放从服务器获取的第三视频。Some embodiments of the present application provide a display device. The display device includes: a display; and a controller connected to the display. The controller is configured to: the display displays a follow-up training interface, wherein the follow-up training interface The interface includes a first window and a second window, the first window is used to play the first video, and the second window is used to play the third video obtained from the server.
本申请一些实施例提供了一种服务器,该服务器被配置为:接收显示设备在播放第一视频时发送的查询请求,所述查询请求包括用户标识和可播放时长;响应于所述查询请求,从跟练视频库中获取所述用户标识对应的第三视频;根据所述可播放时长计算所述第三视频的播放开始时间点和播放结束时间点;向所述显示设备发送包含所述第三视频的媒资标识、播放开始时间点和播放结束时间点的第三视频的媒资信息,使所述显示设备在距离所述第一视频结束前的第一时间开始至播放第二视频的第二时间内还播放所述第三视频在所述播放开始时间点和播放结束时间点之间的视频片段,其中,所述第二视频为所述显示设备的播放索引表中所述第一视频对应项目的下一个项目对应的视频,所述第三视频为提示用户进行运动的视频。Some embodiments of the present application provide a server, which is configured to: receive a query request sent by the display device when playing the first video, where the query request includes a user identification and playable duration; in response to the query request, Obtain the third video corresponding to the user identification from the follow-up video library; calculate the playback start time point and playback end time point of the third video according to the playable duration; send the third video containing the playback time to the display device. The media asset identification of the three videos, the playback start time point, and the media asset information of the third video at the playback end time point enable the display device to play the second video from the first time before the end of the first video. The video clip of the third video between the playback start time point and the playback end time point is also played within the second time, wherein the second video is the first video clip in the playback index table of the display device. The video corresponds to the video corresponding to the next item of the item, and the third video is a video that prompts the user to exercise.
本申请一些实施例提供了一种媒资连播方法,该方法包括:响应于第一窗口播放到距离第一视频结束前的第一时间,根据播放索引表中存在所述第一视频对应项目的下一项目,在所述第一窗口的上方图层启动第二窗口以播放第三视频,其中,所述第一窗口为全屏窗口,所述第二窗口为非全屏窗口,所述下一项目与第二视频相对应,所述第三视频为提示用户进行运动的健身视频;响应于在所述第二窗口播放到预设时长前接收到了窗口切换指令,将所述第一视频从所述第一视频的当前进度调整至所述第二窗口继续播放,将所述第三视频从所述第三视频的当前进度调整至所述第一窗口继续播放,在所述第二窗口播放到所述第二视频的第二时间时,撤销所述第二窗口,将所述第一窗口调整为从所述第二视频的当前进度继续播放;响应于在所述第二窗口播放到预设时长时未接收到所述窗口切换指令,撤销所述第二窗口。Some embodiments of the present application provide a method for broadcasting media assets. The method includes: in response to the first window playing to the first time before the end of the first video, based on the existence of the corresponding item of the first video in the play index table. The next item is to start a second window on the layer above the first window to play the third video, where the first window is a full-screen window and the second window is a non-full-screen window. The next item Corresponding to the second video, the third video is a fitness video that prompts the user to exercise; in response to receiving a window switching instruction before the second window plays for a preset duration, the first video is removed from the Adjust the current progress of the first video to the second window to continue playing, adjust the current progress of the third video to the first window to continue playing, and play to the second window. At the second time of the second video, cancel the second window and adjust the first window to continue playing from the current progress of the second video; in response to playing the preset duration in the second window When the window switching instruction is not received, the second window is cancelled.
本申请一些实施例提供了一种投屏方法,该方法包括:Some embodiments of this application provide a screencasting method, which includes:
响应于接收到的触发指令,显示跟练界面,其中,所述跟练界面包括第一窗口和第二窗口,所述第二窗口用于播放从服务器获取的健身视频;接收终端设备发送的第一视频流,其中,所述第一视频流为所述终端设备的视频录制装置采集得到的视频流,且携带有用于标识所述终端设备录制所述第一视频流对应的视频时的姿态的标识信息;根据所述标识信息、视频播放参数以及所述第一视频流的尺寸获取缩放比例,根据所述缩放比例对所述第一视频流进行缩放获取第二视频流,以及根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数,所述视频播放参数包括所述第一窗口的尺寸和/或预设视频流尺寸;基于所述布局偏移参数对所述第二视频流进行偏移,并在所述第一窗口播放偏移后的所述第二视频流。In response to the received trigger instruction, a follow-up training interface is displayed, wherein the follow-up training interface includes a first window and a second window, the second window is used to play the fitness video obtained from the server; and receives the third training video sent by the terminal device. A video stream, wherein the first video stream is a video stream collected by the video recording device of the terminal device, and carries a symbol used to identify the posture of the terminal device when recording the video corresponding to the first video stream. Identification information; obtaining a scaling ratio according to the identification information, video playback parameters and the size of the first video stream, scaling the first video stream according to the scaling ratio to obtain a second video stream, and obtaining a second video stream according to the video Playback parameters and the size of the second video stream are used to obtain a layout offset parameter. The video playback parameters include the size of the first window and/or the preset video stream size; and the layout offset parameter is obtained based on the layout offset parameter. The two video streams are offset, and the offset second video stream is played in the first window.
附图说明Description of drawings
图1为根据一些实施例的显示设备与控制装置之间操作场景的示意图;Figure 1 is a schematic diagram of an operation scenario between a display device and a control device according to some embodiments;
图2为根据一些实施例的控制装置100的硬件配置框图;Figure 2 is a hardware configuration block diagram of the control device 100 according to some embodiments;
图3为根据一些实施例的显示设备200的硬件配置框图;Figure 3 is a hardware configuration block diagram of the display device 200 according to some embodiments;
图4为根据一些实施例的显示设备200中软件配置示意图;Figure 4 is a schematic diagram of software configuration in the display device 200 according to some embodiments;
图5为根据一些实施例的显示设备首页示意图;Figure 5 is a schematic diagram of a home page of a display device according to some embodiments;
图6为根据一些实施例的媒资连播方法的流程示意图;Figure 6 is a schematic flowchart of a method for broadcasting media assets according to some embodiments;
图7为根据一些实施例的媒资连播方法的流程示意图;Figure 7 is a schematic flowchart of a method for broadcasting media assets according to some embodiments;
图8为根据一些实施例的媒资连播方法的时序示意图;Figure 8 is a timing diagram of a media asset broadcast method according to some embodiments;
图9为根据一些实施例的媒资详情页的界面示意图;Figure 9 is a schematic interface diagram of a media asset details page according to some embodiments;
图10为根据一些实施例的第一分集的播放界面示意图;Figure 10 is a schematic diagram of the playback interface of the first episode according to some embodiments;
图11为根据一些实施例的显示设备在接收到查询结果后的一个时序示意图;Figure 11 is a timing diagram after the display device receives the query result according to some embodiments;
图12为根据一些实施例的第一分集的播放界面示意图;Figure 12 is a schematic diagram of the playback interface of the first episode according to some embodiments;
图13为根据一些实施例的跟练视频的播放界面示意图;Figure 13 is a schematic diagram of the playback interface of the follow-up video according to some embodiments;
图14为根据一些实施例的第二分集的播放界面示意图;Figure 14 is a schematic diagram of the playback interface of the second episode according to some embodiments;
图15为根据一些实施例的显示设备在接收到查询结果后的一个时序示意图;Figure 15 is a timing diagram after the display device receives the query result according to some embodiments;
图16为根据一些实施例的投屏方法的步骤流程图;Figure 16 is a step flow chart of a screencasting method according to some embodiments;
图17为根据另一些实施例的投屏方法的步骤流程图;Figure 17 is a step flow chart of a screen projection method according to other embodiments;
图18为图17所示投屏方法的场景示意图;Figure 18 is a schematic diagram of the scene of the screen projection method shown in Figure 17;
图19为图17所示投屏方法的原理图;Figure 19 is a schematic diagram of the screen projection method shown in Figure 17;
图20为根据另一些实施例的投屏方法的步骤流程图;Figure 20 is a step flow chart of a screen projection method according to other embodiments;
图21为图20所示投屏方法的原理图;Figure 21 is a schematic diagram of the screen projection method shown in Figure 20;
图22为根据另一些实施例的投屏方法的步骤流程图;Figure 22 is a step flow chart of a screen projection method according to other embodiments;
图23为图22所示投屏方法的场景示意图;Figure 23 is a schematic diagram of the scene of the screen projection method shown in Figure 22;
图24为图22所示投屏方法的原理图;Figure 24 is a schematic diagram of the screen projection method shown in Figure 22;
图25为根据另一些实施例的投屏方法的步骤流程图;Figure 25 is a step flow chart of a screen projection method according to other embodiments;
图26为图25所示投屏方法的原理图;Figure 26 is a schematic diagram of the screen projection method shown in Figure 25;
图27为根据另一些实施例的投屏方法的步骤流程图;Figure 27 is a step flow chart of a screen projection method according to other embodiments;
图28为图27所示投屏方法的场景示意图;Figure 28 is a schematic diagram of the scene of the screen projection method shown in Figure 27;
图29为图27所示投屏方法的原理图;Figure 29 is a schematic diagram of the screen projection method shown in Figure 27;
图30为根据一些实施例所示投屏方法的场景架构图。Figure 30 is a scene architecture diagram of a screen casting method according to some embodiments.
具体实施方式Detailed ways
下面将结合本申请一些实施例中的附图,对本申请示例性实施方式进行描述,显然,描述的一些实施例仅是本申请一部分实施例,而不是全部的实施例。Exemplary embodiments of the present application will be described below with reference to the accompanying drawings in some embodiments of the present application. Obviously, some of the described embodiments are only some of the embodiments of the present application, rather than all of the embodiments.
本申请实施方式提供的显示设备可以具有多种实施形式,例如,可以是电视、智能电视、激光投影设备、显示器(monitor)、电子白板(electronic bulletin board)、电子桌面(electronic table)等。图1和图2为本申请的显示设备的一种具体实施方式。The display device provided by the embodiment of the present application can have a variety of implementation forms, for example, it can be a TV, a smart TV, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. Figures 1 and 2 illustrate a specific implementation of the display device of the present application.
图1为根据一些实施例的显示设备与控制装置之间操作场景的示意图。如图1所示,用户可通过终端设备300或控制装置100操作显示设备200。Figure 1 is a schematic diagram of an operation scenario between a display device and a control device according to some embodiments. As shown in FIG. 1 , the user can operate the display device 200 through the terminal device 300 or the control device 100 .
在一些实施例中,控制装置100可以是遥控器,遥控器和显示设备的通信包括红外协议通信或蓝牙协议通信,及其他短距离通信方式,通过无线或有线方式来控制显示设备200。用户可以通过遥控器上按键、语音输入、控制面板输入等输入用户指令,来控制显示设备200。In some embodiments, the control device 100 may be a remote controller. The communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-distance communication methods to control the display device 200 through wireless or wired methods. The user can control the display device 200 by inputting user instructions through buttons on the remote control, voice input, control panel input, etc.
在一些实施例中,也可以使用终端设备300(如移动终端、平板电脑、计算机、笔记本电脑等)以控制显示设备200。例如,使用在终端设备上运行的应用程序控制显示设备200。In some embodiments, a terminal device 300 (such as a mobile terminal, a tablet, a computer, a laptop, etc.) may also be used to control the display device 200 . For example, the display device 200 is controlled using an application program running on the terminal device.
在一些实施例中,显示设备可以不使用上述的终端设备或控制设备接收指令,而是通过触摸或者手势等接收用户的控制。In some embodiments, the display device may not use the above-mentioned terminal device or control device to receive instructions, but may receive user control through touch or gestures.
在一些实施例中,显示设备200还可以采用除了控制装置100和终端设备300之外的方式进行控制,例如,可以通过显示设备200设备内部配置的获取语音指令的模块直接接收用户的语音指令控制,也可以通过显示设备200设备外部设置的语音控制设备来接收用户的语音指令控制。In some embodiments, the display device 200 can also be controlled in a manner other than the control device 100 and the terminal device 300. For example, the display device 200 can directly receive the user's voice command control through a module configured inside the display device 200 to obtain voice commands. , the user's voice command control can also be received through a voice control device provided outside the display device 200 .
在一些实施例中,显示设备200还与服务器400进行数据通信。可允许显示设备200通过局域网(LAN)、无线局域网(WLAN)和其他网络进行通信连接。服务器400可以向显示设备200提供各种内容和互动。In some embodiments, display device 200 also communicates data with server 400. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 can provide various content and interactions to the display device 200.
图2为根据一些实施例中控制装置100的配置框图。如图2所示,控制装置100包括控制器110、通信接口130、用户输入/输出接口140、存储器、供电电源。控制装置100可接收用户的输入操作指令,且将操作指令转换为显示设备200可识别和响应的指令,起用用户与显示设备200之间交互中介作用。FIG. 2 is a configuration block diagram of the control device 100 according to some embodiments. As shown in Figure 2, the control device 100 includes a controller 110, a communication interface 130, a user input/output interface 140, a memory, and a power supply. The control device 100 can receive input operation instructions from the user, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, thereby mediating the interaction between the user and the display device 200 .
如图3,显示设备200包括调谐解调器210、通信器220、检测器230、外部装置接口240、控制器250、显示器260、音频输出接口285、存储器、供电电源、用户输入接口280中的至少一种。As shown in Figure 3, the display device 200 includes a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 285, a memory, a power supply, and a user input interface 280. At least one.
在一些实施例中控制器包括处理器,视频处理器,音频处理器,图形处理器,RAM,ROM,用于输入/输出的第一接口至第n接口。In some embodiments the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, first to nth interfaces for input/output.
显示器260包括用于呈现画面的显示屏组件,以及驱动图像显示的驱动组件,用于接收源自控制器输出的图像信号,进行显示视频内容、图像内容以及菜单操控界面的组件以及用户操控UI界面。The display 260 includes a display screen component for presenting images, a driving component for driving image display, a component for receiving image signals output from the controller, displaying video content, image content, menu control interface components, and a user control UI interface. .
显示器260可为液晶显示器、OLED显示器、以及投影显示器,还可以为一种投影装置和投影屏幕。The display 260 can be a liquid crystal display, an OLED display, a projection display, or a projection device and a projection screen.
通信器220是用于根据各种通信协议类型与外部设备或服务器进行通信的组件。例如:通信器可以包括Wifi模块,蓝牙模块,有线以太网模块等其他网络通信协议芯片或近场通信协议芯片,以及红外接收器中的至少一种。显示设备200可以通过通信器220与外部控制设备100或服务器400建立控制信号和数据信号的发送和接收。The communicator 220 is a component for communicating with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The display device 200 can establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220 .
用户输入接口280,可用于接收控制装置100(如:红外遥控器等)的控制信号。The user input interface 280 can be used to receive control signals from the control device 100 (such as an infrared remote control, etc.).
检测器230用于采集外部环境或与外部交互的信号。例如,检测器230包括光接收器,用于采集环境光线强度的传感器;或者,检测器230包括图像采集器,如摄像头,可以用于采集外部环境场景、用户的属性或用户交互手势,再或者,检测器230包括声音采集器,如麦克风等,用于接收外部声音。The detector 230 is used to collect signals from the external environment or interactions with the outside. For example, the detector 230 includes a light receiver, a sensor used to collect ambient light intensity; or the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures, or , the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.
外部装置接口240可以包括但不限于如下:高清多媒体接口接口(HDMI)、模拟或数据高清分量输入接口(分量)、复合视频输入接口(CVBS)、USB输入接口(USB)、RGB端口等任一个或多个接口。也可以是上述多个接口形成的复合性的输入/输出接口。The external device interface 240 may include, but is not limited to, any of the following: high-definition multimedia interface (HDMI), analog or data high-definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. or multiple interfaces. It can also be a composite input/output interface formed by the above-mentioned multiple interfaces.
调谐解调器210通过有线或无线接收方式接收广播电视信号,以及从多个无线或有线广播电视信号中解调出音视频信号,如以及EPG数据信号。The tuner-demodulator 210 receives broadcast television signals through wired or wireless reception methods, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals.
在一些实施例中,控制器250和调谐解调器210可以位于不同的分体设备中,即调谐解调器210也可在控制器250所在的主体设备的外置设备中,如外置机顶盒等。In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box. wait.
控制器250,通过存储在存储器上中各种软件控制程序,来控制显示设备的工作和响应用户的操作。控制器250控制显示设备200的整体操作。例如:响应于接收到用于选择在显示器260上显示UI对象的用户命令,控制器250便可以执行与由用户命令选择的对象有关的操作。The controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on display 260, controller 250 may perform operations related to the object selected by the user command.
参见图4,在一些实施例中,将系统分为四层,从上至下分别为应用程序(Applications)层(简称“应用层”),应用程序框架(Application Framework)层(简称“框架层”),安卓运行时(Android runtime)和系统库层(简称“系统运行库层”),以及内核层。Referring to Figure 4, in some embodiments, the system is divided into four layers. From top to bottom, they are the Applications layer (referred to as the "Application layer") and the Application Framework layer (referred to as the "Framework layer"). "), Android runtime and system library layer (referred to as "system runtime library layer"), and kernel layer.
在一些实施例中,显示设备启动后可以直接进入预置的视频点播程序的界面,视频点播程序的界面可以如图5中所示,至少包括导航栏510和位于导航栏510下方的内容显示区520,内容显示区520中显示的内容会随导航栏中被选中控件的变化而变化。应用程序层中的程序可以被集成在视频点播程序中通过导航栏的一个控件进行展示,也可以在导航栏中的应用控件被选中后进行进一步显示。图5中,内容显示区520包含12个媒资控件,分别对应媒资1-媒资12。In some embodiments, after the display device is started, the interface of the preset video on demand program can be directly entered. The interface of the video on demand program can be as shown in Figure 5, including at least a navigation bar 510 and a content display area located below the navigation bar 510. 520. The content displayed in the content display area 520 will change as the selected control in the navigation bar changes. Programs in the application layer can be integrated into the video on demand program and displayed through a control in the navigation bar, or can be further displayed after the application control in the navigation bar is selected. In Figure 5, the content display area 520 includes 12 media asset controls, corresponding to media asset 1-media asset 12 respectively.
在一些实施例中,显示设备启动后可以直接进入上次选择的信号源的显示界面,或者信号源选择界面,其中信号源可以是预置的视频点播程序,还可以是HDMI接口,直播电视接口等中的至少一种,用户选择不同的信号源后,显示器可以显示从不同信号源获得的内容。In some embodiments, after the display device is started, it can directly enter the display interface of the last selected signal source, or the signal source selection interface, where the signal source can be a preset video on demand program, an HDMI interface, or a live TV interface. At least one of the following: after the user selects different signal sources, the display can display content obtained from different signal sources.
在一些实施例中,视频点播程序的播放器具有连播功能,该连播功能启用后,播放器在播放完一个媒资的其中一个分集后,可自动播放该媒资的下一个分集。例如,对于包含多个分集的电视剧,播放器在播放完其中一个分集后,可自动播放下一个分集。In some embodiments, the player of the video on demand program has a continuous broadcast function. After the continuous broadcast function is enabled, the player can automatically play the next episode of a media asset after playing one episode of the media asset. For example, for a TV series that contains multiple episodes, the player can automatically play the next episode after playing one of the episodes.
在一些实施例中,视频点播程序的播放器除了可以对单个媒资的多个分集进行连播,也可对包含多个媒资的媒资集进行连播。例如,对于一个包含多个影片的媒资集,视频点播程序可在播放完一个影片后,自动播放该媒资集中的下一个影片。In some embodiments, the player of the video on demand program can not only broadcast multiple episodes of a single media asset, but also broadcast a media asset set containing multiple media assets. For example, for a media collection containing multiple videos, the video on demand program can automatically play the next video in the media collection after playing one video.
在一些实施例中,视频点播程序的播放器还可对任意多个视频进行连播,在播放完一个视频后,可播放为用户推荐的其他视频。In some embodiments, the player of the video-on-demand program can also perform continuous playback of any number of videos. After playing one video, other videos recommended for the user can be played.
在一些实施例中,视频点播程序的播放器可默认开启连播功能,用户连续观看多个时间较长的视频,如连续观看多集电视剧后,容易感到疲惫,不利于人们的身体健康。In some embodiments, the player of the video on demand program can enable the continuous broadcast function by default. Users may easily feel tired after watching multiple long videos continuously, such as multiple episodes of TV series, which is not good for people's health.
为解决人们连续观看媒资不利于身体健康的问题,本申请实施例提供了一种媒资连播方法,该媒资连播方法通过在两个媒资相邻的片尾和片头时间内播放用于提示用户进行运动的视频,使得用户可在观看两个媒资的间隙进行运动,从而减轻因久坐而带来的疲惫感,提升观看体验。In order to solve the problem that people's continuous viewing of media assets is not good for their health, embodiments of the present application provide a media asset serial broadcast method. The media asset serial broadcast method is used for prompts by playing during the ending and opening times of two adjacent media assets. Videos of users exercising allow users to exercise between watching two media assets, thereby reducing the fatigue caused by sitting for long periods of time and improving the viewing experience.
在一些实施例中,提示用户进行运动的视频可由服务器进行下发。In some embodiments, a video prompting the user to exercise may be delivered by the server.
在一些实施例中,提示用户进行运动的视频可为跟练视频,该跟练视频可为用户当天跟练过的视频或用户在预设周期内跟练次数达到预设阈值的视频,例如,用户最近一周内跟练过3次以上的视频。若用户在显示设备上没有跟练记录,服务器可下发热门的跟练视频,如下发当日跟练用户数量最多的视频。In some embodiments, the video that prompts the user to perform exercise may be a follow-up video, and the follow-up video may be a video that the user has followed that day or a video in which the number of follow-up exercises by the user reaches a preset threshold within a preset period, for example, Videos that users have followed more than three times in the past week. If the user does not have a follow-up training record on the display device, the server can deliver popular follow-up training videos, such as the video with the largest number of follow-up training users that day.
为对本申请实施例提供的媒资连播方法进行说明,本申请以用户连续观看同一个电视剧的多个分集为例进行介绍,由于电视剧的两个分集之间的片尾加片头的时间和通常为3~5分钟,而人们在这3~5分钟内进行锻炼通常可缓解因久坐而带来的疲惫感。应当理解的是,该媒资连播方法也可做一定变形以适应其他媒资连播的场景。例如,在连播多部影片时,由于一部影片的片头或片尾可长达5~10分钟甚至更长时间,连播的两部影片的片头加片尾的时间和可长达10~20分钟甚至更长时间,用户若进行该10~20分钟的锻炼可能会加重疲惫感,因此,这种场景下,可只在一部影片的片头或片尾播放用于提示用户进行运动的视频。In order to illustrate the media asset serial broadcasting method provided by the embodiment of the present application, this application takes the user to continuously watch multiple episodes of the same TV series as an example. Since the sum of the time between the end and the beginning of the two episodes of the TV series is usually 3 ~5 minutes, and people exercising within these 3 to 5 minutes can usually relieve the fatigue caused by sitting for a long time. It should be understood that this media asset cascading method can also be modified to adapt to other media asset cascading scenarios. For example, when multiple movies are broadcast in a row, since the opening or ending of one movie can be as long as 5 to 10 minutes or even longer, the total time of the opening and ending of two movies in a row can be as long as 10 to 20 minutes or even longer. If the user exercises for 10 to 20 minutes for a long time, the user may feel more tired. Therefore, in this scenario, a video to prompt the user to exercise can only be played at the beginning or end of a movie.
在一些实施例中,一些播放器具有自动跳过片头片尾功能,在播放至一集电视剧的片尾时,自动跳转至播放下一集电视剧的片头之后的正片,若开启此功能,则无法利用片头和片尾的时间播放提示用户进行运动的视频。另外,若未开启连播功能,播放器在播放完一集电视剧后将不再继续播放,此时,用户可能没有运动需求,若播放了提示用户进行运动的视频,可能会给用户不好的用户体验。因此,为保障本申请实施例的顺利实施,对于能够关闭跳过片头片尾功能以及能够开启连播功能的播放器,用户可手动设置关闭跳过片头片尾功能以及开启连播功能,或者,播放器也可默认设置为关闭跳过片头片尾功能以及开启连播功能。In some embodiments, some players have a function of automatically skipping the opening and ending credits. When playing to the end of a TV series, it will automatically jump to the main movie after the opening of the next episode of the TV series. If this function is turned on, it cannot be used. A video prompting the user to exercise is played at the beginning and end of the film. In addition, if the continuous broadcast function is not turned on, the player will not continue to play after playing an episode of TV series. At this time, the user may not have the need to exercise. If a video is played that prompts the user to exercise, it may give the user a bad impression. experience. Therefore, in order to ensure the smooth implementation of the embodiments of this application, for players that can turn off the function of skipping the opening and ending credits and enable the continuous broadcast function, the user can manually set to turn off the function of skipping the opening and ending credits and enable the continuous broadcast function, or the player can also The default setting is to turn off the skipping of opening and ending credits and enable the continuous broadcast function.
在一些实施例中,视频点播程序的播放器被配置为能够关闭跳过片头片尾功能以及能够开启连播功能。In some embodiments, the player of the video on demand program is configured to be able to turn off the function of skipping the opening and ending credits and enable the continuous broadcast function.
在一些实施例中,一些版本的视频点播程序可能不支持本申请实施例提供的媒资连播方法,在版本升级后,视频点播程序将支持本申请实施例提供的媒资连播方法。为提示用户体验本申请实施例的媒资连播方法,在版本升级后用户第一次进入视频点播程序时,视频点播程序可提示用户开启连播功能,以体验在媒资连播的片头和片尾时间进行体育锻炼。In some embodiments, some versions of the video on demand program may not support the media asset cascading method provided by the embodiments of this application. After the version is upgraded, the video on demand program will support the media asset cascading method provided by the embodiments of this application. In order to prompt the user to experience the media asset cascading method of the embodiment of the present application, when the user enters the video on demand program for the first time after the version upgrade, the video on demand program may prompt the user to turn on the cascading function to experience the beginning and end of the media asset cascade. Physical exercise.
下面以用户观看一部电视剧的两个分集为例,介绍本申请实施例提供的媒资连播方法。参见图6,本申请实施例提供的媒资连播方法,包括如下步骤:The following takes a user watching two episodes of a TV series as an example to introduce the media asset serial broadcast method provided by the embodiment of the present application. Referring to Figure 6, the media asset broadcast method provided by the embodiment of the present application includes the following steps:
步骤S101:在第一窗口播放到距离第一视频结束前的第一时间时,根据播放索引表中存在所述第一视频对应项目的下一项目,在所述第一窗口的上方图层启动第二窗口以播放第三视频,其中,所述第一窗口为全屏窗口,所述第二窗口为非全屏窗口,所述下一项目与第二视频相对应,所述第三视频为提示用户进行运动的视频。Step S101: When the first window is played to the first time before the end of the first video, according to the next item corresponding to the first video in the play index table, start the layer above the first window The second window is used to play the third video, wherein the first window is a full-screen window, the second window is a non-full-screen window, the next item corresponds to the second video, and the third video prompts the user Video of doing exercise.
在一些实施例中,用户正在观看的一部电视剧的一个分集可称为第一视频,下一分集可称为第二视频,提示用户进行运动的视频可称为第三视频。该电视剧的详情页数据可设置有播放索引表,播放索引表设置有多个项目,每个项目对应一个分集,视频点播程序被配置为按照播放索引表连续播放该电视剧的分集。In some embodiments, an episode of a TV series that the user is watching may be called a first video, the next episode may be called a second video, and a video that prompts the user to exercise may be called a third video. The details page data of the TV series may be set with a play index table. The play index table is set with multiple items, each item corresponding to an episode. The video on demand program is configured to continuously play the episodes of the TV series according to the play index table.
在一些实施例中,视频点播程序的主线程可被配置为可启动多个播放器,并分别对每个播放器进行独立控制。用于播放电视剧的分集的播放器可称为第一播放器,用于播放第三视频的播放器可称为第二播放器。In some embodiments, the main thread of the video on demand program may be configured to start multiple players and control each player independently. The player used to play episodes of the TV series may be called a first player, and the player used to play the third video may be called a second player.
在一些实施例中,视频点播程序的主线程可被配置为可启动多个窗口,并分别对每个窗口展示的内容进行控制。其中一个窗口可为全屏窗口,该全屏窗口可称为第一窗口,另一个窗口可为非全屏窗口,该非全屏窗口可称为第二窗口,第二窗口可位于第一窗口的上方图层,从而对第一窗口构成遮挡。In some embodiments, the main thread of the video on demand program may be configured to start multiple windows and control the content displayed in each window respectively. One of the windows may be a full-screen window, and the full-screen window may be called the first window. The other window may be a non-full-screen window, and the non-full-screen window may be called the second window. The second window may be located in a layer above the first window. , thus occluding the first window.
在一些实施例中,一个播放器可启动多个播放窗口,并分别对每个播放器进行独立控制。In some embodiments, one player can launch multiple playback windows and control each player independently.
在一些实施例中,用户在进入一部电视剧的一个分集时,视频点播程序的主线程可启动第一窗口和第一播放器,在第一窗口播放该第一播放器的内容,即播放该分集,并实时监测播放进度。例如,用户点击第一分集后,视频点播程序可在第一窗口播放第一分集。In some embodiments, when the user enters an episode of a TV series, the main thread of the video on demand program can start the first window and the first player, and play the content of the first player in the first window, that is, play the first window. Divide the episodes and monitor the playback progress in real time. For example, after the user clicks on the first episode, the video on demand program can play the first episode in the first window.
在监测到播放进度为该分集的预设进度,如播放到50%,或距离片尾还剩10s时,视频点播程序的主线程可向服务器请求第三视频的信息。视频点播程序可根据第一视频的片尾时长和第二视频的片头时长计算出第三视频的可播放时长,将该可播放时长以及登录该视频点播程序的用户标识发送给服务器,其中,第一视频的片尾长度和第二视频的片头长度可从服务器下发的该电视剧的媒资详情页的数据中获取。服务器可根据可播放时长以及用户标识确定一个第三视频,将第三视频的媒资信息返回给显示设备上的视频点播程序。其中,媒资信息可包括第三视频的播放地址,从而主线 程可从该播放地址获取第三视频的视频流。或者,媒资信息可包括第三视频的媒资标识,从而主线程可向服务器请求该媒资标识对应的视频流。When the playback progress of the episode is detected to be the preset progress of the episode, such as playing to 50%, or there are 10 seconds left before the end of the video, the main thread of the video on demand program can request information about the third video from the server. The video on demand program can calculate the playable duration of the third video based on the ending duration of the first video and the opening duration of the second video, and send the playable duration and the user ID logged in to the video on demand program to the server, where the first The ending length of the video and the opening length of the second video can be obtained from the data on the media asset details page of the TV series issued by the server. The server can determine a third video based on the playable duration and the user identification, and return the media asset information of the third video to the video on demand program on the display device. The media asset information may include the playback address of the third video, so that the main thread can obtain the video stream of the third video from the playback address. Alternatively, the media asset information may include the media asset identifier of the third video, so that the main thread may request the video stream corresponding to the media asset identifier from the server.
在监测到第一窗口的播放进度为第一视频的片尾开始前的第一时间时,如片尾开始前的3秒时,主线程可生成一个包含第二窗口的图层,启动第二播放器,然后向服务器获取第三视频的码流,获取到码流后,在第二窗口播放第二播放器的内容,即播放第三视频解码后的图像第二窗口可为位于第一窗口上部的小窗窗口,从而形成画中画的播放模式,第二窗口的音量可小于第一窗口的音量且大于0,使用户能够注意到第二窗口。When it is detected that the playback progress of the first window is the first time before the end of the first video, such as 3 seconds before the end of the first video, the main thread can generate a layer containing the second window and start the second player. , and then obtain the code stream of the third video from the server. After obtaining the code stream, play the content of the second player in the second window, that is, play the decoded image of the third video. The second window can be located at the top of the first window. A small window window is formed to form a picture-in-picture playback mode. The volume of the second window can be smaller than the volume of the first window and greater than 0, so that the user can pay attention to the second window.
在一些实施例中,第一窗口和第二窗口也可不形成画中画,例如,可将第一窗口调整为占据显示屏幕的左半区域,将第二窗口设置为占据显示屏幕的右半区域。In some embodiments, the first window and the second window may not form a picture-in-picture. For example, the first window may be adjusted to occupy the left half of the display screen, and the second window may be set to occupy the right half of the display screen. .
步骤S102:若在所述第二窗口播放到预设时长前接收到了窗口切换指令,将所述第一视频从所述第一视频的当前进度调整至所述第二窗口继续播放,将所述第三视频从所述第三视频的当前进度调整至所述第一窗口继续播放,在所述第二窗口播放到所述第二视频的第二时间时,撤销所述第二窗口,将所述第一窗口调整为从所述第二视频的当前进度继续播放。Step S102: If a window switching instruction is received before the second window is played for the preset duration, adjust the first video from the current progress of the first video to the second window to continue playing, and the The third video is adjusted from the current progress of the third video to the first window to continue playing. When the second window is played to the second time of the second video, the second window is cancelled, and all The first window is adjusted to continue playing from the current progress of the second video.
在一些实施例中,在第二窗口播放了预设时长,如20秒后,若用户按遥控器的菜单键,则可向视频点播程序发出窗口切换指令,视频点播程序的主线程根据该窗口切换指令,将第二窗口的播放内容切换为第一窗口的播放内容,将第一窗口的播放内容切换为第二窗口的播放内容,使所述第一播放器将所述第一视频的当前进度后的图像在所述第二窗口播放,所述第二播放器将所述第三视频的当前进度后的图像在所述第一窗口播放,达到两个窗口内容切换的视觉效果,其中,第二窗口继续播放第一视频的片尾,在第一视频的片尾播放完毕后,第二窗口自动开始播放第二视频的片头。为保障跟练效果,主线程可将第二窗口静音。In some embodiments, after the second window has been played for a preset time, such as 20 seconds, if the user presses the menu key on the remote control, a window switching instruction can be issued to the video on demand program, and the main thread of the video on demand program can switch according to the window The switching instruction switches the playback content of the second window to the playback content of the first window, switches the playback content of the first window to the playback content of the second window, and causes the first player to change the current content of the first video. The progressed image is played in the second window, and the second player plays the currently progressed image of the third video in the first window, achieving the visual effect of switching the content of the two windows, wherein, The second window continues to play the ending of the first video. After the ending of the first video is played, the second window automatically starts playing the opening of the second video. To ensure the effectiveness of follow-up training, the main thread can mute the second window.
在接收到窗口切换指令之前,视频点播程序可控制所述第二窗口的音量小于所述第一窗口的音量,例如,将所述第二窗口的音量设置为与所述第一窗口的音量正相关,使用户能注意到第二窗口正在播放第三视频;在接收到所述窗口切换指令后,视频点播程序可将所述第二窗口静音,以使用户专注地进行跟练。Before receiving the window switching instruction, the video on demand program may control the volume of the second window to be smaller than the volume of the first window, for example, set the volume of the second window to be equal to the volume of the first window. Related, the user can notice that the third video is playing in the second window; after receiving the window switching instruction, the video on demand program can mute the second window so that the user can concentrate on practicing.
在监测到第二窗口的播放进度为第二视频的片头结束前的第二时间时,如片头结束前的3秒时,视频点播程序的主线程可撤销第二窗口,将第一窗口的播放内容切换为第一播放器的内容,从而使第二视频恢复在第一窗口进行播放。When it is detected that the playback progress of the second window is the second time before the end of the title of the second video, such as 3 seconds before the end of the title, the main thread of the video on demand program can cancel the second window and change the playback of the first window. The content is switched to the content of the first player, so that the second video resumes playing in the first window.
在监测到第一窗口的播放进度为第二视频的片头结束前的第二时间时,如片头结束前的3秒时,视频点播程序的主线程可撤销第二窗口,关闭第二播放器。When it is detected that the playback progress of the first window is the second time before the end of the title of the second video, for example, 3 seconds before the end of the title, the main thread of the video on demand program can cancel the second window and close the second player.
若用户在跟练第三视频的过程中想停止跟练,可再次向视频点播程序发出窗口切换指令,视频点播程序的主线程可根据该窗口切换指令,撤销第二窗口,关闭第二播放器,并将第一窗口的播放内容切换为第一播放器的播放内容。If the user wants to stop practicing while following the third video, he can issue a window switching instruction to the video on demand program again. The main thread of the video on demand program can cancel the second window and close the second player according to the window switching instruction. , and switches the playback content of the first window to the playback content of the first player.
在一些实施例中,视频点播程序的主线程根据该窗口切换指令,不将第二窗口与第一窗口进行内容互换,而是将第二窗口放大,将所述第一窗口缩小。例如,将第二窗口全屏展示,将第一窗口缩小为非全屏的小窗窗口,将该小窗窗口设置在第二窗口的上部,也能达到两个窗口内容切换的视觉效果。为保障跟练效果,主线程可将第二窗口的音量调大,将第一窗口静音。In some embodiments, according to the window switching instruction, the main thread of the video on demand program does not exchange the contents of the second window with the first window, but enlarges the second window and shrinks the first window. For example, displaying the second window in full screen, reducing the first window to a small window that is not full screen, and setting the small window at the top of the second window can also achieve the visual effect of switching the contents of the two windows. To ensure the effect of follow-up training, the main thread can increase the volume of the second window and mute the first window.
在监测到第一窗口的播放进度为第二视频的片头结束前的第二时间时,如片头结束前的3秒时,视频点播程序的主线程可关闭第二窗口,关闭第二播放器,并将第一窗口恢复为全屏窗口,将第一窗口的音量恢复至第二窗口启动前的音量。When it is detected that the playback progress of the first window is the second time before the end of the title of the second video, for example, 3 seconds before the end of the title, the main thread of the video on demand program can close the second window and close the second player. And restore the first window to a full-screen window, and restore the volume of the first window to the volume before the second window was started.
若用户在跟练第三视频的过程中想停止跟练,可再次向视频点播程序发出窗口切换指令,视频点播程序的主线程可根据该窗口切换指令,关闭第二窗口,关闭第二播放器,并将第一窗口恢复为全屏窗口,将第一窗口的音量恢复至第二窗口启动前的音量。If the user wants to stop practicing while following the third video, he can issue a window switching instruction to the video on demand program again. The main thread of the video on demand program can close the second window and the second player according to the window switching instruction. , and restore the first window to a full-screen window, and restore the volume of the first window to the volume before the second window was started.
步骤S103:若在所述第二窗口播放到预设时长时未接收到所述窗口切换指令,撤销所述第二窗口。Step S103: If the window switching instruction is not received when the second window is played for a preset duration, cancel the second window.
在一些实施例中,若用户对第二窗口播放的第三视频不感兴趣,可能会在第二窗口播放的预设时长,如20秒内,一直未按控器的菜单键,则视频点播程序的主线程可撤销第二窗口,并关闭第二播放器,使所述第一窗口不再被第二窗口所遮挡,从而不再打扰用户观看第一窗口的视频。In some embodiments, if the user is not interested in the third video played in the second window and does not press the menu button of the controller within the preset playing time of the second window, such as 20 seconds, the video on demand program The main thread can cancel the second window and close the second player so that the first window is no longer blocked by the second window, thereby no longer disturbing the user's viewing of the video in the first window.
由上述实施例可见,本申请实施例提供的媒资连播方法,通过在两个连播视频的片尾和片头期间播放提示用户进行运动的视频,能促进用户积极锻炼身体,减轻长时间久坐而导致身体不适的症状,并提升观看显示的趣味性,提升了观看体验。It can be seen from the above embodiments that the media asset serial broadcast method provided by the embodiment of the present application can promote users to actively exercise by playing videos prompting users to exercise during the ending and opening periods of two serial videos, and can reduce the symptoms caused by sitting for long periods of time. Symptoms of physical discomfort and make viewing the display more interesting and enhance the viewing experience.
图7还示出了一种媒资连播方法的流程示意图,如图7所示,该方法包括如下步骤:Figure 7 also shows a schematic flow chart of a method for broadcasting media assets. As shown in Figure 7, the method includes the following steps:
步骤S201:接收媒资控件的触发指令,进入媒资详情页。Step S201: Receive the triggering instruction of the media asset control and enter the media asset details page.
在一些实施例中,用户在媒资推荐页面,可点击一个媒资控件,显示设备上视频点播程序的主线程可生成该媒资控件的触发指令,根据该触发指令向服务器请求媒资详情页的界面数据,根据该界面数据展示媒资详情页。In some embodiments, the user can click a media asset control on the media asset recommendation page, and the main thread of the video on demand program on the display device can generate a trigger instruction for the media asset control, and request the media asset details page from the server according to the trigger instruction. The interface data, and the media asset details page is displayed based on the interface data.
步骤S202:接收分集点播指令,启动第一窗口播放分集。Step S202: Receive the diversity on-demand instruction and start the first window to play the diversity.
在一些实施例中,如用户在媒资推荐页面点击的媒资控件对应的媒资包含多个分集,则媒资详情页可显示该多个分集对应的分集控件,用户点击一个分集控件,视频点播程序的主线程可生成分集点播指令,根据该分集点播指令启动第一窗口和第一播放器,通过第一窗口播放该分集的视频码流,该正在播放的分集可称为第一视频,该分集的下一分集可称为第二视频。In some embodiments, if the media asset corresponding to the media asset control clicked by the user on the media asset recommendation page contains multiple episodes, the media asset details page may display the episode controls corresponding to the multiple episodes. The user clicks an episode control, and the video The main thread of the on-demand program can generate an episode-on-demand instruction, start the first window and the first player according to the episode-on-demand instruction, and play the video code stream of the episode through the first window. The episode being played can be called the first video. The next episode of the episode may be called the second video.
步骤S203:计算第三视频的可播放时长。Step S203: Calculate the playable duration of the third video.
在一些实施例中,视频点播程序的主线程在第一播放器播放到第一视频的片尾前,可计算第三视频的可播放时长,例如,在第一播放器播放到第一视频的50%时,计算第三视频的可播放时长。In some embodiments, the main thread of the video on demand program can calculate the playable duration of the third video before the first player plays to the end of the first video, for example, 50 seconds after the first player plays to the end of the first video. %, calculate the playable duration of the third video.
步骤S204:查询第三视频的媒资数据。Step S204: Query the media asset data of the third video.
在一些实施例中,视频点播程序的主线程在计算出可播放时长后,可向服务器发送包含可播放时长和视频点播程序登录账号的用户标识的查询请求,以查询第三视频的媒资数据,该媒资数据可包括第三视频的播放地址或媒资标识。In some embodiments, after calculating the playable duration, the main thread of the video on demand program can send a query request containing the playable duration and the user ID of the video on demand program login account to the server to query the media asset data of the third video. , the media asset data may include the playback address or media asset identification of the third video.
在一些实施例中,第三视频为用户跟练过的视频。服务器若查询到视频时长小于或等于可播放时长的跟练视频,可将其中一个跟练视频的媒资数据下发给显示设备,若查询不到视频时长小于或等于可播放时长的跟练视频,则不返回跟练视频的媒资数据给显示设备。In some embodiments, the third video is a video that the user has followed. If the server queries for a follow-up video whose video duration is less than or equal to the playable duration, it can send the media asset data of one of the follow-up videos to the display device. If it does not find a follow-up video whose video duration is less than or equal to the playable duration, it can , the media asset data of the follow-up video will not be returned to the display device.
在一些实施例中,服务器从用户标识对应的全部跟练视频中获取一个视频时长大于或等于可播放时长的跟练视频,然后根据可播放时长计算该跟练视频的播放开始时间点startTime和该跟练视频的播放结束时间点endTime,使显示设备在播放该跟练视频在播放开始时间点startTime和播放结束时间点endTime之间的视频片段。In some embodiments, the server obtains a follow-up video whose video duration is greater than or equal to the playable duration from all follow-up videos corresponding to the user ID, and then calculates the playback start time point startTime and the playback start time point of the follow-up video based on the playable duration. The playback end time point endTime of the follow-up video enables the display device to play the video clips between the playback start time point startTime and the playback end time point endTime of the follow-up video.
在一些实施例中,服务器从用户标识对应的全部跟练视频中获取一个用户当天跟练过的视频或用户在预设周期内跟练次数达到预设阈值的视频跟练视频。In some embodiments, the server obtains a video that the user has practiced on that day or a video that the user has practiced with for a number of times reaching a preset threshold within a preset period from all the training videos corresponding to the user ID.
步骤S205:即将播放到片尾时,判断是否接收到第三视频的媒资数据。Step S205: When the end of the video is about to be played, determine whether the media asset data of the third video has been received.
在一些实施例中,在第一视频即将播放到片尾时,例如,在播放到片尾片的第3秒时,视频点播程序的主线程可判断是否已经接收到了第三视频的媒资数据。In some embodiments, when the first video is about to play to the end, for example, when the third second of the end of the video is played, the main thread of the video on demand program may determine whether the media asset data of the third video has been received.
步骤S206:若接收到第三视频的媒资数据,启动第二窗口播放第三视频。Step S206: If the media asset data of the third video is received, start the second window to play the third video.
在一些实施例中,若在播放到片尾片的第3秒时已经接收到了第三视频的媒资数据,视频点播程序的主线程可启动第二窗口和第二播放器,从第三视频的媒资数据中提取出播放地址,访问该播放地址,以获取第三视频的码流数据,通过第二窗口播放第三视频,第二窗口为一个小窗窗口,可覆盖在第一窗口上。In some embodiments, if the media asset data of the third video has been received at the 3rd second of the end credits, the main thread of the video on demand program can start the second window and the second player, and start the second window from the third video. Extract the playback address from the media asset data, access the playback address to obtain the code stream data of the third video, and play the third video through the second window. The second window is a small window that can be overlaid on the first window.
步骤S207:判断在预设时间内是否接收到窗口切换指令。Step S207: Determine whether a window switching instruction is received within a preset time.
在一些实施例中,在第二窗口启动后,视频点播程序的主线程可设置一个超时任务,超时任务的超时时间可设置为20秒,在这20秒内的某一时刻,若接收到窗口切换指令,则在该时刻结束超时任务,若未接收到窗口切换指令,则在到达20秒时间后,结束超时任务。In some embodiments, after the second window is started, the main thread of the video on demand program can set a timeout task, and the timeout period of the timeout task can be set to 20 seconds. At some point within these 20 seconds, if the window If the window switching instruction is received, the timeout task will end at that moment. If the window switching instruction is not received, the timeout task will end after 20 seconds.
步骤S208:若在预设时间内接收到窗口切换指令,将第二窗口的播放内容切换到第一窗口展示。Step S208: If the window switching instruction is received within the preset time, switch the playback content in the second window to the first window for display.
在一些实施例中,若在20秒时间内接收到窗口切换指令,视频点播程序的主线程则将第一窗口调整为显示第二播放器的播放内容。In some embodiments, if a window switching instruction is received within 20 seconds, the main thread of the video on demand program adjusts the first window to display the playback content of the second player.
步骤S209:将第一窗口的播放内容切换到第二窗口展示。Step S209: Switch the playback content in the first window to the second window for display.
在一些实施例中,若在20秒时间内接收到窗口切换指令,视频点播程序的主线程还将第二窗口调整为显示第一播放器的播放内容。为保障第一窗口的播放效果,视频点播程序的主线程可将第二窗口的音量调低,也可将第二窗口的音量直接调整至静音。In some embodiments, if a window switching instruction is received within 20 seconds, the main thread of the video on demand program will also adjust the second window to display the playback content of the first player. In order to ensure the playback effect of the first window, the main thread of the video on demand program can lower the volume of the second window, or directly adjust the volume of the second window to mute.
步骤S210:即将播放完片头时,将第二窗口的播放内容切换到第一窗口展示。Step S210: When the title is about to be played, switch the playback content in the second window to the first window for display.
在一些实施例中,在第一窗口即将播放完第二视频的片头,例如,距离播放完片头还剩3秒时,视频点播程序的主线程将第二窗口的播放内容切换到第一窗口展示。In some embodiments, when the first window is about to finish playing the title of the second video, for example, when there are 3 seconds left until the end of playing the title, the main thread of the video on demand program switches the playback content of the second window to the first window for display. .
在一些实施例中,由于第三视频的时长小于第一视频的片尾时长与第二视频的片头时长的和,可在第三视频播放完后,就将第二窗口的播放内容切换到第一窗口展示。In some embodiments, since the duration of the third video is less than the sum of the ending duration of the first video and the opening duration of the second video, after the third video is played, the playback content of the second window can be switched to the first Window display.
步骤S211:撤销第二窗口。Step S211: Cancel the second window.
在一些实施例中,将第一窗口重新全屏展示后,可撤销第二窗口。In some embodiments, after the first window is displayed in full screen again, the second window can be dismissed.
步骤S212:超时时间到,撤销第二窗口。Step S212: When the timeout expires, cancel the second window.
在一些实施例中,若在第二窗口小窗播放20秒内没接收到用户的窗口切换指令,可撤销第二窗 口。In some embodiments, if the user's window switching instruction is not received within 20 seconds of playing the second window, the second window can be cancelled.
在一些实施例中,若在第一窗口播放第三视频的过程中,接收到了返回指令或退出指令,可将第二窗口的播放内容切换到第一窗口展示,并撤销第二窗口。In some embodiments, if a return instruction or exit instruction is received while the first window is playing the third video, the playback content in the second window can be switched to the first window for display, and the second window can be cancelled.
下面将从用户在图5中点播一个媒资开始对媒资连播方法进行介绍。The following will introduce the method of media asset cascading starting from the user ordering a media asset in Figure 5.
参见图8,为根据一些实施例的媒资连播方法的时序示意图,如图8所示,服务器可设置有面向终端模块、影视数据库和跟练视频库。Referring to Figure 8, a schematic sequence diagram of a media asset broadcasting method according to some embodiments is shown. As shown in Figure 8, the server can be provided with a terminal-oriented module, a film and television database, and a follow-up video library.
在一些实施例中,面向终端模块用于与显示设备进行交互,以及与服务器的其他模块(如影视数据库和跟练视频库)进行交互。面向终端模块可设置有多个不同功能的接口,便于显示设备通过不同的接口获取不同的数据。In some embodiments, the terminal-oriented module is used to interact with the display device and other modules of the server (such as the film and television database and the training video library). The terminal-oriented module can be provided with multiple interfaces with different functions, so that the display device can obtain different data through different interfaces.
在一些实施例中,影视数据库设置有大量电视剧、电影等影视媒资的媒资数据,每个媒资的媒资数据可包括媒资标识、详情页数据和片头片尾数据,其中,媒资标识为可媒资ID,详情页数据可包括媒资名称、媒资时长、播放索引表和播放地址等数据,片头片尾数据可包括headLength(片头时长)、tailLength(片尾时长),媒资时长、片头时长和片尾时长均以秒为单位。In some embodiments, the film and television database is provided with media asset data of a large number of film and television media assets such as TV series and movies. The media asset data of each media asset may include media asset identification, detail page data and title and ending data, where the media asset identification It is a media asset ID. The details page data can include media asset name, media asset duration, playback index table and playback address. The title and tail data can include headLength (title duration), tailLength (end duration), media asset duration, title Duration and ending duration are both in seconds.
在一些实施例中,影视数据库和跟练视频库也可统称为媒资信息库。In some embodiments, the film and television database and the training video database may also be collectively referred to as the media asset information database.
步骤S3001和步骤S3002:用户在图5中点击一个媒资控件后,显示设备可获取该媒资控件对应媒资的媒资ID,生成包含该媒资ID的媒资详情请求,然后向面向终端模块的“视频详情查询接口”/vod/media/detail发送该媒资详情请求。其中,用户点击的媒资控件对应的媒资可称为目标媒资,目标媒资可为一个包括多个分集的媒资集,媒资详情请求包括该目标媒资的媒资标识,媒资标识可为媒资ID。Steps S3001 and S3002: After the user clicks on a media asset control in Figure 5, the display device can obtain the media asset ID corresponding to the media asset control, generate a media asset details request including the media asset ID, and then send a request to the terminal. The module's "video details query interface" /vod/media/detail sends the media asset details request. Among them, the media asset corresponding to the media asset control clicked by the user can be called the target media asset. The target media asset can be a media asset set including multiple episodes. The media asset details request includes the media asset identification of the target media asset. The media asset The identifier may be a media asset ID.
步骤S3003至步骤S3005:面向终端模块在视频详情查询接口接收到媒资详情请求后,可向媒资信息库查询该媒资ID对应的媒资详情数据以及片头片尾数据,将媒资详情数据和片头片尾数据返回给显示设备。Step S3003 to step S3005: After receiving the media asset details request through the video details query interface, the terminal-oriented module can query the media asset information database for the media asset details data corresponding to the media asset ID and the title and ending data, and combine the media asset details data with The title and ending data is returned to the display device.
步骤S3006:显示设备接收到媒资详情数据和片头片尾数据后,可根据媒资详情数据显示媒资详情页。参见图9,媒资详情页可显示多个分集控件,每个分集控件对应一个分集。Step S3006: After receiving the media asset detail data and the title and ending data, the display device can display the media asset details page according to the media asset detail data. Referring to Figure 9, the media asset details page can display multiple episode controls, and each episode control corresponds to one episode.
步骤S3007和步骤S3008:用户在媒资详情页点击一个分集控件后,显示设备可生成该分集控件对应的点播请求,将该点播请求发送给面向终端模块。为方便描述,用户点播的分集可称为第一分集,该第一分集可为除目标媒资的最后一个分集之外的任一分集,该第一分集也可称为第一视频,该第一分集的下一分集为第二分集,第二分集也可称为第二视频。第一分集的点播请求可包括目标媒资的媒资标识和第一分集的分集标识,分集标识可为分集序号。Steps S3007 and S3008: After the user clicks a diversity control on the media asset details page, the display device can generate an on-demand request corresponding to the diversity control and send the on-demand request to the terminal-oriented module. For convenience of description, the episode requested by the user can be called the first episode. The first episode can be any episode except the last episode of the target media asset. The first episode can also be called the first video. The first episode can also be called the first video. The next episode of one episode is the second episode, and the second episode can also be called the second video. The on-demand request for the first episode may include a media asset identifier of the target media asset and a diversity identifier of the first episode, and the diversity identifier may be a diversity sequence number.
步骤S3009至步骤S3011:面向终端模块接收到第一分集的点播请求后,媒资信息库可根据媒资标识以及分集标识获取第一分集的视频流数据,向面向终端模块返回第一分集的视频流数据,而后面向终端模块将第一分集的视频流数据返回给显示设备。Steps S3009 to S3011: After the terminal-oriented module receives the on-demand request for the first episode, the media asset information library can obtain the video stream data of the first episode based on the media asset identifier and the episode identifier, and return the video of the first episode to the terminal-oriented module. stream data, and then the terminal-facing module returns the video stream data of the first episode to the display device.
步骤S3012:显示设备可启动第一播放器解析第一分集的视频流数据,进而通过第一窗口播放该第一分集。参见图10,为根据一些实施例的第一分集的播放界面示意图,如图10所示,示例性的,该第一分集的播放时长为46分钟。Step S3012: The display device can start the first player to parse the video stream data of the first episode, and then play the first episode through the first window. Referring to FIG. 10 , a schematic diagram of the playback interface of the first episode according to some embodiments is shown. As shown in FIG. 10 , for example, the playback duration of the first episode is 46 minutes.
步骤S3013:显示设备在启动第一窗口后,实时监测第一窗口的播放进度。在播放进度为预设进度,例如,播放进度为50%,即播放完第23分钟,或距离第一分集的片尾还剩10秒时,启动跟练视频的推荐进程。跟练视频的推荐进程可用于向服务器获取跟练视频的信息。视频点播程序的主线程可实时向跟练视频的推荐进程同步第一窗口的播放进度,便于跟练视频的推荐进程根据该第一窗口的播放进度执行第二窗口的启动与撤销、第一窗口与第二窗口播放内容的切换等动作。Step S3013: After starting the first window, the display device monitors the playback progress of the first window in real time. When the playback progress is the preset progress, for example, when the playback progress is 50%, that is, when the 23rd minute has been played, or there are 10 seconds left before the end of the first episode, the recommendation process of the follow-up video is started. The recommendation process of following training videos can be used to obtain information about following training videos from the server. The main thread of the video on demand program can synchronize the playback progress of the first window with the recommendation process of the follow-up video in real time, so that the recommendation process of the follow-up video can start and cancel the second window and the first window according to the playback progress of the first window. Actions such as switching the content played in the second window.
在一些实施例中,也可不设置跟练视频的推荐进程,由显示设备的主线程向服务器获取跟练视频的信息并执行第二窗口的启动与撤销、第一窗口与第二窗口播放内容的切换。In some embodiments, the recommendation process of the follow-up video may not be set, and the main thread of the display device obtains the information about the follow-up video from the server and performs the startup and cancellation of the second window, and the playback of the content in the first window and the second window. switch.
步骤S3014:跟练视频的推荐进程在启动后,可从目标媒资的详情页数据中获取第一分集的播放时长,若播放时长小于阈值时长,如5分钟,该跟练视频的推荐进程自动结束,避免在第一分集的播放时间较短时播放跟练视频而对用户连续观看第一分集和第二分集产生不佳影响。若播放时长大于5分钟,则可计算第一分集的片尾时长和第二分集的片头时长,计算该片尾时长与片头时长的和,再减去一个5秒的偏移量,得到跟练视频的timeLength(可播放时长)。若可播放时长大于0,则继续执行跟练视频的推荐进程的后续逻辑,若可播放时长小于或等于0,则该跟练视频的推荐进程自动结束。Step S3014: After the recommendation process of the follow-up video is started, the playback duration of the first episode can be obtained from the details page data of the target media asset. If the playback duration is less than the threshold duration, such as 5 minutes, the recommendation process of the follow-up video will automatically End, to avoid playing the follow-up video when the first episode's playback time is short, which would have a negative impact on the user's continuous viewing of the first and second episodes. If the playback time is longer than 5 minutes, you can calculate the ending duration of the first episode and the opening duration of the second episode, calculate the sum of the ending duration and the opening duration, and then subtract an offset of 5 seconds to get the length of the follow-up video timeLength (playable duration). If the playable duration is greater than 0, the subsequent logic of the follow-up video recommendation process will continue to be executed. If the playable duration is less than or equal to 0, the follow-up video recommendation process will automatically end.
步骤S3015:若可播放时长大于0,则跟练视频的推荐进程可生成跟练视频的查询请求,该跟练视频的查询请求包括用户标识和可播放时长,其中,用户标识可为customerId。在生成跟练视频的查询请求后,跟练视频的推荐进程可向跟练视频库的“健身跟练推荐片段”查询接口 /vod/media/gym/recom发送跟练视频的查询请求,以获取跟练视频的信息。Step S3015: If the playable duration is greater than 0, the recommendation process of the follow-up video can generate a query request for the follow-up video. The query request for the follow-up video includes a user ID and a playable duration, where the user ID can be customerId. After generating the query request for the follow-up video, the recommendation process of the follow-up video can send the query request for the follow-up video to the "Fitness Follow-Up Recommended Clips" query interface /vod/media/gym/recom in the follow-up video library to obtain Follow the training video information.
步骤S3016至步骤S3018:面向终端模块可查询用户标识对应的跟练视频的播放记录,根据该播放记录得到该用户最近一段时间内练习次数最多的跟练视频,根据可播放时长计算显示设备播放该跟练媒资的起点和终点,然后将包含该跟练视频的媒资数据的查询结果下发给显示设备。其中,起点和终点之间的差值与可播放时长相同,起点可称为播放开始时间点startTime,可为该跟练视频的第0秒,终点可称为播放结束时间点endTime,终点可根据起点与可播放时长的和值得到。最近一段时间可为最近一星期或当日。跟练视频的媒资数据包括跟练视频的媒资标识gymVideoId、播放开始时间点startTime以及播放结束时间点endTime。Steps S3016 to S3018: The terminal-oriented module can query the playback record of the follow-up video corresponding to the user ID, obtain the follow-up video that the user has practiced the most in the recent period based on the playback record, and calculate the playback time based on the display device to play the video. Follow the starting point and end point of the media asset, and then send the query results containing the media asset data of the follow-up video to the display device. Among them, the difference between the starting point and the end point is the same as the playable duration. The starting point can be called the playback start time point startTime, which can be the 0th second of the follow-up video. The end point can be called the playback end time point endTime. The end point can be based on The sum of the starting point and playable duration is obtained. The most recent period can be the last week or the current day. The media asset data of the follow-up video includes the media asset identifier gymVideoId, playback start time point startTime, and playback end time point endTime of the follow-up video.
在一些实施例中,面向终端模块可查询全部用户对应的跟练视频的播放记录,从而得到最近一段时间内热度最高的跟练视频,根据可播放时长计算显示设备播放该跟练媒资的起点和终点,将包含该跟练视频的媒资数据的查询结果下发给显示设备,其中,最近一段时间可为最近一星期或当日。In some embodiments, the terminal-oriented module can query the playback records of the follow-up videos corresponding to all users, thereby obtaining the most popular follow-up videos in the recent period, and calculate the starting point for the display device to play the follow-up media assets based on the playable duration. and the end point, and the query results containing the media asset data of the training video are sent to the display device, where the latest period of time can be the last week or the current day.
在一些实施例中,面向终端模块可查询时长与可播放时长在预设差值范围内的跟练视频,并根据用户兴趣标签从查询到的跟练视频中筛选出一个待下发的跟练视频,根据可播放时长计算显示设备播放该待下发的跟练媒资的起点和终点,将包含该待下发的跟练视频的媒资数据的查询结果下发给显示设备,其中,用户兴趣标签可基于用户跟练过的视频生成。In some embodiments, the terminal-oriented module can query follow-up videos whose duration and playable duration are within a preset difference range, and filter out a follow-up video to be issued from the queried follow-up videos based on user interest tags. video, calculate the starting point and end point of the display device playing the follow-up media assets to be distributed based on the playable duration, and deliver the query results containing the media asset data of the follow-up videos to be distributed to the display device, where the user Interest tags can be generated based on videos that users have followed.
在一些实施例中,面向终端模块若查询不到跟练视频,则将不包含跟练视频的媒资数据的查询结果返回给显示设备。In some embodiments, if the terminal-oriented module cannot query the follow-up video, it will return the query result of the media asset data that does not include the follow-up video to the display device.
在一些实施例中,跟练视频的推荐进程在接收到查询结果后,若查询结果中不包含跟练视频的媒资数据,则结束跟练视频的推荐进程。In some embodiments, after receiving the query result, the recommendation process of the follow-up video will end the recommendation process of the follow-up video if the query result does not contain the media asset data of the follow-up video.
在一些实施例中,跟练视频的推荐进程在接收到查询结果后,若查询结果中包含跟练视频的媒资数据,则继续执行跟练视频的推荐进程。In some embodiments, after receiving the query result, the recommendation process of the follow-up video continues to execute the recommendation process of the follow-up video if the query result contains the media asset data of the follow-up video.
参见图11,为根据一些实施例的显示设备在接收到查询结果后的一个时序示意图。如图11所示,步骤S4001和步骤S4002:用户输入切换窗口指令,若查询结果包含跟练视频的媒资数据,跟练视频的推荐进程在即将播放完第一分集的片尾时,向面向终端模块发送跟练视频的点播请求。例如,在播放到距离第一分集的片尾还有3秒时,生成并向面向终端模块发送跟练视频的点播请求。跟练视频的点播请求包括跟练视频的媒资标识gymVideoId、播放开始时间点startTime以及播放结束时间点endTime。Refer to Figure 11, which is a timing diagram after the display device receives the query result according to some embodiments. As shown in Figure 11, step S4001 and step S4002: the user inputs a window switching instruction. If the query result contains the media asset data of the follow-up video, the recommendation process of the follow-up video will be directed to the terminal when the end of the first episode is about to be played. The module sends an on-demand request for the training video. For example, when the playback reaches 3 seconds before the end of the first episode, an on-demand request for the follow-up video is generated and sent to the terminal-oriented module. The on-demand request for a follow-up video includes the gymVideoId, the media asset identifier of the follow-up video, the playback start time point startTime, and the playback end time point endTime.
步骤S4003和步骤S4004:面向终端模块接收到跟练视频的点播请求后,从跟练视频库查询该媒资标识gymVideoId对应播放开始时间点startTime和播放结束时间点endTime之间的视频流数据,将该视频流数据返回给显示设备。Steps S4003 and S4004: After receiving the on-demand request for the follow-up video, the terminal-oriented module queries the video stream data between the playback start time point startTime and the playback end time point endTime corresponding to the media asset identifier gymVideoId from the follow-up video library, and This video stream data is returned to the display device.
步骤S4005和步骤S4006:跟练视频的推荐进程在接收到跟练视频的视频流数据后,根据该视频流数据启动第二窗口播放跟练视频。参见图12,第二窗口可为一个小窗窗口,位于第一窗口的右上角,遮挡第一窗口的部分显示画面。第二窗口的音量可小于第一窗口的音量,以减少对第一窗口的播放效果的干扰。Steps S4005 and S4006: After receiving the video stream data of the follow-up video, the recommendation process of the follow-up video starts the second window to play the follow-up video based on the video stream data. Referring to Figure 12, the second window may be a small window located in the upper right corner of the first window, blocking part of the display screen of the first window. The volume of the second window may be smaller than the volume of the first window to reduce interference with the playback effect of the first window.
在一些实施例中,图12中的第二窗口显示按菜单键全屏跟练的提示,以提示用户可按菜单键将第二窗口全屏显示。In some embodiments, the second window in Figure 12 displays a prompt to press the menu key to follow the practice in full screen, so as to prompt the user to press the menu key to display the second window in full screen.
在一些实施例中,第二窗口的音量可根据第一窗口的音量成正相关,避免由于第一窗口的音量过大而使用户忽略了第二窗口的声音。In some embodiments, the volume of the second window may be positively correlated with the volume of the first window to prevent the user from ignoring the sound of the second window due to the excessive volume of the first window.
步骤S4007:跟练视频的推荐进程在启动第二窗口时,可启动一个超时任务,超时任务对应的超时时间可为20秒,在该超时时间内,对用户操作进行监测。监测的用户操作可包括输入切换窗口指令。若在超时时间内,监测到用户操作为输入切换窗口指令,则对该指令进行响应,并结束超时任务。Step S4007: When starting the second window of the recommendation process of following the training video, a timeout task can be started. The timeout period corresponding to the timeout task can be 20 seconds. During the timeout period, user operations are monitored. Monitored user operations may include inputting a window switching instruction. If within the timeout period, it is detected that the user operation is to enter a window switching command, the system will respond to the command and end the timeout task.
在一些实施例中,用户输入切换窗口指令的方式可为按遥控器的确认键或菜单键。In some embodiments, the user inputs the window switching instruction by pressing the confirmation key or the menu key of the remote control.
步骤S4008和步骤S4009:跟练视频的推荐进程对该切换窗口指令的响应为:将第一窗口调整为显示第二播放器的播放内容,将第二窗口调整为显示第一播放器的播放内容。上述两个步骤可同时执行,也可依次执行,其中,依次执行时,上述两个步骤不分先后。将第一窗口调整为显示第二播放器的播放内容,将第二窗口调整为显示第一播放器的播放内容实现了视觉效果上两个窗口播放内容的调换。第二窗口的音量调小后可实现第二窗口的音频成为第一窗口的背景音乐的听觉效果,或者,也可将第一窗口的音量调小为静音,以减少对第二窗口的播放效果的干扰。Steps S4008 and S4009: The response of the recommendation process of the follow-up video to the switching window instruction is: adjust the first window to display the playback content of the second player, and adjust the second window to display the playback content of the first player. . The above two steps can be executed at the same time or in sequence. When executed in sequence, the above two steps are not in any order. Adjusting the first window to display the playback content of the second player, and adjusting the second window to display the playback content of the first player realizes the visual exchange of the playback content of the two windows. After the volume of the second window is turned down, the audio of the second window becomes the background music of the first window. Alternatively, the volume of the first window can be turned down to mute to reduce the playback effect on the second window. interference.
参见图13,当用户输入切换窗口指令后,第二窗口的播放内容与第一窗口的播放内容实现了互换。Referring to Figure 13, when the user inputs a window switching instruction, the playback content of the second window and the playback content of the first window are interchanged.
在一些实施例中,当第一窗口播放第三视频时,用户可根据第一窗口的播放内容进行跟练。In some embodiments, when the first window plays the third video, the user can follow along according to the playing content of the first window.
在一些实施例中,图13中的第二窗口显示按菜单键继续观看视频的提示,以提示用户可按菜单键将第二窗口的播放内容与第一窗口的播放内容互换。示例性的,也可将菜单键替换为返回键或其他按键。In some embodiments, the second window in FIG. 13 displays a prompt to press the menu key to continue watching the video, so as to prompt the user to press the menu key to exchange the playing content of the second window with the playing content of the first window. For example, the menu key can also be replaced by a return key or other keys.
在一些实施例中,用户在跟练一段时间后,若不想继续跟练,可按遥控器的返回键,以向显示设备输入退出指令。显示设备根据接收到该退出指令,则将第一窗口的播放内容切换为第二播放器的播放内容,并将第二窗口撤销,结束跟练视频的推荐进程。In some embodiments, if the user does not want to continue practicing after practicing for a period of time, he or she can press the return key on the remote control to input an exit command to the display device. Upon receiving the exit instruction, the display device switches the playback content of the first window to the playback content of the second player, cancels the second window, and ends the recommendation process of the follow-up video.
步骤S4010:当第二窗口播放第一分集时,在播放完第一分集的片尾时,显示设备的主线程可向面向终端模块发送第二分集的点播请求,或者,显示设备也可在第一分集开始播放片尾时或即将播放完片尾时向面向终端模块发送第二分集的点播请求。第二分集的点播请求可包括目标媒资的媒资标识和第二分集对应的分集序号。Step S4010: When the second window plays the first episode, and after playing the end of the first episode, the main thread of the display device can send an on-demand request for the second episode to the terminal-oriented module, or the display device can also send an on-demand request for the second episode to the terminal-oriented module. When the episode begins to play the end of the episode or when the end of the episode is about to be played, an on-demand request for the second episode is sent to the terminal-oriented module. The on-demand request for the second episode may include the media asset identifier of the target media asset and the episode sequence number corresponding to the second episode.
步骤S4011和步骤S4012:面向终端模块在接收到第二分集的点播请求后,可从媒资信息库获取第二分集的视频流数据,将第二分集的视频流数据返回给显示设备。Steps S4011 and S4012: After receiving the on-demand request for the second episode, the terminal-oriented module may obtain the video stream data of the second episode from the media asset information library and return the video stream data of the second episode to the display device.
步骤S4013和步骤S4014:显示设备的主线程在接收到第二分集的视频流数据后,可在第一分集的片尾播放完后,播放第二分集的视频流数据。Steps S4013 and S4014: After receiving the video stream data of the second episode, the main thread of the display device can play the video stream data of the second episode after the end of the first episode is played.
步骤S4015:在第二分集的片头即将播放完时,可将第二窗口与第一窗口的播放内容互换。Step S4015: When the title of the second episode is about to be played, the playback content of the second window and the first window can be exchanged.
在一些实施例中,由于跟练视频的可播放时长小于第一分集的片尾时长与第二分集的片头时长的和值,因此,在跟练视频播放完毕后,可能第二分集的片头未播放完,此时,可执行第二窗口与第一窗口的播放内容互换,并撤销第二窗口。In some embodiments, since the playable duration of the follow-up video is less than the sum of the ending duration of the first episode and the opening duration of the second episode, after the follow-up video is played, the opening of the second episode may not be played. Finished, at this time, the playback content of the second window and the first window can be exchanged, and the second window can be cancelled.
步骤S4016:在播放第二分集的正片时,第二窗口撤销,不再对第一窗口的显示内容形成遮挡,参见图14所示的窗口。Step S4016: When playing the feature film of the second episode, the second window is canceled and no longer blocks the display content of the first window. See the window shown in Figure 14.
参见图15,为根据一些实施例的显示设备在接收到查询结果后的一个时序示意图。如图15所示,若查询结果包含跟练视频的媒资数据,显示设备在启动超时任务进行监测用户操作后,执行步骤S40071:若在超时时间未接收到用户操作,则撤销第二窗口。Refer to Figure 15, which is a timing diagram after the display device receives the query result according to some embodiments. As shown in Figure 15, if the query result contains the media asset data of the follow-up video, after the display device starts the timeout task to monitor the user operation, step S40071 is executed: if no user operation is received within the timeout period, the second window is cancelled.
在步骤S4013返回第二分集的视频流数据之后,执行步骤S4017:在第一窗口播放第二分集。After step S4013 returns the video stream data of the second episode, step S4017 is executed: playing the second episode in the first window.
由上述实施例可见,本申请实施例通过在第一窗口播放第一视频的片尾时开始通过第二窗口播放提示用户进行运动的第三视频,有利于促进用户进行体育锻炼,第三视频可持续播放到第二视频的片头结束前,有利于保障用户锻炼的时间;用户可通过窗口切换指令来将第二窗口的第三视频切换至第一窗口显示,也可不进行操作,使第二窗口在播放一段时间后自动退出,能够满足用户对体育锻炼的不同需求,提高了用户观看连播媒资的用户体验。It can be seen from the above embodiments that the embodiment of the present application starts playing the third video prompting the user to exercise through the second window when the first window plays the end of the first video, which is beneficial to promoting the user to perform physical exercise, and the third video can be sustainable Playing until the end of the second video's title is helpful to ensure the user's exercise time; the user can use the window switching command to switch the third video in the second window to the first window for display, or do not perform the operation to make the second window display in the first window. Automatically exiting after playing for a period of time can meet the different needs of users for physical exercise and improve the user experience of watching continuous media resources.
除了通常的可以在电视上观看视频之外,人们也可以在手机、平板电脑、计算机、笔记本电脑等具有显示屏的这类终端设备上观看视频,根据一些实施例,上述媒资连播方法也适用于上述终端设备。此外,根据一些实施例,人们也可以将上述终端设备上的视频投屏到诸如电视等的显示设备上进行观看。In addition to generally watching videos on TV, people can also watch videos on mobile phones, tablets, computers, laptops and other such terminal devices with display screens. According to some embodiments, the above media asset streaming method is also applicable on the above terminal equipment. In addition, according to some embodiments, people can also cast the video on the above terminal device to a display device such as a television for viewing.
然而,电视与手机屏幕的长宽比普遍存在很大差异,且手机可以以横屏录制、竖屏录制等多种姿态进行视频的采集,因此手机发送的投影视频往往与电视上用于播放投屏视频的视频播放窗口不匹配,进而导致出现视频画面不完整、比例失调等问题,严重影响用户的使用体验。因此在电视接收到手机发送的投屏视频流时,如何对调整投屏视频流以使投屏视频流能够适配视频播放窗口是一个亟待解决的问题。However, the aspect ratios of TV and mobile phone screens are generally very different, and mobile phones can capture videos in various postures such as horizontal screen recording and vertical screen recording. Therefore, the projected videos sent by mobile phones are often different from those used for playing projections on TVs. The video playback window of the screen video does not match, which leads to problems such as incomplete video images and imbalanced proportions, seriously affecting the user experience. Therefore, when the TV receives the screen projection video stream sent by the mobile phone, how to adjust the screen projection video stream so that the screen projection video stream can adapt to the video playback window is an urgent problem to be solved.
在一些实施例中,控制器250响应于接收到的触发指令,在所述显示器260显示跟练界面,其中,所述跟练界面包括第一视频播放窗口和第二视频播放窗口(也可称作第一窗口和第二窗口),所述第二视频窗口用于播放从服务器获取的健身视频;In some embodiments, the controller 250 displays a follow-up interface on the display 260 in response to the received trigger instruction, wherein the follow-up interface includes a first video playback window and a second video playback window (also called (as a first window and a second window), the second video window is used to play the fitness video obtained from the server;
在一些实施例中,当控制器250通过通信器220接收终端设备发送的所述终端设备基于其视频录制装置生成的第一视频流时,通过控制器250根据所述标识信息、视频播放参数以及所述第一视频流的尺寸获取缩放比例,根据所述缩放比例对所述第一视频流进行缩放获取第二视频流,以及根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数;基于所述布局偏移参数对所述第二视频流进行偏移,并控制所述显示器260在所述第一视频窗口播放偏移后的所述第二视频流。In some embodiments, when the controller 250 receives the first video stream generated by the terminal device based on its video recording device sent by the terminal device through the communicator 220, the controller 250 uses the identification information, video playback parameters and The size of the first video stream is used to obtain a scaling ratio, the first video stream is scaled according to the scaling ratio to obtain a second video stream, and the layout is obtained according to the video playback parameters and the size of the second video stream. Offset parameter: offset the second video stream based on the layout offset parameter, and control the display 260 to play the offset second video stream in the first video window.
在一些实施例中,所述标识信息包括:第一姿态标识或第二姿态标识;当所述标识信息包括第一姿态标识时,所述标识信息用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为竖屏姿态;当所述标识信息包括第二姿态标识时,所述标识信息用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为横屏姿态。其中,所述第一姿态标识对应的视频播放参数和所述第二姿态标识对应的视频播放参数不同。In some embodiments, the identification information includes: a first gesture identification or a second gesture identification; when the identification information includes a first gesture identification, the identification information is used to identify the terminal device to record the first gesture. The posture when recording the video corresponding to the video stream is the portrait posture; when the identification information includes a second posture identification, the identification information is used to identify the posture when the terminal device records the video corresponding to the first video stream. Horizontal posture. Wherein, the video playback parameters corresponding to the first gesture identification and the video playback parameters corresponding to the second gesture identification are different.
在一些实施例中,当所述标识信息用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为 竖屏姿态时,所述控制器250根据所述缩放比例对所述第一视频流进行缩放获取第二视频流,以及根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数,包括,所述控制器250根据所述第一视频流的宽度和目标宽度获取第一缩放比例;所述目标宽度为所述第一视频播放窗口的宽度或者所述预设视频流尺寸中的宽度;In some embodiments, when the identification information is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a portrait posture, the controller 250 adjusts the posture of the terminal device according to the scaling ratio. The first video stream is scaled to obtain the second video stream, and the layout offset parameter is obtained according to the video playback parameter and the size of the second video stream, including: the controller 250 according to the width of the first video stream. and the target width to obtain the first scaling ratio; the target width is the width of the first video playback window or the width of the preset video stream size;
使用所述第一缩放比例对所述第一视频流进行缩放获取所述第二视频流;根据所述第二视频流的高度和所述第一视频播放窗口的高度,获取第一布局偏移参数;Scale the first video stream using the first scaling ratio to obtain the second video stream; obtain a first layout offset according to the height of the second video stream and the height of the first video playback window parameter;
所述控制器250基于所述布局偏移参数对所述第二视频流进行偏移包括,所述控制器基于所述第一布局偏移参数在高度方向上对所述第二视频流进行偏移。The controller 250 offsets the second video stream based on the layout offset parameter, including the controller offsets the second video stream in a height direction based on the first layout offset parameter. shift.
其中,所述第一缩放比例为所述目标宽度与所述第一视频流的宽度的比值;所述第一布局偏移参数为所述第二视频流的高度与所述第一视频播放窗口的高度的差值的二分之一。Wherein, the first scaling ratio is the ratio of the target width to the width of the first video stream; the first layout offset parameter is the height of the second video stream to the first video playback window. half the difference in height.
在一些实施例中,当所述标识信息用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为横屏姿态时,In some embodiments, when the identification information is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a horizontal screen posture,
所述控制器250根据所述标识信息、视频播放参数以及所述第一视频流的尺寸获取缩放比例,根据所述缩放比例对所述第一视频流进行缩放获取第二视频流,包括:The controller 250 obtains a scaling ratio according to the identification information, video playback parameters and the size of the first video stream, and scales the first video stream according to the scaling ratio to obtain a second video stream, including:
控制器250根据所述第一视频流的高度和目标高度,获取第二缩放比例;所述目标高度为所述第一视频播放窗口的高度或者所述预设视频流尺寸中的高度;使用所述第二缩放比例对所述第一视频流进行缩放,获取所述第二视频流;The controller 250 obtains the second scaling ratio according to the height of the first video stream and the target height; the target height is the height of the first video playback window or the height in the preset video stream size; using the The second scaling ratio scales the first video stream to obtain the second video stream;
所述控制器250根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数,包括:控制器250根据所述第二视频流的宽度和所述第一视频播放窗口的宽度,获取第二布局偏移参数;基于所述第二布局偏移参数在宽度方向上对所述第二视频流进行偏移。其中,所述第二缩放比例为所述目标高度与所述第一视频流的高度的比值;所述第二布局偏移参数为所述第二视频流的宽度与所述第一视频播放窗口的宽度的差值的二分之一。The controller 250 obtains the layout offset parameter according to the video playback parameter and the size of the second video stream, including: the controller 250 obtains the layout offset parameter according to the width of the second video stream and the width of the first video playback window. , obtain a second layout offset parameter; and offset the second video stream in the width direction based on the second layout offset parameter. Wherein, the second scaling ratio is the ratio of the target height to the height of the first video stream; the second layout offset parameter is the width of the second video stream and the first video play window half the difference in width.
在一些实施例中所述通信器250基于所述布局偏移参数对所述第二视频流进行偏移,并控制所述显示器在所述第一视频窗口播放偏移后的所述第二视频流之后,所述控制器250还被配置为:In some embodiments, the communicator 250 offsets the second video stream based on the layout offset parameter, and controls the display to play the offset second video in the first video window. After streaming, the controller 250 is also configured to:
响应于接收到的剪裁播放指令,根据所述选定区域的尺寸和所述第一视频播放窗口的尺寸,获取第三缩放比例;所述剪裁播放指令携带有选定区域的尺寸和所述选定区域的位置信息,用于指示基于所述选定区域内所述第一视频流的视频内容进行视频播放;所述第三缩放比例为第一比值与第二比值中较小的一个比值,所述第一比值为所述第一视频播放窗口的高度与所述选定区域的高度的比值,所述第二比值为所述第一视频播放窗口的宽度与所述选定区域的宽度的比值;In response to the received trimming and playback instruction, a third zoom ratio is obtained according to the size of the selected area and the size of the first video playback window; the trimming and playback instruction carries the size of the selected area and the size of the selected area. The position information of a certain area is used to indicate video playback based on the video content of the first video stream in the selected area; the third scaling ratio is the smaller of the first ratio and the second ratio, The first ratio is the ratio of the height of the first video playback window to the height of the selected area, and the second ratio is the ratio of the width of the first video playback window to the width of the selected area. ratio;
使用所述第三缩放比例对所述第一视频流进行缩放获取第三视频流;根据所述第三缩放比例、所述第一视频播放窗口的宽度、所述选定区域的位置信息以及所述选定区域的宽度获取第三布局偏移参数;根据所述第三缩放比例、所述第一视频播放窗口的高度、所述选定区域的位置信息以及所述选定区域的高度获取第四布局偏移参数;Use the third zoom ratio to zoom the first video stream to obtain a third video stream; according to the third zoom ratio, the width of the first video playback window, the position information of the selected area and the Obtain the third layout offset parameter based on the width of the selected area; obtain the third layout offset parameter according to the third scaling ratio, the height of the first video playback window, the position information of the selected area, and the height of the selected area. Four layout offset parameters;
基于所述第三视频流在所述第一视频播放窗口中进行视频播放,并基于所述第三布局偏移参数在宽度方向上对所述第三视频流进行偏移,基于所述第四布局偏移参数在高度方向上对所述第三视频流进行偏移,并控制所述显示器在所述第一视频窗口播放偏移后的所述第三视频流。Video playback is performed in the first video playback window based on the third video stream, and the third video stream is offset in the width direction based on the third layout offset parameter. Based on the fourth The layout offset parameter offsets the third video stream in the height direction, and controls the display to play the offset third video stream in the first video window.
在一些实施例中,所述控制器250根据所述第三缩放比例、所述第一视频播放窗口的宽度、所述选定区域的位置信息以及所述选定区域的宽度获取第三布局偏移参数,包括:In some embodiments, the controller 250 obtains a third layout bias according to the third zoom ratio, the width of the first video playback window, the position information of the selected area, and the width of the selected area. Shift parameters, including:
所述控制器250通过如下公式一计算所述第三布局偏移参数:The controller 250 calculates the third layout offset parameter through the following formula 1:
所述公式一为:CLIP 3=(X+select_w/2)*R3-WL/2; The first formula is: CLIP 3 = (X+select_w/2)*R3-WL/2;
所述控制器250根据所述第三缩放比例、所述第一视频播放窗口的高度、所述选定区域的位置信息以及所述选定区域的高度获取第四布局偏移参数,包括:所述控制器250通过如下公式二计算所述第三布局偏移参数:The controller 250 obtains a fourth layout offset parameter according to the third zoom ratio, the height of the first video playback window, the position information of the selected area, and the height of the selected area, including: The controller 250 calculates the third layout offset parameter through the following formula 2:
所述公式二为:CLIP 4=(Y+select_h/2)*R3-HL/2; The second formula is: CLIP 4 = (Y+select_h/2)*R3-HL/2;
其中,CLIP 3为所述第三布局偏移参数,CLIP 4为所述第四布局偏移参数,X为所述选定区域的左侧边缘到所述第一视频流的左侧边缘的距离,Y为所述选定区域的顶侧边缘到所述第一视频流的顶侧边缘的距离,select_w/2和select_h/2分别为所述选定区域的宽度和高度,R3为所述第三缩放比例,WL和HL分别为所述第一视频播放窗口的宽度和高度。 Wherein, CLIP 3 is the third layout offset parameter, CLIP 4 is the fourth layout offset parameter, and X is the distance from the left edge of the selected area to the left edge of the first video stream. , Y is the distance from the top edge of the selected area to the top edge of the first video stream, select_w/2 and select_h/2 are the width and height of the selected area respectively, and R3 is the Three scaling ratios, WL and HL are the width and height of the first video playback window respectively.
图16为根据本申请一些实施例提供的投屏方法的流程示意图,如图16所示,本申请实施例提供的投屏方法包括如下步骤:Figure 16 is a schematic flowchart of a screen casting method provided according to some embodiments of the present application. As shown in Figure 16, the screen casting method provided by embodiments of the present application includes the following steps:
S51、接收终端设备发送的第一视频流。S51. Receive the first video stream sent by the terminal device.
其中,所述第一视频流为通过所述终端设备的视频录制装置进行视频采集得到的视频流,且携带有用 于标识所述终端设备录制所述第一视频流对应的视频时的姿态的标识信息。Wherein, the first video stream is a video stream obtained through video collection by a video recording device of the terminal device, and carries an identifier used to identify the posture of the terminal device when recording the video corresponding to the first video stream. information.
在一些实施例中,所述第一视频流可以为终端设备通过视频录制装置实时进行视频录制并发送到显示设备的视频流。在另一些实施例中,所述第一视频流也可以为终端设备对预先录制的视频进行投屏显示时向显示设备发送的视频流。In some embodiments, the first video stream may be a video stream that is recorded in real time by the terminal device through a video recording device and sent to the display device. In other embodiments, the first video stream may also be a video stream sent to the display device when the terminal device displays the pre-recorded video on the screen.
在一些实施例中,本申请实施例中的所述终端设备可以为手机,所述终端设备的视频录制装置可以为手机的前置/后置摄像头。In some embodiments, the terminal device in the embodiment of the present application may be a mobile phone, and the video recording device of the terminal device may be a front/rear camera of the mobile phone.
需要说明的是,在接收终端设备发送的第一视频流之前,可以先接收触发指令,显示器显示跟练界面,其中,跟练界面包括第一视频播放窗口和第二视频播放窗口,第二视频窗口用于播放从服务器获取的健身视频。It should be noted that before receiving the first video stream sent by the terminal device, the trigger instruction can be received first, and the monitor displays a follow-up training interface, where the follow-up training interface includes a first video playback window and a second video playback window. The window is used to play fitness videos obtained from the server.
其中,该触发指令可以是用户在终端设备上进行触发显示跟练界面的操作之后触发的。The triggering instruction may be triggered after the user performs an operation on the terminal device to trigger the display of the follow-up training interface.
可选的,该触发指令也可以是显示设备接收的其他控制设备触发显示跟练界面的指令。Optionally, the triggering instruction may also be an instruction received by the display device from another control device to trigger the display of the follow-up training interface.
S52、根据所述标识信息、视频播放参数以及所述第一视频流的尺寸获取缩放比例。S52. Obtain the scaling ratio according to the identification information, video playback parameters and the size of the first video stream.
其中,所述视频播放参数包括用于播放所述第一视频流的第一视频播放窗口的尺寸和/或预设视频流尺寸。Wherein, the video playback parameters include the size of the first video playback window used to play the first video stream and/or the preset video stream size.
在一些实施例中,可以仅根据所述标识信息、第一视频播放窗口的尺寸以及所述第一视频流的尺寸获取缩放比例,从而使缩放后的第一视频流的尺寸与第一视频播放窗口的尺寸相适应。In some embodiments, the scaling ratio may be obtained only based on the identification information, the size of the first video playback window, and the size of the first video stream, so that the size of the scaled first video stream is the same as that of the first video playback window. Adapt to the size of the window.
在一些实施例中,可以仅根据所述标识信息、预设视频流尺寸以及所述第一视频流的尺寸获取缩放比例,从而将第一视频流缩放为预设视频流尺寸的视频流。In some embodiments, the scaling ratio may be obtained only based on the identification information, the preset video stream size, and the size of the first video stream, thereby scaling the first video stream to a video stream of the preset video stream size.
在一些实施例中,可以根据所述标识信息、第一视频播放窗口的尺寸、预设视频流尺寸以及所述第一视频流的尺寸获取缩放比例,从而使缩放后的第一视频流的尺寸在与第一视频播放窗口的尺寸相适应的同时,更加符合原始视频的长宽比。例如:第一视频播放窗口的尺寸为629×629,为了使投屏视频的长宽比更加符合手机在竖屏状态下的长宽比,则可以将预设视频流尺寸设置为450×629。再例如:第一视频播放窗口的尺寸为629×629,为了使投屏视频的长宽比更加符合手机在横屏状态下的长宽比,则可以将预设视频流尺寸设置为629×450。In some embodiments, the scaling ratio can be obtained according to the identification information, the size of the first video playback window, the preset video stream size, and the size of the first video stream, so that the size of the scaled first video stream While adapting to the size of the first video playback window, it is more consistent with the aspect ratio of the original video. For example: the size of the first video playback window is 629×629. In order to make the aspect ratio of the projected video more consistent with the aspect ratio of the mobile phone in portrait mode, the default video stream size can be set to 450×629. Another example: the size of the first video playback window is 629×629. In order to make the aspect ratio of the screencast video more consistent with the aspect ratio of the mobile phone in landscape mode, the default video stream size can be set to 629×450. .
在一些实施例中,所述标识信息包括:第一姿态标识或第二姿态标识。In some embodiments, the identification information includes: a first posture identification or a second posture identification.
当所述标识信息包括第一姿态标识时,所述标识信息用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为竖屏姿态;When the identification information includes a first posture identification, the identification information is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a portrait posture;
当所述标识信息包括第二姿态标识时,所述标识信息用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为横屏姿态。When the identification information includes a second posture identification, the identification information is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a horizontal screen posture.
第一姿态标识对应的视频播放参数和所述第二姿态标识对应的视频播放参数不同。The video playback parameters corresponding to the first gesture identification and the video playback parameters corresponding to the second gesture identification are different.
视频播放参数包括用于播放第一视频流的第一视频播放窗口的尺寸和/或预设视频流尺寸,本公开实施例的一些实施例中,可以为不同姿态标识设置不同的视频播放参数,也就是说针对所述终端设备录制所述第一视频流对应的视频时的不同姿态,可以对应到不同的第一视频播放窗口的尺寸和/或预设视频流尺寸。The video playback parameters include the size of the first video playback window for playing the first video stream and/or the preset video stream size. In some embodiments of the present disclosure, different video playback parameters can be set for different gesture identifiers, That is to say, different gestures of the terminal device when recording the video corresponding to the first video stream may correspond to different sizes of the first video playback window and/or preset video stream sizes.
在一些实施例中,当所述标识信息包括第一姿态标识时,表示终端设备录制所述第一视频流对应的视频时的姿态为横屏姿态,该情况下对应的视频播放参数可以为:第一视频流的尺寸为1920×1080,所述第一视频播放窗口的尺寸为626×629。In some embodiments, when the identification information includes a first posture identification, it indicates that the posture of the terminal device when recording the video corresponding to the first video stream is a horizontal screen posture. In this case, the corresponding video playback parameters may be: The size of the first video stream is 1920×1080, and the size of the first video playback window is 626×629.
在一些实施例中,当所述标识信息包括第二姿态标识时,表示终端设备录制所述第一视频流对应的视频时的姿态为竖屏姿态,该情况下对应的视频播放参数可以为:第一视频流的尺寸为1080×1920、所述第一视频播放窗口的尺寸为626×629。In some embodiments, when the identification information includes a second posture identification, it indicates that the posture of the terminal device when recording the video corresponding to the first video stream is a portrait posture. In this case, the corresponding video playback parameters may be: The size of the first video stream is 1080×1920, and the size of the first video playback window is 626×629.
S53、根据所述缩放比例对所述第一视频流进行缩放获取第二视频流。S53. Scale the first video stream according to the scaling ratio to obtain the second video stream.
在一些实施例中,所述第一视频流的尺寸为1080×1920,所述缩放比例为R,则所述第二视频流的尺寸为1080*R×1920*R。In some embodiments, the size of the first video stream is 1080×1920, and the scaling ratio is R, then the size of the second video stream is 1080*R×1920*R.
通过上述步骤S53中的缩放操作可以使第一视频流的长度或宽度与视频播放参数相适应。Through the scaling operation in step S53, the length or width of the first video stream can be adapted to the video playback parameters.
S54、根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数。S54. Obtain a layout offset parameter according to the video playback parameter and the size of the second video stream.
通过上述步骤S53中可以使第二视频流的长度或宽度与视频播放参数相适应,但还需对第二视频流的长度和宽度中的另一个进行调整才能使第二视频流的长度和宽度均与视频播放参数相适应。本申请实施例中使第二视频流的长度和宽度中的另一个与视频播放参数相适应的方式为在根据所述第二视频流进行视频播放时,将所述第二视频流在长度和宽度中的另一个的方向上偏移,因此本申请实施例中需要首先根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数,以便后续播放根据所述第二视频流进行视频播放时进行布局偏移。Through the above step S53, the length or width of the second video stream can be adapted to the video playback parameters, but the other of the length and width of the second video stream needs to be adjusted to adjust the length and width of the second video stream. All are compatible with video playback parameters. In the embodiment of the present application, a way to adapt the other one of the length and width of the second video stream to the video playback parameters is to adjust the second video stream between the length and the width when playing the video according to the second video stream. The other one of the widths is offset in the direction. Therefore, in the embodiment of the present application, it is necessary to first obtain the layout offset parameter according to the video playback parameters and the size of the second video stream, so that subsequent playback can be based on the second video stream. Layout offset during video playback.
S55、基于所述布局偏移参数对所述第二视频流进行偏移,并在所述第一视频播放窗口中播放偏移后 的所述第二视频流。S55. Offset the second video stream based on the layout offset parameter, and play the offset second video stream in the first video playback window.
在一些实施例中,基于所述布局偏移参数对所述第二视频流进行偏移可以包括:基于布局参数调整所述第二视频流的坐标系原点,以对所述第二视频流进行偏移。在另一些实施例中,基于所述布局偏移参数对所述第二视频流进行偏移也可以包括:基于布局参数调整计算所述第二视频流的各个边缘(上边缘、下边缘、左边缘以及右边缘)对应的第一视频播放窗口的边缘的距离,然后根据第二视频流的各个边缘对应的第一视频播放窗口的边缘的距离对所述第二视频流进行偏移。In some embodiments, offsetting the second video stream based on the layout offset parameter may include: adjusting the origin of the coordinate system of the second video stream based on the layout parameter to offset the second video stream. offset. In other embodiments, offsetting the second video stream based on the layout offset parameter may also include: calculating each edge (top edge, bottom edge, left edge, etc.) of the second video stream based on layout parameter adjustment. edge and right edge) of the first video playback window, and then offset the second video stream according to the distance between the edges of the first video playback window corresponding to each edge of the second video stream.
本申请实施例提供的投屏方法,在接收到接收终端设备发送的基于所述终端设备的视频录制装置生成的第一视频流时,会先根据所述第一视频流携带的标识信息视频播放参数以及所述第一视频流的尺寸获取缩放比例,然后根据所述缩放比例对所述第一视频流进行缩放获取第二视频流,并根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数,最终基于所述第二视频流在所述第一视频播放窗口中进行视频播放,并基于所述布局偏移参数对所述第二视频流进行偏移。由于所述标识信息用于标识所述终端设备录制所述第一视频流对应的视频时的姿态,且所述视频播放参数包括用于播放所述第一视频流的第一视频播放窗口的尺寸和/或预设视频流尺寸,因此本申请实施例可以根据终端设备录制所述第一视频流对应的视频时的姿态,对第一视频流缩放以使缩放,使得到的第二视频流在横向或纵向上与视频播放参数相适应;由于因为本申请实施例还会根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数,以及在进行视频播放时基于所述布局偏移参数对所述第二视频流进行偏移,因此本申请实施例可以使第二视频流在另一个方向上也与视频播放参数相适应。综上,本申请实例可以在横向和纵向使投屏视频流的尺寸与用于播放投屏视频流的视频播放窗口和/或预设视频流尺寸相适应。The screen projection method provided by the embodiment of the present application, when receiving the first video stream generated by the video recording device of the terminal device and sent by the receiving terminal device, will first play the video according to the identification information carried by the first video stream. parameters and the size of the first video stream to obtain the scaling ratio, then scale the first video stream according to the scaling ratio to obtain the second video stream, and obtain the second video stream according to the video playback parameters and the size of the second video stream. The size obtains the layout offset parameter, and finally performs video playback in the first video playback window based on the second video stream, and offsets the second video stream based on the layout offset parameter. Because the identification information is used to identify the posture of the terminal device when recording the video corresponding to the first video stream, and the video playback parameters include the size of the first video playback window used to play the first video stream. and/or the video stream size is preset. Therefore, the embodiment of the present application can zoom the first video stream according to the posture of the terminal device when recording the video corresponding to the first video stream, so that the obtained second video stream is in It is adapted to the video playback parameters in the horizontal or vertical direction; because the embodiment of the present application will also obtain the layout offset parameter according to the video playback parameters and the size of the second video stream, and based on the layout when playing the video The offset parameter offsets the second video stream, so this embodiment of the present application can make the second video stream adapt to the video playback parameters in another direction. In summary, the example of this application can adapt the size of the screen projection video stream to the video playback window and/or the preset video stream size for playing the screen projection video stream in both horizontal and vertical directions.
作为对上述实施例的扩展和细化,参照图17所示,本申请实施例提供的另一种投屏方法,包括:As an expansion and refinement of the above embodiment, as shown in Figure 17, another screen projection method provided by the embodiment of the present application includes:
S601、接收终端设备发送的第一视频流。S601. Receive the first video stream sent by the terminal device.
其中,所述第一视频流为通过所述终端设备的视频录制装置进行视频录制得到的视频流,且携带有用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为竖屏姿态的标识信息;Wherein, the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries a message indicating that the posture of the terminal device when recording the video corresponding to the first video stream is vertical. Identification information of screen posture;
参照图18所示,图18中以显示设备71为电视、终端设备72为手机为例示出。终端设备72录制所述第一视频流对应的视频时的姿态为竖屏姿态。Referring to FIG. 18 , in FIG. 18 , the display device 71 is a television and the terminal device 72 is a mobile phone. The posture of the terminal device 72 when recording the video corresponding to the first video stream is a portrait posture.
S602、根据所述第一视频流的宽度和第一视频播放窗口的宽度获取第一缩放比例。S602. Obtain the first scaling ratio according to the width of the first video stream and the width of the first video playback window.
本申请实施例中的宽度是指像素行(横向)内包含的像素点的数量,高度是指像素列(纵向)内包含的像素点的数量。In the embodiment of this application, the width refers to the number of pixels included in the pixel row (horizontally), and the height refers to the number of pixels included in the pixel column (vertical).
由于本申请实施例中的第一视频流为基于所述终端设备的视频录制装置生成的视频流,因此所述第一视频流的尺寸与终端设备的屏幕的分辨率相同,例如:终端设备屏幕分辨率为1080×1920,则第一视频流的尺寸为1080×1920。Since the first video stream in the embodiment of the present application is a video stream generated based on the video recording device of the terminal device, the size of the first video stream is the same as the resolution of the screen of the terminal device, for example: the screen of the terminal device The resolution is 1080×1920, and the size of the first video stream is 1080×1920.
在一些实施例中,所述第一缩放比例为所述第一视频播放窗口的宽度与所述第一视频流的宽度的比值。In some embodiments, the first scaling ratio is a ratio of a width of the first video playback window to a width of the first video stream.
设:所述第一缩放比例为R1,所述第一视频流的尺寸为W1×H1,所述第一视频播放窗口的尺寸为WL×HL,则有:Assume: the first scaling ratio is R1, the size of the first video stream is W1×H1, and the size of the first video playback window is WL×HL, then there is:
R1=WL/W1R1=WL/W1
在一些实施例中,当所述第一视频流的尺寸为1080×1920,所述第一视频播放窗口的尺寸为626×629时,所述第一缩放比例R1=629/1080。In some embodiments, when the size of the first video stream is 1080×1920 and the size of the first video playback window is 626×629, the first scaling ratio R1=629/1080.
S603、使用所述第一缩放比例对所述第一视频流进行缩放获取所述第二视频流。S603. Use the first scaling ratio to scale the first video stream to obtain the second video stream.
承上示例所述,所述第一视频流的尺寸为1080×1920,所述第一视频播放窗口的尺寸为626×629,所述第一缩放比例R1=629/1080,则使用所述第一缩放比例对所述第一视频流进行缩放得到的第二视频流的尺寸为629×1118。As mentioned in the above example, the size of the first video stream is 1080×1920, the size of the first video playback window is 626×629, and the first scaling ratio R1=629/1080, then the first scaling ratio R1 is used. The size of the second video stream obtained by scaling the first video stream by a scaling ratio is 629×1118.
至此,所述第二视频流的宽度已与所述第一视频播放窗口相适应。At this point, the width of the second video stream has adapted to the first video playback window.
S604、根据所述第二视频流的高度和所述第一视频播放窗口的高度,获取第一布局偏移参数。S604. Obtain the first layout offset parameter according to the height of the second video stream and the height of the first video playback window.
在一些实施例中,所述第一布局偏移参数为所述第二视频流的高度与所述第一视频播放窗口的高度的差值的二分之一。In some embodiments, the first layout offset parameter is half of the difference between the height of the second video stream and the height of the first video playback window.
设:所述第一布局偏移参数为CLIP 1,所述第二视频流的尺寸为W2×H2,所述第一视频播放窗口的尺寸为WL×HL,则有: Suppose: the first layout offset parameter is CLIP 1 , the size of the second video stream is W2×H2, and the size of the first video playback window is WL×HL, then there is:
CLIP 1=1/2(H2-HL) CLIP 1 =1/2(H2-HL)
在一些实施例中,当所述第二视频流的尺寸为629×1118,所述第一视频播放窗口的尺寸为629×629时,所述第一布局偏移参数CLIP 1=1/2(1118-629)。 In some embodiments, when the size of the second video stream is 629×1118 and the size of the first video playback window is 629×629, the first layout offset parameter CLIP 1 =1/2 ( 1118-629).
S605、基于所述第一布局偏移参数在高度方向上对所述第二视频流进行偏移,并在所述第一视频播放窗口中播放偏移后的所述第二视频流。S605. Offset the second video stream in the height direction based on the first layout offset parameter, and play the offset second video stream in the first video playback window.
参照图19所示,图19中以所述第一视频流的尺寸为1080×1920、所述第一视频播放窗口800的尺 寸为629×629为例对上述实施例提供的投屏方法进行说明。参照图19所示,根据所述第一视频流81的宽度1080和第一视频播放窗口的宽度629获取第一缩放比例629/1080,然后根据第一缩放比例629/1080对所述第一视频流81进行缩放获取第二视频流82,第二视频流82的尺寸为629×1118,再根据所述第二视频流82的高度1118和所述第一视频播放窗口800的高度,获取第一布局偏移参数1/2(1118-629)≈244;最后基于所述第二视频流82在所述第一视频播放窗口800中进行视频播放,并将所述第二视频流向上偏移第一布局偏移参数244,以实现图19所示的显示效果。Referring to FIG. 19 , in FIG. 19 , the screen projection method provided by the above embodiment is explained by taking the size of the first video stream as 1080×1920 and the size of the first video playback window 800 as 629×629 as an example. . Referring to FIG. 19 , a first scaling ratio 629/1080 is obtained according to the width 1080 of the first video stream 81 and the width 629 of the first video playback window, and then the first video is scaled according to the first scaling ratio 629/1080. The stream 81 is zoomed to obtain the second video stream 82. The size of the second video stream 82 is 629×1118. Then, according to the height 1118 of the second video stream 82 and the height of the first video playback window 800, the first video stream 82 is obtained. Layout offset parameter 1/2 (1118-629) ≈ 244; finally, video playback is performed in the first video playback window 800 based on the second video stream 82, and the second video stream is offset upward by the second video stream. A layout offset parameter 244 to achieve the display effect shown in Figure 19.
作为对上述实施例的扩展和细化,参照图20所示,本申请实施例提供的另一种投屏方法,包括:As an expansion and refinement of the above embodiment, as shown in Figure 20, another screen projection method provided by the embodiment of the present application includes:
S901、接收终端设备发送的第一视频流。S901. Receive the first video stream sent by the terminal device.
其中,所述第一视频流为通过所述终端设备的视频录制装置进行视频录制得到的视频流,且携带有用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为竖屏姿态的标识信息;Wherein, the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries a message indicating that the posture of the terminal device when recording the video corresponding to the first video stream is vertical. Identification information of screen posture;
S902、根据所述第一视频流的宽度和预设视频流尺寸中的宽度获取第一缩放比例。S902. Obtain the first scaling ratio according to the width of the first video stream and the width of the preset video stream size.
在一些实施例中,所述第一缩放比例为所述预设视频流尺寸中的宽度与所述第一视频流的宽度的比值。In some embodiments, the first scaling ratio is a ratio of a width in the preset video stream size to a width of the first video stream.
设:所述第一缩放比例为R1,所述第一视频流的尺寸为W1×H1,所述预设视频流尺寸为WS×HS,则有:Assume: the first scaling ratio is R1, the size of the first video stream is W1×H1, and the preset video stream size is WS×HS, then there is:
R1=WS/W1R1=WS/W1
在一些实施例中,当所述第一视频流的尺寸为1080×1920,所述预设视频流尺寸为450×629时,所述第一缩放比例R1=450/1080。In some embodiments, when the size of the first video stream is 1080×1920 and the preset video stream size is 450×629, the first scaling ratio R1=450/1080.
S903、使用所述第一缩放比例对所述第一视频流进行缩放获取所述第二视频流。S903. Use the first scaling ratio to scale the first video stream to obtain the second video stream.
承上示例所述,所述第一视频流的尺寸为1080×1920,所述预设视频流尺寸为450×629,所述第一缩放比例R1=450/1080,则使用所述第一缩放比例对所述第一视频流进行缩放得到的第二视频流的尺寸为450×800。As mentioned in the above example, the size of the first video stream is 1080×1920, the default video stream size is 450×629, and the first scaling ratio R1=450/1080, then the first scaling is used The size of the second video stream obtained by scaling the first video stream is 450×800.
至此,所述第二视频流的宽度已与所述预设视频播放流中的宽度相同。At this point, the width of the second video stream is the same as the width of the preset video playback stream.
S904、根据所述第二视频流的高度和所述第一视频播放窗口的高度,获取第一布局偏移参数。S904. Obtain the first layout offset parameter according to the height of the second video stream and the height of the first video playback window.
在一些实施例中,所述第一布局偏移参数为所述第二视频流的高度与所述第一视频播放窗口的高度的差值的二分之一。In some embodiments, the first layout offset parameter is half of the difference between the height of the second video stream and the height of the first video playback window.
设:所述第一布局偏移参数为CLIP 1,所述第二视频流的尺寸为W2×H2,所述第一视频播放窗口的尺寸为WL×HL,则有: Suppose: the first layout offset parameter is CLIP 1 , the size of the second video stream is W2×H2, and the size of the first video playback window is WL×HL, then there is:
CLIP 1=1/2(H2-HL) CLIP 1 =1/2(H2-HL)
在一些实施例中,当所述第二视频流的尺寸为629×800,所述第一视频播放窗口的尺寸为629×629时,所述第一布局偏移参数CLIP 1=1/2(800-629)。 In some embodiments, when the size of the second video stream is 629×800 and the size of the first video playback window is 629×629, the first layout offset parameter CLIP 1 =1/2 ( 800-629).
S905、基于所述第一布局偏移参数在高度方向上对所述第二视频流进行偏移,并在所述第一视频播放窗口中播放偏移后的所述第二视频流。S905. Offset the second video stream in the height direction based on the first layout offset parameter, and play the offset second video stream in the first video playback window.
参照图21所示,图21中以所述第一视频流的尺寸为1080×1920、所述第一视频播放窗口1000的尺寸为629×629、所述预设视频流尺寸为450×629为例对上述实施例提供的投屏方法进行说明。参照图21所示,根据所述第一视频流101的宽度1080和第一视频播放窗口的宽度450获取第一缩放比例450/1080,然后根据第一缩放比例450/1080对所述第一视频流101进行缩放获取第二视频流102,第二视频流102的尺寸为450×800,再根据所述第二视频流102的高度800和所述第一视频播放窗口1000的高度,获取第一布局偏移参数1/2(800-629)≈85;最后基于所述第二视频流102在所述第一视频播放窗口1000中进行视频播放,并将所述第二视频流向上偏移第一布局偏移参数85,以实现图21所示的显示效果。Referring to Figure 21, in Figure 21, the size of the first video stream is 1080×1920, the size of the first video playback window 1000 is 629×629, and the preset video stream size is 450×629. An example is provided to illustrate the screen projection method provided in the above embodiment. Referring to Figure 21, a first scaling ratio 450/1080 is obtained according to the width 1080 of the first video stream 101 and the width 450 of the first video playback window, and then the first video is scaled according to the first scaling ratio 450/1080. The stream 101 is zoomed to obtain the second video stream 102. The size of the second video stream 102 is 450×800. Then, according to the height 800 of the second video stream 102 and the height of the first video playback window 1000, the first video stream 102 is obtained. Layout offset parameter 1/2 (800-629) ≈ 85; finally, video playback is performed in the first video playback window 1000 based on the second video stream 102, and the second video stream is offset upward by the second video stream 102. A layout offset parameter of 85 is used to achieve the display effect shown in Figure 21.
图20所示投屏方法中最终显示的视频的长宽比更加接近竖屏状态下终端设备的屏幕的长宽比,因此可以更好的展示终端设备的投屏画面。The aspect ratio of the video finally displayed in the screen projection method shown in Figure 20 is closer to the aspect ratio of the screen of the terminal device in the portrait mode, so the screen projection image of the terminal device can be better displayed.
作为对上述实施例的扩展和细化,参照图22所示,本申请实施例提供的另一种投屏方法,包括:As an expansion and refinement of the above embodiment, as shown in Figure 22, another screen projection method provided by the embodiment of the present application includes:
S111、接收终端设备发送的第一视频流。S111. Receive the first video stream sent by the terminal device.
其中,所述第一视频流为通过所述终端设备的视频录制装置进行视频录制得到的视频流,且携带有用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为横屏姿态的标识信息;Wherein, the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries a message indicating that the posture of the terminal device when recording the video corresponding to the first video stream is horizontal. Identification information of screen posture;
参照图23所示,图23中以显示设备121为电视、终端设备122为手机为例示出。终端设备122录制所述第一视频流对应的视频时的姿态为横屏姿态。Referring to FIG. 23 , in FIG. 23 , the display device 121 is a television and the terminal device 122 is a mobile phone. The posture of the terminal device 122 when recording the video corresponding to the first video stream is a horizontal screen posture.
S112、根据所述第一视频流的高度和第一视频播放窗口的高度获取第二缩放比例。S112. Obtain the second scaling ratio according to the height of the first video stream and the height of the first video playback window.
同样,此处的宽度是指像素行(横向)内包含的像素点的数量,高度是指像素列(纵向)内包含的像素点的数量。Similarly, the width here refers to the number of pixels contained in the pixel row (horizontally), and the height refers to the number of pixels contained in the pixel column (vertical).
在一些实施例中,所述第一缩放比例为所述第一视频播放窗口的高度与所述第一视频流的高度的比值。In some embodiments, the first scaling ratio is a ratio of a height of the first video playback window to a height of the first video stream.
设:所述第二缩放比例为R2,所述第一视频流的尺寸为W1×H1,所述第一视频播放窗口的尺寸为 WL×HL,则有:Assume: the second scaling ratio is R2, the size of the first video stream is W1×H1, and the size of the first video playback window is WL×HL, then:
R2=HL/H1R2=HL/H1
在一些实施例中,当所述第一视频流的尺寸为1920×1080,所述第一视频播放窗口的尺寸为626×629时,所述第一缩放比例R2=629/1080。In some embodiments, when the size of the first video stream is 1920×1080 and the size of the first video playback window is 626×629, the first scaling ratio R2=629/1080.
S113、使用所述第一缩放比例对所述第一视频流进行缩放获取所述第二视频流。S113. Use the first scaling ratio to scale the first video stream to obtain the second video stream.
承上示例所述,所述第一视频流的尺寸为1920×1080,所述第一视频播放窗口的尺寸为626×629,所述第二缩放比例R2=629/1080,则使用所述第一缩放比例对所述第一视频流进行缩放得到的第二视频流的尺寸为1118×629。As mentioned in the above example, the size of the first video stream is 1920×1080, the size of the first video playback window is 626×629, and the second scaling ratio R2=629/1080, then use the third The size of the second video stream obtained by scaling the first video stream by a scaling ratio is 1118×629.
至此,所述第二视频流的高度已与所述第一视频播放窗口相适应。At this point, the height of the second video stream has adapted to the first video playback window.
S114、根据所述第二视频流的宽度和所述第一视频播放窗口的宽度,获取第二布局偏移参数。S114. Obtain a second layout offset parameter according to the width of the second video stream and the width of the first video playback window.
在一些实施例中,所述第二布局偏移参数为所述第二视频流的宽度与所述第一视频播放窗口的宽度的差值的二分之一。In some embodiments, the second layout offset parameter is half of the difference between the width of the second video stream and the width of the first video playback window.
设:所述第二布局偏移参数为CLIP 2,所述第二视频流的尺寸为W2×H2,所述第一视频播放窗口的尺寸为WL×HL,则有: Assume: the second layout offset parameter is CLIP 2 , the size of the second video stream is W2×H2, and the size of the first video playback window is WL×HL, then there is:
CLIP 2=1/2(W2-WL) CLIP 2 =1/2(W2-WL)
在一些实施例中,当所述第二视频流的尺寸为1118×629,所述第一视频播放窗口的尺寸为629×629时,所述第二布局偏移参数CLIP 2=1/2(1118-629)。 In some embodiments, when the size of the second video stream is 1118×629 and the size of the first video playback window is 629×629, the second layout offset parameter CLIP 2 =1/2 ( 1118-629).
S115、基于所述第一布局偏移参数在宽度方向上对所述第二视频流进行偏移,并在所述第一视频播放窗口中播放偏移后的所述第二视频流。S115. Offset the second video stream in the width direction based on the first layout offset parameter, and play the offset second video stream in the first video playback window.
参照图24所示,图24中以所述第一视频流的尺寸为1920×1080、所述第一视频播放窗口1300的尺寸为629×629为例对上述实施例提供的投屏方法进行说明。参照图24所示,根据所述第一视频流131的高度1080和第一视频播放窗口的宽度629获取第一缩放比例629/1080,然后根据第一缩放比例629/1080对所述第一视频流131进行缩放获取第二视频流132,第二视频流132的尺寸为1118×629,再根据所述第二视频流132的宽度1118和所述第一视频播放窗口800的高度,获取第二布局偏移参数1/2(1118-629)≈244;最后基于所述第二视频流132在所述第一视频播放窗口1300中进行视频播放,并将所述第二视频流向左偏移第一布局偏移参数244,以实现图24所示的显示效果。Referring to FIG. 24 , in FIG. 24 , the screen projection method provided by the above embodiment is explained by taking the size of the first video stream as 1920×1080 and the size of the first video playback window 1300 as 629×629 as an example. . Referring to Figure 24, a first scaling ratio 629/1080 is obtained according to the height 1080 of the first video stream 131 and the width 629 of the first video playback window, and then the first video is scaled according to the first scaling ratio 629/1080. The stream 131 is zoomed to obtain the second video stream 132. The size of the second video stream 132 is 1118×629. Then, according to the width 1118 of the second video stream 132 and the height of the first video playback window 800, the second video stream 132 is obtained. Layout offset parameter 1/2 (1118-629) ≈ 244; finally, video playback is performed in the first video playback window 1300 based on the second video stream 132, and the second video stream is offset to the left. A layout offset parameter 244 to achieve the display effect shown in Figure 24.
作为对上述实施例的扩展和细化,参照图25所示,本申请实施例提供的另一种投屏方法,包括:As an expansion and refinement of the above embodiment, as shown in Figure 25, another screencasting method provided by the embodiment of the present application includes:
S141、接收终端设备发送的第一视频流。S141. Receive the first video stream sent by the terminal device.
其中,所述第一视频流为通过所述终端设备的视频录制装置进行视频录制得到的视频流,且携带有用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为横屏姿态的标识信息;Wherein, the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries a message indicating that the posture of the terminal device when recording the video corresponding to the first video stream is horizontal. Identification information of screen posture;
S142、根据所述第一视频流的高度和预设视频流尺寸中的高度获取第二缩放比例。S142. Obtain the second scaling ratio according to the height of the first video stream and the height in the preset video stream size.
在一些实施例中,所述第二缩放比例为所述预设视频流尺寸中的高度与所述第一视频流的高度的比值。In some embodiments, the second scaling ratio is a ratio of a height in the preset video stream size to a height of the first video stream.
设:所述第二缩放比例为R2,所述第一视频流的尺寸为W1×H1,所述预设视频流尺寸为WS×HS,则有:Assume: the second scaling ratio is R2, the size of the first video stream is W1×H1, and the preset video stream size is WS×HS, then there is:
R1=HS/H1R1=HS/H1
在一些实施例中,当所述第一视频流的尺寸为1920×1080,所述预设视频流尺寸为450×629时,所述第一缩放比例R1=450/1080。In some embodiments, when the size of the first video stream is 1920×1080 and the preset video stream size is 450×629, the first scaling ratio R1=450/1080.
S143、使用所述第一缩放比例对所述第一视频流进行缩放获取所述第二视频流。S143. Use the first scaling ratio to scale the first video stream to obtain the second video stream.
承上示例所述,所述第一视频流的尺寸为1920×1080,所述预设视频流尺寸为450×629,所述第二缩放比例R2=450/1080,则使用所述第二缩放比例对所述第一视频流进行缩放得到的第二视频流的尺寸为800×450。As mentioned in the above example, the size of the first video stream is 1920×1080, the default video stream size is 450×629, and the second scaling ratio R2=450/1080, then the second scaling is used The size of the second video stream obtained by scaling the first video stream is 800×450.
至此,所述第二视频流的高度已与所述预设视频播放流中的高度相同。At this point, the height of the second video stream is the same as the height of the preset video playback stream.
S144、根据所述第二视频流的宽度和所述第一视频播放窗口的宽度,获取第二布局偏移参数。S144. Obtain a second layout offset parameter according to the width of the second video stream and the width of the first video playback window.
在一些实施例中,所述第二布局偏移参数为所述第二视频流的宽度与所述第一视频播放窗口的宽度的差值的二分之一。In some embodiments, the second layout offset parameter is half of the difference between the width of the second video stream and the width of the first video playback window.
设:所述第二布局偏移参数为CLIP 2,所述第二视频流的尺寸为W2×H2,所述第一视频播放窗口的尺寸为WL×HL,则有: Assume: the second layout offset parameter is CLIP 2 , the size of the second video stream is W2×H2, and the size of the first video playback window is WL×HL, then there is:
CLIP 2=1/2(W2-WL) CLIP 2 =1/2(W2-WL)
在一些实施例中,当所述第二视频流的尺寸为800×629,所述第一视频播放窗口的尺寸为629×629时,所述第二布局偏移参数CLIP 2=1/2(800-629)。 In some embodiments, when the size of the second video stream is 800×629 and the size of the first video playback window is 629×629, the second layout offset parameter CLIP 2 =1/2 ( 800-629).
S145、基于所述第一布局偏移参数在宽度方向上对所述第二视频流进行偏移,并在所述第一视频播放窗口中播放偏移后的所述第二视频流。S145. Offset the second video stream in the width direction based on the first layout offset parameter, and play the offset second video stream in the first video playback window.
参照图26所示,图26中以所述第一视频流的尺寸为1920×1080、所述第一视频播放窗口1500的尺寸为629×629、所述预设视频流尺寸为450×629为例对上述实施例提供的投屏方法进行说明。参照图26所示,根据所述第一视频流151的高度1080和第一视频播放窗口的高度450获取第一缩放比例450/1080,然后根据第一缩放比例450/1080对所述第一视频流151进行缩放获取第二视频流152,第二视频流152的尺寸为800×450,再根据所述第二视频流152的宽度800和所述第一视频播放窗口1500的宽度,获取第二布局偏移参数1/2(800-629)≈85;最后基于所述第二视频流152在所述第一视频播放窗口1500中进行视频播放,并将所述第二视频流向左偏移第一布局偏移参数85,以实现图26所示的显示效果。Referring to Figure 26, in Figure 26, the size of the first video stream is 1920×1080, the size of the first video playback window 1500 is 629×629, and the preset video stream size is 450×629. An example is provided to illustrate the screen projection method provided in the above embodiment. Referring to Figure 26, a first scaling ratio 450/1080 is obtained according to the height 1080 of the first video stream 151 and the height 450 of the first video playback window, and then the first video is scaled according to the first scaling ratio 450/1080. The stream 151 is zoomed to obtain the second video stream 152. The size of the second video stream 152 is 800×450. Then, according to the width 800 of the second video stream 152 and the width of the first video playback window 1500, the second video stream 152 is obtained. Layout offset parameter 1/2 (800-629) ≈ 85; finally, video playback is performed in the first video playback window 1500 based on the second video stream 152, and the second video stream is offset to the left by the second video stream. A layout offset parameter of 85 is used to achieve the display effect shown in Figure 26.
图27所示投屏方法中最终显示的视频的长宽比更加接近横屏状态下终端设备的屏幕的长宽比,因此可以更好的展示终端设备的投屏画面。The aspect ratio of the video finally displayed in the screen projection method shown in Figure 27 is closer to the aspect ratio of the screen of the terminal device in the horizontal screen state, so the projection screen of the terminal device can be better displayed.
参照图27所示,本申请另一实施例提供的投屏方法,包括:Referring to Figure 27, a screen projection method provided by another embodiment of the present application includes:
S161、接收终端设备发送的第一视频流。S161. Receive the first video stream sent by the terminal device.
其中,所述第一视频流为通过所述终端设备的视频录制装置进行视频录制得到的视频流,且携带有用于标识所述终端设备录制所述第一视频流对应的视频时的姿态的标识信息。Wherein, the first video stream is a video stream obtained by video recording by a video recording device of the terminal device, and carries an identifier used to identify the posture of the terminal device when recording the video corresponding to the first video stream. information.
需要说明的是,在上述图16、图17、图20、图22、图25中任一投屏方法之后,针对后续接收到的终端设备发送的第一视频流还可以按照图27所示的方式进行处理和显示。It should be noted that after any of the screen casting methods in Figure 16, Figure 17, Figure 20, Figure 22, and Figure 25, the first video stream sent by the subsequently received terminal device can also be as shown in Figure 27 method for processing and display.
S162、接收剪裁播放指令。S162. Receive the trimming and playback instruction.
其中,所述剪裁播放指令携带有选定区域的尺寸和所述选定区域的位置信息,用于指示基于所述选定区域内所述第一视频流的视频内容进行视频播放。Wherein, the trimming and playback instruction carries the size of the selected area and the position information of the selected area, and is used to instruct video playback based on the video content of the first video stream in the selected area.
参照图28所示,图28中以显示设备171为电视、终端设备172为手机为例示出。终端设备172响应于用户操作确定选定区域1700,并向显示设备171发送用于指示基于选定区域内所述第一视频流的视频内容进行视频播放的剪裁播放指令。Referring to FIG. 28 , in FIG. 28 , the display device 171 is a television and the terminal device 172 is a mobile phone. The terminal device 172 determines the selected area 1700 in response to the user operation, and sends a trimming playback instruction to the display device 171 for instructing video playback based on the video content of the first video stream in the selected area.
在一些实施例中,可以通过选定区域右上侧顶点的位置坐标(x1,y1)和选定区域左下侧顶点的位置坐标(x2,y2)表征所述选定区域的尺寸和所述选定区域的位置信息。In some embodiments, the size of the selected area and the selected area can be characterized by the position coordinates (x1, y1) of the upper right vertex of the selected area and the position coordinates (x2, y2) of the lower left vertex of the selected area. Location information for the region.
S163、响应于剪裁播放指令,根据所述选定区域的尺寸和所述第一视频播放窗口的尺寸,获取第三缩放比例。S163. In response to the trimming playback instruction, obtain a third zoom ratio according to the size of the selected area and the size of the first video playback window.
其中,所述第三缩放比例为第一比值与第二比值中较小的一个比值,所述第一比值为所述第一视频播放窗口的高度与所述选定区域的高度的比值,所述第二比值为所述第一视频播放窗口的宽度与所述选定区域的宽度的比值。Wherein, the third scaling ratio is the smaller of the first ratio and the second ratio, and the first ratio is the ratio of the height of the first video playback window to the height of the selected area, so The second ratio is the ratio of the width of the first video playback window to the width of the selected area.
设:选定区域的尺寸为select_w×select_h、第一视频播放窗口的尺寸629×629、所述第三缩放比例为R3,则有:Assume: the size of the selected area is select_w×select_h, the size of the first video playback window is 629×629, and the third scaling ratio is R3, then there is:
R3=min(629/select_w,692/select_h)R3=min(629/select_w,692/select_h)
在一些实施例中,当所述选定区域的尺寸为265×360,所述第一视频播放窗口的尺寸为629×629时,所述第三缩放比例R3=629/360。In some embodiments, when the size of the selected area is 265×360 and the size of the first video playback window is 629×629, the third scaling ratio R3=629/360.
在一些实施例中,当所述选定区域的尺寸为256×128,所述第一视频播放窗口的尺寸为629×629时,所述第三缩放比例R3=629/256。In some embodiments, when the size of the selected area is 256×128 and the size of the first video playback window is 629×629, the third scaling ratio R3=629/256.
S164、使用所述第三缩放比例对所述第一视频流进行缩放,获取第三视频流。S164. Scale the first video stream using the third scaling ratio to obtain a third video stream.
在一些实施例中,所述第一视频流的尺寸为1920×1080,所述第一视频播放窗口的尺寸为629×629,所述选定区域的尺寸为480×270,则所述第三缩放比例R3=629/480,所述使用所述第三缩放比例对所述第一视频流进行缩放得到的第三视频流尺寸为2516×1415。In some embodiments, the size of the first video stream is 1920×1080, the size of the first video playback window is 629×629, and the size of the selected area is 480×270, then the size of the third The scaling ratio R3=629/480, and the size of the third video stream obtained by scaling the first video stream using the third scaling ratio is 2516×1415.
S165、根据所述第三缩放比例、所述第一视频播放窗口的宽度、所述选定区域的位置信息以及所述选定区域的宽度获取第三布局偏移参数。S165. Obtain a third layout offset parameter according to the third zoom ratio, the width of the first video playback window, the position information of the selected area, and the width of the selected area.
在一些实施例中,所述控制器,具体被配置为通过如下公式一计算所述第三布局偏移参数,所述公式一为:In some embodiments, the controller is specifically configured to calculate the third layout offset parameter through the following formula 1, where the formula 1 is:
CLIP 3=(X+select_w/2)*R3-WL/2 CLIP 3 =(X+select_w/2)*R3-WL/2
其中,CLIP 3为所述第三布局偏移参数,X为所述选定区域的左侧边缘到所述第一视频流的左侧边缘的距离,select_w/2为所述选定区域的宽度,R3为所述第三缩放比例,WL为所述第一视频播放窗口的宽度。 Wherein, CLIP 3 is the third layout offset parameter, X is the distance from the left edge of the selected area to the left edge of the first video stream, and select_w/2 is the width of the selected area. , R3 is the third scaling ratio, and WL is the width of the first video playback window.
在一些实施例中,当所述第一视频播放窗口的尺寸为629×629,所述选定区域的左侧边缘到所述第一视频流的左侧边缘的距离为1000,所述选定区域的尺寸为480×270时,所述第三布局偏移参数CLIP 3=1310。 In some embodiments, when the size of the first video playback window is 629×629, the distance from the left edge of the selected area to the left edge of the first video stream is 1000, and the selected When the size of the area is 480×270, the third layout offset parameter CLIP 3 =1310.
S166、根据所述第三缩放比例、所述第一视频播放窗口的高度、所述选定区域的位置信息以及所述选定区域的高度获取第四布局偏移参数。S166. Obtain a fourth layout offset parameter according to the third zoom ratio, the height of the first video playback window, the position information of the selected area, and the height of the selected area.
在一些实施例中,所述控制器,具体被配置为通过如下公式二计算所述第四布局偏移参数:In some embodiments, the controller is specifically configured to calculate the fourth layout offset parameter through the following formula 2:
设:所述第四布局偏移参数为CLIP 4,所述第三视频流的尺寸为W3×H3,所述第一视频播放窗口的尺寸为WL×HL,则所述公式二为: Assume that the fourth layout offset parameter is CLIP 4 , the size of the third video stream is W3×H3, and the size of the first video playback window is WL×HL, then the second formula is:
CLIP 4=(Y+select_h/2)*R3-HL/2 CLIP 4 =(Y+select_h/2)*R3-HL/2
其中,CLIP 4为所述第四布局偏移参数,Y为所述选定区域的顶侧边缘到所述第一视频流的顶侧边缘的距离,select_h/2为所述选定区域的高度,R3为所述第三缩放比例,HL为所述第一视频播放窗口的高度。 Wherein, CLIP 4 is the fourth layout offset parameter, Y is the distance from the top edge of the selected area to the top edge of the first video stream, select_h/2 is the height of the selected area , R3 is the third scaling ratio, and HL is the height of the first video playback window.
在一些实施例中,当所述第一视频播放窗口的尺寸为629×629,所述选定区域的左侧边缘到所述第一视频流的左侧边缘的距离为400,所述选定区域的尺寸为480×270时,所述第四布局偏移参数CLIP 4=386。 In some embodiments, when the size of the first video playback window is 629×629, the distance from the left edge of the selected area to the left edge of the first video stream is 400, and the selected When the size of the area is 480×270, the fourth layout offset parameter CLIP 4 =386.
S167、基于所述第三布局偏移参数在宽度方向上对所述第三视频流进行偏移,基于所述第四布局偏移参数在高度方向上对所述第三视频流进行偏移,并在所述第一视频窗口播放偏移后的所述第三视频流。S167. Offset the third video stream in the width direction based on the third layout offset parameter, offset the third video stream in the height direction based on the fourth layout offset parameter, and playing the offset third video stream in the first video window.
在一些实施例中,基于所述第三布局偏移参数在宽度方向上对所述第二视频流进行偏移,基于所述第四布局偏移参数在高度方向上对所述第三视频流进行偏移可以包括:基于第三布局偏移参数和所述第四布局偏移参数调整所述第三视频流的坐标系原点,以对所述第三视频流进行偏移。在另一些实施例中,基于所述布局偏移参数对所述第二视频流进行偏移也可以包括:基于布局参数调整计算所述第三视频流的各个边缘(上边缘、下边缘、左边缘以及右边缘)对应的第一视频播放窗口的边缘的距离,然后根据第二视频流的各个边缘对应的第一视频播放窗口的边缘的距离对所述第三视频流进行偏移。In some embodiments, the second video stream is offset in the width direction based on the third layout offset parameter, and the third video stream is offset in the height direction based on the fourth layout offset parameter. Offsetting may include: adjusting a coordinate system origin of the third video stream based on a third layout offset parameter and the fourth layout offset parameter to offset the third video stream. In other embodiments, offsetting the second video stream based on the layout offset parameter may also include: calculating each edge (top edge, bottom edge, left edge, etc.) of the third video stream based on layout parameter adjustment. edge and right edge) of the first video playback window, and then offset the third video stream according to the distance between the edges of the first video playback window corresponding to each edge of the second video stream.
参照图29所示,图29中以所述第一视频流的尺寸为1920×1080、所述第一视频播放窗口的尺寸为629×629、所述选定区域的尺寸为480×270、所述选定区域的左侧边缘到所述第一视频流的左侧边缘的距离为1000,所述选定区域的顶侧边缘到所述第一视频流的顶侧边缘的距离400为例对上述实施例提供的投屏方法进行说明。参照图29所示,首先,由于629/480<629/270,因此确定第三缩放比例为629/480。其次,根据第三缩放比例对所述第一视频流181进行缩放获取第三视频流182,第三视频流的尺寸为2516×1415,再根据所述第三缩放比例、所述第一视频播放窗口的宽度、所述选定区域的位置信息以及所述选定区域的宽度获取第三布局偏移参数1310,以及根据所述第三缩放比例、所述第一视频播放窗口的高度、所述选定区域的位置信息以及所述选定区域的高度获取第四布局偏移参数386,最后基于所述第三视频流182在所述第一视频播放窗口1800中进行视频播放,并将所述第三视频流分别向左偏移第三布局偏移参数1310、向上偏移第四布局偏移参数386,以实现图29所示的显示效果。Referring to Figure 29, in Figure 29, the size of the first video stream is 1920×1080, the size of the first video playback window is 629×629, and the size of the selected area is 480×270. The distance from the left edge of the selected area to the left edge of the first video stream is 1000, and the distance from the top edge of the selected area to the top edge of the first video stream is 400. For example, The screen projection method provided by the above embodiment will be described. Referring to FIG. 29 , first, since 629/480<629/270, the third scaling ratio is determined to be 629/480. Secondly, the first video stream 181 is scaled according to the third scaling ratio to obtain the third video stream 182. The size of the third video stream is 2516×1415, and then the first video is played according to the third scaling ratio. The width of the window, the position information of the selected area, and the width of the selected area are used to obtain the third layout offset parameter 1310, and according to the third scaling ratio, the height of the first video playback window, the The position information of the selected area and the height of the selected area are obtained to obtain the fourth layout offset parameter 386. Finally, video playback is performed in the first video playback window 1800 based on the third video stream 182, and the The third video stream is offset to the left by the third layout offset parameter 1310 and upward by the fourth layout offset parameter 386 to achieve the display effect shown in FIG. 29 .
在上述任一实施例的基础上,本申请实施例提供的投屏方法还包括:接收服务器发送的第二视频流;以及基于所述第二视频流在第二视频播放窗口中进行视频播放。Based on any of the above embodiments, the screen casting method provided by the embodiment of the present application further includes: receiving a second video stream sent by the server; and performing video playback in the second video playback window based on the second video stream.
在一些实施例中,以下以视频健身场景为例对上述实施例进行说明,如图30所示,场景建构中包括健身视频服务器191、显示设备192以及终端设备193。显示设备192可以从健身视频服务器191获取健身视频并在第二视频播放窗口1922中播放;用户可以观看显示设备192所播放的健身视频,并跟随健身视频进行健身训练;终端设备193可以通过视频录制装置进行视频录制得到的第一视频流,并将第一视频流发送至显示设备192,显示设备接收到终端设备193发送的第一视频流后,通过本申请实施例提供的投屏方法在第一视频播放窗口1921中进行投屏视频的播放。In some embodiments, the above embodiment will be described below by taking a video fitness scene as an example. As shown in Figure 30 , the scene construction includes a fitness video server 191, a display device 192 and a terminal device 193. The display device 192 can obtain the fitness video from the fitness video server 191 and play it in the second video playback window 1922; the user can watch the fitness video played by the display device 192 and follow the fitness video for fitness training; the terminal device 193 can record through the video The device performs video recording to obtain the first video stream, and sends the first video stream to the display device 192. After the display device receives the first video stream sent by the terminal device 193, the screen projection method provided by the embodiment of the present application is used. A video playback window 1921 is used to play the screencast video.
在一些实施例中,本申请实施例还提供了一种电子设备,包括:存储器和处理器,所述存储器用于存储计算机程序;所述处理器用于在执行计算机程序时,使得所述电子设备实现上述任一实施例所述的投屏方法。In some embodiments, embodiments of the present application also provide an electronic device, including: a memory and a processor, the memory is used to store a computer program; the processor is used to cause the electronic device to Implement the screen projection method described in any of the above embodiments.
在一些实施例中,本申请实施例提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,当所述计算机程序被计算设备执行时,使得所述计算设备实现上述任一实施例所述的投屏方法。In some embodiments, embodiments of the present application provide a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a computing device, the computing device implements The screen projection method described in any of the above embodiments.
在一些实施例中,本申请实施例提供了一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机实现第二方面或第二方面任一实施例所述的投屏方法。In some embodiments, embodiments of the present application provide a computer program product. When the computer program product is run on a computer, the computer implements the investment described in the second aspect or any embodiment of the second aspect. screen method.
为了方便解释,已经结合具体的实施方式进行了上述说明。但是,上述示例性的讨论不是意图穷尽或者将实施方式限定到上述公开的具体形式。根据上述的教导,可以得到多种修改和变形。上述实施方式的选择和描述是为了更好的解释原理以及实际的应用,从而使得本领域技术人员更好的使用所述实施方式以及适于具体使用考虑的各种不同的变形的实施方式。For convenience of explanation, the above description has been made in conjunction with specific implementation modes. However, the above illustrative discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed. Various modifications and variations are possible in light of the above teachings. The above embodiments are selected and described to better explain the principles and practical applications, so that those skilled in the art can better use the embodiments and various modified embodiments suitable for specific use considerations.

Claims (23)

  1. 一种显示设备,包括:A display device including:
    显示器;monitor;
    控制器,与所述显示器连接,所述控制器被配置为:A controller, connected to the display, and the controller is configured to:
    所述显示器显示跟练界面,其中,所述跟练界面包括第一窗口和第二窗口,所述第一窗口用于播放第一视频,所述第二窗口用于播放从服务器获取的第三视频。The display displays a follow-up training interface, wherein the follow-up training interface includes a first window and a second window. The first window is used to play the first video, and the second window is used to play the third video obtained from the server. video.
  2. 根据权利要求1所述的显示设备,其中,所述控制器被配置为:The display device of claim 1, wherein the controller is configured to:
    响应于第一窗口播放到距离第一视频结束前的第一时间,根据播放索引表中存在所述第一视频对应项目的下一项目,在所述第一窗口的上方图层启动第二窗口以播放第三视频,其中,所述第一窗口为全屏窗口,所述第二窗口为非全屏窗口,所述下一项目与第二视频相对应,所述第三视频为提示用户进行运动的健身视频。In response to the first window playing to the first time before the end of the first video, according to the presence of the next item corresponding to the first video in the play index table, the second window is launched in the layer above the first window to play a third video, wherein the first window is a full-screen window, the second window is a non-full-screen window, the next item corresponds to the second video, and the third video prompts the user to exercise Fitness videos.
  3. 根据权利要求2所述的显示设备,其中,所述控制器被配置为:The display device of claim 2, wherein the controller is configured to:
    响应于在所述第二窗口播放到预设时长前接收到了窗口切换指令,将所述第一视频从所述第一视频的当前进度调整至所述第二窗口继续播放,将所述第三视频从所述第三视频的当前进度调整至所述第一窗口继续播放,在所述第二窗口播放到所述第二视频的第二时间时,撤销所述第二窗口,将所述第一窗口调整为从所述第二视频的当前进度继续播放;In response to receiving a window switching instruction before the second window plays to the preset duration, the first video is adjusted from the current progress of the first video to the second window to continue playing, and the third window is The video is adjusted from the current progress of the third video to the first window to continue playing. When the second window is played to the second time of the second video, the second window is canceled and the third window is played. A window is adjusted to continue playing from the current progress of the second video;
    响应于在所述第二窗口播放到预设时长时未接收到所述窗口切换指令,撤销所述第二窗口。In response to not receiving the window switching instruction when the second window is played for a preset duration, the second window is canceled.
  4. 根据权利要求1所述的显示设备,其中,所述控制器被配置为:The display device of claim 1, wherein the controller is configured to:
    响应于在所述第二窗口播放到预设时长前接收到了窗口切换指令,将所述第一视频从所述第一视频的当前进度调整至所述第二窗口继续播放,将所述第三视频从所述第三视频的当前进度调整至所述第一窗口继续播放,在所述第二窗口播放到第二视频的第二时间时,撤销所述第二窗口,将所述第一窗口调整为从所述第二视频的当前进度继续播放,其中所述第二视频对应于播放索引表中存在所述第一视频对应项目的下一项目;In response to receiving a window switching instruction before the second window plays to the preset duration, the first video is adjusted from the current progress of the first video to the second window to continue playing, and the third window is The video continues to play from the current progress of the third video to the first window. When the second window plays to the second time of the second video, the second window is cancelled, and the first window is Adjust to continue playing from the current progress of the second video, wherein the second video corresponds to the next item in the play index table where the corresponding item of the first video exists;
    响应于在所述第二窗口播放到预设时长时未接收到所述窗口切换指令,撤销所述第二窗口。In response to not receiving the window switching instruction when the second window is played for a preset duration, the second window is canceled.
  5. 根据权利要求3所述的显示设备,其中,将所述第一视频从所述第一视频的当前进度调整至所述第二窗口继续播放,包括:The display device according to claim 3, wherein adjusting the first video from the current progress of the first video to the second window to continue playing includes:
    将所述第一窗口的窗口内容调整为第二播放器,其中,所述第二播放器用于播放所述第三视频,使所述第二播放器将所述第三视频的当前进度后的图像在所述第一窗口播放;The window content of the first window is adjusted to a second player, wherein the second player is used to play the third video, so that the second player changes the current progress of the third video to The image is played in the first window;
    将所述第二窗口的窗口内容调整为第一播放器,其中,所述第一播放器用于播放所述第一视频,使所述第一播放器将所述第一视频的当前进度后的图像在所述第二窗口播放。Adjust the window content of the second window to a first player, wherein the first player is used to play the first video, so that the first player changes the current progress of the first video to The image plays in the second window.
  6. 根据权利要求3所述的显示设备,其中,在所述第一窗口的上方图层启动第二窗口以播放第三视频,包括:The display device according to claim 3, wherein starting a second window in a layer above the first window to play a third video includes:
    在所述第一窗口的图层上方生成一个包含第二窗口的图层;Generate a layer containing the second window above the layer of the first window;
    启动第二播放器,控制所述第二播放器解码所述第三视频,得到解码后的图像;Start the second player, control the second player to decode the third video, and obtain the decoded image;
    将所述第二窗口的窗口内容调整为所述第二播放器,使所述第二播放器在所述第二窗口播放所述解码后的图像。Adjust the window content of the second window to the second player, so that the second player plays the decoded image in the second window.
  7. 根据权利要求3所述的显示设备,其中,撤销所述第二窗口,将所述第一窗口调整为从所述第二视频的当前进度继续播放,包括:The display device according to claim 3, wherein canceling the second window and adjusting the first window to continue playing from the current progress of the second video includes:
    撤销所述第二窗口的图层;Undo the layer of the second window;
    将所述第一窗口的窗口内容调整为第一播放器,其中,所述第一播放器用于播放所述第二视频,使第一播放器将所述第二视频的当前进度后的图像在所述第二窗口播放。Adjust the window content of the first window to a first player, wherein the first player is used to play the second video, so that the first player displays the image after the current progress of the second video in The second window plays.
  8. 根据权利要求3所述的显示设备,其中,所述控制器被配置为:The display device of claim 3, wherein the controller is configured to:
    在接收到所述窗口切换指令之前,控制所述第二窗口的音量小于所述第一窗口的音量;Before receiving the window switching instruction, control the volume of the second window to be smaller than the volume of the first window;
    在接收到所述窗口切换指令后,将所述第二窗口静音。After receiving the window switching instruction, the second window is muted.
  9. 根据权利要求3所述的显示设备,其中,所述控制器被配置为:在接收到所述窗口切换指令之前,将所述第二窗口的音量设置为与所述第一窗口的音量正相关。The display device of claim 3, wherein the controller is configured to set the volume of the second window to be positively correlated with the volume of the first window before receiving the window switching instruction. .
  10. 根据权利要求3所述的显示设备,其中,所述控制器还被配置为:The display device of claim 3, wherein the controller is further configured to:
    在所述第一时间之前,向服务器发送所述第三视频的查询请求,其中,所述查询请求包括用户标识和所述可播放时长,所述可播放时长是根据所述第一视频的片尾时长和第二视频的片头时长计算得到的,使所述服务器根据所述用户标识和可播放时长查询并返回第三视频的媒资信息;Before the first time, send a query request for the third video to the server, where the query request includes a user identification and the playable duration, and the playable duration is based on the ending of the first video. The duration and the opening duration of the second video are calculated, causing the server to query and return the media asset information of the third video based on the user identification and playable duration;
    根据所述第三视频的媒资信息向所述服务器获取所述第三视频的码流。Obtain the code stream of the third video from the server according to the media asset information of the third video.
  11. 根据权利要求3所述的显示设备,其中,所述控制器还被配置为:The display device of claim 3, wherein the controller is further configured to:
    响应于在所述第二窗口播放到预设时长前接收到了退出指令,撤销所述第二窗口的图层。In response to receiving an exit instruction before the second window plays for a preset duration, canceling the layer of the second window.
  12. 根据权利要求1或4所述的显示设备,其中,The display device according to claim 1 or 4, wherein
    控制器进一步被配置为:The controller is further configured as:
    响应于接收到的触发指令,所述显示器显示跟练界面,接收终端设备发送的第一视频流,其中,所述第一视频流为所述终端设备的视频录制装置采集得到的视频流,且携带有用于标识所述终端设备采集所述第一视频流对应的视频时的姿态的标识信息;In response to the received trigger instruction, the display displays a follow-up interface and receives the first video stream sent by the terminal device, where the first video stream is a video stream collected by the video recording device of the terminal device, and Carrying identification information used to identify the gesture of the terminal device when collecting the video corresponding to the first video stream;
    根据所述标识信息、视频播放参数以及所述第一视频流的尺寸获取缩放比例,根据所述缩放比例对所述第一视频流进行缩放获取第二视频流,以及根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数;所述视频播放参数包括所述第一窗口的尺寸和/或预设视频流尺寸;Obtain the scaling ratio according to the identification information, video playback parameters and the size of the first video stream, scale the first video stream according to the scaling ratio to obtain the second video stream, and obtain the second video stream according to the video playback parameters and The size of the second video stream obtains layout offset parameters; the video playback parameters include the size of the first window and/or the preset video stream size;
    基于所述布局偏移参数对所述第二视频流进行偏移,并控制所述显示器在所述第一窗口播放偏移后的所述第二视频流作为所述第一视频。Offset the second video stream based on the layout offset parameter, and control the display to play the offset second video stream as the first video in the first window.
  13. 根据权利要求12所述的显示设备,其中,所述标识信息包括:第一姿态标识或第二姿态标识;The display device according to claim 12, wherein the identification information includes: a first posture identification or a second posture identification;
    所述第一姿态标识用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为竖屏姿态;The first posture identifier is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a portrait posture;
    所述第二姿态标识用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为横屏姿态;The second posture identifier is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a horizontal screen posture;
    其中,所述第一姿态标识对应的视频播放参数和所述第二姿态标识对应的视频播放参数不同。Wherein, the video playback parameters corresponding to the first gesture identification and the video playback parameters corresponding to the second gesture identification are different.
  14. 根据权利要求13所述的显示设备,其中,响应于所述标识信息包括所述第一姿态标识,The display device of claim 13, wherein in response to the identification information including the first gesture identification,
    所述控制器根据所述缩放比例对所述第一视频流进行缩放获取第二视频流、以及根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数包括:The controller scales the first video stream according to the scaling ratio to obtain a second video stream, and obtains layout offset parameters according to the video playback parameters and the size of the second video stream, including:
    所述控制器根据所述第一视频流的宽度和目标宽度获取第一缩放比例,所述目标宽度为所述第一窗口的宽度或者所述预设视频流尺寸中的宽度;使用所述第一缩放比例对所述第一视频流进行缩放获取所述第二视频流;根据所述第二视频流的高度和所述第一窗口的高度,获取第一布局偏移参数;The controller obtains a first scaling ratio according to the width of the first video stream and a target width, where the target width is the width of the first window or the width in the preset video stream size; using the first Scale the first video stream by a scaling ratio to obtain the second video stream; obtain a first layout offset parameter according to the height of the second video stream and the height of the first window;
    所述控制器基于所述布局偏移参数对所述第二视频流进行偏移包括:所述控制器基于所述第一布局偏移参数在高度方向上对所述第二视频流进行偏移。The controller offsets the second video stream based on the layout offset parameter including: the controller offsets the second video stream in a height direction based on the first layout offset parameter. .
  15. 根据权利要求14所述的显示设备,其中,The display device according to claim 14, wherein
    所述第一缩放比例为所述目标宽度与所述第一视频流的宽度的比值;The first scaling ratio is the ratio of the target width to the width of the first video stream;
    所述第一布局偏移参数为所述第二视频流的高度与所述第一窗口的高度的差值的二分之一。The first layout offset parameter is half the difference between the height of the second video stream and the height of the first window.
  16. 根据权利要求13所述的显示设备,其中,响应于所述标识信息包括所述第二姿态标识,The display device of claim 13, wherein in response to the identification information including the second gesture identification,
    所述控制器根据所述标识信息、视频播放参数以及所述第一视频流的尺寸获取缩放比例、根据所述缩放比例对所述第一视频流进行缩放获取第二视频流包括:The controller obtains the scaling ratio according to the identification information, video playback parameters and the size of the first video stream, and scales the first video stream according to the scaling ratio to obtain the second video stream including:
    所述控制器根据所述第一视频流的高度和目标高度,获取第二缩放比例,所述目标高度为所述第一窗口的高度或者所述预设视频流尺寸中的高度;使用所述第二缩放比例对所述第一视频流进行缩放,获取所述第二视频流;The controller obtains a second scaling ratio based on the height of the first video stream and a target height, where the target height is the height of the first window or the height in the preset video stream size; using the Scale the first video stream with a second scaling ratio to obtain the second video stream;
    所述控制器根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数包括:所述控制器根据所述第二视频流的宽度和所述第一窗口的宽度,获取第二布局偏移参数;The controller obtaining the layout offset parameter according to the video playback parameter and the size of the second video stream includes: the controller obtaining the layout offset parameter according to the width of the second video stream and the width of the first window. 2. Layout offset parameters;
    所述控制器基于所述布局偏移参数对所述第二视频流进行偏移包括:The controller offsets the second video stream based on the layout offset parameter including:
    所述控制器基于所述第二布局偏移参数在宽度方向上对所述第二视频流进行偏移。The controller offsets the second video stream in a width direction based on the second layout offset parameter.
  17. 根据权利要求16所述的显示设备,其中,The display device according to claim 16, wherein
    所述第二缩放比例为所述目标高度与所述第一视频流的高度的比值;The second scaling ratio is the ratio of the target height to the height of the first video stream;
    所述第二布局偏移参数为所述第二视频流的宽度与所述第一窗口的宽度的差值的二分之一。The second layout offset parameter is one-half of the difference between the width of the second video stream and the width of the first window.
  18. 根据权利要求12-17任一项所述的显示设备,其中,所述控制器还被配置为:所述控制器基于所述布局偏移参数对所述第二视频流进行偏移、并控制所述显示器在所述第一窗口播放偏移后的所述第二视频流之后,The display device according to any one of claims 12 to 17, wherein the controller is further configured to offset the second video stream based on the layout offset parameter and control After the display plays the offset second video stream in the first window,
    响应于接收到的剪裁播放指令,根据所述选定区域的尺寸和所述第一窗口的尺寸,获取第三缩放比例,其中所述剪裁播放指令携带有选定区域的尺寸和所述选定区域的位置信息,用于指示基于所述选定区域内所述第一视频流的视频内容进行视频播放,其中所述第三缩放比例为第一比值与第二比值中较小的一个比值,所述第一比值为所述第一窗口的高度与所述选定区域的高度的比值,所述第二比值为所述第一窗口的宽度与所述选定区域的宽度的比值;In response to the received trimming playback instruction, a third zoom ratio is obtained according to the size of the selected area and the size of the first window, wherein the trimming playback instruction carries the size of the selected area and the size of the selected window. The location information of the area is used to indicate video playback based on the video content of the first video stream in the selected area, wherein the third scaling ratio is the smaller of the first ratio and the second ratio, The first ratio is the ratio of the height of the first window to the height of the selected area, and the second ratio is the ratio of the width of the first window to the width of the selected area;
    使用所述第三缩放比例对所述第一视频流进行缩放获取第三视频流;根据所述第三缩放比例、所述第一窗口的宽度、所述选定区域的位置信息以及所述选定区域的宽度获取第三布局偏移参数;根据所述第三缩放比例、所述第一窗口的高度、所述选定区域的位置信息以及所述选定区域的高度获取第四布局偏移参数;Use the third zoom ratio to zoom the first video stream to obtain a third video stream; according to the third zoom ratio, the width of the first window, the position information of the selected area and the selected Obtain the third layout offset parameter based on the width of a certain area; obtain the fourth layout offset according to the third scaling ratio, the height of the first window, the position information of the selected area, and the height of the selected area. parameter;
    基于所述第三视频流在所述第一窗口中进行视频播放,并基于所述第三布局偏移参数在宽度方向上对所述第三视频流进行偏移,基于所述第四布局偏移参数在高度方向上对所述第三视频流进行偏移,并控制所述显示器在所述第一窗口播放偏移后的所述第三视频流。Perform video playback in the first window based on the third video stream, offset the third video stream in the width direction based on the third layout offset parameter, and offset the third video stream based on the fourth layout offset parameter. The shift parameter offsets the third video stream in the height direction, and controls the display to play the offset third video stream in the first window.
  19. 根据权利要求18所述的显示设备,其中,所述控制器根据所述第三缩放比例、所述第一窗口的宽度、所述选定区域的位置信息以及所述选定区域的宽度获取第三布局偏移参数包括:The display device of claim 18, wherein the controller obtains a third zoom ratio, a width of the first window, position information of the selected area, and a width of the selected area. Three layout offset parameters include:
    所述控制器通过如下公式一计算所述第三布局偏移参数:The controller calculates the third layout offset parameter through the following formula 1:
    所述公式一为:CLIP 3=(X+select_w/2)*R3-WL/2; The first formula is: CLIP 3 = (X+select_w/2)*R3-WL/2;
    所述控制器根据所述第三缩放比例、所述第一窗口的高度、所述选定区域的位置信息以及所述选定区域的高度获取第四布局偏移参数包括:所述控制器通过如下公式二计算所述第三布局偏移参数:The controller obtaining the fourth layout offset parameter according to the third scaling ratio, the height of the first window, the position information of the selected area, and the height of the selected area includes: the controller passes The third layout offset parameter is calculated using the following formula 2:
    所述公式二为:CLIP 4=(Y+select_h/2)*R3-HL/2; The second formula is: CLIP 4 = (Y+select_h/2)*R3-HL/2;
    其中,CLIP 3为所述第三布局偏移参数,CLIP 4为所述第四布局偏移参数,X为所述选定区域的左侧边缘到所述第一视频流的左侧边缘的距离,Y为所述选定区域的顶侧边缘到所述第一视频流的顶侧边缘的距离,select_w/2和select_h/2分别为所述选定区域的宽度和高度,R3为所述第三缩放比例,WL和HL分别为所述第一窗口的宽度和高度。 Wherein, CLIP 3 is the third layout offset parameter, CLIP 4 is the fourth layout offset parameter, and X is the distance from the left edge of the selected area to the left edge of the first video stream. , Y is the distance from the top edge of the selected area to the top edge of the first video stream, select_w/2 and select_h/2 are the width and height of the selected area respectively, and R3 is the Three scaling ratios, WL and HL are the width and height of the first window respectively.
  20. 一种服务器,其中,所述服务器被配置为:A server, wherein the server is configured to:
    接收显示设备在播放第一视频时发送的查询请求,所述查询请求包括用户标识和可播放时长;Receive a query request sent by the display device when playing the first video, where the query request includes a user identification and playable duration;
    响应于所述查询请求,从跟练视频库中获取所述用户标识对应的第三视频;In response to the query request, obtain the third video corresponding to the user identification from the follow-up video library;
    根据所述可播放时长计算所述第三视频的播放开始时间点和播放结束时间点;Calculate the playback start time point and playback end time point of the third video based on the playable duration;
    向所述显示设备发送包含所述第三视频的媒资标识、播放开始时间点和播放结束时间点的第三视频的媒资信息,使所述显示设备在距离所述第一视频结束前的第一时间开始至播放第二视频的第二时间内还播放所述第三视频在所述播放开始时间点和播放结束时间点之间的视频片段,其中,所述第二视频为所述显示设备的播放索引表中所述第一视频对应项目的下一个项目对应的视频,所述第三视频为提示用户进行运动的视频。Send the media asset information of the third video including the media asset identifier, the playback start time point and the playback end time point of the third video to the display device, so that the display device is within 10 seconds before the end of the first video. The video clips of the third video between the playback start time point and the playback end time point are also played during the second time period from the beginning of the first time to the playback of the second video, wherein the second video is the display The video corresponding to the next item of the corresponding item of the first video in the playback index table of the device, and the third video is a video that prompts the user to exercise.
  21. 一种媒资连播方法,其中,包括:A method for broadcasting media assets, including:
    响应于第一窗口播放到距离第一视频结束前的第一时间,根据播放索引表中存在所述第一视频对应项目的下一项目,在所述第一窗口的上方图层启动第二窗口以播放第三视频,其中,所述第一窗口为全屏窗口,所述第二窗口为非全屏窗口,所述下一项目与第二视频相对应,所述第三视频为提示用户进行运动的健身视频;In response to the first window playing to the first time before the end of the first video, according to the presence of the next item corresponding to the first video in the play index table, the second window is launched in the layer above the first window to play a third video, wherein the first window is a full-screen window, the second window is a non-full-screen window, the next item corresponds to the second video, and the third video prompts the user to exercise fitness videos;
    响应于在所述第二窗口播放到预设时长前接收到了窗口切换指令,将所述第一视频从所述第一视频的当前进度调整至所述第二窗口继续播放,将所述第三视频从所述第三视频的当前进度调整至所述第一窗口继续播放,在所述第二窗口播放到所述第二视频的第二时间时,撤销所述第二窗口,将所述第一窗口调整为从所述第二视频的当前进度继续播放;In response to receiving a window switching instruction before the second window plays to the preset duration, the first video is adjusted from the current progress of the first video to the second window to continue playing, and the third window is The video is adjusted from the current progress of the third video to the first window to continue playing. When the second window is played to the second time of the second video, the second window is canceled and the third window is A window is adjusted to continue playing from the current progress of the second video;
    响应于在所述第二窗口播放到预设时长时未接收到所述窗口切换指令,撤销所述第二窗口。In response to not receiving the window switching instruction when the second window is played for a preset duration, the second window is canceled.
  22. 一种投屏方法,其中,包括:A screencasting method, which includes:
    响应于接收到的触发指令,显示跟练界面,其中,所述跟练界面包括第一窗口和第二窗口,所述第二窗口用于播放从服务器获取的健身视频;In response to the received trigger instruction, display the follow-up training interface, wherein the follow-up training interface includes a first window and a second window, and the second window is used to play the fitness video obtained from the server;
    接收终端设备发送的第一视频流,其中,所述第一视频流为所述终端设备的视频录制装置采集得到的视频流,且携带有用于标识所述终端设备录制所述第一视频流对应的视频时的姿态的标识信息;Receive a first video stream sent by a terminal device, where the first video stream is a video stream collected by a video recording device of the terminal device, and carries a corresponding message used to identify the terminal device for recording the first video stream. The identification information of the posture in the video;
    根据所述标识信息、视频播放参数以及所述第一视频流的尺寸获取缩放比例,根据所述缩放比例对所述第一视频流进行缩放获取第二视频流,以及根据所述视频播放参数和所述第二视频流的尺寸获取布局偏移参数,所述视频播放参数包括所述第一窗口的尺寸和/或预设视频流尺寸;Obtain the scaling ratio according to the identification information, video playback parameters and the size of the first video stream, scale the first video stream according to the scaling ratio to obtain the second video stream, and obtain the second video stream according to the video playback parameters and The size of the second video stream obtains layout offset parameters, and the video playback parameters include the size of the first window and/or the preset video stream size;
    基于所述布局偏移参数对所述第二视频流进行偏移,并在所述第一窗口播放偏移后的所述第二视频流。The second video stream is offset based on the layout offset parameter, and the offset second video stream is played in the first window.
  23. 根据权利要求22所述的方法,其中,所述标识信息包括:第一姿态标识或第二姿态标识;The method according to claim 22, wherein the identification information includes: a first posture identification or a second posture identification;
    所述第一姿态标识用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为竖屏姿态;The first posture identifier is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a portrait posture;
    所述第二姿态标识用于标识所述终端设备录制所述第一视频流对应的视频时的姿态为横屏姿态;The second posture identifier is used to identify that the posture of the terminal device when recording the video corresponding to the first video stream is a horizontal screen posture;
    其中,所述第一姿态标识对应的视频播放参数和所述第二姿态标识对应的视频播放参数不同。Wherein, the video playback parameters corresponding to the first gesture identification and the video playback parameters corresponding to the second gesture identification are different.
PCT/CN2022/141210 2022-03-30 2022-12-23 Display device, server, media resource continuous playback method, and screen mirroring method WO2023185129A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202210334121.4A CN116939302A (en) 2022-03-30 2022-03-30 Display equipment, server and media asset continuous broadcasting method
CN202210334121.4 2022-03-30
CN202210743842.0A CN116801027A (en) 2022-06-27 2022-06-27 Display device and screen projection method
CN202210743842.0 2022-06-27

Publications (1)

Publication Number Publication Date
WO2023185129A1 true WO2023185129A1 (en) 2023-10-05

Family

ID=88198946

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/141210 WO2023185129A1 (en) 2022-03-30 2022-12-23 Display device, server, media resource continuous playback method, and screen mirroring method

Country Status (1)

Country Link
WO (1) WO2023185129A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170311026A1 (en) * 2016-04-25 2017-10-26 Echostar Technologies L.L.C. Apparatus, systems and methods for control of media content event recording
CN112272324A (en) * 2020-10-15 2021-01-26 聚好看科技股份有限公司 Follow-up mode control method and display device
CN113051432A (en) * 2021-04-25 2021-06-29 聚好看科技股份有限公司 Display device and media asset playing method
CN113141529A (en) * 2021-04-25 2021-07-20 聚好看科技股份有限公司 Display device and media asset playing method
CN113794917A (en) * 2021-09-15 2021-12-14 海信视像科技股份有限公司 Display device and display control method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170311026A1 (en) * 2016-04-25 2017-10-26 Echostar Technologies L.L.C. Apparatus, systems and methods for control of media content event recording
CN112272324A (en) * 2020-10-15 2021-01-26 聚好看科技股份有限公司 Follow-up mode control method and display device
CN113051432A (en) * 2021-04-25 2021-06-29 聚好看科技股份有限公司 Display device and media asset playing method
CN113141529A (en) * 2021-04-25 2021-07-20 聚好看科技股份有限公司 Display device and media asset playing method
CN113794917A (en) * 2021-09-15 2021-12-14 海信视像科技股份有限公司 Display device and display control method

Similar Documents

Publication Publication Date Title
US10469891B2 (en) Playing multimedia content on multiple devices
KR102396036B1 (en) Display device and controlling method thereof
KR101341283B1 (en) Video branching
US11805292B2 (en) Display apparatus and content display method
WO2017181599A1 (en) Method and device for displaying videos
US20140168277A1 (en) Adaptive Presentation of Content
US20110310100A1 (en) Three-dimensional shape user interface for media content delivery systems and methods
WO2017181594A1 (en) Video display method and apparatus
CN111510788B (en) Display method and display device for double-screen double-system screen switching animation
CN111526402A (en) Method for searching video resources through voice of multi-screen display equipment and display equipment
CN112788422A (en) Display device
WO2022037224A1 (en) Display device and volume control method
WO2017181595A1 (en) Method and device for video display
CN112783380A (en) Display apparatus and method
WO2023185129A1 (en) Display device, server, media resource continuous playback method, and screen mirroring method
WO2022151882A1 (en) Virtual reality device
WO2021159658A1 (en) Interface display method and display devices
CN113365124A (en) Display device and display method
KR20160148875A (en) Display device and controlling method thereof
JPWO2020090514A1 (en) Display control device, display control method, and program
CN115086722B (en) Display method and display device for secondary screen content
WO2021203916A1 (en) Display device and method for multiplexing direction keys
CN114979746B (en) Video processing method, device, equipment and storage medium
WO2021232912A1 (en) Display device and media resource playback method
CN112565892B (en) Method for identifying roles of video programs and related equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22934944

Country of ref document: EP

Kind code of ref document: A1