Is it possible to convert a youtube video to mp3 using ffmpeg but without youtube-dl to first put in on the server? All the examples I've seen involve youtube-dl first to extract the physical video file.
I don't have access to youtube-dl because I'm on shared web hosting so can't sudo.
Best Answer
Download video in a specific format from youtube
A browser and application-inspecific way is to use http://deturl.com/. Deturl.com owns both the http://deturl.com/ and http://pwnyoutube.com/ domains. To download a specific youtube video in any format, simply replace the
youtube.com
portion of the URL with eitherdeturl.com
orpwnyoutube.com
(my personal fav).For example, a movie with the URL
www.youtube.com/watch?v=abcdefghijk
would becomewww.pwnyoutube.com/watch?v=abcdefghijk
. Follow the instructions on the download page to complete the conversion and download.ALTERNATIVE
Out of interest, I checked on new alternatives and discovered ClipGrab. It, like Miro below, is an open-source and cross-platform application. Unlike Miro, however, it includes a built-in video downloader AND converter, one of which is the MP3 format. It doesn't include as many other conversion types as Miro, but you could always convert it with Miro after download if needed.
Convert a media file into another form/type (video->video, video->audio, or audio->audio)
Download the open-source and cross-platform Miro Video Converter (implements ffmpeg)
"Programmatic access"
To download/convert youtube videos from a command line (with ffmpeg integration), the aforementioned youtube-dl seems to be the best solution.
I'm not certain why sudo is needed to run youtube-dl. I switched over to linux and successfully completed various tasks without sudo or su -c. My output is below. Let us know where you hit a snag at. (echo's are just for comment purposes)
EDIT:
I think I see what went wrong. You were trying to
wget
a file to a /bin directory and it required su. If you create the directory~/bin
(e.g. /home/USERNAME/bin), it's still a searchable directory that you have full permissions to.Assuming you were following the install directions listed at http://rg3.github.io/youtube-dl/download.html, run
mkdir ~/bin
and replace all instances of/usr/local/bin/youtube-dl
with~/bin/youtube-dl
instead. I can verify that this works on my shared hosting provider (Arvixe).