21

I have youtube-dl version 2015.07.04. While downloading a video, I see this message:

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.

Apparently, the drawback of an outdated avconv is that youtube-dl won't be able to download bestvideo and bestaudio separately and mux them together into a single file giving the best overall quality available.

How can I find my currently installed avconv's version number? How can I get a newer version than what is provided by libav-tools 6:9.18-0ubuntu0.14.04.1?

Is there a ppa available for 14.04 with avconv version 10.0 or higher?

  • are you sure that is really happening? I saw the same error and yet it still merges the two separate files and even asks if I would like to keep them sepatate. – mchid Jul 7 '15 at 11:12
  • I'm sorry but I can't answer that. The only message I see is what I posted and then the video proceeds to download. I've never seen an offer to keep audio and video separate. For now, I'm suppressing the message by using -f best. – DK Bose Jul 7 '15 at 11:25
  • have you tried using -F first to see what "best" is and then using -f to select the best quality explicitly? – mchid Jul 7 '15 at 12:02
  • 1
    no, First use youtube-dl -F followed by the URL. This should list all the available codecs and available versions of quality and format. One of these will be listed as "best" use -f followed by the number of the one listed as best just like you would normally use -f best like so... youtube-dl -f followed by the number and followed by the url. For example: first run youtube-dl -F http://example.com and say 13 is listed as "best", then run: youtube-dl -f 13 http://example.com – mchid Jul 8 '15 at 4:09
  • 1
    also, when you are building from source (at least when using make) you can usually limit the number of threads the process will consume during compilation by using make j1 (to limit to one thread for example) so that it doesn't hog resources and will only occupy one processor core. It will probably take a lot longer to compile but you can let it run in the background (just in case you ever build anything from source in the future) it's been a while and I don't remember how heavy it is because 15.04 has real ffmpeg now anyhow. – mchid Jul 8 '15 at 4:29
13

ppa can be found here

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ffmpeg

The following command will add an alias to your bashrc file so your user can execute youtube-dl and bash will execute youtube-dl --prefer-ffmpeg automatically to eliminate unnecessary typing in the future:

echo "alias youtube-dl='youtube-dl --prefer-ffmpeg'" | tee -a ~/.bashrc; . ~/.bashrc

You can also add extra flags to the command by editing your ~/.bashrc file with your favorite text editor like gedit, vim, or nano; just keep in mind that you do not need to and should not use sudo to edit this file as it should be under your current user profile and needs to maintain your user permissions, not that of sudo or root. Just add extra flags within the quoted command for youtube-dl. Also, after editing ~/.bashrc you will need to source the file or open a new terminal to use the new alias. Source the file by running the following command:

. ~/.bashrc

To view the currently installed version of libav-tools, run the following command:

dpkg -l | grep libav

Also, to view what is available from apt-get, run the following command:

apt-cache show libav-tools | grep Version:

All available versions will be listed. The newest version will be installed by default when you run sudo apt-get upgrade or 'dist-upgrade or you can just sudo apt-get install it and it will install the newest available version unless otherwise specified.

To do a search for related packages, use apt-cache search like so:

apt-cache search libav

To narrow the search, you can use grep to only print results containing a keyword like so:

apt-cache search libav | grep libav
  • At least on Debian Testing at this time (with ffmpeg 2.8), merely running youtube-dl --prefer-ffmpeg … was sufficient. I suggest trying that before digging into unstable/beta repositories. – Adam Katz Oct 4 '15 at 21:37
  • @AdamKatz yes, I'm sure debian testing has the real ffmpeg, however, Ubuntu Trusty (14.04) ships with avconv and when you run an ffmpeg command by default, it calls on avconv sort of like an alias because ffmpeg was dropped and ffmpeg was not made available again until 15.04 (ubuntu vivid). So, using Ubuntu 15.04 or newer and recent versions of debian (I believe jessie as well) you would not need to add the ppa as the real ffmpeg is available. – mchid Oct 7 '15 at 6:43
  • I use the deb-multimedia third-party repo, though Debian Testing ("Stretch," the stable release that will follow Jessie) has ffmpeg 2.7.2. From Debian's package tracking system, it looks like ffmpeg was dropped in Debian 7 (Wheezy) but will return in Debian 9 (Stretch). I haven't looked up whether the next Ubuntu will also return the true ffmpeg. – Adam Katz Oct 7 '15 at 15:36
8

Avconv-11 is still available for Ubuntu Trusty in the heyarje ppa:

sudo add-apt-repository ppa:heyarje/libav-11 && sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libav-tools
  • This worked well for me and was simpler than getting ffmpeg installed on 14.04. – gene_wood Oct 4 '16 at 4:09
3

http://www.tecmint.com/record-ubuntu-desktop-screen-using-avconv/

sudo apt-get install yasm
$ git clone git://git.libav.org/libav.git
$ cd libav
$ ./configure
$ make
$ sudo make install
3
  1. Install FFMpeg

    sudo apt-get install ffmpeg
    
  2. Use this

    youtube-dl -x --audio-format mp3 --prefer-ffmpeg <video URL>
    

Work in youtube-dl 2015.11.19

  • when I tried to install ffmpeg using your command I got: E: Package 'ffmpeg' has no installation candidate – Menachem Dec 14 '15 at 21:08

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.