CN104159168A - Computing method suitable for audio and video time format conversion - Google Patents
Computing method suitable for audio and video time format conversion Download PDFInfo
- Publication number
- CN104159168A CN104159168A CN201410441017.0A CN201410441017A CN104159168A CN 104159168 A CN104159168 A CN 104159168A CN 201410441017 A CN201410441017 A CN 201410441017A CN 104159168 A CN104159168 A CN 104159168A
- Authority
- CN
- China
- Prior art keywords
- time
- audio
- video
- present
- computing method
- 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.)
- Withdrawn
Links
- 238000004364 calculation method Methods 0.000 title abstract description 10
- 238000006243 chemical reaction Methods 0.000 title abstract description 5
- 238000000205 computational method Methods 0.000 claims 1
- 230000009466 transformation Effects 0.000 claims 1
- 238000000034 method Methods 0.000 abstract description 6
- 230000001360 synchronised effect Effects 0.000 abstract description 6
- 230000002093 peripheral effect Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Landscapes
- Television Signal Processing For Recording (AREA)
Abstract
Description
技术领域 technical field
本发明涉及一种多媒体时间格式计算方法,尤其涉及一种适用于音视频时间格式转换的计算方法。 The invention relates to a multimedia time format calculation method, in particular to a calculation method suitable for audio and video time format conversion.
背景技术 Background technique
目前,标准SMPTE时间码只能用于专业音视频领域,而无法用于民用领域。其典型引用为,控制外围设备来进行视频捕捉和编辑。这个过程就需要标识音视频的每一帧。它们使用的方法就是使用SMPTE时间码来做精准同步。现行编辑系统通常会控制三个或者更多的类似磁带机等的外围设备,并且可完成互相切换。计算机必须精确地执行命令,因此必须要在特定的时间得到音视频位置地址。处理程序使用时间码的方法有很多种,比如:1.在整个编辑处理过程中更总音视频2.同步音视频3.同步多个外围设备等。如果这部分不能精确处理则最典型的反面案例就是我们常见的电影音画不同步。 At present, the standard SMPTE time code can only be used in professional audio and video fields, but not in civilian fields. Typical references are controlling peripherals for video capture and editing. This process requires identifying each frame of audio and video. The method they use is to use SMPTE timecode for precise synchronization. The current editing system usually controls three or more peripheral devices like tape drives, etc., and can switch between them. The computer must execute the command precisely, so the audio and video location address must be obtained at a specific time. There are many ways for a processing program to use timecode, such as: 1. Updating audio and video during the entire editing process 2. Synchronizing audio and video 3. Synchronizing multiple peripherals, etc. If this part cannot be handled accurately, the most typical negative case is our common movie audio and video out of sync.
我们平时所通用的电影行业SMPTE规范标准为24帧每秒。但是我们平时使用普通设备所拍摄的影片(如手机,急用DV,单反,卡片机等)所生产的影片则没有统一LTC写入功能,并且帧率都是不一样的,有但不限于23.97帧每秒,29.97帧每秒,60帧每秒,120帧每秒等等。所以这类影音产品不被专业市场所接纳。以致一直以来如果用手机拍电影做剪辑呗据于专业门槛之外。在专业控制市场如特效场合需要多通道多设备精确同步控制的行业,就无法使用。 The film industry SMPTE standard that we usually use is 24 frames per second. However, the films we usually shoot with ordinary equipment (such as mobile phones, emergency DV, SLR, card players, etc.) do not have a unified LTC writing function, and the frame rates are not the same, but not limited to 23.97 frames 29.97 fps, 60 fps, 120 fps and more. Therefore, such audio-visual products are not accepted by the professional market. As a result, it has always been outside the professional threshold to shoot movies with mobile phones for editing. It cannot be used in the professional control market such as special effects occasions that require precise synchronous control of multi-channel and multi-equipment.
并且,不同帧率的影片无法简单的通过计算来同步,如果按照毫秒去除,则所得的数字也是不一样的。完全按照SMPTE来做同步也是有缺陷的,如音频领域SMPTE规范为30帧每秒,但是在视频领域SMPTE规范为29.97帧每秒。当然,这当中的误差是可以忽略的。但我们计算一下: Moreover, movies with different frame rates cannot be synchronized simply by calculation. If they are divided by milliseconds, the resulting numbers will also be different. It is also flawed to do synchronization completely according to SMPTE. For example, the SMPTE specification in the audio field is 30 frames per second, but the SMPTE specification in the video field is 29.97 frames per second. Of course, the error in this can be ignored. But let's calculate:
SMPTE 30frs VS SMPTE 29.97frs SMPTE 30frs VS SMPTE 29.97frs
1小时=3600秒*30帧每秒=108000帧每小时 1 hour = 3600 seconds * 30 frames per second = 108000 frames per hour
1小时=3600秒*29.97帧每秒=107892帧每小时 1 hour = 3600 seconds * 29.97 frames per second = 107892 frames per hour
(即每小时差108帧) (i.e. a difference of 108 frames per hour)
以上标明,每小时视频其实落后音频108帧,但是我们看到的音视频又是同步的。其实在实际操作中,这108帧其实是被丢弃了(SMPTE NON-DROP模式)。但是观众是不知道的。这里每秒0.03帧的差距可以忽略,但是如果是23.97帧每秒和120帧每秒混剪丢失的就更多,因此,需要一种突破型的计算方式诞生。 As indicated above, the hourly video is actually 108 frames behind the audio, but the audio and video we see are synchronized. In fact, in actual operation, these 108 frames are actually discarded (SMPTE NON-DROP mode). But the audience doesn't know it. Here, the difference of 0.03 frames per second can be ignored, but if it is 23.97 frames per second and 120 frames per second, the loss will be more. Therefore, a breakthrough calculation method is needed.
发明内容 Contents of the invention
本发明的目的就在于为了解决上述问题而提供一种适用于音视频时间格式转换的计算方法。 The object of the present invention is to provide a calculation method suitable for audio and video time format conversion in order to solve the above problems.
本发明通过以下技术方案来实现上述目的: The present invention achieves the above object through the following technical solutions:
本发明包括以下步骤: The present invention comprises the following steps:
(1)载入媒体文件; (1) Load media files;
(2)读取实际播放时间; (2) Read the actual playing time;
(3)视频单位时间统一做一个10亿份的切割; (3) The video unit time is unified to make a cut of 1 billion copies;
(4)四舍五入得到一个相同的帧数; (4) Round up to get the same frame number;
(5)得到10位精度时间; (5) Get 10-digit precision time;
(6)转化为标准SMPTE格式时间。 (6) Convert to standard SMPTE format time.
本发明的有益效果在于: The beneficial effects of the present invention are:
本发明是一种适用于音视频时间格式转换的计算方法,与现有技术相比,本发明具有如下优点:支持常用格式、支持23.97,29.97,60,120等各种帧率文件、所有可在计算机播放音视频文件都可以支持、所有可播放音视频文件可同时输出相同规范的时间码都能够做同步、本计算方法能够在所有播放平台通用、精确到1/1000000000秒,精度大大提高,使用方便,具有推广应用的价值。 The present invention is a calculation method suitable for audio and video time format conversion. Compared with the prior art, the present invention has the following advantages: support commonly used formats, support various frame rate files such as 23.97, 29.97, 60, 120, etc. Playing audio and video files can be supported, all playable audio and video files can be output at the same time, and the time code of the same specification can be synchronized. This calculation method can be used in all playback platforms, accurate to 1/1000000000 seconds, the accuracy is greatly improved, and it is easy to use , has the value of popularization and application.
具体实施方式 Detailed ways
下面对本发明作进一步说明: The present invention will be further described below:
本发明包括以下步骤: The present invention comprises the following steps:
(1)载入媒体文件; (1) Load media files;
(2)读取实际播放时间; (2) Read the actual playing time;
(3)视频单位时间统一做一个10亿份的切割;(即:0.0000000001秒,且这个数字由于是影片本身直接提取的时间位置数值,不受卡帧等视频播放干扰,不管视频播放帧率如何,但是有一个共同点,就是单位播放时间是相同的,就是秒)。 (3) The video unit time is uniformly cut into 1 billion copies; (ie: 0.0000000001 seconds, and this number is the time and position value directly extracted from the film itself, so it will not be disturbed by video playback such as stuck frames, regardless of the video playback frame rate. , but there is one thing in common, that is, the unit playback time is the same, that is, seconds).
(4)四舍五入得到一个相同的帧数;(即:25frs或者24frs的标准16进制时间) (4) Round up to get the same frame number; (ie: 25frs or 24frs standard hexadecimal time)
(5)得到10位精度时间; (5) Get 10-digit precision time;
(6)转化为标准SMPTE格式时间(即:hh:mm:ss:ff格式时间)。 (6) Convert to standard SMPTE format time (ie: hh:mm:ss:ff format time).
这样,不同帧率的音视频文件就可以混剪了。无论外围设备多少就都可以精确同步了;另:SMPTE之精确到1/25秒,但是这种方式则可精确到1/1000000000秒,精度大大提高,优劣一看便知。 In this way, audio and video files with different frame rates can be mixed and cut. No matter how many peripheral devices there are, it can be precisely synchronized; another: SMPTE is accurate to 1/25 second, but this method can be accurate to 1/1000000000 second, the accuracy is greatly improved, and the pros and cons can be seen at a glance.
以上显示和描述了本发明的基本原理和主要特征及本发明的优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明要求保护范围由所附的权利要求书及其等效物界定。 The basic principles and main features of the present invention and the advantages of the present invention have been shown and described above. Those skilled in the industry should understand that the present invention is not limited by the above-mentioned embodiments. What are described in the above-mentioned embodiments and the description only illustrate the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will also have Variations and improvements are possible, which fall within the scope of the claimed invention. The protection scope of the present invention is defined by the appended claims and their equivalents.
Claims (1)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410441017.0A CN104159168A (en) | 2014-09-02 | 2014-09-02 | Computing method suitable for audio and video time format conversion |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410441017.0A CN104159168A (en) | 2014-09-02 | 2014-09-02 | Computing method suitable for audio and video time format conversion |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN104159168A true CN104159168A (en) | 2014-11-19 |
Family
ID=51884556
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201410441017.0A Withdrawn CN104159168A (en) | 2014-09-02 | 2014-09-02 | Computing method suitable for audio and video time format conversion |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN104159168A (en) |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1309500A (en) * | 2000-02-16 | 2001-08-22 | 松下电器产业株式会社 | Magnetic Recording and Playback Device |
| US20060078291A1 (en) * | 2000-08-15 | 2006-04-13 | Microsoft Corporation | Timecoding media samples |
| CN102238179A (en) * | 2010-04-07 | 2011-11-09 | 苹果公司 | Real-time or near real-time streaming |
| CN103986960A (en) * | 2014-06-03 | 2014-08-13 | 王军明 | Method for single-video picture division route teletransmission precise synchronization tiled display |
-
2014
- 2014-09-02 CN CN201410441017.0A patent/CN104159168A/en not_active Withdrawn
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1309500A (en) * | 2000-02-16 | 2001-08-22 | 松下电器产业株式会社 | Magnetic Recording and Playback Device |
| US20060078291A1 (en) * | 2000-08-15 | 2006-04-13 | Microsoft Corporation | Timecoding media samples |
| CN102238179A (en) * | 2010-04-07 | 2011-11-09 | 苹果公司 | Real-time or near real-time streaming |
| CN103986960A (en) * | 2014-06-03 | 2014-08-13 | 王军明 | Method for single-video picture division route teletransmission precise synchronization tiled display |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US9870799B1 (en) | System and method for processing ancillary data associated with a video stream | |
| US9584948B2 (en) | Method and apparatus for operating multiple speakers using position information | |
| BR112023020018A2 (en) | VIDEO PROCESSING METHOD FOR APPLICATION AND ELECTRONIC DEVICE | |
| US9154834B2 (en) | Fast switching of synchronized media using time-stamp management | |
| US20150269255A1 (en) | Alignment and re-association of metadata for media streams within a computing device | |
| US9723180B2 (en) | Device and method for correcting lip sync problems on display devices | |
| US20160125863A1 (en) | Integrated high sample rate digital audio workstation with embedded converters | |
| US20140205259A1 (en) | Screen recording for creating contents in mobile devices | |
| US9818448B1 (en) | Media editing with linked time-based metadata | |
| MX2021004635A (en) | Source device, sink devices, methods and computer programs. | |
| US11183202B2 (en) | Audio discontinuity detection and correction | |
| CN103188549B (en) | Video playing device and operation method thereof | |
| US11049257B2 (en) | Data structure, information processing apparatus, and control method thereof | |
| CN102186022A (en) | Audio/video editing method and device in television system | |
| CN104159168A (en) | Computing method suitable for audio and video time format conversion | |
| JP2012248259A (en) | Reproducing device | |
| TW200735048A (en) | Method and apparatus for reproducing data, recording medium, and method and apparatus for reocrding data | |
| CN109511051A (en) | Audio reproducing method and audio reproducing apparatus | |
| MY165998A (en) | Information processing apparatus, information processing method, program, and recording medium | |
| CN104796759A (en) | Method and device for extracting one-channel audio frequency from multiple-channel audio frequency | |
| CA2972051C (en) | Use of program-schedule text and closed-captioning text to facilitate selection of a portion of a media-program recording | |
| TW200519913A (en) | Reproducing apparatus and method and computer readable recording medium storing program for executing the method | |
| US10405122B1 (en) | Stereophonic sound generating method and apparatus using multi-rendering scheme and stereophonic sound reproducing method and apparatus using multi-rendering scheme | |
| CN110971914B (en) | Method for dynamically saving video and audio decoding resources in time axis mode | |
| JP2020053828A (en) | Editing system, editing device, and editing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WW01 | Invention patent application withdrawn after publication |
Application publication date: 20141119 |
|
| WW01 | Invention patent application withdrawn after publication |