Home Page › Forums › Gold Cart Files & Modules › mp3
Tagged: audio, audio player, audio player doesn't work, instructions audio player, mp3, mp3 player, mp3_functions edit, Sox
| Author | Posts |
|---|---|
| Author | Posts |
| August 7, 2008 at 2:20 am #173467 | |
|
|
Last night I purchased the Gold Cart & MP3 plugin, then uploaded the files to their respective directories. I’m on a shared hosting account, so I can’t install Sox. However, I just plan on instaling Sox locally on my worktation & uploading the preview files manually. I do see the “MP3 Settings” message underneath the GoldCart options. I’ve searched the forums and none of the proposed solutions have allowed me to see the preview MP3 player. I’m running WP 2.5.1, wp e-commerce 3.6.7, & have tried all of the themes included with wp e-Commerce. A few questions: 1. When you upload mp3′s to the wspcpreviews directory, how do you go about associating that MP3 with a specific product? Am I supposed to have an additional button in my products page to choose my preview clips from? 2. Do the MP3 files have to be 30 seconds in length? I’m not a programmer, but I couldn’t see anything in the code restricting the size or length of the MP3 file which gets uploaded to the preview directory. 3. Do I need to edit anything in the mp3_functions.php file if I’m not using Sox? Do the lines which contain code like “WPSC_PREVIEW_URL.”/” or WPSC_PREVIEW_DIR.”/” need to be modified with my actual path location/URL? If so, what is the syntax? There was nothing in the “Quick Start Guide” at all about setting up the audio player, and the instructions in the readme.txt just said to upload the mp3_functions directory underneath the gold_cart_files folder. Any help is appreciated. Thanks |
| August 7, 2008 at 4:46 am #173468 | |
|
Devito |
Hello Khalil… my advice would be to ignore the SoX feature… if it is already installed, then great, but if it is not there then it is more trouble than it’s worth… |
| August 7, 2008 at 4:52 am #173469 | |
|
|
Hmm…well, I made “some” progress. I noticed in the comments section of the mp3_functions that it will also look for a mp3 file based on the hased file name of the product. So as a test I copied the hashed file from the download directory to the “previews” directory and the button now shows up. So do I have to upload the products, then make whatever changes to the hashed mp3 filenames (shorten them to 30 seconds, etc.), and re-upload them to the previews directory? Is there an easier solution than that? |
| August 7, 2008 at 4:54 am #173470 | |
|
|
Thanks Devito, I’ll give that a shot. Looks like we were both posting at the same time. |
| August 7, 2008 at 5:11 am #173471 | |
|
|
Wow…that was embarrassing…LOL. I just tried creating a brand new product and the “Preview” option showed up. I was sitting here thinking how I could have missed that because I tried the same thing yesterday after installing the modules. Turns out that initially I had created an additional “mp3_functions” directory. So my path was: …/gold_cart_files/mp3_functions/mp3_functions/mp3_functions.php Before I realized the mistake, I had created a new product to test with but couldn’t find a preview button. I discovered my mistake last night and corrected the path to look like: …/gold_cart_files/mp3_functions/mp3_functions.php However, at that point I went back and expected to see a preview button for my existing products and it wasn’t there. Hence, the confusion. I didn’t realize that the preview button would only be available for new products. The only thing that concerns me now is that whenever I want to change the voice tags on my MP3′s, I’ll have to create a new product. It would be nice if I could simply assign a different preview file for an existing product rather than having to re-create it. Or I suppose I could copy the files from the download directory to my workstation, use SoX or some other audio program to overly the voice tag, then re-upload them to my preview directory using the same hashed filenames. I’d need to use some type of batch audio processing program to automate it though, especially once I start offering hundreds of beats on my website. Again, THANK YOU DEVITO!! |
| August 7, 2008 at 6:31 am #173472 | |
|
Devito |
Glad it’s working… “batch audio processing program…” now your talking Just to share it around… I recently changed the ‘FlashVars’ (mp3_functions.php – line 40)… name=’FlashVars’ value=’playerID=2&soundFile=$mp3_path’ to something like… name=’FlashVars’ value=’playerID=2&bg=0xf8f8f8&leftbg=0xeeeeee&lefticon=0×999999&rightbg=0×999999&rightbghover=0×006600& I found the best way to pick out a colour scheme was to install ‘Audio Player WordPress plugin’ also… http://www.macloo.com/examples/audio_player/options.html |
| August 13, 2008 at 2:02 am #173473 | |
|
|
Oooh no ! I Allready make 300 title cd in my web, is there any way to put the mp3 file after creating the product ?? It’s take so long to upload the 300 CD Title again. Anybody can help? Thanks |
| August 13, 2008 at 4:48 am #173474 | |
|
Devito |
Hello… 1) UP your preview (MP3) files to ‘…/wp-content/uploads/wpsc/previews’ 2) Open your WP database and browse ‘wp_product_files’… find the product… and change it’s preview column to the name of the file you have uploaded… |
| August 13, 2008 at 6:41 am #173475 | |
|
|
Thanks Devito, but how to open my WP database? using wp-admin or using another program? |
| August 13, 2008 at 8:24 am #173476 | |
|
|
Hendra, Another option might be to: 1. Install Sox on your local machine. – http://sox.sourceforge.net/ 2. Download all of the hashed files in your wpsc/downloadable directory to your local machine. 3. Use the “trim” effect to specify the length of time you want your preview mp3′s to be, then apply it to all of the mp3 files in that same directory. – http://sox.sourceforge.net/soxeffect.html 4. Upload these modified files to the wspc/previews directory. When you load your products page you should be able to see the preview files for each of your products as long as the hashed filenames are the same. Below is a segment of the Sox manual which talks about using the trim effect. I’m not sure what the exact command line is, however you should be able to figure this out from the additional instructions in the manual. ————————— The optional length parameter tells the number of samples to output after the start sample and is used to trim off the back side of the audio. Using a value of 0 for the start parameter will allow trimming off the back side only. Both options can be specified using either an amount of time or an exact count of samples. The format for specifying lengths in time is hh:mm:ss.frac. A start value of 1:30.5 will not start until 1 minute, thirty and ½ seconds into the audio. The format for specifying sample counts is the number of samples with the letter `s’ appended to it. A value of 8000s will wait until 8000 samples are read before starting to process audio. If you’re not on a shared host & can install Sox on your webserver, then I would just copy the hashed files to a temporary directory, apply the trim function, copy the modified files to the preview directory, then delete the temporary one. Good luck and let us know how it works out. - Khalil Guinn aka Lawrence |
| August 13, 2008 at 9:39 am #173477 | |
|
|
Thanks Khalil. but the problem with sox is that i’m using mac. so i can;t use that. For me the best way to trim 30 sec of MP3 is using iTunes, on the Get info Menu, there is option Start and Stop, then i go to the menu convert selection to mp3. (but first i have to rename it or duplicate it, because it don’t change the file name). It’s so flexible. It can be done also on Windows using iTunes. I have done uploaded the mp3 files to the /wp-content/uploads/wpsc/previews’ but still don’t know how to link the mp3 file with the product. I try the admin menu but still cann’t do it. Is there anyone can help me? Thanks |
| August 13, 2008 at 9:49 am #173478 | |
|
|
Dear Devito regarding your second step : 2) Open your WP database and browse ‘wp_product_files’… find the product… and change it’s preview column to the name of the file you have uploaded… do you mean to open the WP database using SQL menu in the Cpanel? Does anybody have tried this way? Please advise me. Thanks |
| August 13, 2008 at 11:02 am #173479 | |
|
Devito |
Yeah I’m frightened to help you break your site… Maybe one of them top WP Gurus shayne or arbie will be kind enough to walk you through it??? |
| August 14, 2008 at 6:41 am #173480 | |
|
|
Hendra, When you uploaded the original mp3′s for your products, they get stored in the wspc/downloadables directory. The filenames are then changed to a hash name. There is a section of the mp3functions.php file that searches for a preview files based on the original hashed filename that is in the wspc/downloadables directory. For example: 1. Use FTP to look at your WSPC/Downloadables directory and find the last file which was added. Now the goal here is to provide small snippets for your previews, so obviously you’ll want to trim the file you placed in that directory to whatever length you want. Trying to use iTunes to modify each one of those 300 files is not practical. So you’re better of looking for a similar audio program like CVS for the MAC that will allow you to write a batch process to cut the file lengths of these files. Your only other choice is to use Devito’s method or delete all the products & recreate them. Otherwise, you’ll need some additional help from the WP Guru’s. I think you’re better off finding a program similar to SoX and following my initial instructions. That way there’s no screwing around with SQL databases, etc. Good luck. <<<<<<< |
| August 14, 2008 at 1:12 pm #173481 | |
|
|
I meant “SoX”, not “CVS” in my last comment. Not sure how that happened, but anyway….hopefully you got the point. |
You must be logged in to reply to this topic.