Problem with Player & Stream Audio.

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

GerardoAgraz
Posts: 3
Joined: Thu Mar 27, 2014 7:29 am

Problem with Player & Stream Audio.

Post by GerardoAgraz » Thu Mar 27, 2014 8:02 am

Hi, Im trying to develop a little app for Mac OS X, that App just have a player control & two buttons, the idea is play an audio stream but I have a very mysterious problem. :shock:

Description of problem:

Scenario 1: I put the player control on the card, in the source (filename) fill with the url h t t p:// server/ file.m3u
In run mode press play on the player control & works perfect.

Scenario 2: I put a button and use this script to play the sound:
set the filename of player "Player" to "h t t p:// server/ file.m3u"
start player "Player" & works perfect, I can play the stream.

The problem begin when I save the changes or create the standalone file, in this moment some fail and don't play the audio stream.
I can play again the audio stream only if delete the player and put a new one. But if I save the changes or create the standalone file, fail again.

Any Idea?

*** Update ***
If I put in properties source the url again, and in run mode press play in the player control it works.... :?: :?: :?:

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

Re: Problem with Player & Stream Audio.

Post by Klaus » Thu Mar 27, 2014 1:36 pm

Hola Gerardo,

1. welcome to the forum! :D

2. No idea, that may be a QuickTIme problem.

Try this:
Set the filename(s) to empty on "opencard" and only
use a script to set the filename.

Also, set the filename to empty and wait a couple of millisecs
before setting the filename again to any other URL.

At least worth a try :D


Best

Klaus

GerardoAgraz
Posts: 3
Joined: Thu Mar 27, 2014 7:29 am

Re: Problem with Player & Stream Audio.

Post by GerardoAgraz » Thu Mar 27, 2014 5:49 pm

Exists other way to play a stream on LiveCode without QT ?

GerardoAgraz
Posts: 3
Joined: Thu Mar 27, 2014 7:29 am

Re: Problem with Player & Stream Audio.

Post by GerardoAgraz » Thu Mar 27, 2014 6:06 pm

The only way to make it works are creating and destroying the object at runtime:

if exists (player "Player") then
delete player "Player"
end if
create invisible player "Player"
set the filename of player "Player" to "h t t p:// server /file.m3u"
start player "Player"

But in the activity monitor the app are consuming 43% of CPU :shock:

I think this is insane, just one button and 6 lines of code 43% of CPU

Ultravibe
Posts: 62
Joined: Sat Jan 17, 2015 12:06 pm

Re: Problem with Player & Stream Audio.

Post by Ultravibe » Wed Aug 05, 2015 12:47 pm

i have the same problem. I created three buttons (Play,Stop and Choose)
Play button:

Code: Select all

on mouseUp
start player "Player"
end mouseUp
Stop button:

Code: Select all

on mouseUp
stop player "Player"
end mouseUp
Choose button opens a standard dialogue to choose the file and then put the result into "fileName" property of player
The problem is: After start playing my stack doesn't responds on any actions: pushing buttons or something other. It looks like CPU overload, but in Activity Monitor i have just 6.2% User CPU load.
Why does the app not responds during play video and what am i gonna do?

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

Re: Problem with Player & Stream Audio.

Post by Klaus » Wed Aug 05, 2015 12:53 pm

What platform?
What version of LC?
What version of QuickTIme, if at all? 8)

Ultravibe
Posts: 62
Joined: Sat Jan 17, 2015 12:06 pm

Re: Problem with Player & Stream Audio.

Post by Ultravibe » Wed Aug 05, 2015 1:08 pm

Mac OS X 10.7.5. LiveCode 7.1.0
Quicktime Version 10.1 (501.29)

Ultravibe
Posts: 62
Joined: Sat Jan 17, 2015 12:06 pm

Re: Problem with Player & Stream Audio.

Post by Ultravibe » Wed Aug 05, 2015 1:09 pm

may be i should try the same app on Windows?

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

Re: Problem with Player & Stream Audio.

Post by Klaus » Wed Aug 05, 2015 1:17 pm

Livecode >= 7 will automatically > set the DONTUSEQT to TRUE because it will use the new AVFoundation framework.
But I'm not sure if AVF is already built into OS X 10.7.5?

Did you set DONTUSEQT back to FALSE maybe on PREOPENSTACK?

And yes, checking the same app in WIndows might help...

Ultravibe
Posts: 62
Joined: Sat Jan 17, 2015 12:06 pm

Re: Problem with Player & Stream Audio.

Post by Ultravibe » Wed Aug 05, 2015 1:36 pm

in Windows it doesn't play at all. I'll try to set dontuseqt to false

Ultravibe
Posts: 62
Joined: Sat Jan 17, 2015 12:06 pm

Re: Problem with Player & Stream Audio.

Post by Ultravibe » Wed Aug 05, 2015 1:40 pm

Unfortunately, nothing changes(((( when i set dontuseqt to false

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

Re: Problem with Player & Stream Audio.

Post by Klaus » Wed Aug 05, 2015 1:47 pm

Is QuickTIme installed on the Win machine?

I forgot that you are using LC 7.1, new in this version: "dontuseqt" is a PROPERTY of a player object
and can be set for each player individually, means one player can use QT and another one the newer AVFoundation
OS X only, of course.

Did you set this for your player?

Ultravibe
Posts: 62
Joined: Sat Jan 17, 2015 12:06 pm

Re: Problem with Player & Stream Audio.

Post by Ultravibe » Wed Aug 05, 2015 2:05 pm

DONTUSEQT isn't a property of player!!!!!!

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

Re: Problem with Player & Stream Audio.

Post by Klaus » Wed Aug 05, 2015 2:17 pm

Sorry, did not work with 7.1 yet, since this is an early Developer Release!

I may have misunderstood this, but I could have sworn I have read this somewhere
on the mailing list or Release notes. :oops:

Ultravibe
Posts: 62
Joined: Sat Jan 17, 2015 12:06 pm

Re: Problem with Player & Stream Audio.

Post by Ultravibe » Wed Aug 05, 2015 2:23 pm

i've tried this on practice and find out that Player doesn't have such property!!!!

Post Reply

Return to “Multimedia”