hellkvist.org Forum Index hellkvist.org
Discussions about the free software on hellkvist.org
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting MMS_Diary to display .3g2 files 'stead of file_1.bin

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    hellkvist.org Forum Index -> MMS Diary
View previous topic :: View next topic  
Author Message
gearscout



Joined: 18 Apr 2005
Posts: 22
Location: Atlanta, GA

PostPosted: Mon Apr 18, 2005 7:33 pm    Post subject: Getting MMS_Diary to display .3g2 files 'stead of file_1.bin Reply with quote

Greetings,

I've got MMS_Diary working fine for photos.

But I would also like it to display video files (at least a link that you didn't have to download, rename etc.)

I altered send.php to include "video/3gpp2"=> ".3g2",

...in the array. MMS_Diary successfully renames the file and it's there on the server in the right directory, with the other files.

But it doesn't display in the grey window on the web page with view.php

I've tried various things in displayhooks.php, config.php and hooks.php to no avail.

Suggestions, please!!!

Thank you. Terrific job of scripting this out!
Back to top
View user's profile Send private message
gearscout



Joined: 18 Apr 2005
Posts: 22
Location: Atlanta, GA

PostPosted: Mon Apr 18, 2005 10:40 pm    Post subject: Answering my own Question... Reply with quote

------------
Edit: Skip this and see post below this for better solution, embedding phone video as a Quicktime file within MMS_Diary

Got it to work.

My cell phone is the LG-VX7000.

By altering some script files, the correct filenames display and can be double-clicked to launch QuickTime or RealPlayer to view the .3g2 files.

==================
IN SEND.PHP

$typeToExtension = array( IMAGE_GIF => ".gif",
IMAGE_JPEG => ".jpg",
IMAGE_PNG => ".png",
IMAGE_WBMP => ".wbmp",
TEXT_PLAIN => ".txt",
"application/smil" => ".smil",
"audio/amr" => ".amr",
"x-music/x-midi" => ".mid",
"audio/midi" => ".mid",
"audio/x-wav" => ".wav",
"video/mpeg" => ".mpg",
"video/avi" => ".avi",
"video/mpeg4" => ".mp4",
"application/zip" => ".zip",
ADD---> "video/3gpp2"=> ".3g2",
"text/x-imelody" => ".imy" );

=========================
IN CONFIG.PHP (...around line 100)

/* Displaying other content in lack of other options */
".mp4" => "display_general_hook",
".mpg" => "display_general_hook",
Add---> ".3g2" => "display_general_hook",
".bin" => "display_general_hook",
".zip" => "display_general_hook",
".avi" => "display_general_hook",
);


That's it. Hope that helped someone. The filenames now display as...

file_1.3g2

...and can be opened without the whole download/rename process.

Cheers....


Last edited by gearscout on Sat Sep 24, 2005 10:39 am; edited 1 time in total
Back to top
View user's profile Send private message
Guest






PostPosted: Thu Apr 21, 2005 10:41 am    Post subject: Reply with quote

Cool! Yes, one might need to customize the array if new types are needed. You might also want to have a look at another way to displaying video files by using some plugin, like quicktime. I've tried that in my Peffisaur installation at peffis.com and it works quite well. Have a look at http://peffis.com/message.php?mid=3680 for instance
Back to top
gearscout



Joined: 18 Apr 2005
Posts: 22
Location: Atlanta, GA

PostPosted: Sun Apr 24, 2005 9:00 am    Post subject: Reply with quote

I really like the way the QT module is embedded in your link.

I played around with the config files as have a small .gif file with a QT/3ggp logo displaying on each video entry.

How did you code in the embedded player? Can you upload via the phone and have it distinguish between the jpg files and the 3g2 files so that whenever the file is a 3g2 the player will display?

I'm also trying to get QualComm's "Pure Voice" converter to work...so that the qcp files are converted to .wav automatically and "Voice Memos" can be used to add commentary to photos.

I'm not sure I've got the necessary LIB files on my Linux webhost.

Thanks!
Back to top
View user's profile Send private message
Peffis
Site Admin


Joined: 09 Sep 2003
Posts: 324
Location: Sweden

PostPosted: Fri Apr 29, 2005 5:03 pm    Post subject: Reply with quote

First it's two different software packages - I use Peffisaur which is a later version of MMS Diary you could say - but it can still be done in the same way. Just write a display hook in MMS Diary that acts on 3g2-files and then adds the html needed for quicktime plugin. The html you can grab from that page I showed you for instance.
Back to top
View user's profile Send private message Visit poster's website
gearscout



Joined: 18 Apr 2005
Posts: 22
Location: Atlanta, GA

PostPosted: Sat Apr 30, 2005 12:01 pm    Post subject: Reply with quote

Thanks!

I got it working just as you outlined it.

On the audio front, QT is supposed to play the qcp files made by Qualcomm. That's not quite working, but it's down to version software.

I've got to commend you once again for the concept and design! The family enjoys it, my colleagues at work are amazed, even my wife is amused.

Thanks, Again.
Back to top
View user's profile Send private message
Peffis
Site Admin


Joined: 09 Sep 2003
Posts: 324
Location: Sweden

PostPosted: Mon May 02, 2005 2:13 am    Post subject: Reply with quote

Cool! Have fun with it!
Back to top
View user's profile Send private message Visit poster's website
THEY
Guest





PostPosted: Thu May 05, 2005 5:08 pm    Post subject: File Types Reply with quote

You may also want to add a type for the extension .3gp (video/3gpp) which some mphones use this too (like my Samsung SGH-D500).
Back to top
gearscout



Joined: 18 Apr 2005
Posts: 22
Location: Atlanta, GA

PostPosted: Thu May 05, 2005 11:07 pm    Post subject: MMS_Diary... Reply with quote

Yes, I've embedded the QT player for videos and have a "QT" file link for 3ggp.

Audio doesn't seem to play in Quicktime, altho the format is supported. PureVoice plays it allright but, of course, that won't work on a MAC.

Attempts to convert it to .wav with Qualcomm's converter aren't doing very well, either! But that may require more LIB files for my webhost.

I'm using a VX7000 and when I'm done, I'll probably post the files somewhere.

What I'm thinking of doing next is the Admin module. But I haven't worked out the security issues for my server yet.

Thanks for the info!
Back to top
View user's profile Send private message
they
Guest





PostPosted: Mon May 09, 2005 2:47 pm    Post subject: 3gp movies & audio Reply with quote

Well, I have a Mac and the movies uploaded from my phone through the mms stuff play correctly with sound. Do you have all the parts for Quicktime installed? Or maybe my phone just happens to create a movie that works with Quicktime?
Back to top
gearscout



Joined: 18 Apr 2005
Posts: 22
Location: Atlanta, GA

PostPosted: Mon May 09, 2005 7:06 pm    Post subject: Reply with quote

Yes, QT plays sound with the videos.

I was talking about sound files sent separately, like a voice memo. They're PureVoice qcp files I think.

PureVoice will play them...but there's no Purevoice for a MAC...it may be that QT will play them too, they're on Apple's list of supported formats, but my install of QT won't play them.

No big deal! Wink

I really want to figure out how to "archive" photos from the /admin module.

Cheers,
Back to top
View user's profile Send private message
halochop



Joined: 13 Jun 2005
Posts: 1

PostPosted: Mon Jun 13, 2005 3:50 pm    Post subject: Well Reply with quote

I've tried adding both of the aboves reccomended lines into both the send.php and config.php.

I've done it for both the .3gp, and .3g2 extentions. When I send a mms through mmsdiary it continues to show up as a .bin.

Any thoughts? I've verified that both files have the correct lines added, the file being sent is a .3gp (added in lines for them).

I'm on a Nokia 6230, mmsdiary-0.95
Back to top
View user's profile Send private message
gearscout



Joined: 18 Apr 2005
Posts: 22
Location: Atlanta, GA

PostPosted: Mon Jun 13, 2005 6:54 pm    Post subject: Reply with quote

Halochop,

Here are some altered files that work for me...just showing sections where I changed the files. Note the dual treatment of .3g2 files in config.php

I'm using a VX7000, but found that the named filetype 3g2 didn't work...only when I added 3gpp2 did it work.

Note: We also added display_video_hook to handle video files and embedded Quicktime in the page.

----------changes for config.php--------------------------------

/* Diaplaying images */
".gif" => "display_image_hook",
".jpg" => "display_image_hook",
".png" => "display_image_hook",
/* Displaying video */
".3g2" => "display_video_hook",
".3gpp2" => "display_video_hook",

/* Displaying audio */
".wav" => "display_audio_hook",
".mp3" => "display_audio_hook",
".mid" => "display_audio_hook",
".qcp" => "display_audio_hook",
/* Displaying text */
".txt" => "display_txt_hook",

....etc. etc.

-----------for send.php-----------------

$typeToExtension = array( IMAGE_GIF => ".gif",
IMAGE_JPEG => ".jpg",
IMAGE_PNG => ".png",
IMAGE_WBMP => ".wbmp",
TEXT_PLAIN => ".txt",
"application/smil" => ".smil",
"audio/amr" => ".amr",
"x-music/x-midi" => ".mid",
"audio/midi" => ".mid",
"audio/x-wav" => ".wav",
"audio/vnd.qcelp" => ".qcp",
"video/mpeg" => ".mpg",
"video/avi" => ".avi",
"video/mpeg4" => ".mp4",
"application/zip" => ".zip",
"video/3gpp2" => ".3g2",
"text/x-imelody" => ".imy" );

-----------for displayhooks.php-------------

Note: this particular section is altered so a .3g2 file will come up in an embedded window within the display and controls to play the video on the page with Quicktime



/*********************************************
* display a .3g2 video file with Quicktime
* used to display VX7000 Video Files
*********************************************/

function display_video_hook( $filename ) {
$fname = basename( $filename );
print( "<tr><td height=\"100%\" valign=\"top\" align=\"center\">\n" .
"\t<OBJECT CLASSID=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" WIDTH=\"182\" HEIGHT=\"160\" CODEBASE=\"http://www.apple.com/qtactivex/qtplugin.cab\"> \n".
"\t<PARAM name=\"SRC\" VALUE=\"$filename\"> \n".
"\t<PARAM name=\"AUTOPLAY\" VALUE=\"false\"> \n".
"\t<param NAME=\"type\" VALUE=\"video/quicktime\">\n".
"\t<PARAM name=\"CONTROLLER\" VALUE=\"true\"> \n".
"\t<EMBED SRC=\"$filename\" width=\"182\" height=\"160\" autoplay=\"false\" CONTROLLER=\"true\" type=\"video/quicktime\" PLUGINSPAGE=\"http://www.apple.com/quicktime/download/\"></EMBED>\n" .
"\t</OBJECT>\n".
"<br><a href=\"$filename\">\n" .
"<img border=\"0\" src=\"qt.gif\">\n" .
"</a>\n</td></tr>\n" );
}




Note: At the end of this section of scripting, we've added a clickable icon for 3gpp2 files (qt.gif.) You have to download that...or drop me a PM and include your e-mail address and I'll send you mine. Just a tiny filmstrip ala QT that enables the user to click on it -- which should bring up an external viewer (Quicktime Player) to render the file that way.

Hope something in there helps you!
Back to top
View user's profile Send private message
chhiew



Joined: 23 Sep 2005
Posts: 4

PostPosted: Sat Sep 24, 2005 12:12 pm    Post subject: QT Video Reply with quote

Hi there,

I have followed the mofidification on config/send/displayhook.php, but why my webpage still display part_2.bin instead of the QT embed video?

I'm using nokia3650, i also added 3gp file in the above 3 files but still failed.

Pls help.
Back to top
View user's profile Send private message
gearscout



Joined: 18 Apr 2005
Posts: 22
Location: Atlanta, GA

PostPosted: Sat Sep 24, 2005 12:28 pm    Post subject: Reply with quote

I'm using an LG-VX7000...so I'm no expert on Nokias. But that phone uses 3g2 compressed video and it should work.

If it's still coming up as a bin file, that would mean that send.php is not recognizing and rewriting the file format. That's handled in the $typeToExtension section. Double-check that file and make sure you've got every "=>, in the right place.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    hellkvist.org Forum Index -> MMS Diary All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group