Comments (4)
There's not really a concept of "file names". I'm sure there could be a way to embed the file name into the RTMP metadata, but Owncast wouldn't do anything with that.
The solution would be to use the Owncast API to set the stream title each time you change files on the broadcasting side. How you'd detect the file change is something you'd need to figure out with ffmpeg, however.
Here's the API you'd want to use. It requires an access token. https://owncast.online/api/latest/#tag/Integrations/paths/~1api~1integrations~1streamtitle/post
from owncast.
Ok, thanks for that. I think I can make that work.
Looking at the API docs, it looks like I need this application/json format and the "value" key. I've tried POSTing this to my server but I get "unauthorized" response.
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <<access token>>" -d '{"value": "Testing Stream Title!"}' http://192.168.12.50:8080/api/integrations/streamtitle
UPDATE: I figured it out. I had to create an access token that had admin access. All good now. Thanks!
from owncast.
For anyone who might stumble on this an want to know my solution. I am just using a for loop to first set the Stream Title to the filename and then send the file via ffmpeg. This will cycle through each mkv file in the current folder and stream it in turn, first setting the Stream Title.
#!/bin/bash
# set the file extension of your media
file_ext='mkv'
# set your server IP and Port
server_ip=<your_ip>
server_port=<your_port>
rtmp_port=<your_rtmp_port>
# set your stream key
stream_key='<your_stream_key>'
# iterate through each media file and replace spaces with underscores for the Stream Title (NOTE: change <your_access_token> to yours that you created)
for file in *.${file_ext}; do
title=$(echo $file | tr ' ' '_');
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <your_access_token>" -d '{"value": "'$title'"}' http://${server_ip}:${server_port}/api/integrations/streamtitle; ffmpeg -re -i "$file" -c:v copy -c:a copy -f flv rtmp://${server_ip}:${rtmp_port}/live/"$stream_key";
done
from owncast.
Very cool!
from owncast.
Related Issues (20)
- Document the licensing of our non-code assets
- Sanitize Fediverse username HOT 6
- Cannot persist admin pass change via command HOT 2
- Replace Twitter social link icon with the stupid 𝕏 one HOT 6
- Followers-only chat? HOT 4
- Integration of WebRTC via broadcast-box? HOT 31
- Improved troubleshooting documentation
- Add additional roadblocks when trying to turn on video passthrough mode HOT 3
- panic: concurrent map write
- Chat background is not affected by background-color in custom css HOT 4
- Self-help support chatbot that uses documentation HOT 7
- Copying stream key without revealing it only copies asterisks HOT 13
- Cache often accessed web server resources HOT 1
- cannot change the username HOT 1
- Videojs error "The media playback was aborted due to a corruption problem..." HOT 8
- [Security] GitHub Security Lab (GHSL) Vulnerability Report, Owncast: GHSL-2023-261 HOT 2
- iPad portrait player layout is incorrect HOT 1
- Reimagine user auth, "Follow" flow, and the concept of "login" and "users"
- Do not send a join chat event if that user is already in the chat HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owncast.