Success! More or less....
I 've hacked ClientBroadcastStream and commented
//msg.setBody(rtmpEvent);
//msg.getBody().setTimestamp(thisTime);

and added:
if (!flvreader.hasMoreTags())
       {

           try{
               flvreader= new org.red5.io.flv.impl.FLVReader(new
java.io.FileInputStream("C:\\live.flv"));
           }catch(Exception e) {System.out.println(e);return ;}


       }

org.red5.io.ITag tag = flvreader.readTag();
org.red5.server.net.rtmp.event.VideoData adata = new VideoData(tag.getBody
());

RTMPMessage msg = new RTMPMessage();
msg.setBody(adata);
I added the contructor:

public ClientBroadcastStream(){

       //hardcoded .. testing....
       try{
       flvreader= new org.red5.io.flv.impl.FLVReader(new
java.io.FileInputStream("C:\\live.flv"));
       }catch(Exception e) {System.out.println(e);return ;}


   }
In the file:
FLVReader.java
In the end of the constructor:
public FLVReader(FileInputStream f, boolean generateMetadata)
I added:
if (firsttime)
       {
           lastp = in.position();
           firsttime = false;
           keyframeMeta = analyzeKeyFrames();

       }
       else {
           in.position(lastp);

       }
I also added variable static boolean firsttime
and variable static int lastp

In the end of the method readTag I added the following line:
lastp = in.position();


This works, the problem is the video (on the example videoconference.sef)
plays really really slow........
Any ideas ?
On 3/7/07, joseph wamicha <[EMAIL PROTECTED]> wrote:

This is what I'm currently trying to do:

1. Have a predefined playlist of video flv files start and stop times.
2. Based on the start time, and the actual current time, send the file the 
player is supposed to play to the flash player. Send also the

seek time to the flashplayer (current time - start time) so it knows to seek to 
a given point (This is the stage I'm at currently so I can't
tell you for sure if it will work ;( ).

This perhaps might be close to real time for files being written to not by a 
camera but by a separate application. So the played item

might be afew seconds behind the actual file being currently being written.


>What I'm trying to do i simple:
>I' catch live streamings from the internet, encode them live with ffmpeg,
>and stream them in red5 using flash applications

>So I've a flv file for each streaming I pretend to re-stream in flv... and
>each file growing ..

>How can I achive ?



--
C is forever.
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org


_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org

Reply via email to