0

I'm trying steganography in Python and I'm using pydub for audio manipulation. What my code basically does is that it gets raw audio data from given file, modifies the least significant bit and exports raw data back to audio.

The exported file however has different raw data than I used to create it and I'd like to know what could have impact on that? Creating AudioSegment from raw data goes well, because at that point raw data is still okay, so export seems to be the problem.

Line for exporting goes like this:

song.export("path/to/file.mp3", format="mp3", bitrate="original_song_bitrate")

Thanks in advance for all the answers!

Kate
  • 23
  • 5
  • 1
    You're writing to a compressed format, MP3. It's going to be fully re-encoded back into MP3, thus reducing quality and of course also totally obliterating any such specific modifications to the wave data. You'll have to export as a WAV or a lossless format. – Random Davis Oct 14 '22 at 17:02

0 Answers0