Play a simple video? help plz (SOLVED)

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,606
Reaction score
1,399
First Language
French
Primarily Uses
RMMV
Hello i just try to play a video to test, but i can't not succeed.
Do i miss something.
Here is approximately the basic code
PHP:
        var vidTexture = PIXI.Texture.fromVideo('video/01.mov'); // load file path rmmv as texture
        var vid = vidTexture.baseTexture.source; // shortcut to .VideoBaseTexture method

        var vidSprite = new PIXI.Sprite(vidTexture); // make a pixi sprite with the video texture
            vidSprite.width = vid.videoWidth, vidSprite.height = vid.videoHeight; // Hum, ?? why vid WidthHeight, is 0 ??

        var myPicture_WillContainVideo = SceneManager._scene._spriteset._pictureContainer.children[pictureID]; // example picture 5
        myPicture_WillContainVideo.addChild(vidSprite); // Add the sprite Video in the picture sprite container as children

        vid.play(); // play Video !
What I do, not correct.
Yet it works here. !
https://pixijs.github.io/examples/#/basics/video.js

thank a lot for help guy and girl
here the video i try to play !
If anyone can try to tell me what I do wrong.
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,036
Reaction score
6,693
First Language
German
Primarily Uses
RMMV
please give more details about the video. In most cases this is a problem of the data and not of the code.

And the most common errors in the data are:
1) video size too big
The maker can only display videos up to the game's screen size. If the video is sized 1024x768 it can't be displayed in a game screen of 816x624.

2) wrong video codec
If the video is encoded with a codec the engine doesn't know, then it can't be decoded and played at all.
This is especially a problem if you tried to get the movie filesize down by using more effective but also more exotic codecs
 

Dr.Yami

。◕‿◕。
Developer
Joined
Mar 5, 2012
Messages
994
Reaction score
738
First Language
Vietnamese
Primarily Uses
Other
nw.js only supports webm format by default. Try to convert the video to webm format and try again.
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,606
Reaction score
1,399
First Language
French
Primarily Uses
RMMV
thank @Andar for fast
2) wrong video codec
I had a little doubt about the codecs but I checked and tried with several video.
I also downloaded the official video of the PIXI website, but not work.

1) video size too big
i try 2video
232Ko 01.mov
i use codec with aftect effect to get alpha chanel with mov
codec are quicktime
2Mo testvideo.mp4
520kbit/s
h.264
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,606
Reaction score
1,399
First Language
French
Primarily Uses
RMMV
nw.js only supports webm format by default. Try to convert the video to webm format and try again.
Thank you, I just made a try, convert, and it works.
I find it a shame that this is the only codec and container taken into account.
Especially that the compression is rather heavy on this container.
example my 2 Mo is now are 10 Mo !

And there is no alpha channel for this kind of video.
I suppose i will have to play, with the different blend modes
 

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,606
Reaction score
1,399
First Language
French
Primarily Uses
RMMV

Dr.Yami

。◕‿◕。
Developer
Joined
Mar 5, 2012
Messages
994
Reaction score
738
First Language
Vietnamese
Primarily Uses
Other
It's for mobile build. For the PC build (not web build), they use nw.js as client, and nw.js disable mp4 mov etc by default because of the LICENSE thing.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

The three if us sat to watch "The day India Burned" to take notes. 10 minutes in, one went to sleep. I wanted to finish it but I couldn't stop tearing up (yawning makes me cry) so after 40 minutes I gave up. But now I'm not sleepy anymore :0
OH... OKAY... Well, VX Ace certainly never did THAT before. :mad:
Been busy with non-RM stuff, can't wait to get back into making a game.
i'm not only drawing girls tbh
i like grubby old man
Kes wrote on Chef's profile.
I have deleted your profile post as our Rules are quite clear that you may not use them to advertise non-RM products, nor may you give a link to anything that solicits payment for you.

Forum statistics

Threads
93,609
Messages
913,898
Members
123,162
Latest member
Tegima
Top