summaryrefslogtreecommitdiffstats
path: root/roles/stream/tasks/test.yml
blob: 6968b69780951f0d539deae501dcb5556dc95edd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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'