如何使用C#隐藏mp3数据框中的数据
读取标题名后,数据帧开始,我想知道 mp3 播放器读取的数据帧大小是多少,这样如果我更改每个帧的单个位而不会对文件的声音造成太大影响,以及如何我可以更改一位(最后一位),这样在 C# 中影响最小。 请帮我
after reading the header fame, the data frame starts, i want to know what is the data frame size, that a mp3 player reads, so that if i change single bit of each frame without causing much to the sound of the file, and how can i change a single bit (last bit) so effect is minimum in C#.
please help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您正在寻找的技术称为'steganography'。
它不是C#(这是比人们想象的要复杂得多),但是这是相关的。。您可能希望使用 p/invoke 来使用它,或者将其移植到 C# 代码中。
The technology you are looking for is called 'steganography'.
It isn't C# (this is a lot more complex than one would think), but this is related.. You might want to use this using p/invoke, or port it into C# code.
我能够弄清楚并提出了我自己的算法,Rzr 你说的是对的。
mp3 文件是高度压缩的文件,任何帧中的任何一点变化都会引入巨大的噪音。
有办法解决这个问题,
缺点:文件大小会增加一点,非预期用户无法预测,除非他拥有原始 mp3 文件的精确副本。
能够实现:在没有噪音的情况下,我能够在 3mb mp3 文件中隐藏最多 5kb 的文本数据
解决方法:
预先定义放置每一位文本数据的位置在每一帧中,例如:第四个位置。
例如:
文本数据一个字节是
mp3 数据帧中的
01110001
第 8 个字节,因此帧中的这个字节,每个
4th
位位置都具有与文本数据相同的位位。如果 mp3 数据帧中的字节与数据位不匹配,则跳过该字节并继续下一个字节,继续执行相同操作,直到隐藏整个文本数据。
这是我能够成功实施的一种解决方案。
I was able to figure it out and came up with my own algorithm, Rzr what ever you said was right.
The mp3 file is highly compressed file any bit change in any of the frame would introduce tremendous noise.
there is way to work around for this,
drawbacks : file size would be increased abit which the un-intended user cant predict, unless he has the exact copy of the original mp3 file.
Able to achieve : without noise i was able to hide text data upto 5kb in a 3mb mp3 file
Work Around:
Pre-definee location of where to put each bit of text data in each frame e.g: 4th location.
E.g.:
text data one byte is
01110001
1st 8 byte from the mp3 data frames
so this byte from the frame, every
4th
bit location is having the bits which are same as the text data bits.if the byte from the mp3 data frame doesn't matches the data bits then skip the byte and go on to the next byte, keep on doing the same till entire text data is hidden.
this is one solution i was able to successfully implemented.
我也在做一个类似的项目...首先你必须了解 mp3 文件结构...我希望 此链接将帮助您了解 mp3 文件结构...一旦您清楚了文件结构,您自己编写代码就很容易...以流形式获取 mp3 文件并提取每个文件框架(一旦您了解 mp3 文件结构,这应该非常容易...事实上,我只花了几个小时就编写了代码来做到这一点)...以及关于您的算法的建议。一个 5 mb 的 mp3 文件或多或少有 15,000 帧...所以,如果您考虑每帧替换一点,您可以存储的最大数据是 2KB...
我尝试了相同的方法,但我每帧更改了一个字节...这在生成的文件中引入了一些噪音...有关如何减少噪音的任何建议...!?!?!??希望我的回答对您有所帮助...:)
I'm also working on a similar project... First of all you have to know about mp3 file structure... I hope this link would help you regarding mp3 file structure... Once you are clear about the file structure it's pretty easy to write a code yourself... Get the mp3 file as a stream and extract each frame from it(This should be really easy once you know about mp3 file structure... In fact, It took just a couple of hours for me to write a code to do that)... And a suggestion about your algorithm. A 5 mb mp3 file has more or less 15,000 frames... So, if you think of replacing a bit per frame the largest data you can store is 2KB...
I tried the same but I changed a BYTE per frame... This introduced some noise in the resulting file... Any suggestions on how to reduce the noise...!?!?!?? And hope my answer helps you... :)