Page 1 of 2

Theora Video seems zoomed in

Posted: Wed May 27, 2015 5:33 am
by PaulWeston
Hi all,

Been using TheoraTextureObject to put videos on objects, works great...

However, and this is true for theora video GUI controls in my menus as well, it seems as if it kind of zooms into the video somewhat. Like the video is larger than the object it is supposed to be mapping to. This results in clipping of a lot of the frame.

The videos were originally AVI, converted to OGV using Miro Video Converter. There were not many options to choose in terms of the end result, but they play fine as OGV files in VLC Player.

I have not seen anything in Torque about how one could scale the video or the resolution, are there perhaps specific sizes/resolutions/aspect ratios that this control needs the videos to be converted to in order to display properly?

Thanks!

Re: Theora Video seems zoomed in

Posted: Sun May 31, 2015 4:52 pm
by PaulWeston
Did some more testing with this...

If I set the matchvideosize to 1, then it correctly sets the extent of the video control to be the dimensions of the OGV file, but the video itself seems to be bigger.

It's as if the texture size on the object is set to a value smaller than the video, so you only see the center part of the video on the object and not the whole thing.

For example, if I make the video 320 by 240 the window will size to that correctly but will only show roughly 250 by 200. If I make the video 1024 by 768 the window will take up the whole screen which is fine, except the video again only seems to display about 800 by 600 of the video. I always lose the sides and top.

Rather than having to make videos with a hard coded black border of a couple hundred pixels, is there perhaps some way to play with the texture sizing so the whole video will show up?

Thanks
P

Re: Theora Video seems zoomed in

Posted: Thu Jan 07, 2016 5:38 pm
by PaulWeston
Bumping this thread...

Anyone else have success mapping Theora videos onto objects?

As noted above, everything works mechanically, however the video is not scaling properly to the object.

For example, when using a movie screen (rectangular shape), and trying to stick a video on it, the object only shows a cropped portion of the video. Even if I make the source video wide screen format, it still seems to want to texture on as a square, which doesn't fit the movie screen shape, and we lose the top and bottom of the video as well as a bit on the sides.

Is there some secret I don't know about, that lets me force the video to scale exactly to the size of the object we stick it to?

Thanks

Re: Theora Video seems zoomed in

Posted: Sun Jan 10, 2016 4:26 pm
by marauder2k9
can u post a screenshot

Re: Theora Video seems zoomed in

Posted: Sun Jan 10, 2016 6:27 pm
by PaulWeston
Sure...

Taking this video clip:

Image

And putting it onto a Theora video object, will result in this:

Image

Re: Theora Video seems zoomed in

Posted: Tue Jan 12, 2016 2:49 pm
by Nils
Hey Paul, perhaps you should post the script (GUI)

try this if it's different then yours:
matchVideoSize = "0";
position = "0 0";
horizSizing = "width";
vertSizing = "height";

Re: Theora Video seems zoomed in

Posted: Tue Jan 12, 2016 2:54 pm
by Nils
You could also try ffmpeg2theora, getting good results with this converter (lots of parameters)

Re: Theora Video seems zoomed in

Posted: Wed Jan 13, 2016 5:13 am
by PaulWeston
I'm just using the straight theora video on texture, using materials:

singleton TheoraTextureObject(WebStarTrek1_Movie)
{
texTargetName = "MyWebStarTrek1TextureName";
theoraFile = "scripts/web/video/startrek1.ogv";
};

singleton Material(WebStarTrek1_WebStarTrek1)
{
mapTo = "WebStarTrek1";
diffuseMap[0] = "#MyWebStarTrek1TextureName";
emissive[0] = "1";
};

I have a .dae object that has the material WebStarTrek1, the TheoraTextureObject calls the video file.

The settings you gave:

matchVideoSize = "0";
position = "0 0";
horizSizing = "width";
vertSizing = "height";

... would be for the Theora Gui controls, no? Can I use them in the TheoraTextureObject as well?

Thanks

Re: Theora Video seems zoomed in

Posted: Wed Jan 13, 2016 6:42 am
by Nils
... would be for the Theora Gui controls, no?
Sorry, I didn't paid enough attention to notice you place it on objects as material.
Yes, it's for GUI's

UV wrap is in place?

Perhaps a guiDynamicTexture would be a solution, but don't know if that's working or not :|

Re: Theora Video seems zoomed in

Posted: Wed Jan 13, 2016 7:06 pm
by PaulWeston
So, nobody out there is using the Theora on Object stuff?

It's a neat feature, used to be a resource way back when until it was added to stock T3D. So, I figured it should just work, the tutorial video I watched shows the video properly proportioned on the object.

What do you mean by UV wrap in place? Something specific that needs to be done to the DAE model? I thought all that was needed was any basic shape. I just used Blender to make a simple cube with one named material. Didn't know of any specific steps to making an object that will properly display Theora video, there is nothing about that in the tutorials.

I have tried many methods of converting video as well - original video is MP4, convert to MPEG2, then to AVI, then to OGV. Along the way I processed it into standard 320 X 240 size. So, it's not like it's a 16 X 9 aspect ratio widescreen video or anything, it's basic 320 X 240, so why does it no just fill the shape properly?