WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: youtube-dl  (Read 29590 times)

Offline neonix

  • Sr. Member
  • ****
  • Posts: 302
Re: youtube-dl
« Reply #15 on: January 23, 2019, 04:29:34 AM »
Thank you everyone for help.
Because mplayer doesn't support https protocol I have to create this simply script that sends url to wget and then to mplayer.

usage: yt https://www.youtube.com/watch?v=2OnAOaTnMT8
Code: [Select]
#!/bin/sh
tce-load -iw ca-certificates
tce-load -iw wget
tce-load -iw python
rm /home/tc/1.txt
youtube-dl -f 18 -g "$1" > /home/tc/1.txt
url=`cat /home/tc/1.txt`
wget --no-check-certificate $url -O - | mplayer -
If you want to watch youtube live streams with m3u8 protocol (HTTP Live Streaming) you have to use vlc3 because only it supports https.  MPlayer 1.3 support m3u8 but without https.

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 747
Re: youtube-dl
« Reply #16 on: January 23, 2019, 11:43:33 AM »
Hello

Neonix.i have got absolutely no idea what your talking about .....the post i made (reply 14) prior to your last reply 15 ... that 14 reply works perfectly with mplayer youtube videos in both win32 and Linux. 

Your comments in 15 about mplayer not doing https protocols are.....total garbage.
Your script may or may not work but i DO know that wget does indeed have issues with https.


The mplayer command to play a stream from my earlier instructional post 14 .......can be as follows below

$mplayer -vo directx -zoom -really-quiet -aspect 16:9 "Large Video Link as described in my earlier  instructional post 14"

examples below........

$mplayer -vo directx -zoom -really-quiet -aspect 16:9 "https://r3---sn-aigs6n7y.googlevideo.com/videoplayback?ip=86.187.171.246&key=yt6&lmt=1493499359128513&dur=523.749&expire=1548293772&id=o-AO_ZBCOw6eiwRAFa88BNByMOWHcWFMB16DPXKdVi63rF&source=youtube&initcwndbps=812500&fvip=3&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&clen=16246435&ipbits=0&signature=BDF56C5D22751CC2B824F26F6A9C8EFF0B8C9372.2B3E1AF7FA1BC86AEFA207AB0019410D201C1F46&itag=18&pl=16&mime=video%2Fmp4&c=WEB&mm=31%2C29&mn=sn-aigs6n7y%2Csn-aigl6ney&gir=yes&ratebypass=yes&requiressl=yes&mt=1548272095&mv=m&ei=LMJIXMeEDIOuVc3yhsgE&ms=au%2Crdu"

OR SAY......

$mplayer -vo sdl -zoom -really-quiet -aspect 16:9 "https://r3---sn-aigs6n7y.googlevideo.com/videoplayback?ip=86.187.171.246&key=yt6&lmt=1493499359128513&dur=523.749&expire=1548293772&id=o-AO_ZBCOw6eiwRAFa88BNByMOWHcWFMB16DPXKdVi63rF&source=youtube&initcwndbps=812500&fvip=3&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&clen=16246435&ipbits=0&signature=BDF56C5D22751CC2B824F26F6A9C8EFF0B8C9372.2B3E1AF7FA1BC86AEFA207AB0019410D201C1F46&itag=18&pl=16&mime=video%2Fmp4&c=WEB&mm=31%2C29&mn=sn-aigs6n7y%2Csn-aigl6ney&gir=yes&ratebypass=yes&requiressl=yes&mt=1548272095&mv=m&ei=LMJIXMeEDIOuVc3yhsgE&ms=au%2Crdu"

and you press "F" to flip between full screen or not.


These methods above play the youtube video in any quality on any media player on any platform.

This post here (16) is nothing concerning live youtube streams just regular youtube videos.

thx

Vin
« Last Edit: January 23, 2019, 12:09:11 PM by vinceASPECT »

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 747
Re: youtube-dl
« Reply #17 on: January 23, 2019, 03:24:16 PM »
Yes

if anybody is interested also......i figured a way to play LIVE youtube video streams in mplayer.

You need the very latest youtube-dl version and you give it the live youtube link and it will list live stream URL otions as a result. So as below......

a) ...............$youtube-dl (live youtube video link here) -F  [enter]

b) then use a command with any of the options (93) from the results of a) above to get the true link as below

...................$youtube-dl -f 93 -g (the same live youtube video link here) [enter]

c) part b) above gives you a new URL ending in DOTm3u8.........then just past that URL into mplayer as below here in d)

d)...............$mplayer -vo gl -zoom -aspect 16:9 -cache 4096 -xy 184 -noborder -really-quiet -ontop "THE LONG VIDEO M3U8 URL LINK HERE"   [enter]

The live youtube video will play in mplayer.

---------------------------------------------------------

You can choose what XY size of video screen you want.......and if your PC is good you can flip between fullscreen by pressing "F"............otherwise you can start again from scratch and put the -fs switch into your mplayer arguments list to get instant fullscreen  (it should work)

These DOTm3u8 video links should also open in VLC and Kodi etc.  Kodi requires that you paste the link into a text file and save as say Video.m3u. Then in kodi you navigate to that FILE and open it.....it will stream the live video.

example below



...............$mplayer -vo gl -zoom -aspect 16:9 -cache 4096 -xy 184 -noborder -really-quiet -ontop "https://manifest.googlevideo.com/api/manifest/hls_playlist/id/R6vzE0yBfKk.0/itag/93/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/cmbypass/yes/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D134/hls_chunk_host/r5---sn-aigzrn7l.googlevideo.com/ei/UedIXL-SMJKOVPn9tcAI/playlist_type/DVR/gcr/gb/initcwndbps/5830/mm/32/mn/sn-aigzrn7l/ms/lv/mv/m/pl/16/dover/11/keepalive/yes/manifest_duration/30/playlist_duration/30/mt/1548281550/disable_polymer/true/ip/86.187.170.30/ipbits/0/expire/1548303281/sparams/ip,ipbits,expire,id,itag,source,requiressl,ratebypass,live,cmbypass,goi,sgoap,sgovp,hls_chunk_host,ei,playlist_type,gcr,initcwndbps,mm,mn,ms,mv,pl/signature/89E65150D22CE6CE45F3284B7B74C311BA6C6CF8.2EC0DCAC4B9F3F4E14B1B2E3E98F2876E9130D10/key/dg_yt0/playlist/index.m3u8"

Thx

Vin




« Last Edit: January 23, 2019, 03:25:54 PM by vinceASPECT »

Offline neonix

  • Sr. Member
  • ****
  • Posts: 302
Re: youtube-dl
« Reply #18 on: January 23, 2019, 08:47:58 PM »
Hello

Neonix.i have got absolutely no idea what your talking about .....the post i made (reply 14) prior to your last reply 15 ... that 14 reply works perfectly with mplayer youtube videos in both win32 and Linux. 

Your comments in 15 about mplayer not doing https protocols are.....total garbage.
Your script may or may not work but i DO know that wget does indeed have issues with https.
Hi Vin
I assume you are a Windows user. But in Linux (TC8) when I use https url with Mplayer 1.3 I got
Code: [Select]
https protocol not found, recompile FFmpeg with openssl, gnutls,
or securetransport enabled.
Is there a way to compile latest Mplayer with https support?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: youtube-dl
« Reply #19 on: January 23, 2019, 09:08:59 PM »
which mplayer extension are you using?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: youtube-dl
« Reply #20 on: January 24, 2019, 12:49:35 AM »
mplayer updated to 1.3.0 as mplayer-cli and mplayer (gtk2) added

..seems to work with youtube-dl https links

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 747
Re: youtube-dl
« Reply #21 on: January 24, 2019, 03:51:36 AM »
Yes Neonix, i sincerely appologise and it's as Juanito stated.......i am talking from the standpoint of win x64 mplayer. 

It's strange since it all works fine on win x64.  mplayer.

 I always assumed things like mplayer were actually ahead of the game in Linux OS'a....not several versions behind other OS's. So i simply stated it worked in Linux because i assumed it would.

It seems Juanito has now upgraded the TCL mplayer with the required https support so that all of my earlier posts (14,16 etc) should now work ok on TCL mplayer.

I hope it works for sure. Since mplayer is so lightweight for dealing with youtube and lots of other media.
Neonix, i am sure your script can be modded slightly since TCL mplayer has now been upgraded.

I also messed around with different feed quality's when doing LIVE youtube links. VLC certainly does play them back without issue.....and mplayer does. I don't know if TCL's vlc version would do it but i tend to just stay with mplayer anyhow.

thx

Vin


Offline neonix

  • Sr. Member
  • ****
  • Posts: 302
Re: youtube-dl
« Reply #22 on: January 26, 2019, 05:11:56 AM »
mplayer updated to 1.3.0 as mplayer-cli and mplayer (gtk2) added

..seems to work with youtube-dl https links
I tested it in TC 9 x86 and TC 10 x86 and still get the same error:
Code: [Select]
https protocol not found, recompile FFmpeg with openssl, gnutls,
or securetransport enabled.
Did you install gnutls-dev before compilation?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: youtube-dl
« Reply #23 on: January 26, 2019, 05:27:17 AM »
Since it worked for me, could you supply an https link that doesn’t work?

Offline neonix

  • Sr. Member
  • ****
  • Posts: 302

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: youtube-dl
« Reply #25 on: January 26, 2019, 09:18:47 PM »
I see the error now - I also see this:
Code: [Select]
libavformat version 57.83.100 (external)
Mismatching header version 57.25.100

..perhaps there is a problem with using the system ffmpeg rather than mplayer's internal version.

I'll take a look.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: youtube-dl
« Reply #26 on: January 27, 2019, 03:27:45 AM »
Ah - here was the problem:
Code: [Select]
[--enable-openssl is incompatible with the gpl and --enable-nonfree is not specified]
gnutls(3.6) used instead and ffmpeg3 re-posted

Offline neonix

  • Sr. Member
  • ****
  • Posts: 302
Re: youtube-dl
« Reply #27 on: January 27, 2019, 07:14:12 AM »
Thank you Juanito for help. Now https links works and Tinycore has up to date software.

I would like to also add some comments.
1) mplayer-cli dependencies have 100 MB. Mplayer with internal ffmpeg would have only 16 MB or even less using upx.
2) I found that "due to conflicting MPlayer and OpenSSL licenses the
resulting binary may be non-distributable"
3) mplayer.tcz.info shows version 1.1.1 instead 1.3.0
4) mplayer volume control don't work in my computer. PCM value is changing but sound is still at the same level.
5) m3u8 protocol streams signal in packets, and it creates freezes. As I read it was ffmpeg fault not mplayer, but I think in latest mplayer snapshot, it was fixed (with internal ffmpeg).
http://lists.mplayerhq.hu/pipermail/mplayer-users/2013-September/086606.html
6) What is also interesting some servers may be not compatible with gnutls. This means that mplayer may not work with all https links.
« Last Edit: January 27, 2019, 07:17:29 AM by neonix »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14516
Re: youtube-dl
« Reply #28 on: January 27, 2019, 09:40:49 PM »
mplayer-cli dependencies have 100 MB. Mplayer with internal ffmpeg would have only 16 MB or even less using upx.
If you'd like to take over the maintenance of mplayer-cli with a view to reducing the total size of the extension including recursive deps, but maintaining functionality, please go ahead.

Quote
I found that "due to conflicting MPlayer and OpenSSL licenses the
resulting binary may be non-distributable"
Neither mplayer nor ffmpeg have openssl as a dep

Quote
mplayer.tcz.info shows version 1.1.1 instead 1.3.0
Fixed - thanks

Quote
mplayer volume control don't work in my computer. PCM value is changing but sound is still at the same level
The mplayer volume control works for me with both alsa and pulseaudio
« Last Edit: January 27, 2019, 11:22:56 PM by Juanito »

Offline vinceASPECT

  • Hero Member
  • *****
  • Posts: 747
Re: youtube-dl
« Reply #29 on: July 08, 2019, 04:10:54 AM »
i find a great lightweight youtube web site.

https://invidio.us/watch?v=zMZq3tiP53c

https://toogl.es/#/view/x45vtw9JU6I

no javascript etc............

it can also play "live" feeds........i don't think it allows entry of comments.....but seems pretty functional


thx

Vin
« Last Edit: July 08, 2019, 04:40:13 AM by vinceASPECT »