Compare commits
No commits in common. "66e3396bf287e9ff1b9cc16f92568e7352edfff2" and "3a2bab2efe920073abd03e8f1765dff0e685d3ca" have entirely different histories.
66e3396bf2
...
3a2bab2efe
|
@ -21,10 +21,8 @@ fi
|
||||||
|
|
||||||
ffmpeg -i "${VIDEO}" \
|
ffmpeg -i "${VIDEO}" \
|
||||||
-i "${AUDIO}" \
|
-i "${AUDIO}" \
|
||||||
|
-c copy \
|
||||||
-map 0:v:0 \
|
-map 0:v:0 \
|
||||||
-map 1:a:0 \
|
-map 1:a:0 \
|
||||||
-c:a aac \
|
|
||||||
-c:v libx264 \
|
|
||||||
-crf 22 \
|
|
||||||
-shortest \
|
-shortest \
|
||||||
"${OUTPUT}"
|
"${OUTPUT}"
|
|
@ -45,7 +45,7 @@ FRAMES=frames/*.png
|
||||||
for frame in ${FRAMES}; do
|
for frame in ${FRAMES}; do
|
||||||
echo "Processing $frame with primitive..."
|
echo "Processing $frame with primitive..."
|
||||||
# Run the "primitive" application on every frame
|
# Run the "primitive" application on every frame
|
||||||
primitive -i "${frame}" -o "${frame}" -n ${NUMBER} -m ${MODE}
|
primitive -i "${frame}" -o "${frame}" -n 200 -m 4
|
||||||
done
|
done
|
||||||
|
|
||||||
ffmpeg -f image2 -i frames/frame-%06d.png -c:v prores_ks -profile:v 3 "${OUTPUT}"
|
ffmpeg -f image2 -i frames/frame-%06d.png -c:v prores_ks -profile:v 3 "${OUTPUT}"
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
#!/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