Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8705471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:21:59+00:00 2026-06-13T03:21:59+00:00

Finally I created a stream video recorder flash application and its simple Red5 backend

  • 0

Finally I created a stream video recorder flash application and its simple Red5 backend but of course Red5 jokes me again. Most of the times the recorded videos are corrupted, cannot play them back without randomly stopping-resuming, hanging out the player .. and me as well. Why is it doing this?

I researched the internet and found this issue but no solution! I tried not to record the video instead switch it to live and attach an ffmpeg to do the dirty job but naturally the ffmpeg couldn’t connect with the following error message on the red5’s output:

Error executing call: Service: null Method: play Num Params: 1 0: my_little_stream … blabla bla

Before I try out integrating the Xuggler stuff what I truly don’t want to I ask you, what to do, can I attach the ffmpeg somehow or is there a configuration in the red5 server I should change.. or anything! Thanks!

Edit: I’m using Red5 1.0 RC2

Edit#2: I compiled the oflaDemo app from trunk sources with red5 1.0.0rc2 server files then created a live stream with a simple flex app just to try out if ffmpeg recorder worked. Now it could connect to red5 but the result is the same! The videos seems to be corrupt…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T03:22:00+00:00Added an answer on June 13, 2026 at 3:22 am

    *But what should I put into the packetReceived() function? *

    I add this in a separated answer to highlight correctly:

    To write the packets to disk, you need:
    1) the packet,
    2) convert the packet to an ITag
    3) Obtain an instance of a ITagWriter

    1) the packet data
    http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/flvrecord/listener/StreamVideoListener.java?view=markup
    around Line 50

    public void packetReceived(IBroadcastStream broadcastStream,
      IStreamPacket streampacket) {
    
    }
    

    streampacket => the packet you want to write to disk.

    2) write the packet by converting it to a ITag

    http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/flvrecord/listener/async/StreamVideoWriter.java?view=markup
    around Line 90ff

            IoBuffer data = streampacket.getData().asReadOnlyBuffer();
    
            if (data.limit() == 0) {
                return;
            }
    
            if (startTimeStamp == -1) {
                // That will be not bigger then long value
                startTimeStamp = streampacket.getTimestamp();
            }
    
            timeStamp -= startTimeStamp;
    
            ITag tag = new Tag();
            tag.setDataType(streampacket.getDataType());
    
            // log.debug("data.limit() :: "+data.limit());
            tag.setBodySize(data.limit());
            tag.setTimestamp(timeStamp);
            tag.setBody(data);
    
            writer.writeTag(tag);
    

    3) Obtaining an instance of a Writer

    http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/flvrecord/listener/async/BaseStreamWriter.java?view=markup
    around Line 90ff

    protected ITagWriter writer = null;
    
    private void init() throws IOException {
        file = new File(OmFileHelper.getStreamsSubDir(this.scope.getName()), this.streamName + ".flv");
    
        IStreamableFileFactory factory = (IStreamableFileFactory) ScopeUtils
                .getScopeService(this.scope, IStreamableFileFactory.class,
                        StreamableFileFactory.class);
    
        if (!this.file.isFile()) {
            // Maybe the (previously existing) file has been deleted
            this.file.createNewFile();
    
        } else if (!file.canWrite()) {
            throw new IOException("The file is read-only");
        }
    
        IStreamableFileService service = factory.getService(this.file);
        IStreamableFile flv = service.getStreamableFile(this.file);
        this.writer = flv.getWriter();
    
    }
    

    So this is a rough walk through. In that sense you can then go ahead.

    The
    http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/data/flvrecord/listener/async/BaseStreamWriter.java?view=markup

    class also contains a Queue to collect the packets.

    IStreamPacket.getType == 9 is video and I think 8 is audio (but you need to verify that).

    Sebastian

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a simple server client application, but i think there is
Finally deployed my ruby on rails 3.2 app but when trying to open it
Finally figured it out thanks to One Mad Monkey, but forgot quotes on my
I finally figured out how to implement pg_search's multisearch feature. But I'm having trouble
My web application generates an XML file. I'm using a Struts2 stream result to
Currently have a DataTable, but wish to stream it to the user via a
I have to create a client/server system to stream video and audio. It would
So I have access to a dedicated server and want to finally create my
I have a JSP custom Tag <ex:UndorderdList list=<%= MenuItems%>></ex:UndorderdList> which finally creates unordered list
I am compiling my code to create a shared library and finally linking them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.