| View previous topic :: View next topic |
| Author |
Message |
justvervaart Guest
|
Posted: Thu Aug 05, 2004 10:07 am Post subject: Siemens MC60 |
|
|
| The Siemens MC60 works well via iMode (KPN / The Netherland). |
|
| Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Thu Aug 05, 2004 3:10 pm Post subject: |
|
|
| Cool! |
|
| Back to top |
|
 |
justvervaart Guest
|
Posted: Sun Aug 08, 2004 9:50 pm Post subject: sorry |
|
|
Sorry i was a bit short on text with my previous forum entry. Was in a bit of a hurry. I would like to thank pfessis (is this writen correctly, pfessis?). I love the script! It's a real improvement to my site. Looked in to the more complicated version, but that is over my head to implement (PHPmyadmin and so...). Maybe in the future.
greetings,
Just Vervaart
www.xpeditie.nl |
|
| Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Mon Aug 09, 2004 10:06 am Post subject: |
|
|
You are most welcome! It's Peffis though - the nickname
But my real name is Stefan - a name that is probably easier to understand in Holland.
Have fun! |
|
| Back to top |
|
 |
justvervaart Guest
|
Posted: Mon Aug 09, 2004 12:24 pm Post subject: audio not in log |
|
|
Dear Peffis,
on a second look, i have got one thing not working with your script. I'm trying to include audio but it does not appear in the log. (and also not on the server)
I have this in the congif.php.
/home/xpeditienl/sox
But i have no idea if this is the correct path to the sox file, if it even is there. How can i check? I have also tried it with /bin before sox, but since i don't see a bin directory on my server (through wsFTP) a have no clue what so ever).
Would u be so kind to give me a hand?
greetings,
Just Vervaart |
|
| Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Mon Aug 09, 2004 4:05 pm Post subject: |
|
|
You will have to log on to your server and type "which sox" to be able to tell where sox is installed on your system. It might also be missing completely and then you will need to install it yourself. You will also need the "convert" program installed.
...but this is only if you want to convert AMR to WAV. What attachment type do you have? Is it an AMR file or is it some other format? If it's a format that MMS Diary doesn't know about it will most likely store it with a ".bin" extension making it unusable. One thing to mention is however that many plugins (such as Quicktime or Real Player) can today play AMR files directly so if it is that format you won't really need the conversion and you can remove the conversion hook from hooks.php
/S |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Aug 09, 2004 7:58 pm Post subject: |
|
|
Peffis,
to get things clear.
I send an MMS with .amr file (this is a fact, tested via e-mail)
I have removed the two hooks that converse audio. (these 2).
/*********************************************
* amr2wav_hook *
* Used to convert from amr to wav *
*********************************************/
function amr2wav_hook( $contentType, $filename )
{
$dir = dirname( $filename );
$base = basename( $filename, ".amr" );
$tmpfile = $dir . "/" . $base . ".raw";
$newfile = $dir . "/" . $base . ".wav";
exec( DECODER . " $filename $tmpfile" );
exec( SOX . " -r 8000 -w -c 1 -s $tmpfile -r 8000 -w -c 1 $newfile" );
unlink( $tmpfile );
}
/*********************************************
* amr2mp3_hook *
* Used to convert from amr to mp3 *
*********************************************/
function amr2mp3_hook( $contentType, $filename )
{
// Not implemented yet I'm afraid. Use lame
}
Now the .amr file does show up in the directory, but the message does not show up in the blog on my site.
What am i doing wrong?
thx,
Just |
|
| Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Tue Aug 10, 2004 7:51 am Post subject: |
|
|
Have a look in config.php. That's where you define which hooks are to be run on which content type. Take extra care of the definition of the display_hooks array.
One part goes like this:
| Code: |
...
/* Displaying audio */
".wav" => "display_audio_hook",
".mp3" => "display_audio_hook",
".mid" => "display_audio_hook",
...
|
The reason why amr is not there is because I always converted them to wav on my site. I think though that if you only add a line
| Code: |
".amr" => "display_audio_hook",
|
you should get an audio icon for the amr file you have in the directory. |
|
| Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Tue Aug 10, 2004 7:53 am Post subject: |
|
|
...and how did you remove the hooks before? The correct way of doing it is to simply remove the | Code: | "audio/amr" => array(
"amr2wav_hook", // Convert amr-files to wav
"remove_hook", // Remove the amr-file afterwards
),
| lines in config.php. If you remove the actual functions from hooks.php I think you will get an error when PHP still tries to call them. |
|
| Back to top |
|
 |
Guest
|
Posted: Tue Aug 10, 2004 8:53 am Post subject: |
|
|
Dear Peffis,
that did it! I did what you said and eureka...it works!
Thanks a lot, a'm verry verry happy with this.
Good luck,
Just Vervaart
www.xpeditie.nl/fotolog/view.php |
|
| Back to top |
|
 |
Peffis Site Admin
Joined: 09 Sep 2003 Posts: 324 Location: Sweden
|
Posted: Tue Aug 10, 2004 12:14 pm Post subject: |
|
|
| Cool! Have fun! |
|
| Back to top |
|
 |
|