LinuxQuestions.org
Help answer threads with 0 replies.
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, 04: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, 05:47 AM   #17
kindofabuzz
Member
 
Registered: Mar 2010
Location: There
Distribution: Linux Mint 17.1
Posts: 237

Rep: Reputation: 45
just google "youtube to mp3". like i said, plenty of sites.
 
Old 03-29-2011, 07:06 AM   #18
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
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, 10: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, 11:16 AM   #20
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 08:27 PM
downloading Pandora's music d00bid00b Linux - Software 1 09-21-2006 07:53 PM
downloading music? straightup General 1 08-30-2005 03:25 AM
Downloading music pinkfae222 Linux - Newbie 17 07-15-2005 07:07 PM


All times are GMT -5. The time now is 08:30 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration