3

I try to download videos from Facebook from command line. This is what I have used:

youtube-dl https://www.facebook.com/Roscosmos/videos/2032700800317930

And as a result I get this error message:

[generic] 2032700800317930: Requesting header
WARNING: Falling back on generic information extractor.
[generic] 2032700800317930: Downloading webpage
ERROR: Unable to download webpage: <urlopen error [Errno 8] _ssl.c:510: EOF occurred in violation of protocol>

I have tried to follow instructions from here. In more detail, I used:

youtube-dl https://www.facebook.com/videos.php?v=2032700800317930

But I still get the same problem. Putting the URL into quotation signs does not help as well.

  • I can confirm I can download facebook videos with youtube-dl – gota Nov 9 '18 at 17:01
2

What version of Ubuntu & youtube-dl are you using?

To make sure you're using the latest youtube-dl available, do the following:

sudo add-apt-repository ppa:nilarimogard/webupd8 
sudo apt-get update
sudo apt-get install youtube-dl

After doing the above in Ubuntu 14.04 Trusty, I got 2018.01.07 version of youtube-dl and was able to download the video in question:

youtube-dl 'https://www.facebook.com/Roscosmos/videos/2032700800317930'
WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.
[facebook] 2032700800317930: Downloading webpage
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
[download] Destination: _-2032700800317930.mp4
[download] 100% of 3.36MiB in 00:01

The video download now fails, however, due to another reason. It will only download a single part of the video, and will not proceed further.

The reason is that youtube-dl uses libav to combine downloaded files, while libav available in the system is outdatedyoutube-dl expects version at least 10.0, but the system has 9.2:

dpkg -l | grep libav-tools
ii  libav-tools                       6:9.20-0ubuntu0.14.04.1                    amd64        Multimedia player, server, encoder and transcoder

Weirdly, I could not find any quick way to install latest libav in Ubuntu 14.04.

I guess at this point the only way to make this youtube-dl work would be to build & install libav manuallyhttps://libav.org/download/.

Someone actually stumbled upon a similar issue that required him to figure out how to build libav. Here are the detailed step-by-step instructinos: http://xiemingzhi.github.io/2016/03/25/installing-libav-on-ubuntu-1404-trusty

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.