Last active
August 15, 2020 16:32
-
-
Save adminy/a89af9538677db57f556d15894eb1972 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
#Ref: https://stackoverflow.com/questions/169511/how-do-i-iterate-over-a-range-of-numbers-defined-by-variables-in-bash | |
#Ref: https://stackoverflow.com/questions/30384634/how-to-split-a-video-into-individual-encoded-frames | |
#Ref: https://superuser.com/questions/678897/extract-hevc-bitstream-with-ffmpeg | |
input="newvideo8bit.mp4" | |
outDir="out3" | |
output="magic.h265" | |
rm -rf $outDir | |
mkdir $outDir | |
ffmpeg -i $input -f image2 -vcodec copy -bsf hevc_mp4toannexb $outDir/%d.h265 | |
END=249 | |
rm -rf $output | |
touch $output | |
for ((i=1;i<=END;i++)); do | |
cat $outDir/$i.h265 >> $output | |
done | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment