Skip to content

Commit 5dbd168

Browse files
committed
Improve videos for streaming and add a script to use ffmpeg
1 parent ade07ee commit 5dbd168

13 files changed

+20
-1
lines changed
-609 KB
Binary file not shown.
242 KB
Binary file not shown.
390 KB
Binary file not shown.
-2.51 MB
Binary file not shown.
587 KB
Binary file not shown.
242 KB
Binary file not shown.
-5.53 MB
Binary file not shown.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
# This script allows to re-encode a video for proper streaming.
4+
INPUT_DIR="./" # or your absolute path
5+
OUTPUT_SUFFIX="-safari"
6+
EXT="mp4"
7+
8+
for file in "$INPUT_DIR"/*.$EXT; do
9+
filename=$(basename "$file" .${EXT})
10+
output="${INPUT_DIR}/${filename}${OUTPUT_SUFFIX}.${EXT}"
11+
12+
echo "Re-encoding $file$output"
13+
14+
ffmpeg -i "$file" \
15+
-c:v libx264 -profile:v main -pix_fmt yuv420p \
16+
-movflags +faststart \
17+
-c:a copy \
18+
"$output"
19+
done
179 KB
Binary file not shown.
145 KB
Binary file not shown.

0 commit comments

Comments
 (0)