CN100426410C - Method, installation, and embedded type devices for playing back video file - Google Patents

Method, installation, and embedded type devices for playing back video file Download PDF

Info

Publication number
CN100426410C
CN100426410C CNB2006100806668A CN200610080666A CN100426410C CN 100426410 C CN100426410 C CN 100426410C CN B2006100806668 A CNB2006100806668 A CN B2006100806668A CN 200610080666 A CN200610080666 A CN 200610080666A CN 100426410 C CN100426410 C CN 100426410C
Authority
CN
China
Prior art keywords
time
play
playing
timer
video file
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.)
Expired - Fee Related
Application number
CNB2006100806668A
Other languages
Chinese (zh)
Other versions
CN1873809A (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.)
Vimicro Corp
Original Assignee
Vimicro 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 Vimicro Corp filed Critical Vimicro Corp
Priority to CNB2006100806668A priority Critical patent/CN100426410C/en
Publication of CN1873809A publication Critical patent/CN1873809A/en
Application granted granted Critical
Publication of CN100426410C publication Critical patent/CN100426410C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The present invention provides a method for playing video files in an embedded type device, which comprises the following steps: the time of a timer is determined based on a frame rate; the error time of unit playing between theoretical playing time and the actual playing time of a video file with a playing reference frame count is determined; the timer is powered on, and the video file is played by frames, wherein the playing steps include that the reference frame count is used as a unit, cumulative playing error time is calculated based on the error time of unit playing and compared with the actual display time of a single frame in order to determine the correction occasion to correct. The present invention also provides an embedded type device and a video file player thereof. Through the present invention, when the definite effect of video playing accuracy is obtained, the consumption to resources of the embedded type device is greatly lightened so that the performance of the embedded type device is enhanced.

Description

Video file broadcasting method, device and embedded device
Technical field
The present invention relates to video playback, especially, relate to method, device and the embedded device of playing video file in a kind of embedded device.
Background technology
Embedded system is the dedicated computer system that is embedded in the object system, be application-centered, based on computer technology, but and the software and hardware cutting, be applicable to that application system has the dedicated computer system of strict demand to function, reliability, cost, volume, power consumption.Embedded device is meant that there is product, the equipment of embedded system inside.
At present at embedded device, as above mobile phone, the portable multimedia player (PMP) etc. during play multimedia files, at first the Voice ﹠ Video in the multimedia file is separated, the frame per second according to video starts timer then.When the timer routine that is provided with is moved, will show a frame video.Length of timer is that precision is the integer of millisecond, and the single frames actual displayed time is integer number of milliseconds thus.But different video file play frame rate difference, the theoretical demonstration time of single frames often occurring is not the situation of integer number of milliseconds, therefore causes between theoretical reproduction time of video and the actual play time and produces error.Along with the passing of reproduction time, error is increasing, causes video and audio frequency seriously to disconnect.For example, the frame per second of video was 30 frame/seconds, and to be 33 milliseconds be that timer shows frame videos for per 33 milliseconds the single frames actual displayed time so, and the actual play time of 30 frame videos is 990 milliseconds, and is faster 10 milliseconds than 1000 milliseconds of theoretical reproduction times.Along with the carrying out of playing, error increases gradually, has had a strong impact on the appreciation effect like this.
In order to address the above problem, present existing solution has the floating point arithmetic of employing accumulative total to play error time, improves the precision of broadcast.But because floating point arithmetic need consume more system resource, thereby had a strong impact on the embedded device serviceability.Also having a solution is to carry out decodes and plays according to each the frame decoding time in the video file.This solution requirement system frequently reads file, obtains the correct time that each frame shows, requires timer precision regularly also than higher simultaneously, and it is frequent to cause timer to interrupt, and has brought heavy burden to embedded device.
Summary of the invention
The objective of the invention is to, provide a kind of in embedded device the playing video file method, when satisfying accurate playing video file, reduce the consumption of embedded device resource as far as possible, reduce cost.
According to first aspect, the invention provides the method for playing video file in embedded device, described method comprises: determine time of timer, i.e. single frames actual displayed time based on frame per second; The theoretical reproduction time and the unit between the actual play time that determine the video file of broadcast reference frame number play error time; Start timer, playing video file frame by frame, described broadcast step comprises with the reference frame number being unit, play error time based on unit and calculate accumulative total and play error time, and with single frames actual displayed time ratio, determine to proofread and correct on correction opportunity.
Need to prove that the time of playing the video file of described reference frame number with this frame per second should be integer.
In first aspect, determine that preferably the step of the time of timer comprises that getting the frame per second inverse also rounds, and obtains the time of timer downwards.
According to second aspect, the invention provides a kind of video file playing device that is used for embedded device.
According to the third aspect, the invention provides a kind of embedded device, comprise as the described video file playing device of second aspect.
The present invention plays error time and the comparison of single frames actual displayed time by integer arithmetic and accumulative total that accumulative total is play error time, determines to proofread and correct on correction opportunity.When obtaining good video playback effect, reduced requirement, alleviated the heavy computation burden of embedded device greatly, improved the performance of embedded device hardware computing ability.
Description of drawings
For a better understanding of the present invention, the invention will be further described by way of example below in conjunction with accompanying drawing, wherein:
Fig. 1 is the video file playing flow figure of utilization player method of the present invention.
Embodiment
With reference to Fig. 1, Fig. 1 is the process flow diagram according to the video broadcasting method of one embodiment of the invention.
As shown in Figure 1, during play multimedia, at first the Voice ﹠ Video in the multimedia file is separated in embedded device, the frame per second according to video starts a timer then.Length of timer is that precision is the integer of millisecond.When the timer routine that is provided with is moved, will show a frame video.
In this embodiment, the frame per second of selecting video is 30 frame/seconds for example, and reference frame number is 30 frames for example, and its step comprises:
In step S100, initializing variable: get the frame per second inverse and also round downwards, calculate the time of timer, just single frames actual displayed time, that is: the time of timer
Figure C20061008066600061
Millisecond that is to say that the per 33 milliseconds of operations of set timer routine once show a frame video.Theoretical reproduction time is deducted actual play time, just reference frame number is deducted the product of single frames actual displayed time and reference frame number divided by the merchant of frame per second, the unit of calculating plays error time, that is: unit plays the theoretical reproduction time-actual play time of error time TLost==reference frame number fNum/ frame per second fps-single frames actual displayed time T time* reference frame number fNum=30/30*1000-33*30=10 millisecond.Frame number be will broadcast and initial value 0, that is: FNum=0 composed.Error time be will totally play and initial value 0, that is: FLost=0 composed.
In step S102, start timer, displaying video.
In step S104, will totally play error time FLost and single frames actual displayed time T time relatively, if accumulative total is play error time greater than the single frames actual displayed time, change step S114.
In step S106, broadcast frame number and increased 1, that is: FNum++.
In step S108, will broadcast frame number FNum and reference frame number fNum relatively, if do not wait, change step S112.
In step S110, will broadcast frame number and put 0, that is: FNum=0.Error time be will totally play and error time, that is: FLost+=TLost play from adding unit.
In step S112, show a frame video.
In step S114, will totally play error time from subtracting the single frames actual displayed time, that is: FLost-=Ttime changes step S116.
In step S116, judge whether to have shown the last frame video, if not, change step S104.
In step S118, play and finish.
Behind the beginning displaying video, after above-mentioned steps S104 circulates through 120 times to step S116, accumulative total is play error time after adding unit broadcast error time, equals 40 milliseconds, and is bigger than 33 milliseconds of single frames actual displayed times, then determine once to proofread and correct opportunity, begin to proofread and correct: when the timer routine operation that is provided with, do not show the next frame video, but directly return, totally play error time simultaneously from subtracting the single frames actual displayed time, begin new error time accumulative total.Like this, the error that causes in the actual play is just remedied by the simple integer arithmetic, has well improved audio visual effect.
The present invention is applicable to play multimedia files in the embedded devices such as mobile phone, PMP, and video playout speed is by the timer-operated equipment in the embedded system.Because embedded device is resource-constrained, utilizes existing player method need consume a large amount of embedded device resources, has reduced the embedded device performance, utilizes the present invention can well improve this point.In addition, have in the electronic equipment of multi-media player function at those, as at those because of considering in the limited electronic equipment of cost computing power, also can use the present invention.Described electronic equipment for example comprises the embedded device of the household electrical appliance that include single-chip microcomputer, instrument and meter, industry control unit, robot.
Obviously, the present invention described here can have many variations, and this variation can not be thought and departs from the spirit and scope of the present invention.Therefore, the change that all it will be apparent to those skilled in the art all is included within the covering scope of these claims.

Claims (8)

1. the method for playing video file in the embedded device may further comprise the steps:
Determine time of timer, i.e. single frames actual displayed time based on frame per second;
The theoretical reproduction time and the unit between the actual play time that determine the video file of broadcast reference frame number play error time;
Start timer, playing video file is play step and is comprised with the reference frame number being unit frame by frame, play error time based on unit and calculate accumulative total and play error time, and with single frames actual displayed time ratio, determine to proofread and correct on correction opportunity.
2. player method as claimed in claim 1 is characterized in that, determines that the step of the time of timer comprises that getting the frame per second inverse also rounds downwards.
3. player method as claimed in claim 1, it is characterized in that theoretical reproduction time is the merchant of reference frame number divided by frame per second, described actual play time is the product of single frames actual displayed time and reference frame number, and the step that described definite unit plays error time comprises theoretical reproduction time is deducted actual play time.
4. player method as claimed in claim 1 is characterized in that, determines that described accumulative total plays error time and may further comprise the steps:
According to timer routine number of run, accumulative total is play frame number, determines to have broadcast frame number;
To broadcast frame number and compare, when both are equal, will broadcast the frame number zero clearing and add up again, and add up unit simultaneously and play error time with reference frame number.
5. player method as claimed in claim 1 is characterized in that, determines that described correction may further comprise the steps opportunity:
To totally play error time and compare with the single frames actual displayed time, when its greater than the single frames actual displayed during time, determine correction opportunity.
6. player method as claimed in claim 1 is characterized in that, determines that described correction may further comprise the steps:
When correction maturation on opportunity, when the timer routine operation that is provided with, do not show the next frame video, but directly return, will totally play error time simultaneously and deduct the single frames actual displayed time.
7. video file playing device comprises:
Timer;
Determine the device of the time of timer based on frame per second, the time of described timer is the single frames actual displayed time;
The theoretical reproduction time of the video file of definite broadcast reference frame number and the unit between the actual play time play the device of error time;
Based on the startup of the timer playing device of playing video file frame by frame, described playing device comprises with the reference frame number being unit, play error time based on unit and calculate accumulative total and play error time, and with single frames actual displayed time ratio, determine correction opportunity, the device of proofreading and correct.
8. an embedded device comprises video file playing device as claimed in claim 7.
CNB2006100806668A 2006-05-25 2006-05-25 Method, installation, and embedded type devices for playing back video file Expired - Fee Related CN100426410C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100806668A CN100426410C (en) 2006-05-25 2006-05-25 Method, installation, and embedded type devices for playing back video file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100806668A CN100426410C (en) 2006-05-25 2006-05-25 Method, installation, and embedded type devices for playing back video file

Publications (2)

Publication Number Publication Date
CN1873809A CN1873809A (en) 2006-12-06
CN100426410C true CN100426410C (en) 2008-10-15

Family

ID=37484245

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100806668A Expired - Fee Related CN100426410C (en) 2006-05-25 2006-05-25 Method, installation, and embedded type devices for playing back video file

Country Status (1)

Country Link
CN (1) CN100426410C (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
MX350245B (en) 2011-07-12 2017-08-31 Nec Corp Image quantization parameter encoding method and image quantization parameter decoding method.
CN103442216B (en) * 2013-08-22 2016-09-07 中国电子科技集团第三十八研究所 The calibrating installation of monitor video time and calibration steps thereof
CN108259966B (en) * 2018-04-11 2020-02-18 大连理工大学 Multimedia large-screen synchronous playing method based on GPS time service

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0840528A2 (en) * 1996-10-29 1998-05-06 NEC Corporation An apparatus for a synchronized playback of audio-video signals
CN1436001A (en) * 2002-01-28 2003-08-13 北京华诺信息技术有限公司 Method for synchronizing video with audio in decoding system
WO2005045830A1 (en) * 2003-11-11 2005-05-19 Cosmotan Inc. Time-scale modification method for digital audio signal and digital audio/video signal, and variable speed reproducing method of digital television signal by using the same method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0840528A2 (en) * 1996-10-29 1998-05-06 NEC Corporation An apparatus for a synchronized playback of audio-video signals
CN1436001A (en) * 2002-01-28 2003-08-13 北京华诺信息技术有限公司 Method for synchronizing video with audio in decoding system
WO2005045830A1 (en) * 2003-11-11 2005-05-19 Cosmotan Inc. Time-scale modification method for digital audio signal and digital audio/video signal, and variable speed reproducing method of digital television signal by using the same method

Also Published As

Publication number Publication date
CN1873809A (en) 2006-12-06

Similar Documents

Publication Publication Date Title
US20130198632A1 (en) System and method of generating a playlist based on user popularity of songs therein through a music service
US20140372511A1 (en) Content Pre-Render and Pre-Fetch Techniques
EP3386208A1 (en) Managing interactive subtitle data
CN105681874A (en) Network video online playing method and device
CN107801100A (en) A kind of video location player method and device
CN100426410C (en) Method, installation, and embedded type devices for playing back video file
CN103577508A (en) Movie preview method, movie preview system and computer program product
CN104683857A (en) Method and device for realizing visual presentation of data preloading
CN106507200A (en) Video-frequency playing content insertion method and system
CN105404642A (en) Audio playing method and user terminal
CN104717509A (en) Method and device for decoding video
CN104506957A (en) Method and device for displaying subtitles
CN106792109B (en) Video playing method and device and terminal
CN113422980B (en) Video data processing method and device, electronic equipment and storage medium
CN106331871A (en) Method and device for realizing fast-forward or fast-backward playback of video stream
CN108829370B (en) Audio resource playing method and device, computer equipment and storage medium
US7840887B2 (en) Data stream processing method and system
CN105005444A (en) Display method and terminal of video playing time axis
CN103873891B (en) TS streaming media file fast positioning method and system
CN100437546C (en) Method for realizing audio-frequency and video frequency synchronization
CN107710754A (en) Audio, video data synchronous method and device
US7167888B2 (en) System and method for accurately calculating a mathematical power function in an electronic device
CN113271494B (en) Video frame processing method and device and electronic equipment
CN101106683A (en) A hardware resource self-adapted AVI file playing method
CN112203144A (en) Intelligent television program recommendation method and device and intelligent television

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20081015

Termination date: 20120525