DirectShow Player in Windows 10

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

Post Reply
dvermes
Posts: 12
Joined: Wed Nov 02, 2016 1:23 pm

DirectShow Player in Windows 10

Post by dvermes » Fri Dec 01, 2017 5:39 pm

I understand that in version 8.1 of LiveCode, it now uses the DirectShow Player for player objects instead of QuickTime. I am running LiveCode in Windows 10 and I am finding that the player control now only supports WMV and AVI files, not MP4 or MOV files. Is that just the way it is right now?

I did a bit of research on this forum and found a thread where someone mentioned installing third-party codecs to get other video formats working, but I just wanted to confirm that the player control is no longer meant to support MP4 or MOV video files natively?

Also, is there an easy to embed a streaming video (YouTube) into a LiveCode stack? Thanks!

windowsLC
Posts: 26
Joined: Sat Dec 16, 2017 5:58 am

Re: DirectShow Player in Windows 10

Post by windowsLC » Sat Dec 16, 2017 6:15 am

I'm just trying out this new player too, but my findings do show that you have to install a 3rd party MP4 codec. I used LAV Filters pack and it worked fine.

The easiest way to play youtube content in a stack is to use the youtube embed code in a revbrowser instance, its always been like that. It's not impossible to play youtube content in the player, but you have to find a way to get around the way Google hides the actual files URL in javascript. It's not trivial.

Personally, I'm a bit underwhelmed with the new player. Codec install and loss of features make it almost as bad as the old one.
Last edited by windowsLC on Sat Dec 16, 2017 6:20 am, edited 2 times in total.

windowsLC
Posts: 26
Joined: Sat Dec 16, 2017 5:58 am

Re: DirectShow Player in Windows 10

Post by windowsLC » Sat Dec 16, 2017 6:19 am

While we are on the topic, is there any workaround for not being able to export snapshot of the player object and have it contain image from the video???? I've tried it several ways an I just get a blank player image.

bogs
Posts: 1819
Joined: Sat Feb 25, 2017 10:45 pm

Re: DirectShow Player in Windows 10

Post by bogs » Sat Dec 16, 2017 8:39 am

Well, after poking around the webz a bit, apparently you need to import a shot of the player, then export the image.

https://stackoverflow.com/questions/243 ... n-livecode

I tested it in 6.5.2 and it worked, I would imagine it still does. One caveat, the image shows up in the center of the card.
Image
Image

windowsLC
Posts: 26
Joined: Sat Dec 16, 2017 5:58 am

Re: DirectShow Player in Windows 10

Post by windowsLC » Sun Dec 17, 2017 8:50 am

I am talking about the new directshow player object for windows version introduced in version 8.1

In older versions both import and export snapshot of player contained an image of the video playing in the player. Now with the new player the import or exported image has just a blank player, the video playing is not in the image

bogs
Posts: 1819
Joined: Sat Feb 25, 2017 10:45 pm

Re: DirectShow Player in Windows 10

Post by bogs » Mon Dec 18, 2017 3:31 pm

I know exactly what you were referring to, but it is still just a player object. When I read your post I pulled up the Lc I use most often, and tested it out on that.

I got exactly what you described when using export from the player to a file directly, a view of the player object with nothing in it. That is all the way back to 6.5.2 on linux, so I felt it was worth posting about the only solution I did find.
.. I will test it on Windows to see if it is the same since I know there are differences in the way somethings work on both Os's.

I do not have a win box currently running anything later than XP available to test on, however I will attempt to secure one later (probably much later, as it is not one of my preferred Os's) and test it again there.
Image

bogs
Posts: 1819
Joined: Sat Feb 25, 2017 10:45 pm

Re: DirectShow Player in Windows 10

Post by bogs » Mon Dec 18, 2017 9:39 pm

So, again I realize this is not Win10 yet, but it is XP running 8.1.8, which I assume is using directShow, since there is no quick time installed.

I did notice a bit of oddness in getting the shot of the player, but suspect my code rather than something actually being off too much.

Whats going on in the picture? Well, the topRight is the player, the topLeft is the first image taken, the bottomRight is the start of fine tuning the position, the bottomLeft is the snapshot of the video playing. Rather than figuring out what was off in code, I just moved the window around till it got it. The code window should be self explanatory.
Image

Edit - so, Win10, no qt, Lc 8.1.8, alignment still off on the rectangle (it shot from 0,0,playerW/H of the stack), but obviously the player playing the sample movie screen shot to an image on the center of the card, using nothing more than (more or less) the code I linked to wayyyy up there.
Image
At this point, I would guess that when I said ~
bogs wrote:
Sat Dec 16, 2017 8:39 am
I tested it in 6.5.2 and it worked, I would imagine it still does...
I was correct. Good luck with whatever your trying to accomplish.
Image

windowsLC
Posts: 26
Joined: Sat Dec 16, 2017 5:58 am

Re: DirectShow Player in Windows 10

Post by windowsLC » Sat Dec 23, 2017 8:31 am

I just tried import snapshot from player "myplayername" and it did not work for me. I got an image of just a blank player in the middle of the card. I'm using LiveCode Community 9.0 (dp 10) so I will download 8.1.8 to see if that gets it to work, but here are the results I got from 9.0 dp 10

Screenshot of what resulted (taken with an external tool):
Image

Another screenshot where imported snapshot of the whole card then sized the image down. Still no video in the player in the image.
Image

EDIT

Ok so I kept trying having seen that you were using a rect and not just the player or card like I tried. I had trouble getting the player in the shot, but when I did, the video image was there. Pretty wonky but I think I can get something to work

Image

bogs
Posts: 1819
Joined: Sat Feb 25, 2017 10:45 pm

Re: DirectShow Player in Windows 10

Post by bogs » Sat Dec 23, 2017 9:04 am

LOL, I was just coming in to say that very thing, try using rectangle (the rect). I am sure you will figure it out, I just didn't have enough time to plod through it. Glad you got it.

*Edit, it may be reportable as a bug, since it is reproducible.
Image

windowsLC
Posts: 26
Joined: Sat Dec 16, 2017 5:58 am

Re: DirectShow Player in Windows 10

Post by windowsLC » Sat Dec 23, 2017 5:17 pm

Thanks for the help

I got this to work for me (in version 9.0):

Code: Select all

on mouseup
   local myRect, winID
   put the rect of player "playerone" into myRect
   put the windowID of this stack into winID
   import snapshot from rect myRect of window winID
end mouseup
I do also think that not being able to just use object is a bug though.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4468
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: DirectShow Player in Windows 10

Post by jacque » Sat Dec 23, 2017 6:21 pm

It's not so much a bug as a limitation. Images extracted from LC objects are copied from the engine's internal buffer of the object. Players are drawn by the OS and are basically overlays on top of the card, so the engine has no internal representation of it to reproduce.

The "rect" form doesn't use internal buffers, it simply reproduces the actual bitmap currently on screen which is why it works.

There may be a way to incorporate the overlay though, so reporting it might be productive.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bogs
Posts: 1819
Joined: Sat Feb 25, 2017 10:45 pm

Re: DirectShow Player in Windows 10

Post by bogs » Sat Dec 23, 2017 8:34 pm

Thank you for clearing me up Jacque :) If not a bug, she's right, feature request would be the way to go. Something along the lines of "if taking a snapshot of the player, snapshot should default to not using internal buffer" or some such.

For me it would make no difference, and the way you did it works as good as any other.
Image

Post Reply

Return to “Windows”