• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
Locked
0

FMS 4.5 and Flash Player 11 broadcasting H264 incompatible?

New Here ,
May 29, 2012 May 29, 2012

Copy link to clipboard

Copied

I'm using FMS 4.5 to record a live stream with H264 encoding. The broadcaster is  Flash Player 11. The resulting MP4 file has video but no audio. I have spent a couple of days trying to figure this one out but it simply doesn't work properly. Could it be possible the audio encoders (Nellymoser and Speex) for Microphone object in Flash Player 11 are not compatible with MP4 container?

Here are some of my findings:

1) If I broadcast without H264 encoding, the resulting FLV file is correct and has both audio and video.

2) If I broadcast using H264 encoding, the resulting F4V/MP4 file has video but no audio.

3) If I record an FLV file with H264 encoding, the resulting file has audio but no video.

I understand that FLV container doesn't allow H264 encoding. But why does the MP4 container outputs with no audio after F4VPP post-processing?

Is there any other alternative solution to this problem? I'll really appreciate some help with this one.

Views

5.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
Guest
May 29, 2012 May 29, 2012

Copy link to clipboard

Copied

Hi,

Could you please post/send a private message with the piece of code you're using for recording and maybe we could help debug the issue, because I checked on my end and the recording and playback of H264-Speex/NellyMoser in MP4 container is happening just fine for me.

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
New Here ,
May 30, 2012 May 30, 2012

Copy link to clipboard

Copied

Hi Apurva,

Here's my flash player broadcaster code:

-----------------------------

camera.setQuality(0,80);

camera.setMode(320,240,30);

mic.codec = SoundCodec.SPEEX;

mic.encodeQuality = 10;

mic.gain = micVolumeSlider.value;

mic.rate = 16;

mic.framesPerPacket = 2;

mic.setUseEchoSuppression(true);

mic.setSilenceLevel(0);

videoDisplay.attachCamera(camera);

h264Settings = new H264VideoStreamSettings();

h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3_1);

h264Settings.setQuality(0, 80);

h264Settings.setMode(320,240,30);

sendStream.attachAudio(mic);

sendStream.attachCamera(camera);

sendStream.videoStreamSettings = h264Settings;

sendStream.publish(eventID, "live");

-----------------------------

For the server-side, I'm using the default main.asc that comes with livepkgr (except that I have changed f4f: to mp4:) and im publishing the stream to EVENTID?adbe-live-event=liveevent&adbe-record-mode=record.

Can you tell me if you used the same settings to broadcast from flash player in your test? Did you play your mp4 back in a flash player with or without f4vpp post-processing?

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
May 30, 2012 May 30, 2012

Copy link to clipboard

Copied

Could you try with "mp4:" + streamObj.name+".mp4", I'm still not able to reproduce the issue at my end. Also how're you playing back the stream?

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
New Here ,
May 30, 2012 May 30, 2012

Copy link to clipboard

Copied

Apurva,

I'm doing NetStream.publish("EVENTID.mp4?adbe-live-event=liveevent&adbe-record-mode=record", "live") so it should add .mp4 automatically right? The following is my player code:

<?xml version="1.0" encoding="utf-8"?>

<!-- controls\videoplayer\VideoPlayerEvent.mxml-->

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

    xmlns:s="library://ns.adobe.com/flex/spark"

    xmlns:mx="library://ns.adobe.com/flex/mx">

    <s:layout>

        <s:VerticalLayout/>

    </s:layout>

   

    <fx:Script>

        <![CDATA[

            import org.osmf.events.MediaPlayerStateChangeEvent;

            import org.osmf.events.TimeEvent;

            protected function vpCompleteHandler(event:TimeEvent):void {

                myTA.text = "Video complete - restarting."

            }

            protected function vpMediaPlayerStateChangeHandler(event:MediaPlayerStateChangeEvent):void {

                if (event.state == "loading")

                    myTA.text = "loading ...";

                if (event.state == "playing")

                    myTA.text = "playing ...";

            }

        ]]>

    </fx:Script>

   

    <s:VideoPlayer

        source="http://DOMAIN.COM/FILE.MP4"

        width="350" height="250"

        loop="true"

                                        autoPlay="true"

        complete="vpCompleteHandler(event);"

        mediaPlayerStateChange="vpMediaPlayerStateChangeHandler(event);"/>

    <s:TextArea id="myTA" width="350" height="25"/>

</s:Application>

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 ,
May 31, 2012 May 31, 2012

Copy link to clipboard

Copied

Apurva,

Am I playing it the wrong way? If there is a way to directly play those mp4/f4v files, it'll save me (and so many other people) a lot of confusion. Can you tell me how you were playing the generated file?

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
May 31, 2012 May 31, 2012

Copy link to clipboard

Copied

Hi Adeel,

I'm sorry for the delay in reply. It took me some time to investigate the possibilites for you.

If you want to playback a live stream via http protocol, then you need to record the streams in f4f format. If you require to record the live stream in an mp4 container then I suggest you use rtmp playback.

Here are my suggestions -

1. If what you require is HTTP Dynamic streaming then please follow this : http://help.adobe.com/en_US/flashmediaserver/devguide/WSd391de4d9c7bd609-52e437a812a3725dfa0-8000.ht...

2. If recording to an mp4 container is your priority then, I suggest rtmp playback instead of http.

3. If you need both, i.e, store your live content and playback live via HTTP then I see 2 possibilities :

     a. Use MPP (multi-point publish). So basically publish a live stream in f4f to one application and have that publish the live stream into mp4 container to another application. Although this leads to content duplication, you can playback the stream via http from the first application and also have your mp4 stream in the second application.

     b. Else you can use the DVR functionality. By default the live stream is stored by the livepkgr on disk, by using DVR, the client can seek back and forth in the livestream and view from the start. However, the f4f fragments will be saved and not an mp4 file.

If you let me know what is the exact use-case I might be able to help you out better.

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
New Here ,
May 31, 2012 May 31, 2012

Copy link to clipboard

Copied

Thanks for the detailed response and investigation Apurva. My use case is that I want to broadcast a live stream which is played using HTTP stream live and then later played from the generated MP4 file. So MPP is a great idea and I'll definitely use that to generate an mp4 and live stream with f4f.

But my main question still holds.

1) Whether I use MP4 or F4F, can either of these be played in a flash player directly without post-processing?

2) I tried post-processing a .f4f segment using f4vpp. The video plays back correctly, but there is no audio. I read somewhere on internet that this is a bug with f4vpp tool perhaps?

Thanks so much!

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
May 31, 2012 May 31, 2012

Copy link to clipboard

Copied

Adeel, so just give me some time and I'll try to get back to you with the best answers.

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
New Here ,
Jun 01, 2012 Jun 01, 2012

Copy link to clipboard

Copied

Sounds good. Thanks for investigating this. I'm sure once we resolve this, it will help a lot of other people too.

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 ,
Jun 07, 2012 Jun 07, 2012

Copy link to clipboard

Copied

Apurva, were you able to find anything on this 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
Guest
Jun 08, 2012 Jun 08, 2012

Copy link to clipboard

Copied

Hi adeel,

I'm sorry I didn't get back to you earlier but I investigated the issue on my end and am unable to reproduce your issue!

Here's the process I'm following :

1. I duplicate the default livepkgr in my applications folder and replace the main.far with the main.asc in samples.

2. I edit the main.asc as : var s = Stream.get("mp4:" + streamObj.name + ".mp4");

3. I publish a stream from FMLE with the streamname livestream

4. A livestream.mp4 is recorded in the streams folder.

5. During publish I tried : rtmp://<server-ip>/livepkgr/mp4:livestream.mp4 - playback is fine (audio and video)

6. After a few minutes I stop publish, copy my livestream.mp4 into webroot/vod and play as : http://<server-ip>/hds-vod/livestream.mp4.f4m - playback is fine (audio-video)

7. Then I downloaded the f4vpp from here : https://www.adobe.com/cfusion/entitlement/index.cfm?e=fms35 I copy the linux folder onto my machine and run the command :

./f4vpp -s -i livestream.mp4 -o flattened.mp4

I get the following messages :

The conversion process starts...

The conversion process completes successfully...

and the following output files :

flattened.smil and flattened_1.mp4

8. I copy the flattened_1.mp4 onto a windows machine and play it via vlc player - playback is fine (audio-video)

Are you doing anything differently?

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
New Here ,
Jun 08, 2012 Jun 08, 2012

Copy link to clipboard

Copied

Apurva, Thanks again for all the details in your response. It's very helpful.

It works for me fine too if I use FMLE, but not when I use Flash Player 11 to broadcast. FMLE supports AAC and MP3 audio format while broadcasting but Flash Player 11 I believe is just limited to NELLYMOSER or SPEEX?

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 11, 2012 Jun 11, 2012

Copy link to clipboard

Copied

That's right Adeel.

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 ,
Jun 11, 2012 Jun 11, 2012

Copy link to clipboard

Copied

So what is the solution if we're using Flash Player 11 to broadcast? Is it to use a transcoder or something else?

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 ,
Jun 03, 2012 Jun 03, 2012

Copy link to clipboard

Copied

I have f4v files playing back fine from FMS... 

using standard video object   with source set to

MEDIA_SERVER / MEDIA_FOLDER  /mp4:"+ fileName +".f4v";

you do not need to add rtmp:// at the start... as the video object seems 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
New Here ,
Jun 03, 2012 Jun 03, 2012

Copy link to clipboard

Copied

mr_payne, But i'm trying to output a mp4 file, upload it to s3 and play it directly from the flash player (without involving FMS).

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 ,
Jun 29, 2012 Jun 29, 2012

Copy link to clipboard

Copied

LATEST

hi adeel.raza.  i found this problem too! Do you have solution ?

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