Skip to content

Instantly share code, notes, and snippets.

View franzwarning's full-sized avatar

Raymond Kennedy franzwarning

View GitHub Profile
@franzwarning
franzwarning / ffmpeg.command
Created April 9, 2020 00:26
ffmpeg rtmp input to hls recording (with audio only rendition) w/ filter complex to square
ffmpeg -t 00:01:00 -i rtmp://localhost:1935/live/stream -y \
-filter_complex '[0:v]crop=if(gte(iw\,ih)\,ih\,iw):if(gte(iw\,ih)\,ih\,iw),split=4[out1][out2][out3][out4]' \
\
-map '[out1]' -map 0:a \
-map '[out2]' -map 0:a \
-map '[out3]' -map 0:a \
-map '[out4]' -map 0:a \
-map 0:a \
\
-s:v:0 1080x1080 -c:v:0 libx264 -b:v:0 4500k \
@franzwarning
franzwarning / MultipleDeviceScreengrabFastfile
Last active May 24, 2023 13:13
Fastlane capture_android_screenshots/screengrab android on multiple devices at the same time
lane :build_for_screenshots do
gradle(
task: 'assemble',
build_type: 'Screenshots'
)
gradle(
task: 'assemble',
build_type: 'ScreenshotsAndroidTest'
)
end
@franzwarning
franzwarning / !Java Python JS AES CBC Encryption and Decryption Examples.md
Last active September 23, 2022 05:41
Java, Python, and Javascript Encryption/Decryption with AES/CBC/PKCS5PADDING

Had some trouble in the past with equivalent encryption/decryption across these three languages so figured I'd share my findings.

Note: I'm aware the IV you choose shouldn't be static, but for this example it saved some string manipulation code. What I've seen people do is attach the IV to the front of the encrypted string (first 16 characters), then substring when you are decryption.

Would love to hear your thoughts / comments!