LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 12-05-2012, 08:00 PM   #1
kylxy
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Rep: Reputation: Disabled
Help me plz!!


Hi!! can anyone plz tell me what to do with this error: bash: !": event not found

I'm getting this msg after trying to use this script:
-------------------------------------------------------
x=~/.youtube-dl-$RANDOM-$RANDOM.flv
youtube-dl --output=$x --format=18 "$1"
ffmpeg -i $x -acodec libmp3lame -ac 2 -ab 128k -vn -y "$2"
rm $x
-------------------------------------------------------

it's a script for converting youtube videos into mp3 files
can you help me plz
 
Old 12-06-2012, 01:12 PM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
Replace double quotes (") with single quotes (') and try again.
 
1 members found this post helpful.
Old 12-06-2012, 01:41 PM   #3
teckk
Senior Member
 
Registered: Oct 2004
Distribution: FreeBSD Arch
Posts: 1,751

Rep: Reputation: 188Reputation: 188
Look at
Code:
youtube-dl -h
You can extract audio with.
Code:
youtube-dl -f 17 http://www.youtube.com/watch?v=12345678 -x
That particular one is .mp4 [144x176] .aac audio.
Quote:
Post-processing Options:
-x, --extract-audio convert video files to audio-only files (requires ffmpeg or
avconv and ffprobe or avprobe)
--audio-format FORMAT "best", "aac", "vorbis", "mp3", "m4a", or "wav"; best by
default
--audio-quality QUALITY ffmpeg/avconv audio quality specification, insert a value
between 0 (better) and 9 (worse) for VBR or a specific
bitrate like 128K (default 5)
-k, --keep-video keeps the video file on disk after the post-processing; the
video is erased by default
Use you own variables, something like this will work.
Code:
youtube-dl -f 17 http://www.youtube.com/watch?v=12345678 -x - | ffmpeg -i - -vn -c:a libmp3lame -b:a 128k output123.mp3
 
1 members found this post helpful.
Old 12-06-2012, 03:02 PM   #4
kylxy
LQ Newbie
 
Registered: Dec 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Smile Thank you shivaa

Quote:
Originally Posted by shivaa View Post
Replace double quotes (") with single quotes (') and try again.
Thank you shivaa I did what you said and it's working
 
Old 12-06-2012, 06:39 PM   #5
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,177

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Quote:
Originally Posted by kylxy View Post
Thank you shivaa I did what you said and it's working
Then you should mark this thread solved. You can do this from the Thread Tools menu.
 
  


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
[B][RED]Critical - Help Needed Immediately PLZ PLZ PLZ[/B][/RED] zoomzatag Linux - Newbie 4 10-07-2010 01:25 PM
plz plz help me regarding route mapping nedian123 Programming 1 07-13-2004 08:17 AM
plz plz solve my route mapping problem nedian123 Linux - Networking 1 07-12-2004 09:41 PM
redhat problems plz plz help sap666 Linux - Newbie 5 07-30-2003 10:57 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration