forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to play avi/mp4 etc, programmatically

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
polomint



Joined: 11 Mar 2006
Posts: 5
Location: Colne, Lancashire, UK

PostPosted: Tue May 02, 2006 4:05 am    Post subject: How to play avi/mp4 etc, programmatically Reply with quote

Hi,

I'm working on a PSP version of 'Deal or No Deal', but would like to have a video intro for it. Is there a way to play video files through my own code? If anyone wants to know what 'Deal or No Deal' is then take a look at http://www.channel4.com/deal
It's the UK version of a US show.

Thanks in advance for any help,

Polo
__________________
In development: Deal or No Deal on PSP
In development: UK TV Guide on PSP
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Ghoti



Joined: 31 Dec 2005
Posts: 288

PostPosted: Mon May 22, 2006 5:28 am    Post subject: Reply with quote

I also want to know if this is yet possible or if it isn't, i'm also making a game with a movie intro but don't know how to play it.

thanks in advance
_________________
My PSP games:

Boxy II: http://www.ghoti.nl/boxyii.php
Elementals: http://www.ghoti.nl/Elementals.php
Back to top
View user's profile Send private message
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Mon May 22, 2006 5:44 pm    Post subject: Reply with quote

you can use PMPMod, but there are some consequences:
- release your work under GPL licence
- your executables size will raise of about 2MB
- works only on fw 1.5
Back to top
View user's profile Send private message Visit poster's website
polomint



Joined: 11 Mar 2006
Posts: 5
Location: Colne, Lancashire, UK

PostPosted: Mon May 22, 2006 7:21 pm    Post subject: Reply with quote

jonny wrote:
you can use PMPMod, but there are some consequences:
- release your work under GPL licence
- your executables size will raise of about 2MB
- works only on fw 1.5



Thanks for that, I'll have to take a look at it. i'm not too bothered about filesize as there may be quite a chunk of audio/video in my game..
Thanks again..
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Mon May 22, 2006 7:42 pm    Post subject: Reply with quote

found an example that show how to play:

http://forums.ps2dev.org/viewtopic.php?p=32268#32268

(also reducing the max allocation in pmp_decode.h will be probably required)
Back to top
View user's profile Send private message Visit poster's website
polomint



Joined: 11 Mar 2006
Posts: 5
Location: Colne, Lancashire, UK

PostPosted: Mon May 22, 2006 9:15 pm    Post subject: Reply with quote

Ta. :)
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Gary13579



Joined: 15 Aug 2005
Posts: 93

PostPosted: Tue May 23, 2006 5:38 am    Post subject: Reply with quote

jonny wrote:
you can use PMPMod, but there are some consequences:
- release your work under GPL licence
- your executables size will raise of about 2MB
- works only on fw 1.5

Compile PMPMod as a PRX, and let your program pass an argument to the PRX to start the video. Then just release the PRX + source code.
That should keep it GPL-legal, correct?
Back to top
View user's profile Send private message
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Tue May 23, 2006 6:11 am    Post subject: Reply with quote

afaik, in this case only eventual modification in the module need to be released.

the negative point of this method is that, the first time gets called, the mp3 lib takes ~6 seconds to initialize some static data (so you'll have to wait this for every video instead of only for the first one)

actually, if someone want to statically link pmpmod but don't want to release the source, can always ask/discuss this with me (if the project is completely free/there is no money involved, i will probably agree)
Back to top
View user's profile Send private message Visit poster's website
Gary13579



Joined: 15 Aug 2005
Posts: 93

PostPosted: Tue May 23, 2006 10:37 am    Post subject: Reply with quote

Hmm.. Wouldn't it be possible to load the static MP3 stuff in the very begining of your program (pass a special argument to the PRX), then let the PRX run in the background?
Somehow communicate to the PRX, using message boxes (if possible).

Not sure if any of this is possible, just speculation.
Back to top
View user's profile Send private message
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Tue May 23, 2006 5:44 pm    Post subject: Reply with quote

really dunno if it's possible (but the type of iteration you describe probably violate gpl / it's a sort of dinamically linking)
Back to top
View user's profile Send private message Visit poster's website
groepaz



Joined: 01 Sep 2005
Posts: 305

PostPosted: Tue May 23, 2006 6:08 pm    Post subject: Reply with quote

since when is dynamic linking violating the gpl? *shrug*
_________________
http://www.hitmen-console.org
http://hitmen.c02.at/files/yapspd/
Back to top
View user's profile Send private message Visit poster's website
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Tue May 23, 2006 6:46 pm    Post subject: Reply with quote

afaik since always

http://www.fsf.org/licensing/licenses/gpl-faq.html#GPLPluginsInNF
(see: "Can I apply the GPL when writing a plug-in for a non-free program?" & "Can I release a non-free program that's designed to load a GPL-covered plug-in?")

this seems also logical.
suppose you are writing, for example, a video encoder, using the XviD library (XviD is GPLed).
linking it statically or dinamically doesn't change things too much, actually you are creating a single program that use GPL code.

the permitted limit is when your program use GPL code "as an external program".
in the example above: i could write a command line encoder and release it under GPL; after this i could write a GUI for the encoder, in this case i'm not in need to release the GUI under GPL (but the only things the GUI can do are call the encoder with parameters, wait for end and check for eventual return codes)
Back to top
View user's profile Send private message Visit poster's website
groepaz



Joined: 01 Sep 2005
Posts: 305

PostPosted: Tue May 23, 2006 6:59 pm    Post subject: Reply with quote

ehrm. if dynamic linking to something that is not gpl would be a gpl violation, then what about
- binary drivers (links against the linux kernel)
- anything compiled for windows (links against various windows libs)

?

(maybe the link you were giving talks about the v2 gpl, which is a lot more restrictive?)
_________________
http://www.hitmen-console.org
http://hitmen.c02.at/files/yapspd/
Back to top
View user's profile Send private message Visit poster's website
jonny



Joined: 22 Sep 2005
Posts: 351

PostPosted: Tue May 23, 2006 7:23 pm    Post subject: Reply with quote

Quote:

ehrm. if dynamic linking to something that is not gpl would be a gpl violation


?
we are talking about dynamically linking something that IS under gpl (and yes, v2)
Back to top
View user's profile Send private message Visit poster's website
groepaz



Joined: 01 Sep 2005
Posts: 305

PostPosted: Tue May 23, 2006 7:56 pm    Post subject: Reply with quote

Quote:
we are talking about dynamically linking something that IS under gpl (and yes, v2)


err yes ofcourse, link something that isnt gpl with something that is. (if both would be gpl then there would obviously be no problem at all :))

in any case that only proves the point why i dont like gpl (and even less v2)
_________________
http://www.hitmen-console.org
http://hitmen.c02.at/files/yapspd/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group