WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: youtube-dl  (Read 758 times)

Offline vinceASPECT

  • Full Member
  • ***
  • Posts: 211
youtube-dl
« on: January 08, 2018, 04:04:45 PM »
Hello,

does anybody know the command that both shows all of the file types
available for a particular youtube movie link......and then can also show the url
of any of the listed file type option(s) that you choose....(not to actually download it)....

i can't quite get it.......i know "g" is somehow related to the url's

thx

V

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1652
Re: youtube-dl
« Reply #1 on: January 08, 2018, 04:22:14 PM »
Code: [Select]
youtube-dl --list-formats "$URL"
Code: [Select]
youtube-dl -g --cookies /tmp/ytcookie --format 22 "$URL"
If it doesn't work I can post the script I made to automate this. Might be a little messy though.
Download a copy and keep it handy: Core book ;)

Offline vinceASPECT

  • Full Member
  • ***
  • Posts: 211
Re: youtube-dl
« Reply #2 on: January 14, 2018, 12:56:11 PM »
yes thankyou...i figured out an approach

youtube-dl -f 17 -g (then the youtube movie link here)

this above just shows me the URL the file type assigned the listing number of 17 from a list of
about 19 different file types......

it's unusual becausae the list numbering has no real meaning.....so the positions that interest
me are 17 and 251

the listing just has no meaning or logical counting

eg (list below)

340--- some file type
26 -----some file type
----
---
----
---
290 ----some file type
---
---
215......mp4 360 file type
----
----
17 .......3gp 144 file type
----
-----

there are about 19 list entries in total

V

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1652
Re: youtube-dl
« Reply #3 on: January 14, 2018, 03:19:36 PM »
Yep. Numbers.
Maybe the attached script is useful for you in some way. ;)
Download a copy and keep it handy: Core book ;)

Offline vinceASPECT

  • Full Member
  • ***
  • Posts: 211
Re: youtube-dl
« Reply #4 on: January 18, 2018, 07:17:07 AM »
uh....yeah. -----i also tried to play live youtube videos in mplayer. First off i used youtube-dl with the live movie link and it listed some possible feeds. I grabbed one of the feeds  (93) and it then showed me the "DOTmu8" styled link for that feed.

Mplayer only played that video feed link for 10 secs then sputtered out  a "can't reverse seek in a stream" error.  I tried many switches like -cache etc but there was no improvement.......does anybody know how to solve that error pls?l

Played great for 10 secs....

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1652
Re: youtube-dl
« Reply #5 on: February 01, 2018, 02:02:01 AM »
I don't know why it stops for you after 10 seconds.
I use that script pretty much every day to stream videos via smplayer. I made it due to laziness, in a non-lazy moment, so I don't have to remember the CLI options for video quality etc.
If it doesn't error out after 10 seconds when you use that script, instead of directly running mplayer with the content URL, you might be able to reproduce what the script does by checking which options are shipped over to mplayer.
I believe the  --cookie  option is kind of important also.
Download a copy and keep it handy: Core book ;)

Offline vinceASPECT

  • Full Member
  • ***
  • Posts: 211
Re: youtube-dl
« Reply #6 on: February 07, 2018, 07:01:16 AM »
ahh Misalf...but are the movies you watch "live" streams from youtube?......youtube has an option called "live".

but anyhow, i have had a nightmare confirming with the BBC broadcasting corporation in the uk.......... about what types of youtube LIVE videos i am allowed to watch without a TV licence......there are some we can watch and some we can't...

V

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1652
Re: youtube-dl
« Reply #7 on: February 07, 2018, 07:11:53 AM »
Sorry, no idea if live streams would work. My limited bandwidth wouldn't suffice.
I usually stream short videos in very low quality for informational purposes only.
Download a copy and keep it handy: Core book ;)

Offline vinceASPECT

  • Full Member
  • ***
  • Posts: 211
Re: youtube-dl
« Reply #8 on: February 08, 2018, 06:05:14 AM »
well, it's nothing to do with bandwidth since the live streams are available in the same formats as any youtube "previously recorded video"  (any regular youtube video) on their site

it's the Protocol that is different. Live streams use a different protocol which mplayer doesn't quite like...infact Vlc does not like it either...

apparently only MPV can do live YT streaming. (a fork) but it's unclear if even mpv now works since youtube regularly changes it's code

I know that the only way to watch LIVE youtube videos within googles supposed remit (so to speak) is to use chrome browser and it needs to be a very recent edition....(some derivates of chrome may work....maybe Slimjet etc) but not many......FF may work..

V