LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-29-2011, 03:34 AM   #16
mainstream
Member
 
Registered: Oct 2010
Location: localhost
Distribution: Ubuntu / Linux Mint
Posts: 61

Rep: Reputation: 0

I prefer (most of the time) commandline over GUI
So here is a automation script if needed:

yt2mp3.sh
Code:
#!/bin/bash
video=${1:-( read video )}
echo What is the artist of the song?
read artist
echo What is the name of the song?
read name
if [ -n "$video" ] && [ -n "$artist" ] && [ -n "$name" ]
then pushd ~/Music > /dev/null
youtube-dl $video -o "${artist}-${name}.flv"
ffmpeg -ab 192k -i "${artist}-${name}.flv" -acodec libmp3lame "${artist}-${name}.mp3"
rm -rf "${artist}-${name}.flv"
echo Your video is finally converted into a mp3!
popd > /dev/null
else
echo What is missing\? video\=$video artist\=$artist name\=$name
fi
usage ./yt2mp3 [url]

Hope this helps you out
 
Old 03-29-2011, 04:47 AM   #17
kindofabuzz
Member
 
Registered: Mar 2010
Location: There
Distribution: Linux Mint 17.1
Posts: 237

Rep: Reputation: 46
just google "youtube to mp3". like i said, plenty of sites.
 
Old 03-29-2011, 06:06 AM   #18
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Quote:
Originally Posted by mainstream View Post
I prefer (most of the time) commandline over GUI
So here is a automation script if needed:

yt2mp3.sh
Code:
#!/bin/bash
video=${1:-( read video )}
echo What is the artist of the song?
read artist
echo What is the name of the song?
read name
if [ -n "$video" ] && [ -n "$artist" ] && [ -n "$name" ]
then pushd ~/Music > /dev/null
youtube-dl $video -o "${artist}-${name}.flv"
ffmpeg -ab 192k -i "${artist}-${name}.flv" -acodec libmp3lame "${artist}-${name}.mp3"
rm -rf "${artist}-${name}.flv"
echo Your video is finally converted into a mp3!
popd > /dev/null
else
echo What is missing\? video\=$video artist\=$artist name\=$name
fi
usage ./yt2mp3 [url]

Hope this helps you out
Neat little script. Honestly I haven't done anything like this in a very long time, but I normally just hand edit and encode files.
 
Old 03-29-2011, 09:51 AM   #19
mainstream
Member
 
Registered: Oct 2010
Location: localhost
Distribution: Ubuntu / Linux Mint
Posts: 61

Rep: Reputation: 0
Quote:
Originally Posted by corp769 View Post
Neat little script. Honestly I haven't done anything like this in a very long time, but I normally just hand edit and encode files.
Hehe me to, but after 2 times I'm getting lazy and look for other possibilities
 
Old 03-29-2011, 10:16 AM   #20
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
So did you get it all figured out?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Downloading music on the internet davholla General 23 07-20-2008 07:27 PM
downloading Pandora's music d00bid00b Linux - Software 1 09-21-2006 06:53 PM
downloading music? straightup General 1 08-30-2005 02:25 AM
Downloading music pinkfae222 Linux - Newbie 17 07-15-2005 06:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration