LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Bodhi (https://www.linuxquestions.org/questions/bodhi-92/)
-   -   Can't watch videos from YouTube (https://www.linuxquestions.org/questions/bodhi-92/cant-watch-videos-from-youtube-4175676839/)

2cl 06-10-2020 11:41 AM

Can't watch videos from YouTube
 
I can't watch YouTube videos in a fresh Bodhi installation with default Epiphany browser.
User-agent?, lib?

the_waiter 06-11-2020 09:26 AM

Hello

Do you have flash plugin installed?

if not then:

sudo apt update && sudo apt install flashplugin-installer

Stefan

teckk 06-11-2020 10:26 AM

Best solution for youtube is youtube-dl. Either download the video then watch it, or pipe the output of youtube-dl into your favorite media player. All those videos have 5 or 6 different resolutions that you can watch. Pick which one you wish. It's such a handy tool, I don't know why a linux user would not have it installed.

the_waiter 06-11-2020 10:40 AM

I do not think youtube-dl is a best solution. It is a good solution for downloading, but I doubt it is cool for watching videos. People like YT suggestions, playlists etc.

S

IvoryMale 06-11-2020 05:55 PM

Command-line programs are not for everyone I use a few of them but not youtube-dl

enigma9o7 06-11-2020 10:49 PM

Quote:

Originally Posted by 2cl (Post 6132806)
I can't watch YouTube videos in a fresh Bodhi installation with default Epiphany browser.
User-agent?, lib?

You could try
Code:

sudo apt install libavcodec57
I don't think youtube uses flash video anymore.

frankbell 06-12-2020 08:14 PM

Start your browser from the command line and immediate go to Youtube and click to watch a video. You might see some helpful error messages thrown to the command line in the terminal. If so, post them here, beind sure to surround them by "code" tags, which become available when you click the "Go Advanced" button beneath the compose/edit post windows.

ondoho 06-13-2020 12:41 AM

I do not think flashplugin is a best solution.

On my system (YMMV) epiphany itself does not have many dependencies, but it does depend on webkit2gtk, which has these as optional dependencies:

gst-plugins-good: media decoding
gst-plugins-bad: media decoding
gst-libav: nonfree media decoding

Install all of them.

Packages might have slightly different names on Ubuntu, so start with a search:
Code:

apt search gstreamer
According to enigma9o7 you'd need "gstreamer1.0-libav" I guess.

teckk 06-13-2020 07:14 AM

Can't get much easier and trouble free than:
Code:

url="https://www.youtube.com/watch?v=6aTXO0kP1ig"

mpv $(youtube-dl -f 18 -g "$url")

Or if you want to stream it without it downloading, in case you want to see a few seconds of it:
Code:

url=$(youtube-dl -f 18 -g "$url")

mplayer "$url"

And of course I would put that into a bash script.

You can watch youtube videos with lynx, dillo or w3m like that. Browser is irrelevant. And since that's python, you can always import that into a python script from youtube_dl import YoutubeDL and do what you wish with that data.

If you watch videos online, can't think of a handier tool than youtube-dl. It works for Twitter, Fox news, Cbs, Facebook, it also works on .m3u8 playlists for sites that are not supported.
Code:

youtube-dl --list extractors
Missing out if you ignore that little tool. Just like you are missing out if you ignore bash.

IvoryMale 06-14-2020 02:38 PM

Install a browser like Firefox or Firefox-ESR or Firefox-Beta or Pale Moon Browser...

ppc76 07-07-2020 11:46 AM

If this question is still open, here is a suggestion: "sudo apt install smtube". It's a GUI that downloads and plays YouTube videos, without adds, using the media players installed on the system ( mpv, vlc, smplayer, etc). It's almost the same as running the YouTube android app, minus the adds!
For less powerful systems, set the default resolution of the videos to 360 or 480p... They open up almost instantly!

ondoho 07-08-2020 04:04 AM

Quote:

Originally Posted by ppc76 (Post 6142616)
If this question is still open, here is a suggestion: "sudo apt install smtube".

I truly hope it uses youtube-dl for a backend, otherwise it will stop working at some point - Currently youtube-dl are the only ones that can keep up with youtube/googlevideo's API wars.

ppc76 07-08-2020 05:08 AM

Quote:

Originally Posted by ondoho (Post 6142897)
I truly hope it uses youtube-dl for a backend, otherwise it will stop working at some point - Currently youtube-dl are the only ones that can keep up with youtube/googlevideo's API wars.

One of the choices to view youtube videos is something like "mpv + youtube-dl", but, in my experience, that downloads hd videos, not the faster to download 480i ... For now (until YT messes it up) the choice to watch "480i" using "VLC" is the quickest, smoothest experience...

P.

ondoho 07-08-2020 05:19 AM

Quote:

Originally Posted by ppc76 (Post 6142928)
One of the choices to view youtube videos is something like "mpv + youtube-dl", but, in my experience, that downloads hd videos, not the faster to download 480i ... For now (until YT messes it up) the choice to watch "480i" using "VLC" is the quickest, smoothest experience...

This is configurable in youtube-dl. And it's not the point of my last post anyhow.

teckk 07-08-2020 08:14 AM

Quote:

One of the choices to view youtube videos is something like "mpv + youtube-dl", but, in my experience, that downloads hd videos,
Learn how to use the tool, read the man page.
Code:

youtube-dl -F https://www.youtube.com/watch?v=mO081tiMO1U
[youtube] mO081tiMO1U: Downloading webpage
[youtube] mO081tiMO1U: Downloading MPD manifest
[info] Available formats for mO081tiMO1U:
format code  extension  resolution note
139          m4a        audio only DASH audio  50k , m4a_dash container, mp4a.40.5@ 48k (22050Hz)
140          m4a        audio only DASH audio  130k , m4a_dash container, mp4a.40.2@128k (44100Hz)
251          webm      audio only DASH audio  139k , webm_dash container, opus @160k (48000Hz)
278          webm      256x144    DASH video  95k , webm_dash container, vp9, 30fps, video only
160          mp4        256x144    DASH video  108k , mp4_dash container, avc1.4d400b, 30fps, video only
242          webm      426x240    DASH video  220k , webm_dash container, vp9, 30fps, video only
133          mp4        426x240    DASH video  242k , mp4_dash container, avc1.4d400c, 30fps, video only
243          webm      640x360    DASH video  405k , webm_dash container, vp9, 30fps, video only
134          mp4        640x360    DASH video  549k , mp4_dash container, avc1.4d401e, 30fps, video only
244          webm      854x480    DASH video  752k , webm_dash container, vp9, 30fps, video only
135          mp4        854x480    DASH video 1155k , mp4_dash container, avc1.4d4014, 30fps, video only
247          webm      1280x720  DASH video 1505k , webm_dash container, vp9, 30fps, video only
136          mp4        1280x720  DASH video 2310k , mp4_dash container, avc1.4d400c, 30fps, video only
248          webm      1920x1080  DASH video 2646k , webm_dash container, vp9, 30fps, video only
137          mp4        1920x1080  DASH video 4238k , mp4_dash container, avc1.640028, 30fps, video only
18          mp4        640x360    360p  460k , avc1.42001E, 30fps, mp4a.40.2@ 96k (44100Hz), 34.62MiB
22          mp4        1280x720  720p 1200k , avc1.64001F, 30fps, mp4a.40.2@192k (44100Hz) (best)

Code:

uvid="https://www.youtube.com/watch?v=mO081tiMO1U"

uvd_url=$(youtube-dl -f 18 -g "$uvid")

echo "$uvd_url"
https://r1---sn-vgqsrned.googlevideo.com/videoplayback?expire=1594235386&ei=msUFX7TZFoPTNr-Dt7gB&ip=100.100.00.005&id=o-AO4pRPFb1fmn1ErMKjodDOJfPbD50iEp-5BddX3S7_Nz&itag=18&source=youtube&requiressl=yes&mh=HC&mm=31%2C29&mn=sn-vgqsrned%2Csn-vgqsknee&ms=au%2Crdu&mv=m&mvi=1&pl=21&initcwndbps=1301250&vprv=1&mime=video%2Fmp4&gir=yes&clen=36304026&ratebypass=yes&dur=630.398&lmt=1594210200409653&mt=1594213723&fvip=1&beids=9466586&c=WEB&txp=6216222&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cvprv%2Cmime%2Cgir%2Cclen%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRgIhANwUwY1yrBHGtbqJi1z-y559cHCldvL1nwJP51WUOf2DAiEA1G8cEjZM3WoIMbGgB68j21c7KVTbO0My5_Dy-dezOyU%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIfXUdkQd-LDpJoQ180eP0QDIKOGRAuGge2xIFZ9_ZvjQIhAJZCKE8GFdZipZ72ee5St-gBClIAQtz0COihd9VGJNHr

mplayer "$uvd_url"
...
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 640x360 => 640x360 Planar YV12
A:  2.9 V:  2.9 A-V:  0.000 ct:  0.000  0/  0  3%  1%  0.9% 0 0

I would not do that manually each time. Just examples. I would script it.


All times are GMT -5. The time now is 12:46 PM.