Author Topic: PLAYMOVIE or any alternative  (Read 2425 times)

Offline Minion

  • Mr. Polyvector
  • ***
  • Posts: 229
    • View Profile
PLAYMOVIE or any alternative
« on: 2016-Mar-11 »
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

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4147
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: PLAYMOVIE or any alternative
« Reply #1 on: 2016-Mar-11 »
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.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4218
    • View Profile
    • Portfolio
Re: PLAYMOVIE or any alternative
« Reply #2 on: 2016-Mar-11 »
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.

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3366
  • Integrated Brain
    • View Profile
Re: PLAYMOVIE or any alternative
« Reply #3 on: 2016-Mar-12 »
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 )

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: PLAYMOVIE or any alternative
« Reply #4 on: 2016-Mar-13 »
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.

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3366
  • Integrated Brain
    • View Profile
Re: PLAYMOVIE or any alternative
« Reply #5 on: 2016-Mar-13 »
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)

Offline Paul Smith

  • Mr. Polyvector
  • ***
  • Posts: 109
    • View Profile
Re: PLAYMOVIE or any alternative
« Reply #6 on: 2016-Mar-14 »
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
« Last Edit: 2016-Mar-14 by Paul Smith »
Amstrad CPC 6128, ATARI STE.
Acer  SW5-173 & AMD FX 8350/1050Ti

Offline nabz32

  • Community Developer
  • Dr. Type
  • ******
  • Posts: 307
    • View Profile
Re: PLAYMOVIE or any alternative
« Reply #7 on: 2016-Mar-15 »
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:.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4218
    • View Profile
    • Portfolio
Re: PLAYMOVIE or any alternative
« Reply #8 on: 2016-Mar-16 »
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.

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1543
    • View Profile
Re: PLAYMOVIE or any alternative
« Reply #9 on: 2016-Mar-18 »
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!.