VB.net + ActiveX problem: Length property NULL

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
hueen
New Cone
New Cone
Posts: 3
Joined: 18 Dec 2006 00:43

VB.net + ActiveX problem: Length property NULL

Postby hueen » 18 Dec 2006 00:54

Hey,

I am using the VLC activeX plugin in a vb.net project and it basically works just fine, except for: The Length property always returns 0 (NULL, zero). In contrast, Position works fine.

How can I get it to work?

I am trying to capture the current video frame as an image. I wanna use either ffmpeg or vlc command line for that. Neither of both can use percentage positions, which is the output of the activex Position property. If I now had the Length, I could calculate my position in (milli)seconds.

Maybe someone has another tip on how to achieve this?


My code that plays a video:

Code: Select all

Dim MRLstring As String = tab1_dirlistbox.Path + "\" + tab1_filelistbox.SelectedItem tab1_AxVLCPlugin.addTarget(MRLstring, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListReplaceAndGo, 0) tab1_AxVLCPlugin.play()
tab1_AxVLCPlugin.Position always returns the position in percent
tab1_AxVLCPlugin.Length always returns NULL


Thanks alot for any help!

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 18 Dec 2006 10:29

this is probably due to the type of media you are using

Tappen
Cone that earned his stripes
Cone that earned his stripes
Posts: 150
Joined: 30 Oct 2006 07:55

Postby Tappen » 18 Dec 2006 19:33

Are you playing an Mpeg Transport Stream file (.ts or .tp) file? I'm afraid Vlc doesn't calculate the length for media types like this even when they're in file form.

hueen
New Cone
New Cone
Posts: 3
Joined: 18 Dec 2006 00:43

Postby hueen » 19 Dec 2006 17:08

The files are mpg encoded with ffmpeg from vob files.

I just tested with vob files directly and it actually works. I will test some more with different file types at some point, but for now I only need to have vob files working anyway. Thanks for the tips.

Tappen
Cone that earned his stripes
Cone that earned his stripes
Posts: 150
Joined: 30 Oct 2006 07:55

Postby Tappen » 21 Dec 2006 00:22

Make sure they're mpeg PS (program stream) encapsulated, rather than mpeg TS (transport stream) encapsulate, if you want to see the Length in Vlc.

hueen
New Cone
New Cone
Posts: 3
Joined: 18 Dec 2006 00:43

Postby hueen » 21 Dec 2006 13:27

Make sure they're mpeg PS (program stream) encapsulated, rather than mpeg TS (transport stream) encapsulate, if you want to see the Length in Vlc.
Can a vob file ever be mpeg TS?

Tappen
Cone that earned his stripes
Cone that earned his stripes
Posts: 150
Joined: 30 Oct 2006 07:55

Postby Tappen » 21 Dec 2006 19:45

A vob file is a vob file. When you transcode (Save/Stream) from vob to mpeg you get to set the encapsulation, TS or PS or whatever. I was just asking which you'd picked.

If you want to do a really good clean job of combining multiple vob files into a single mpeg PS file use VideoRedo. I know it's $50 but it's the only non-free video app I use or recommend, it's that good.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 6 guests