eugeni.stepanov at gmail.com
Sat May 24 13:41:10 CEST 2008
On Saturday 24 May 2008 04:14:50 The Wanderer wrote:
> Evgeniy Stepanov wrote:
> > On Friday 23 May 2008 06:47:49 JonY wrote:
> >> William Houser wrote:
> >>> I need some programming help. I want to make a self-executable
> >>> movie in a single file.
> >>> What I want to do is compile an exe by myself ( I am NOT a
> >>> programmer..not a good one anyway)...if is it possible to, in a
> >>> programming IDE, embed (embed not call) an already compiled
> >>> executable (such as MPlayer.exe) AND an AVI file, pass the
> >>> parameters to the MPlayer internally and run the movie from
> >>> inside itself similar to a Flash Projecter .exe? I realize, of
> >>> course, that I could just do this with a single folder and batch
> >>> file, but thats not the point. I want a sinlge EXE.
> >> Hi, MPlayer can't do this. You are asking for the near impossible
> >> (as far as MPlayer is concerned).
> > Why not? Just append the movie to mplayer binary and run it on itself
> > with an appropriate -sb option.
> Because you also need to include the "glue" code to do the running,
> which would also need to be prepended to the rest, and which would need
> to contain both the offset for the beginning of the MPlayer binary
> (which binary would, potentially, need to be extracted into a separate
> file in order to be able to be run...) and the offset for the beginning
> of the movie, both of which will be dependent on the total size of the
> glue code itself - and unless you're writing in ASM, producing a final
> binary of a predictable size (even given a consistent environment and
> compiler and so forth) is not necessarily trivial.
> Might not be impossible, but it looks complicated enough that I for one
> wouldn't want to promise to be able to do it, much less if tempfiles
> were not an option.
You don't need any "glue" code, mplayer itself can do all you need. I have not
checked this in Windows, but here in linux this patch works perfectly well.
At least with mkv demuxer, others seem to have problems with -sb.
The magic constant is the offset of video in the resulting binary, it could be
anything larger then the mplayer binary size. Changing it does not change the
size of the binary, so you will need to recompile mplayer just once to get it
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 500 bytes
Desc: not available
More information about the MPlayer-users