Currently trying to loop a stream of audio files loaded from a .txt file:
#! /bin/bash
VBR="1500k"
FPS="30"
QUAL="ultrafast"
YOUTUBE_URL=" rtmp://a.rtmp.youtube.com/live2"
YOUTUBE_KEY="****"
VIDEO_SOURCE="video.mp4"
AUDIO_ENCODER="aac"
ffmpeg \
-stream_loop -1 \
-re \
-i "$VIDEO_SOURCE" \
-thread_queue_size 512 \
-stream_loop -1 \
-re \
-f concat -i audiofiles.txt \
-c:v libx264 -preset $QUAL -r $FPS -g $(($FPS *2)) -b:v $VBR -bufsize 3000k -maxrate $VBR \
-c:a $AUDIO_ENCODER -ar 44100 -b:a 128k -pix_fmt yuv420p \
-f flv $YOUTUBE_URL/$YOUTUBE_KEY
The result is that the playlist gets played once and then stops. How can I force the loop?
Unrecognized option 'I'
. Change-I
to-i
. 2) Do all of your inputs listed inaudiofiles.txt
have the same attributes (format, sample rate, channel layout, number of streams)?