PLAYMOVIE or any alternative

Previous topic - Next topic

Minion

Before I start to rip my hear out and tear my own intestines out of my ears trying to solve this problem, does anybody else know of an alternative to the PLAYMOVIE commands ?

I was going to look into streaming a video to a texture, but have no idea where to start with that.

I have several mp4 files I`d like to play on the PC as well as my PI, but the PLAYMOVIE command doesnt play MP4s on either platform, so any help / advice on this would be greatly appreciated.

Thanks

Ian Price

You can convert movies to BMP/GIF files and display as textures. Depends on size of the video, but the results could be OK. Obviously you'd have to rip the sound from the vid and play separately.

You can convert .MP4s to .AVI easily enough too.
I came. I saw. I played.

erico

Yep, the likes of VLC will convert and may split your videos.
I would not know which format works with the pi / pc and the playmovie command though.

mentalthink

I'm not sure if this works, divide all in frames, I try this some years ago, with iPhone and don't works, you need a very great array (perhaps from C++ using 'NEW' ), but I'm not sure.

About audio and frames sync, not problem only mount the video you want, and convert to jpg, then apply sound.

Always I think about do, an application for this work, not for pure video 100%, but something using layers and movements ant the apply in real time over the phone or any application you did with this Editor, perhaps can be a nice solution for do, simple movies... In fact some great games don't uses animation (in 3D you can waste a lot of time only for a few seconds), all if pictures and shapes like in Flash and is a good solution... An example is Deadlight (very cool game, works in WINE too :P )

nabz32

I never tried this,
but i would try playing the movie in a virtual screen
then grabbing it with getscreen to a bmp and apply it to a 3D Object drawn to a new screen.

mentalthink

nabz32 I'm not sure but I think in the sample folder you have a similar project doing what you said.
Getting a image and drawing in real time over the UV mapped cube... I think will the command put in memory the bitmap (I'm not sure how it's called Mem2map or something similar) can be more faster... Not is complicated in fact you can do it saving the bitmap each x milliseconds on drive and using over the 3D model... will be slow (perhaps in SSD drive is very faster, not sure about this)

Paul Smith

#6
I tried to modify my fake plasma code to run an AVI to play,grab, resize then draw onto the spinning cube ( GLBASIC v14.106 is not working for this anymore.the exe in the folder run OK but when compiledagain  behave different.Any Ideas? )


If I get it to work i'll upload it.
Just Remembered I did this with DarkBasic not GLB, just found the source code.It can't be done with GLB playmovie or loopmovie as it will pause your program to run the Movie file.


http://www.glbasic.com/forum/index.php?topic=10074.0
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD RYZEN 7,RTX 3060TI

nabz32

Quote from: Paul Smith on 2016-Mar-14
It can't be done with GLB playmovie or loopmovie as it will pause your program to run the Movie file.
Thats interesting to hear and good to know.
Thx for the clarification Paul Smith, saves me valuable time testing this myself :good:.

erico

Maybe if your videos are not too long, you could dump it as an image sequence, loadanim it and use virtual screen texture.
I think that is what Mental also said. You would have to manually sync audio.
I never tried it to be sure.

matchy

Specifically, why the need project a video file to a texture bitmap and is it to be distributed?

The SHELLCMD can always be used to simply launch and play with omxplayer (local rpi), mplayer, mediaplayer (local win) or vlcplayer, perhaps even batch files to process thumbnails and sequences if need be!.