Created
March 16, 2016 15:19
-
-
Save Pmmlabs/8e210e93a32fc12a8728 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 1 ] | |
then | |
echo "Usage: $0 movie.mp4" | |
exit | |
fi | |
ffmpeg -loglevel quiet -i $1 -vcodec copy -vbsf h264_mp4toannexb -an -t 1 out.h264 | |
echo $(h264_analyze out.h264 2>&1 | grep -B 6 SPS | head -n1 | cut -c 4- | xxd -r -p | base64)","$(h264_analyze out.h264 2>&1 | grep -B 5 PPS | head -n1 | cut -c 4- | xxd -r -p | base64) | |
rm -f out.h264 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment