1

I want to append extra text with bunch of info that will my script make use of to media files (avi, mkv, mp3, flac, and possibly even zip/rar). I just want to make sure, whether these types of file could get "broken" somehow if I append something to it that wasn't originally there. When I tried it on one file, it still played in VLC player without any problems, but I just wanted to check with you guys, before I'd do some stupid thing, and possibly avoid any unforeseen consequences :) Thank you.

1
  • 1
    What are you trying to accomplish? Commented Sep 21, 2010 at 19:58

1 Answer 1

3

This is going to depend heavily on the format of the file, and the behavior of the program attempting to use the file. It's possible that VLC ignores "noise" at the end of an AVI file, or, since it's rendering the AVI's bytes as frames of video, that a few random bytes at the end of a file won't be noticeable by the person watching.

A player attempting to play an audio file, on the other hand, might blindly read the bytes you've added and produce static or noise at the end of the song...

Your best bet is to do some research on the file formats you're interested in using, but making arbitrary changes to bytes in a file is bound to lead to problems in some cases. :)

Not the answer you're looking for? Browse other questions tagged .