[MPlayer-dev-eng] Re: changing file mid-playback

Alban Bedel albeu at free.fr
Wed Dec 4 15:50:14 CET 2002


Hi David Toso,

on Wed, 4 Dec 2002 18:34:48 +1000 you wrote:

> 
> Hi mplayer developers,
> 
> I am prototyping a PVR (like TiVo) software system with a number of
> differences. I have decided to use mplayer & mencoder as the basis for
> most playback/recording tasks within the software.
>  
> Specifically I am working atm on a "recorded movies" paged-menu
> subsystem. Each page of the menu has (up to) 6 mplayer "objects". Each
> mplayer is playing a different 20-second 352x240 MPEG1 stream. 
>  
> I'll spare you the details of how I've butchered mplayer itself but to
> say:
>   - uses vo_sdl, frameless windows
>
>   - vo_sdl talks directly via socket to hacked wm2 (window manager) so
>   that 
>     initial placement of each mplayer window is pre-arranged. (stops
>     drag artifacts associated with XMoveWindow).
>   - in slave mode, the playback window does not accept mouse/key events.
>   
>   - mplayer starts "paused", so a pause (slave-mode) command must be 
>     given to play the movie. (used for multi-mplayer syncronisation).
>   - various means employed to give input focus to (menu) window _behind_
>   the 
>     mplayer windows, and the mouse has been totally disabled.
Why not just use the -wid flags to have mplayer use a window you created
yourself. That would spare you most of these ugly hacks. Or am i missing
smthg ?
 
> The main problem I am currently having is that moving between "pages"
> of the menu is slow due to the time necessary to rip-down 6 and set-up
> 6 new mplayer instances. (with 6 completely different files btw).
>  
> I am trying to figure out if it would be possible to start playing one
> MPEG file, then at some point later during it's playback, switch to
> another MPEG file, without of course completely restarting mplayer. I
> don't know what the file will be in advance (but will play the rotating
> symlinks game if that is an option :-).
>  
> To do this I was thinking about hacking vo_sdl (sorry author) again so
> that it does not uninit & init. I was guessing I then need to hack
> something in the demuxer. (and add input options for all this).
Just use -fixed-vo if you don't want to uninit/init the vo for each
file. If sdl doesn't support it just fix it that would be better for everybody.
But I see no reasons to go hacking the demuxers.

> Can you provide any advice as to where I should start (and NOT start :-)
> in the demuxer to achieve this? Or if that sounds like a dumb idea, is
> there a better way to do it?
Try the command 'loadfile "filename"' There is also loadlist to load playlists.

> Also, assuming that this would work, can I avoid uninit & reinit of any
> other subsystems? (I can guarantee that movies will all be of the same
> encoding and codec -- most likely MPEG1).
You can try but it's no good idea and not very useful imho.

	Albeu



More information about the MPlayer-dev-eng mailing list