PDA

View Full Version : What scripting language should I use



mxd
2nd April 2009, 09:30 AM
Hi Guys,

in the midst of my jukebox, I now have all my songs (mp3's) tagged and sorted, now I need to "move" my music vids, I'll explain below.

The structure

Artist / Album / song1.mp3

I now need to have
Artist / Album / song1.mp3
Artist / Album / song1.mpg


I have got all my music vids like the following
Artist / vids / song1.mpg


e.g.

from
ACDC / Back in black/back in black.mp3

ACDC / greastest hits/back in black.mp3

ACDC / vids/back in black.mpg

to
ACDC / Back in black/back in black.mp3
ACDC / Back in black/back in black.mpg

ACDC / greastest hits/back in black.mp3
ACDC / greastest hits/back in black.mpg

ACDC / vids/

What I need to do is write a script to perform something like the following algorithm.

N.B I have been on the dark side for 5 yrs so haven't written anything for a while (the 5 yrs before that was all embedded so no files, no OS, etc..).

What do people think will be the best for wrting this script Python, Perl, CScript, un*x (find, regex, sh etc..)

foreach vids folder in mymusic
gotOne :=false;

foreach vid in folder

foreach albumFolder in artistAlbumFolder

foreach mp3 in albumfolder

if vid = mp3 then
gotOne := True
copy(file=>vid, to albumfolder)
end if

end foreach mp3

end foreach alumfolder

if gotOne
delete vid
end if
end foreach vid

end find vids

Brad
2nd April 2009, 09:50 AM
How many vids do you have? I have about 800 and I did it by hand LOL!

For what your doing I'd just write a batch file.

With the music videos I just created a folder for Artist and dumped all the relevant vids into it. Separate parent folder to my music:

D:\Music\Artist\Album\song-title.mp3
D:\Musicvideo\Artist\song-title.avi

Cheers,
Brad

mxd
2nd April 2009, 10:12 AM
Hey Brad,

I think it's a could of thousand, I need the structure I mentioned as I think it satisfies my juke s/w setup best, I display the albums you select your song and if there is a vid file there (same name) it will play that else it will play the mp3. I think I have a couple thousand vids ?

Matt

Brad
2nd April 2009, 11:11 AM
What software are you using for your jukebox? Also how does it handle playing a video and at the same time allowing you to view the menu interface?

Cheers,
Brad

mxd
2nd April 2009, 12:26 PM
I am using this one
Webpage =>
http://unclet.arcadecontrols.com/Jukebox/index.html

you can access the menus while playing a vid, the vid can be on another screen or the one screen

Brad
2nd April 2009, 12:42 PM
Ahh okay. I looked at that when it was first released and didn't like the look. I should look again.

I'm using freejuke and love it but by default your best outputting music videos to a 2nd display which also makes sense for me as my display is angled down and you could barely see the music video unless your standing in front of it.

cheers,
Brad

mxd
2nd April 2009, 02:12 PM
this is mine (in progress) on 1 screen

http://www.youtube.com/watch?v=XfzXRX19zn8&eurl=http%3A%2F%2Fforum%2Earcadecontrols%2Ecom%2Fi ndex%2Ephp%3Ftopic%3D89494%2E0&feature=player_embedded

forgot to mentino after a <configurable> amount of idle time it will revert back to the "media" screen.

mxd
2nd April 2009, 07:37 PM
I'm using tag&rename, whicg can add tags to mpg files, so I just renamed the .avi to .mpg, created tags (from filename mask) and then moved (through tag&rename) the files to the appropriate position.

When I have all the vids in the "correct" location I plan on going to each album, that has vids, then copying the other tag info (year, genre, album) from one of the songs to all of the vids. That way f I need to move and rename all again it will do it automagically for me.

David_AVD
2nd April 2009, 07:40 PM
When I have all the vids in the "correct" location I plan on going to each album, that has vids, then copying the other tag info (year, genre, album) from one of the songs to all of the vids.

Can you really add tags to an mpg file? (or did I misunderstand the above?)

mxd
2nd April 2009, 08:01 PM
I can ? it still plays, not too sure if any other tager can read it though ?
see picy

David_AVD
2nd April 2009, 08:02 PM
I can ? it still plays, not too sure if any other tager can read it though ?
see picy

Hmmm. I'll have to try that!

Brad
2nd April 2009, 09:32 PM
freejuke has an auto tag facility for videos. It doesn't really tag them but creates a small tag file that the fe uses.

Brad