-
Notifications
You must be signed in to change notification settings - Fork 4
/
ffmpeg_hls_and_dash.sh
executable file
·63 lines (59 loc) · 1.43 KB
/
ffmpeg_hls_and_dash.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# set port number
# Note: use 80 for Nginx and 8080 for s3-proxy-upload
port=80
vid=$(date '+%m-%d-%y-%T')
# generate test pattern
# ffmpeg \
# -re \
# -loglevel debug \
# -f lavfi -i "testsrc2=size=960x540:rate=30" \
# -pix_fmt yuv420p \
# -map 0:v \
# -c:v libx264 \
# -g 30 \
# -keyint_min 30 \
# -b:v 4000k \
# -sc_threshold 0 \
# -f dash \
# -use_timeline 0 \
# -index_correction 1 \
# -seg_duration 1 \
# -method PUT \
# -http_persistent 1 \
# -streaming 0 \
# -remove_at_exit 1 \
# -window_size 5 \
# -extra_window_size 10 \
# -hls_playlist 1 \
# -master_pl_name dongs.m3u8 \
# -utc_timing_url "https://time.akamai.com/?iso" \
# -adaptation_sets "id=0,streams=v" \
# http://0.0.0.0:${port}/${vid}/manifest.mpd
# Buck Bunny
ffmpeg \
-re \
-loglevel debug \
-i "BigBuckBunny.mp4" \
-pix_fmt yuv420p \
-map 0:v \
-c:v libx264 \
-g 30 \
-keyint_min 30 \
-b:v 4000k \
-sc_threshold 0 \
-f dash \
-use_timeline 0 \
-index_correction 1 \
-seg_duration 1 \
-method PUT \
-http_persistent 1 \
-streaming 0 \
-remove_at_exit 1 \
-window_size 5 \
-extra_window_size 10 \
-hls_playlist 1 \
-master_pl_name dongs.m3u8 \
-utc_timing_url "https://time.akamai.com/?iso" \
-adaptation_sets "id=0,streams=v" \
http://0.0.0.0:${port}/${vid}/manifest.mpd