这2个WAV文件有什么区别? [英] What is the difference between these 2 wav files?

查看:155
本文介绍了这2个WAV文件有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用名为 arss 的程序从wav文件创建频谱图.我有2个wav文件,一个可以工作,而另一个则不行(它已从mp3转换为wav).

I am trying to use a program called arss to create a spectrogram from a wav file. I have 2 wav files, one works and the other does not (it was converted to wav from mp3).

arss扔给我的错误是This WAVE file is not currently supported.很好,但是我不知道要更改wav文件的哪些部分,以便支持 .这些文档对这里没有帮助(据我所知)

The error that arss throws at me is This WAVE file is not currently supported. Which is fine, but I have no idea what parts of my wav file to change so that it will be supported. The docs don't help here (as far as I can tell)

当我在两个wav文件上运行mediainfo时,我可以达到以下规格:

When I run mediainfo on both wav files, I can the following specs:

工作波形:

General
Complete name                            : working.wav
Format                                   : Wave
File size                                : 1.15 MiB
Duration                                 : 6 s 306 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 536 kb/s

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 1
Duration                                 : 6 s 306 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 536 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 1.15 MiB (100%)

无法正常工作:

General
Complete name                            : not_working.wav
Format                                   : Wave
File size                                : 5.49 MiB
Duration                                 : 30 s 0 ms
Overall bit rate mode                    : Constant
Overall bit rate                         : 1 536 kb/s
Writing application                      : Lavf57.83.100

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 1
Duration                                 : 30 s 0 ms
Bit rate mode                            : Constant
Bit rate                                 : 1 536 kb/s
Channel(s)                               : 2 channels
Sampling rate                            : 48.0 kHz
Bit depth                                : 16 bits
Stream size                              : 5.49 MiB (100%)

比较两个文件的音频规格,我看不出文件大小和持续时间之间的区别.我什至使用ffmpeg更新了无效wav的采样率,以使其与48.0kHz正常工作的wav匹配,但是没有运气.

Comparing the audio specs of both files, I can't tell any difference between anything other than the file size and duration. I even updated the Sampling rate of the non-working wav using ffmpeg so that it would match the working one at 48.0kHz, but no luck.

有什么主意吗?

两个wav文件均可用此处

Both wav files are avaliable here

推荐答案

FFmpeg默认情况下会在数据块之前写入一个LIST块以及一些元数据. ARSS具有严格的解析器,希望数据块以固定的字节偏移量(0x24)开始.可以告诉FFmpeg使用bitexact选项跳过写LIST块.

FFmpeg, by default, writes a LIST chunk, with some metadata, before the data chunk. ARSS has a rigid parser and expects the data chunk to start at a fixed byte offset (0x24). FFmpeg can be told to skip writing the LIST chunk using the bitexact option.

ffmpeg -i not_working.wav -c copy -bitexact new.wav

请注意,ARSS不会检查采样率,只是WAV的字节序PCM很少.

Note that ARSS doesn't check for sampling rate, only that WAVs have little endian PCM.

这里有一个相关的问题,并非完全重复,供以后的读者使用:

Here's a related Q, not quite a duplicate, linked for future readers:

ffmpeg-制作干净的WAV文件

这篇关于这2个WAV文件有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆