Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
17th June 2011, 17:01 | #1 | Link |
Registered User
Join Date: Aug 2009
Posts: 6
|
x264 settings for live streaming to Adobe Flash
Hello,
I am working on realtime encoding of dynamically synthesized SD (352 x 480p @ 25) video streams for Internet broadcast. I know that there is a problem with H.264 buffering in Adobe Flash Player, there is either zero buffer (NetStream.bufferTime = 0) or >=64 frames buffer (NetStream.bufferTime > 0). Also I know that live encoder settings (like x264's tune=zerolatency) noticeably reduce quality (given the same bandwidth). So I am trying to create two kinds of settings profiles, one with buffering (NetStream.bufferTime = 0.1), B-frames, lookahead and other H.264 features (hoping for 3-4 seconds latency and stable quality) and one with no buffering and zerolatency features (hoping for <1 seconds latency, lower quality and some minor artifacts) and evaluate these profiles for different real-world Internet connections. I have followed official x264 pages on MeWiki and numerous posts on relevant forums (Doom9, Doom10, Wowza Media Systems, etc) and have done a lot of experimenting but I am not really satisfied with the result. I am not an expert in video encoding domain and I hope that more experienced readers may point out the obvious shortcomings of my profiles or give some other tips. Medium latency Code:
{threads=1,profile=main,preset=faster,intra-refresh,bframes=2,ref=2,level=3,scenecut=40, \ qpmax=28,qpmin=16,weightp=1,keyint=50,keyint_min=25,b-adapt=0,deblock=-1:-2,fullrange=on,bitrate=640} Low latency Code:
{threads=1,profile=main,preset=faster,tune=zerolatency,intra-refresh,weightp=1,keyint=30, \ min-keyint=5,deblock=-1:-2,fullrange=on,bitrate=1000} I am sure that my settings are far from perfect but I have doubt about the stability of the other components of the system also. I am synthesizing frames with relatively constant speed slightly higher than target 25 FPS (27-29 FPS actually), some fluctuations may be imposed due to timers inaccuracy and non-RT OS activity. These frames are piped to VLC which transcodes it using x264 and streams it over RTP (using LIVE555 I suppose) to Wowza Media Server which in turn publishes it over RTMP. According to my observations VLC (and maybe LIVE555) lacks industrial grade reliability (being a great software though), so I am not sure if is it their limitations. Wowza on the other hand seems to improve playback smoothness after restreaming (I am varying It's buffers sizes accordings to manual from 15 to 66 frames). So the question is, is there anything I can do with this architecture to achive my goals or just to improve my results in terms of quality, stability or latency. For example it would be really useful and reasonable to reduce latency of the Low latency profile to <1 seconds or to make Medium latency streaming fully stable and crisp but all of my recent attempts failed so I am asking for help of any kind. Thanks in advance! Last edited by Guest; 17th June 2011 at 17:10. Reason: readability |
Tags |
flash, latency, live, vlc, x264 |
|
|