Skip to content
Create a gist now

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# remove key frame information from AVI (codec: Cinepak)
# example result
# a name of AVI file
filename = ARGV.shift
f = open(filename)
data =
main, index = data.split('idx1')
frames = main.split('00dc')
header = frames.shift
indexes = index.split('00dc')
frames.each_with_index do |frame, i|
if indexes[i][0] == 18
frames[i] = "\x00" * frame.size
print [([header] + frames).join('00dc'), index].join('idx1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.