You are not logged in.

#1 2021-10-05 14:50:50

amaro
Member
From: 5.4.2-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 312

[SOLVED] moc cannot play https (tls protocol) streams

Is there a way to make 'moc' play https streams?

I found some kind of solution here https://moc.daper.net/node/1815
but cannot see such an option in the 'config' file.

I will post the main part of this "ugly hack" as they call it here (just in case)

Index: files.c
===================================================================
--- files.c	(revision 2961)
+++ files.c	(working copy)
@@ -85,6 +85,7 @@ void files_cleanup ()
 inline int is_url (const char *str)
 {
 	return !strncasecmp (str, "http://", sizeof ("http://") - 1)
+		|| !strncasecmp (str, "https://", sizeof ("https://") - 1)
 		|| !strncasecmp (str, "ftp://", sizeof ("ftp://") - 1);
 }

Any help is appreciated!
Thank you in advance!

Last edited by amaro (2021-10-06 15:50:11)

Offline

#2 2021-10-05 16:35:31

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,344

Re: [SOLVED] moc cannot play https (tls protocol) streams

? moc definitely plays HTTPS streams OOTB, without any patching!
At least here it does...
Are your certs up to date?
Have you tried different streams?

I don't have a good idea what may go wrong on your side, firewall, blockers??

edit: I now see the arch package uses that same a different patch https://moc.daper.net/node/1872, well ... it works here.

edit2: for completeness sake: https://github.com/archlinux/svntogit-p … ttps.patch

Last edited by qinohe (2021-10-05 16:56:30)

Offline

#3 2021-10-05 19:12:50

amaro
Member
From: 5.4.2-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 312

Re: [SOLVED] moc cannot play https (tls protocol) streams

I made sure I have the same version of 'moc' - 1:2.5.2-3 but I do not see 'moc-https' in the repos like it is shown here https://github.com/archlinux/svntogit-p … ages%2Fmoc.

How did you get it?

Offline

#4 2021-10-05 19:20:26

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,344

Re: [SOLVED] moc cannot play https (tls protocol) streams

If you installed the [Extra] package, that patch should be included already.
https://archlinux.org/packages/extra/x86_64/moc/
https://github.com/archlinux/svntogit-p … /moc/trunk

Offline

#5 2021-10-06 04:21:12

amaro
Member
From: 5.4.2-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 312

Re: [SOLVED] moc cannot play https (tls protocol) streams

Yes, I have it but still cannot play https streams.
I even tried 'moc-pulse' from AUR but it did not work either. So it's 'moc' from the repos now.

Qs moc
warning: config file /etc/pacman.conf, line 35: directive 'TotalDownload' in section 'options' not recognized.
local/moc 1:2.5.2-3
    An ncurses console audio player designed to be powerful and easy to use

What to check to make sure I have everything?
I do not have firewall. Just iptables.

Offline

#6 2021-10-06 04:54:42

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,344

Re: [SOLVED] moc cannot play https (tls protocol) streams

amaro wrote:

warning: config file /etc/pacman.conf, line 35: directive 'TotalDownload' in section 'options' not recognized.

Are there pacnew files you didn't merge?

Anyway, show the active lines of moc/config and your music playlist file containing the stream you like to play!

You're not running your own server running on self-signed certs?
If so the system needs to be aware these certs exist!

Last edited by qinohe (2021-10-06 04:58:10)

Offline

#7 2021-10-06 06:34:58

amaro
Member
From: 5.4.2-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 312

Re: [SOLVED] moc cannot play https (tls protocol) streams

Active lines

ResampleMethod = Linear
SeekTime = 20
ALSADevice = default
Repeat = no
Shuffle = no
AutoNext = yes
InputBuffer = 32
OutputBuffer = 128
Prebuffering = 32

Here is the stream https://bss.neterra.tv/rtplive/vitoshar … ylist.m3u8 (it works with mpv).

Not running own server.
I am not sure what those certs are.

Offline

#8 2021-10-06 07:09:58

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,344

Re: [SOLVED] moc cannot play https (tls protocol) streams

qinohe wrote:
amaro wrote:

warning: config file /etc/pacman.conf, line 35: directive 'TotalDownload' in section 'options' not recognized.

Are there pacnew files you didn't merge?

You didn't answer this one, 'TotalDownload' was removed, you didn't merge your pacnew files.
Be sure your system is up to date and sanitized by properly merging pacnew files.

If your system is not up to date, there is a fair chance the certificates aren't either...
First things first!

Not running own server.
I am not sure what those certs are.

Don't worry about this one.

Oh, and btw that stream is a m3u8 list I'm not definitely sure that will work!
Try if you can find the '.mp3' stream and put that one in F.I. 'music.m3u' file.
I'm sure that works for that's how I'm playing HTTPS streams.
I have tried to see if I could find it, but I don't read Russian? Bulgarian?

edit:Found it is Bulgarian ;-) found an 'AAC' stream, that wouldn't play either...
The m3u8 (unicode m3u) file does indeed play on mpv, but, it's connection is very unstable here.

Last edited by qinohe (2021-10-06 15:12:53)

Offline

#9 2021-10-06 15:49:18

amaro
Member
From: 5.4.2-1-ck-ivybridge, xfce
Registered: 2014-05-09
Posts: 312

Re: [SOLVED] moc cannot play https (tls protocol) streams

Never knew 'pacman.conf' could have effect on 'moc's' behaviour.
So, fixed the 'pacnew' issue first.
Then all of a sudden 'moc' started playing https streams.
Perfect!
Tried the same stream again and did not play.
Then tried another 'm3u8' stream and it did not work either.
Then 'gooooogled' that and found it was a known issue https://moc.daper.net/node/3092

Thank you, qinohe!
Highly appreciate the time and the energy you put into this!

Offline

#10 2021-10-06 16:22:28

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,344

Re: [SOLVED] moc cannot play https (tls protocol) streams

Glad you 'solved' the real issue, the pacnew file;-) Now you see you should always act upon these files and never ignore them!
About that stream, like I said I can't read Bulgarian, but, there is a good chance a '.mp3' stream of that radio station exists, you just need to find it and use that with moc...

Offline

Board footer

Powered by FluxBB