Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] OBS-Studio and other streaming
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Fri Feb 05, 2021 8:41 am    Post subject: [solved] OBS-Studio and other streaming Reply with quote

I just install obs-studio and I can't connect to rtmps:// enabled streams and it lacks browser integration for me to adequately import my streamlabs scenes. I had to disable ssl on my server. Luckily I have other security measures in place. I've rebuild it with ssl. Could it be that I have -lua disabled?

Could someone help me troubleshoot this issue? Also are there other stream software available for gentoo that are feature rich? I am use to use streamlabs on windows.

Thanks.


Last edited by nathanlkoch on Thu Feb 11, 2021 6:26 am; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3961

PostPosted: Fri Feb 05, 2021 10:39 am    Post subject: Reply with quote

Hi
Please try to locate the config file for obs --if any and find and enable a setting that allows for less stringent cert checking.
You can try to locate this config file by running
Code:

equery f obs-studio | grep conf


Also it might be searching for this file


Code:

/etc/ssl/certs/ca-certificates.crt
###also please try this
ln -s /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-bundle.pem

Do you have this file?
Also check the config file or command line option to have this cert in a different location and make sure that obs has permission to read it.
To best debug this issue try to stream using the command line and a verbose or debug option if available
_________________
:)
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Fri Feb 05, 2021 6:09 pm    Post subject: Reply with quote

alamahant wrote:
Hi
Please try to locate the config file for obs --if any and find and enable a setting that allows for less stringent cert checking.
You can try to locate this config file by running
Code:

equery f obs-studio | grep conf


Also it might be searching for this file


Code:

/etc/ssl/certs/ca-certificates.crt
###also please try this
ln -s /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-bundle.pem

Do you have this file?
Also check the config file or command line option to have this cert in a different location and make sure that obs has permission to read it.
To best debug this issue try to stream using the command line and a verbose or debug option if available


Code:
/usr/include/obs/obs-config.h
/usr/include/obs/obsconfig.h
/usr/include/obs/util/config-file.h
/usr/lib64/pkgconfig
/usr/lib64/pkgconfig/libobs.pc


and I do not have a /etc/ssl/certs/ca-bundle.pem. Created symlink. Still cannot connect.
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3961

PostPosted: Fri Feb 05, 2021 7:53 pm    Post subject: Reply with quote

Please have a look in this thread
https://forums.gentoo.org/viewtopic-t-1106418-start-0.html
This is the patch you need probably
https://github.com/obsproject/obs-studio/pull/2314/files
And check please the wiki on how to apply patches
https://wiki.gentoo.org/wiki//etc/portage/patches
Maybe something like this

Code:

mkdir -p /etc/portage/patches/media-video/obs-studio-<version>

cat >> /etc/portage/patches/media-video/obs-studio-<version>/rmtps.diff << EOF
--- a/plugins/obs-outputs/librtmp/rtmp.c
+++ b/plugins/obs-outputs/librtmp/rtmp.c
@@ -344,7 +344,7 @@ RTMP_TLS_LoadCerts() {
 
     CFRelease(keychain_ref);
 #elif defined(__linux__)
-    if (mbedtls_x509_crt_parse_path(chain, "/etc/ssl/certs/") != 0) {
+    if (mbedtls_x509_crt_parse_path(chain, "/etc/ssl/certs/") < 0) {
         goto error;
     }
 #endif
EOF


emerge -1av obs-studio

PS you cant imagine how freaking miserably complicated is to get a patch from git.....
Apparently you have to append a .patch to the commit url to get a normal looking file and not the disgusting format of git.And then you have to edit the file to remove some bloatware junk of git...
_________________
:)


Last edited by alamahant on Fri Feb 05, 2021 9:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2778
Location: Here and Away Again

PostPosted: Fri Feb 05, 2021 9:17 pm    Post subject: Reply with quote

Browser source support is not enabled for our builds yet, but there is a pull request [1] for it which you could try if you want to play with it already.

How exactly does the rtmps connection fail, and have you tried different services? The 'lua' flag should have nothing to do with this.

Does terminal output have anything related?

alamahant wrote:
Please have a look in this thread
https://forums.gentoo.org/viewtopic-t-1106418-start-0.html
This is the patch you need probably
https://github.com/obsproject/obs-studio/pull/2314/files

That's a little bit old by now, and the change is in the current versions already. :]

1. https://github.com/gentoo/gentoo/pull/18156
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Sat Feb 06, 2021 12:08 am    Post subject: Reply with quote

Code:
 Applying obs-studio-26.1.2-fix-alsa-crash.patch ...                                                                                                                                                [ ok ]
 * Applying rtmps.diff ...
patching file plugins/obs-outputs/librtmp/rtmp.c
Hunk #1 FAILED at 344.
1 out of 1 hunk FAILED -- saving rejects to file plugins/obs-outputs/librtmp/rtmp.c.rej                                                                                                               [ !! ]
 * ERROR: media-video/obs-studio-26.1.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/media-video/obs-studio-26.1.2/rtmps.diff
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 3522:  Called cmake_src_prepare
 *             environment, line 1573:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  331:  Called eapply_user
 *             environment, line 1754:  Called eapply '/etc/portage/patches/media-video/obs-studio-26.1.2/rtmps.diff'
 *             environment, line 1724:  Called _eapply_patch '/etc/portage/patches/media-video/obs-studio-26.1.2/rtmps.diff'
 *             environment, line 1662:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/media-video/obs-studio-26.1.2/rtmps.diff'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=media-video/obs-studio-26.1.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-video/obs-studio-26.1.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/obs-studio-26.1.2/work/obs-studio-26.1.2'
 * S: '/var/tmp/portage/media-video/obs-studio-26.1.2/work/obs-studio-26.1.2'

>>> Failed to emerge media-video/obs-studio-26.1.2, Log file:

>>>  '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/build.log'

 * Messages for package media-video/obs-studio-26.1.2:

 * ERROR: media-video/obs-studio-26.1.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/media-video/obs-studio-26.1.2/rtmps.diff
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 3522:  Called cmake_src_prepare
 *             environment, line 1573:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  331:  Called eapply_user
 *             environment, line 1754:  Called eapply '/etc/portage/patches/media-video/obs-studio-26.1.2/rtmps.diff'
 *             environment, line 1724:  Called _eapply_patch '/etc/portage/patches/media-video/obs-studio-26.1.2/rtmps.diff'
 *             environment, line 1662:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/media-video/obs-studio-26.1.2/rtmps.diff'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=media-video/obs-studio-26.1.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-video/obs-studio-26.1.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/obs-studio-26.1.2/work/obs-studio-26.1.2'
 * S: '/var/tmp/portage/media-video/obs-studio-26.1.2/work/obs-studio-26.1.2'
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Sat Feb 06, 2021 12:10 am    Post subject: Reply with quote

Code:
info: [rtmp stream: 'adv_stream'] Dynamic bitrate enabled.  Dropped frames begone!
info: [rtmp stream: 'adv_stream'] Connecting to RTMP URL rtmps://video.anathonous.cf/live...
info: [rtmp stream: 'adv_stream'] Binding to IPv4
info: HandShake: Type mismatch: client sent 3, server answered 72
info: RTMPSockBuf_Fill, remote host closed connection
info: RTMP_Connect1, handshake failed.
info: [rtmp stream: 'adv_stream'] Connection to rtmps://video.anathonous.cf/live failed: -2
info: ==== Streaming Stop ================================================
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Sat Feb 06, 2021 12:18 am    Post subject: Reply with quote

I'm an idiot. Apparently I have my server configured to not use a standard port and didn't enter that into the settings. It's working now. I am having issues with browser integration and and obs showing artifact and adjusting when resizing.

How can I add browser support?
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2778
Location: Here and Away Again

PostPosted: Sat Feb 06, 2021 12:22 am    Post subject: Reply with quote

You can use the same way to patch that you tried previously.

To get the changes from the pull request, simply add '.patch' to the URL, like so: https://github.com/gentoo/gentoo/pull/18156.patch
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Sat Feb 06, 2021 1:19 am    Post subject: Reply with quote

I'm trying to patch but its for -r1

Code:



Would you like to merge these packages? [Yes/No] yes

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) media-video/obs-studio-26.1.2::gentoo
 * obs-studio-26.1.2.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                         [ ok ]
>>> Unpacking source...
>>> Unpacking obs-studio-26.1.2.tar.gz to /var/tmp/portage/media-video/obs-studio-26.1.2/work
>>> Source unpacked in /var/tmp/portage/media-video/obs-studio-26.1.2/work
>>> Preparing source in /var/tmp/portage/media-video/obs-studio-26.1.2/work/obs-studio-26.1.2 ...
 * Applying obs-studio-26.1.2-fix-alsa-crash.patch ...                                                                                          [ ok ]
 * Applying 18156.diff ...
can't find file to patch at input line 20
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 34a1dad2dac9803dc84f5e06ecfbcd88d6dc807c Mon Sep 17 00:00:00 2001
|From: Gergely Nagy <ngg@ngg.hu>
|Date: Fri, 6 Nov 2020 18:29:43 +0100
|Subject: [PATCH] media-video/obs-studio: add browser source support
|
|Closes: https://bugs.gentoo.org/717002
|Signed-off-by: Gergely Nagy <ngg@ngg.hu>
|---
| media-video/obs-studio/Manifest               |   2 +
| media-video/obs-studio/metadata.xml           |   1 +
| .../obs-studio/obs-studio-26.1.2-r1.ebuild    | 205 ++++++++++++++++++
| media-video/obs-studio/obs-studio-9999.ebuild |  56 ++++-
| 4 files changed, 261 insertions(+), 3 deletions(-)
| create mode 100644 media-video/obs-studio/obs-studio-26.1.2-r1.ebuild
|
|diff --git a/media-video/obs-studio/Manifest b/media-video/obs-studio/Manifest
|index fb9bdc10f8739..819b412479472 100644
|--- a/media-video/obs-studio/Manifest
|+++ b/media-video/obs-studio/Manifest
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 29
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/media-video/obs-studio/metadata.xml b/media-video/obs-studio/metadata.xml
|index 603cd8cc27ce0..e2dfc144a7831 100644
|--- a/media-video/obs-studio/metadata.xml
|+++ b/media-video/obs-studio/metadata.xml
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
patching file media-video/obs-studio/obs-studio-26.1.2-r1.ebuild
can't find file to patch at input line 252
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/media-video/obs-studio/obs-studio-9999.ebuild b/media-video/obs-studio/obs-studio-9999.ebuild
|index e9173352238bf..a55cb907b443a 100644
|--- a/media-video/obs-studio/obs-studio-9999.ebuild
|+++ b/media-video/obs-studio/obs-studio-9999.ebuild
--------------------------
No file to patch.  Skipping patch.
5 out of 5 hunks ignored                                                                                                                        [ !! ]
 * ERROR: media-video/obs-studio-26.1.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/media-video/obs-studio-26.1.2/18156.diff
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 3517:  Called cmake_src_prepare
 *             environment, line 1568:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  326:  Called eapply_user
 *             environment, line 1749:  Called eapply '/etc/portage/patches/media-video/obs-studio-26.1.2/18156.diff'
 *             environment, line 1719:  Called _eapply_patch '/etc/portage/patches/media-video/obs-studio-26.1.2/18156.diff'
 *             environment, line 1657:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/media-video/obs-studio-26.1.2/18156.diff'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=media-video/obs-studio-26.1.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-video/obs-studio-26.1.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/obs-studio-26.1.2/work/obs-studio-26.1.2'
 * S: '/var/tmp/portage/media-video/obs-studio-26.1.2/work/obs-studio-26.1.2'

>>> Failed to emerge media-video/obs-studio-26.1.2, Log file:

>>>  '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/build.log'

 * Messages for package media-video/obs-studio-26.1.2:

 * ERROR: media-video/obs-studio-26.1.2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/media-video/obs-studio-26.1.2/18156.diff
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 3517:  Called cmake_src_prepare
 *             environment, line 1568:  Called default_src_prepare
 *      phase-functions.sh, line  920:  Called __eapi6_src_prepare
 *             environment, line  326:  Called eapply_user
 *             environment, line 1749:  Called eapply '/etc/portage/patches/media-video/obs-studio-26.1.2/18156.diff'
 *             environment, line 1719:  Called _eapply_patch '/etc/portage/patches/media-video/obs-studio-26.1.2/18156.diff'
 *             environment, line 1657:  Called __helpers_die 'patch -p1  failed with /etc/portage/patches/media-video/obs-studio-26.1.2/18156.diff'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=media-video/obs-studio-26.1.2::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-video/obs-studio-26.1.2::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/obs-studio-26.1.2/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/obs-studio-26.1.2/work/obs-studio-26.1.2'
 * S: '/var/tmp/portage/media-video/obs-studio-26.1.2/work/obs-studio-26.1.2'
Observable /etc/portage/patches/media-video/obs-studio-26.1.2 #
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Feb 06, 2021 8:07 am    Post subject: Reply with quote

That patch is for the ebuild itself.
Back to top
View user's profile Send private message
Chiitoo
Administrator
Administrator


Joined: 28 Feb 2010
Posts: 2778
Location: Here and Away Again

PostPosted: Sat Feb 06, 2021 2:46 pm    Post subject: Reply with quote

Oops, sorry, I was at least half asleep when I wrote

Chiitoo wrote:
You can use the same way to patch that you tried previously.

It's not quite that simple in this case.

You could patch the ebuild directly, but that's not exactly a clean way to go about it (and the changes would be reverted when you sync).

Setting up a local overlay would be ideal. It will basically be a just another repository for ebuilds to install from.

Some directions towards setting it up here:

https://wiki.gentoo.org/wiki/Handbook:Parts/Portage/CustomTree#Adding_unofficial_ebuilds

When done, place the ebuild file from the pull request there, under 'media-video/obs-studio/' and run 'ebuild obs-studio-26.1.2-r1.ebuild manifest'.

Here's a direct link to the raw file:

https://raw.githubusercontent.com/gentoo/gentoo/34a1dad2dac9803dc84f5e06ecfbcd88d6dc807c/media-video/obs-studio/obs-studio-26.1.2-r1.ebuild

Place the meta data file there as well:

https://raw.githubusercontent.com/gentoo/gentoo/34a1dad2dac9803dc84f5e06ecfbcd88d6dc807c/media-video/obs-studio/metadata.xml

Additionally, the ALSA patch will be needed under a 'files' directory. You can copy it from the official repository.

These are just quick directions and I may have missed a step here or/and there.
_________________
Kindest of regardses.
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Wed Feb 10, 2021 2:16 am    Post subject: Reply with quote

I ended up installing upstream. 26.1.2.-161-g36ab7b97c. I'm still learning how packaging works.
I used layman once to install something then just disabled the repo.
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Wed Feb 10, 2021 4:53 am    Post subject: Reply with quote

Chiitoo wrote:
Oops, sorry, I was at least half asleep when I wrote

Chiitoo wrote:
You can use the same way to patch that you tried previously.

It's not quite that simple in this case.

You could patch the ebuild directly, but that's not exactly a clean way to go about it (and the changes would be reverted when you sync).

Setting up a local overlay would be ideal. It will basically be a just another repository for ebuilds to install from.

Some directions towards setting it up here:

https://wiki.gentoo.org/wiki/Handbook:Parts/Portage/CustomTree#Adding_unofficial_ebuilds

When done, place the ebuild file from the pull request there, under 'media-video/obs-studio/' and run 'ebuild obs-studio-26.1.2-r1.ebuild manifest'.

Here's a direct link to the raw file:

https://raw.githubusercontent.com/gentoo/gentoo/34a1dad2dac9803dc84f5e06ecfbcd88d6dc807c/media-video/obs-studio/obs-studio-26.1.2-r1.ebuild

Place the meta data file there as well:

https://raw.githubusercontent.com/gentoo/gentoo/34a1dad2dac9803dc84f5e06ecfbcd88d6dc807c/media-video/obs-studio/metadata.xml

Additionally, the ALSA patch will be needed under a 'files' directory. You can copy it from the official repository.

These are just quick directions and I may have missed a step here or/and there.


Thank you, I now know how to use a local repo and ebuilds. I still can't find the alsa patch you are talking about though. It griped about it.
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Wed Feb 10, 2021 6:34 am    Post subject: Reply with quote

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d071aba9e0ce3f910469fd95ba391456ae23235a
found it
Back to top
View user's profile Send private message
nathanlkoch
Apprentice
Apprentice


Joined: 31 Jan 2021
Posts: 163
Location: Earth / Sol

PostPosted: Wed Feb 10, 2021 6:50 am    Post subject: Reply with quote

Worked like a charm. Protip. If you editing your layouts in slobs. Then export. Boot into linux and reimport and configure your image links. Your back in business.

Thanks for the help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum