LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-03-2021, 12:43 PM   #1
Ghost-Order
Member
 
Registered: Jan 2020
Distribution: Arch Linux
Posts: 52

Rep: Reputation: Disabled
[Streaming on Linux] Integrate Cmus with OBS


I stream on twitch using OBS, to play music i use Cmus, I would like to have a "now playing" overlay in my stream that shows info about the current track Cmus is playing.

OBS have a function which allows you to display a text as overlay while you are streaming, it could be a static text o a text from a file.

I found a script called cmus-status-line which prints to the terminal information about the currently playing track from Cmus(artist, track, etc). My issue is I don't know how to integrate the output from cmus-status-line with OBS, I guess a rough way would be to create a script that prints the output of cmus-statu-line to a file every x seconds, but I guess there are better ways.
 
Old 02-04-2021, 01:16 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Ghost-Order View Post
I stream on twitch using OBS, to play music i use Cmus, I would like to have a "now playing" overlay in my stream that shows info about the current track Cmus is playing.

OBS have a function which allows you to display a text as overlay while you are streaming, it could be a static text o a text from a file.

I found a script called cmus-status-line which prints to the terminal information about the currently playing track from Cmus(artist, track, etc). My issue is I don't know how to integrate the output from cmus-status-line with OBS, I guess a rough way would be to create a script that prints the output of cmus-statu-line to a file every x seconds, but I guess there are better ways.
would a desktop notification suffice?
Code:
notify-send "Title: Cmus now playing..." "$(cmus-status-line)"
Something like that.
 
Old 02-05-2021, 10:23 AM   #3
Ghost-Order
Member
 
Registered: Jan 2020
Distribution: Arch Linux
Posts: 52

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
would a desktop notification suffice?
Code:
notify-send "Title: Cmus now playing..." "$(cmus-status-line)"
Something like that.
Hello Ondoho, thank you for the help.

Maybe I didn't explain myself well enough, when I said that I would like a "now playing" overlay I was just referring to the display music feature that streamers usually have, and not literary a "now playing" text along with the cmus status line.

The way I see it I would need a script or plugin that somehow communicates with cmus so that every time there is a change in the track played the script can change its output too, then I can print that output in a file and use that file to display its text in obs. The cmus-status-line script only prints the current track being played and as far as I know it doesn't have any functionality beyond that.

Do you know if there is a plugin with such functionality? or maybe there is a better way to achieve this?

Last edited by Ghost-Order; 02-05-2021 at 11:19 PM.
 
Old 02-06-2021, 12:16 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
A desktop notification is an "overlay" and if you're streaming your desktop it should be visible.
Not sure what else you could be refering to.
A plugin for OBS? Have you asked on OBS community channels?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: cmus – A Small, Fast And Powerful Console Music Player For Linux LXer Syndicated Linux News 0 09-22-2017 04:01 AM
LXer: Complete Shell Audio Player for Linux Based on Ncurses: CMus LXer Syndicated Linux News 0 07-11-2009 11:00 PM
LXer: How-To: Enable Last.fm Song Submission in CMus in Debian and Ubuntu LXer Syndicated Linux News 0 04-26-2009 04:50 PM
LXer: CMus Review - A Great ncurses Music Player LXer Syndicated Linux News 0 04-16-2009 01:40 PM
moc or cmus? Berticus Linux - Software 0 07-17-2008 08:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration