PDA

View Full Version : How to play a .vob file in a video object.


richsmith
04-14-2005, 09:42 AM
I have a .vob file (a DVD video file) that I want to play upon a button click. Currently I can do this as an open file action which spawns an outside player.

Problem is that I need to pause the background music (which is easy) upon clicking but I need to resume the background music once the video has finished. I've read some threads here and noted this is difficult if not impossible when using an outside player.

So I want to use an internal player but can the internal video object play a .vob file?? I can't seem to select it when using a video object.

Any help would be appreciated.

Thanks. :huh

longedge
04-14-2005, 12:43 PM
How about re-encoding your mpeg2 to a filetype that can be handled by AMS natively such as mpeg1 or wmv. Should all be straightforward then.

rhosk
04-14-2005, 02:21 PM
Believe it or not, you could change the extention to mpg, and it will work fine in both, the Media Player Plugin and the Video Object (kinda cheezy though).

You "still" have the problem of proper codecs on the end user's system. To alleviate all problems, I would definitely take longedge's advice. mpeg1, high bitrate, your best choice for cross platform compatability.

richsmith
04-14-2005, 10:31 PM
Well the problem is guys that the video file originaly was a large .avi file. I had to re-encode it into a .vob file as it was the only file type I could find that would allow the video to run smoothly from a disc. In fact the original .avi file was so large that it wouldn't even play properly from a laptop hard drive without stuttering. It would play fine from a desktop so the only reason I could think of was the laptop 5400rpm drive versus the 7200rpm on the desktop, must be the data rate wasn't up to it on the laptop.

Anyway, to alleviate this I converted it to a .vob file so it would run smootly from the hard drive as well as a disk. So how does an mpeg1 compare in size and quality to a .vob file??

longedge
04-15-2005, 01:22 AM
If it were me I'd probably choose to encode to wmv - Microsoft do a free utility Windows Media Encoder (http://www.microsoft.com/windows/windowsmedia/9series/encoder/default.aspx) which I've used in the past to great effect. Mpeg1 is the one which offers the greatest compatibility but at (I believe) the cost of some quality and increase in file size.

If you've encoded to dvd standard then you've got an mpeg2 which won't play on any system that hasn't got a dvd playback utility installed such as Power DVD. I think it's something to do with the licensing of the codec required. I wouldn't ever encode to this unless it was to an actual dvd.

Thats my my 2 cents worth (twopennuth as I would say) :) but there are far more knowledgeable people around here who might throw in something else.

rhosk
04-15-2005, 03:57 AM
wmv is a fantastic format (quality is awesome with regard to file size), but be aware that anything below version 7 of the Windows Media Player and again, you have compatability issues. In other words, some users with WIN98 and below may run into problems playing the file if they've decided not to upgrade the player. Version 6.2 (the most widely used on the older systems) will not play wmv unless they at least have the ActiveX installed. This is part of the reason I submitted a feature request to allow the different versions of Media Player in the dependency checks. There are ways to check for the > 7 version, but dare I say the ol' WIN95 machines (I believe) can't handle version 7.

You could probably get away with encoding to mpeg1 and just up the bitrate slightly to attain the quality you want. If the source file is in great condition, there shouldn't be any problems as far as quality. The file size will definitely be smaller (e.g. 6-9000kbps [mpeg2] vs. 1-2500kbps [mpeg1]).

Lots of variables here, though.

yosik
04-15-2005, 08:08 AM
Richsmith,
A couple of ideas/suggestions:
1. What about Mpeg1 instead of Mpeg2 (which is the vob format)? At 1800kbps or so, you can get quite a nice picture. And it is a common denominator format.
2. If not acceptable and you NEED to use an external player, here is a suggestion for interactive action with outside (out of AMS, I mean) programs. I used that a couple of times and it does work well:

a. create a hotspot object covering your whole AMS app.

b. make it invisible in its attribute window.

c. When clicking on the button which launches the external program, add an action which makes the hotspot visible and another which pauses your music.

d. On the hotspot action tab, under onEnter, add 2 actions, one which resumes your music playback and the other which hides the hotspot.

That's it!

Anytime you finish playing your video (or close any external program), thus making your AMS app the focused window, the hotspot will react to your mouse and "do its job".

Good luck

Yossi

richsmith
04-17-2005, 10:03 AM
Hi yosik, thanks for the tip on the hotspot. Just one thing though, how do you make a hotspot "invisible" in the attributes window? I can't find any option to do this? Do you mean uncheck the "enable" box?

I have now done what you suggested with the hotspot except by default it is disabled. When a button is pushed to access an outside application first the background music is paused, than the app is opened and then an action is set to enable the hotspot. Once the app closes the hotspot is set to play the background music and then disable itself.

Well this should work fine except what i have now found is that when the button is pushed the music stops, the app starts to start but because of the system lag in opening the hotspot is re-enabled before the app is open and the cursor which is still over the hotspot reactivates the background music.

Result is outside app open, backround music still playing!

Is there a way to pause the hotspot reactivation UNTIL the app is fully open??

Thanks.

yosik
04-17-2005, 02:44 PM
First of all, yes I meant disbled..sorry.
As to the delay, try one of these:
either application sleep (after the hotspot action) for a few seconds, or miimize your application window.

Yossi

richsmith
04-18-2005, 09:33 AM
The application sleep did the trick nicely thankyou. Although the sllep command is ran before the hotspot action is enabled.

Thanks yosik. ;)