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

FP 11+ Audio Encoding Issue With H.264 Video

Community Beginner ,
Nov 04, 2011 Nov 04, 2011

Copy link to clipboard

Copied

FP 11+ Audio Encoding Issue With H.264 Video

I'm not sure if this issue is with the Flash Player when encoding the stream or with the Flash Media Server that is saving the stream so I'll be posting in both forums.

The problem is when publishing an audio and video stream from Flash Player 11 (Windows, FF) to the Flash Server 4.5 using the H.264 video codec. The audio portion of the recorded stream doesn't appear to be playable by anything and FFMPEG cannot process the audio stream. Here are the differences in the stream:

When using Sorenson as the video codec and recording the stream (flv) from the Flash server, the information about the audio stream from FFMPEG is this:

Stream #0.0: Audio: nellymoser, 22050 Hz, mono, s16

This clip can be played and processed by various players and FFMPEG with no problem.

When using H.264 as the video codec and recording the stream (f4v) from the Flash server, the information about the audio stream from FFMPEG is this:

Stream #0.1(eng): Audio: nmos / 0x736F6D6E, 22050 Hz, 1 channels

This clip does not play the audio and cannot be understood by FFMPEG.

I tried using the Speex codec as well and I have a similar issue as above (it doesn't play the audio stream and FFMPEG can't understand it).

Note the version of FFMPEG I'm using supports both Nellymoser and Speex so there should not be an issue.

1) Any idea why the codec appears different and won't play.

2) How to achieve the goal: send H.264 video stream with audio from the Flash Player and have a recorded stream with playable audio.

Thanks!

Views

14.7K

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
Nov 07, 2011 Nov 07, 2011

Copy link to clipboard

Copied

After you record the stream to Flash Media Server, process it with the F4V Post Processor tool to play it back on the desktop or using progressive download (you can stream it without using the Post Processor):

http://www.adobe.com/go/fms_tools

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
Community Beginner ,
Nov 08, 2011 Nov 08, 2011

Copy link to clipboard

Copied

Even after running it through the post processor, the audio does not play.  Read this thread (the posts in the middle discuss the audio problem, specifically no audio after running through the post processor): http://forums.adobe.com/message/3677448#3677448

It does not play using progessive download, won't play in any players, and can't be recognized by FFMPEG.

I'm not sure if this is an issue with the Flash Player when encoding it, or the Flash Media Server when saving it, but the fact you can see the same audio codec appears differently to FFMPEG so something is going on.  This is a major problem!

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
Participant ,
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

My FP11 H264 recording content plays fine, when live and as vod content via FMS. However nothing recognises it like, media info, mp4info, mpui or FFmpeg when inspected and even VLC Player can not play it. FLVCheck says its ok. MP4UI did say the atom size was too small, so I can only think FP11 is not creating the container within the MP4 spec.

I would like this raised as a bug! Point me to the correct url please.

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
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

Not sure about FMS, but I find that when using Wowza, if I publish h.264 / speex from the flashplayer, and record to an FLV container, FFMPEG is able to process the file.

Keep in mind that neither Nellymoser Asao nor Speex are MP4 compliant, so I would expect most applications to fail to read those files.

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
Participant ,
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

Thanks. I can process now, not sure I was doing wrong before

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
Community Beginner ,
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

So did you do what Jay said and it now can be processed?  So Jay you are saying instead of saving it as MP4, I should tell FMS to save the file as an .flv, then run it through FFMPEG to convert it to a standard MP4? Sounds strange, but if it works I'll try anything because as of now there is no way to play those files without sending them through the server.

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
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

@ImAStreamer - Yes, that's what I'm suggesting. FFMPEG should be able to convert to a proper mp4 container. Just be sure to change the output audio codec to something mp4 compliant (mp3 or AAC)

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
Community Beginner ,
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

Thanks for the advice Jay!  I'll do some testing now to see if that works and if so how to incorporate that in my back end processing workflow. 

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
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

One more bit of advice...

The AAC encoder in FFMPEG (FAAC) is terrible, and tends to result in poor quality at low bitrates. If you're transcoding to AAC, you'll likely want to use 128kbps or higher. If you workflow and endpoint targets allow for it, I'd go with MP3 audio.

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
Community Beginner ,
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

Thanks for letting me know. I'm already using that combination (H.264/MP3) with the clips generated by the Flash Media Live Encoder so I'm good there.  The problem of course is there is no way to encode MP3 audio in FP11 along with the H.264 video.  For regular voice, do you find Nellymoser or Speex preferable to start with (knowing it's going to end up as MP3 in the end)? I've always just used Nellymoser. Obviously if MP3 was available, this wouldn't be an 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
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

From a quality perspective, I prefer Nellymoser. Speex encoding in FP is limited to 16kHz, where Nellymoser is capable of 44.1khz. For voice, the difference isn't all that noticeable, but if there's any music involved, you'll find that the sounds is a bit dull when using speex, as the higher frequencies aren't represented.

Also, if your application involves multiway communication and you want to take advantage of AEC, your only option is Speex, as AEC doesn't work with Nellymoser.

From a licensing standpoint, Speex is the clear winner. To be completely legal, you'd need a license from Nellymoser to decode the audio on the server side using FFMPEG, and that license is $7500 per year per server the last time I checked. Speex on the other hand is not patent encumbered, and (AFAIK) requires no licensing.

That said, if you're in a position where codec licensing is an issue, you'll want to look into an MP3 encoding license for your implementation as well.

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
Community Beginner ,
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

Jay, unfortunately that didn't work.

When I send H.264 video and Speex or Nellymoser audio and try to record it on the server like this:

mystream=Stream.get("mp4:output.mp4") = I get the video, but the audio is not recognized by FFMPEG

mystream=Stream.get("mp4:output.flv") = I get the video, but the audio is not recognized by FFMPEG

mystream=Stream.get("output.flv") = I get the audio properly, but the video stream does not record (which looks like it follows what it says in the documentation)

Is there any special tags I need to use with FFMPEG to be able to read it or a certain way on the server to specify to record it?

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
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

None that I'm aware of.

As I mentioned before, I've been using Wowza lately (and h.264/speex to flv works fine there), so perhaps this is just something that FMS won't do. Maybe someone from the FMS engineering team will have suggestions about how to record a file that anything other than FMS can read.

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
Community Beginner ,
Nov 09, 2011 Nov 09, 2011

Copy link to clipboard

Copied

So from your experience you wouldn't say it's an issue with how the player is encoding it, but rather how FMS is saving it on the back end?  At least determining that would help isolate where to go for help (although I don't see any other suggestions coming from employees in this thread yet).

Adobe - any ideas?

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
Participant ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

Using my latest H264 recording application I was able to use FFmpeg to transcode to AAC. I understand you need to use the flvpackager to make the recorded mp4 playable direct from the desktop.

JC I suggest posting your application code (bits you are using for h264 recording) for forum users to debug.

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
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

As I mentioned previously, my implementation uses Wowza, not FMS, so I don't think my Java code is going to be of use to anyone here.

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
Participant ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

Sorry I ment for ImAStreamer

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
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

I know this thread has moved beyond the F4V Post Processor (thanks for all the info, Jay), but I wanted to let you know that the audio bug mentioned in the previous thread has been fixed. Unfortunately, I didn't grab the fix build number and I don't have access to the bug base anymore, but maybe someone from Adobe could grab it for us. 

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
Community Beginner ,
Nov 10, 2011 Nov 10, 2011

Copy link to clipboard

Copied

I'm confused now.

1) Are you saying that recorded files will now have the audio playing/recognized properly outside of being served by FMS?

2) What was "fixed"? Was it the Flash Player encoder, the F4V Post Processor, or Flash Media Server?

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
Participant ,
Nov 11, 2011 Nov 11, 2011

Copy link to clipboard

Copied

I am still unable to play my videos outside of FMS using H264 settings, unless transcoded, I am using FFmpeg.

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
Nov 11, 2011 Nov 11, 2011

Copy link to clipboard

Copied

I think what Jody was getting a was the inclusion of ulaw and alaw (pcm) audio in the flashplayer. The trouble there is, unless you're going to use a really low sample rate, the bitrate required for pcm is going to be very high, and (if I'm not mistaken), the flashplayer will not perform AEC for pcm.

@AdrianWilkinsUK - I would expect that you can't play those files outside of FMS without transcoding. Speex and nellymoser aren't mp4 compliant. They -might- play in the flashplayer (haven't tried that... but maybe the FP eng team has something in place there), but other programs won't.

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
Participant ,
Nov 11, 2011 Nov 11, 2011

Copy link to clipboard

Copied

Yeah I saw post on that JC, thanks.

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
Community Beginner ,
Nov 11, 2011 Nov 11, 2011

Copy link to clipboard

Copied

If you check, you'll see in my other thread http://forums.adobe.com/thread/921501 an employee claims this was fixed with the latest version of FP11. However, I tested it and the problem still persists.

He said if it didn't work to submit a bug, so I did here: https://bugbase.adobe.com/index.cfm?event=bug&id=3044308 If you want it fixed, please go vote for it.

Thanks.

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
Nov 11, 2011 Nov 11, 2011

Copy link to clipboard

Copied

I have the feeling this is an FMS issue. When I play the H.264/speex FLV recorded through Wowza in flashplayer 11.0.1.152, it plays back just fine for me, both streaming from Wowza, and via progressive download.

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