Starting videostream at a certain point?
#1
i'd like to know if there's any chance i can start playing an mms:// stream from within the clip? let's say the clip's duration is 10 minutes then i want it to start playing in the middle.

thanks,
td
Reply
#2
i was also looking for this a while back. as far as i know it is not possible now, but it would be very nice if it was added. i believe mplayer has support for this, so perhaps it isn't too much work to add it to the xbmc lib?
xbmcscripts.com administrator
Reply
#3
hi enderw
i was just browsing trough the mplayer lib source (mplayer.cpp) ,
>cmplayer::openfile(const cfileitem& file, __int64 istarttime)

> // seek to the correct starting position
> if (istarttime) seektime(istarttime);


so it is technicaly possible to get this in phyton.
not sure how much work this can be, because i'm a newbie.

had a look in the phyton libs source.
and it seem that phyton adds the file to a phytonplaylist and then plays it off.there is no start time parameter.

enderw how is your c++
:p
Reply
#4
(thor918 @ mar. 08 2005,17:05 Wrote:enderw how is your c++
:p
it's non-existant i'm afraid Smile

hopefully darkie or someone will pick this up though, but i guess there might be more important things to do. perhaps if it isn't much work someone will have a look at it...
xbmcscripts.com administrator
Reply
#5
i'm sure they are busy on dvdcoding.
:bowdown: darkie :bowdown:

have you posted this as feature suggestion on sourceforge?

hope they have time for my suggestion too.
http://www.xboxmediaplayer.de/cgi-bin....t=11084
:bowdown:
Reply
#6
(thor918 @ mar. 08 2005,23:15 Wrote:have you posted this as feature suggestion on sourceforge?

nope, haven't thought about that yet Confusedaint:

you can go ahead and do it if you have time..
xbmcscripts.com administrator
Reply
#7
i just added the seekcommand(seektime, set start pos in millisecounds) to http source and it worked.
but i had some varius results on seeking in a stream.
anyway if we seek the whole buffer we made at the start will go to waste. so it should be better to make a seek before the data is starting to stream.

tried the seek command for mplayer at a quicktime mov stream, and it worked perfect. video jumps instantly to right pos. but when i tried it with a wmv file it freezes and then plays. and if the seek is very long it hangs the xbox.

so if this is going to be added we need to seek before the stream starts buffering.hehe this is not going to be done by me.no pro here :lol:
Reply
#8
all you need to do is find the source within xbmc that python uses to play the stream. there'll be a call to g_application.playfile() with a cfileitem parameter. you need to add the start position to the cfileitem::m_lstartoffset parameter. this is measured in frames (1/75th of a second). you then just have to devise a way to pass the extra parameter in, and you're home free.

good luck!
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
it sound so easy :p
i have touched c++ two times.
so if i have to do it, i need luck and time.
not going to happen, i think.

------------------------------
i now see what you are talking about.
the phyton play ends up in application.cpp
>bool capplication::playfile

but still, it seems to me like alot of work since the phyton play is passed very many times before it arraives at application.cpp
Reply

Logout Mark Read Team Forum Stats Members Help
Starting videostream at a certain point?0