WAV文件数据恢复(WAV file data recovery)

系统教程 行业动态 更新时间:2024-06-14 17:00:14
WAV文件数据恢复(WAV file data recovery)

我有一个情况,我想从中恢复数据的是一个损坏的WAV文件。

我的同事们已经将大型的WAV文件分割成具有适当头文件的小型WAV文件。 这产生了一些有趣的结果。

切成1MB的片段,我们得到以下结果:

第一个波形文件段全部是噪声。 第二个波形文件段失真。 第三波文件段很清楚。

这个模式在文件的整个长度上被重复(在它被分解成更小的文件之后)。

对于20MB的切片:

第一个波形文件段全部是噪声。 第二个波形文件段很清楚。 第三个波形文件段失真。

同样,这个模式在文件的整个长度上被重复(在它被分解成更小的文件之后)。

谁会知道为什么会发生这种情况?

I have a situation where there is a corrupt WAV file from which I'm trying to recover data.

My colleagues have sliced up the large WAV file into smaller WAV files with proper headers. This has produced some interesting results.

Sliced into 1MB segments we get these results:

The first wave file segment is all noise. The second wave file segment is distorted. The third wave file segment is clear.

This pattern is repeated for the entire length of the file (after it's been broken into smaller files).

For 20MB slices:

The first wave file segment is all noise. The second wave file segment is clear. The third wave file segment is distorted.

Again, this pattern is repeated for the entire length of the file (after it's been broken into smaller files).

Would anyone know why this is occurring?

最满意答案

假设WAV包含未压缩(原始)样本,恢复应该很容易。 你需要知道样本格式。 例如:16位,两个通道,44100赫兹(这是cd质量)。 因为其中一个细分是可以的,那么你可以看看这个来找出正确的值。

然后,只需在Adobe Audition(以前称为Cool Edit)或任何其他支持导入原始数据的波形编辑器中使用这些值打开WAV。

编辑 :好的,现在回答你的问题。 有些细分是清晰的,因为这样的排列是正确的。 就像我之前所描述的那样,再次采用cd质量。 一个样本的字节如下所示:

left_channel_high | left_channel_low | right_channel_high | right_channel_low

(我不确定这里的排序是什么,但这只是一个例子)所以第一个数据字节最好是左声道最重要的字节,否则最终会有两个样本的碎片被解释为一个整体样本:

left_channel_low | right_channel_high | right_channel_low || left_channel_high -------------------part of first sample------------------ || --second sample--

你可以看到所有的东西都在这里“移动”了,这是因为你的文件切片的大小不是以字节为单位的样本大小的倍数。

如果幸运的话,这只会导致渠道互换。 如果你不幸,高字节和低字节会被交换。 有趣的是,这确实导致了一种可识别的,但严重扭曲的音频。

让我感到困惑的是,你报告的模式以三块为单位重复。 从上面我可以预料到两个或四个。 也许你正在使用不同寻常的采样格式,例如24位(3字节)?

Assuming the WAV contains uncompressed (raw) samples, recovery should be easy. You need to know the sample format. For example: 16 bits, two channels, 44100 Hz (which is cd quality). Because one of the segments is okay, then you can look at this to figure out what the right values are.

Then just open the WAV using these values in, e.g., Adobe Audition (formerly Cool Edit), or any other wave editor that supports import of raw data.

Edit: Okay, now to answer your question. Some segments are clear, because then the alignment is right. Take the cd quality again, as I described before. The bytes of one sample look like this:

left_channel_high | left_channel_low | right_channel_high | right_channel_low

(I'm not sure about the ordering here! But it's just an example.) So the first data byte had better be the most significant byte of the left channel, or else you'll end up with fragments of two samples being interpreted as one whole sample:

left_channel_low | right_channel_high | right_channel_low || left_channel_high -------------------part of first sample------------------ || --second sample--

You can see that everything "shifted" here, which happens because the size of your file slices is not a multiple of the sample size in bytes.

If you're lucky, this just causes the channels to be swapped. If you're unlucky, high and low bytes get swapped. Interestingly, this does lead to kind-of recognizable, but severely distorted audio.

What puzzles me is that the pattern you report repeats in blocks of three. From the above, I'd expect either two or four. Perhaps you are using an unusual sample format, such as 24-bits (3 bytes)?

更多推荐

本文发布于:2023-04-18 00:56:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/8a9ff2e79291be9b6dff741637a02007.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据恢复   文件   WAV   recovery   data

发布评论

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

>www.elefans.com

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