CN102347042A - Audio track switching method, system thereof and audio and video file playing device - Google Patents

Audio track switching method, system thereof and audio and video file playing device Download PDF

Info

Publication number
CN102347042A
CN102347042A CN2010102398509A CN201010239850A CN102347042A CN 102347042 A CN102347042 A CN 102347042A CN 2010102398509 A CN2010102398509 A CN 2010102398509A CN 201010239850 A CN201010239850 A CN 201010239850A CN 102347042 A CN102347042 A CN 102347042A
Authority
CN
China
Prior art keywords
track
audio
data frame
audio data
module
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.)
Granted
Application number
CN2010102398509A
Other languages
Chinese (zh)
Other versions
CN102347042B (en
Inventor
黎建中
刘纹高
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Corp
Original Assignee
TCL Corp
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 Corp filed Critical TCL Corp
Priority to CN201010239850.9A priority Critical patent/CN102347042B/en
Publication of CN102347042A publication Critical patent/CN102347042A/en
Application granted granted Critical
Publication of CN102347042B publication Critical patent/CN102347042B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention is applied to the audio and video processing technology field, and provides an audio track switching method, a system thereof and an audio and video file playing device. The method comprises the following steps: sending an audio frequency data frame of a present playing audio track to a decoder to carry out decoding playing, and calculating synchronization stamp of a standby audio track simultaneously; receiving an audio track switching instruction inputted by a user; according to the audio track switching instruction, searching an audio frequency data frame and synchronization stamp of an audio frequency needing to be switched; sending the searched audio frequency data frame and synchronization stamp of the audio frequency needing to be switched to the decoder to carry out decoding playing. In an embodiment of the invention, the audio frequency data frame of the present playing audio track is sent to the decoder to carry out decoding playing, and the synchronization stamp of the standby audio track is calculated simultaneously; the audio track switching instruction inputted by a user is received; according to the audio track switching instruction, the audio frequency data frame and synchronization stamp of the audio frequency needing to be switched is searched; the audio frequency data frame and synchronization stamp are sent to the decoder to carry out decoding playing, and rapid switching of the audio track is realized.

Description

A kind of track changing method, system and audio-video document playback equipment
Technical field
The invention belongs to the audio frequency and video processing technology field, relate in particular to a kind of track changing method, system and audio-video document playback equipment.
Background technology
Audio Video Interleaved form (Audio Video Interleaved; AVI) adopt voice and image sync file layout together; It has adopted a kind of lossy compression method mode to video file; But ratio of compression is higher; Though the video pictures quality is not very good, its range of application is still very extensive.Avi file is supported 256 looks and RLE compression, and AVI information is mainly used on the multimedia CD, is used for preserving various image informations such as TV, film.
The data block of avi file comprises actual data stream, i.e. image and sound sequence data, and the main body of real data stream file also is the major part of decision file size.The data transfer rate that the size of video file equals this document multiply by the time span of this video playback, and index block comprises data block tabulation and their positions hereof, so that data random access ability in the file to be provided.File header comprises the general information of file, definition of data form, used parameters such as compression algorithm.
The AVI form also can encapsulate many tracks hereof; For example more common English track, Spanish track, Chinese track and French track etc.; This multitone board pattern makes an avi file can satisfy the people in various language district, the world, better views and admires the AVI film that different language is dubbed.
Owing to play in the multitone rail AVI process; Need to switch track; If audio frequency switch mode according to mode standard; Need and audio video synchronization; So the speed of switching track is often relevant what of switching point position with key frame of video, in the less position of key frame of video, switches the sound that the track action need just can be heard new track quite a few seconds; Sometimes even longer, have a strong impact on the impression of viewing and admiring that the user views and admires the AVI film.
Summary of the invention
The object of the present invention is to provide a kind of track changing method, be intended to solve in the prior art, when carrying out the track switching, need and audio video synchronization, cause switching the slow problem of track according to the AVI pattern of standard.
The embodiment of the invention is achieved in that a kind of track changing method, and said method comprises the steps:
The audio data frame of current in progress track is sent to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track;
Receive the track switching command of user's input;
According to said track switching command, the audio data frame of searching the track that needs switching stabs with synchronous;
The audio data frame of the track that the needs that find are switched sends to demoder and carries out decodes and plays with stabbing synchronously.
Another purpose of the embodiment of the invention is to provide a kind of track switched system, and said system comprises:
Stab synchronously computing module, be used for audio data frame with current in progress track and send to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track;
Audio frequency switching command receiver module is used to receive the track switching command that the user imports;
Search module, be used for the track switching command that receives according to said audio frequency switching command receiver module, the audio data frame of searching the track that needs to switch with stab synchronously; And
Track blocked operation module, the audio data frame of the track that the needs that are used for finding switch send to demoder with synchronous stamp and carry out decodes and plays.
Another purpose of the embodiment of the invention is to provide a kind of audio-video document playback equipment that comprises the track switched system.
In embodiments of the present invention, the audio data frame of current in progress track is sent to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track; Receive the track switching command of user's input; According to said track switching command, the audio data frame of searching the track that needs switching stabs with synchronous; The audio data frame of the track that the needs that find are switched sends to demoder and carries out decodes and plays with stabbing synchronously, realizes the quick switching to track, gives user's one favorable experience.
Description of drawings
Fig. 1 is the realization flow figure of the track changing method that provides of first embodiment of the invention;
Fig. 2 is the realization flow figure of the track changing method that provides of second embodiment of the invention;
Fig. 3 is the realization flow figure of the synchronous stamp of the subsequent use track of calculating that provides of the embodiment of the invention;
Fig. 4 is the structured flowchart of the track switched system that provides of first embodiment of the invention;
Fig. 5 is the structured flowchart of the track switched system that provides of second embodiment of the invention;
Fig. 6 is the structured flowchart of the synchronous stamp computing module that provides of the embodiment of the invention.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The present invention provides a kind of track changing method, and said method comprises the steps:
The audio data frame of current in progress track is sent to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track;
Receive the track switching command of user's input;
According to said track switching command, the audio data frame of searching the track that needs switching stabs with synchronous;
The audio data frame of the track that the needs that find are switched sends to demoder and carries out decodes and plays with stabbing synchronously.
The present invention also provides a kind of track switched system, and said system comprises:
Stab synchronously computing module, be used for audio data frame with current in progress track and send to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track;
Audio frequency switching command receiver module is used to receive the track switching command that the user imports;
Search module, be used for the track switching command that receives according to said audio frequency switching command receiver module, the audio data frame of searching the track that needs to switch with stab synchronously; And
Track blocked operation module, the audio data frame of the track that the needs that are used for finding switch send to demoder with synchronous stamp and carry out decodes and plays.
The present invention also provides a kind of audio-video document playback equipment that comprises the track switched system.
Fig. 1 shows the realization flow of the track changing method that first embodiment of the invention provides, and its concrete step is as described below:
In step S101, the audio data frame of current in progress track is sent to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track.
In embodiments of the present invention, this stabs synchronously is the audio time stamp with audio video synchronization, and when calculating completion, this subsequent use track promptly is in synchronous wait switching state.
In step S102, receive the track switching command of user's input.
In embodiments of the present invention; This audio frequency switching command is that the track of current broadcast being looked the audio file broadcast that the user imports switches to the instruction that other tracks are imported by current in progress track, and the prerequisite of this command reception is the situation that comprises a plurality of tracks in this avi file certainly.
In step S103, according to this track switching command, the audio data frame of searching the track that needs switching stabs with synchronous.
In embodiments of the present invention, the voice data of this track is the actual audio content data of track, is the main body of track, and stabbing synchronously is the time point that on this audio data frame, switches track.
In step S104, the audio data frame of the track that the needs that find are switched sends to demoder and carries out decodes and plays with stabbing synchronously.
In embodiments of the present invention; When the audio data frame that finds the track that needs switching with after stabbing synchronously; Need reconfigure demoder; For example be the demoder of DTS audio coding form, need be replaced by the demoder of supporting the AC3 coded format after then switching with the original sound-track corresponding decoder.
In embodiments of the present invention; Because subsequent use track is in synchronous wait switching state; When searching the track audio data frame that gets access to the track that needs switching and stabbing synchronously; Current track can be switched to fast the track audio data frame that finds according to this synchronous stamp, realize that track switches fast.
Fig. 2 shows the realization flow of the track changing method that second embodiment of the invention provides, and its concrete step is as described below:
In step S201, read the file header of avi file.
In step S202, resolve the file header of the avi file that reads, obtain the voice playing parameter, said voice playing parameter comprises the correlation parameter information of track quantity and each track.
In embodiments of the present invention, in the process of playing avi file, at first, read the file header of this avi file, judge the quantity of the track that is wherein comprised and the correlation parameter information of each track through the file header of this avi file.
In step S203, read the audio data frame header of each track.
In step S204, the audio data frame of current in progress track is sent to demoder, carry out decodes and plays.
In step S205, calculate the synchronous stamp of subsequent use track.
In embodiments of the present invention, this subsequent use track is meant except when other residue tracks outside the preceding in progress track.
In step S206, receive the track switching command of user's input.
In step S207, according to this track switching command, the audio data frame of searching the track that needs switching stabs with synchronous.
In step S208, the audio data frame of the track that the needs that find are switched sends to demoder and carries out decodes and plays with stabbing synchronously.
Fig. 3 shows the realization flow of the synchronous stamp of the subsequent use track of calculating that the embodiment of the invention provides, and its concrete step is as described below:
In step S301, obtain the data value of each audio frame of subsequent use track.
In embodiments of the present invention, the data value of this audio frame can obtain from the data frame head of track.
In step S302, obtain the reproduction time length of audio frame according to the data stream code check of track.
In step S303, begin to add up in real time from broadcast, calculate the current timestamp of audio frequency.
In this embodiment of the invention, this timestamp that calculates is the synchronous stamp with audio video synchronization.
Fig. 4 shows the structured flowchart of the track switched system that first embodiment of the invention provides; For the ease of explanation; Only provided the part relevant with the embodiment of the invention among the figure, wherein, the track switched system can be built in software unit, hardware cell or the software and hardware combining unit of portable terminal.
Stab synchronously computing module 11 audio data frame of current in progress track is sent to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track; The track switching command that audio frequency switching command receiver module 12 receives user's input; Search module 13 according to the track switching command that said audio frequency switching command receiver module 12 receives, the audio data frame of searching the track that needs switching stabs with synchronous; The audio data frame of the track that the needs that track blocked operation module 14 will find switch sends to demoder with synchronous stamp and carries out decodes and plays.
As one embodiment of the present of invention, on the description basis of the structure of track switched system shown in Figure 4, Fig. 5 has provided the structured flowchart of the track switched system that second embodiment of the invention provides, and file header read module 15 reads the file header of avi file; The file header of the avi file that the said file header read module 15 of voice playing parameter acquisition module 16 parsings reads obtains the voice playing parameter, and said voice playing parameter comprises the correlation parameter information of track quantity and each track; Audio data frame header read module 17 reads the audio data frame header of each track; Decodes and plays module 18 sends to demoder with the audio data frame of current in progress track and carries out decodes and plays, and other each modules repeat no more at this as as described in above-mentioned first system embodiment.
As one embodiment of the present of invention, stab being specially of computing module 11 synchronously: data value acquisition module 111 obtains the data value of each audio frame of subsequent use track; Reproduction time length acquisition module 112 obtains the reproduction time length of audio frame according to the data stream code check of track; Computing module 113 begins to add up in real time from broadcast, calculates the current timestamp of audio frequency, as shown in Figure 6.
In embodiments of the present invention, the audio data frame of current in progress track is sent to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track; Receive the track switching command of user's input; According to said track switching command, the audio data frame of searching the track that needs switching stabs with synchronous; The audio data frame of the track that the needs that find are switched sends to demoder and carries out decodes and plays with stabbing synchronously, realizes the quick switching to track, gives user's one favorable experience.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (7)

1. a track changing method is characterized in that, said method comprises the steps:
The audio data frame of current in progress track is sent to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track;
Receive the track switching command of user's input;
According to said track switching command, the audio data frame of searching the track that needs switching stabs with synchronous;
The audio data frame of the track that the needs that find are switched sends to demoder and carries out decodes and plays with stabbing synchronously.
2. the method for claim 1 is characterized in that, said audio data frame with current in progress track sends to demoder when carrying out decodes and plays, also comprises the steps: before calculating the step of synchronous stamp of subsequent use track
Read the file header of avi file;
The file header of the avi file that parsing reads obtains the voice playing parameter, and said voice playing parameter comprises the correlation parameter information of track quantity and each track;
Read the audio data frame header of each track;
The audio data frame of current in progress track is sent to demoder carry out decodes and plays.
3. the method for claim 1 is characterized in that, the step of the synchronous stamp of the subsequent use track of said calculating specifically comprises the steps:
Obtain the data value of each audio frame of subsequent use track;
Obtain the reproduction time length of audio frame according to the data stream code check of track;
Begin to add up in real time from broadcast, calculate the current timestamp of audio frequency.
4. a track switched system is characterized in that, said system comprises:
Stab synchronously computing module, be used for audio data frame with current in progress track and send to demoder when carrying out decodes and plays, calculate the synchronous stamp of subsequent use track;
Audio frequency switching command receiver module is used to receive the track switching command that the user imports;
Search module, be used for the track switching command that receives according to said audio frequency switching command receiver module, the audio data frame of searching the track that needs to switch with stab synchronously; And
Track blocked operation module, the audio data frame of the track that the needs that are used for finding switch send to demoder with synchronous stamp and carry out decodes and plays.
5. system as claimed in claim 4 is characterized in that, said system also comprises:
The file header read module is used to read the file header of avi file;
The voice playing parameter acquisition module is used to resolve the file header of the avi file that said file header read module reads, and obtains the voice playing parameter, and said voice playing parameter comprises the correlation parameter information of track quantity and each track;
Audio data frame header read module is used to read the audio data frame header of each track; And
The decodes and plays module is used for audio data frame with current in progress track and sends to demoder and carry out decodes and plays.
6. system as claimed in claim 4 is characterized in that, said synchronous stamp computing module specifically comprises:
The data value acquisition module is used to obtain the data value of each audio frame of subsequent use track;
Root reproduction time length acquisition module is used for obtaining according to the data stream code check of track the reproduction time length of audio frame; And
Computing module is used for beginning to add up in real time from broadcast, calculates the current timestamp of audio frequency.
7. audio-video document playback equipment that comprises each described track switched system of claim 4 to 6.
CN201010239850.9A 2010-07-28 2010-07-28 Audio track switching method, system thereof and audio and video file playing device Active CN102347042B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010239850.9A CN102347042B (en) 2010-07-28 2010-07-28 Audio track switching method, system thereof and audio and video file playing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010239850.9A CN102347042B (en) 2010-07-28 2010-07-28 Audio track switching method, system thereof and audio and video file playing device

Publications (2)

Publication Number Publication Date
CN102347042A true CN102347042A (en) 2012-02-08
CN102347042B CN102347042B (en) 2014-05-07

Family

ID=45545651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010239850.9A Active CN102347042B (en) 2010-07-28 2010-07-28 Audio track switching method, system thereof and audio and video file playing device

Country Status (1)

Country Link
CN (1) CN102347042B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104023265A (en) * 2013-03-01 2014-09-03 联想(北京)有限公司 Method and device for switching audio information streams and electronic equipment
CN104967901A (en) * 2015-06-29 2015-10-07 腾讯科技(北京)有限公司 Audio track switching method in multimedia playing and multimedia playing device
CN105979347A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video play method and device
CN106210927A (en) * 2016-09-05 2016-12-07 青岛海信电器股份有限公司 A kind of track switching method and apparatus
CN106471574A (en) * 2014-06-30 2017-03-01 索尼公司 Information processor and information processing method
CN106921885A (en) * 2017-03-02 2017-07-04 深圳创维数字技术有限公司 The switching player method and device of a kind of multimedia data stream
CN107197394A (en) * 2017-05-05 2017-09-22 中广热点云科技有限公司 A kind of method of video playback sound intermediate frequency switching
CN108810575A (en) * 2017-05-04 2018-11-13 杭州海康威视数字技术股份有限公司 A kind of method and apparatus sending target video
CN111327923A (en) * 2018-12-13 2020-06-23 华为技术有限公司 Audio stream switching method and device
CN112189344A (en) * 2018-05-29 2021-01-05 华为技术有限公司 Method and device for selecting audio track from audio/video file
CN112866794A (en) * 2019-11-12 2021-05-28 腾讯科技(深圳)有限公司 Audio track switching method and equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533655A (en) * 2008-12-19 2009-09-16 徐清华 Playing method for a plurality of TS video files based on high definition media player
CN101552905A (en) * 2008-04-03 2009-10-07 中国联合网络通信集团有限公司 Information switching driving device, information switching device, remote control device and set-top box

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101552905A (en) * 2008-04-03 2009-10-07 中国联合网络通信集团有限公司 Information switching driving device, information switching device, remote control device and set-top box
CN101533655A (en) * 2008-12-19 2009-09-16 徐清华 Playing method for a plurality of TS video files based on high definition media player

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104023265A (en) * 2013-03-01 2014-09-03 联想(北京)有限公司 Method and device for switching audio information streams and electronic equipment
CN106471574A (en) * 2014-06-30 2017-03-01 索尼公司 Information processor and information processing method
CN104967901B (en) * 2015-06-29 2018-05-04 腾讯科技(北京)有限公司 Track switching method and apparatus for media playing in media play
CN104967901A (en) * 2015-06-29 2015-10-07 腾讯科技(北京)有限公司 Audio track switching method in multimedia playing and multimedia playing device
CN105979347A (en) * 2015-12-03 2016-09-28 乐视致新电子科技(天津)有限公司 Video play method and device
WO2017092344A1 (en) * 2015-12-03 2017-06-08 乐视控股(北京)有限公司 Method and device for video playback
CN106210927A (en) * 2016-09-05 2016-12-07 青岛海信电器股份有限公司 A kind of track switching method and apparatus
CN106921885A (en) * 2017-03-02 2017-07-04 深圳创维数字技术有限公司 The switching player method and device of a kind of multimedia data stream
CN106921885B (en) * 2017-03-02 2020-03-03 深圳创维数字技术有限公司 Multimedia data stream switching playing method and device
CN108810575A (en) * 2017-05-04 2018-11-13 杭州海康威视数字技术股份有限公司 A kind of method and apparatus sending target video
CN107197394A (en) * 2017-05-05 2017-09-22 中广热点云科技有限公司 A kind of method of video playback sound intermediate frequency switching
CN112189344A (en) * 2018-05-29 2021-01-05 华为技术有限公司 Method and device for selecting audio track from audio/video file
CN111327923A (en) * 2018-12-13 2020-06-23 华为技术有限公司 Audio stream switching method and device
CN111327923B (en) * 2018-12-13 2021-08-20 华为技术有限公司 Audio stream switching method and device
CN112866794A (en) * 2019-11-12 2021-05-28 腾讯科技(深圳)有限公司 Audio track switching method and equipment
CN112866794B (en) * 2019-11-12 2022-06-07 腾讯科技(深圳)有限公司 Audio track switching method and equipment

Also Published As

Publication number Publication date
CN102347042B (en) 2014-05-07

Similar Documents

Publication Publication Date Title
CN102347042B (en) Audio track switching method, system thereof and audio and video file playing device
CN105472397B (en) Video decoding apparatus
CN103843301B (en) The switching between expression during the network crossfire of decoded multi-medium data
CN105979347A (en) Video play method and device
CN102724584B (en) The online player method of Internet video, the online playing device of video and intelligent television
CN100591104C (en) Webpage requesting multi-medium applied system and realization for one-way network
CN101212679B (en) AV synchronization method and device for switching multi-channel audio streams during playing of AVI files
CN103039087A (en) Signaling random access points for streaming video data
CN102595114B (en) Method and terminal for playing video on low-side embedded product
CN101257624B (en) Decoder and method for realizing random access
CN103069769A (en) Representation groups for network streaming of coded multimedia data
CN103686411A (en) Method for playing video and multimedia device
RU2497298C2 (en) System and method to store multimedia presentations having several sources
CN101118776B (en) Method, system and device for realizing audio and video data synchronizing
CN106792154B (en) Frame skipping synchronization system of video player and control method thereof
CN101277450A (en) Method and apparatus for switching program
CN1777284B (en) Image encoding method, image decoding method, and apparatus thereof
CN103081488A (en) Signaling video samples for trick mode video representations
CN107634930A (en) The acquisition methods and device of a kind of media data
CN109618208A (en) A kind of live stream distribution slice synchronous method and device
CN102163201A (en) Multimedia file segmentation method, device thereof and code converter
CN101924914A (en) Method for switching television channels and system and device thereof
CN101370220B (en) Video media monitoring method and system
CN103841451A (en) Multimedia playing method, device and terminal
CN101998147A (en) Transmission method of media data, network-side apparatus and communication system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant