Compare commits
4 Commits
3a2bab2efe
...
66e3396bf2
Author | SHA1 | Date |
---|---|---|
Matt McWilliams | 66e3396bf2 | |
Matt McWilliams | 830300df3c | |
Matt McWilliams | fa11720742 | |
Matt McWilliams | 06a225b157 |
|
@ -21,8 +21,10 @@ fi
|
|||
|
||||
ffmpeg -i "${VIDEO}" \
|
||||
-i "${AUDIO}" \
|
||||
-c copy \
|
||||
-map 0:v:0 \
|
||||
-map 1:a:0 \
|
||||
-c:a aac \
|
||||
-c:v libx264 \
|
||||
-crf 22 \
|
||||
-shortest \
|
||||
"${OUTPUT}"
|
|
@ -45,7 +45,7 @@ FRAMES=frames/*.png
|
|||
for frame in ${FRAMES}; do
|
||||
echo "Processing $frame with primitive..."
|
||||
# Run the "primitive" application on every frame
|
||||
primitive -i "${frame}" -o "${frame}" -n 200 -m 4
|
||||
primitive -i "${frame}" -o "${frame}" -n ${NUMBER} -m ${MODE}
|
||||
done
|
||||
|
||||
ffmpeg -f image2 -i frames/frame-%06d.png -c:v prores_ks -profile:v 3 "${OUTPUT}"
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
#####################################################
|
||||
#
|
||||
# This script will stream a video to an RTMP ingestion
|
||||
# server that accepts H264 encoding. Can be used for
|
||||
# live streaming services.
|
||||
#
|
||||
# Usage: bash stream/rtmp.sh <input video> <rtmp url>
|
||||
#
|
||||
#####################################################
|
||||
|
||||
INPUT="${1}"
|
||||
RTMP="${2}"
|
||||
|
||||
# Check if input and output arguments are supplied
|
||||
if [ "${INPUT}" == "" ] || [ "${OUTPUT}" == "" ]; then
|
||||
echo "Please provide input and output files as your first and second arguments"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if RTMP url is provided
|
||||
if [[ "${RTMP}" == "" ]]; then
|
||||
echo "Please provide an RTMP url"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
ffmpeg -re -i "${INPUT}"\
|
||||
-c:v libx264 \
|
||||
-preset veryfast \
|
||||
-maxrate 2048k \
|
||||
-bufsize 4096k \
|
||||
-pix_fmt yuv420p \
|
||||
-g 60 \
|
||||
-c:a aac \
|
||||
-b:a 190k \
|
||||
-ac 2 \
|
||||
-ar 44100 \
|
||||
-f flv \
|
||||
"${RTMP}"
|
Loading…
Reference in New Issue