-1

I'm trying to “corrupt” videos in my code through a byte array and I need to find the audio portions of the mp4 file.

I did some research last night on this and I found that the mdat separated the headers from the video/audio part (or I think). When I write over some data after that I get some cool results. I just need a general location to start writing.

ocæon
  • 204
  • 1
  • 12
  • This probably has what you want: https://stackoverflow.com/questions/29565068/mp4-file-format-specification – Dan Donoghue Apr 01 '19 at 04:09
  • sorry to see your question hasn't recieved more helpful replies, and i too know that downvotes can feel unwelcoming. this site works on making complete questions and answers accessable to all, so i'm sure all it would take is to expand on your question, and you should find a much better reception. good luck and thankyou for joining stackoverflow. – ocæon Apr 02 '19 at 14:22
  • Possible duplicate of [MP4 File Format Specification](https://stackoverflow.com/questions/29565068/mp4-file-format-specification) – rene Apr 02 '19 at 19:47
  • 1
    related: https://stackoverflow.com/questions/2504650/channel-audio-from-mp4 and https://stackoverflow.com/questions/5063358/overwriting-mp4-wmv-videos-audio-content-with-a-new-audio-in-c-sharp – rene Apr 02 '19 at 19:54

1 Answers1

1

mp4 files are multiplexed, meaning everything in them is subject to a lot of change. while the stream is being read (from file or remotely) the audio could be in a variety of formats, and or be available in multiple languages. worse still there is nothing to say if the parts will be in order or if the next part will even have audio.

perhaps it's best to avoid corrupting the boundaries and headers of each part, if you can. you could mitigate a lot of headache by using a precompiled mp4 library to transcode to another format where the audio and video are combined in a direct way, although corruption artifacts would behave very differently then.

please update your question to provide more of your findings, it sounds interesting!

ocæon
  • 204
  • 1
  • 12
  • Would it change anything if I were trying to “corrupt” the video? I did some research last night on this and I found that the mdat separated the headers from the video/audio part (or I think). When I write over some data after that I get some cool results. I just need a general location to start writing. – unprotested Apr 01 '19 at 11:25