Skip to content

Instantly share code, notes, and snippets.

@vi

vi/png2yuva

Created Sep 13, 2019
Embed
What would you like to do?
Convert RGBA pictures to bigger grayscale picure showing colour planes and back using FFMpeg
#!/bin/bash
S=$(identify "$1" | cut -d' ' -f 3-3)
IFS=x SS=($S)
W=${SS[0]}
H=${SS[1]}
ffmpeg -v warning -i "$1" -pix_fmt yuva444p -f rawvideo - | ffmpeg -v warning -pix_fmt gray -s ${W}x$((H*4)) -f rawvideo -i - -y "$2"
#!/bin/bash
S=$(identify "$1" | cut -d' ' -f 3-3)
IFS=x SS=($S)
W=${SS[0]}
H=${SS[1]}
ffmpeg -v warning -i "$1" -pix_fmt gray -f rawvideo - | ffmpeg -v warning -pix_fmt yuva444p -s ${W}x$((H/4)) -f rawvideo -i - -y "$2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.