MMS: first shows a picture and then the text

MMS: first shows a picture and then the text SearchSearch
Author Message
Alexandre
Frequent Contributor
Username: Alexd

Post Number: 147
Registered: 01-2008
Posted on Thursday, February 17, 2011 - 01:38 pm:   

How to configure sending MMS messages via NowSMS, to the phone first shows a picture and then the text? I tried all the options, but the phone displays the text first and then the picture.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2921
Registered: 08-2008
Posted on Thursday, February 17, 2011 - 05:00 pm:   

Hi Alexandre,

NowSMS inserts objects in the order that they are presented.

Instead of using the text object, put the text in a file and attach that file after the image.

If you want more full control, you need to create your own SMIL and include it as one of the objects (use a .smil file extension).

If no SMIL is included, NowSMS auto generates some simple SMIL that presents one object per page in the order in which the objects were attached.

--
Des
NowSMS Support
Alexandre
Frequent Contributor
Username: Alexd

Post Number: 148
Registered: 01-2008
Posted on Thursday, February 17, 2011 - 07:36 pm:   

Thanks. For answer. I have some trubles with text encoding, but i think i can resolve it )
Have u any simple tutorial how make own SMIL and use it in NowSMS?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2923
Registered: 08-2008
Posted on Thursday, February 17, 2011 - 08:37 pm:   

The default NowSMS generated SMIL will typically look something like this:

<smil>
<head>
<layout>
<region id="Image" height="100%" width="100%" fit="meet"/>
<region id="Text" height="100%" width="100%" fit="scroll"/>
</layout>
</head>
<body>
<par dur="3s">
<text src="filename.txt" region="Text"/>
</par>
<par dur="5s">
<img src="image.jpg" region="Image"/>
</par>
</body>
</smil>

For the widest compatibility, the default SMIL that NowSMS generates has one object per page (par, short for paragraph defines the page).

text, img, video and audio tags with a src parameter define objects that appear in the MMS message. You'll see text and img tags in the above example. The src parameter of one of these object tags refers to another content object in the message.

It is easy to override this by generating your own SMIL. You then include this SMIL as one of the content objects in your MMS message. (Be sure to give the file a ".smil" file extension, so that NowSMS will recognise it as such.)

For example, to have the image and text display on a single page, you could do make this change:

<smil>
<head>
<layout>
<region id="Image" height="100%" width="100%" fit="meet"/>
<region id="Text" height="100%" width="100%" fit="scroll"/>
</layout>
</head>
<body>
<par dur="5s">
<text src="filename.txt" region="Text"/>
<img src="image.jpg" region="Image"/>
</par>
</body>
</smil>

You could also change the "%" of height for the text and image regions for best results, but be aware that a lot of MMS clients will ignore it.

Also note that when you generate your own SMIL, you should include any text objects as separate files, not using the "MMS Text" parameter of the NowSMS web interface. This is because NowSMS automatically converts the "MMS Text" into a file, but it generates a temporary name for the text file, so it is not possible to reference it in your SMIL.

--
Des
NowSMS Support
Alexandre
Frequent Contributor
Username: Alexd

Post Number: 149
Registered: 01-2008
Posted on Thursday, February 17, 2011 - 09:12 pm:   

Big thanks! After that i add that .smil file in "Send MMS Message" ? And don`t need add text or image file too ?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2924
Registered: 08-2008
Posted on Thursday, February 17, 2011 - 09:38 pm:   

The .smil file becomes one of the files that you include in "Send MMS Message". Any "src=" references in the SMIL (text/image) must also be included as files in the submission.
Alexandre
Frequent Contributor
Username: Alexd

Post Number: 150
Registered: 01-2008
Posted on Thursday, February 17, 2011 - 09:59 pm:   

So i can`t add 2 texts ?

i have error on phone if i add to smill:

...
<text src="filename.txt" region="Text"/>
<text src="filename.txt" region="Text"/>
<img src="image.jpg" region="Image"/>
...

But if i add:

...
<text src="filename.txt" region="Text"/>
<text src="filename.txt" region="Text2"/>
<text src="filename.txt" region="Text"/>
<img src="image.jpg" region="Image"/>
...

I have text and image on one page.

But if i just add smil with

...

<text src="filename.txt" region="Text"/>
<img src="image.jpg" region="Image"/>

...

I have the same result as i put the text in a file and attach that file after the image without any adding .smil file.

It` ok ?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2925
Registered: 08-2008
Posted on Thursday, February 17, 2011 - 10:54 pm:   

Use different unique filenames. Don't include multiple text or image parts in the same page/par.
Brian Snyder
New member
Username: Bsnyder

Post Number: 24
Registered: 11-2010
Posted on Tuesday, February 22, 2011 - 05:58 pm:   

Des, few questions

First off, we're designing a system that we want to utilize your product, however, displaying txt as you state above with the image is what we wish to accomplish.

1) can we modify the now SMS applications default SMIL so that it will send all outbound SMIL in the format you suggested

<region id="Image" height="100%" width="100%" fit="meet"/>
<region id="Text" height="100%" width="100%" fit="scroll"/>

2) if we can't do that, can we at least use the same smile repeatedly? Up to 40+ times per minute with multiple submissions?

I'm not 100% sure how your engine handles the random .txt and .img file names in the MMS out directory and if we were using our own custom file how it would associate the proper unique ID's with ours.

Any help would be appreciated.
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2937
Registered: 08-2008
Posted on Tuesday, February 22, 2011 - 10:30 pm:   

Hi Brian,

There are some limited facilities for modifying the default SMIL, but I would discourage it.

It is a much better idea to generate your own SMIL if the default does not meet your needs.

The default SMIL exists because people (especially new users) like to use the web form for testing, and with some devices the experience is very bad if there is no SMIL.

The default SMIL plays it safe and puts one object per page. This means one text object or one image or one video object per page.

The default SMIL also uses fixed timings for how long each page is displayed. 3 seconds for text, 5 seconds for images. There are configuration settings to change these defaults, but that is at a system level, and unless you are sending the same type of content all of the time ... again, I would recommend creating your own SMIL instead of fine tuning the default SMIL.

I understand, however, that newcomers to MMS are hesitant to mess with SMIL. There is a tendency to assume that it is more complicated than it is (indeed, full SMIL can be, but the basic profile used by MMS is not).

So let me try to give you a real beginner's guide to SMIL.

First, I want to talk about the "MMS Text" field within the NowSMS web interface and the related "MMSTEXT" URL parameter. If you are creating your own SMIL, do NOT use this field/parameter.

There is no concept of a single fixed text field or object within an MMS message. An MMS message can have zero or more text objects.

The primary objects that can occur within an MMS message are text objects, images, and video. (Other types of objects may be supported by some clients, with the most common other types of objects being VCards and Java apps.)

Think of each object as a file. Even if it is a single word of text, it is best to think of it as a file.

Think of an MMS message as a collection of pages, with each page containing one or more of these objects. For the widest compatibility across different devices, never use the same type of object more than once on a page.

I'll take that a step further and recommend that you can include one text object and one other type of object on a single page. So text + image = OK. Text + video = OK. image + video = NOT recommended.

Technically, it is possible to exceed these limits. This is just a recommendation, not a rule. If you do exceed these limits, you will have to define additional regions in your SMIL layout section. And before you get too fancy with regions, you should be aware that things like height and width in the region definitions are just recommendations to the client, and the client may ignore them. This is one of the reasons I recommend keeping things simple, and staying within the limitations that I mention above.

Let me give some examples...

Here is some great SMIL to always use as a header:

<smil>
<head>
<layout>
<region id="Image" height="100%" width="100%" fit="meet"/>
<region id="Text" height="100%" width="100%" fit="scroll"/>
</layout>
</head>
<body>

And here's the footer for the end:

</body>
</smil>

In between the header and footer, you will have <par> sections ... paragraphs, or as I prefer to call them pages.

Each page can have a "dur=" (duration) parameter to specify how long it should be displayed.

This is about as simple SMIL as you can get.

Let me explain the header a little bit more.

The layout section is probably the most baffling. Essentially it is intended to tell the client where objects should appear on each page.

If you are targeting advanced devices, you could get real sophisticated here. But I'd caution against it unless you are prepared to do a lot of testing of your content on different devices.

We're keeping it really simple and defining two possible regions within each page, a text region and an image region.

We are not saying that either one could take up the whole page (100% height and width). That if an image is larger than height and width, the device should try to size it down to "meet" the displayable area of the device. Text, by contrast, is allowed to be scrollable if it is too large to fit on the page.

Generally speaking, this layout will work for text and image on the same page. The order in which the text and image objects are presented within the SMIL for the page will dictate placement within the page (i.e., text below or above the image).

So let's take a look at an example "page" that would occur between the header and footer.

I gave the following example earlier in this thread:

<par dur="5s">
<text src="filename.txt" region="Text"/>
<img src="image.jpg" region="Image"/>
</par>

This would normally display the text above the image on the same page.

To display the text below the image, reverse the order of the "text" and "img" statements.

You can have more than one of these <par> sections within an MMS message.

The "src=" filenames are the file names that you originally gave to your content. This is one of the reasons that I recommend treating a text object in an MMS message as a file.

I hope that helps. I fear I may be making it more complicated than it is.

So let me try to go back to the original question on this thread.

It was about the order of text and images within an MMS message.

By default, if you use the "MMS Text" field in the NowSMS web interface (or MMSTEXT URL parameter), that text appears on the first page, and any images or other objects appear on subsequent pages. To change where this text appears within the MMS message, don't use the "MMS Text" field, but submit the text as a file, and the content objects will be ordered in the order that they are specified in the submission. (E.g, First object is an image, it gets displayed first. Next object is a text file, it gets displayed next.)

If you can live with one object per page, then that's all you need to know.

Where it gets more complex is if you want to add a caption to an image so that it displays on the same page.

If you keep this in perspective, then maybe the above explanation will make more sense.

--
Des
NowSMS Support
Brian Snyder
New member
Username: Bsnyder

Post Number: 25
Registered: 11-2010
Posted on Wednesday, February 23, 2011 - 03:21 am:   

Des,

Thank you so much, and I totally understand what you're talking about. Specifically what we would like to do is have a smile setup to:

display txt
display image

On the same page, always. We aren’t planning on verifying the SMIL at all, other than the image / txt that we will drop in.

Displaying the txt and the image at the same time is vital to what we are trying to accomplish.

I would prefer to use the method of sending the txt with a reference HTTP link to the URL of the image rather than generating a temporary txt file, and SMIL file, and then sending that to now SMS to be sent out. (IE: modifying the default smile prefrences)

Also, wanted to see, you mention that NOW SMS, will generate a unique smile file name (if you use the MMS Text), and this is fine, and I understand you have the MMS outbound boxes.

so based on the sample below:

<smil>
<head>
<layout>
<region id="Image" height="100%" width="100%" fit="meet"/>
<region id="Text" height="100%" width="100%" fit="scroll"/>
</layout>
</head>
<body>
<par dur="5s">
<text src="filename.txt" region="Text"/>
<img src="image.jpg" region="Image"/>
</par>
</body>
</smil>

If i were to generate on my server filename.txt (literally that name), I should be able to create a refrence back.

I guess from a developer side it someone complicates things as I will need to create a unique filename / image name rather than using the default http: reference for an image.

Plus this sounds like if I change my image name (multiple times) each SMIL file sent to now SMS must contain the proper SMIL image name correct?

I apologize if I'm not explaining this properly.

Ideally, we would like to simply modify the SMIL, as format wise it will be the same no matter what, but object wise, we will vary significantly, allowing us to use your MMS Txt variables and drop URL refrences for the images (and have now sms / modify the image to fit the SMIL)

Thank you again!
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2950
Registered: 08-2008
Posted on Wednesday, February 23, 2011 - 10:25 pm:   

Hi Brian,

Unfortunately the default SMIL can't be modified to accommodate text and image on the same page. (At least not at present.)

I understand that it is an extra level of hassle to have to generate another SMIL file every time your content changes.

Some ideas/thoughts on that ...

If you always use fixed names for your text and image filenames, you could put them in different directories, as NowSMS will strip off the path when building the MMS message.

Or, it's a real hack, but it would be simple to write a PHP script that actually generated your SMIL, you just pass the image and text filenames to the script, and it spits out the SMIL based upon your template. (This might be more complicated than I originally thought if you are passing the URL for the SMIL to NowSMS. I think in this case you would have to be sure to URL escape the "?" and "&" in your SMIL URL so that NowSMS understands it properly.)

Another alternative would be to generate your content with MMSCOMP each time you produce a new MMS message file. (http://www.nowsms.com/doc/advanced-configuration-settings/creating-mms-message-f iles) This combines the separate components into a single ".mms" file that you include in your submission.

--
Des
NowSMS Support
Brian Snyder
New member
Username: Bsnyder

Post Number: 26
Registered: 11-2010
Posted on Wednesday, February 23, 2011 - 11:38 pm:   

yeah unfortunantly, the content of the texts changes, and the image we refer to changes as well... Thus because of this, we will need to generate a unique smile every time.

I'm worried slightly about CPU / memory on our server load to do this. (writing hundreds of temporary directories / files minute) on an already fairly active system dealing with normal operations.

Is there anyway you Now SMS could patch that would allow us to change the default SMIL format? I think it would be an excellent feature for those who want to modify this product.

In the mean time I'm going to explorer a few options. I'm not really familiar with MMSCOMP but will read up on that as well. Will that software run on an apache / unix box?

I haven't looked at it much yet.

Thanks for the help.
Alexandre
Frequent Contributor
Username: Alexd

Post Number: 151
Registered: 01-2008
Posted on Thursday, February 24, 2011 - 01:01 pm:   

Hello!

I read some info from http://service.real.com/help/library/guides/realone/ProductionGuide/HTML/realpgd .htm

But it`s so much info, and i have some little questions ))

1. What version of SMIL support NowSMS ? (1.0 or 2.0)

2. How to make a picture, when viewing was in the middle?

3. How to make the text automatically scrolls without stopping the movie?
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2955
Registered: 08-2008
Posted on Thursday, February 24, 2011 - 08:58 pm:   

Brian,

I've talked with engineering, and they've suggested that we could add an option to facilitate the built-in text field being inserted as a caption, on the same page as the first image.

Would that accomplish what you want?

--
Des
NowSMS Support
Des - NowSMS Support
Board Administrator
Username: Desosms

Post Number: 2956
Registered: 08-2008
Posted on Thursday, February 24, 2011 - 09:15 pm:   

Hi Alexandre,


quote:

1. What version of SMIL support NowSMS ? (1.0 or 2.0)




The version is irrelevant to NowSMS. From the NowSMS perspective, a SMIL file is just another object in the MMS message.

NowSMS only knows that there can only be one SMIL object in the message.

Where the SMIL version is relevant is to the MMS client that is receiving the message.

That is why I caution to keep SMIL very simple to avoid unexpected problems.

The SMIL implementation is largely up to the client. (And it is very possible that the MMS client may choose to ignore it completely, as is the case with the iPhone.)

The MMS specification uses a limited subset of SMIL known as Basic SMIL. Actually, as I reread the relevant specifications, it is actual a limited subset of even Basic SMIL 2.0.

You'll find the relevant specification for SMIL use in MMS here:

http://openmobilealliance.org/Technical/release_program/mms_v1_2.aspx

The "Conformance Document" is the one you want ... section 8.

As you will see, it is very limited.

This document describes which elements and attributes are to be supported in MMS, and how they are to be supported. Then refer back to the SMIL 2.0 specification for more details on SMIL itself:

http://www.w3.org/TR/2005/REC-SMIL2-20050107/


quote:

2. How to make a picture, when viewing was in the middle?




You would use appropriate "region" elements to position your objects.

Just keep in mind that positioning that works great on one device may look completely different on another device.


quote:

3. How to make the text automatically scrolls without stopping the movie?




That is most likely going to be client specific.

I would avoid putting text on the same page as a movie ... if you need to include some text, I would put it before the movie.

Note that the "dur" attribute associated with a "par" element specifies how long a page should be displayed. You don't want this "dur" to be less than the length of a video being displayed on the page. (For a video it probably makes the most sense to leave out the "dur" attribute and make the video the last page.)

--
Des
NowSMS Support