summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--roles/stream/tasks/test.yml16
1 files changed, 16 insertions, 0 deletions
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'