OK, I can't believe my eyes that this might actually be true. Are we actually going to be able to encode video in the Flash Player with something besides the old Sorenson Spark codec? Big kudos to Adobe if that is the case!
Can someone provide an example for this? I haven't been able to see any documentation on it.
Thanks!
Yes, the incubator build supports H.264 encoding at baseline and main profiles. You have to set the codec settings on NetStream object. Here is simple example:
var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_2);
stream.videoStreamSettings = h264Settings;
where stream is the publishing NetStream object.
aylarov,
There should be no restriction on audio codec. I've tried it with the incubator build with these audio codec and video and audio works just fine. Can you provide me your system info (OS, browser(s), cpu, gpu, etc...) so we can try to repro this in house? Can you also provide the source to your test media, that would help us a lot.
I've modified my exiting recording app (hdfvr.com) to record h.264 video and Speex audio using FMS4 server.
The recorded data is stored in a new f4v file. When paying back this file trough srtreaming it works fine.
When trying to play it locally after passing it trough Adobe's f4v Post Processor tool (Adobe Media Player) the sound does not play.
I've heard Speex/ASAO are not compatibe with f4v/mp4. Is this true? If yes is there a solution?
I tried that and it looks to be working. Thank you! Two more questions for you.
1) Is there a way to determine in a live stream what video codec is being using (could you add something to NetStreamInfo if something doesn't already exist)?
2) Just curious why you went with adding the h264Settings to the NetStream vs. doing something like Camera.codec? For consistency sake, you already have Microphone.codec so why didn't you go with Camera.codec? Just curious.
Looking forward to the documentation update so we can really see all the goodies you added.
Thanks again!
1) Yes, codec type is available in VideoStreamSettings class:
public class VideoStreamSettings
{
public function setMode(width:int, height:int, fps:Number):void
public function setQuality(bandwidth:int, quality:int):void
public function setKeyFrameInterval(keyFrameInterval:int):void
public function get width():int
public function get height():int
public function get fps():Number
public function get quality():int
public function get bandwidth():int
public function get keyFrameInterval():int
public function get codec():String
};
2) I understand that we could have used Camera.codec and it is little cumbersome to use the current API. However, this is a much cleaner and extensible way. Codec really does not belong to camera (you can send out one stream with Sorenson and one stream with H.264). Furthermore, we can also very easily add additional H.264 options to H264VideoStreamSettings.
Hi there,
I am also very curious how the quality of new h.264 encoding via Flashplayer will be.
As I understood, AAC audio won't be supported?
I am not familiar with coding with eclipse etc, so maybe one of you guys who is already testing out the new features
could build an swf and upload it, so we others could have a first glance at it?
Would be great if we could have a swf with input fields for rtmp, application name, and a few quality, profile etc. settings,
so we could test it on our own fms...
Anybody willing? I would personally throw in a pizza delivery for the brave coder!!!!
Cheers
thomas
你好,你的文章很受用,但是要实现的时候,总是报一个错,swc也已经导入,麻烦看看知不知道原因:
报名语句:rtmpVideoStream.videoStreamSettings = h264Settings;
报错信息:163 行1119: 访问可能未定义的属性 videoStreamSettings (通过 static 类型 flash.net:NetStream 引用)。
编译的时候 videoStreamSettings 这个属性不会被识别,H264VideoStreamSettings像这些类均可以,不明原因,请作者指教。
是不是跟编译器有关系,我用的是Flash Profession CS5.5
Hi Nick,
It seems like you haven't got the authoring environment setup properly for using this feature. This feature needs to be published to swf 13.
For targeting for swf 13 , here are the few things you can do: (instruction for English version CS5.5)
1. The playerglobal.swc (the one you downloaded from the incubator site) needs to be located in on ActionScript 3.0 folder. I would create a folder call FP11 and place the playerglobal.swc there. (you should already have FP10.2 which is installed with Flash CS5.5)
C:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\ActionScript 3.0\FP11\playerglobal.swc
2. Then you will need to make a xml for new FlashPlayer11 to point the Flash to use it. It locates at C:\Program Files\Adobe\Adobe Flash CS5.5\Common\Configuration\Players . You can copy any of the existing one and modify it.
Sample:
<players>
<player id="FlashPlayer11" version="13" asversion="3">
<name>Flash Player 11</name>
<path builtin="true"/>
<path platform="WIN">Device Central/adcdl.exe</path>
<path platform="MAC">Device Central/adcdl</path>
<playerDefinitionPath as2="$(UserConfig)/Classes/FP10;$(UserConfig)/Classes/FP9;$(UserConfi g)/Classes/FP8;$(UserConfig)/Classes/FP7" as3="$(AppConfig)/ActionScript 3.0/FP11/playerglobal.swc" />
3. Launch Flash and create files, File > Publish Settings, you will see the Flash Player 11 which you just added. Use it to publish the script.
You can check if your swf is publishing to swf 13 by have those line in the code:
// first frame loaderInfo.addEventListener(Event.INIT, init); function init(event:Event):void { trace("SWF " + loaderInfo.swfVersion); }
Hi,
So H264VideoStreamSettings has setMode, setQuality... but they don't work. (I confirm this). So will they work when Flash Player 11 is released? I mean are just not working YET?
It would be very useful as you could send 2 different streams from 1 camera for dynamic (high quality / low quality) purposes.
Thank you
P.
When encoding live in h264 with the FP 11 (incubator) then playing it live on another client (through FMS or red5 server) the video sometimes (1/3 of times) has major skips. It's almost as if the video goes back to some older keyframes and then returns to live. Same experience with FME or with non-h264 produces smooth video.
If the server (fms or red5) records the video, the replay looks smooth, which is strange because I would have assumed the FP was not encoding well (being an alpha or beta).
Has anyone had this issue? I'm using a simple netStream.play();
Thank you.
North America
Europe, Middle East and Africa
Asia Pacific