Add playlist item during broadcast

Does anyone know if it's possible to add a video to a playlist while the livestream is running? I would like to add content to the loop without having to shut the broadcast down.

Is this possible?

2 Replies

Hey there,

It sure is possible, but I am afraid we'll need more information to be more helpful. It sounds like you may be using a content management system or a streaming software suite, so let tell us more about your setup when you can.

In my case I used xvfb to create a virtual desktop, and pushed that out over rtmp:// with ffmpeg. That desktop was always live on twitch, ffmpeg was just running and doing it's thing. All that remains is to write a script to display the content on the virtual desktop. Here's an example using mpv

#!/usr/bin/bash
# continuously play videos
# you'll have to configure your xvfb display 
export DISPLAY=:0.0    
playlist=/home/user239234/playlist.txt
filler=/home/user239234/filler/

# if we have a playlist, use that, or else play one file from filler 
while true; do
   if test -f "$playlist"; then
      mpv --playlist=$playlist
   else
      find "$filler" -type f | shuf | head -n1 | xargs mpv
   fi
done

Hey thanks for the response. I'm sorry my brain is an overripe banana right now. I'm using a Linode "Ant Media" to syndicate a playlist stored there. Does that help? I'm also digesting your response.

Thanks again

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct