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 |
17th June 2011, 18:07 | #2 | Link | ||
x264 developer
Join Date: Sep 2005
Posts: 8,666
|
Quote:
Furthermore, if there's latency on a LAN, have you checked your client settings? Most clients, Flash included, buffer large amounts by default unless you tell them not to. Quote:
Lowering deblock parameters will not make the image "more crisp".
__________________
Follow x264 development progress | akupenguin quotes | x264 git status ffmpeg and x264-related consulting/coding contracts | Doom10 Last edited by Dark Shikari; 17th June 2011 at 18:10. |
||
21st June 2011, 15:29 | #3 | Link | |||||
Registered User
Join Date: Aug 2009
Posts: 6
|
Hello, Dark Shikari.
I am really thankful for your reply. As you can see I am new to video encoding domain. I have done a lot of experimenting with x264 and Flash Player but I am using semi-official guides as a main source of information (like ones on MeWiki) and I have no algorithmic background here so maybe you can elaborate a little more on your advices. Quote:
After reading your message I have done a dozen more tests with different VBV-enabled settings and have got the same negative results. The vbv-maxrate limit has worked (I hope) but the image quality, framerate stability and latency all have become worse with latency sometimes near 10 seconds so it doesn't worth it. I have used this guide but I have no sufficiently comprehensive understanding of the Leaky Bucket Algorithm or of the other under-the-hood machinery so I could accidentally make significant mistakes and I hope experienced readers could point it out. For the same reasons I do not understand the relations between zerolatency tune and the encoder VBV model which you have pointed out (why VBV must be enabled?). Quote:
Quote:
Quote:
Quote:
I am copying one of my new configurations which was not really successful (NetStream.bufferTime = 0, CBR): 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,vbv-maxrate=1000,vbv-bufsize=500} |
|||||
Tags |
flash, latency, live, vlc, x264 |
Thread Tools | Search this Thread |
Display Modes | |
|
|