CN-122002065-A - Multimedia file playing method and device and electronic equipment
Abstract
The disclosure relates to the technical field of multimedia, and in particular relates to a method and a device for playing a multimedia file and electronic equipment. The method comprises the steps of obtaining first time consumption for displaying a video picture of a multimedia file, a target transmission protocol for establishing communication connection with target Bluetooth equipment and second time consumption for playing audio data of the multimedia file by the target Bluetooth equipment, determining delay time based on the first time consumption, the second time consumption and the target transmission protocol, and controlling the target Bluetooth equipment to play the audio data according to the delay time.
Inventors
- DENG ZIJING
- YANG KUN
- ZHOU YINGXIN
Assignees
- 海信视像科技股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241101
Claims (10)
- 1. An electronic device, comprising: a display configured to display a video picture of the multimedia file; A Bluetooth module; A controller coupled to the bluetooth module, the controller configured to: acquiring first time consumption for displaying the video picture, a target transmission protocol for establishing communication connection between the Bluetooth module and target Bluetooth equipment, and second time consumption for playing audio data of the multimedia file by the target Bluetooth equipment; determining a delay time based on the first time consuming, the second time consuming, and the target transport protocol; And controlling the target Bluetooth device to play the audio data in a delayed manner according to the delay time.
- 2. The electronic device of claim 1, wherein before the controller executes a first time consuming displaying the video frame, a target transmission protocol for establishing a communication connection between the bluetooth module and a target bluetooth device, and a second time consuming playing audio data of the multimedia file by the target bluetooth device, the controller is configured to: responding to the selection operation of adding the Bluetooth device, and acquiring at least one connectable actual Bluetooth device; Responding to a selection operation of a target Bluetooth device, and acquiring a device identifier of the target Bluetooth device, wherein the target Bluetooth device comprises any one of the actual Bluetooth devices; Determining at least one Bluetooth audio transmission protocol supported by the target Bluetooth device based on the device identifier; And establishing connection with the target Bluetooth device through a target transmission protocol, wherein the target transmission protocol comprises any one of the Bluetooth audio transmission protocols.
- 3. The electronic device of claim 2, wherein the controller executing the establishment of the connection with the target bluetooth device via a target transport protocol is configured to: when the target Bluetooth equipment supports a plurality of Bluetooth audio transmission protocols, acquiring the connection priority of each Bluetooth audio transmission protocol; And taking the Bluetooth audio transmission protocol corresponding to the maximum connection priority as a target transmission protocol, and establishing connection with the target Bluetooth equipment through the target transmission protocol.
- 4. The electronic device of claim 1, wherein the controller executing the determining a delay time based on the first time consuming, the second time consuming, and the target transport protocol is configured to: Removing buffering processing operation in a first path for displaying the video picture to obtain a second path when the target transmission protocol is a low-power consumption audio protocol and the first time consumption is greater than the second time consumption; and displaying the video picture according to the second path, and determining the delay time as preset time.
- 5. The electronic device of claim 1, wherein the controller executing the determining a delay time based on the first time consuming, the second time consuming, and the target transport protocol is configured to: When the target transmission protocol is the Bluetooth audio transmission model, the control module acquires a first decoding time of video data of a first frame of the multimedia file, a second decoding time of audio data of the first frame of the multimedia file and actual time consumed by the target Bluetooth device from receiving a Bluetooth data packet to playing the Bluetooth data packet; Calculating a first actual difference between the first decoding time and the second decoding time; Acquiring the encapsulation time of the Bluetooth data packet and the hardware transmission time of the Bluetooth module for transmitting the Bluetooth data packet under the condition that the first actual difference value is larger than the actual time consumption; Calculating the actual time consumption, the encapsulation time and the total time consumption of the hardware transmission time; Calculating a second actual difference between the first actual difference and the total consumption; when the second actual difference value is not in a preset time-consuming interval, calculating a third difference value between the minimum value of the time-consuming interval and the second actual difference value, and a fourth difference value between the maximum value of the time-consuming interval and the second actual difference value; A delay time is determined based on the third difference and the fourth difference.
- 6. The electronic device of claim 5, wherein the controller performs determining a delay time based on the third difference and the fourth difference, configured to: A value is randomly selected between the third difference and the fourth difference as a delay time.
- 7. A method for playing a multimedia file, comprising: Acquiring a first time consumption for displaying a video picture of a multimedia file, a target transmission protocol for establishing communication connection with a target Bluetooth device, and a second time consumption for playing audio data of the multimedia file by the target Bluetooth device; determining a delay time based on the first time consuming, the second time consuming, and the target transport protocol; And controlling the target Bluetooth device to play the audio data in a delayed manner according to the delay time.
- 8. The method according to claim 7, wherein before the obtaining a first time consuming displaying the video frame, the bluetooth module establishes a target transmission protocol of a communication connection with a target bluetooth device, and a second time consuming playing audio data of the multimedia file by the target bluetooth device, the method further comprises: responding to the selection operation of adding the Bluetooth device, and acquiring at least one connectable actual Bluetooth device; Responding to a selection operation of a target Bluetooth device, and acquiring a device identifier of the target Bluetooth device, wherein the target Bluetooth device comprises any one of the actual Bluetooth devices; Determining at least one Bluetooth audio transmission protocol supported by the target Bluetooth device based on the device identifier; And establishing connection with the target Bluetooth device through a target transmission protocol, wherein the target transmission protocol comprises any one of the Bluetooth audio transmission protocols.
- 9. The method for playing a multimedia file according to claim 8, wherein said establishing a connection with said target bluetooth device via a target transmission protocol comprises: when the target Bluetooth equipment supports a plurality of Bluetooth audio transmission protocols, acquiring the connection priority of each Bluetooth audio transmission protocol; And taking the Bluetooth audio transmission protocol corresponding to the maximum connection priority as a target transmission protocol, and establishing connection with the target Bluetooth equipment through the target transmission protocol.
- 10. A computer readable storage medium, comprising a computer program stored thereon, which when executed by a computing device, causes the computing device to implement the method of playing a multimedia file according to any of claims 1-8.
Description
Multimedia file playing method and device and electronic equipment Technical Field The disclosure relates to the technical field of multimedia, and in particular relates to a method and a device for playing a multimedia file and electronic equipment. Background Currently, more and more users connect a bluetooth device to an electronic device, so as to play audio data currently played by the electronic device through the bluetooth device when playing multimedia files on the electronic device. However, when the bluetooth device is used to play the audio data currently played by the electronic device, the transmitted audio data is subjected to bluetooth encoding, bluetooth protocol stack processing, firmware processing, air interface transmission, audio receiving end sound effect processing, decoding and playing processes, so that great delay occurs, and the problem that the audio and the video are not synchronous when the electronic device plays the multimedia file is caused, so that the experience is poor. Disclosure of Invention In order to solve the technical problems, the present disclosure provides a method, an apparatus and an electronic device for playing a multimedia file. The technical scheme of the present disclosure is as follows: In a first aspect, the disclosure provides an electronic device comprising a display configured to display a video frame of a multimedia file, a Bluetooth module, a controller connected to the Bluetooth module, the controller configured to obtain a first time consumption for displaying the video frame, a target transmission protocol for establishing a communication connection between the Bluetooth module and a target Bluetooth device, and a second time consumption for playing audio data of the multimedia file by the target Bluetooth device, determine a delay time based on the first time consumption, the second time consumption and the target transmission protocol, and control the target Bluetooth device to delay playing the audio data according to the delay time. In a second aspect, the disclosure provides a method for playing a multimedia file, including obtaining a first time consumption for displaying a video frame of the multimedia file, a target transmission protocol for establishing communication connection with a target Bluetooth device, and a second time consumption for playing audio data of the multimedia file by the target Bluetooth device, determining a delay time based on the first time consumption, the second time consumption and the target transmission protocol, and controlling the target Bluetooth device to delay playing the audio data according to the delay time. In a third aspect, the present disclosure provides an electronic device comprising a memory for storing a computer program and a controller for causing the electronic device to implement the method of playing a multimedia file as any one of the second aspects is provided, when the computer program is executed. In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon a computer program for execution by a controller of a method of playing a multimedia file as any one of the second aspects. In a fifth aspect, the present invention provides a computer program product which, when run on a computer, causes the computer to perform the method of playing a multimedia file as any one of the second aspects provides. It should be noted that the above-mentioned computer instructions may be stored in whole or in part on the first computer readable storage medium. The first computer readable storage medium may be packaged together with the controller of the display device or may be packaged separately from the controller of the display device, which is not limited in this disclosure. The descriptions of the second aspect, the third aspect, the fourth aspect and the fifth aspect in the present disclosure may refer to the detailed description of the first aspect, and the beneficial effects of the descriptions of the second aspect, the third aspect, the fourth aspect and the fifth aspect may refer to the beneficial effect analysis of the first aspect, which is not repeated herein. In the present disclosure, the names of the above-described display devices do not constitute limitations on the devices or function modules themselves, which may appear under other names in actual implementations. Insofar as the function of each device or function module is similar to the present disclosure, it is within the scope of the claims of the present disclosure and the equivalents thereof. These and other aspects of the disclosure will be more readily apparent from the following description. Compared with the prior art, the technical scheme provided by the disclosure has the following advantages: According to the playing method of the multimedia file, the electronic device obtains first time consumption for displaying a video picture of the multimedia file, a target transmission