CN115474082A - Method and apparatus for playing media data, system, vehicle, device and medium - Google Patents

Method and apparatus for playing media data, system, vehicle, device and medium Download PDF

Info

Publication number
CN115474082A
CN115474082A CN202211255537.3A CN202211255537A CN115474082A CN 115474082 A CN115474082 A CN 115474082A CN 202211255537 A CN202211255537 A CN 202211255537A CN 115474082 A CN115474082 A CN 115474082A
Authority
CN
China
Prior art keywords
data frame
video data
audio
video
played
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211255537.3A
Other languages
Chinese (zh)
Inventor
刘文志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shining Reality Wuxi Technology Co Ltd
Original Assignee
Shining Reality Wuxi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shining Reality Wuxi Technology Co Ltd filed Critical Shining Reality Wuxi Technology Co Ltd
Priority to CN202211255537.3A priority Critical patent/CN115474082A/en
Publication of CN115474082A publication Critical patent/CN115474082A/en
Pending legal-status Critical Current

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/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0647Synchronisation among TDM nodes
    • H04J3/065Synchronisation among TDM nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Abstract

The embodiment of the disclosure provides a method, a device, a system, a vehicle, an electronic device and a storage medium for playing media data, wherein the method comprises the following steps: acquiring an audio time stamp of a currently played audio data frame from a vehicle machine, wherein the currently played audio data frame belongs to media data; calculating a time stamp difference value between the audio time stamp and a video time stamp of a video data frame currently played by the external unit; determining a video data frame to be played currently in the received video data frames in response to the absolute value of the timestamp difference being greater than a preset threshold; and playing the video data frame to be played currently on the external unit, wherein the external unit is connected with the head-mounted display equipment so as to display the video data frame to be played currently on the head-mounted display equipment. By the method, the audio data and the video data can be synchronously played in a scene where the head-mounted display device and the vehicle-mounted device are combined and applied.

Description

Method and apparatus for playing media data, system, vehicle, device and medium
Technical Field
The present disclosure relates to mixed reality display technologies, and more particularly, to a method, apparatus, system, vehicle, electronic device, and storage medium for playing media data.
Background
With the development of social economy and technology, the application of the head-mounted display device is becoming more extensive, and especially, the combined application of the head-mounted display device and a vehicle-mounted device becomes a new trend, for example, media data can be viewed in a vehicle by using the head-mounted display device, so that the user experience can be improved.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, a system, a vehicle, an electronic device and a storage medium for playing media data, and in a scene of combined application of a head-mounted display device and a vehicle, synchronous playing of audio data and video data can be realized.
In one aspect of the disclosed embodiments, a method for playing media data is provided, which is applied to an external unit, wherein the external unit is connected to a head-mounted display device, and the method includes: acquiring an audio time stamp of a currently played audio data frame from a vehicle machine, wherein the currently played audio data frame belongs to the media data; calculating a timestamp difference between the audio timestamp and a video timestamp of a video data frame currently played by the external unit, wherein the video data frame is obtained by decoding video data received from the vehicle machine, and the video data belongs to the media data; determining a video data frame to be played currently in the video data frames in response to the absolute value of the timestamp difference being greater than a preset threshold, wherein the preset threshold is a threshold for representing synchronization of the audio data frame and the video data frame; and playing the video data frame to be played currently on the external unit so as to display the video data frame to be played currently on the head-mounted display equipment.
In another aspect of the embodiments of the present disclosure, a method for playing media data is provided, which is applied to a car machine, and includes: separating audio data and video data from the media data in response to receiving an instruction to play the media data; decoding the audio data, and sending the decoded audio data frame to a vehicle-mounted sound so that the vehicle-mounted sound plays the decoded audio data frame; sending the video data to an external unit; and responding to a received acquisition request of the external unit for the audio time stamp of the currently played audio data frame, and sending the audio time stamp of the currently played audio data frame to the external unit so that the external unit can play the video data on the external unit synchronously with the audio data.
In another aspect of the disclosed embodiments, there is provided an apparatus for playing media data, connected to an external unit, where the external unit is connected to a head-mounted display device, the apparatus including: the audio time stamp obtaining module is used for obtaining an audio time stamp of a currently played audio data frame from the vehicle machine, wherein the currently played audio data frame belongs to the media data; a timestamp difference calculation module, configured to calculate a timestamp difference between the audio timestamp and a video timestamp of a video data frame currently played by the external unit, where the video data frame is obtained by decoding video data received from the car machine, and the video data belongs to the media data; the synchronization processing module is used for determining a video data frame to be played currently in the video data frames in response to the absolute value of the timestamp difference being greater than a preset threshold, wherein the preset threshold is a threshold for representing the synchronization of the audio data frame and the video data frame; and the play control module is used for playing the video data frame to be played currently on an external unit, and the external unit is connected with the head-mounted display equipment so as to display the video data frame to be played currently on the head-mounted display equipment.
In another aspect of the disclosed embodiments, an apparatus for playing media data is provided, which is connected to a vehicle, and includes: the audio-video separation module is used for responding to a received command of playing the media data and separating audio data and video data from the media data; the audio-video decoding module is used for decoding the audio data and sending the decoded audio data frame to the vehicle-mounted sound equipment so that the vehicle-mounted sound equipment can play the decoded audio data frame; the communication module is used for sending the video data to an external unit; and the audio time stamp response module is used for responding to a received request of the external unit for acquiring the audio time stamp of the currently played audio data frame and sending the audio time stamp of the currently played audio data frame to the external unit so that the external unit can play the video data on the external unit synchronously with the audio data.
In another aspect of the disclosed embodiments, there is provided a system for playing media data, including: a device connected to the external unit for playing media data; at least one head mounted display device, communicatively coupled to the means for playing the media data, for displaying the video data.
In yet another aspect of an embodiment of the present disclosure, a vehicle is provided, including at least one of: a device connected with the vehicle machine for playing media data; a device for playing media data and a hub connected with the vehicle machine; the device for playing the media data is connected with the vehicle machine and the device for playing the media data is connected with the external unit; the system for playing media data and the device for playing media data connected with the vehicle machine are disclosed; the uplink interface of the concentrator is used for being connected with a device which is connected with the vehicle-mounted device and is used for playing media data, and the downlink interface of the concentrator is used for being connected with a device which is connected with the external unit and is used for playing media data.
In another aspect of the disclosed embodiments, a head-mounted display device is provided, which includes a device connected to an external unit for playing media data.
In yet another aspect of the embodiments of the present disclosure, a computer program product is provided, which includes computer program instructions, when executed, implement the method for playing media data of the present disclosure.
In another aspect of the disclosed embodiments, an electronic device is provided, which includes: a memory for storing a computer program; a processor for executing the computer program stored in the memory, and when the computer program is executed, implementing the method for playing media data of the present disclosure.
In yet another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the method for playing media data of the present disclosure.
The technical solution of the present disclosure is further described in detail by the accompanying drawings and examples.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description, serve to explain the principles of the disclosure.
The present disclosure may be more clearly understood from the following detailed description, taken with reference to the accompanying drawings, in which:
fig. 1 is a flowchart of a method for playing media data according to an embodiment of the present disclosure;
fig. 2 is another flowchart of a method for playing media data according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of audio data frames and video data frames according to an embodiment of the disclosure;
FIG. 4 is yet another flow chart of a method for playing media data in accordance with an embodiment of the present disclosure;
FIG. 5 is yet another flow chart of a method for playing media data of an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an apparatus for playing media data according to an embodiment of the present disclosure;
fig. 7 is another schematic structural diagram of an apparatus for playing media data according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an application embodiment of the electronic device of the present disclosure.
Detailed Description
Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that: the relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless specifically stated otherwise.
It will be understood by those within the art that the terms "first", "second", etc. in the embodiments of the present disclosure are used only for distinguishing between different steps, devices or modules, etc., and do not denote any particular technical meaning or necessary logical order therebetween.
It is also understood that in embodiments of the present disclosure, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the disclosure, may be generally understood as one or more, unless explicitly defined otherwise or stated otherwise.
In addition, the term "and/or" in the present disclosure is only one kind of association relationship describing an associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the former and latter associated objects are in an "or" relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be discussed further in subsequent figures.
The disclosed embodiments may be applied to electronic devices such as terminal devices, computer systems, servers, etc., which are operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
The method for playing the media data can be used for realizing synchronous playing of the audio played by the vehicle machine and the video displayed by the head-mounted display equipment.
The system architecture of the present disclosure may include a vehicle machine and at least one head mounted display device end. The head-mounted display equipment end can comprise a plurality of pieces of equipment which are arranged in a split mode, and can also be one piece of equipment of an all-in-one machine.
For the split setting, the head-mounted display device end may include an external unit and at least one head-mounted display device. The external unit can provide computing power for the head-mounted display device, and a display of the head-mounted display device is used for displaying data processed by the external unit. The external unit may also operate using a connected external power source (e.g., a car machine, etc.) and provide power to the head-mounted display device. Optionally, the external unit may further include a battery, and when connected to an external power source, the external unit is charged by using the external power source and provides power for the head-mounted display device; under the condition that the external power supply is not connected, the external unit works by using a self-contained battery and provides power for the head-mounted display equipment. Alternatively, one external unit may be connected to one head-mounted display device, or may be connected to a plurality of head-mounted display devices, as long as the external unit can provide sufficient power and computational power for the connected head-mounted display devices. Optionally, the uplink end of the external unit is connected to the vehicle machine, and the downlink end is connected to at least one head-mounted display device. The external unit may be, for example, a mobile phone, a PC, a tablet, a box, or other device having computing power. The head-mounted display device in this case may be a wearable device that does not include computing power, such as split AR glasses, VR glasses, MR glasses, XR glasses, and the like.
For the case of the all-in-one machine, the head-mounted display device end can be a head-mounted display device integrated with the function of the external unit. The head-mounted display device of the all-in-one machine can provide computing power, complete data processing and display of the processed data on the display of the head-mounted display device. The head-mounted display equipment of the all-in-one machine can also work by utilizing the connected external power supply. The head-mounted display equipment of the all-in-one machine can also comprise a battery, and under the condition of being connected with an external power supply, the head-mounted display equipment is charged by the external power supply and works; the head-mounted display device operates using its own battery without connecting an external power source. Optionally, the head-mounted display device of the all-in-one machine is connected with the vehicle machine. The head mounted display device in this case may be a wearable device that itself contains computing power, such as integrated AR glasses, VR glasses, MR glasses, XR glasses, and the like.
The present disclosure is not limited by the type of head mounted display device, and may include, for example and without limitation, AR glasses, VR glasses, MR glasses, XR glasses.
In addition, the number of the car machine and the head-mounted display device is not limited by the disclosure. The head-mounted display device end can also be any one of the head-mounted display device types or any combination of the head-mounted display device types.
It should be further noted that the car machine is a vehicle-mounted infotainment product installed in an automobile, and the car machine can functionally realize information communication between people and the car and between the car and the outside (car-to-car). The car machine is mostly installed in the center console of the car.
And after the vehicle is started, the vehicle machine supplies power to each downstream device connected with the vehicle machine. After the data path is established between the vehicle machine and the head-mounted display device, the vehicle machine can provide power and charge for the head-mounted display device, and can also provide media data stream for the head-mounted display device.
Since the audio data and the video data are respectively played on the car machine and the external unit, and the video data is sent from the car machine to the external unit, a delay may be caused in the process of transmitting the video data to the external unit. This may cause the audio data and the video data to be played out of synchronization.
Exemplary method
As an aspect of the present disclosure, a method for playing media data is provided, which is applied to an external unit. The external unit may be connected with the head-mounted display device.
Fig. 1 is a flowchart of a method for playing media data according to an embodiment of the present disclosure. As shown in fig. 1, the method may include steps S110, S120, S130, and S140. The following is specifically described for each step.
S110, obtaining an audio time stamp of the currently played audio data frame from the vehicle machine, wherein the currently played audio data frame belongs to media data.
It should be noted that the media data itself is time-stamped, and when the audio data and the video data are separated, they are still time-stamped. In the step, the vehicle terminal can carry out audio-video separation on the media data according to the instruction so as to separate out audio data, and then the audio data is decoded to obtain audio data frames and corresponding audio time stamps. The instruction is, for example, a media data playing instruction.
The external unit is not limited in the present disclosure, and may be, for example, a converter (Adapter). The external unit has a certain calculation power and/or data processing capacity and is used for assisting the head-mounted display equipment to display. The external unit can also supply power for the head-mounted display equipment connected with the external unit. For the integrated head-mounted display device end, the external unit is connected with the head-mounted display device, namely, the module with the function of the external unit is connected in the head-mounted display device in an integrated manner. For the head-mounted display device end arranged in a split manner, the connection of the external unit and the head-mounted display device means that the external unit and the head-mounted display device are connected in a wired or wireless manner. For convenience of describing the scheme of the present disclosure, the external unit is used as an execution subject with computational power and data processing capability.
As an optional implementation manner, the external unit may be in communication connection with the in-vehicle device, so as to send a request for obtaining an audio time stamp of the currently played audio data frame to the in-vehicle device, thereby obtaining the audio time stamp of the currently played audio data frame from the in-vehicle device.
As an alternative example, the message format of the request and feedback audio time stamps may be concatenated from a common string. For example, the external unit sends get.
In this disclosure, the communication connection mode between the external unit and the car machine is not limited, for example, the external unit and the car machine can be connected through a USB data line, and the data port Type can be Type-C.
S120, calculating a time stamp difference value between the audio time stamp and a video time stamp of a video data frame currently played by the external unit; the video data frame is obtained by decoding video data received from the car machine, and the video data belongs to media data.
As an alternative embodiment, the present disclosure is not limited to the manner of decoding the video data in the media data, and may include a soft decoding manner or a hard decoding manner, for example. Similarly, the decoding manner of the audio data in step S110 is not limited, and may also include soft decoding or hard decoding, for example.
The external unit receives the video data from the car machine, and the external unit decodes the video data to obtain the video data frame which can be played at the external unit.
And S130, determining the video data frame to be played currently in the video data frames in response to the absolute value of the timestamp difference being larger than a preset threshold value, wherein the preset threshold value is a threshold value used for representing the synchronization of the audio data frame and the video data frame.
As an optional embodiment, the preset threshold is not limited in the present disclosure, and may be set according to a requirement. For example, it may be 80ms to 120ms.
As an alternative embodiment, an absolute value of the timestamp difference being greater than the preset threshold may indicate that the currently playing audio data frame is not synchronized with the currently playing video data frame. Conversely, an absolute value of the timestamp difference being not greater than the predetermined threshold may indicate that the currently playing audio data frame is synchronized with the currently playing video data frame.
For the case of non-synchronization, the reasons for the non-synchronization may include the following two cases. First, the audio time stamp of the currently played audio data frame is larger than the video time stamp of the currently played video data frame, i.e. the audio is played faster than the video. Secondly, the audio time stamp of the currently played audio data frame is smaller than the video time stamp of the currently played video data frame, i.e. the audio playing is slower than the video playing.
And S140, playing the video data frame to be played currently on the external unit so as to display the video data frame to be played currently on the head-mounted display device.
As an alternative embodiment, the connection of the external unit to the head-mounted display device may have various forms. For example, the external unit and the head-mounted display device may be separately arranged, the external unit is in communication connection with a display of the head-mounted display device, the external unit plays video data frames, and the display of the head-mounted display device displays the video data frames played by the external unit. Or, the external unit may be integrated in the head-mounted display device, that is, an all-in-one head-mounted display device, where the external unit plays the video data frame, and a display of the head-mounted display device displays the video data frame played by the external unit.
As described above, in the method for playing media data according to the above embodiment of the present disclosure, the audio timestamp of the currently played audio data frame is obtained from the vehicle device, then the timestamp difference between the audio timestamp and the video timestamp of the video data frame currently played by the external unit is calculated, then the video data frame to be currently played is determined in the video data frame in response to the absolute value of the timestamp difference being greater than the preset threshold, that is, the video data frame synchronized with the audio data frame is determined as the video data frame to be currently played by judging the relationship between the timestamp difference between the audio timestamp and the video timestamp and the preset threshold, and finally the video data frame to be currently played is played on the external unit, and the rendered image of the video data frame is presented by the head-mounted display device, so that the effect of synchronously playing the audio data frame at the vehicle end and the video data frame at the external unit end is achieved.
As an optional implementation manner, on the basis of the embodiment in fig. 1, the method for playing media data according to the embodiment of the present disclosure further includes: and storing the video data frames to be played, wherein the video time stamps of the video data frames to be played are all larger than the video time stamp of the currently played video data frame.
It can be understood that, under the condition that the speed of the video data transmitted by the car machine to the external unit is relatively high, after the currently played video data frame, the external unit can also receive and decode the surplus video data frame to be played which is not played. The video data frame to be played may be stored first, and then called again when it is needed to be played (for example, the audio time stamp of the currently played audio data frame matches the video time stamp of the stored video data frame to be played, or the video data frame to be played adjacent to the currently played video data frame is needed to be played after the playing of the current video data frame is completed), and played synchronously with the audio data frame. Because the video data frame to be played is processed and stored in advance, real-time processing is not needed, and the fluency and the response speed of video playing can be improved.
On the basis of the embodiment of fig. 1, the step S130 of determining the video data frame to be currently played in the video data frame may be implemented in a variety of ways:
in an optional embodiment, in a case that a video timestamp of a currently played video data frame is smaller than an audio timestamp of a currently played audio data frame, if a video data frame whose video timestamp matches an audio timestamp of the currently played audio data frame exists in the video data frame to be played, the matched video data frame is used as the video data frame to be currently played.
In another optional embodiment, in a case that a video timestamp of a currently played video data frame is smaller than an audio timestamp of a currently played audio data frame, if at least one video data frame exists in the video data frames to be played, where an absolute value of a difference between the video timestamp and the audio timestamp of the currently played audio data frame is smaller than or equal to a preset threshold, any one of the at least one video data frame is taken as the video data frame to be currently played.
It is to be understood that, the difference value of the timestamps being less than or equal to the preset threshold value indicates that the at least one video data frame is synchronized with the currently played audio data frame, so that a frame can be selected from the at least one video data frame directly as the video data frame to be currently played.
In yet another optional implementation manner, in a case that a video timestamp of a currently played video data frame is smaller than an audio timestamp of a currently played audio data frame, if absolute values of differences between the video timestamp of the video data frame to be played and the audio timestamp of the currently played audio data frame are both greater than a preset threshold, a video data frame with a largest video timestamp among the video data frames to be played is taken as the video data frame to be played currently.
It can be understood that, if the video timestamp of the currently played video data frame is smaller than the audio timestamp of the currently played audio data frame, and the absolute value of the difference between the video timestamp of the video data frame to be played and the audio timestamp of the currently played audio data frame is greater than the preset threshold, it indicates that the video timestamp of the video data frame to be played is also smaller than the audio timestamp of the currently played audio data frame. The video data frame with the largest video time stamp in the video data frames to be played is closest to the currently played audio data frame in terms of time, and therefore the video data frame is selected as the video data frame to be played currently.
In yet another optional embodiment, in a case that the video timestamp of the currently played video data frame is greater than the audio timestamp of the currently played audio data frame, the frame length of the currently played video data frame is extended until a timestamp difference between the video timestamp of the currently played video data frame and the audio timestamp of the currently played audio data frame is less than or equal to a preset threshold.
It can be understood that, since the video data frames to be played are all later than the currently played video data frame in this embodiment, if the video timestamp of the currently played video data frame is greater than the audio timestamp of the currently played audio data frame, it is impossible to find a video data frame whose video timestamp is less than the currently played video data frame and match the currently played audio data frame. Therefore, the audio time stamp of the audio data frame which is currently played is waited to be gradually increased by prolonging the frame length of the video data frame which is currently played until the video data frame which is currently played and the audio data frame which is currently played accord with the synchronous condition, so that the time stamp difference value can be reduced.
As an optional example, when the determined video data frame to be currently played is located after the video data frame to be currently played, and the number of interval video frames between the video data frame to be currently played and the video data frame to be currently played is large (the number of interval video frames is greater than or equal to a preset number of frames, for example, 3 frames, 5 frames, and the like), in order to avoid abrupt change of a video picture seen by a user, the frame length of each video data frame from the video data frame to be currently played may be compressed, so as to achieve an effect of continuously and rapidly transitioning to the video data frame to be currently played.
As an optional implementation manner, on the basis of the embodiment in fig. 1, the method for playing media data according to the embodiment of the present disclosure further includes: all frames of video data are stored.
It can be understood that storing all video data frames facilitates review by a user without reloading, which is beneficial to improving user experience.
On the basis of this embodiment, the "determining a video data frame to be currently played in a video data frame" in step S130 can also be implemented by any one of the following manners:
as an optional implementation manner, at least one video data frame, in which an absolute value of a difference between a video timestamp and an audio timestamp of a currently played audio data frame is less than or equal to a preset threshold, is selected from all stored video data frames, and any one of the at least one video data frame is taken as a video data frame to be currently played.
As another optional implementation, a video data frame with a video timestamp matching the audio timestamp of the currently played audio data frame is selected from all stored video data frames, and the matched video data frame is used as the video data frame to be currently played.
It can be understood that the above two embodiments provide more options for determining the mode of the video data frame to be currently played in the video data frame, which is beneficial to the implementation of the subsequent steps.
As an alternative implementation, on the basis of the embodiment of fig. 1, the audio time stamp may include at least one of: the starting time of the audio data frame, the ending time of the audio data frame and the actual playing time of the audio data frame. The video time stamp may include at least one of: the starting time of the video data frame, the ending time of the video data frame and the actual playing time of the video data frame.
As an alternative embodiment, referring to fig. 2, the determining manner of the actual playing time of the video data frame may include:
s210, timing is carried out when the video data frame is played, and the actual playing duration of the video data frame is obtained.
As an alternative embodiment, the timing function of the external unit (e.g., converter) or the system timing module at the vehicle end may be utilized to time the video data frames as they are played.
S220, calculating the actual playing time of the video data frame based on the relevant parameters of the video data frame and the actual playing time; wherein the relevant parameters of the video data frame include at least one of: the end time and the frame length of the video data frame, and the start time of the video data frame.
For example, the actual playing time can be obtained by adding the actual playing time to the starting time. Or subtracting the actual playing time length from the frame length to obtain an unplayed time length, and then subtracting the unplayed time length from the ending time to obtain the actual playing time. Or subtracting the frame length from the ending time to obtain the starting time, and adding the actual playing time to the starting time to obtain the actual playing time. The actual playing time may be calculated in many ways, which is not exhaustive in this disclosure.
For the situation that the currently played video data frame is played again after being paused for a period of time in the midway, the time of pause in the middle is not counted into the actual playing time length.
It can be understood that the accuracy of audio and video synchronization can be improved by taking the actual playing time as the timestamp, thereby being beneficial to improving the user experience.
The video data frame with the video time stamp matched with the audio time stamp of the currently played audio data frame comprises any one of the following:
under the condition that the audio time stamp of the currently played audio data frame is the actual playing time:
as an optional embodiment, if the video timestamp is the start time of a video data frame, the video data frame matching the audio timestamp of the currently played audio data frame is: and the video data frame with the largest video time stamp in the video data frames with the video time stamps less than or equal to the audio time stamp of the currently played audio data frame.
Referring to fig. 3, it is assumed that the actual playing time of the audio data frame A3 currently played by the vehicle end is the starting time. The starting time of the video data frames V1 and V2 at the external unit end is less than or equal to the starting time of the audio data frame A3, wherein the video time stamp of the video data frame V2 is the largest. Thus, video data frame V2 is selected as the matching video data frame.
As an optional embodiment, if the video timestamp is the end time of the video data frame, the video data frame matching the audio timestamp of the currently played audio data frame is: and the video data frame with the smallest video timestamp in the video data frames with the video timestamps larger than the audio timestamps of the currently played audio data frames.
Referring to fig. 3, it is assumed that the actual playing time of the audio data frame A3 currently played by the vehicle end is the starting time. The ending time of the video data frames V2 and V3 at the external unit end is greater than the starting time of the audio data frame A3, wherein the video time stamp of the video data frame V2 is the minimum. Thus, video data frame V2 is selected as the matching video data frame.
Under the condition that the audio time stamp of the currently played audio data frame is the starting time:
as an alternative embodiment, if the video timestamp is the start time of the video data frame, the video data frame matching the audio timestamp of the currently played audio data frame is: and the video data frame with the largest video timestamp in the video data frames with the video timestamps less than or equal to the audio timestamps of the currently played audio data frames.
Referring to fig. 3, it is assumed that the audio data frame currently played at the vehicle end is A4. The starting time of the video data frames V1 and V2 at the external unit end is less than or equal to the starting time of the audio data frame A4, wherein the video time stamp of the video data frame V2 is the largest. Thus, video data frame V2 is selected as the matching video data frame.
As an optional embodiment, if the video timestamp is the end time of the video data frame, the video data frame matching the audio timestamp of the currently played audio data frame is: and the video data frame with the smallest video timestamp in the video data frames with the video timestamps larger than the audio timestamps of the audio data frames currently played.
Referring to fig. 3, it is assumed that the audio data frame currently played at the vehicle end is A4. The ending time of the video data frames V2 and V3 at the external unit end is greater than the starting time of the audio data frame A4, wherein the video time stamp of the video data frame V2 is the minimum. Thus, video data frame V2 is selected as the matching video data frame.
Under the condition that the audio time stamp of the currently played audio data frame is the end time:
as an alternative embodiment, if the video timestamp is the start time of the video data frame, the video data frame matching the audio timestamp of the currently played audio data frame is: and the video data frame with the largest video time stamp in the video data frames with the video time stamps smaller than the audio time stamps of the currently played audio data frames.
Referring to fig. 3, it is assumed that the audio data frame currently played at the vehicle end is A4. The start time of the video data frames V1, V2, V3 at the external unit end are all smaller than the end time of the audio data frame A4, wherein the video timestamp of the video data frame V3 is the largest. Thus, video data frame V3 is selected as the matching video data frame.
As an optional implementation, if the video timestamp is the end time of the video data frame, the video data frame matching the audio timestamp of the currently played audio data frame is: and the video data frame with the smallest video timestamp is the video data frame with the video timestamp more than or equal to the audio timestamp of the currently played audio data frame.
Referring to fig. 3, it is assumed that the audio data frame currently played at the vehicle end is A4. In the video data frames of the external unit end, only the end time of V3 is greater than or equal to the end time of the audio data frame A4, so the video data frame V3 is selected as the matched video data frame.
It can be understood that, by the above explicit definition, the video data frames with the video timestamps matched with the audio timestamps of the currently played audio data frames can be rapidly screened from the video data frames to be played, which is beneficial to improving the implementation efficiency of the scheme.
As an alternative embodiment, on the basis of the embodiment in fig. 1, the method for playing media data according to the embodiment of the present disclosure may further include: and rendering the console corresponding to the control signal in response to the received control signal sent by the vehicle machine. The control signal may include at least one of pause, play, fast forward, fast backward, volume adjustment, brightness adjustment, resolution adjustment, magnification adjustment, current play duration of the media data, total duration of the media data, next media data play, previous media data play, sound effect, pop-up switch, like, favorite, share, comment, and select.
The vehicle-mounted display equipment and the vehicle-mounted display equipment have the advantages that different use requirements and visual interaction feelings of users can be met through the arrangement of the control function, and accordingly user experience under the combined application scene of the head-mounted display equipment and the vehicle machine can be improved.
As another aspect of the present disclosure, a method for playing media data is provided, which is applied to a car machine.
Fig. 4 is a flowchart of a method for playing media data according to an embodiment of the present disclosure. As shown in fig. 4, the method includes steps S410, S420, S430, and S440. The following is specifically described for each step.
And S410, in response to receiving the instruction of playing the media data, separating the audio data and the video data from the media data.
The present disclosure does not limit the implementation of audio-video separation. For example, audio data and video data are separated from the media data using a correlation algorithm. The correlation algorithm can be a Conv-TasNet-based multi-feature fusion audio and video combined speech separation algorithm.
As an optional example, the instruction may be a play instruction issued by a user, and the play instruction may be triggered by voice, touch, or the like.
And S420, decoding the audio data, and sending the decoded audio data frame to the vehicle-mounted sound so that the vehicle-mounted sound plays the decoded audio data frame.
After the audio data are separated out, the vehicle-mounted device decodes the audio data to obtain an audio data frame which can be played in the vehicle-mounted sound.
The decoding method of the audio data is not limited in the present disclosure, and may include soft decoding or hard decoding, for example.
S430, sending the video data to an external unit;
the present disclosure does not limit the communication mode between the vehicle device and the external unit. For example, a USB data line connection may be used for media data transmission, and the USB data line uses a data line supporting USB3.0 (maximum transmission speed is 5 Gb/s) or USB3.1 (maximum transmission speed is 10 Gb/s) standard. In addition, the uplink and downlink ports between the car machine and the external unit can be Type-C Type ports (the highest port can bear 10Gbps data transmission speed).
S440, responding to the received request of the external unit for acquiring the audio time stamp of the currently played audio data frame, sending the audio time stamp of the currently played audio data frame to the external unit, so that the external unit can play the video data on the external unit synchronously with the audio data.
Referring to the method embodiment of the external unit in the previous aspect, the external unit plays the video data on the external unit in synchronization with the audio data by: the external unit judges whether the absolute value of the time stamp difference value between the audio time stamp and the video time stamp of the video data frame currently played by the external unit is larger than a preset threshold value, and determines the video data frame to be played currently in the video data frame under the condition that the absolute value of the time stamp difference value is larger than the preset threshold value, and then the video data frame is played synchronously with the audio data frame currently played at the vehicle end.
As described above, according to the method for playing media data in the embodiment of fig. 4 of the present disclosure, by separating audio and video of the media data, decoding the audio data and sending the audio data to the car audio for playing, sending the video data to the external unit, and sending the audio timestamp of the currently played audio data frame to the external unit in response to the request of the external unit, the method can cooperate with the external unit to play the video data on the external unit synchronously with the audio data. And rendering pictures of the video data frames are presented through the head-mounted display equipment, so that the audio data and the video data are synchronously played in an application scene of the combination of the head-mounted display equipment and the vehicle machine.
As an alternative embodiment, the audio time stamp comprises at least one of: the starting time of the audio data frame, the ending time of the audio data frame and the actual playing time of the audio data frame.
As an alternative embodiment, referring to fig. 5, the determining method of the actual playing time of the audio data frame includes:
and S510, timing when the audio data frame is played to obtain the actual playing time of the audio data frame.
As an alternative example, a system timing module at the vehicle end may be utilized to time the audio data frames as they are played.
S520, calculating the actual playing time of the audio data frame based on the relevant parameters of the audio data frame and the actual playing time. Wherein the related parameters of the audio data frame comprise at least one of: the end time and the frame length of the audio data frame, and the start time of the audio data frame.
For example, the actual playing time can be obtained by adding the actual playing time to the starting time. Or subtracting the actual playing time length from the frame length to obtain an unplayed time length, and then subtracting the unplayed time length from the ending time to obtain the actual playing time. Or subtracting the frame length from the ending time to obtain the starting time, and adding the actual playing time to the starting time to obtain the actual playing time. The actual playing time may be calculated in many ways, which is not exhaustive in this disclosure.
For the condition that the audio data frame played at present is played again after being paused for a period of time in the midway, the pause time in the middle can not be counted into the actual playing time length.
It can be understood that the accuracy of audio and video synchronization can be improved by taking the actual playing time as the timestamp, thereby being beneficial to improving the user experience.
As an optional implementation, the obtaining of the media data includes at least one of: real-time downloading from the network, pre-downloading and storing from the network, reading from the local, and reading from the external device.
The external device may include, but is not limited to, a USB flash disk, a hard disk, a game console, etc.
As an alternative embodiment, on the basis of the embodiment in fig. 4, the method for playing media data according to the embodiment of the present disclosure further includes:
and sending a control signal to the external unit so that the external unit renders a console corresponding to the control signal in a virtual space of the head-mounted display device. The control signal may include at least one of pause, play, fast forward, fast backward, volume adjustment, brightness adjustment, resolution adjustment, magnification adjustment, current play duration of the media data, total duration of the media data, next media data play, previous media data play, sound effect, pop-up switch, like, collection, sharing, comment, and selection.
Can understand, through the setting of above-mentioned control function, can satisfy different user demands of user and the mutual impression of visual vision to can promote the user experience who wears under display device and the car machine combined application scene.
As an alternative embodiment, the method for playing media data according to the embodiment of the present disclosure may also use a video player at a vehicle end to play video data. The steps of this embodiment may include: firstly, decoding video data to obtain video data frames, and sending the video data frames to a video player arranged at a vehicle end for playing; secondly, calculating a timestamp difference value between the currently played audio timestamp and the currently played video timestamp of the video data frame; and thirdly, determining the video data frame to be played currently from the video data frames in response to the absolute value of the timestamp difference value being larger than the preset threshold value.
As an alternative embodiment, the determining the video data frame to be currently played from the video data frames may include any one of the following:
selecting at least one video data frame from the video data frames, wherein the absolute value of the difference value between the video timestamp and the audio timestamp of the currently played audio data frame is less than or equal to a preset threshold value, and taking any one video data frame in the at least one video data frame as the current video data frame to be played.
And selecting a video data frame with a video time stamp matched with the audio time stamp of the currently played audio data frame from the video data frames, and taking the matched video data frame as the video data frame to be played currently.
Referring to fig. 3, a video data frame to be currently played is determined from vehicle-end video data frames.
Assume that the actual playing time of the audio data frame A3 currently played at the vehicle end is the starting time. The difference between the ending time or the starting time of V2 in the vehicle-end video data frame and the starting time of the audio data frame A3 is smaller than a preset threshold value. Thus, video data frame V2 may be selected as the video data frame currently to be played.
For the case that the absolute value of the timestamp difference between the currently played audio timestamp and the currently played video timestamp is less than or equal to the preset threshold, it may be considered that the playing of the current audio data and the video data is synchronous, and the current audio data and the video data are played in sequence according to the respective frame sequence and frame length, and no synchronization operation is required.
It can be understood that in a scene only using a car machine, a video data frame synchronized with an audio data frame can be determined as a video data frame to be currently played by judging a relationship between a timestamp difference value between an audio timestamp and a video timestamp and a preset threshold. And then, the synchronous playing of the audio data and the video data can be realized, so that the audio-visual experience of a user is improved.
In the method of the present disclosure, various optional embodiments, optional implementation manners, and optional examples disclosed above may be flexibly selected and combined as needed, so as to achieve corresponding functions and effects, and the present disclosure is not listed one by one.
Exemplary devices
It should be understood that the foregoing embodiments herein with respect to the method for playing media data may also be similarly applied to similar extensions in the following apparatus for playing media data. For the sake of simplicity, it is not described in detail.
As one aspect of the present disclosure, an apparatus for playing media data is provided, which is connected with an external unit, wherein the external unit is connected with a head-mounted display device.
The device for playing the media data is connected with the external unit, and can be integrated in the external unit or independent of the external unit and in communication connection with the external unit.
Fig. 6 is a schematic structural diagram of an apparatus for playing media data according to an embodiment of the present disclosure. As shown in fig. 6, the apparatus for playing media data may include:
the audio timestamp acquiring module 610 is configured to acquire an audio timestamp of a currently played audio data frame from the car machine, where the currently played audio data frame belongs to the media data.
A timestamp difference calculation module 620, configured to calculate a timestamp difference between the audio timestamp and a video timestamp of a video data frame currently played by the external unit; the video data frame is obtained by decoding video data received from the car machine, and the video data belongs to media data.
The synchronization processing module 630 is configured to determine, in response to that the absolute value of the timestamp difference is greater than a preset threshold, a video data frame to be currently played in the video data frames, where the preset threshold is a threshold used for representing synchronization between the audio data frame and the video data frame.
The playing control module 640 is configured to play the video data frame to be currently played on the external unit, so that the video data frame to be currently played is displayed on the head-mounted display device.
As an optional embodiment, the apparatus further comprises a to-be-played video data storage module: the video playing device is used for storing video data frames to be played, wherein the video time stamps of the video data frames to be played are all larger than the video time stamp of the video data frame currently played.
As an alternative embodiment, the synchronization processing module 630 is further configured to: and under the condition that the video time stamp of the currently played video data frame is smaller than the audio time stamp of the currently played audio data frame, if the video data frame with the video time stamp matched with the audio time stamp of the currently played audio data frame exists in the video data frame to be played, taking the matched video data frame as the video data frame to be played currently.
As an alternative embodiment, the synchronization processing module 630 is further configured to: and under the condition that the video time stamp of the currently played video data frame is smaller than the audio time stamp of the currently played audio data frame, if at least one video data frame with the absolute value of the difference value between the video time stamp and the audio time stamp of the currently played audio data frame being smaller than or equal to a preset threshold exists in the video data frame to be played, taking any one of the at least one video data frame as the video data frame to be played currently.
As an alternative embodiment, the synchronization processing module 630 is further configured to: and under the condition that the video time stamp of the currently played video data frame is smaller than the audio time stamp of the currently played audio data frame, if the absolute value of the difference value between the video time stamp of the video data frame to be played and the audio time stamp of the currently played audio data frame is larger than a preset threshold value, taking the video data frame with the largest video time stamp in the video data frames to be played as the video data frame to be played currently.
As an alternative embodiment, the synchronization processing module 630 is further configured to: and under the condition that the video time stamp of the currently played video data frame is greater than the audio time stamp of the currently played audio data frame, prolonging the frame length of the currently played video data frame until the time stamp difference value between the video time stamp of the currently played video data frame and the audio time stamp of the currently played audio data frame is less than or equal to a preset threshold value.
As an alternative embodiment, the apparatus further includes a video data storage module: for storing all frames of video data; the synchronization processing module 630 is further used for any of the following: selecting at least one video data frame from all stored video data frames, wherein the absolute value of the difference value between the video timestamp and the audio timestamp of the currently played audio data frame is less than or equal to a preset threshold value, and taking any video data frame in the at least one video data frame as a video data frame to be played currently; and selecting a video data frame with a video time stamp matched with the audio time stamp of the currently played audio data frame from all the stored video data frames, and taking the matched video data frame as the video data frame to be played currently.
As an alternative embodiment, the audio time stamp comprises at least one of: the starting time of the audio data frame, the ending time of the audio data frame and the actual playing time of the audio data frame. The video timestamp comprises at least one of: the starting time of the video data frame, the ending time of the video data frame, and the actual playing time of the video data frame.
As an optional embodiment, the apparatus further comprises a video playing time determination module, configured to: timing when the video data frame is played to obtain the actual playing time length of the video data frame; and calculating the actual playing time of the video data frame based on the relevant parameters of the video data frame and the actual playing time. Wherein the relevant parameters of the video data frame include at least one of: the end time and the frame length of the video data frame, and the start time of the video data frame.
As an alternative embodiment, the video data frame whose video time stamp matches the audio time stamp of the currently played audio data frame includes any one of the following:
under the condition that the audio time stamp of the currently played audio data frame is the actual playing time: if the video timestamp is the starting time of the video data frame, the video data frame matched with the audio timestamp of the currently played audio data frame is as follows: and the video data frame with the largest video timestamp in the video data frames with the video timestamps less than or equal to the audio timestamps of the currently played audio data frames. If the video time stamp is the end time of the video data frame, the video data frame matched with the audio time stamp of the currently played audio data frame is as follows: and the video data frame with the smallest video timestamp in the video data frames with the video timestamps larger than the audio timestamps of the currently played audio data frames.
Under the condition that the audio time stamp of the currently played audio data frame is the starting time: if the video timestamp is the starting time of the video data frame, the video data frame matched with the audio timestamp of the currently played audio data frame is as follows: and the video data frame with the largest video timestamp in the video data frames with the video timestamps less than or equal to the audio timestamps of the currently played audio data frames. If the video time stamp is the end time of the video data frame, the video data frame matched with the audio time stamp of the currently played audio data frame is as follows: and the video data frame with the smallest video timestamp in the video data frames with the video timestamps larger than the audio timestamps of the audio data frames currently played.
Under the condition that the audio time stamp of the currently played audio data frame is the end time: if the video timestamp is the starting time of the video data frame, the video data frame matched with the audio timestamp of the currently played audio data frame is as follows: and the video data frame with the largest video time stamp in the video data frames with the video time stamps smaller than the audio time stamps of the currently played audio data frames. If the video time stamp is the end time of the video data frame, the video data frame matched with the audio time stamp of the currently played audio data frame is as follows: and the video data frame with the smallest video timestamp is the video data frame with the video timestamp more than or equal to the audio timestamp of the currently played audio data frame.
As an optional embodiment, the apparatus further includes a rendering module, configured to render the console corresponding to the control signal in response to receiving the control signal sent by the car machine. The control signal may include at least one of pause, play, fast forward, fast backward, volume adjustment, brightness adjustment, resolution adjustment, magnification adjustment, current play duration of the media data, total duration of the media data, next media data play, previous media data play, sound effect, pop-up switch, like, collection, sharing, comment, and selection.
As another aspect of the present disclosure, an apparatus for playing media data is provided, which is connected to a vehicle.
The device for playing the media data is connected with the vehicle, and can be integrated in the vehicle, or independent of the vehicle and in communication connection with the vehicle.
Fig. 7 is a schematic structural diagram of an apparatus for playing media data according to an embodiment of the present disclosure. As shown in fig. 7. Apparatus for playing media data, comprising:
and the audio and video separation module 710 is configured to separate audio data and video data from the media data in response to receiving an instruction to play the media data.
And the audio-video decoding module 720 is configured to decode the audio data and send the decoded audio data frame to the car audio so that the car audio plays the decoded audio data frame.
And a communication module 730 for transmitting the video data to the external unit.
The audio timestamp response module 740 is configured to, in response to receiving an acquisition request of the external unit for an audio timestamp of a currently played audio data frame, send the audio timestamp of the currently played audio data frame to the external unit, so that the external unit plays the video data on the external unit in synchronization with the audio data.
As an alternative embodiment, the audio time stamp comprises at least one of: the starting time of the audio data frame, the ending time of the audio data frame and the actual playing time of the audio data frame.
As an optional embodiment, the apparatus further includes an audio playing time determining module, configured to time when the audio data frame is played, so as to obtain an actual playing time of the audio data frame; and calculating the actual playing time of the audio data frame based on the relevant parameters of the audio data frame and the actual playing time. The related parameters of the audio data frame may comprise at least one of: the end time and the frame length of the audio data frame, and the start time of the audio data frame.
As an alternative embodiment, the media data obtaining mode may include at least one of: real-time downloading from the network, pre-downloading and storing from the network, reading from the local, and reading from the external device.
For the device embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, refer to the description of the method embodiment section.
As another aspect of the present disclosure, a system for playing media data is provided, which includes the apparatus for playing media data according to fig. 6 of the present disclosure; at least one head-mounted display device, which is connected to the apparatus for playing media data in communication with the embodiment of fig. 6, for displaying video data.
As an alternative embodiment, the system may further include a hub, for connecting between the apparatus for playing media data in the embodiment of fig. 6 and the apparatus for playing media data in the embodiment of fig. 7, for splitting the video data.
For the case that the device for playing media data of the embodiment of fig. 6 is built in the external unit and the device for playing media data of the embodiment of fig. 7 is built in the in-vehicle device:
for the condition that the vehicle machine is connected with an external unit, the video data separated by the vehicle machine can be directly sent to the external unit. The external unit can be connected with one head-mounted display device and can also be connected with a plurality of head-mounted display devices.
For the condition that the vehicle machine needs to be connected with a plurality of external units, the vehicle machine needs to be connected with the concentrator first, and the video data separated by the vehicle machine is copied into a plurality of paths of video data with the number larger than or equal to that of the external units by the concentrator. Each external unit receives the video data transmitted by the hub.
For the case that the apparatus for playing media data of the embodiment of fig. 6 is set independently of the external unit, and the apparatus for playing media data of the embodiment of fig. 7 is set independently of the in-vehicle device, those skilled in the art may change the execution body to the apparatus for playing media data of the embodiment of fig. 6 and the apparatus for playing media data of the embodiment of fig. 7.
As yet another aspect of the present disclosure, a vehicle is provided, comprising at least one of: the apparatus for playing media data of the embodiment of fig. 7; the apparatus and hub for playing media data of the embodiment of fig. 7; fig. 6 and 7 illustrate an apparatus for playing media data according to an embodiment; the system for playing media data of the above-mentioned embodiment of the present disclosure, and the apparatus for playing media data of the embodiment of fig. 7 are disclosed.
The upstream interface of the hub may be used to connect with the apparatus for playing media data of the embodiment of fig. 7, and the downstream interface of the hub may be used to connect with the apparatus for playing media data of the embodiment of fig. 6. The hub may split the video data.
As still another aspect of the present disclosure, a head-mounted display device is provided, which includes the apparatus for playing media data of the embodiment of fig. 6.
Exemplary electronic device
In addition, an embodiment of the present disclosure also provides an electronic device, including:
a memory for storing a computer program;
a processor configured to execute the computer program stored in the memory, and when the computer program is executed, the method for playing media data according to any of the above embodiments of the present disclosure is implemented.
Fig. 8 is a schematic structural diagram of an application embodiment of the electronic device of the present disclosure. Next, an electronic apparatus according to an embodiment of the present disclosure is described with reference to fig. 8. The electronic device may be either or both of the first device and the second device, or a stand-alone device separate from them, which stand-alone device may communicate with the first device and the second device to receive the acquired input signals therefrom.
As shown in fig. 8, the electronic device includes one or more processors and memory.
The processor may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
The memory may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by a processor to implement the methods for playing media data of the various embodiments of the disclosure described above and/or other desired functions.
In one example, the electronic device may further include: an input device and an output device, which are interconnected by a bus system and/or other form of connection mechanism (not shown).
The input device may also include, for example, a keyboard, a mouse, and the like.
The output device may output various information including the determined distance information, direction information, and the like to the outside. The output devices may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
Of course, for simplicity, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 8, omitting components such as buses, input/output interfaces, and the like. In addition, the electronic device may include any other suitable components, depending on the particular application.
In addition to the above methods and apparatus, embodiments of the present disclosure also provide a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the steps in the method for playing media data according to various embodiments of the present disclosure described in the above section of this specification.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, causes the processor to perform the steps in the method for playing media data according to various embodiments of the present disclosure described in the above section of this specification.
The computer readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by one skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (23)

1. A method for playing media data is applied to an external unit, wherein the external unit is connected with a head-mounted display device, and comprises the following steps:
acquiring an audio time stamp of a currently played audio data frame from a vehicle machine, wherein the currently played audio data frame belongs to the media data;
calculating a timestamp difference between the audio timestamp and a video timestamp of a video data frame currently played by the external unit, wherein the video data frame is obtained by decoding video data received from the vehicle machine, and the video data belongs to the media data;
determining a video data frame to be played currently in the video data frames in response to the absolute value of the timestamp difference being greater than a preset threshold, wherein the preset threshold is a threshold for representing synchronization of the audio data frame and the video data frame;
and playing the video data frame to be played currently on the external unit so as to display the video data frame to be played currently on the head-mounted display equipment.
2. The method of claim 1, wherein the method further comprises: and storing the video data frames to be played, wherein the video time stamps of the video data frames to be played are all larger than the video time stamp of the currently played video data frame.
3. The method of claim 2, wherein the determining a video data frame to be currently played among the video data frames comprises:
and under the condition that the video time stamp of the currently played video data frame is smaller than the audio time stamp of the currently played audio data frame, if a video data frame with a video time stamp matched with the audio time stamp of the currently played audio data frame exists in the video data frame to be played, taking the matched video data frame as the video data frame to be played currently.
4. The method of claim 2, wherein the determining a video data frame to be currently played among the video data frames comprises:
and under the condition that the video time stamp of the currently played video data frame is smaller than the audio time stamp of the currently played audio data frame, if at least one video data frame exists in the video data frames to be played, wherein the absolute value of the difference between the video time stamp and the audio time stamp of the currently played audio data frame is smaller than or equal to the preset threshold value, taking any video data frame in the at least one video data frame as the video data frame to be played currently.
5. The method of claim 2, wherein the determining a video data frame to be currently played among the video data frames comprises:
and under the condition that the video time stamp of the currently played video data frame is smaller than the audio time stamp of the currently played audio data frame, if the absolute value of the difference value between the video time stamp of the video data frame to be played and the audio time stamp of the currently played audio data frame is larger than the preset threshold value, taking the video data frame with the largest video time stamp in the video data frames to be played as the video data frame to be played currently.
6. The method of claim 2, wherein the determining a video data frame to be currently played among the video data frames comprises:
and under the condition that the video time stamp of the currently played video data frame is greater than the audio time stamp of the currently played audio data frame, prolonging the frame length of the currently played video data frame until the time stamp difference between the video time stamp of the currently played video data frame and the audio time stamp of the currently played audio data frame is less than or equal to the preset threshold value.
7. The method of claim 1, wherein the method further comprises:
storing all video data frames;
the determining of the video data frame to be played currently in the video data frames includes any one of the following:
selecting at least one video data frame from all the stored video data frames, wherein the absolute value of the difference value between the video timestamp and the audio timestamp of the currently played audio data frame is less than or equal to the preset threshold value, and taking any one video data frame in the at least one video data frame as the current video data frame to be played;
and selecting a video data frame with a video time stamp matched with the audio time stamp of the currently played audio data frame from all the stored video data frames, and taking the matched video data frame as the current video data frame to be played.
8. The method of claim 1, wherein,
the audio time stamp includes at least one of: the starting time of the audio data frame, the ending time of the audio data frame, and the actual playing time of the audio data frame;
the video timestamp comprises at least one of: the starting time of the video data frame, the ending time of the video data frame, and the actual playing time of the video data frame.
9. The method of claim 8, wherein determining the actual playing time of the video data frame comprises:
timing when the video data frame is played to obtain the actual playing time length of the video data frame;
calculating the actual playing time of the video data frame based on the relevant parameters of the video data frame and the actual playing time;
wherein the relevant parameters of the video data frame include at least one of: the end time and the frame length of the video data frame, and the start time of the video data frame.
10. The method of claim 3 or 7, wherein the video data frame whose video timestamp matches the audio timestamp of the currently played audio data frame comprises any one of the following:
under the condition that the audio time stamp of the currently played audio data frame is the actual playing time:
if the video timestamp is the starting time of the video data frame, the video data frame matched with the audio timestamp of the currently played audio data frame is as follows: the video data frame with the largest video timestamp in the video data frames with the video timestamps less than or equal to the audio timestamps of the currently played audio data frames;
if the video time stamp is the end time of the video data frame, the video data frame matched with the audio time stamp of the currently played audio data frame is as follows: the video data frame with the smallest video timestamp in the video data frames with the video timestamps larger than the audio timestamps of the currently played audio data frames;
under the condition that the audio time stamp of the currently played audio data frame is the starting time:
if the video timestamp is the starting time of the video data frame, the video data frame matched with the audio timestamp of the currently played audio data frame is as follows: the video data frame with the largest video timestamp in the video data frames with the video timestamps less than or equal to the audio timestamps of the currently played audio data frames;
if the video time stamp is the end time of the video data frame, the video data frame matched with the audio time stamp of the currently played audio data frame is as follows: the video data frame with the smallest video timestamp in the video data frames with the video timestamps larger than the audio timestamps of the currently played audio data frames;
under the condition that the audio time stamp of the currently played audio data frame is the end time:
if the video timestamp is the starting time of the video data frame, the video data frame matched with the audio timestamp of the currently played audio data frame is as follows: the video data frame with the largest video timestamp in the video data frames with the video timestamps smaller than the audio timestamps of the currently played audio data frames;
if the video time stamp is the end time of the video data frame, the video data frame matched with the audio time stamp of the currently played audio data frame is as follows: and the video data frame with the smallest video timestamp is the video data frame with the video timestamp more than or equal to the audio timestamp of the currently played audio data frame.
11. The method according to any one of claims 1-9, wherein the method further comprises:
responding to a received control signal sent by a vehicle machine, and rendering a control console corresponding to the control signal;
the control signal comprises at least one of pause, play, fast forward, fast backward, volume adjustment, brightness adjustment, resolution adjustment, playing magnification adjustment, current playing time of media data, total media data time, next media data playing, previous media data playing, sound effect, pop-up switch, praise, collection, sharing, comment and selection.
12. A method for playing media data is applied to a vehicle machine and comprises the following steps:
separating audio data and video data from the media data in response to receiving an instruction to play the media data;
decoding the audio data, and sending the decoded audio data frame to a vehicle-mounted sound so that the vehicle-mounted sound plays the decoded audio data frame;
sending the video data to an external unit;
and responding to a received acquisition request of the external unit for the audio time stamp of the currently played audio data frame, and sending the audio time stamp of the currently played audio data frame to the external unit so that the external unit can play the video data on the external unit synchronously with the audio data.
13. The method of claim 12, wherein the audio timestamp comprises at least one of: the starting time of the audio data frame, the ending time of the audio data frame, and the actual playing time of the audio data frame.
14. The method of claim 13, wherein determining the actual playing time of the audio data frame comprises:
timing when the audio data frame is played to obtain the actual playing duration of the audio data frame;
calculating the actual playing time of the audio data frame based on the relevant parameters of the audio data frame and the actual playing time;
wherein the relevant parameters of the audio data frame comprise at least one of: the end time and the frame length of the audio data frame, and the start time of the audio data frame.
15. The method of any of claims 12-14, wherein the manner of obtaining the media data comprises at least one of: real-time downloading from the network, pre-downloading and storing from the network, reading from the local, and reading from the external device.
16. An apparatus for playing media data, connected to an external unit, wherein the external unit is connected to a head-mounted display device, comprising:
an audio timestamp acquiring module, configured to acquire an audio timestamp of a currently played audio data frame from a car machine, where the currently played audio data frame belongs to the media data;
a timestamp difference calculation module, configured to calculate a timestamp difference between the audio timestamp and a video timestamp of a video data frame currently played by the external unit, where the video data frame is obtained by decoding video data received from the car machine, and the video data belongs to the media data;
the synchronization processing module is used for determining a video data frame to be played currently in the video data frames in response to the absolute value of the timestamp difference being greater than a preset threshold value, wherein the preset threshold value is a threshold value used for representing the synchronization of the audio data frame and the video data frame;
and the playing control module is used for playing the video data frame to be played currently on an external unit so as to display the video data frame to be played currently on the head-mounted display equipment.
17. An apparatus for playing media data, connected to a car machine, comprising:
the audio and video separation module is used for responding to a received command of playing media data and separating audio data and video data from the media data;
the audio-video decoding module is used for decoding the audio data and sending the decoded audio data frame to the vehicle-mounted sound so that the vehicle-mounted sound can play the decoded audio data frame;
the communication module is used for sending the video data to an external unit;
and the audio time stamp response module is used for responding to a received request of the external unit for acquiring the audio time stamp of the currently played audio data frame and sending the audio time stamp of the currently played audio data frame to the external unit so that the external unit can play the video data on the external unit synchronously with the audio data.
18. A system for playing media data, comprising: the apparatus for playing media data of claim 16;
at least one head mounted display device, communicatively connected to the apparatus for playing media data of claim 16, for displaying video data.
19. A vehicle comprising at least one of:
the apparatus for playing media data of claim 17;
the apparatus for playing media data according to claim 17 and the hub, wherein the upstream interface of the hub is configured to connect with the apparatus for playing media data according to claim 17, and the downstream interface of the hub is configured to connect with the apparatus for playing media data according to claim 16;
the apparatus for playing media data of claim 16, the apparatus for playing media data of claim 17;
the system for playing back media data of claim 18, the apparatus for playing back media data of claim 17.
20. A head-mounted display device comprising the apparatus for playing media data of claim 16.
21. A computer program product comprising computer program instructions which, when executed, implement the method for playing media data of any of the preceding claims 1-15.
22. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method for playing back media data according to any one of the preceding claims 1-15.
23. An electronic device, the electronic device comprising:
a memory for storing a computer program;
a processor for executing a computer program stored in the memory, and when executed, implementing the method for playing media data according to any of the preceding claims 1-15.
CN202211255537.3A 2022-10-13 2022-10-13 Method and apparatus for playing media data, system, vehicle, device and medium Pending CN115474082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211255537.3A CN115474082A (en) 2022-10-13 2022-10-13 Method and apparatus for playing media data, system, vehicle, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211255537.3A CN115474082A (en) 2022-10-13 2022-10-13 Method and apparatus for playing media data, system, vehicle, device and medium

Publications (1)

Publication Number Publication Date
CN115474082A true CN115474082A (en) 2022-12-13

Family

ID=84337026

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211255537.3A Pending CN115474082A (en) 2022-10-13 2022-10-13 Method and apparatus for playing media data, system, vehicle, device and medium

Country Status (1)

Country Link
CN (1) CN115474082A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117294832A (en) * 2023-11-22 2023-12-26 湖北星纪魅族集团有限公司 Data processing method, device, electronic equipment and computer readable storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102421035A (en) * 2011-12-31 2012-04-18 青岛海信宽带多媒体技术有限公司 Method and device for synchronizing audio and video of digital television
CN107509100A (en) * 2017-09-15 2017-12-22 深圳国微技术有限公司 Audio and video synchronization method, system, computer installation and computer-readable recording medium
CN107801080A (en) * 2017-11-10 2018-03-13 普联技术有限公司 A kind of audio and video synchronization method, device and equipment
WO2018120557A1 (en) * 2016-12-26 2018-07-05 深圳市中兴微电子技术有限公司 Method and device for synchronously processing audio and video, and storage medium
US20180367839A1 (en) * 2017-06-16 2018-12-20 Oohms Ny Llc Method and system for synchronization of audio content for a remotely displayed video
CN109819303A (en) * 2019-03-06 2019-05-28 Oppo广东移动通信有限公司 Data output method and relevant device
CN111757158A (en) * 2020-06-29 2020-10-09 北京百度网讯科技有限公司 Audio and video synchronous playing method, device, equipment and storage medium
US20210044867A1 (en) * 2019-08-05 2021-02-11 Grass Valley Limited System and method of measuring delay between transmitted audio and video signals
CN114554269A (en) * 2022-02-25 2022-05-27 深圳Tcl新技术有限公司 Data processing method, electronic device and computer readable storage medium
US20220224957A1 (en) * 2019-05-31 2022-07-14 Nippon Telegraph And Telephone Corporation Synchronous control device, synchronous control method, and synchronous control program
CN114827679A (en) * 2022-04-19 2022-07-29 海信视像科技股份有限公司 Display device and sound picture synchronization method
CN115022731A (en) * 2022-05-17 2022-09-06 蔚来汽车科技(安徽)有限公司 Vehicle-mounted film viewing system, vehicle-mounted film viewing method and computer storage medium
CN115175004A (en) * 2022-07-04 2022-10-11 闪耀现实(无锡)科技有限公司 Method and device for video playing, wearable device and electronic device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102421035A (en) * 2011-12-31 2012-04-18 青岛海信宽带多媒体技术有限公司 Method and device for synchronizing audio and video of digital television
WO2018120557A1 (en) * 2016-12-26 2018-07-05 深圳市中兴微电子技术有限公司 Method and device for synchronously processing audio and video, and storage medium
US20180367839A1 (en) * 2017-06-16 2018-12-20 Oohms Ny Llc Method and system for synchronization of audio content for a remotely displayed video
CN107509100A (en) * 2017-09-15 2017-12-22 深圳国微技术有限公司 Audio and video synchronization method, system, computer installation and computer-readable recording medium
CN107801080A (en) * 2017-11-10 2018-03-13 普联技术有限公司 A kind of audio and video synchronization method, device and equipment
CN109819303A (en) * 2019-03-06 2019-05-28 Oppo广东移动通信有限公司 Data output method and relevant device
US20220224957A1 (en) * 2019-05-31 2022-07-14 Nippon Telegraph And Telephone Corporation Synchronous control device, synchronous control method, and synchronous control program
US20210044867A1 (en) * 2019-08-05 2021-02-11 Grass Valley Limited System and method of measuring delay between transmitted audio and video signals
CN111757158A (en) * 2020-06-29 2020-10-09 北京百度网讯科技有限公司 Audio and video synchronous playing method, device, equipment and storage medium
CN114554269A (en) * 2022-02-25 2022-05-27 深圳Tcl新技术有限公司 Data processing method, electronic device and computer readable storage medium
CN114827679A (en) * 2022-04-19 2022-07-29 海信视像科技股份有限公司 Display device and sound picture synchronization method
CN115022731A (en) * 2022-05-17 2022-09-06 蔚来汽车科技(安徽)有限公司 Vehicle-mounted film viewing system, vehicle-mounted film viewing method and computer storage medium
CN115175004A (en) * 2022-07-04 2022-10-11 闪耀现实(无锡)科技有限公司 Method and device for video playing, wearable device and electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117294832A (en) * 2023-11-22 2023-12-26 湖北星纪魅族集团有限公司 Data processing method, device, electronic equipment and computer readable storage medium
CN117294832B (en) * 2023-11-22 2024-03-26 湖北星纪魅族集团有限公司 Data processing method, device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110476431B (en) Low latency mobile device audiovisual streaming
CN110784758B (en) Screen projection processing method and device, electronic equipment and computer program medium
CN101502111B (en) Synchronized media experience
EP2940940B1 (en) Methods for sending and receiving video short message, apparatus and handheld electronic device thereof
CN103190092B (en) System and method for the synchronized playback of streaming digital content
US10034036B2 (en) Media synchronization for real-time streaming
CN111741324B (en) Recording playback method and device and electronic equipment
WO2012177779A2 (en) Just-in-time transcoding of application content
KR20180010234A (en) Method for inserting information push into live video streaming, server and terminal
CN108924661A (en) Data interactive method, device, terminal and storage medium based on direct broadcasting room
CN103947221A (en) User interface display method and device using same
US20140208351A1 (en) Video processing apparatus, method and server
CN114040237A (en) Audio and video synchronous playing method, terminal, multimedia playing system and medium
CN115474082A (en) Method and apparatus for playing media data, system, vehicle, device and medium
CN111629223B (en) Video synchronization method and device, computer readable storage medium and electronic device
CN112073753B (en) Method, device, equipment and medium for publishing multimedia data
CN112055252A (en) Multi-screen interaction method and device, computer readable medium and electronic equipment
CN113050916A (en) Audio playing method, device and storage medium
US20210006871A1 (en) Events in timed metadata tracks
WO2016160240A1 (en) Digital content streaming from digital tv broadcast
CN109600677A (en) Data transmission method and device, storage medium, electronic equipment
CN114257572A (en) Data processing method and device, computer readable medium and electronic equipment
CN108282720B (en) Audio data stream transmission method and device
CN114257771A (en) Video playback method and device for multi-channel audio and video, storage medium and electronic equipment
JP7376235B2 (en) Video distribution system

Legal Events

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