Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] MPlayer cannot open network streams
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
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Mon Feb 26, 2018 4:35 am    Post subject: [Solved] MPlayer cannot open network streams Reply with quote

Trying to watch youtube with mplayer but:

Code:
$ mplayer http://www.youtube.com/watch?v=TLf2KVrtGew
MPlayer 1.3.0-6.4.0 (C) 2000-2016 MPlayer Team

Playing http://www.youtube.com/watch?v=TLf2KVrtGew.
Resolving www.youtube.com for AF_INET6...
Connecting to server www.youtube.com[2607:f8b0:4009:800::200e]: 80...

Unsupported http 301 redirect to https protocol
STREAM_ASF, URL: http://www.youtube.com/watch?v=TLf2KVrtGew
Resolving www.youtube.com for AF_INET6...
Connecting to server www.youtube.com[2607:f8b0:4009:804::200e]: 80...

Server returned 301:Moved Permanently
Failed to parse header.
Failed, exiting.
Resolving www.youtube.com for AF_INET6...
Connecting to server www.youtube.com[2607:f8b0:4009:815::200e]: 80...

Unsupported http 301 redirect to https protocol
No stream found to handle url http://www.youtube.com/watch?v=TLf2KVrtGew


Exiting... (End of file)


mplayer use flags:
https://paste.pound-python.org/show/CeRYgmjw0e5pkHGeHjue/


Last edited by The_Document on Wed Feb 28, 2018 3:45 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Mon Feb 26, 2018 7:33 am    Post subject: Reply with quote

Code:
Unsupported http 301 redirect to https protocol

You tried with
Code:
$ mplayer https://www.youtube.com/watch?v=TLf2KVrtGew

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Mon Feb 26, 2018 8:38 am    Post subject: Reply with quote

fedeliallalinea wrote:
Code:
Unsupported http 301 redirect to https protocol

You tried with
Code:
$ mplayer https://www.youtube.com/watch?v=TLf2KVrtGew


I didn't issue encrypted http connection, it was obviously a redirect and I don't understand why its redirecting.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30915
Location: here

PostPosted: Mon Feb 26, 2018 8:51 am    Post subject: Reply with quote

The_Document wrote:
I didn't issue encrypted http connection, it was obviously a redirect and I don't understand why its redirecting.

I think because youtube use only https connection and if you try to connect in http you are redirect to https
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Mon Feb 26, 2018 8:56 am    Post subject: Reply with quote

fedeliallalinea wrote:
The_Document wrote:
I didn't issue encrypted http connection, it was obviously a redirect and I don't understand why its redirecting.

I think because youtube use only https connection and if you try to connect in http you are redirect to https


Streaming videos encrypted strains hardware, it makes no sence to do that. Are there any workarounds?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Feb 26, 2018 6:28 pm    Post subject: Reply with quote

Use youtube-dl and play it offline.
Back to top
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Mon Feb 26, 2018 8:58 pm    Post subject: Reply with quote

Ant P. wrote:
Use youtube-dl and play it offline.


This is ridicules both smplayer and vlc player open network streams running on windows. Without doubt gentoo broke something and downloading youtube-dl is a hack way to get things working.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Mon Feb 26, 2018 9:15 pm    Post subject: Reply with quote

The_Document,

Code:
Playing https://www.youtube.com/watch?v=TLf2KVrtGew.
libavformat version 57.83.100 (external)
https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.


Check your ffmpeg USE flags
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Tue Feb 27, 2018 12:24 am    Post subject: Reply with quote

NeddySeagoon wrote:
The_Document,

Code:
Playing https://www.youtube.com/watch?v=TLf2KVrtGew.
libavformat version 57.83.100 (external)
https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.


Check your ffmpeg USE flags


Network is enabled:
https://paste.pound-python.org/show/eDjbcdmITsP7c2vyhgpr/

smplayer(mplayer frontend) and vlc DO NOT stream vids, on WIndows they stream just FINE and no redirection nonsence occurs because nobody is streaming thru https, gentoo broke things.
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Feb 27, 2018 1:28 am    Post subject: Reply with quote

Your pastebin just shows the flags that the ebuild uses, not the ones you have enabled.
Please post the results of "emerge -pv ffmpeg --nodeps". The nodeps just makes it quicker by avoiding the dependency calculations which we don't need anyway, just portage's flag determination. Use code tags when you post it. (click code on the button above your input)
Back to top
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Tue Feb 27, 2018 1:42 am    Post subject: Reply with quote

Tony0945 wrote:
Your pastebin just shows the flags that the ebuild uses, not the ones you have enabled.
Please post the results of "emerge -pv ffmpeg --nodeps". The nodeps just makes it quicker by avoiding the dependency calculations which we don't need anyway, just portage's flag determination. Use code tags when you post it. (click code on the button above your input)


I agree, the cause would be wgetpaste omitting the column
emerge -pv ffmpeg --nodeps:
https://paste.pound-python.org/show/QOVh4M6qUWQTq3Z8Spiu/

emerge -pv mplayer --nodeps
https://paste.pound-python.org/show/toHguz7tIZmPq6yBYTkV/
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Tue Feb 27, 2018 3:31 am    Post subject: Reply with quote

The_Document wrote:
Streaming videos encrypted strains hardware, it makes no sence to do that.
While I will agree that encrypted content is more stressful than non-encrypted content, I think it a bit unlikely that hardware capable of handling streaming video will become strained simply because the transport is encrypted. At nothing else, the proprietary world's fascination with Digital Restrictions Management means that most videos are encumbered by encryption, so it is standard to design hardware to deal with encrypted video streams.
The_Document wrote:
Are there any workarounds?
Configure YouTube to stop trying to refer you up to https.
The_Document wrote:
This is ridicules both smplayer and vlc player open network streams running on windows. Without doubt gentoo broke something and downloading youtube-dl is a hack way to get things working.
You have verified that running those tools on Windows downloads over http, not that they are merely using https quietly?
The_Document wrote:
NeddySeagoon wrote:
The_Document,

Code:
Playing https://www.youtube.com/watch?v=TLf2KVrtGew.
libavformat version 57.83.100 (external)
https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.


Check your ffmpeg USE flags


Network is enabled:
https://paste.pound-python.org/show/eDjbcdmITsP7c2vyhgpr/
Network is enabled, but that is not what the error message reported. The error message reported you need one of openssl, gnutls, or securetransport. Your output indicates that openssl and gnutls are both disabled. SecureTransport is an Apple construct, so it is not applicable here.
The_Document wrote:
no redirection nonsence occurs because nobody is streaming thru https, gentoo broke things.
How do you come to this conclusion? By my reading, Gentoo let you choose whether to enable TLS for ffmpeg, and you chose not to. How is that Gentoo's fault?
Back to top
View user's profile Send private message
Tony0945
Watchman
Watchman


Joined: 25 Jul 2006
Posts: 5127
Location: Illinois, USA

PostPosted: Tue Feb 27, 2018 3:35 am    Post subject: Reply with quote

pastebin wrote:
emerge -pv ffmpeg --nodeps

These are the packages that would be merged, in order:

[ebuild R ] media-video/ffmpeg-3.3.6:0/55.57.57::gentoo USE="X alsa bzip2 encode gpl hardcoded-tables iconv jpeg2k mp3 network opengl postproc sdl threads truetype vaapi vdpau vorbis x264 xcb xvid zimg zlib (-altivec) -amr -amrenc -bluray -bs2b -cdio -celt -chromaprint -chromium -cpudetection -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -gme -gmp -gnutls -gsm -iec61883 -ieee1394 -jack -kvazaar -ladspa -libass -libcaca -libilbc -librtmp -libsoxr -libv4l -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -nvenc -openal -openh264 -openssl -opus -oss -pic -pulseaudio -rubberband -samba -schroedinger -snappy -sofalizer -speex -ssh -static-libs {-test} -theora -twolame -v4l -vpx -wavpack -webp -x265 -zeromq -zvbi" ABI_X86="(64) -32 (-x32)" CPU_FLAGS_X86="3dnow 3dnowext aes avx avx2 fma3 fma4 mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" 0 KiB


NeddySeagoon wrote:
Code:
Playing https://www.youtube.com/watch?v=TLf2KVrtGew.
libavformat version 57.83.100 (external)
https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled.


You need a line that says "media-tv/ffmpeg openssl gnutls" in /etc/portage/package.use at a minimum. Many flags are enabled by default from the profile make.conf or the ebuild itself.
After ediiting package.use, open a different terminal and run "emerge -a1v ffmpeg" That's a number one not a small ell.

EDIT: I made those changes in my own package.use and youtube won't play. I get
Code:
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
Cannot seek backward in linear streams!
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
Cannot seek backward in linear streams!
Cannot seek backward in linear streams!
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.
[tls @ 0x7fb32f508760]The specified session has been invalidated for some reason.


So the flags are necessary but not sufficient. Actually, I watch youtube videos in my browser.
Back to top
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Tue Feb 27, 2018 3:53 am    Post subject: Reply with quote

Hu wrote:
By my reading, Gentoo let you choose whether to enable TLS for ffmpeg, and you chose not to. How is that Gentoo's fault?


I meant windows versions of the same softwares do what they advertise to do, I HAVE enabled gnutls and openssl for ffmpeg, however now that this topic encompases vlc also I might as well plainly put it that I have installed youtube-dl but found using SMTube for browsing and VLC for viewing optimal. However I am really bummed I couldn't get mplayer to work with youtube-dl (no sound output) tried -ao alsa and -ao pcm but no success), I really wanted frame buffer output but I guess I willl worry about that after I figure out how to watch youtube videos with X running.

As a side note I like gentoo a lot for what it provides users, but I guess use flags turned into a nuisance because I didn't read the wiki article for appropriate software and functionality or no appropriate wiki entry is available and as a result one must know what software use flags pull in to achieve desired functionality.

Hu wrote:
Configure YouTube to stop trying to refer you up to https.


I would if I knew how, perhaps you can share?


Last edited by The_Document on Tue Feb 27, 2018 8:20 am; edited 1 time in total
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 724
Location: /home

PostPosted: Tue Feb 27, 2018 7:41 am    Post subject: Reply with quote

What if you try to pipe it from youtube-dl to mplayer?

I stopped using mplayer a long time ago, does it even receive updates anymore?

Quote:

$ mpv https://www.youtube.com/watch?v=TLf2KVrtGew.
Playing: https://www.youtube.com/watch?v=TLf2KVrtGew.
(+) Video --vid=1 (*) (h264 1920x1080 29.970fps)
(+) Audio --aid=1 --alang=eng (*) 'DASH audio' (opus 2ch 48000Hz) (external)
AO: [pulse] 48000Hz stereo 2ch float
VO: [opengl] 1920x1080 yuv420p
AV: 00:00:04 / 00:06:46 (1%) A-V: -0.003 DS: 4.000/1 Cache: 10s+920KB


Code:

$ emerge -pv ffmpeg mpv --nodeps

These are the packages that would be merged, in order:

[ebuild   R    ] media-video/ffmpeg-3.4.2:0/55.57.57::gentoo  USE="X alsa bzip2 encode gpl hardcoded-tables iconv jpeg2k mp3 network opengl openssl postproc pulseaudio sdl svg theora threads truetype vdpau vorbis vpx x264 x265 xcb xvid zlib (-altivec) -amr -amrenc (-appkit) -bluray -bs2b -cdio -celt -chromaprint -chromium -cpudetection -debug -doc -fdk -flite -fontconfig -frei0r -fribidi -gcrypt -gme -gmp -gnutls -gsm -iec61883 -ieee1394 -jack -kvazaar -ladspa -libass -libcaca -libdrm -libilbc -librtmp -libsoxr -libv4l -lzma (-mipsdspr1) (-mipsdspr2) (-mipsfpu) (-mmal) -modplug -nvenc -openal -openh264 -opus -oss -pic -rubberband -samba -snappy -speex -ssh -static-libs {-test} -twolame -v4l -vaapi -wavpack -webp -zeromq -zimg -zvbi" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="aes avx mmx mmxext sse sse2 sse3 sse4_1 sse4_2 ssse3 -3dnow -3dnowext -avx2 -fma3 -fma4 -xop" FFTOOLS="aviocat cws2fws ffescape ffeval ffhash fourcc2pixfmt graph2dot ismindex pktdumper qt-faststart sidxindex trasher" 0 KiB
[ebuild   R    ] media-video/mpv-0.27.2::gentoo  USE="X alsa archive cli egl encode iconv javascript jpeg lcms libass lua opengl pulseaudio sdl uchardet vdpau xv zlib (-aqua) -bluray -cdda (-coreaudio) -cplugins -cuda -doc -drm -dvb -dvd -gbm -jack (-libav) -libcaca -libmpv -luajit -openal -oss (-raspberry-pi) -rubberband -samba (-selinux) {-test} -tools -v4l -vaapi -wayland -zsh-completion" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6" 0 KiB
Back to top
View user's profile Send private message
The_Document
Apprentice
Apprentice


Joined: 03 Feb 2018
Posts: 275

PostPosted: Tue Feb 27, 2018 8:21 am    Post subject: Reply with quote

Juippisi wrote:
What if you try to pipe it from youtube-dl to mplayer?

I stopped using mplayer a long time ago, does it even receive updates anymore?


Does mpv work with frame buffer drivers? Didn't know mplayer is abandoned software.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Wed Feb 28, 2018 2:44 am    Post subject: Reply with quote

The_Document wrote:
I meant windows versions of the same softwares do what they advertise to do, I HAVE enabled gnutls and openssl for ffmpeg, however now that this topic encompases vlc also I might as well plainly put it that I have installed youtube-dl but found using SMTube for browsing and VLC for viewing optimal.
You have verified that Windows versions of those programs were built with same options as the Gentoo version you tested? Until the configuration options match, we should not even begin looking at whether this is an operating-system-specific issue.
The_Document wrote:
Hu wrote:
Configure YouTube to stop trying to refer you up to https.
I would if I knew how, perhaps you can share?
No. I have always preferred downloading and viewing to be separate steps, and my hardware is not strained by the use of https. If this is even possible to configure, I do not know how to do it. However, since the https upgrade is being done by the server, the only way to avoid it is to convince the server not to attempt the upgrade.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Wed Feb 28, 2018 4:19 am    Post subject: Reply with quote

The_Document wrote:
Juippisi wrote:
What if you try to pipe it from youtube-dl to mplayer?

I stopped using mplayer a long time ago, does it even receive updates anymore?


Does mpv work with frame buffer drivers? Didn't know mplayer is abandoned software.

mpv works with drm/kms, which replaces the obsolete hardware-specific framebuffer drivers mplayer uses. You may have problems using it on a S3/MGA video card from 2002.
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