# youtube-dl not working due to latest changes by Google



## NapoleonWils0n (May 15, 2019)

The youtube-dl pkg is not working with youtube due to changes Google made at the beginning of May

The youtube-dl pkg version is 2019.01.30.1,
the latest version is from 2019.05.11 which includes the fix for the changes made by Google to youtube

Just a heads up in case anyone was wondering why youtube-dl wasnt working with youtube
Hopefully there will be an update soon


----------



## malavon (May 15, 2019)

That's really strange, I used it just a few hours ago and it did end up in a playable video file. Extension was .webm though, but mpv plays it fine.
No idea what the exact issue is, so I might be missing something.


----------



## scottro (May 15, 2019)

I find this often happens. I use it in Linux more than FreeBSD, but will run youtube-dl after having not used it for a few weeks, it fails, and I run youtube-dl --update (this is direct from the youtube-dl site) and then it works.
I assume FreeBSD can run the generic program, rather than the port.


----------



## KBK (May 15, 2019)

youtube-dl is a python script executable: binary data
Download the latest from https://youtube-dl.org/downloads/latest/
Untar: 
$ tar xzvf youtube-dl-2019.05.11.tar.gz
Run: 
$ python2.7 ~/youtube-dl/youtube-dl -f m4a https://...
Update:
$ python2.7 ~/youtube-dl/youtube-dl -U


----------



## Minbari (May 15, 2019)

NapoleonWils0n said:


> The youtube-dl pkg is not working with youtube due to changes Google made at the beginning of May
> 
> The youtube-dl pkg version is 2019.01.30.1,
> the latest version is from 2019.05.11 which includes the fix for the changes made by Google to youtube
> ...


The ports version it's 2019.04.24, so why don't you build your own package from that port ( make package)?


----------



## SirDice (May 15, 2019)

Or simply switch to the latest package repository.


----------



## NapoleonWils0n (May 15, 2019)

Minbari said:


> The ports version it's 2019.04.24, so why don't you build your own package from that port ( make package)?


Because the changes Google made were at the beginning of May,
and last time i checked April is before May


----------



## SirDice (May 15, 2019)

Send an email to the port's maintainer and politely ask him/her if they're already working on updating it. As long as the port hasn't been updated there won't be an updated package either.


----------



## NapoleonWils0n (May 15, 2019)

SirDice said:


> Send an email to the port's maintainer and politely ask him/her if they're already working on updating it. As long as the port hasn't been updated there won't be an updated package either.


Thanks SirDice i thought that might be the case


----------



## Minbari (May 15, 2019)

NapoleonWils0n said:


> Because the changes Google made were at the beginning of May,
> and last time i checked April is before May


I have the April version installed from ports and it's working and if the maintainer doesn't have the time to update the port to a newer version or it's form another time zone, then I'm updating the local port (just modify a few things in the Makefile), then rebuild the port and www/youtube_dl works again. It's not that difficult. Free and open sources it's not for lazy people.


----------



## SirDice (May 15, 2019)

You can create a PR for it and add the patch there, most maintainers will appreciate the help. All the maintainer has to do is verify it and if it's correct accept the change, ports management will then apply it. Once the port has been updated the packages will follow shortly after. 

Note however that this would probably only  be applied to the latest packages, I'm not sure if the change is valid to be applied to the quarterly ports/package branches.


----------



## NapoleonWils0n (May 16, 2019)

The issue also affects mpv player which use youtube-dl in the backend to play youtube videos

This is the error message that mpv displays when trying to play a youtube video

"token" parameter not in video info for unknown reason

Just a heads up in case anyone else had the same issue


----------

