Jump to content
Search Community

pb with gotoVideoTime method

karmadev test
Moderator Tag

Recommended Posts

Hi,

I found a pb in the VideoLoader Class

When i try to use the method gotoVideoTime where time=0, the video seems to play but there is a black screen, only the sound play...

 

Am i doing something wrong ?

 

private function updateEtape(e:VideoRecetteEvent):void
	{
		trace("updateEtape", "etape:"+e.etape)

		// maj VideoPlaylist
		if (_playlist.etapeAct != e.etape) {
			_playlist.etapeAct = e.etape;
			_playlist.etapeCheck();
		}
		trace("_playlist.etapeAct:"+_playlist.etapeAct)

		// maj VideoEcran
		_ecran.controls.etapeAct = e.etape;
		_ecran.ecranPlayer.gotoVideoTime(e.videoPosition, true);
	}

...
public class VideoRecetteEvent extends Event
{
	public static const COMPONENT_READY:String = "component_Ready";
	public static const UPDATE_ETAPE:String = "update_Etape";
	public static const CONTROLS_SEEK:String = "controls_Seek";
	public static const PLAYLIST_CHANGE:String = "playlist_Change";
	public static const PLAY_PAUSE:String = "play_Pause";

	public var etape:Number;
	public var videoPosition:Number;

	public function VideoRecetteEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false)
	{
		super(type, bubbles, cancelable);
	}
}

Link to comment
Share on other sites

It's kinda hard to tell because i don't see the code where you create the VideoLoader or load it - could you please post a simple example FLA that I can just open and publish to immediately see the problem? It doesn't need to be your production files - just something very, very simple.

Link to comment
Share on other sites

It's kinda hard to tell because i don't see the code where you create the VideoLoader or load it - could you please post a simple example FLA that I can just open and publish to immediately see the problem? It doesn't need to be your production files - just something very, very simple.

 

Thx for your answer, here is a file.

i let you change the link of the video, on my side i use a .mov file

Link to comment
Share on other sites

  • 2 weeks later...

You didn't include your video - when I substitute my own video file it seems to work fine - I see the video playing when I publish. What do I need to do in order to replicate the problem? Is your video an MP4? Remember, Flash cannot just play any .mov file - it must be encoded in a very particular way (MP4).

Link to comment
Share on other sites

Sorry but the video is a bit heavy and the forum server doesn't accept it i think, that's why i didn't attached it first...

Here is a "cleaned" version, you'll see in the screen shot that it's MP4 encoded

 

Hope you could see where i'm mistaking

Link to comment
Share on other sites

The screen shot doesn't help. I tried multiple videos of my own in the place of your video and I could see the video playing without a problem. I need to be able to reproduce the issue, so please (pretty please!) post an entire directory containing everything I need to simply publish and see the black screen that you mentioned. You don't have to post to the forums - if you just want to upload to a URL on your server, that's fine - just post the link here.

Link to comment
Share on other sites

Thank you for your answer

 

Actually i'm not really allowed to put the video i'm using online for download.

But it's not the problem because i've got the same result with any other video, so in order simplify things i tried an other thing:

 

- I've downloader the trailer of TRON (the movie) from apple trailer http://trailers.apple.com/trailers/disney/tronlegacy/ (see the Tron_DL.jpg file to see witch trailer i chose)

- i made to swf that play from 0s and 30s (by changing value on line 20 in the .fla)

 

The first swf (gotoTime_0_sample.swf) doesnt work, i mean i've got the sound by still not the pictures, i only see the Stage background (white).

But the other (gotoTime_30_sample.swf) does work well

 

Can you tell me if it's the same for you

Link to comment
Share on other sites

Ugh - I downloaded the video per your instructions, renamed it to vid_24.mov which is what your code looks for, and published your swf. Worked perfectly. I saw the video every time. Tested it at least 10 times. Are you using stale versions of the classes or something? I'm baffled - this is why I asked for a complete set of files that I can simply publish and see the problem. There are too many variables when you send the FLA but have me get the video and all the GreenSock classes myself. I really wish I could reproduce the problem but I can't. :(

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

Sorry for feedback to you so late, but it was benefic to me because when reading your post again i've noticed that you said "I saw the video every time"

Did you mean that you've only tried launched the videoplayer from nothing every time or did you try to seek it, i mean i don't have any problem to see the video if it isn't already running.

 

The problem is really when I use the method "gotoVideoTime()" if the value is from 0 to 3 while the video is already running

I'm not sure i'm clear, let me know if it isn't

 

I've also made a discovery with the video format

For exemple i've checked the video informations with VLC and found this (both are encoded in H264)

- with a "vid_24 - gotoVideo0_Works.mov" video (see flv_infos.png) : the video stream is at the position 0 (actually it's a .flv file, i've only change the extension name in .mov)

- with a "vid_24.mov" video (see mov_infos.png) : the video stream is at the position 1

 

Just to remind the pb that i have is on only on the video stream i always listen the audio stream in each case from the posotion i've given with the gotoVideoTime method

Hope you could help me with those new informations

 

I'll try to post a sample on a webserver in order you could donwload it

Link to comment
Share on other sites

As I've asked several times, please post the entire directory that includes the FLA and videos and classes that I can publish to see the problem. I'll mention a few more things:

 

1) It is generally considered a bad idea to include spaces in your file names. That's not just for LoaderMax - it's for any URL.

 

2) Are you using the latest version of LoaderMax/VideoLoader? Please update immediately and retry.

 

3) Remember that you can only seek to a time where there's a keyframe in your video, so it completely depends on the way you encoded your video(s). For example, if there are keyframes at time 0, 5, and 10 but you gotoVideoTime(6), it will end up going to the closest keyframe which is 5 in this example.

 

Does that help? Again, it would really, really help if you could zip up a directory with the assets and post it on your server and then send me a link so I can download it and compile everything on my end to reproduce the issue.

Link to comment
Share on other sites

Thanks for your fast answer

 

I will try with poins you've mentionned in particular the keyframes

I'm actually doing tests with different framerates ans ips on may videos

 

I'll tell you the results, and otherwise i'll try to post as classes as i could but it's part of a huge project

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...