• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Recording livepkgr to MP4 file

Explorer ,
Mar 13, 2012 Mar 13, 2012

Copy link to clipboard

Copied

I need to record what's streamed to the livepkgr application as an MP4 file (or convert it afterwards).

As of the default settings the livepkgr applications records all incoming streams as an F4F file (using the main.asc file that came with the installation).

I've tried streaming and recording an H.264 videostream with AAC sound (as per these instructions)

If I move this recored file to another application and rename it to MP4 an external player (JWPlayer) can play the stream just fine, as can iOS devices (though with some minor issues when scrubbing).

The renamed file won't open in Windows Media Player or Quicktime Player, though.

I've tried using the f4vpp tool and processed the video into another MP4 file. This file streams just fine to the external player as well, and it resolves the scrubbing issues on iOS devices.

The file now opens in Windows Media Player, but Quicktime Player still won't open it with the following message: "Error -2002: a bad public movie atom was found in the movie (filename.mp4)"

I really need the livepkgr application to record in a format that either is by default, or can easily be converted to, a proper MP4 file that can be opened in all applications. How can I accomplish this?

Views

6.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Mar 13, 2012 Mar 13, 2012

Copy link to clipboard

Copied

After flattening, it should be a proper mp4 file. I think its a "quicktime" parsing issue. Mp4 is very generic format and quictime shouldn't assume only specific boxes in the mp4.

Anyways, what you can do is modify the livepkgr application to record the input stream as mp4 also.

You will require to just add

var s2 = Stream.get("mp4:" + streamObj.name);

    if (s2 == undefined )

        return;

if (!s2.record(recordMode))

    {

        s2.trace("record failed.");

    }

s2.play(streamObj.name,-1,-1);

also replicate the same code as we have for stream variable "s" for s2. in unpublish

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 17, 2012 Apr 17, 2012

Copy link to clipboard

Copied

I'm interested in the same functionality too. I need to record a live stream to mp4 files and be able to re-stream it using vod application.

1. How do I "compile" main.asc file into .far file? Or do I just place main.asc to application folder and delete main.far?

2. Can I just simply replace "f4f:" part in current sample with "mp4:"?

3. If I already have couple of dozen streams recorded on the server which are in f4f/f4x format, how do I convert them to mp4?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 17, 2012 Apr 17, 2012

Copy link to clipboard

Copied

You need to rename the *.far file to *.zip file and then unzip it. After extracting all the files, go to main.asc and edit it, that way you will be able to use the code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 17, 2012 Apr 17, 2012

Copy link to clipboard

Copied

Should I re-zip it and rename back to main.far after I'm done?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 17, 2012 Apr 17, 2012

Copy link to clipboard

Copied

No, there is no need to do that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 17, 2012 Apr 17, 2012

Copy link to clipboard

Copied

OK thank you this part is clear for me now. My other two questions still stand however.

2. Can I just simply replace "f4f:" part in current sample with "mp4:" or do I need to duplicate a stream according to Nitin Goel's message?

3. If I already have couple of dozen streams recorded on the server which are in f4f/f4x format, how do I convert them to mp4?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

I have unpacked main.far and can see that it uses "f4f:" instead of "mp4:". Is this right? Can I change it?

I'm using the default FMS installation and configuration, but the data is not in one f4f file. Where can I change segmentduration to infinite? Can these segments be played out without converting them? Maybe using DVR functionality? Or do I need custom server side application for this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

Apologies for the miscommunication.

Well here is your answer:

  • Changing to mp4: shouldn't harm (earlier I meant to say, while doing Stream.get and you want to record a mp4, use mp4:)
  • Just cross-checked, you are correct by default segmentduration in livepkgr application is set to 400 seconds thats why you are ending up collecting many f4f fragments instead of one.
  • You need to leave <SegmentDuration></SegmentDuration> blank in event.xml file inside events folder of livepackager, or you can remove SegmentDuration altogether, then in that case it will assume infinite value by default. Actually FMS by default when segmentduration value is not set considers it infinite, but not the livepackager application, it comes with 400000 as a set value.

Hope this will help you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 18, 2012 Apr 18, 2012

Copy link to clipboard

Copied

I have changed f4f: to mp4: and restarted livepkgr application. Now when I start streaming from FMLE in the FMS logs I get "mp4:streamname - record failed." and nothing is recorded.

UPDATE: OK, nevermind. I had to delete /opt/adobe/fms/applications/livepkgr/streams/streamname folder from earlier recordings. Now the recording works. However it makes a fragmented MP4 files which cannot be played out without converting with Adobe F4VPP tool. Is it possible to record to standard MP4 ISO file?

Message was edited by: Vilius Å umskas

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 05, 2012 Jun 05, 2012

Copy link to clipboard

Copied

We were using modified livepkgr application which records "mp4:" type streams and the <SegmentDuration> is blank. This works great for creating one file instead of dozen segments. However there are two major issues with this.

1) Live streams played with such livepkgr application are not working on iOS devices. iPad or the iPhone shows striked-out Play button. Also the http://stream.lnk.lt/hls-live/....m3u8 link doesn't open in any browser. I get HTTP 404 error. I have confirmed that changing "mp4:" back to "f4f:" in main.asc and enabling <SegmentDuration> makes the live stream work. Is there a way to record a live stream in one mp4 file and make HLS work simultaniously?

2) Such recorded MP4 files have trouble streaming with hls-vod application on iOS devices. Seems like audio and video is totally out of sync if the file is bigger. For smaller files it is OK. Is this a known issue?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 07, 2012 Jun 07, 2012

Copy link to clipboard

Copied

Can someone take a look at this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 08, 2012 Jun 08, 2012

Copy link to clipboard

Copied

Hi,

1) You can't play a live stream via HDS/HLS if you are recording in an mp4 container. If you need to do both I suggest you use Multi-point publish (MPP), i.e, use one application where streams are recored in default f4f format and use that for playback via HLS, then do a publish from that application to another application where you record it in mp4 format. Although this will lead to content duplication, you can manage disk space by setting your disk management appropriately.

2) How big is your file?

Thanks,

Apurva

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 08, 2012 Jun 08, 2012

Copy link to clipboard

Copied

Thank you for your reply.

1) Can I still record to the "f4f:" container and have SegmentDuration disabled? I have tried to do so, but the recording just doesn't start. Even if I would have F4F file that's fine, but I need it in one file so later I can run it through F4VPP. Where can I find more information regarding Multi-Point publishing? Maybe with some examples?

2) It's around 30 minutes.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 08, 2012 Jun 08, 2012

Copy link to clipboard

Copied

When you disable SegmentDuration, also disable DiskManagement and try.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jun 11, 2012 Jun 11, 2012

Copy link to clipboard

Copied

Thanks you! It works.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 01, 2013 Jan 01, 2013

Copy link to clipboard

Copied

LATEST

Hi Nitin

    i did the way you said and not working this is what i am getting also hls streaming stopped can you please send me main.asc or main.far configured with this futures f4f and mp4 recording

below i get when  <SegmentDuration></SegmentDuration> blank in event.xml file also hls stop working

onPublish : livestream

mp4:livestream - record failed.

Stream name is: livestream and live event is: liveevent

f4f:livestream - record failed.

f4f:livestream - NetStream.Data.Start

f4f:livestream - NetStream.Publish.Start

f4f:livestream - NetStream.Play.Reset

Sending error message: Method not found (getStreamLength).

below i get when   <SegmentDuration>4000000</SegmentDuration>  in event.xml file and hls works

onPublish : livestream

mp4:livestream - record failed.

Stream name is: livestream and live event is: liveevent

f4f:livestream - NetStream.Data.Start

f4f:livestream - NetStream.Publish.Start

f4f:livestream - NetStream.Play.Reset

f4f:livestream - NetStream.Record.Start

Sending error message: Method not found (getStreamLength).

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines