WO2018032680A1 - 音视频播放方法及系统 - Google Patents

音视频播放方法及系统 Download PDF

Info

Publication number
WO2018032680A1
WO2018032680A1 PCT/CN2016/112238 CN2016112238W WO2018032680A1 WO 2018032680 A1 WO2018032680 A1 WO 2018032680A1 CN 2016112238 W CN2016112238 W CN 2016112238W WO 2018032680 A1 WO2018032680 A1 WO 2018032680A1
Authority
WO
WIPO (PCT)
Prior art keywords
audio
video
time point
file
currently
Prior art date
Application number
PCT/CN2016/112238
Other languages
English (en)
French (fr)
Inventor
柯杰燕
Original Assignee
深圳Tcl新技术有限公司
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 深圳Tcl新技术有限公司 filed Critical 深圳Tcl新技术有限公司
Publication of WO2018032680A1 publication Critical patent/WO2018032680A1/zh

Links

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
    • 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
    • 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

Definitions

  • the present invention relates to the field of audio and video broadcasting, and in particular, to an audio and video playing method and system.
  • audio and video playback is already a must-have function for devices such as TV.
  • images and sounds are abnormal, that is, images and sounds are not synchronized. If the characters have started speaking, the sound has not come out yet. Or the voice came out, the character has not started talking, so the user looks particularly awkward.
  • the reason for the abnormal audio and video is mainly due to the variety of tools for audio and video production.
  • the edited audio and video files are also different, even not conforming to the standard.
  • the television is prone to errors in audio and video decoding, such as images or sounds skipping certain data frames during decoding, so that the time axis of the image and the sound is not aligned, resulting in the problem of audio and video being out of sync.
  • the main object of the present invention is to provide an audio and video playback method and system, which aims to solve the traditional audio and video playback mode, and is prone to technical problems of audio and video unsynchronization.
  • the present invention provides an audio and video playback method, and the audio and video playback method includes:
  • the step of detecting that the audio and video currently being played is abnormal includes: : Separating the audio and video corresponding to the audio and video currently being played, and determining the time at which the separated audio and video are at the same time. If the audio and video are different at the same time, it can be determined that the audio and video currently being played are abnormal. ;
  • the decoded audio and video is played from the obtained time point.
  • the step of detecting that the audio and video abnormality currently being played further comprises:
  • abnormal data flag bit corresponding to the audio and video currently being played is a preset value, it is determined that the audio and video currently being played is abnormal.
  • the jump to the location of the obtained audio and video file at the time point of the acquisition, and while decoding the audio file and the video file perform the following steps:
  • the audio and video playing method further includes:
  • the abnormal data flag is set to the preset value, and the current play time point is increased by a preset time interval to obtain the jump time point.
  • the audio and video playing method further includes:
  • the present invention provides an audio and video playback method, and the audio and video playback method includes:
  • the decoded audio and video is played from the obtained time point.
  • the step of detecting an audio/video abnormality currently being played includes:
  • abnormal data flag bit corresponding to the audio and video currently being played is a preset value, it is determined that the audio and video currently being played is abnormal.
  • the jump to the location of the obtained audio and video file at the time point of the acquisition, and while decoding the audio file and the video file perform the following steps:
  • the audio and video playing method further includes:
  • the abnormal data flag is set to the preset value, and the current play time point is increased by a preset time interval to obtain the jump time point.
  • the audio and video playing method further includes:
  • the present invention further provides an audio and video playing system, where the audio and video playing system includes:
  • the obtaining module is configured to acquire a time point corresponding to the currently decoded video if the audio and video currently being played is abnormal during the process of decoding the audio and video files;
  • a jump module configured to jump to the obtained audio and video file location of the time point when the obtained time point is a preset jump time point;
  • a decoding module for decoding an audio file and a video file
  • a playing module configured to play the decoded audio and video from the obtained time point.
  • the audio and video playback system comprises:
  • a determining module configured to determine whether an abnormal data flag bit corresponding to the audio and video currently being played is a preset value
  • a determining module configured to determine that the audio and video abnormality currently being played is abnormal if the abnormal data flag bit corresponding to the audio and video currently being played is a preset value.
  • the audio and video playing system further includes:
  • an adjustment module configured to: when the jump module jumps to the acquired audio and video file location at the time point, and decodes the audio file and the video file, adjust the time point of the audio file according to the acquired time point To align the audio file with the timeline of the video file.
  • the audio and video playing system further includes:
  • a detecting module configured to detect, in real time, whether the time axis of the decoded audio segment and the video segment are aligned during the playing of the audio and video files while decoding;
  • a processing module configured to set an abnormal data flag bit to the preset value when the time axis of the audio segment and the video segment are not aligned, and increase a current play time point by a preset time interval to obtain the jump time point.
  • the audio and video playing system further includes:
  • a clearing module configured to clear the preset value of the abnormal data flag bit, and clear the jump time point.
  • the audio and video playing method and system of the present invention acquires a time point corresponding to the currently decoded video when detecting that the audio and video currently being played is abnormal, and then when the acquired time point is a preset jumping time point Jumping to the obtained audio and video file location at the time point, decoding the audio file and the video file, and playing the decoded audio and video from the acquired time point, realizing the decoded audio and video, audio
  • the time points of the clip and the video clip are consistent, so that the final output audio and video also maintain audio and video synchronization.
  • FIG. 1 is a schematic flow chart of a first embodiment of an audio and video playing method according to the present invention
  • FIG. 2 is a schematic flow chart of a second embodiment of an audio and video playing method according to the present invention.
  • FIG. 3 is a schematic flow chart of a third embodiment of an audio and video playing method according to the present invention.
  • FIG. 4 is a schematic diagram of functional modules of a first embodiment of an audio and video playback system according to the present invention.
  • FIG. 5 is a schematic diagram of functional modules of a second embodiment of an audio and video playback system according to the present invention.
  • FIG. 6 is a schematic diagram of functional modules of a third embodiment of an audio and video playback system of the present invention.
  • the invention provides an audio and video playing method.
  • FIG. 1 is a schematic flowchart diagram of a first embodiment of an audio and video playing method according to the present invention.
  • the audio and video playing method includes:
  • Step S10 in the process of playing the audio and video file while decoding, if it is detected that the currently playing audio and video is abnormal, the time point corresponding to the currently decoded video is obtained;
  • the audio and video file is played while decoding, specifically, the terminal first decodes a part of the audio and video, and then plays the decoded audio and video, and continues to decode the remaining audio and video files when playing the decoded audio and video. section.
  • the terminal first decodes a part of the audio and video, and then plays the decoded audio and video, and continues to decode the remaining audio and video files when playing the decoded audio and video. section.
  • the time point corresponding to the currently decoded audio and video is obtained. It is worth noting that the manner of detecting the audio and video anomalies currently being played includes:
  • Method 1 Separate the audio and video corresponding to the currently playing audio and video, and determine the separated audio and video at the same time. If the audio and video are different at the same time, it can be determined that the audio is currently playing. The audio and video are abnormal.
  • the same time represents a specific time, such as 10 points; the time point indicates the specific time of audio or video playback, such as playing 12 minutes, or 12 minutes and 25 seconds.
  • the audio and video files are encoded into an audio file from the audio data stream, and the corresponding time points are recorded when the video data stream is encoded into a video file, and the same frame of the same audio and video file, the image and The audio is also consistent with each other.
  • the time point corresponding to a certain frame image is 12 minutes and 12 seconds
  • the audio matching the image of the frame is also 12 minutes and 12 seconds, so that the audio image can be synchronized after playing the audio and video.
  • the existing audio and video playback process may cause the audio and video to be out of sync, it is also because the image of one screen appears simultaneously with the audio of the other picture, resulting in the audio images being out of sync. Therefore, the existing audio images are not synchronized.
  • the time axes of the audio and video are not aligned, and the time axis is deviated to cause the audio images to be out of sync.
  • the actual time points of the audio and video are not changed. Therefore, if the audio and video are different at the same playback time, it can be determined that the audio and video currently being played is abnormal.
  • Method 2 determining whether the abnormal data flag bit corresponding to the audio and video currently being played is a preset value
  • abnormal data flag bit corresponding to the audio and video currently being played is a preset value, it is determined that the audio and video currently being played is abnormal.
  • the terminal can detect the audio and video in the audio and video just decoded in real time or timing during the process of decoding the audio and video files.
  • the terminal is considered to be The audio and video is abnormal, and the abnormal data flag is set to a preset value.
  • the preset value is set according to a specific situation, and is not limited herein, for example, set to 1.
  • the abnormal data flag can be set to a preset value when it is detected that the audio and video in the audio and video are inconsistent at the same time.
  • the abnormal data flag is stored in association with the audio and video, and when the audio and video is played, if the abnormal data flag is detected as a preset value, the audio and video abnormality currently being played may be directly determined.
  • the audio and video are inconsistent at the same time, the time points of the subsequent connected audio and video may be inconsistent. Therefore, the abnormal data flag and the subsequent tone may be directly used.
  • Video associated storage The preset value of the abnormal data flag is cleared until the time point corresponding to the currently decoded video is obtained, and the audio and video file location of the acquired time point is jumped to decode the audio file and the video file.
  • the abnormal data flag can be stored in association with the audio and video detected by the timing, and the audio and video of the audio and video are detected at the same time each time. If the points are inconsistent, the abnormal data flag is stored in association with the detected audio and video. Subsequently, when the audio data is played, if the abnormal data flag is detected as the preset value, the played audio and video abnormality can be directly determined.
  • the audio and video playback may be performed according to the value of the abnormal data flag bit to determine whether the audio and video is abnormal, without using the sound.
  • the audio and video of the video are analyzed to determine whether the time points are the same, the time for determining the abnormality of the audio and video is shortened, the efficiency of the abnormality of the audio and video is effectively improved, and the intelligence of the audio and video playback is also improved. Therefore, this embodiment Preferably, mode 2 is used to determine whether the currently playing audio and video is abnormal.
  • the audio and video currently being played are preferably detected, and the detection may be real-time detection or timing detection to detect that the currently playing is being played. Whether the audio and video is abnormal, if the detected audio and video is abnormal, at this time, the time point corresponding to the currently decoded video is obtained, that is, the time point corresponding to the video just decoded, and then according to the time point of the video. Adjust the time point of the audio so that the time point of the video is synchronized with the time point of the audio at the same time.
  • the time point corresponding to the audio should also be 25: 00, in order to maintain the synchronized playback of audio and video, wherein the 25:00 indicates that the audio and video normally play to the location, it takes 25 minutes.
  • Step S20 When the acquired time point is a preset jump time point, jump to the acquired audio and video file location of the time point to decode the audio file and the video file;
  • the time point is compared with a preset jump time point to determine whether the time point is the same as the preset jump time point.
  • the time point is the same as the preset jump time point, and then jumps directly to the obtained audio and video file location of the time point, and decodes the audio file and the video file.
  • the terminal continues to decode the video until the time point of the decoded video coincides with the preset jump time point.
  • the time point corresponding to the obtained decoded video is the preset jump time point, at this time, according to the acquired time point, the time point of the audio file is adjusted, so that the audio file and the audio file are The time axis of the video file is aligned, that is, at the same time, the video corresponds to 25:00, the audio also corresponds to 25:00; the video corresponds to 29:00, and the audio also corresponds to 29:00.
  • Step S30 playing the decoded audio and video from the acquired time point.
  • the decoding of the audio file and the video file is actually decoding the audio file and the video file from the same time point, and then the time axis of the audio and video is consistent in the decoded audio and video.
  • the subsequent terminal can play the decoded audio and video from the acquired time point, so that the finally played audio and video audio images are synchronized.
  • the decoded audio and video may be played and displayed on the display screen of the terminal, or may be outputted by the terminal to other display devices for play display.
  • the above operation may be performed during the decoding and playing process of the entire audio and video file, or part of the audio and video file may be extracted and played in the audio and video file, and the extracted audio and video data may be decoded. After the audio and video clips of the preset ratio are successfully played, the above-mentioned decoding and playback operations are continued in the audio and video files.
  • the audio and video playing method of the present embodiment acquires a time point corresponding to the currently decoded video when detecting that the audio and video currently being played is abnormal, and then when the acquired time point is a preset jumping time point, Jumping to the obtained audio and video file location at the time point, decoding the audio file and the video file, and playing the decoded audio and video from the acquired time point, realizing the decoded audio and video, the audio segment It is consistent with the time point of the video clip, so that the final output audio and video also maintain audio and video synchronization.
  • the audio and video playback method further includes:
  • Step S40 in the process of playing the audio and video file while decoding, detecting whether the time axis of the decoded audio segment and the video segment are aligned in real time;
  • Step S50 When the time axis of the audio segment and the video segment are not aligned, the abnormal data flag bit is set to the preset value, and the current play time point is increased by a preset time interval to obtain the jump time point.
  • the terminal detects whether the time axis of the decoded audio segment and the video segment are aligned in real time, that is, detecting the decoded audio segment and the video segment. Whether the two time points corresponding to each time are consistent, if the time axis of the audio segment and the video segment are not aligned, that is, the decoded audio segment and the video segment do not coincide at two time points corresponding to a certain moment.
  • the audio and video may be considered to be abnormal, and there is a problem that the audio and video are not synchronized.
  • the terminal may first process the abnormal audio segment and the video segment, and the processing manner includes: classifying the audio segment and the video segment.
  • the preset value is set according to a specific situation, and the specific value is not limited.
  • the abnormal data flag bit and the classified audio segment are set. It is associated with the video clip, so that the subsequent terminal can quickly determine that the audio and video are abnormal according to the abnormal data flag when playing the audio and video, and perform the corresponding time axis adjustment operation. Instead of extracting the audio and video from the audio and video, and then analyzing the time and other operations, it is possible to determine that the audio and video are abnormal, thereby improving the efficiency and intelligence of the audio and video anomaly determination.
  • the terminal increases the current play time point by a preset time interval to obtain the jump time point, and stores the recorded jump time point, which is also convenient for subsequent jumps to the jump time point.
  • a preset time interval to obtain the jump time point
  • stores the recorded jump time point which is also convenient for subsequent jumps to the jump time point.
  • the preset time interval should be a relatively small value, such as 0.5 seconds, in order to avoid excessive discarding of audio and video clips.
  • the time axis of the decoded audio segment and the video segment is detected in real time, and the time axis of the audio segment and the video segment are not aligned, and the audio track is abnormal.
  • the data flag is set to the preset value, and the current play time point is increased by a preset time interval to obtain the jump time point, so that the subsequent terminal can quickly perform the audio and video play adjustment when playing the audio and video, so that The efficiency of audio and video audio synchronization is improved, and the intelligence of audio and video playback is also improved.
  • the audio and video playback method also includes:
  • Step S60 clearing the preset value of the abnormal data flag bit, and clearing the jump time point.
  • the preset value corresponding to the abnormal data flag bit can be cleared, thereby preventing the normal playing of the audio and video, due to the abnormal data flag bit.
  • the preset value is misleading to the audio and video playback.
  • clearing the jump time point effectively releases the occupation of the storage space, thereby improving the flexibility of audio and video playback.
  • the invention further provides an audio and video playback system.
  • FIG. 4 is a schematic diagram of functional modules of a preferred embodiment of an audio and video playback system of the present invention.
  • the functional block diagram shown in FIG. 4 is merely an exemplary diagram of a preferred embodiment, and those skilled in the art will surround the functional modules of the audio and video playback system shown in FIG.
  • a new function module can be easily added; the name of each function module is a custom name, which is only used to assist in understanding various program function blocks of the audio and video playback system, and is not used to limit the technical solution of the present invention.
  • the core is the function that each functional module of the defined name has to achieve.
  • the audio and video playing system includes:
  • the obtaining module 10 is configured to acquire a time point corresponding to the currently decoded video if the audio and video currently being played is abnormal during the process of playing the audio and video file while decoding;
  • the audio and video file is played while decoding, specifically, the terminal first decodes a part of the audio and video, and then plays the decoded audio and video, and continues to decode the remaining audio and video files when playing the decoded audio and video. section.
  • the acquiring module 10 acquires the time point corresponding to the currently decoded audio and video. It is worth noting that the manner of detecting the audio and video anomalies currently being played includes:
  • the audio and video playback system includes:
  • a separation module configured to separate audio and video corresponding to audio and video currently being played
  • a determining module for determining a point in time at which the separated audio and video are at the same time
  • the determining module is further configured to determine that an audio and video abnormality currently being played is abnormal if the audio and video are different at the same time point.
  • the same time represents a specific time, such as 10 points; the time point indicates the specific time of audio or video playback, such as playing 12 minutes, or 12 minutes and 25 seconds.
  • the audio and video files are encoded into an audio file from the audio data stream, and the corresponding time points are recorded when the video data stream is encoded into a video file, and the same frame of the same audio and video file, the image and The audio is also consistent with each other.
  • the time point corresponding to a certain frame image is 12 minutes and 12 seconds
  • the audio matching the image of the frame is also 12 minutes and 12 seconds, so that the audio image can be synchronized after playing the audio and video.
  • the existing audio and video playback process may cause the audio and video to be out of sync, it is also because the image of one screen appears simultaneously with the audio of the other picture, resulting in the audio images being out of sync. Therefore, the existing audio images are not synchronized.
  • the time axes of the audio and video are not aligned, and the time axis is deviated to cause the audio images to be out of sync.
  • the actual time points of the audio and video are not changed. Therefore, if the audio and video are different at the same playback time, it can be determined that the audio and video currently being played is abnormal.
  • the audio and video playing system includes:
  • a determining module configured to determine whether an abnormal data flag bit corresponding to the audio and video currently being played is a preset value
  • a determining module configured to determine that the audio and video abnormality currently being played is abnormal if the abnormal data flag bit corresponding to the audio and video currently being played is a preset value.
  • the terminal can detect the audio and video in the audio and video just decoded in real time or timing during the process of decoding the audio and video files.
  • the terminal is considered to be The audio and video is abnormal, and the abnormal data flag is set to a preset value.
  • the preset value is set according to a specific situation, and is not limited herein, for example, set to 1.
  • the abnormal data flag can be set to a preset value when it is detected that the audio and video in the audio and video are inconsistent at the same time.
  • the abnormal data flag is stored in association with the audio and video, and when the audio and video is played, if the abnormal data flag is detected as a preset value, the audio and video abnormality currently being played may be directly determined.
  • the audio and video are inconsistent at the same time, the time points of the subsequent connected audio and video may be inconsistent. Therefore, the abnormal data flag and the subsequent tone may be directly used.
  • Video associated storage The preset value of the abnormal data flag is cleared until the time point corresponding to the currently decoded video is obtained, and the audio and video file location of the acquired time point is jumped to decode the audio file and the video file.
  • the abnormal data flag can be stored in association with the audio and video detected by the timing, and the audio and video of the audio and video are detected at the same time each time. If the points are inconsistent, the abnormal data flag is stored in association with the detected audio and video. Subsequently, when the audio data is played, if the abnormal data flag is detected as the preset value, the played audio and video abnormality can be directly determined.
  • the audio and video playback may be performed according to the value of the abnormal data flag bit to determine whether the audio and video is abnormal, without using the sound.
  • the audio and video of the video are analyzed to determine whether the time points are the same, the time for determining the abnormality of the audio and video is shortened, the efficiency of the abnormality of the audio and video is effectively improved, and the intelligence of the audio and video playback is also improved. Therefore, this embodiment Preferably, mode 2 is used to determine whether the currently playing audio and video is abnormal.
  • the audio and video currently being played are preferably detected, and the detection may be real-time detection or timing detection to detect that the currently playing is being played.
  • the obtaining module 10 acquires the time point corresponding to the currently decoded video, that is, obtains the time point corresponding to the video just decoded, and subsequently can be based on the video.
  • adjust the time point of the audio so that the time point of the video is synchronized with the time point of the audio at the same time.
  • the time point corresponding to the audio should also be It is 25:00, in order to maintain the synchronized playback of audio and video, wherein the 25:00 means that the audio and video normally play to the location, it takes 25 minutes.
  • the jump module 20 is configured to: when the acquired time point is a preset jump time point, jump to the acquired audio and video file location of the time point;
  • a decoding module 30 configured to decode an audio file and a video file
  • the time point is compared with a preset jumping time point to determine whether the time point is the same as the preset jumping time point. If the obtained time point is the same as the preset jump time point, the jump module 20 directly jumps to the acquired audio and video file location of the time point, and the decoding module 30 decodes the audio file and the video file. .
  • the decoding module 30 continues to decode the video until the time point of the decoded video and the preset jumping time point. Consistent.
  • the audio and video playing system further includes:
  • an adjustment module configured to: when the jump module 20 jumps to the acquired audio and video file location at the time point, and decodes the audio file and the video file, adjust the time of the audio file according to the acquired time point Pointing to align the audio file with the timeline of the video file.
  • the adjustment module adjusts the time point of the audio file according to the acquired time point, so that the audio is The file is aligned with the time axis of the video file, that is, at the same time, the video corresponds to 25:00, and the audio also corresponds to 25:00; when the video corresponds to 29:00, the audio also corresponds to 29:00.
  • the playing module 40 is configured to play the decoded audio and video from the acquired time point.
  • the decoding module 30 decodes the audio file and the video file, which is to decode the audio file and the video file from the same time point, and then the time and axis of the audio and video in the decoded audio and video.
  • the subsequent playing module 40 can play the decoded audio and video from the acquired time point, so that the finally played audio and video audio images are synchronized.
  • the playing module 40 plays the decoded audio and video, and can be played and displayed on the display screen of the terminal, or can be output to other display devices for playing and displaying.
  • the above operation may be performed during the decoding and playing process of the entire audio and video file, or part of the audio and video file may be extracted and played in the audio and video file, and the extracted audio and video data may be decoded. After the audio and video clips of the preset ratio are successfully played, the above-mentioned decoding and playback operations are continued in the audio and video files.
  • the audio and video playing system of the present embodiment acquires a time point corresponding to the currently decoded video when detecting that the audio and video currently being played is abnormal, and then when the acquired time point is a preset jumping time point, Jumping to the obtained audio and video file location at the time point, decoding the audio file and the video file, and playing the decoded audio and video from the acquired time point, realizing the decoded audio and video, the audio segment It is consistent with the time point of the video clip, so that the final output audio and video also maintain audio and video synchronization.
  • the audio and video playback system further includes:
  • the detecting module 50 is configured to detect, in real time, whether the time axis of the decoded audio segment and the video segment is aligned during the playing of the audio and video files while decoding;
  • the processing module 60 is configured to set an abnormal data flag bit to the preset value when the time axis of the audio segment and the video segment are not aligned, and increase a current play time point by a preset time interval to obtain the jump Time point.
  • the detecting module 50 detects in real time whether the time axis of the decoded audio segment and the video segment are aligned, that is, the detecting module 50 detects the decoded audio segment. And whether the video clip is consistent at two time points corresponding to each moment. If the time axis of the audio clip and the video clip are not aligned, the decoded audio clip and the video clip do not coincide at two time points corresponding to a certain moment. At this time, the audio and video may be considered abnormal, and the audio and video are not synchronized.
  • the processing module 60 may first process the abnormal audio segment and the video segment, and the processing manner includes: classifying the audio segment and the video segment.
  • the processing module 60 classifies the abnormal data flag.
  • the audio clip is associated with the video clip, so that the subsequent terminal can quickly determine that the audio and video are abnormal according to the abnormal data flag when playing the audio and video, and perform the corresponding time axis adjustment operation. Instead of extracting the audio and video from the audio and video, and then analyzing the time and other operations, it is possible to determine that the audio and video are abnormal, thereby improving the efficiency and intelligence of the audio and video anomaly determination.
  • the processing module 60 increases the current play time point by a preset time interval to obtain the jump time point, and stores the recorded jump time point, which is also convenient for subsequent jumps to the jump time point. , re-encoding and playing audio and video, increasing the preset time interval, which is equivalent to discarding a small piece of unsynchronized audio and video in the middle.
  • the preset time interval should be a relatively small value, such as 0.5 seconds, in order to avoid excessive discarding of audio and video clips.
  • the time axis of the decoded audio segment and the video segment is detected in real time, and the time axis of the audio segment and the video segment are not aligned, and the audio track is abnormal.
  • the data flag is set to the preset value, and the current play time point is increased by a preset time interval to obtain the jump time point, so that the subsequent terminal can quickly perform the audio and video play adjustment when playing the audio and video, so that The efficiency of audio and video audio synchronization is improved, and the intelligence of audio and video playback is also improved.
  • the audio and video playback system is further include:
  • the clearing module 70 is configured to clear the preset value of the abnormal data flag bit, and clear the jump time point.
  • the clearing module 70 can clear the preset value corresponding to the abnormal data flag bit, preventing the abnormal data flag from being played when the audio and video are normally played.
  • the preset value is misleading to the audio and video playback.
  • the clearing module 70 clears the jump time point, effectively releases the occupation of the storage space, and improves the flexibility of audio and video playback.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Television Signal Processing For Recording (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

公开了一种音视频播放方法,所述音视频播放方法包括:在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频异常,则获取当前解码的视频对应的时间点;在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码;从获取的所述时间点播放解码后的音视频。还公开了一种音视频播放系统。本申请保持了音视频播放的音像同步。

Description

音视频播放方法及系统
技术领域
本发明涉及音视频播放领域,尤其涉及一种音视频播放方法及系统。
背景技术
目前,音视频播放已经是电视等设备必备的功能,用户在播放音视频时,有时会发现图像与声音出现异常,即图像与声音不同步,如人物已经开始讲话了,但声音还没有出来,或者声音出来了,人物还没有开始讲话,这样用户看起来特别的别扭。
产生音像异常的原因,主要是由于音视频制作的工具各种各样,所编辑成的音视频文件也各不相同,甚至是不符合标准的。如此一来,电视在音视频解码时容易产生了错误,如图像或声音在解码时跳过某些数据帧,从而使得图像与声音播放时的时间轴没有对齐,导致了音像不同步的问题。
发明内容
本发明的主要目的在于提出一种音视频播放方法及系统,旨在解决传统的音视频播放方式,容易出现音像不同步的技术问题。
为实现上述目的,本发明提供的一种音视频播放方法,所述音视频播放方法包括:
在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频异常,则获取当前解码的视频对应的时间点,其中,所述检测到当前正在播放的音视频异常的步骤包括:分离出当前正在播放的音视频对应的音频和视频,确定分离出的音频和视频在同一时刻的时间点,若音频和视频在同一时刻的时间点不同,可确定当前正在播放的音视频异常;
在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码;
从获取的所述时间点播放解码后的音视频。
优选地,所述检测到当前正在播放的音视频异常的步骤还包括:
判断当前正在播放的所述音视频对应的异常数据标志位是否为预设值时;
若当前正在播放的所述音视频对应的异常数据标志位为预设值,则确定当前正在播放的所述音视频异常。
优选地,所述跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码的同时,执行以下步骤:
根据获取的所述时间点调整音频文件的时间点,以使所述音频文件与所述视频文件的时间轴对齐。
优选地,所述音视频播放方法还包括:
在音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐;
在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点。
优选地,所述从获取的所述时间点播放解码后的音视频的步骤之后,所述音视频播放方法还包括:
清除所述异常数据标志位的所述预设值,并清除所述跳转时间点。
为实现上述目的,本发明提供的一种音视频播放方法,所述音视频播放方法包括:
在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频异常,则获取当前解码的视频对应的时间点;
在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码;
从获取的所述时间点播放解码后的音视频。
优选地,所述检测到当前正在播放的音视频异常的步骤包括:
判断当前正在播放的所述音视频对应的异常数据标志位是否为预设值时;
若当前正在播放的所述音视频对应的异常数据标志位为预设值,则确定当前正在播放的所述音视频异常。
优选地,所述跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码的同时,执行以下步骤:
根据获取的所述时间点调整音频文件的时间点,以使所述音频文件与所述视频文件的时间轴对齐。
优选地,所述音视频播放方法还包括:
在音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐;
在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点。
优选地,所述从获取的所述时间点播放解码后的音视频的步骤之后,所述音视频播放方法还包括:
清除所述异常数据标志位的所述预设值,并清除所述跳转时间点。
此外,为实现上述目的,本发明还提出一种音视频播放系统,所述音视频播放系统包括:
获取模块,用于在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频异常,则获取当前解码的视频对应的时间点;
跳转模块,用于在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置;
解码模块,用于对音频文件和视频文件进行解码;
播放模块,用于从获取的所述时间点播放解码后的音视频。
优选地,所述音视频播放系统包括:
判断模块,用于判断当前正在播放的所述音视频对应的异常数据标志位是否为预设值时;
确定模块,用于若当前正在播放的所述音视频对应的异常数据标志位为预设值,则确定当前正在播放的所述音视频异常。
优选地,所述音视频播放系统还包括:
调整模块,用于在所述跳转模块跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码的同时,根据获取的所述时间点调整音频文件的时间点,以使所述音频文件与所述视频文件的时间轴对齐。
优选地,所述音视频播放系统还包括:
检测模块,用于在音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐;
处理模块,用于在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点。
优选地,所述音视频播放系统还包括:
清除模块,用于清除所述异常数据标志位的所述预设值,并清除所述跳转时间点。
本发明提出的音视频播放方法及系统,在检测到当前正在播放的音视频异常时,获取当前解码的视频对应的时间点,然后在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码,并从获取的所述时间点播放解码后的音视频,实现了解码后的音视频中,音频片段和视频片段的时间点保持一致,使得最终输出的音视频也保持音像同步。
附图说明
图1为本发明音视频播放方法第一实施例的流程示意图;
图2为本发明音视频播放方法第二实施例的流程示意图;
图3为本发明音视频播放方法第三实施例的流程示意图;
图4为本发明音视频播放系统第一实施例的功能模块示意图;
图5为本发明音视频播放系统第二实施例的功能模块示意图;
图6为本发明音视频播放系统第三实施例的功能模块示意图。
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
本发明提供一种音视频播放方法。
参照图1,图1为本发明音视频播放方法第一实施例的流程示意图。
在本实施例中,所述音视频播放方法包括:
步骤S10,在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频异常,则获取当前解码的视频对应的时间点;
在本实施例中,所述音视频文件边解码边播放,具体是终端先解码一部分音视频,然后播放解码后的音视频,并在播放解码后的音视频时,继续解码音视频文件的剩余部分。在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频有异常,则获取当前刚解码的音视频对应的时间点。值得注意的是,所述检测到当前正在播放的音视频异常的方式包括:
a、方式一、分离出当前正在播放的音视频对应的音频和视频,确定分离出的音频和视频在同一时刻的时间点,若音频和视频在同一时刻的时间点不同,可确定当前正在播放的音视频异常。
其中,同一时刻表示具体的时间,如10点;时间点表示音频或视频播放的具体时间,如播放12分整,或者是12分25秒。
值得注意的是,音视频文件从音频数据流编码成音频文件,从视频数据流编码成视频文件时,都记录了对应的时间点,并且,同一个音视频文件的同一帧画面中,图像和音频也是相互符合的,如某一帧图像对应的时间点是12分12秒,与这一帧图像匹配的音频也是12分12秒,这样后续在播放该音视频时,才能音像同步。虽然现有的音视频播放过程,会出现音像不同步的问题,但也是由于一个画面的图像与另一个画面的音频同时出现,导致音像不同步。因此,现有的音像不同步,实际上是音频和视频的时间轴没有对齐,时间轴出现了偏差导致音像不同步,但是,音频和视频实际的时间点并没有改变。因此,若音频和视频在同一播放时刻的时间点不同,即可确定当前正在播放的音视频异常。
b、方式二、判断当前正在播放的所述音视频对应的异常数据标志位是否为预设值时;
若当前正在播放的所述音视频对应的异常数据标志位为预设值,则确定当前正在播放的所述音视频异常。
在本实施方式中,终端在音视频文件边解码边播放的过程中,可实时或定时检测刚解码的音视频中的音频和视频,当音频和视频在同一时刻的时间点不一致时,认为所述音视频异常,并将异常数据标志位设为预设值,所述预设值根据具体情况进行设置,此处不做限定,例如,设置为1。
若终端是实时检测刚解码的音视频中的音频和视频,那么在检测到音视频中的音频和视频在同一时刻的时间点不一致时,即可将异常数据标志位设为预设值,并将所述异常数据标志位与该音视频关联存储,后续在播放到该音视频时,若检测到异常数据标志位为预设值,可直接确定当前正在播放的所述音视频异常。当然,这种情况下,一有音频和视频在同一时刻的时间点不一致,后续连着的音频和视频的时间点可能都会不一致,因此,也可直接将所述异常数据标志位与后续的音视频关联存储。直到获取当前解码的视频对应的时间点,并跳转到至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码,才将上述异常数据标志位的预设值清除。
若终端是定时检测刚解码的音视频中的音频和视频,那么即可将所述异常数据标志位与定时检测的音视频关联存储,每次检测到音视频的音频和视频在同一时刻的时间点不一致,就将所述异常数据标志位与检测到的音视频关联存储。后续,在播放到音视频时,若检测到异常数据标志位为预设值,可直接确定播放的音视频异常。
在本实施例中,由于异常数据标志位的数值是在音视频解码时就标记了,后续在音视频播放时,根据异常数据标志位的值即可确定音视频是否异常,而不用去提出音视频的音频和视频,再去分析时间点是否相同,缩短了音视频异常确定的时间,有效的提高了音视频异常确定的效率,并且也提高了音视频播放的智能性,因此,本实施例中,优选采用方式二确定当前正在播放的音视频是否异常。
在本实施例中,在音视频文件边解码边播放的过程中,优选对当前正在播放的音视频进行检测,所述检测的方式可以是实时检测,也可以是定时检测,以检测当前正在播放的音视频是否异常,若检测到正在播放的音视频异常,此时,获取当前解码的视频对应的时间点,也就是获取刚解码的视频对应的时间点,后续可根据该视频的时间点,调整音频的时间点,以使得视频的时间点与音频在同一时刻的时间点同步,如在10:00时,若视频对应的时间点是25:00,音频对应的时间点也应该是25:00,这样才能保持音视频的同步播放,其中,所述25:00表示音视频正常播放到该位置时,需要25分钟。
步骤S20,在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码;
在本实施例中,在获取所述时间点后,将所述时间点与预设的跳转时间点进行比对,以确定所述时间点与预设的跳转时间点是否相同,若获取的所述时间点与预设的跳转时间点相同,则直接跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码。
当然,可以理解的是,若获取的所述时间点不是预设的跳转时间点,则所述终端会继续解码视频,直到解码的视频的时间点与预设的跳转时间点一致。
在本实施例中,所述执行“跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码”的同时,执行以下步骤:
根据获取的所述时间点调整音频文件的时间点,以使所述音频文件与所述视频文件的时间轴对齐。
也就是说,在获取解码的视频对应的时间点为预设的跳转时间点时,此时,根据获取的所述时间点,对音频文件的时间点进行调整,以使所述音频文件与所述视频文件的时间轴对齐,也就是说,同一时刻,视频对应25:00,音频也要对应25:00;视频对应29:00,音频也要对应29:00。
步骤S30,从获取的所述时间点播放解码后的音视频。
在本实施例中,对音频文件和视频文件进行解码,其实就是从同一个时间点开始,对音频文件和视频文件进行解码,那么解码后的音视频中,音频和视频的时间轴就一致了,后续所述终端可以从获取的所述时间点播放解码后的音视频,使得最终播放的音视频音像同步。
本实施例中,播放解码后的音视频,可在终端的显示屏进行播放显示,也可以由终端输出其它显示设备中进行播放显示。
本实施例中,可以是在整个音视频文件的解码播放过程中,执行上述操作,也可以是在音视频文件中,提取出部分的音视频文件进行解码播放过程,在提取的音视频数据解码成功,并播放了预设比值的音视频片段之后,才继续在音视频文件中继续进行上述的解码播放操作。
本实施例提出的音视频播放方法,在检测到当前正在播放的音视频异常时,获取当前解码的视频对应的时间点,然后在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码,并从获取的所述时间点播放解码后的音视频,实现了解码后的音视频中,音频片段和视频片段的时间点保持一致,使得最终输出的音视频也保持音像同步。
进一步地,为了提高音视频播放的智能性,基于第一实施例提出本发明音视频播放方法的第二实施例,在本实施例中,参照图2,所述音视频播放方法还包括:
步骤S40,在音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐;
步骤S50,在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点。
在本实施例中,在音视频文件边解码边播放的过程中,所述终端实时检测解码后的音频片段和视频片段的时间轴是否对齐,也就是说,检测解码后的音频片段和视频片段在每一个时刻对应的两个时间点是否一致,若音频片段和视频片段的时间轴没有对齐,即解码后的音频片段和视频片段在某一个时刻对应的两个时间点没有一致。此时,可认为该音视频有异常了,出现了音像不同步的问题,所述终端可先对异常的音频片段和视频片段进行处理,所述处理方式包括:将音频片段和视频片段归类起来,然后将异常数据标志位设为所述预设值。第一实施例中已经提到,所述预设值根据具体情况进行设置,具体数值不做限定,在设置好了异常数据标志位之后,将所述异常数据标志位与归类后的音频片段和视频片段关联起来,便于后续终端在播放音视频时,根据所述异常数据标志位即可快速确定音视频有异常,并执行相应的时间轴调节操作。而不用再去提取出音视频中的音频和视频,再去分析时间点等等操作,才能确定音视频有异常,从而提高了音视频异常确定的效率和智能性。
进一步地,所述终端将当前播放时间点增加预设时间间隔,以得到所述跳转时间点,并存储记录的所述跳转时间点,同样便于后续跳转到所述跳转时间点中,重新进行音视频的解码和播放,增加预设时间间隔,相当于是丢弃了中间一小段不同步的音视频。当然,所述预设时间间隔应当是一个比较小的数值,如0.5秒,这些才能避免音视频片段丢弃过多。
在本实施例中,所述音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐,在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点,便于后续终端在播放音视频时,快速执行音视频的播放调整,使得音视频音像同步的效率提高,并且音视频播放的智能性也提高。
进一步地,为了提高音视频播放的灵活性,基于第一或第二实施例提出本发明音视频播放方法的第三实施例,在本实施例中,参照图3,所述步骤S30之后,所述音视频播放方法还包括:
步骤S60,清除所述异常数据标志位的所述预设值,并清除所述跳转时间点。
在本实施例中,当终端可以正常播放音视频时,即可将所述异常数据标志位对应的所述预设值进行清除,防止了正常播放音视频时,由于异常数据标志位的所述预设值,对音视频播放造成的误导。同时,清除所述跳转时间点,有效的释放了存储空间的占用,提高了音视频播放的灵活性。
本发明进一步提供一种音视频播放系统。
参照图4,图4为本发明音视频播放系统较佳实施例的功能模块示意图。
需要强调的是,对本领域的技术人员来说,图4所示功能模块图仅仅是一个较佳实施例的示例图,本领域的技术人员围绕图4所示的音视频播放系统的功能模块,可轻易进行新的功能模块的补充;各功能模块的名称是自定义名称,仅用于辅助理解该音视频播放系统的各个程序功能块,不用于限定本发明的技术方案,本发明技术方案的核心是,各自定义名称的功能模块所要达成的功能。
在本实施例中,所述音视频播放系统包括:
获取模块10,用于在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频异常,则获取当前解码的视频对应的时间点;
在本实施例中,所述音视频文件边解码边播放,具体是终端先解码一部分音视频,然后播放解码后的音视频,并在播放解码后的音视频时,继续解码音视频文件的剩余部分。在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频有异常,则获取模块10获取当前刚解码的音视频对应的时间点。值得注意的是,所述检测当前正在播放的音视频异常的方式包括:
a、方式一、所述音视频播放系统包括:
分离模块,用于分离出当前正在播放的音视频对应的音频和视频;
确定模块,用于确定分离出的音频和视频在同一时刻的时间点;
所述确定模块,还用于若音频和视频在同一时刻的时间点不同,可确定当前正在播放的音视频异常。
其中,同一时刻表示具体的时间,如10点;时间点表示音频或视频播放的具体时间,如播放12分整,或者是12分25秒。
值得注意的是,音视频文件从音频数据流编码成音频文件,从视频数据流编码成视频文件时,都记录了对应的时间点,并且,同一个音视频文件的同一帧画面中,图像和音频也是相互符合的,如某一帧图像对应的时间点是12分12秒,与这一帧图像匹配的音频也是12分12秒,这样后续在播放该音视频时,才能音像同步。虽然现有的音视频播放过程,会出现音像不同步的问题,但也是由于一个画面的图像与另一个画面的音频同时出现,导致音像不同步。因此,现有的音像不同步,实际上是音频和视频的时间轴没有对齐,时间轴出现了偏差导致音像不同步,但是,音频和视频实际的时间点并没有改变。因此,若音频和视频在同一播放时刻的时间点不同,即可确定当前正在播放的音视频异常。
b、方式二、所述音视频播放系统包括:
判断模块,用于判断当前正在播放的所述音视频对应的异常数据标志位是否为预设值时;
确定模块,用于若当前正在播放的所述音视频对应的异常数据标志位为预设值,则确定当前正在播放的所述音视频异常。
在本实施方式中,终端在音视频文件边解码边播放的过程中,可实时或定时检测刚解码的音视频中的音频和视频,当音频和视频在同一时刻的时间点不一致时,认为所述音视频异常,并将异常数据标志位设为预设值,所述预设值根据具体情况进行设置,此处不做限定,例如,设置为1。
若终端是实时检测刚解码的音视频中的音频和视频,那么在检测到音视频中的音频和视频在同一时刻的时间点不一致时,即可将异常数据标志位设为预设值,并将所述异常数据标志位与该音视频关联存储,后续在播放到该音视频时,若检测到异常数据标志位为预设值,可直接确定当前正在播放的所述音视频异常。当然,这种情况下,一有音频和视频在同一时刻的时间点不一致,后续连着的音频和视频的时间点可能都会不一致,因此,也可直接将所述异常数据标志位与后续的音视频关联存储。直到获取当前解码的视频对应的时间点,并跳转到至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码,才将上述异常数据标志位的预设值清除。
若终端是定时检测刚解码的音视频中的音频和视频,那么即可将所述异常数据标志位与定时检测的音视频关联存储,每次检测到音视频的音频和视频在同一时刻的时间点不一致,就将所述异常数据标志位与检测到的音视频关联存储。后续,在播放到音视频时,若检测到异常数据标志位为预设值,可直接确定播放的音视频异常。
在本实施例中,由于异常数据标志位的数值是在音视频解码时就标记了,后续在音视频播放时,根据异常数据标志位的值即可确定音视频是否异常,而不用去提出音视频的音频和视频,再去分析时间点是否相同,缩短了音视频异常确定的时间,有效的提高了音视频异常确定的效率,并且也提高了音视频播放的智能性,因此,本实施例中,优选采用方式二确定当前正在播放的音视频是否异常。
在本实施例中,在音视频文件边解码边播放的过程中,优选对当前正在播放的音视频进行检测,所述检测的方式可以是实时检测,也可以是定时检测,以检测当前正在播放的音视频是否异常,若检测到正在播放的音视频异常,此时,获取模块10获取当前解码的视频对应的时间点,也就是获取刚解码的视频对应的时间点,后续可根据该视频的时间点,调整音频的时间点,以使得视频的时间点与音频在同一时刻的时间点同步,如在10:00时,若视频对应的时间点是25:00,音频对应的时间点也应该是25:00,这样才能保持音视频的同步播放,其中,所述25:00表示音视频正常播放到该位置时,需要25分钟。
跳转模块20,用于在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置;
解码模块30,用于对音频文件和视频文件进行解码;
在本实施例中,在获取模块10获取所述时间点后,将所述时间点与预设的跳转时间点进行比对,以确定所述时间点与预设的跳转时间点是否相同,若获取的所述时间点与预设的跳转时间点相同,则跳转模块20直接跳转至获取的所述时间点所在音视频文件位置,解码模块30对音频文件和视频文件进行解码。
当然,可以理解的是,若获取模块10获取的所述时间点不是预设的跳转时间点,则解码模块30会继续解码视频,直到解码的视频的时间点与预设的跳转时间点一致。
在本实施例中,所述音视频播放系统还包括:
调整模块,用于在所述跳转模块20跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码的同时,根据获取的所述时间点调整音频文件的时间点,以使所述音频文件与所述视频文件的时间轴对齐。
也就是说,在获取解码的视频对应的时间点为预设的跳转时间点时,此时,调整模块根据获取的所述时间点,对音频文件的时间点进行调整,以使所述音频文件与所述视频文件的时间轴对齐,也就是说,同一时刻,视频对应25:00,音频也要对应25:00;视频对应29:00时,音频也要对应29:00。
播放模块40,用于从获取的所述时间点播放解码后的音视频。
在本实施例中,解码模块30对音频文件和视频文件进行解码,其实就是从同一个时间点开始,对音频文件和视频文件进行解码,那么解码后的音视频中,音频和视频的时间轴就一致了,后续播放模块40可以从获取的所述时间点播放解码后的音视频,使得最终播放的音视频音像同步。
本实施例中,播放模块40播放解码后的音视频,可在终端的显示屏进行播放显示,也可以输出至其它显示设备中进行播放显示。
本实施例中,可以是在整个音视频文件的解码播放过程中,执行上述操作,也可以是在音视频文件中,提取出部分的音视频文件进行解码播放过程,在提取的音视频数据解码成功,并播放了预设比值的音视频片段之后,才继续在音视频文件中继续进行上述的解码播放操作。
本实施例提出的音视频播放系统,在检测到当前正在播放的音视频异常时,获取当前解码的视频对应的时间点,然后在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码,并从获取的所述时间点播放解码后的音视频,实现了解码后的音视频中,音频片段和视频片段的时间点保持一致,使得最终输出的音视频也保持音像同步。
进一步地,为了提高音视频播放的智能性,基于第一实施例提出本发明音视频播放系统的第二实施例,在本实施例中,参照图5,所述音视频播放系统还包括:
检测模块50,用于在音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐;
处理模块60,用于在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点。
在本实施例中,在音视频文件边解码边播放的过程中,检测模块50实时检测解码后的音频片段和视频片段的时间轴是否对齐,也就是说,检测模块50检测解码后的音频片段和视频片段在每一个时刻对应的两个时间点是否一致,若音频片段和视频片段的时间轴没有对齐,即解码后的音频片段和视频片段在某一个时刻对应的两个时间点没有一致。此时,可认为该音视频有异常了,出现了音像不同步的问题,处理模块60可先对异常的音频片段和视频片段进行处理,所述处理方式包括:将音频片段和视频片段归类起来,然后将异常数据标志位设为所述预设值。第一实施例中已经提到,所述预设值根据具体情况进行设置,具体数值不做限定,在设置好了异常数据标志位之后,处理模块60将所述异常数据标志位与归类后的音频片段和视频片段关联起来,便于后续终端在播放音视频时,根据所述异常数据标志位即可快速确定音视频有异常,并执行相应的时间轴调节操作。而不用再去提取出音视频中的音频和视频,再去分析时间点等等操作,才能确定音视频有异常,从而提高了音视频异常确定的效率和智能性。
进一步地,处理模块60将当前播放时间点增加预设时间间隔,以得到所述跳转时间点,并存储记录的所述跳转时间点,同样便于后续跳转到所述跳转时间点中,重新进行音视频的解码和播放,增加预设时间间隔,相当于是丢弃了中间一小段不同步的音视频。当然,所述预设时间间隔应当是一个比较小的数值,如0.5秒,这些才能避免音视频片段丢弃过多。
在本实施例中,所述音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐,在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点,便于后续终端在播放音视频时,快速执行音视频的播放调整,使得音视频音像同步的效率提高,并且音视频播放的智能性也提高。
进一步地,为了提高音视频播放的灵活性,基于第一或第二实施例提出本发明音视频播放系统的第三实施例,在本实施例中,参照图6,所述音视频播放系统还包括:
清除模块70,用于清除所述异常数据标志位的所述预设值,并清除所述跳转时间点。
在本实施例中,当终端可以正常播放音视频时,清除模块70即可将所述异常数据标志位对应的所述预设值进行清除,防止了正常播放音视频时,由于异常数据标志位的所述预设值,对音视频播放造成的误导。同时,清除模块70清除所述跳转时间点,有效的释放了存储空间的占用,提高了音视频播放的灵活性。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其它变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其它要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其它相关的技术领域,均同理包括在本发明的专利保护范围内。

Claims (15)

  1. 一种音视频播放方法,其特征在于,所述音视频播放方法包括:
    在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频异常,则获取当前解码的视频对应的时间点,其中,所述检测到当前正在播放的音视频异常的步骤包括:分离出当前正在播放的音视频对应的音频和视频,确定分离出的音频和视频在同一时刻的时间点,若音频和视频在同一时刻的时间点不同,可确定当前正在播放的音视频异常;
    在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码;
    从获取的所述时间点播放解码后的音视频。
  2. 如权利要求1所述的音视频播放方法,其特征在于,所述检测到当前正在播放的音视频异常的步骤还包括:
    判断当前正在播放的所述音视频对应的异常数据标志位是否为预设值时;
    若当前正在播放的所述音视频对应的异常数据标志位为预设值,则确定当前正在播放的所述音视频异常。
  3. 如权利要求2所述的音视频播放方法,其特征在于,所述跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码的同时,执行以下步骤:
    根据获取的所述时间点调整音频文件的时间点,以使所述音频文件与所述视频文件的时间轴对齐。
  4. 如权利要求2所述的音视频播放方法,其特征在于,所述音视频播放方法还包括:
    在音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐;
    在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点。
  5. 如权利要求1所述的音视频播放方法,其特征在于,所述从获取的所述时间点播放解码后的音视频的步骤之后,所述音视频播放方法还包括:
    清除所述异常数据标志位的所述预设值,并清除所述跳转时间点。
  6. 一种音视频播放方法,其特征在于,所述音视频播放方法包括:
    在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频异常,则获取当前解码的视频对应的时间点;
    在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码;
    从获取的所述时间点播放解码后的音视频。
  7. 如权利要求6所述的音视频播放方法,其特征在于,所述检测到当前正在播放的音视频异常的步骤包括:
    判断当前正在播放的所述音视频对应的异常数据标志位是否为预设值时;
    若当前正在播放的所述音视频对应的异常数据标志位为预设值,则确定当前正在播放的所述音视频异常。
  8. 如权利要求7所述的音视频播放方法,其特征在于,所述跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码的同时,执行以下步骤:
    根据获取的所述时间点调整音频文件的时间点,以使所述音频文件与所述视频文件的时间轴对齐。
  9. 如权利要求7所述的音视频播放方法,其特征在于,所述音视频播放方法还包括:
    在音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐;
    在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点。
  10. 如权利要求6所述的音视频播放方法,其特征在于,所述从获取的所述时间点播放解码后的音视频的步骤之后,所述音视频播放方法还包括:
    清除所述异常数据标志位的所述预设值,并清除所述跳转时间点。
  11. 一种音视频播放系统,其特征在于,所述音视频播放系统包括:
    获取模块,用于在音视频文件边解码边播放的过程中,若检测到当前正在播放的音视频异常,则获取当前解码的视频对应的时间点;
    跳转模块,用于在获取的所述时间点为预设的跳转时间点时,跳转至获取的所述时间点所在音视频文件位置;
    解码模块,用于对音频文件和视频文件进行解码;
    播放模块,用于从获取的所述时间点播放解码后的音视频。
  12. 如权利要求11所述的音视频播放系统,其特征在于,所述音视频播放系统包括:
    判断模块,用于判断当前正在播放的所述音视频对应的异常数据标志位是否为预设值时;
    确定模块,用于若当前正在播放的所述音视频对应的异常数据标志位为预设值,则确定当前正在播放的所述音视频异常。
  13. 如权利要求12所述的音视频播放系统,其特征在于,所述音视频播放系统还包括:
    调整模块,用于在所述跳转模块跳转至获取的所述时间点所在音视频文件位置,对音频文件和视频文件进行解码的同时,根据获取的所述时间点调整音频文件的时间点,以使所述音频文件与所述视频文件的时间轴对齐。
  14. 如权利要求12所述的音视频播放系统,其特征在于,所述音视频播放系统还包括:
    检测模块,用于在音视频文件边解码边播放的过程中,实时检测解码后的音频片段和视频片段的时间轴是否对齐;
    处理模块,用于在音频片段和视频片段的时间轴没有对齐时,将异常数据标志位设为所述预设值,并将当前播放时间点增加预设时间间隔,以得到所述跳转时间点。
  15. 如权利要求11所述的音视频播放系统,其特征在于,所述音视频播放系统还包括:
    清除模块,用于清除所述异常数据标志位的所述预设值,并清除所述跳转时间点。
PCT/CN2016/112238 2016-08-15 2016-12-27 音视频播放方法及系统 WO2018032680A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610671231.4A CN106210846A (zh) 2016-08-15 2016-08-15 音视频播放方法及系统
CN201610671231.4 2016-08-15

Publications (1)

Publication Number Publication Date
WO2018032680A1 true WO2018032680A1 (zh) 2018-02-22

Family

ID=57522376

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/112238 WO2018032680A1 (zh) 2016-08-15 2016-12-27 音视频播放方法及系统

Country Status (2)

Country Link
CN (1) CN106210846A (zh)
WO (1) WO2018032680A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116233472A (zh) * 2023-05-08 2023-06-06 湖南马栏山视频先进技术研究院有限公司 一种音频视频同步的方法和云端处理系统

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106210846A (zh) * 2016-08-15 2016-12-07 深圳Tcl新技术有限公司 音视频播放方法及系统
CN108632681B (zh) * 2017-03-21 2020-04-03 华为技术有限公司 播放媒体流的方法、服务器及终端
CN107454471A (zh) * 2017-07-07 2017-12-08 深圳Tcl数字技术有限公司 电视机开机方法、电视机和计算机可读存储介质
CN111526374B (zh) * 2019-02-01 2022-05-10 广州虎牙信息科技有限公司 基于直播的弹幕处理方法、拉流的方法及装置
CN110505476A (zh) * 2019-09-02 2019-11-26 图普科技(广州)有限公司 摄像头管控方法、装置及电子设备
CN111488244A (zh) * 2020-04-07 2020-08-04 广州虎牙科技有限公司 一种编辑异常恢复方法、装置、电子设备及存储介质
CN112911365B (zh) * 2021-02-02 2024-03-29 卡莱特云科技股份有限公司 一种音频同步播放方法及装置
CN113242437A (zh) * 2021-04-01 2021-08-10 联通(广东)产业互联网有限公司 一种rtsp协议视频无插件播放方法、系统、装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394469A (zh) * 2008-10-29 2009-03-25 北京创毅视讯科技有限公司 一种音视频同步方法、装置及一种数字电视芯片
CN102110458A (zh) * 2009-12-24 2011-06-29 Tcl集团股份有限公司 一种播放终端及其音视频文件的播放方法和装置
US20130251343A1 (en) * 2012-03-25 2013-09-26 Chun-Ming Lai Method for performing fluent playback control in response to decoding status, and associated apparatus
CN106210846A (zh) * 2016-08-15 2016-12-07 深圳Tcl新技术有限公司 音视频播放方法及系统

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6803964B1 (en) * 1997-03-21 2004-10-12 International Business Machines Corporation Method and apparatus for processing digital data
CN103338386B (zh) * 2013-07-10 2016-01-13 航天恒星科技有限公司 基于简化时间戳的音视频同步方法
US20150062353A1 (en) * 2013-08-30 2015-03-05 Microsoft Corporation Audio video playback synchronization for encoded media

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101394469A (zh) * 2008-10-29 2009-03-25 北京创毅视讯科技有限公司 一种音视频同步方法、装置及一种数字电视芯片
CN102110458A (zh) * 2009-12-24 2011-06-29 Tcl集团股份有限公司 一种播放终端及其音视频文件的播放方法和装置
US20130251343A1 (en) * 2012-03-25 2013-09-26 Chun-Ming Lai Method for performing fluent playback control in response to decoding status, and associated apparatus
CN106210846A (zh) * 2016-08-15 2016-12-07 深圳Tcl新技术有限公司 音视频播放方法及系统

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116233472A (zh) * 2023-05-08 2023-06-06 湖南马栏山视频先进技术研究院有限公司 一种音频视频同步的方法和云端处理系统

Also Published As

Publication number Publication date
CN106210846A (zh) 2016-12-07

Similar Documents

Publication Publication Date Title
WO2018032680A1 (zh) 音视频播放方法及系统
WO2015142016A1 (ko) 컨텐츠의 재생 제어 방법 및 이를 수행하기 위한 컨텐츠 재생 장치
WO2017143692A1 (zh) 智能电视及其语音控制方法
WO2017054488A1 (zh) 电视播放控制方法、服务器及电视播放控制系统
WO2019114269A1 (zh) 一种节目续播方法、电视设备及计算机可读存储介质
WO2014107101A1 (en) Display apparatus and method for controlling the same
WO2017045441A1 (zh) 基于智能电视的音频播放方法及装置
WO2017107388A1 (zh) Hdmi版本切换方法及显示设备
WO2017005066A1 (zh) 录制音视频同步时间戳的方法和装置
WO2017177524A1 (zh) 音视频同步播放的方法及装置
WO2017084302A1 (zh) 显示终端开机播放视频的方法及显示终端
WO2018233221A1 (zh) 多窗口声音输出方法、电视机以及计算机可读存储介质
WO2016032021A1 (ko) 음성 명령 인식을 위한 장치 및 방법
WO2018166224A1 (zh) 全景视频的目标追踪显示方法、装置及存储介质
WO2016091011A1 (zh) 字幕切换方法及装置
WO2017088427A1 (zh) 音频输出控制方法及装置
WO2017113614A1 (zh) 视频播放过程中插播广告的方法及装置
WO2017020649A1 (zh) 音视频播放控制方法及装置
WO2018045682A1 (zh) 音画同步测试方法及装置
WO2016101702A1 (zh) 节目录制方法和装置
WO2018032679A1 (zh) 电视定时开关机的设置方法和装置
WO2017121066A1 (zh) 应用程序显示方法和系统
WO2019114127A1 (zh) 空气调节器的语音播报方法及装置
WO2018090461A1 (zh) 多声道无线音箱之间数据同步的方法及系统
WO2018023925A1 (zh) 拍摄方法及系统

Legal Events

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

Ref document number: 16913432

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16913432

Country of ref document: EP

Kind code of ref document: A1