Search code examples
pythonrbinarympeg

Is there a simple way to print out the 1's and 0's from an mpg file?


Working on a art project and would like the "row vector of 1's and 0's" associated with an increment of sound to print to screen sequentially. Am I asking the question poorly? If so any ideas for what the correct problem statement would be? As for languages, I'm think python or R. But if there is another language that someone could suggest I'm somewhat open.

Example:

 $ 1.) 1010100000001111111010101110011101110101   (sound at time = 0)
 $ 2.) 1111100010101011010101011010110100010100   (sound at time = 1)
 $ 3.) 1110001010101010111110000010101011010111   (sound at time = 2)
 ....

Solution

  • I don't know exactly what you mean but you don't necessarily need to write any code to get a binary dump of a file. For instance, on linux you can do

    xxd -b filename

    to get a binary dump.