Open christophersaebo opened 2 years ago
Hi there, never post your rtmp url publicly, it contains your streaming key. I removed it from your message.
That's not the intended way of using the script. If you're not using tee muxer, you should at the very least remove -f tee "${tee_muxer_output}"
from your ffmpeg command.
What error are you getting?
I'm getting: cannot open audio device hw:Loopback, 1, 0 (no such device), using a oracle cloud vps with ubuntu
Please make sure you have done all of the below:
alsa
modprobe snd-aloop pcm_substreams=1
nano ~/.asoundrc
and add the line pcm.!default { type plug slave.pcm "hw:Loopback,0,0" }
Does it work when you revert stream.sh
to its original state and add your rtmp url to config.sh
instead?
I'll try when I get home
Im getting this now:
root@yt-streams:/home/ubuntu/LiveStreamRadio# sh ./lsr.sh --start ./lsr.sh: 4: ./config.sh: Bad substitution ./lsr.sh: 29: ./config.sh: Syntax error: "(" unexpected
Got the errors away, but this the only things that display:
I have the ffmpeg version: 4.2.4
You are actually meant to run the script using ./lsr.sh --start
. That way the audio player and ffmpeg are started in different screens and able to run simultaneously.
Still, it wont send out
So did i do something wrong?
Can you please try to enter the streams' screen using screen -rS lsr_stream
and see whether there is any error?
To leave the screen, use Ctrl + A, Ctrl + D
Ima try
There is no screen to be resumed matching lsr_stream.
same happens with lsr_player
Ive tried redoing the lsr.sh file, still nothing, it wont start up the screens
Can you please make a backup of your files and try with freshly cloned files. As a first step, add your youtube rtmp url to PLATFORMS=()
in config.sh
and remove all other rtmp urls. Then try to execute the script in the way it's intended and see if it throws any errors.
It wont open a screen, so it wont work, and ive tried with dooing what u said it wont start ffmpeg too
#
# Absolute path of the dictory the script is in. Don't touch this unless you know what you're doing
#
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
#
# Filter to adjust music volume. Put "1.0" to keep the original volumes
#
VOLUME="0.8"
#
# How many threads FFMPEG will use. Set to "0" to let FFMPEG decide
#
THREAD_COUNT="0"
#
# Absolute path of the directory your music is stored in
#
MUSIC_DIR="${SCRIPT_DIR}/media/music"
#
# Filepath of your background video. Must be a streamable MKV, FLV or MP4 file
#
BACKGROUND="${SCRIPT_DIR}/media/sample_background.mkv"
#
# RTMP urls you wish to stream to
#
PLATFORMS=(
"rtmp://a.rtmp.youtube.com/live2/KEY WAS HERE"
)
#
# Executed before the next song in the playlist starts playing
# Arguments:
# ${1} File name (String, eg. "Billie_Eilish_-_Ocean_Eyes.mp3")
# ${2} Cleaned up file name (String, eg. "Billie Eilish - Ocean Eyes")
# Returns:
# None
#
function on_next_track() {
# Your custom code goes here
# The following line writes the currently playing song to a text file.
# You can safely remove it if you don't need this feature
echo "${2}" > ${SCRIPT_DIR}/now_playing.txt
:
}
#
# Executed after the playlist has been reshuffled
# Arguments:
# None
# Returns:
# None
#
function on_playlist_reshuffle() {
# Your custom code goes here
:
}
#
# Executed when the stream is restarting (e.g. after a crash)
# Arguments:
# None
# Returns:
# None
#
function on_stream_restart() {
# Your custom code goes here
:
}
Thats the config
That's odd. With the same basic setup, could you please try to run ./lsr.sh --start player
(make sure it's working properly by going into the screen) and then run ./stream.sh
and let me know what error comes up?
Trying now
There is no screen to be resumed
Oh so the player isn't running either. What do you get when running ./player.sh
?
it runs then, but not trough ./lsr.sh --start player only on bash ./player.sh
Hey, ive done every step it said, it wont stream to youtube doe, this is the code for the stream.sh