在不改变样本数量的情况下改变MOV或WAV的wav,aiff或mov音频采样率(change wav, aiff or mov audio sample rate of MOV or WAV WITH

编程入门 行业动态 更新时间:2024-10-18 10:35:33
在不改变样本数量的情况下改变MOV或WAV的wav,aiff或mov音频采样率(change wav, aiff or mov audio sample rate of MOV or WAV WITHOUT changing number of samples)

我需要一种非常精确的方法来加速音频。 我正在准备OpenDCP电影,这是一个制作数字影院套装的开源工具,用于在影院放映。 我的源文件通常是23.976fps的快速MOV文件,音频为48.000kHz。 有时我的音频是一个单独的48.000kHz WAV。 (FWIW,源的视频帧速率实际上是每秒24 / 100.1帧,这是一个重复的小数。)

DCP标准基于24.000fps和48.000kHz的程序,因此需要加快源的音频和视频。 图像处理工作流程固有地涉及将MOV转换为每帧帧数的TIF序列,然后假设为24.000fps,因此我不必涉及QT视频媒体处理程序的内部。

但加速音频匹配证明是困难的。 大多数音频节目无法获得与重新定时的图像帧对齐的音频样本数量。 Audacity速度增加0.1%会导致样本数量错误。 我发现唯一有效的途径是使用Apple Cinema Tools将23.976fps / 48.000kHz MOV符合24.000fps / 48.048kHz(通过更改Quicktime标头),然后使用Quicktime Player从中导出音频该文件在48.000kHz,重新采样。 这是框架准确的。

所以我的问题是:在ffmpeg或sox中是否有设置可以精确地加速MOV或WAV或AIFF中的音频? 我想要一个跨平台的解决方案,所以我不依赖于Cinema Tools,它只是MacOS。

我知道这是很多背景知识。 随意提出澄清问题!

I need a very precise way to speed up audio. I am preparing films for OpenDCP, an open-source tool to make Digital Cinema Packages, for screening in theaters. My source files are usually quicktime MOV files at 23.976fps with 48.000kHz audio. Sometimes my audio is a separate 48.000kHz WAV. (FWIW, the video frame rate of the source is actually 24/100.1 frames per second, which is a repeating decimal.)

The DCP standard is based around a 24.000fps and 48.000kHz program, so the audio and video of the source need to be sped up. The image processing workflow inherently involves converting the MOV to a TIF sequence, frame-per-frame, which is then assumed to be 24.000fps, so I don't have to get involved in the internals of the QT Video Media Handler.

But speeding up the audio to match is proving to be difficult. Most audio programs cannot get the number of audio samples to line up with the retimed image frames. A 0.1% speed increase in Audacity results in the wrong number of samples. The only pathway that I have found that works is to use Apple Cinema Tools to conform the 23.976fps/48.000kHz MOV to 24.000fps/48.048kHz (which it does by changing the Quicktime headers) and then using Quicktime Player to export the audio from that file at 48.000kHz, resampling it. This is frame accurate.

So my question is: are there settings in ffmpeg or sox that will precisely speed up the audio in a MOV or in a WAV or AIFF precisely? I would like a cross platform solution, so I am not dependent on Cinema Tools, which is only MacOS.

I know this is a LOT of background. Feel free to ask clarifying questions!

最满意答案

sox input-file output-file speed 1.001001001001001

文件可以是WAV或AIFF。 Sox在内部工作,小数实际上是1000/999,因此时序调整是100%准确(并且重采样是高质量的)。 当然是走另一条路

sox input-file output-file speed 0.999

FFmpeg也可以在时间上准确地完成它,但它的重采样器有一些质量问题。 版本1.1可以使用sox重采样器(参见这里: http : //ffmpeg.org/trac/ffmpeg/wiki/FFmpeg%20and%20the%20SoX%20Resampler ),但它可能最简单的只是使用sox。

sox input-file output-file speed 1.001001001001001

where files can be WAV or AIFF. Sox works out internally that the decimal is in fact 1000/999, so the timing adjustment is 100% accurate (and the resampling is high quality). Going the other way is of course

sox input-file output-file speed 0.999

FFmpeg can also do it accurately timewise, but its resampler has had some quality problems. Version 1.1 can use the sox resampler (see here: http://ffmpeg.org/trac/ffmpeg/wiki/FFmpeg%20and%20the%20SoX%20Resampler) but its probably simplest just to use sox.

更多推荐

本文发布于:2023-07-16 13:24:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1128933.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:样本   不改变   情况下   音频   数量

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!