rejetto forum
Software => HTML & templates => HFS ~ HTTP File Server => RAWR-Designs => Topic started by: Caco on May 21, 2009, 04:54:29 PM
-
Hi,
i recently put up a little video server that acts like this:
- a large video file is uploaded (Microsoft AVI or Canopus AVI)
- when upload is complete, thanks to hfs events , mencoder (command line encoder of Mplayer) is invoked to create a light .flv version of the original file
- when user asks for preview, RAWR player points to the .flv
It would be wonderful if RAWR player had a feature to select a portion of the video and to download only THAT portion.
Well, since now it sounds yet quite difficult. :P
What sounds almost impossible is that the "download selected portion" feature should be able to download the corresponding part of the original file, not the one selected in .flv! :o
Any idea? ;)
-
it may be possible if you create a flash application, ad-hoc.
main problem with AVI is that they are not a stream format like mpeg, and thus it cannot be solved with a "range" http request.
-
RAWR Player can be considered a flash application? ???
-
yes it is (as far as i can recall)
-
Ok, the fact is that i'm not a programmer, maybe i can add that function to RAWR player...where are RAWR guys? ;D
Thank you for #240 ;)
-
not a programmer, i doubt you can
-
Like log out, this is a limitation of HTTP. To achieve dynamic seeking (streaming from a selected point on the timeline) you need to have an RMTP server (FMS, RED5), or there is a PHP script you can run called XMOOV which can replicate a similar scenario. We haven't configured this with the player yet but it is planned for the ActionScript 3 version for regular websites. It would only work with PHP or RMTP hosting. Most of the flash video sites, youtube etc, run something like this to allow for dynamic seeking.
So basically, no its not possible with RAWR-Player and HFS. Sure it would be nice to save upload bandwidth but I researched this quite extensively over the summer break.
-
to seek, IF you know which point in the file it is (as byte), you can just break current http request and start another with range specifying the seek-point as start.
you may even ignore real conversion time-to-byte, and consider that 60% as time is 60% as bytes in the file.
it roughly works.
-
I think if the file carries the bit rate of the video... if it does, and its constant bit rate it might just work... It could be calculated depending on the file size from HFS. But I do not know how to do such a thing yet. Which is why it has been pushed to the AS3 release. We want to make a more reliable/simplified timeline script. The current one was our first attempt and the maths required to achieve it is quite insane. It is definitely worth looking into, it would take flash video streaming to the next level for HFS alone. The problem is you can't access parts of the file that have not yet been downloaded. I have managed to access metadata within the file for resolution and other properties, possibly bit rate is there... it is a limitation with the flash video streaming component.
http://xmoov.com/xmoov-php/ if you can take the time to read this. This is what we would be trying to achieve.
-
What i need , then, is the possibility to mark a start and end point in the progress bar, and a button to "edit" THAT selection only.
i took a look at RAWR-Player-Main and i focuse on this:
/*---------------------------------------------------------------------------//
Counter for playback status.
//---------------------------------------------------------------------------*/
counterFunc = function () {
if(seekActive == false) {
if (counterActive == true) {
secsRaw = Math.round(myMediaPosition/1000);
so i imagined 2 other variables: myMediaSelectionStart and myMediaSelectionEnd...you know what i mean? ;D
-
Shit! First part of my post got lost. I wrote that, since my hfs is in my gigabit LAN, rawr-player load the preview in seconds. From that point i can seek whereever i want, even during playback.
What i need, then, etc etc etc ;)
-
What you are asking is too much work. What I was talking about is common, what you ask is not. We can only make adjustments that suit the masses.
-
Yes, i understand.
And is it also difficult to implement a hot key that sends to the template the current seek point?
Like this: if i press, lets say, ctrl-m while playing, %current-seek-point1% is filled, lets say, with "00:03:47", then if i press another time, %current-seek-point2% is filled with the proper value.
This because i found a command line utility which extracts selection from avi files, using a script where the 2 time values are put into.
-
this is impossible for sure.
i don't know if the flash applet could fill a javascript variable, but not a server-side variable for sure.
-
Oh, i'm getting crazy ;D
The utility i found is called SMM_BatchSplit.exe, you have to pass it a text file with this syntax:
<timeline>
<group name="C:\destination.avi">
<track video="1" audio="1" obey_sample_times="1">
<clip src="C:\source.avi" start="00:03:46.00" stop="00:05:09.00"/>
</track>
</group>
</timeline>
I tested it and worked. It only needs start and end time in hh:mm:ss.ms, but i don't figure out how to retrieve the 2 values and pass them to utility.
I was thinking with hfs.events , in some way...
-
yes, HFS can do it, but SOMETHING must tell it the time.
being HFS on the server-side, and the flash on client-side, it must be done through the net.
the flash can easily communicate the time, it's just that it need to be programmed to do so.
you can then create a hidden folder makexml with a diff template that creates the file {.save.}, and eventually call batchsplit {.exec.}
-
the flash can easily communicate the time, it's just that it need to be programmed to do so
How? Please help me... :-*
Today i searched for players with this capability, now i know it is called "A-B repeat". The best i found is KMPlayer. Unfortunately if i pass %item-resource% to it, it doesn't recognize syntax.
If i do the same with VLC it works as it was in streaming: you can watch the video and even seek forward with a little lag, but not backward.
Instead, RAWR-player does the correct job, buffering the entire video, but it has not "A-B repeat" :'(
-
the flash can easily communicate the time, it's just that it need to be programmed to do so
How? Please help me... :-*
by using a POST request
-
It's hard not to be a programmer ::)
-
It's hard not to be a programmer
It is as to learn to walk, there is the beginning in everything, but when we put one foot inside, it is enough to put the other foot :D