Spaces:
Build error
Build error
Commit
·
c9f8f7f
1
Parent(s):
f071343
up
Browse files- .gitignore +9 -0
- database.json +1 -1
- scripts/audio1.sh +4 -7
- scripts/audio2.sh +4 -7
- scripts/init.sh +4 -23
- scripts/stream1.sh +1 -17
- scripts/stream2.sh +1 -17
- scripts/video1.sh +2 -11
- scripts/video2.sh +4 -13
.gitignore
CHANGED
@@ -8,3 +8,12 @@ models/
|
|
8 |
sandbox/
|
9 |
audio.pipe
|
10 |
video.pipe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
sandbox/
|
9 |
audio.pipe
|
10 |
video.pipe
|
11 |
+
channel_1_audio_list_a.txt
|
12 |
+
channel_1_audio_list_b.txt
|
13 |
+
channel_1_video_list_a.txt
|
14 |
+
channel_1_video_list_b.txt
|
15 |
+
|
16 |
+
channel_2_audio_list_a.txt
|
17 |
+
channel_2_audio_list_b.txt
|
18 |
+
channel_2_video_list_a.txt
|
19 |
+
channel_2_video_list_b.txt
|
database.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"version": 1,
|
3 |
-
"startAtShotId": "
|
4 |
"sequences": [
|
5 |
{
|
6 |
"sequenceId": "3b7fb664-f50a-4e2d-b63b-e1fedb22e501",
|
|
|
1 |
{
|
2 |
"version": 1,
|
3 |
+
"startAtShotId": "04f48cad-9561-47ce-b975-f692ca10db27",
|
4 |
"sequences": [
|
5 |
{
|
6 |
"sequenceId": "3b7fb664-f50a-4e2d-b63b-e1fedb22e501",
|
scripts/audio1.sh
CHANGED
@@ -4,24 +4,21 @@ echo "Starting the audio collection stream for channel 1.."
|
|
4 |
current_count=0
|
5 |
|
6 |
while true; do
|
7 |
-
new_count=$(ls $WEBTV_AUDIO_STORAGE_PATH_CHANNEL_1*.
|
8 |
|
9 |
if [ $new_count -ne $current_count ]; then
|
10 |
echo "there are $new_count audio files for channel 1"
|
11 |
|
12 |
echo "Updating audio playlists for channel 1..."
|
13 |
current_count=$new_count
|
14 |
-
files=($WEBTV_AUDIO_STORAGE_PATH_CHANNEL_1*.
|
15 |
|
16 |
# Re-create the audio playlists
|
17 |
echo "ffconcat version 1.0" > channel_1_audio_list_a.txt
|
18 |
echo "ffconcat version 1.0" > channel_1_audio_list_b.txt
|
19 |
for (( i=0; i<${#files[@]}; i++ )); do
|
20 |
-
|
21 |
-
|
22 |
-
else
|
23 |
-
echo "file '${files[$i]}'" >> channel_1_audio_list_b.txt
|
24 |
-
fi
|
25 |
done
|
26 |
echo "file 'channel_1_audio_list_b.txt'" >> channel_1_audio_list_a.txt
|
27 |
echo "file 'channel_1_audio_list_a.txt'" >> channel_1_audio_list_b.txt
|
|
|
4 |
current_count=0
|
5 |
|
6 |
while true; do
|
7 |
+
new_count=$(ls $WEBTV_AUDIO_STORAGE_PATH_CHANNEL_1*.m4a 2> /dev/null | wc -l)
|
8 |
|
9 |
if [ $new_count -ne $current_count ]; then
|
10 |
echo "there are $new_count audio files for channel 1"
|
11 |
|
12 |
echo "Updating audio playlists for channel 1..."
|
13 |
current_count=$new_count
|
14 |
+
files=($WEBTV_AUDIO_STORAGE_PATH_CHANNEL_1*.m4a)
|
15 |
|
16 |
# Re-create the audio playlists
|
17 |
echo "ffconcat version 1.0" > channel_1_audio_list_a.txt
|
18 |
echo "ffconcat version 1.0" > channel_1_audio_list_b.txt
|
19 |
for (( i=0; i<${#files[@]}; i++ )); do
|
20 |
+
echo "file '${files[$i]}'" >> channel_1_audio_list_a.txt
|
21 |
+
echo "file '${files[$i]}'" >> channel_1_audio_list_b.txt
|
|
|
|
|
|
|
22 |
done
|
23 |
echo "file 'channel_1_audio_list_b.txt'" >> channel_1_audio_list_a.txt
|
24 |
echo "file 'channel_1_audio_list_a.txt'" >> channel_1_audio_list_b.txt
|
scripts/audio2.sh
CHANGED
@@ -4,24 +4,21 @@ echo "Starting the audio collection stream for channel 2.."
|
|
4 |
current_count=0
|
5 |
|
6 |
while true; do
|
7 |
-
new_count=$(ls $WEBTV_AUDIO_STORAGE_PATH_CHANNEL_2*.
|
8 |
|
9 |
if [ $new_count -ne $current_count ]; then
|
10 |
echo "there are $new_count audio files for channel 2"
|
11 |
|
12 |
echo "Updating audio playlists for channel 2..."
|
13 |
current_count=$new_count
|
14 |
-
files=($WEBTV_AUDIO_STORAGE_PATH_CHANNEL_2*.
|
15 |
|
16 |
# Re-create the audio playlists
|
17 |
echo "ffconcat version 1.0" > channel_2_audio_list_a.txt
|
18 |
echo "ffconcat version 1.0" > channel_2_audio_list_b.txt
|
19 |
for (( i=0; i<${#files[@]}; i++ )); do
|
20 |
-
|
21 |
-
|
22 |
-
else
|
23 |
-
echo "file '${files[$i]}'" >> channel_2_audio_list_b.txt
|
24 |
-
fi
|
25 |
done
|
26 |
echo "file 'channel_2_audio_list_b.txt'" >> channel_2_audio_list_a.txt
|
27 |
echo "file 'channel_2_audio_list_a.txt'" >> channel_2_audio_list_b.txt
|
|
|
4 |
current_count=0
|
5 |
|
6 |
while true; do
|
7 |
+
new_count=$(ls $WEBTV_AUDIO_STORAGE_PATH_CHANNEL_2*.m4a 2> /dev/null | wc -l)
|
8 |
|
9 |
if [ $new_count -ne $current_count ]; then
|
10 |
echo "there are $new_count audio files for channel 2"
|
11 |
|
12 |
echo "Updating audio playlists for channel 2..."
|
13 |
current_count=$new_count
|
14 |
+
files=($WEBTV_AUDIO_STORAGE_PATH_CHANNEL_2*.m4a)
|
15 |
|
16 |
# Re-create the audio playlists
|
17 |
echo "ffconcat version 1.0" > channel_2_audio_list_a.txt
|
18 |
echo "ffconcat version 1.0" > channel_2_audio_list_b.txt
|
19 |
for (( i=0; i<${#files[@]}; i++ )); do
|
20 |
+
echo "file '${files[$i]}'" >> channel_2_audio_list_a.txt
|
21 |
+
echo "file '${files[$i]}'" >> channel_2_audio_list_b.txt
|
|
|
|
|
|
|
22 |
done
|
23 |
echo "file 'channel_2_audio_list_b.txt'" >> channel_2_audio_list_a.txt
|
24 |
echo "file 'channel_2_audio_list_a.txt'" >> channel_2_audio_list_b.txt
|
scripts/init.sh
CHANGED
@@ -8,15 +8,8 @@ mkdir -p $WEBTV_AUDIO_STORAGE_PATH_CHANNEL_1
|
|
8 |
bash downloadmusic.sh
|
9 |
|
10 |
echo "creating the playlists for channel 1.."
|
11 |
-
echo "ffconcat version 1.0" >
|
12 |
-
echo "ffconcat version 1.0" >
|
13 |
-
echo "ffconcat version 1.0" > channel_1_audio_list_a.txt
|
14 |
-
echo "ffconcat version 1.0" > channel_1_audio_list_b.txt
|
15 |
-
|
16 |
-
echo "file 'channel_1_video_list_b.txt'" >> channel_1_video_list_a.txt
|
17 |
-
echo "file 'channel_1_video_list_a.txt'" >> channel_1_video_list_b.txt
|
18 |
-
echo "file 'channel_1_audio_list_b.txt'" >> channel_1_audio_list_a.txt
|
19 |
-
echo "file 'channel_1_audio_list_a.txt'" >> channel_1_audio_list_b.txt
|
20 |
|
21 |
# ------------- CHANNEL 2 --------------
|
22 |
echo "creating the storage folders for channel 2.."
|
@@ -24,17 +17,5 @@ mkdir -p $WEBTV_VIDEO_STORAGE_PATH_CHANNEL_2
|
|
24 |
mkdir -p $WEBTV_AUDIO_STORAGE_PATH_CHANNEL_2
|
25 |
|
26 |
echo "creating the playlists for channel 2.."
|
27 |
-
echo "ffconcat version 1.0" >
|
28 |
-
echo "ffconcat version 1.0" >
|
29 |
-
echo "ffconcat version 1.0" > channel_2_audio_list_a.txt
|
30 |
-
echo "ffconcat version 1.0" > channel_2_audio_list_b.txt
|
31 |
-
|
32 |
-
echo "file 'channel_2_video_list_b.txt'" >> channel_2_video_list_a.txt
|
33 |
-
echo "file 'channel_2_video_list_a.txt'" >> channel_2_video_list_b.txt
|
34 |
-
echo "file 'channel_2_audio_list_b.txt'" >> channel_2_audio_list_a.txt
|
35 |
-
echo "file 'channel_2_audio_list_a.txt'" >> channel_2_audio_list_b.txt
|
36 |
-
|
37 |
-
# maybe we will try that again in the future
|
38 |
-
# echo "create the named pipes.."
|
39 |
-
# mkfifo video.pipe
|
40 |
-
# mkfifo audio.pipe
|
|
|
8 |
bash downloadmusic.sh
|
9 |
|
10 |
echo "creating the playlists for channel 1.."
|
11 |
+
echo "ffconcat version 1.0" > channel_1_video.txt
|
12 |
+
echo "ffconcat version 1.0" > channel_1_audio.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
# ------------- CHANNEL 2 --------------
|
15 |
echo "creating the storage folders for channel 2.."
|
|
|
17 |
mkdir -p $WEBTV_AUDIO_STORAGE_PATH_CHANNEL_2
|
18 |
|
19 |
echo "creating the playlists for channel 2.."
|
20 |
+
echo "ffconcat version 1.0" > channel_2_video.txt
|
21 |
+
echo "ffconcat version 1.0" > channel_2_video.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
scripts/stream1.sh
CHANGED
@@ -4,21 +4,5 @@ COUNT=0
|
|
4 |
|
5 |
echo "Starting FFMPEG live stream for channel 1"
|
6 |
while true; do
|
7 |
-
|
8 |
-
# echo "--- video channel_1_video_list_a.txt ---"
|
9 |
-
# cat channel_1_video_list_a.txt
|
10 |
-
|
11 |
-
# #echo "--- channel_1_audio_list_a.txt ---"
|
12 |
-
# #cat channel_1_audio_list_a.txt
|
13 |
-
# fi
|
14 |
-
|
15 |
-
#sleep 1
|
16 |
-
|
17 |
-
# ((COUNT++))
|
18 |
-
|
19 |
-
# echo "Trying to create the final stream fo channel 1.."
|
20 |
-
ffmpeg -y -nostdin -re -f concat -safe 0 -i "channel_1_video_list_a.txt" -loglevel error -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv
|
21 |
-
# ffmpeg -y -nostdin -re -f concat -safe 0 -i "channel_1_video_list_a.txt" -i "channel_1_audio_list_a.txt" -loglevel error -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv
|
22 |
-
|
23 |
-
# echo "Live stream for channel 1 got interrupted, will try again in 1 sec"
|
24 |
done
|
|
|
4 |
|
5 |
echo "Starting FFMPEG live stream for channel 1"
|
6 |
while true; do
|
7 |
+
ffmpeg -y -nostdin -re -f concat -safe 0 -i channel_1_video.txt -loglevel error -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
done
|
scripts/stream2.sh
CHANGED
@@ -4,21 +4,5 @@ COUNT=0
|
|
4 |
|
5 |
echo "Starting FFMPEG live stream for channel 2"
|
6 |
while true; do
|
7 |
-
|
8 |
-
# echo "--- video channel_2_video_list_a.txt ---"
|
9 |
-
# cat channel_2_video_list_a.txt
|
10 |
-
|
11 |
-
# #echo "--- channel_2_audio_list_a.txt ---"
|
12 |
-
# #cat channel_2_audio_list_a.txt
|
13 |
-
# fi
|
14 |
-
|
15 |
-
#sleep 1
|
16 |
-
|
17 |
-
# ((COUNT++))
|
18 |
-
|
19 |
-
# echo "Trying to create the final stream for channel 2.."
|
20 |
-
ffmpeg -y -nostdin -re -f concat -safe 0 -i "channel_2_video_list_a.txt" -loglevel error -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv2
|
21 |
-
# ffmpeg -y -nostdin -re -f concat -safe 0 -i "channel_2_video_list_a.txt" -i "channel_2_audio_list_a.txt" -loglevel error -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv2
|
22 |
-
|
23 |
-
# echo "Live stream for channel 2 got interrupted, will try again in 1 sec"
|
24 |
done
|
|
|
4 |
|
5 |
echo "Starting FFMPEG live stream for channel 2"
|
6 |
while true; do
|
7 |
+
ffmpeg -y -nostdin -re -f concat -safe 0 -i channel_2_video.txt -loglevel error -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
done
|
scripts/video1.sh
CHANGED
@@ -14,19 +14,10 @@ while true; do
|
|
14 |
current_count=$new_count
|
15 |
files=($WEBTV_VIDEO_STORAGE_PATH_CHANNEL_1*.mp4)
|
16 |
|
17 |
-
|
18 |
-
echo "ffconcat version 1.0" > channel_1_video_list_a.txt
|
19 |
-
echo "ffconcat version 1.0" > channel_1_video_list_b.txt
|
20 |
for (( i=0; i<${#files[@]}; i++ )); do
|
21 |
-
|
22 |
-
if (( i%2 == 0 )); then
|
23 |
-
echo "file '${files[$i]}'" >> channel_1_video_list_a.txt
|
24 |
-
else
|
25 |
-
echo "file '${files[$i]}'" >> channel_1_video_list_b.txt
|
26 |
-
fi
|
27 |
done
|
28 |
-
echo "file './channel_1_video_list_b.txt'" >> channel_1_video_list_a.txt
|
29 |
-
echo "file './channel_1_video_list_a.txt'" >> channel_1_video_list_b.txt
|
30 |
fi
|
31 |
|
32 |
sleep 1
|
|
|
14 |
current_count=$new_count
|
15 |
files=($WEBTV_VIDEO_STORAGE_PATH_CHANNEL_1*.mp4)
|
16 |
|
17 |
+
echo "ffconcat version 1.0" > channel_1_video.txt
|
|
|
|
|
18 |
for (( i=0; i<${#files[@]}; i++ )); do
|
19 |
+
echo "file '${files[$i]}'" >> channel_1_video.txt
|
|
|
|
|
|
|
|
|
|
|
20 |
done
|
|
|
|
|
21 |
fi
|
22 |
|
23 |
sleep 1
|
scripts/video2.sh
CHANGED
@@ -10,23 +10,14 @@ while true; do
|
|
10 |
if [ $new_count -ne $current_count ]; then
|
11 |
echo "there are $new_count videos files for channel 2"
|
12 |
|
13 |
-
echo "Updating
|
14 |
current_count=$new_count
|
15 |
files=($WEBTV_VIDEO_STORAGE_PATH_CHANNEL_2*.mp4)
|
16 |
-
|
17 |
-
|
18 |
-
echo "ffconcat version 1.0" > channel_2_video_list_a.txt
|
19 |
-
echo "ffconcat version 1.0" > channel_2_video_list_b.txt
|
20 |
for (( i=0; i<${#files[@]}; i++ )); do
|
21 |
-
|
22 |
-
if (( i%2 == 0 )); then
|
23 |
-
echo "file '${files[$i]}'" >> channel_2_video_list_a.txt
|
24 |
-
else
|
25 |
-
echo "file '${files[$i]}'" >> channel_2_video_list_b.txt
|
26 |
-
fi
|
27 |
done
|
28 |
-
echo "file './channel_2_video_list_b.txt'" >> channel_2_video_list_a.txt
|
29 |
-
echo "file './channel_2_video_list_a.txt'" >> channel_2_video_list_b.txt
|
30 |
fi
|
31 |
|
32 |
sleep 1
|
|
|
10 |
if [ $new_count -ne $current_count ]; then
|
11 |
echo "there are $new_count videos files for channel 2"
|
12 |
|
13 |
+
echo "Updating playliss for channel 2.."
|
14 |
current_count=$new_count
|
15 |
files=($WEBTV_VIDEO_STORAGE_PATH_CHANNEL_2*.mp4)
|
16 |
+
|
17 |
+
echo "ffconcat version 1.0" > channel_2_video.txt
|
|
|
|
|
18 |
for (( i=0; i<${#files[@]}; i++ )); do
|
19 |
+
echo "file '${files[$i]}'" >> channel_2_video.txt
|
|
|
|
|
|
|
|
|
|
|
20 |
done
|
|
|
|
|
21 |
fi
|
22 |
|
23 |
sleep 1
|