jbilcke-hf HF staff commited on
Commit
fab3624
·
1 Parent(s): 11512fd

pausing the data collection loop

Browse files
Files changed (4) hide show
  1. scripts/audio.sh +13 -13
  2. scripts/stream.sh +1 -2
  3. scripts/video.sh +1 -1
  4. src/index.mts +2 -0
scripts/audio.sh CHANGED
@@ -1,15 +1,15 @@
1
  #!/bin/bash
2
 
3
- echo "starting the audio collection stream.."
4
- while true; do
5
- num_files=$(ls $WEBTV_AUDIO_STORAGE_PATH*.mp3 2> /dev/null | wc -l)
6
- if [ $num_files -eq 0 ]
7
- then
8
- sleep 1
9
- fi
10
- for f in $WEBTV_AUDIO_STORAGE_PATH*.mp3
11
- do
12
- echo "playing $f"
13
- ffmpeg -fflags +discardcorrupt -re -i "$f" -vn -acodec copy -f mp3 -y audio.pipe 2>/dev/null
14
- done
15
- done
 
1
  #!/bin/bash
2
 
3
+ # echo "starting the audio collection stream.."
4
+ # while true; do
5
+ # num_files=$(ls $WEBTV_AUDIO_STORAGE_PATH*.mp3 2> /dev/null | wc -l)
6
+ # if [ $num_files -eq 0 ]
7
+ # then
8
+ # sleep 1
9
+ # fi
10
+ # for f in $WEBTV_AUDIO_STORAGE_PATH*.mp3
11
+ # do
12
+ # echo "playing $f"
13
+ # ffmpeg -fflags +discardcorrupt -re -i "$f" -loglevel panic -vn -acodec copy -f mp3 -y audio.pipe 2>/dev/null
14
+ # done
15
+ # done
scripts/stream.sh CHANGED
@@ -4,8 +4,7 @@ echo "starting final stream loop.."
4
  while true; do
5
  sleep 1
6
  echo "trying to create the final stream.."
7
- # ffmpeg -re -i video.pipe -i audio.pipe -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv
8
- ffmpeg -fflags +discardcorrupt -re -i video.pipe -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv
9
 
10
  echo "final stream got interrupted, will try again in 1 sec"
11
  done
 
4
  while true; do
5
  sleep 1
6
  echo "trying to create the final stream.."
7
+ ffmpeg -fflags +discardcorrupt -re -i video.pipe -loglevel panic -loop 1 -c:v libx264 -preset veryfast -tune zerolatency -c:a aac -ar 44100 -f flv rtmp://localhost/live/webtv
 
8
 
9
  echo "final stream got interrupted, will try again in 1 sec"
10
  done
scripts/video.sh CHANGED
@@ -10,6 +10,6 @@ while true; do
10
  for f in $WEBTV_VIDEO_STORAGE_PATH*.mp4
11
  do
12
  echo "playing $f"
13
- ffmpeg -fflags +discardcorrupt -re -i "$f" -vcodec copy -f mpegts -y video.pipe 2>/dev/null
14
  done
15
  done
 
10
  for f in $WEBTV_VIDEO_STORAGE_PATH*.mp4
11
  do
12
  echo "playing $f"
13
+ ffmpeg -fflags +discardcorrupt -re -i "$f" -loglevel panic -vcodec copy -f mpegts -y video.pipe 2>/dev/null
14
  done
15
  done
src/index.mts CHANGED
@@ -5,6 +5,7 @@ import { demo2 } from './prompts.mts'
5
  import { getStats } from './getStats.mts'
6
 
7
  const main = async () => {
 
8
  console.log('Generating ideas..')
9
  const ideas = demo2
10
 
@@ -31,6 +32,7 @@ const main = async () => {
31
  }
32
 
33
  console.log('Finished the full cycle')
 
34
  setTimeout(() => {
35
  main()
36
  }, 3000)
 
5
  import { getStats } from './getStats.mts'
6
 
7
  const main = async () => {
8
+ /*
9
  console.log('Generating ideas..')
10
  const ideas = demo2
11
 
 
32
  }
33
 
34
  console.log('Finished the full cycle')
35
+ */
36
  setTimeout(() => {
37
  main()
38
  }, 3000)