diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-10-29 07:32:19 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-10-29 07:32:19 -0400 |
commit | bff9ceae7f42723f939f620f9ef9faebca966742 (patch) | |
tree | 1707471fe7f300e45b0a08abfe600711f50da7fb | |
parent | 65bd2a02c46676ac547ccbc8b7cfda53b59ca36e (diff) | |
download | emacsconf-ansible-bff9ceae7f42723f939f620f9ef9faebca966742.tar.xz emacsconf-ansible-bff9ceae7f42723f939f620f9ef9faebca966742.zip |
stream testing
Diffstat (limited to '')
-rw-r--r-- | README.org | 18 | ||||
-rw-r--r-- | roles/stream/tasks/test.yml | 16 |
2 files changed, 28 insertions, 6 deletions
@@ -22,7 +22,7 @@ Goal: - [X] Add SSH key - [X] Add as remote - [X] Push to the wiki -- [ ] Have the changes show up automatically +- [X] Have the changes show up automatically - [X] Have ansible copy the SSH key file:/docker:emacsconf-front:/home/ikiwiki/emacsconf.setup @@ -144,20 +144,26 @@ ansible-playbook -i inventory.yml prod-playbook.yml --tags proxy --extra-vars='{ /ssh:media|sudo:upload@media:~upload /ssh:media|sudo::/etc/nginx/sites-available * Stream - +** Prod Setting up icecast: ansible-playbook -i inventory.yml prod-playbook.yml --tags stream -Test with a file: -ansible-playbook -i inventory.yml prod-playbook.yml --tags test-stream-file -e icecast_test=~/code/emacsconf-2021-emacs-news-highlights/full.webm -e icecast_test_track=dev + +** Testing + +Runs the ffmpeg command on res + +ansible-playbook -i inventory.yml prod-playbook.yml --tags test -e icecast_test_file=/home/orga/test.webm -e icecast_test=file -e icecast_test_track=dev Play the stream with MPV: -ansible-playbook -i inventory.yml prod-playbook.yml --tags test-stream-mpv -e icecast_test_track=dev -e test=mpv +ansible-playbook -i inventory.yml prod-playbook.yml --tags test -e icecast_test_track=dev -e icecast_test=mpv + +Use a test pattern (don't know if this works) -ansible-playbook -i inventory.yml prod-playbook.yml --tags test-stream-pattern -e icecast_test_track=dev -e test=pattern +ansible-playbook -i inventory.yml prod-playbook.yml --tags test -e icecast_test_track=dev -e icecast_test=pattern * Captioning Set up whisper diff --git a/roles/stream/tasks/test.yml b/roles/stream/tasks/test.yml new file mode 100644 index 0000000..6968b69 --- /dev/null +++ b/roles/stream/tasks/test.yml @@ -0,0 +1,16 @@ +- name: Test by streaming from a file + tags: test-stream-file + block: + - debug: + msg: ffmpeg -loglevel 32 -re -i {{ icecast_test_file }} -loop 1 -f webm -r 30 -ac 2 -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm -c:v libvpx -b:v 1M -crf 30 -g 125 -threads 4 -deadline realtime icecast://{{ icecast_emacsconf_user }}:{{ icecast_emacsconf_password }}@{{ icecast_hostname }}:{{ icecast_port }}/emacsconf/{{ icecast_test_track|d("gen") }}.webm + - name: Run ffmpeg on res + shell: ffmpeg -re -loglevel 32 -i {{ icecast_test_file }} -loop 1 -f webm -r 30 -ac 2 -cluster_size_limit 2M -cluster_time_limit 5100 -content_type video/webm -c:v libvpx -b:v 1M -crf 30 -g 125 -threads 4 -deadline realtime icecast://{{ icecast_emacsconf_user }}:{{ icecast_emacsconf_password }}@{{ icecast_hostname }}:{{ icecast_port }}/emacsconf/{{ icecast_test_track|d("gen") }}.webm + when: icecast_test is defined and icecast_test == 'file' +- name: Test by displaying the stream in mpv + tags: test-stream-mpv, never + local_action: shell mpv http://{{ icecast_hostname }}:{{ icecast_port }}/{{ emacsconf_id }}/{{ icecast_test_track|d("gen") }}.webm + when: icecast_test is defined and icecast_test == 'mpv' +- name: Test by streaming a test pattern + tags: test-stream-pattern + local_action: shell ffmpeg -loglevel 32 -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 -f webm icecast://{{ icecast_emacsconf_user }}:{{ icecast_emacsconf_password }}@{{ icecast_hostname }}:{{ icecast_port }}/emacsconf/{{ icecast_test_track|d("gen") }}.webm + when: icecast_test is defined and icecast_test == 'pattern' |