Skip to content

Instantly share code, notes, and snippets.

@rdkls
Created January 20, 2014 04:26
Show Gist options
  • Save rdkls/8514848 to your computer and use it in GitHub Desktop.
Save rdkls/8514848 to your computer and use it in GitHub Desktop.
key_as_hex=$(cat ../static.key | hexdump -e '16/1 "%02x"')
for i in {0..5}; do
fn_in=../../martha/fileSequence${i}.ts
fn_flip=fileSequence.flip.${i}.ts
fn_enc=fileSequence.enc.${i}.ts
ffmpeg -y -i $fn_in -filter vflip $fn_flip
init_vector=`printf '%032x' $i`
openssl aes-128-cbc -e -in $fn_flip -out fileSequence.enc.$(($i)).ts -p -nosalt -iv $init_vector -K $key_as_hex
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment