rejetto forum

RAWR template/player: feature request

Caco · 20 · 7635

0 Members and 1 Guest are viewing this topic.

Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
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?  ;)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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.


Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
RAWR Player can be considered a flash application?  ???


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile

Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
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  ;)


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile

Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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.


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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.
« Last Edit: May 23, 2009, 05:44:30 AM by That_Stevens_Guy »


Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
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


Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
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  ;)


Offline TSG

  • Moderator
  • Tireless poster
  • *****
    • Posts: 1935
    • View Profile
    • RAWR-Designs
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.


Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
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.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
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.


Offline Caco

  • Tireless poster
  • ****
    • Posts: 113
    • View Profile
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...