File size: 781 Bytes
7c03782
 
6ac357b
 
98775da
7c03782
6ac357b
 
 
 
92fa81d
 
6ac357b
7c03782
6ac357b
98775da
6d85e95
 
92fa81d
98775da
7c03782
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

COUNT=0

echo "Starting final stream loop.."
while true; do
    if ((COUNT % 30 == 0)); then
        echo "--- video list_a.txt ---"
        cat list_a.txt
  
        #echo "--- audio_list_a.txt ---"
        #cat audio_list_a.txt
    fi
    sleep 1
    ((COUNT++))
    echo "Trying to create the final stream.."
    ffmpeg -y -nostdin -re -f concat -safe 0 -i "list_a.txt" -loglevel error -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv
    # ffmpeg -y -nostdin -re -f concat -safe 0 -i "list_a.txt" -i "audio_list_a.txt" -loglevel error -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv
    
    echo "Final stream got interrupted, will try again in 1 sec"
done