Hello!

I'm trying to use this module to provide a player for audio-archives of a non-profit organization.
I decided to use archive.org instead of other solutions because it seems better (ex vimeo) and because I only want audio.

The problem is that I cannot get it to work, no player is displayed on the drupal site,
only a white frame (it has the dimensions I give it from the CCK field).
I tried both embed code and url (I even tried a direct link to the .mp3 file provided by archive.org)
Video embedding works just fine! I tried it!

Any ideas? Am I doing something wrong or is this a problem that other people have?

thnx in advance,
Bill

Comments

winston’s picture

Hi Bill,

That isn't enough information for me to know what is going on. If possible please provide the following:

- Version of emfield you are using
- Version of media_archive you are using (assuming 6.x-2.2, but just to confirm)
- Please give me a link for your audio item on Archive.org
- If it is possible please give me a link to the page that is showing the "white frame" you refer to

bserem’s picture

Hi Winston!

The info you asked is here:
emfield 6.x-2.4
media_archive 6.x-2.2

I've been doing tests with these links since the organization hasn't upload anything to archive.org yet:
http://www.archive.org/details/HalfADozenSlicesOfJazzCake (audio)
http://www.archive.org/details/ca200_cjazz (audio)
http://www.archive.org/details/20030524-bbs-nasstrom (this is video)

I'm creating a content type and adding an embedded audio field.
I choose 3rd party widget and then check "Archive" from the providers list in the field settings
I leave everything else in their default settings.

here is a link to a node:
http://vlepo.org/node/73
sadly the white-box appears over another white-box but you can easily understand it is there (it shows a loader in the begging and firebug can distinguish it from the rest of the page)

Providing a video from archive.org in the audio-field does display the player (flowplayer), but with no image, only audio!

Should I enable flowplayer module? I had no success with it either.
The only thing that was succesfull was using full-html on the node-body and pasting the embed-code provided by archive.org, but then I don't have the advantages of using emfield and cck.

I'll be happy to provide you with as much info as I can and do any tests

I have no problem providing any information you require in order to help you!
hope I've been of help,
Bill

bserem’s picture

since the site is live and the client was in a hurry about the archive I had to do it the old way:
I pasted the embed code in the body field

I do not want to do it this way, and certainly don't want to give the users full-html capabilities
I prefer to use media_archive and emfield for this job, is there any way I could help you?

sadly I had to remove the sample-node i gave you in the previous post because it appeared on the listings
if you want i can reproduce it, I can create a dev site if needed

winston’s picture

Sorry I haven't been able to get to this yet.

Couple of notes...

1. The two audio items you linked to don't have .m3u files (if you click on the "HTTP Files" link on the details page you'll see all the files). Right now my code looks for that .m3u file to determine the proper mp3 files to get. It is a normal part of the archive.org "derive" command so I don't know why they aren't there for those two particular items.

As an aside, archive.org allows full control over the files in any item. So after archive.org "derives" based on what you uploaded originally (which is predictable), there is nothing stopping the person who posted the item to manually go in and delete or add things. That is part of the reason I look for the .m3u (playlist) file.

So I think my code needs to fall back to looking for the raw mp3 files which is going to be a pain frankly.

If your client is uploading their own audio to archive.org in the normal way (i.e. Archive derives the proper outputs from it), then I think the player should work.

2. The reason the player works on the video item you posted is because if you look at the "HTTP Files" link for that item you'll see that it has both a video file AND an mp3 posted to the same item! As I mentioned once you create an item on archive.org it kind of lets you do whatever you want to it. So although it is odd to see both video and audio in a single archive.org item, archive.org allows it. And that item has the .m3u file that my code is looking for which is why it works.

So for debugging. What I would do is get the embed code from archive.org and put that in a text file. Then do a view source on the embed code that my module is getting and put that in another text file. I need to see what is different as a first step to understanding why it fails for you.

Again, sorry I haven't been able to get to this. I will try to get to it this weekend, but I can't guarantee it.

bserem’s picture

I understand (or i think I do)

this item:
http://www.archive.org/details/vlepo-20101231-vasilopita
is one of the items my client has uploaded
it does have an m3u (on the left side-block) but I still can't make it work with emfield, isn't this m3u the one we need?

later this day I'll try to see if I can locate the info you require for debbuging

and please don't be sorry, I know it is not easy fixing things and I do understand that drupalistas also have real lives :)

winston’s picture

Hmm, the plot thickens.

I'm not sure what is going on here. If you click on the all files link you'll go to this page...

http://ia700406.us.archive.org/35/items/vlepo-20101231-vasilopita/

No .m3u file see?

If you use the json api link to access the details (this link http://www.archive.org/details/vlepo-20101231-vasilopita&output=json&cal...), also you don't see the .m3u file in the files array. It is this json output that my module consumes by the way.

But if on the details page you click the links for the .m3u file then sure enough you get the .m3u file!

I don't get what is going on.

Do you know how to "re-derive" the item on archive.org? If so, can you try that to see if it regenerates the .m3u file as it should (or at least has always for me). The other problem is I'm not seeing the normal file derivatives that would show on an archive item. Usually for an .mp3 file or a .ogg file it would generate a number of derivatives to include 64 bit mp3, .m3u file, etc.

How is this item being created on archive.org? Ultimately there are advanced methods of putting items on archive.org that would allow you to bypass the normal derivation of files (for example a rules.conf or manually uploading/deleting items so bypassing the derive task), but then I don't know how realistic it is for my module to try to guess what files are there consistently.

bserem’s picture

aha... this explains a lot!

I searched some random items in the archive.org and no audio files I have .m3u files
sadly this might not be true for all archives, since I only checked about 5-8 items, but still... none had an m3u

furthermore this is a video I made with some friends: http://www.archive.org/details/FreezeInPatras
and it doesn't have an m3u either

I can't really understand what is happening, but I'll ask in the archive.org-forums to see if there is something I can do to produce an m3u file

in the meanwhile I asked archive.org to derive all files for an item, here you can see the log:
http://www.us.archive.org/log_show.php?task_id=71329312
it does not create _64 version of the file

Target format: 64Kbps MP3
Target file: Andrianopoulos2011-01-12Haiti_64kb.mp3
PHP Class: MP3
Parameters:
Derivation Preference Weight: 16
DERIVATION DISALLOWED BY RULES.... Not adding to plan

and in the whole log-file there is no mention of an m3u file, only xmls are being created
hope this helps a bit

winston’s picture

Yes, looks like possibly they changed their derive procedure.

Since I know the item name from the json download I can of course try to use the drupal_http_request function, but I've had some problems using that function to request things from archive.org.

I see you posted something to the community audio forum. I also posted this to the audio forum...

http://www.archive.org/post/346653/best-way-to-programatically-download-...

Let's see where that goes. If there is some best practice way to do it great. Otherwise, it may take some time as I'll have to go back to either directly hitting the m3u links, or write an algorithm to decide which file to play (which to be honest I'd like to avoid since archive can be a bit random - I'd rather just go with whatever archive is selecting).

bserem’s picture

I don't understand everything from the above post, you lost me at drupal_http_request...

let's see if we get a reply from archive.org
direct linking to m3u doesn't sound bad though, but that might not be true for everybody

bserem’s picture

Winston I believe that you might be interested in this post by civicpixel:
http://drupal.org/node/1055212#comment-4069446

haven't tried the module combination myself yet, I'll do it in the weekend and I'll give any feedback

Rob_Feature’s picture

Category: support » bug
Priority: Normal » Critical

FYI, nearly a year later this still doesn't work. Is this module abandoned? Marking critical since it means it's unusable.

bserem’s picture

Rob I went on with using the embed code provided by archive.org
It works without fancy problems, I just had to teach everbody how to copy/paste the embed code :)

As an alternative you can use soundcloud, it might suit your needs.

Rob_Feature’s picture

@bserem yeah, I found the same thing, the archive.org embed is very simple. Here's what I did:

1. Have an emfield field for this, in case it actually starts working in the future :) Not to mention, by using the emfield you get LOTS of metadada available in Drupal

2. The embed url is the same as the original url, with the exception of 'embed' instead of 'details'. So I did a simple str_replace in my template.php (within a theme_preprocess_node() ) and created my own variable, like this:

$embed = str_replace('details', 'embed', $node->field_audio_offsite[0]['embed']);
$embed_iframe = '<iframe src="' . $embed . '" width="640" height="30" frameborder="0"></iframe>';
$vars['archive_org_embed'] = $embed_iframe;

3. Then, in my node-audio.tpl.php I can use $archive_org_embed until this is fixed. If/When it gets fixed, I can simply change this theming to display the field instead of my custom var.

Hope this helps someone....

bserem’s picture

That is an excellent solution I must say.

Sadly I haven't implemented anything like that. I just use the embed code and it displays the simple player
(you can see it here http://vlepo.org/audio-archive/radiofoniki-basilopita since the site is live for more than a year now).

I wonder, shall we change the status of this issue?

Rob_Feature’s picture

Component: Documentation » Code

back in issue #11 I marked it critical and a bug report...marking the component as 'code' now. That's the best we can do, really.

bserem’s picture

It will best to let the maintainers reply to this. If archive.org doesn't provide them the required data it might be postponed and it is certainly not critical.

I believe that the problem is on archive.orgs side much more than on this module side...

Rob_Feature’s picture

Correct, from what I see it's a change in the api on archive.org's side. However, if a module can't do it's intended purpose for any reason, that's a critical issue. (not placing blame, it's just the state of things..)

venutip’s picture

Rob, thanks for the workaround. I tested this on recordings that consist of a single file, and multiple files, and it works for both. (You don't get the same UI as on archive.org for multi-file recordings, but all the tracks are accessible.)

jenlampton’s picture

There's already a theme function for the archive player, so it's actually a bit easier just to override the output using that theme function. Add this (based on @Rob_Feature's code in #13 above) to your theme's template.php file:

/**
 * Theme override for archive.org media plugin
 */
function YOURTHEMENAME_emvideo_archive_flash($item, $width, $height, $autoplay) {
  $embed = str_replace('details', 'embed', $item['embed']);
  $output = '<iframe src="' . $embed . '" width="' . $width . '" height="' . $height . '" frameborder="0"></iframe>';
  return $output;
}

Then if/when the module ever gets fixed, all you have to do is remove this one function from your theme. No need to mess around in the tpl.php files! :)

Hope this helps someone else :)