Reproduction steps:
# Create a file containing random data (shell expansion used for cross-platform compatibility)
dd if=/dev/urandom bs=$((1024 * 1024)) count=2 of=data.bin
# Encode with 8 bits per pixel
./bin2video -b 8 -s 8 -w 1920 -h 1080 -e -i data.bin -o data.bin.mp4
# Decode
./bin2video -d -i data.bin.mp4 -o data-out.bin
data-out.bin will be exactly 1 byte larger than data.bin and the extra byte will be a null byte.