2

I have downloaded a youtube video using the terminal but now I don't know how to play it. I have checked the download folder but I didn't find anything.

So, how can I play this file?

  • Execute ls -a and check if in selected directory video really exists. You can also do this by Ubuntu default file explorer, pressing CTRL+H in directory where video should be. Fastest way to play video is double-click the icon in file explorer. – Roomy May 20 '14 at 22:25
  • What did you use to download it , and what were your current location ? – nux May 20 '14 at 22:30
  • i have used youtube-dl YouTube-video-youtube.com/watch?v=ES6OyV-RfHU – Freddy May 20 '14 at 22:32
  • i got it it was there at home – Freddy May 20 '14 at 22:34
  • The download location is the working directory from where you issued the youtube-dl command. – thiagowfx May 21 '14 at 1:30
4

The simplest approach is to just download the file to your current directory and play it from there. This can be done with the following command:

totem "$(youtube-dl youtube.com/watch?v=ES6OyV-RfHU |& grep -oP 'Destination:\s\K.*')"

The command above will both download the video, and extract the file name from the output and automatically launch the default video player to play the file.

Note that the player will not open until the file has finished downloading.

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.