【问题标题】:how to hide data in mp3 data frame using C#如何使用 C# 在 mp3 数据框中隐藏数据
【发布时间】:2011-05-29 06:31:09
【问题描述】:

读取标题名声后,数据帧开始,我想知道 mp3 播放器读取的数据帧大小是多少,这样如果我更改每个帧的单个位而不会对文件的声音造成太大影响,以及如何更改单个位(最后一位),以便在 C# 中效果最小。 请帮帮我

【问题讨论】:

    标签: c# mp3 steganography


    【解决方案1】:

    您正在寻找的技术称为'steganography'.

    它不是 C#(这比人们想象的要复杂得多),而是 this is related.。您可能希望使用 p/invoke 来使用它,或者将其移植到 C# 代码中。

    【讨论】:

    • 你没明白我的问题,不是c#,是关于如何使用C#语言读取mp3数据帧的,你建议的相关链接是C语言,mp3数据帧使用多少位来播放这首歌....希望你明白我的意思
    • 不,我明白你的意思。我的回答是“这不是 C# ......但是”。我知道它在 C 中。请阅读我的其余答案。将其移植到 C# 中,或使用 p/invoke。你没有得到其中的哪一部分?
    【解决方案2】:

    我能够弄清楚并想出了我自己的算法,Rzr 你说的都是对的。

    mp3 文件是高度压缩的文件,任何帧中的任何位变化都会引入巨大的噪音。

    有办法解决这个问题,

    Soln_1: Hide the text data and in any of the bit of each byte and reconstruct the frame using humming code 
    
    Soln_2: which i was able to do it, using Layer III, BitRate=128000, SampleRate=441000, Padding=0
    

    缺点:文件大小会有所增加,这是非预期用户无法预测的,除非他拥有原始 mp3 文件的精确副本。

    能够实现:在没有噪音的情况下,我能够在 3mb 的 mp3 文件中隐藏高达 5kb 的文本数据

    解决方法

    step1: scan every 8 bytes in each frame
    step2: take a 8 bits from the text data
    

    预定义每帧文本数据位的放置位置,例如:第 4 个位置。

    step3:  check every 4th bit location of each byte of the frame is same as the each bit of the text data are same
    

    例如: 文本数据一字节为01110001

    mp3 数据帧中的第一个 8 字节

    byte_1: 01101111 -->4th location bit is 0
    byte_2: 01111111 -->4th location bit is 1
    byte_3: 01111001 -->4th location bit is 1
    byte_4: 01111011 -->4th location bit is 1
    byte_5: 01100011 -->4th location bit is 0
    byte_6: 01101100 -->4th location bit is 0
    byte_7: 01101011 -->4th location bit is 0
    byte_8: 01110011 -->4th location bit is 1
    

    所以帧中的这个字节,每个4th 位位置都具有与文本数据位相同的位。

    Step4: note down the location of the byte in the mp3 data frame, in this case its "1" that is 1st location
    

    如果 mp3 数据帧中的字节与数据位不匹配,则跳过该字节并继续下一个字节,继续执行相同操作直到隐藏整个文本数据。

    Step5:now take all the locations where the text data is present and add these as a byte to the data frame of mp3.
    

    这是我能够成功实施的一种解决方案。

    【讨论】:

      【解决方案3】:

      我也在做一个类似的项目...首先您必须了解 mp3 文件结构...我希望this link 可以帮助您了解 mp3 文件结构...一旦您清楚文件结构 自己编写代码很容易... 将 mp3 文件作为流获取并从中提取每一帧(一旦您了解了 mp3 文件结构,这应该真的很容易... 事实上,只花了几个几个小时让我编写代码来做到这一点)......以及关于你的算法的建议。一个 5 mb 的 mp3 文件大约有 15,000 帧...所以,如果您考虑每帧替换一个位,那么您可以存储的最大数据是 2KB...

      我尝试了同样的方法,但我更改了每帧的 BYTE...这在生成的文件中引入了一些噪音...关于如何减少噪音的任何建议...!?!?!??并希望我的回答对您有所帮助... :)

      【讨论】:

        猜你喜欢
        • 2011-06-19
        • 2022-11-24
        • 1970-01-01
        • 2018-01-03
        • 1970-01-01
        • 2019-09-15
        • 2019-02-23
        • 1970-01-01
        • 2011-12-07
        相关资源
        最近更新 更多