Skip to main content
Participant
April 1, 2014
Question

Trying to view the recorded or live stream while recording the live stream doesnt work

  • April 1, 2014
  • 1 reply
  • 365 views

The workflow:

I push a live feed to the rtmp url rtmp://localhost/my-app/tester where my-app is a copy of the live app in AMS but with the following addition of code in main.asc:

application.onPublish = function( p_client, p_stream) {

   s = Stream.get("my_hello5");

   trace( s.name + " = name, " + s.publishQueryString + " = pqs");

   if(s) {

     s.record();

     trace("recording...");

     s.play(p_stream.name);

   }

}

application.onUnpublish = function( p_client, p_stream) {

   s = Stream.get("my_hello5");

   trace("getting stream my_hello5...");

   if(s) {

     trace("stopping recording...");

     s.record(false);

   }

}

And Iam facing multiple issues:

* The file my_hello5.flv gets generated in applications/my-app/streams/_definst_/ . And Once the recording is complete, If I open it using the url below in media player (Mine is Totem movie player on ubuntu) that I have on linux, it plays. But if I open the same url in  the OSMF flash media playback setup page (http://www.osmf.org/configurator/fmp/# ) , it is always showing "buffering".

The flv url I used is: rtmp://localhost/my-app/my_hello5

* If I try to open either the flv url or the live feed url inside the osmf page while the recording is still going on, then Iam not able to view either. It just shows "buffering" all the time.

Your help is valuable and much appreciated.

This topic has been closed for replies.

1 reply

Adobe Employee
April 7, 2014

As a good practice if should not play a file while it is being recorded...on other hand you can programatically create chunks of recordking at preodic intervals and use those chunks for laying or copy those chunks to a different folder where a different application and make those availabel to subscribers for rtmp streaming..