adding audio to script
This commit is contained in:
parent
45015c1b32
commit
60ca5ed8fe
1 changed files with 14 additions and 13 deletions
|
@ -1,17 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
ffmpeg -i {{ stream_input_url | replace("ingest.chaoswest.tv:1935","ingest.chaoswest.tv:1936") }} \
|
ffmpeg -i {{ stream_input_url | replace("ingest.chaoswest.tv:1935","ingest.chaoswest.tv:1936") }} \
|
||||||
-nostats \
|
-nostats \
|
||||||
-loglevel repeat+level+info \
|
-loglevel repeat+level+info \
|
||||||
-filter_complex \
|
-filter_complex \
|
||||||
"[0:v:0]scale=640x360[orig_scaled];\
|
"[0:v:0]scale=640x360[orig_scaled];\
|
||||||
[full_mix]framerate=fps=25[out]; \
|
[0:a:0]aformat=channel_layouts=stereo:sample_rates=44100:sample_fmts=fltp[0:a:0];\
|
||||||
[orig_scaled]drawtext=fontfile=/srv/www/{{ inventory_hostname }}/opensans.ttf:text={{ stream_name }}:fontcolor=white:fontsize=100:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/1.5[preview_overlay];\
|
[orig_scaled]drawtext=fontfile=/srv/www/{{ inventory_hostname }}/opensans.ttf:text={{ stream_name }}:fontcolor=white:fontsize=100:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/1.5[preview_overlay];\
|
||||||
[0:a:0]ebur128=video=1:size=640x480:meter=9:target=-16:gauge=shortterm[native][native_a]; [native_a]anullsink; \
|
[0:a:0]ebur128=video=1:size=640x480:meter=9:target=-16:gauge=shortterm[native][native_a]; [native_a]anullsink; \
|
||||||
[native]drawtext=fontfile=/srv/www/{{ inventory_hostname }}/opensans.ttf:text=audio:fontcolor=white:fontsize=60:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/1.5[native_overlay];\
|
[native]drawtext=fontfile=/srv/www/{{ inventory_hostname }}/opensans.ttf:text=native:fontcolor=white:fontsize=60:box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/1.5[native_overlay];\
|
||||||
[0:a:0]showvolume=r=50:w=640:h=60:b=0:ds=log:dm=1.0[native_vu]; \
|
[0:a:0]showvolume=r=50:w=640:h=60:b=0:ds=log:dm=1.0[native_vu]; \
|
||||||
[preview_overlay][native_vu][native_overlay]vstack=inputs=3[full_mix] " \
|
[preview_overlay][native_vu][native_overlay]vstack=inputs=3[full_mix]" \
|
||||||
-map "[out]" \
|
-map "[full_mix]" -map 0:a:0 \
|
||||||
-g 30 \
|
-g 30 \
|
||||||
-c:v libx264 -bufsize 16M -maxrate 8M -crf 24 -pix_fmt yuv420p -preset ultrafast \
|
-c:v libx264 -bufsize 16M -maxrate 8M -crf 24 -pix_fmt yuv420p -preset ultrafast \
|
||||||
|
-c:a aac -strict -2 -b:a 192k \
|
||||||
-f hls -hls_time 4 -hls_playlist_type event /srv/www/{{ inventory_hostname }}/stream.m3u8
|
-f hls -hls_time 4 -hls_playlist_type event /srv/www/{{ inventory_hostname }}/stream.m3u8
|
||||||
|
|
Loading…
Reference in a new issue