Shop Mobile More Submit  Join Login
×

More from DeviantArt



Details

Submitted on
February 11, 2008
Link
Thumb

Stats

Views
479
Favourites
0
Comments
46
×

FetchSong

Journal Entry: Mon Feb 11, 2008, 9:30 AM



Since I lost all my music...


dionyzizeuler ~ $ vlc `./fetchsong.php -a "Loreena McKennitt" -s "All Souls Night"`

Looking for artist: Loreena McKennitt
Looking for song: All Souls Night
12 matching entries.
Found song: www.youtube.com/watch?v=-qQHlW…
Flv URL: sjl-v148.sjl.youtube.com/get_v…
Downloading flv file...
--19:14:15--  sjl-v148.sjl.youtube.com/get_v…
           => `/tmp/fetchsong_7Fjluf'
Resolving sjl-v148.sjl.youtube.com... 64.15.120.51
Connecting to sjl-v148.sjl.youtube.com|64.15.120.51|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2,495,277 (2.4M) [video/flv]

100%[====================================================
=============================>] 2,495,277     95.07K/s    ETA 00:00

19:14:37 (119.16 KB/s) - `/tmp/fetchsong_7Fjluf' saved [2495277/2495277]

Flv downloaded to: /tmp/fetchsong_7Fjluf
Converting flv to mp3...
MMX supported but disabled
MMX2 supported but disabled
SSE supported but disabled
SSE2 supported but disabled
Converted flv to mp3.
VLC media player 0.8.6d Janus
Remote control interface initialized. Type `help' for help.
[00000221] main demuxer error: no id3 module matched "any"
status change: ( new input: /tmp/fetchsong_3NYV81 )
status change: ( audio volume: 256 )
status change: ( play state: 1 )
[00000204] main playlist: nothing to play
status change: ( stop state: 0 )
signal 2 received, terminating vlc - do it again in case it gets stuck
status change: ( stop state: 0 )
status change: ( quit )
[00000204] main playlist: stopping playback

dionyzizeuler ~ $



  • Mood: Content
  • Listening to: Loreena McKennitt
Add a Comment:
 
:icongeekfish:
Geekfish Featured By Owner Feb 20, 2008
deezer.com :D
Reply
:iconphilo23:
philo23 Featured By Owner Feb 16, 2008
what strange about this script is, on my system when it goes to download the FLV, it tried to load what looks like a comment.
it says:
"Downloading flv file...
--23:50:46-- [link]"
which is strange because i'd looked through the source and i cant find why its doing this..
any ideas?
Reply
:iconagorf:
agorf Featured By Owner Mar 2, 2008  Hobbyist Photographer
Download the .phps again and use it as: ./fetchsong.php 'Loreena McKennitt All Souls Night'
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 17, 2008
What do you mean "what looks like a comment"?
Reply
:iconphilo23:
philo23 Featured By Owner Feb 17, 2008
well when it runs, it seems to pull HTML from the page, not the youtube FLV from the site :/
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 17, 2008
What does it output? Pastebin it (not the file, the output). Don't run vlc, just fetch song.
Reply
:iconphilo23:
philo23 Featured By Owner Feb 18, 2008
the exact output is:
[link]
hope you can figure something out, i cant :(
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 18, 2008
Can you try a different song?
Reply
:iconskyrail:
Skyrail Featured By Owner Feb 13, 2008
Hehe very nice. Where did you get the FLV converter, is that a vlc plugin? Heh :aww:
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 13, 2008
just using mplayer ;-)

[ look at the source! :D ]
Reply
:iconskyrail:
Skyrail Featured By Owner Feb 13, 2008
Ah my bad, there's the source code, thanks dio, I'll be sure to check it out...that's if I can make head or tail of it haha...out of interest what languages have you dabbled in, I was reading your ';paper' on code Style and you talk about all sorts from PHP to Python from Java (maybe it was Javascript, I think I saw both) to C++ heh, your quite talented. I'm just wondering since I'm in awe how people learn all this, I find it quite hard to find anything remotely useful to start me off without forking out for a book.

Thanks :slow:
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 14, 2008
No need to "head" or "tail", it's less than 200 lines.

I started with QBasic and QuickBasic (now dated), moved on to Visual Basic 6 (in which I became an expert, but don't use it today), then went on to learn HTML, CSS, Javascript, PHP (the language I currently use the most, followed by Greek and then English), and MySQL, for web development, as well as C/C++ which I also enjoy coding in. XML, XSLT, XPath are the tools of the trade occasionally (they aren't hard to learn and they're useful tools). Those are the languages I've used the most. I've experimented a little bit with Python, Scheme, Pascal, Ruby, Java and other languages, just to figure out how they work, because working with them helps understanding a different point of view.

As a starting point, I would definitely discourage you to learn Visual Basic. I think Python and PHP are two of the best languages to start with. If you want to start with PHP, it's a good idea to gain sufficient advanced knowledge of XHTML and CSS first ( from [link] ).
Reply
:iconskyrail:
Skyrail Featured By Owner Feb 15, 2008
Wow...I did start writing a comment but I decided to go and re-read your code correctly and I understand it :slow: I'm rather amazed lol, but logically it all makes sense. Yes I do get confused about the part just after searching for the video but heh, I don't know much about those functions and XML. But still :)

Hehe, you sure know a fair amount of stuff about programming, I guess as you learn more languages and concepts it gets easier since the rules are generally the same, the syntax can vary but generally the concept and the way they work can be rather similar.

Well I guess I'm a few steps ahead then because I know XHTML and CSS confidently and I have worked with PHP and I have looked into Python. I've not written much in either I have to say but I know a small bit :) I've found PHP to be a smoother learning curve then Python purely because the documentation is so much more in detail yet not bloated. There also tends to be simpler stuff to create with it without having to call upon much external entities unlike other programming languages. All in all I'll be continuing to learn both to the best of my ability. I guess my main problem (with Python) is knowing what to build and where to learn ;P

Thanks for the information by the way dio, and that site, I'm sure I can polish up on my xhtml and CSS skills.
Reply
:iconpachunka:
pachunka Featured By Owner Feb 12, 2008  Professional Artist
Smooth. :)
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 12, 2008
:orange:
Reply
:iconartbit:
ArtBIT Featured By Owner Feb 12, 2008  Hobbyist Digital Artist
:lol:

Now make all that controllable through user's brainwaves, since typing:
vlc `./fetchsong.php -a "Loreena McKennitt" -s "All Souls Night"`
is a bit too much work, don't you think? ;)
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 12, 2008
done.
Reply
:icontepara:
Tepara Featured By Owner Feb 11, 2008  Hobbyist Photographer
I left my nerd hat at home, so I understand next to none of that :P
Hang on I am at home :O I much have lost the hat :( :P
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 12, 2008
You mean red hat? :D
Reply
:icontepara:
Tepara Featured By Owner Feb 12, 2008  Hobbyist Photographer
Is that the colour of the nerd hats kids are wearing these days? :P hehe :hug:
Reply
:iconnikosalpha:
nikosalpha Featured By Owner Feb 11, 2008  Professional Photographer
kali fasi.. to lene last.fm
:p
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 12, 2008
Δεν εχει full songs on demand :P
Reply
:iconcaektiems:
Caektiems Featured By Owner Feb 11, 2008  Professional Traditional Artist
:confused: I won't lie and say I know entirely what this is about :\
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 12, 2008
Program to play any popular song on demand, in low quality.
Reply
:icon33xit:
33xiT Featured By Owner Feb 11, 2008  Hobbyist Photographer
Great my friend! Can I get the parent(s) class(es)? =P

You have a good coding style but I don't like the spaces number you add in a function call..
I still don't know what is an assertion? :O

I almost all understood, I miss to know what are your constants and others methods..

Keep it up dio' ;) :thumbsup:
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 12, 2008
Thanks. i won't argue with you about style. Read more here about my style and why i believe it's pointless to argue.

Regarding what assertions are, Wikipedia has a good article on assertions in programming.

Which parent classes, constants and other methods are you referring to?
Reply
:icon33xit:
33xiT Featured By Owner Feb 15, 2008  Hobbyist Photographer
Of course it is pointless to argue :) I already read what you wrote.. It was just my point.
Thanks for the link about assertions, I think I understood but I need to try them out through tests.

Forget parent classes and others methods; But about constants like STDERR, XML_ELEMENT_NODE, STDOUT, etc.

Thanks ;)
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 15, 2008
STDERR, STDOUT: [link]
XML_ELEMENT_NODE: [link]
Reply
:icon33xit:
33xiT Featured By Owner Feb 15, 2008  Hobbyist Photographer
Oh my god.... Haha, okay :D Thanks dio ;)
Reply
:iconlateralsnowflake:
lateralsnowflake Featured By Owner Feb 11, 2008
...That's hot.

Fetchsong?
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 12, 2008
yeah. and it's free :boogie:
Reply
:iconlateralsnowflake:
lateralsnowflake Featured By Owner Feb 11, 2008
My condolences, btw.
Reply
:iconkip0130:
Kip0130 Featured By Owner Feb 11, 2008
I dont understand it But it sucks that you lost ALL your music. Its happend to me twice.
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 12, 2008
my hard drive was stolen and it was fully formatted when I reclaimed it :(
Reply
:iconkip0130:
Kip0130 Featured By Owner Feb 12, 2008
:O who stole it! dang that sucks man.
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 12, 2008
yeah lol... but nevermind, i'll get it back
Reply
:iconquinteros-lama:
quinteros-lama Featured By Owner Feb 11, 2008
I really love "All Souls Night" I have 3 versions of this song ^^ it has a wonderful lyric
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 11, 2008
Yes, it's wonderful :-)
Reply
:iconthunderstatement:
Thunderstatement Featured By Owner Feb 11, 2008  Hobbyist Digital Artist
Wow, that's pretty smart. :D
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 11, 2008
:heart:
Reply
:icon10grams:
10grams Featured By Owner Feb 11, 2008
maaaalista... apolo afto katalava oti epsaxnes laureena mckennit, kai katevases telikws... kai twra akous laureena eftixismenos :D

(me dio aples kouventoules dld, instead apo olon afton ton xamo... egw proswpika zalistika!!)
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 11, 2008
Όχι, έγραψα ένα πρόγραμμα που κατεβάζει αυτόματα και παίζει τη μουσική που θέλω. Επειδή έχασα συλλογή 10GB μουσική....
Reply
:iconenideus:
Enideus Featured By Owner Feb 13, 2008
backup?????

(me trwei i periergeia gia tin real time dynatotita tou programmatos aftou..:P kali fasi pantws
-apo tin stigmi pou patas to ok gia decode encode mehri to play,efoson kai to flv prepei na to katevaseis prwta? ..streaming olo afto den ginetai mallon,i kanw lathos?)
Reply
:icondionyziz:
dionyziz Featured By Owner Feb 14, 2008
Μου έκλεψαν τον εξωτερικό σκληρό και το laptop, οπότε όλα τα πιθανά αντίγραφα ασφαλείας χάθηκαν μαζί με τα αυθεντικά.

Από την στιγμή που γράφεις την εντολή και πατάς enter, όλα γίνονται από μόνα τους. Κάνει search στο youtube, πέρνει το πρώτο αποτέλεσμα, μπαίνει στη σελίδα, βρίσκει το flv, κατεβάζει το flv, το μετατρέπει σε mp3, και το παίζει. Δεν είναι streaming, πρέπει να περιμένεις να τελειώσει το κατέβασμα.
Reply
:iconenideus:
Enideus Featured By Owner Feb 15, 2008
!!!!!!!!!!!!!!!!!! krima k adiko.. !!
(clever ;) )
Reply
:icon10grams:
10grams Featured By Owner Feb 11, 2008
:O

....

entaksei dn milaw allo. =P
Reply
Add a Comment: