with Mac terminal recently and youtube-dl, when I try to download videos, they just go to textedit and I can't open them

I've been messing around with Mac terminal recently and youtube-dl, but when I try and download videos, they just go to textedit and I can't open them, I've looked around online, but I can't find a fix. If someone has a solution, anything would be helpful.


[Re-Titled by Moderator]

MacBook Pro 13”, macOS 10.14

Posted on Jun 24, 2019 9:31 PM

Reply
15 replies

Jun 25, 2019 1:35 PM in response to Apple_MacX

macOS Command Line Primer

https://developer.apple.com/library/archive/documentation/OpenSource/Conceptual/ShellScripting/CommandLInePrimer/CommandLine.html


There are some books on using the macOS command line (generic stuff)

  • Learning Unix for OS X
  • UNIX for Mac OS Users
  • bash - the command shell, HOWEVER, we have been informed that macOS 10.15 Catalina will use zsh will be the default shell, but it at the getting started level behave similar to bash
  • The Mac OS X Command Line
  • The Mac Command Line with Terminal


Be advised that using a Terminal session has 3 layers

  1. Terminal GUI which is an application to display output from programs, and provide keyboard input to programs.
  2. The shell, which is responsible for invoking the commands you specify and passing the command line arguments, as well as running shell scripts (although you may not be running the script in the running shell, but rather in a subprocess running another copy of the shell)
  3. commands, which are either
    • shell built-in commands (cd, pwd, history, etc...)
    • executable programs that are designed to be invoked from a command line
    • shell scripts that are files containing commands you could be invoking from the command line, but are grouped together because as a group they perform a larger task.


Also, if you are going to get serious about using the Terminal, as in spending more time in the Terminal then any other Mac app, then look at iTerm2 <http://iTerm2.com> as this is an open source macOS terminal emulator that includes the "Kitchen Sink".


I doubt you will be spending that much time in the Terminal., but some of us actually get paid to use a terminal emulator using ssh to make a connection to a remote system and develop Unix based software. If you were going down that path, then there are may hiding in plain sight Terminal features that are often ignored that can make working with remote systems so much easier. I struggle educating people at work to actually look beyond the surface when using Terminal or iTerm2.

Jun 25, 2019 5:24 PM in response to VikingOSX

VikingOSX wrote:
Bob,
Though Bash will still be available, the default shell in Catalina will become Zsh, which Apple can keep reasonably current.

If Apple_MacX is just learning the command line, then they might as well learn the future and not the past.


I fully understand the dilemma. Stallman puts a GPLv3 license on bash and now Apple cannot ship anything newer than the existing 3.2 version even though bash is up to 5.something.


zsh has an MIT-like license (or so it says), and does not have the restrictions GPLv3 imposes.


So it makes a lot of sense for Apple to switch to zsh as the default shell.


My personal dilemma is that I spend most of my time using iTerm2 on my Mac ssh'ed to Linux, AIX, Solaris, and Microsoft RDC'ed to Cygwin under Windows where I do not control the system configuration. bash is the common shell available. And the shell scripts I write need a consistent that is available on all the platforms, which turns out to be bash. The need to a consistent shell is that many of my scripts get used by other team members, and even if I went to the trouble of putting zsh on my test systems, it might not be there on the ones used by other team members.


So while I would not object switching to zsh, it would be counter productive while I still have a day job 😅


Until then, I'll either compile my own bash or install one via HomeBrew.

Jun 26, 2019 9:45 PM in response to Apple_MacX

Quicktime should be able to handle most videos if you open it with quicktime. You can also install VLC (https://www.videolan.org) if your quicktime is having problems.


I suspect your file-association for MP4 files is broken or that your file isn't properly named with an MP4 extension. You can try right-clicking on your video file and select "open with" and choose Quicktime.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

with Mac terminal recently and youtube-dl, when I try to download videos, they just go to textedit and I can't open them

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.