CN102347042B - 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
CN102347042B
CN102347042B CN201010239850.9A CN201010239850A CN102347042B CN 102347042 B CN102347042 B CN 102347042B CN 201010239850 A CN201010239850 A CN 201010239850A CN 102347042 B CN102347042 B CN 102347042B
Authority
CN
China
Prior art keywords
track
audio
data frame
stamp
synchronous
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.)
Active
Application number
CN201010239850.9A
Other languages
Chinese (zh)
Other versions
CN102347042A (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

Landscapes

  • Signal Processing For Digital Recording And Reproducing (AREA)

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 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) file format that adopts voice and image synchronous to combine, it has adopted a kind of lossy compression method mode to video file, but compression ratio is higher, although 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 multimedia CD, is used for preserving the 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, is also the major part that determines file size.The data transfer rate that the size of video file equals this document is multiplied by the time span of this video playback, and index block comprises data block list and their positions hereof, so that data random access ability in file to be provided.File header comprises the general information of file, definition data format, the parameters such as compression algorithm used.
AVI form also can encapsulate many tracks hereof, such as more common English track, Spanish track, Chinese track and French track etc., this multitone board pattern makes an avi file can meet the people in various language district, the world, better views and admires the AVI film that different language is dubbed.
Owing to playing in multitone rail AVI process, need to switch track, if according to the Audio conversion pattern of mode standard, need and audio video synchronization, so the speed of switching track often with key frame of video switching point position number relevant, in the less position of key frame of video, switch track action need and just can hear the sound of new track several seconds, even longer sometimes, have a strong impact on the impression of viewing and admiring that user views and admires 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 prior art, while carrying out track switching according to the AVI pattern of standard, need and audio video synchronization, cause switching the slow problem of track.
The embodiment of the present invention is achieved in that a kind of track changing method, and described method comprises the steps:
The audio data frame of current in progress track is sent to decoder decodes when playing, calculate the synchronous stamp of standby track, described synchronous stamp is the audio time stamp with audio video synchronization, when the synchronous stamp of described standby track has calculated, described standby track is in synchronous wait switching state; Receive the track switching command of user's input; According to described track switching command, search audio data frame and the synchronous stamp of the track that needs switching; The audio data frame of the track that the needs that find are switched and synchronous stamp send to the decoder broadcasting of decoding.
Another object of the embodiment of the present invention is to provide a kind of track switched system, and described system comprises:
Synchronous stamp computing module, when decoding broadcasting for the audio data frame of current in progress track being sent to decoder, calculate the synchronous stamp of standby track, described synchronous stamp is the audio time stamp with audio video synchronization, when the synchronous stamp of described standby track has calculated, described standby track is in synchronous wait switching state; Audio conversion command reception module, for receiving the track switching command of user's input; Search module, for the track switching command receiving according to described Audio conversion command reception module, search audio data frame and the synchronous stamp of the track that needs switching; And
Track handover operation module, sends to the decoder broadcasting of decoding for the audio data frame of track that the needs that find are switched and synchronous stamp.
Another object of the embodiment of the present invention is to provide a kind of audio-video document playback equipment that comprises track switched system.
In embodiments of the present invention, the audio data frame of current in progress track is sent to decoder and decode when playing, calculate the synchronous stamp of standby track; Receive the track switching command of user's input; According to described track switching command, search audio data frame and the synchronous stamp of the track that needs switching; The audio data frame of the track that the needs that find are switched and synchronous stamp send to decoder broadcastings of decode, and the quick switching of realization to track, to the good experience of user one.
accompanying drawing explanation
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 standby track of calculating that provides of the embodiment of the present 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 present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The invention provides a kind of track changing method, described method comprises the steps:
The audio data frame of current in progress track is sent to decoder and decode when playing, calculate the synchronous stamp of standby track;
Receive the track switching command of user's input;
According to described track switching command, search audio data frame and the synchronous stamp of the track that needs switching;
The audio data frame of the track that the needs that find are switched and synchronous stamp send to the decoder broadcasting of decoding.
The present invention also provides a kind of track switched system, and described system comprises:
Synchronous stamp computing module, when decoding broadcasting for the audio data frame of current in progress track being sent to decoder, calculates the synchronous stamp of standby track;
Audio conversion command reception module, for receiving the track switching command of user's input;
Search module, for the track switching command receiving according to described Audio conversion command reception module, search audio data frame and the synchronous stamp of the track that needs switching; And
Track handover operation module, sends to the decoder broadcasting of decoding for the audio data frame of track that the needs that find are switched and synchronous stamp.
The present invention also provides a kind of audio-video document playback equipment that comprises 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 decoder and decode when playing, calculate the synchronous stamp of standby track.
In embodiments of the present invention, this synchronous stamp is and the audio time stamp of audio video synchronization that, when calculating completes, this standby track 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 conversion instruction is that the track that current broadcasting video and audio file is play that user inputs switches to by current in progress track the instruction that other tracks are inputted, 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, search audio data frame and the synchronous stamp of the track that needs switching.
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 synchronous stamp is on this audio data frame, to switch the time point of track.
In step S104, the audio data frame of the track that the needs that find are switched and synchronous stamp send to the decoder broadcasting of decoding.
In embodiments of the present invention, after finding the audio data frame and synchronous stamp of the track that needs switching, need to reconfigure decoder, for example the decoder corresponding with original sound-track is the decoder of DTS audio coding form, needs to be replaced by the decoder of supporting AC3 coded format after switching.
In embodiments of the present invention, because standby track is in synchronous wait switching state, when searching while getting the track audio data frame of the track need switching and synchronous stamp, according to this synchronous stamp, current track can be switched to fast to the track audio data frame finding, realize track fast and switch.
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 reading, obtain audio frequency play parameter, described audio frequency play parameter comprises the relevant parameter information of track quantity and each track.
In embodiments of the present invention, in playing the process of avi file, first, read the file header of this avi file, the quantity of track and the relevant parameter information of each track that the file header judgement by this avi file wherein comprised.
In step S203, read the voice data frame originating point information of each track.
In step S204, the audio data frame of current in progress track is sent to decoder, the broadcasting of decoding.
In step S205, calculate the synchronous stamp of standby track.
In embodiments of the present invention, this standby track refers to except when other residue tracks outside front in progress track.
In step S206, receive the track switching command of user's input.
In step S207, according to this track switching command, search audio data frame and the synchronous stamp of the track that needs switching.
In step S208, the audio data frame of the track that the needs that find are switched and synchronous stamp send to the decoder broadcasting of decoding.
Fig. 3 shows the realization flow of the synchronous stamp of the standby track of calculating that the embodiment of the present invention provides, and its concrete step is as described below:
In step S301, obtain the data value of each audio frame of standby 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, according to the data flow code check of track, obtain the reproduction time length of audio frame.
In step S303, from playing, start to add up in real time, calculate the current timestamp of audio frequency.
In this embodiment of the present invention, this timestamp calculating is the stamp of synchronizeing with audio video synchronization.
Fig. 4 shows the structured flowchart of the track switched system that first embodiment of the invention provides, for convenience of explanation, in figure, only provided the part relevant to the embodiment of the present invention, wherein, track switched system can be built in software unit, hardware cell or the software and hardware combining unit of mobile terminal.
When synchronous stamp computing module 11 sends to the audio data frame of current in progress track decoder and decode broadcasting, calculate the synchronous stamp of standby track; Audio conversion command reception module 12 receives the track switching command of user's input; Search the track switching command that module 13 receives according to described Audio conversion command reception module 12, search audio data frame and the synchronous stamp of the track that needs switching; The audio data frame of the track that track handover operation module 14 is switched the needs that find and synchronous stamp send to the decoder broadcasting of decoding.
As one embodiment of the present of invention, on the description basis of the structure of the track switched system shown in Fig. 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 described file header read module 15 of audio frequency play parameter acquisition module 16 parsing reads, obtains audio frequency play parameter, and described audio frequency play parameter comprises the relevant parameter information of track quantity and each track; Voice data frame originating point information read module 17 reads the voice data frame originating point information of each track; Decoding playing module 18 sends to the decoder broadcasting of decoding by the audio data frame of current in progress track, and other each modules, as described in above-mentioned the first system embodiment, do not repeat them here.
As one embodiment of the present of invention, synchronously stab being specially of computing module 11: data value acquisition module 111 obtains the data value of each audio frame of standby track; Reproduction time length acquisition module 112 obtains the reproduction time length of audio frame according to the data flow code check of track; Computing module 113 starts to add up in real time from playing, and 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 decoder and decode when playing, calculate the synchronous stamp of standby track; Receive the track switching command of user's input; According to described track switching command, search audio data frame and the synchronous stamp of the track that needs switching; The audio data frame of the track that the needs that find are switched and synchronous stamp send to decoder broadcastings of decode, and the quick switching of realization to track, to the good experience of user one.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, all any modifications of doing within the spirit and principles in the present invention, be equal to and replace and improvement etc., within all should being included in protection scope of the present invention.

Claims (7)

1. a track changing method, is characterized in that, described method comprises the steps:
The audio data frame of current in progress track is sent to decoder decodes when playing, calculate the synchronous stamp of standby track, described synchronous stamp is the audio time stamp with audio video synchronization, when the synchronous stamp of described standby track has calculated, described standby track is in synchronous wait switching state;
Receive the track switching command of user's input;
According to described track switching command, search audio data frame and the synchronous stamp of the track that needs switching;
The audio data frame of the track that the needs that find are switched and synchronous stamp send to the decoder broadcasting of decoding.
2. the method for claim 1, is characterized in that, the described audio data frame by current in progress track sends to decoder and decodes when playing, and the step of calculating the synchronous stamp of standby track also comprises the steps: before
Read the file header of avi file;
The file header of the avi file that parsing reads, obtains audio frequency play parameter, and described audio frequency play parameter comprises the relevant parameter information of track quantity and each track;
Read the voice data frame originating point information of each track;
The audio data frame of current in progress track is sent to the decoder broadcasting of decoding.
3. the method for claim 1, is characterized in that, the step of the synchronous stamp of the standby track of described calculating specifically comprises the steps:
Obtain the data value of each audio frame of standby track;
According to the data flow code check of track, obtain the reproduction time length of audio frame;
From playing, start to add up in real time, calculate the current timestamp of audio frequency.
4. a track switched system, is characterized in that, described system comprises:
Synchronous stamp computing module, when decoding broadcasting for the audio data frame of current in progress track being sent to decoder, calculate the synchronous stamp of standby track, described synchronous stamp is the audio time stamp with audio video synchronization, when the synchronous stamp of described standby track has calculated, described standby track is in synchronous wait switching state;
Audio conversion command reception module, for receiving the track switching command of user's input;
Search module, for the track switching command receiving according to described Audio conversion command reception module, search audio data frame and the synchronous stamp of the track that needs switching; And
Track handover operation module, sends to the decoder broadcasting of decoding for the audio data frame of track that the needs that find are switched and synchronous stamp.
5. system as claimed in claim 4, is characterized in that, described system also comprises:
File header read module, for reading the file header of avi file;
Audio frequency play parameter acquisition module, for resolving the file header of the avi file that described file header read module reads, obtains audio frequency play parameter, and described audio frequency play parameter comprises the relevant parameter information of track quantity and each track;
Voice data frame originating point information read module, for reading the voice data frame originating point information of each track; And
Decoding playing module, for sending to the audio data frame of current in progress track the decoder broadcasting of decoding.
6. system as claimed in claim 4, is characterized in that, described synchronous stamp computing module specifically comprises:
Data value acquisition module, for obtaining the data value of each audio frame of standby track;
Root reproduction time length acquisition module, for obtaining the reproduction time length of audio frame according to the data flow code check of track; And
Computing module, for starting to add up in real time from playing, calculates the current timestamp of audio frequency.
7. an audio-video document playback equipment that comprises the track switched system described in claim 4 to 6 any one.
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 CN102347042A (en) 2012-02-08
CN102347042B true 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)

Families Citing this family (12)

* 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
CN106471574B (en) * 2014-06-30 2021-10-12 索尼公司 Information processing apparatus, information processing method, and computer program
CN104967901B (en) * 2015-06-29 2018-05-04 腾讯科技(北京)有限公司 Track switching method and apparatus for media playing in media play
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
CN106921885B (en) * 2017-03-02 2020-03-03 深圳创维数字技术有限公司 Multimedia data stream switching playing method and device
CN108810575B (en) * 2017-05-04 2021-10-29 杭州海康威视数字技术股份有限公司 Method and device for sending target video
CN107197394B (en) * 2017-05-05 2019-12-13 中广热点云科技有限公司 audio switching method in video playing
US20210219028A1 (en) * 2018-05-29 2021-07-15 Huawei Technologies Co., Ltd. Method and apparatus for selecting audio track from audio and video file
CN111327923B (en) 2018-12-13 2021-08-20 华为技术有限公司 Audio stream switching method and device
CN112866794B (en) * 2019-11-12 2022-06-07 腾讯科技(深圳)有限公司 Audio track switching method and equipment
CN118158484A (en) * 2022-12-06 2024-06-07 中兴通讯股份有限公司 Multimedia data processing method and device

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

Also Published As

Publication number Publication date
CN102347042A (en) 2012-02-08

Similar Documents

Publication Publication Date Title
CN102347042B (en) Audio track switching method, system thereof and audio and video file playing device
RU2566973C2 (en) Method and apparatus for motion vector determination in video encoding or decoding
TWI692245B (en) Video decoding apparatus, video encoding method and apparatus, and computer-readable storage medium
CN102986218B (en) Video for stream video data switches
RU2666233C1 (en) Method and device for determination of reference images for external prediction
JP6050488B2 (en) Multi-layer video encoding method and apparatus for random access, and multi-layer video decoding method and apparatus for random access
CN105979347A (en) Video play method and device
CN102595114B (en) Method and terminal for playing video on low-side embedded product
CN103843301A (en) Switching between representations during network streaming of coded multimedia data
CN103039087A (en) Signaling random access points for streaming video data
CN103686411A (en) Method for playing video and multimedia device
CN106792154B (en) Frame skipping synchronization system of video player and control method thereof
KR100736503B1 (en) Image decoding method and apparatus thereof
CN101277450A (en) Method and apparatus for switching program
CN103081488A (en) Signaling video samples for trick mode video representations
CN109618208A (en) A kind of live stream distribution slice synchronous method and device
CN103475900A (en) Method and device for packaging mobile phone television service video frame and front-end system
CN103841451A (en) Multimedia playing method, device and terminal
KR100651566B1 (en) Multimedia Player Using Output Buffering in Mobile Terminal and Its Control Method
CN101022548A (en) Method for processing data in a terminal with digital broadcasting receiver
CN101909063B (en) Method and system for pushing video streaming based on layered coding
WO2024087732A1 (en) Livestreaming data processing method and system
WO2013166785A1 (en) Media service providing method and device, and media service displaying method and device
KR100783267B1 (en) System and method for providing value added service in digital multimedia broadcasting
JP2008072182A (en) Moving picture decoding device, moving picture decoding method, moving picture decoding program, moving picture encoding device, moving picture encoding method, moving picture encoding program, and moving picture encoding and decoding device

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