Video Formats (Solved... almost)

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Xero
Posts: 152
Joined: Sat Jun 23, 2018 2:22 pm

Video Formats (Solved... almost)

Post by Xero » Tue Jul 31, 2018 12:45 pm

Hi Brainstrust…
Quick question that has probably been asked a thousand times
Livecode Community 9.0 on Windows 10.
I have an issue with loading videos. I have looked through the forum and found the same issue with different formats. So I am a bit bemused...
In my IDE and standalone, I can load the following video formats into a player object:
*.mpg (as in the sample file)
*.avi
*.wmv (even though others haven't been able to!!!)
*.divx (yeah, I know!!!)
and it refuses to play the following:
*.mov
*.mp4
All of these files play on my computer in the system players. But in Livecode IDE and standalone, no play.
So... I got Klaus to have a look at the stack. It loaded everything OK. I take the standalone to my wife's computer (also Windows 10), and it loads and plays everything...
I know there is a problem between computer and chair, and I know there is a problem with Windows 10 (you know... it's just crap)… but does anyone else know if there is something that I need on my computer to get these damn things to work? I am unfamiliar with the inner workings of the video stuff... If it's referencing something on the system that's not there, causing the inability to load??? Drivers??? Codecs??? Players???
Thoughts?
XdM
Last edited by Xero on Tue Jul 31, 2018 1:54 pm, edited 2 times in total.

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Video Formats

Post by Klaus » Tue Jul 31, 2018 1:05 pm

Hi Xero,

please download and install this codec package, then you will be able to play all of these formats
and more in LC:
https://github.com/Nevcairiel/LAVFilters/releases

Best

Klaus

Xero
Posts: 152
Joined: Sat Jun 23, 2018 2:22 pm

Re: Video Formats

Post by Xero » Tue Jul 31, 2018 1:25 pm

Is that a codec pack for the system?
The videos play outside of Livecode, so I already have the codecs...
Or is it a set of codecs for livecode. If so, why will it not play in standalone?
I have same system, codecs etc on my computer as I do on another computer that I tested it on, and it worked there...
Confused.
XdM

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Video Formats

Post by Klaus » Tue Jul 31, 2018 1:33 pm

Hi Xero,

LC uses an older Windows multimedia API and this codec package will update THAT older api to play these formats inside of LC.


Best

Klaus

Xero
Posts: 152
Joined: Sat Jun 23, 2018 2:22 pm

Re: Video Formats

Post by Xero » Tue Jul 31, 2018 1:47 pm

Cool.
movs now playing.
mp4's still giving issues...
XdM

Xero
Posts: 152
Joined: Sat Jun 23, 2018 2:22 pm

Re: Video Formats (Solved... almost)

Post by Xero » Tue Jul 31, 2018 1:55 pm

And...
The "Play step forward player "Movie"" command doesn't work on .mov's. It does with avi's and the other one that used to work...
Thoughts?
XdM

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Video Formats (Solved... almost)

Post by Klaus » Tue Jul 31, 2018 2:12 pm

"play xyz" should not work with players at all, since this is a part of the old (and almost deprecated) "play vc path/to/video" syntax! Check the dictionary for "play xyz..."

You need to "set the currenttime of player x to yyy" to do so with player objects.

P.S.
And please stop this (internet born, school really did not teach this!) "plural with an apostrophe" nonsense, thank you! 8)

Xero
Posts: 152
Joined: Sat Jun 23, 2018 2:22 pm

Re: Video Formats (Solved... almost)

Post by Xero » Tue Jul 31, 2018 2:33 pm

"play player "Movie"" works perfectly well. As does the other commands, except for play step forward and backward with mov files only. All other formats work, just not mov...
If the play player command isn't supposed to work, it's not doing a good job of not working! :D
What other command should be used to play an object?
As for frame-by-frame...should I just get the current time and add one to it and then set the current time to that?
As for my apostrophes, I'm self-taught, and that's how my teacher taught me. Apostrophe's in the wrong place's for everyone's! :lol:
XdM

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Video Formats (Solved... almost)

Post by Klaus » Tue Jul 31, 2018 2:40 pm

Sorry for the confusion!

Before we had PLAYER objects, the only way to play video files was this synstax:
...
## e.g.
play vc "the imported videoclip here.mpg" looping at 100,100
...
play step "the imported videoclip here.mpg"
play pause "the imported videoclip here.mpg"
play resume "the imported videoclip here.mpg"
play step "the imported videoclip here.mpg"
play step back "the imported videoclip here.mpg"
...
## or
play vc "path/to/the/videoclip.mp"
## etc.
...
With PLAYER objects we still can use: play player "your player here"
But should better use the official syntax: START player "your player here"

This is the reason behind my info, you are lucky if "play whatever" still works for some videos inside of a player object, but it is not officically supported!

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”