Skip to Content
It is currently June 21st, 2018, 8:15 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: November 16th, 2008, 11:57 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
I am trying to use PAL scripting to have SAM (4.3.6) automatically load and play some mp3 files posted on our server (encore/reruns of previous shows during off hours). I notice a problem however, it sounds as if the player is outpacing the download/streaming of the mp3 file. I'm not sure how to fix this. Should I have the file loaded into the deck to buffer for a longer period of time before playing it? Would that make a difference at all?

What could be causing this?


Top
 Profile  
Reply with quote  
PostPosted: November 17th, 2008, 7:41 am 
Offline
Alumni
Alumni

Joined: December 20th, 2006, 9:23 pm
Posts: 12211
Location: Show Low, AZ
YOu could solve this by keeping copies of these files locally.

_________________
Andrew Cannon
(SVS) Spacial Volunteer Support

WE DANCE AS ONE: A Celebration In Groove
All That Is GOOD In Dance Music from the
70's, 80's, 90's and Now... plus some of the
best DJs from around the world.
http://www.wda1.com


Top
 Profile  
Reply with quote  
PostPosted: November 17th, 2008, 8:15 am 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
SAM does not like having to go searching for files on remote servers,

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 17th, 2008, 12:15 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
WDA1: I am trying to avoid keeping the files locally. If I can successfully stream these files, I can "schedule them and forget them." Sure beats creating a dozen different programs each week.


This came to me in the middle of the night, when I was up to take a leak. :roll:

Whenever I download a file from that server, i get it at 300-400kbs. I'm uploading to our shoutcast server at 128kbs. That tops out my bandwidth.
So here are the questions I have now:

1) will placing the mp3 file into a play deck start it buffering? If so, I can just have the PAL script load it in there a few minutes early.

2) If that is not the case, can I program SAM to download it more slowly so I don't eat up all my bandwidth?

3) If none of that will work, is it possible to restrict our server, or that particular folder, from downloading too fast?

4) if none of this possible, I guess I'll just have to buy more bandwidth from my ISP.


Top
 Profile  
Reply with quote  
PostPosted: November 17th, 2008, 12:28 pm 
Offline
Alumni
Alumni

Joined: December 20th, 2006, 9:23 pm
Posts: 12211
Location: Show Low, AZ
(1) It will only buffer a certain amount, which you cannot adjust.

(2) No. But you could easily find on the net an automated FTP client that could download it in advance so it's sitting locally to play.

Unfortunately with the net, you may get download speeds of 300-400k when you run speed tests, but those speeds can vary during the downloading process. Net congestion, number of hops, etc can really interfere and not give you solid consistant speeds.

SAM prefers to play it's files LOCALLY. Its just that simple. This data needs to be on hand for SAM to grab at a moment's notice non-stop.
If there's anything hindering it from reaching SAM, you will get the results you've been getting.

Something to consider in leiu of getting more bandwidth from your ISP is to purchase a cheap external USB drive for your SAM machine. They're really coming down in price, and wouldn't interfere w/ the hard drive space on your SAM machine. This way, SAM would have access to it locally. A one-time purchase of one of these would certainly beat the additional fees for monthly bandwidth from your ISP.

_________________
Andrew Cannon
(SVS) Spacial Volunteer Support

WE DANCE AS ONE: A Celebration In Groove
All That Is GOOD In Dance Music from the
70's, 80's, 90's and Now... plus some of the
best DJs from around the world.
http://www.wda1.com


Top
 Profile  
Reply with quote  
PostPosted: November 17th, 2008, 12:42 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
OK, thanks for that.

I'm trying really, really hard to make this as automatic as possible. I do not want to have to create a new script or event for every stinking show rerun we want to run. That would be a royal pain, a giant time-sucker.

So, if I can get SAM to download the files automatically and place them into the portable drive, then simply have SAM play those files at the appointed times...

Is it possible to have SAM automatically download files and store them in a certain place? It's gotta be, right?

Do I need to know the specific file name, or can I just tell SAM to grab whatever file is in a particular folder? If I can do that, I can have the DJ's administer their own files. They can erase the old file as they are uploading the new one. Then I just schedule SAM to download from that folder at a time when I'm reasonably certain they've done their job, and...


Top
 Profile  
Reply with quote  
PostPosted: November 17th, 2008, 12:55 pm 
Offline
Alumni
Alumni

Joined: December 20th, 2006, 9:23 pm
Posts: 12211
Location: Show Low, AZ
You can have SAM stream audio files from out on the net, as you know. Several SAM users do this for network newcasts, but those are usually only a few minutes at most in length. Anything long-form would most likely cause the issues you're experiencing.

You cannot get SAM to download them and place them in a portable drive (its just not designed to do it,) but you CAN get something like an Automated FTP client to do it. (There might even be a free one or two out on the net, else you can get them for less than $20 bucks.)

_________________
Andrew Cannon
(SVS) Spacial Volunteer Support

WE DANCE AS ONE: A Celebration In Groove
All That Is GOOD In Dance Music from the
70's, 80's, 90's and Now... plus some of the
best DJs from around the world.
http://www.wda1.com


Top
 Profile  
Reply with quote  
PostPosted: November 17th, 2008, 8:56 pm 
Offline
Junior User
Junior User

Joined: October 4th, 2008, 12:35 pm
Posts: 39
Location: Kaufbeuren, Germany
Then again, you can still use PAL’s WebToFile() to get the file(s) onto your local disc. Seems quite reliable here, but only for HTTP protocol:

Code:
WebToFile('D:\Temp\NextShow.mp3', 'http://some.server.com/shows/show-20081118.mp3');

But I reckon you didn’t want to script, right?

(Still the automated/scheduled ftp stuff is much more stable and SAM-independent.)

_________________
Moonbase: The Problem Solver
I will not give any support for unlicensed or pirated software.


Top
 Profile  
Reply with quote  
PostPosted: November 18th, 2008, 1:05 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
I found an automated FTP client. (http://www.download.com/Sherrod-FTP/300 ... 30267.html)

It's awesome, and it only cost 30 bucks for the super-duper delux version. I schedule my downloads and have them placed into certain files. This program also gives me the option of it only downloading the new material in a server folder, and it will also delete any old material in the destination folder if I want. That is so COOL!

Now, how do I schedule SAM to pull a file from a particular folder and not just a particular file itself? I'm sure it's here in the forums somewhere....


Top
 Profile  
Reply with quote  
PostPosted: November 18th, 2008, 1:22 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
If I understand you correctly you want to pull a random file from the directory. One way to do this is to use the Event Scheduler to load the files into a category then have SAM pull them from that category at the desired time.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 18th, 2008, 1:33 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
I can load files from my hard drive into a category? I can do that at the ES? I'm not seeing how to do that with a straight, plain ES... (Sorry if I'm sounding dense right now)


Top
 Profile  
Reply with quote  
PostPosted: November 18th, 2008, 1:59 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
Yes. The Event Scheduler will accept many PAL commands. You'll have to manually tweak the event but you can use the Add Files event to run a cat.AddDir command.

To prove this, set up a 'Test' category. Open a new 'Add Files to queue' event.
Insert these commands manually:
Code:
Cat['Test'].Clear;
Cat['Test'].AddDir('Full path to directory goes here', False, ipBottom);
Cat.Free;

False means don't load Subdirectories. Freeing the reference is probably a good idea.

At the desired time, the files in the directory will load into the category.

If you do this once or twice a day, you should have an ever-increasing selection of files in the category; as grows the directory, so grows the category. You could also write then schedule this as a script.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 18th, 2008, 3:14 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
So, then I add queue.CATEGORY command to that. I then save it as a PAL script (one for every show I want to rerun, because every show has it's own directory) and use the ES to fire off what show I want, when I want.

I just make a category called "Reruns", and SAM will place the desired file in there just long enough to load it into the queue it, and then clear it from the category, thus making way for the next show I want to rerun. No chance of a double play, since my ftp client will be erasing all the old files as it downloads to the directories.

Beautiful!

Thank you VERY much! This is awesome! Just what I needed.


Top
 Profile  
Reply with quote  
PostPosted: November 18th, 2008, 3:39 pm 
Offline
Alumni
Alumni

Joined: October 14th, 2006, 9:38 am
Posts: 5986
Location: Deep in the heart of the PRNJ
Okay, let me see if I understand this:
Each show is in its own directory; there is only one show in the directory?

I'm missing something but, hey, if it works for ya' I'm glad I could help.

_________________
- Stan Olochwoszcz
A proud licensed SAM user since 2002

Raritan Bay Radio


Top
 Profile  
Reply with quote  
PostPosted: November 18th, 2008, 4:05 pm 
Offline
Senior User
Senior User

Joined: May 1st, 2008, 8:24 pm
Posts: 151
Yup...I have potentially 23 shows that we plan on rerunning. Every show uploads to its own folder on the server, my ftp grabs new files from there and places them on the hard drive into 23 different directories (and erases the existing files, so there will only ever be one file in each...) and SAM places them one-by-one into the Reruns Category, queues them, clears the category, and plays the files.

Since my ftp client erases the old show files in the directories, and SAM clears the "Reruns" category automatically, I don't have to worry about a RE-rerun playing.

I think. I've yet to do a full test of multiple shows and multiple scheduled events. The initial testing with just a couple show files and a couple directories seems to work.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group