View Full Version : x264 + Mediacoder + VBV + Maxrate = Bug
Guest
19th February 2009, 00:14
The VBV bufsize is ridiculously low. It has no relation to bitrate. It's determined by the HW of your player. Find out what your player has and set it appropriately.
Dark Shikari
19th February 2009, 00:18
The VBV bufsize is ridiculously low. It has no relation to bitrate. It's determined by the HW of your player. Find out what your player has and set it appropriately.A 1 second VBV is unreasonable?
thiagoprado
19th February 2009, 00:23
Worked!!! Worked!!! :)
Thanks!!!!
thiagoprado
19th February 2009, 00:25
I thought bufsize is the time in seconds maxrate can be used.
Ex: maxrate 500 / bufzise 500 - One second of 500Kbps peak
maxrate 500 / bufsize 1000 - Two seconds of 500Kbps peak
I'm using JW Player with Flash Media Streaming 3.5
thiagoprado
19th February 2009, 00:36
Thanks Dark Shikari for the help and for the build.
It's incredilble how fast a problem was fixed.
I bought the Flash Media Server ($990) and I still don't get an awnser for a question posted one month ago.
Dark Shikari
19th February 2009, 00:44
I thought bufsize is the time in seconds maxrate can be used.
Ex: maxrate 500 / bufzise 500 - One second of 500Kbps peak
maxrate 500 / bufsize 1000 - Two seconds of 500Kbps peak
I'm using JW Player with Flash Media Streaming 3.5Are you actually streaming the H.264, or just using progressive download?
If you're using progressive download, you don't need VBV.
thiagoprado
19th February 2009, 00:47
Are you actually streaming the H.264, or just using progressive download?
If you're using progressive download, you don't need VBV.
Streaming
Guest
19th February 2009, 00:49
A 1 second VBV is unreasonable? I haven't looked at the particulars of his stream. I was just saying that it is small compared to what typical HW provides.
Dark Shikari
19th February 2009, 00:51
StreamingIf you're encoding beforehand and not in real-time, why do you need to stream instead of progressive download?
IMO progressive download avoids most of these annoyances and is much easier for both the user and server.
thiagoprado
19th February 2009, 00:55
Security, time seek and bandwidth control.
It's a pay-per-view site.
Dark Shikari
19th February 2009, 00:59
Security, time seek and bandwidth control.
It's a pay-per-view site.Oh, in that case, of course it makes sense.
thiagoprado
19th February 2009, 01:03
I did a test video using the Fabio Sonnati's settings (the same I posted in the beginning).
The best I could find to stream video.
It's realy amazing the quality we can get with only 250Kbps.
Look at the video:
http://www.thiagoprado.com.br/teste.mp4
Dark Shikari
19th February 2009, 01:06
I did a test video using the Fabio Sonnati's settings (the same I posted in the beginning).
The best I could find to stream video.
It's realy amazing the quality we can get with only 250Kbps.
Look at the video:
http://www.thiagoprado.com.br/teste.mp4You can still do better. Raise subme to 9 for starters (no matter what you do, this is worth it), and if you feel like wasting a ton of time, you can use --ref 16 --me tesa as well. Also, given how much your source used 5 bframes, you might benefit from raising --bframes a bit. If instead of wasting tons of time like the previous suggestions and want to save time without too much quality loss, drop trellis from 2 to 1.
x264 is good stuff ;)
thiagoprado
19th February 2009, 01:23
You can still do better. Raise subme to 9 for starters (no matter what you do, this is worth it), and if you feel like wasting a ton of time, you can use --ref 16 --me tesa as well. Also, given how much your source used 5 bframes, you might benefit from raising --bframes a bit. If instead of wasting tons of time like the previous suggestions and want to save time without too much quality loss, drop trellis from 2 to 1.
x264 is good stuff ;)
My god! It's better. The image is sharper.
x264 is incredible
Dark Shikari
19th February 2009, 01:25
Also, you could try some psy-trellis; --psy-rd 1.0:0.2 will add sharpen things up (but tends to do so at the cost of slightly increased artifacting)
thiagoprado
19th February 2009, 01:28
Also, you could try some psy-trellis; --psy-rd 1.0:0.2 will add sharpen things up (but tends to do so at the cost of slightly increased artifacting)
I will try
thiagoprado
19th February 2009, 02:30
Also, you could try some psy-trellis; --psy-rd 1.0:0.2 will add sharpen things up (but tends to do so at the cost of slightly increased artifacting)
I did the test and the result is incredible but took a long time to encode.
Since my videos are basically one person talking at low motion scenes the 250Kbps are fine.
But in some motion scenes the image get blocky.
Is there any setting in x264 that can avoid blocky?
Thanks
Dark Shikari
19th February 2009, 02:36
I did the test and the result is incredible but took a long time to encode.
Since my videos are basically one person talking at low motion scenes the 250Kbps are fine.
But in some motion scenes the image get blocky.
Is there any setting in x264 that can avoid blocky?What makes it blockier in higher motion scenes is the fact that you're limiting the bitrate using VBV--if those scenes could have higher peak bitrate, they'd get higher quality.
Also, using such a low deblock setting isn't helping either.
thiagoprado
19th February 2009, 02:37
What makes it blockier in higher motion scenes is the fact that you're limiting the bitrate using VBV--if those scenes could have higher peak bitrate, they'd get higher quality.
Also, using such a low deblock setting isn't helping either.
Thanks
Guest
19th February 2009, 04:47
Because the VBV algorithm is complicated and if it makes a mistake, it can result in the encoder thinking that that the VBV may underflow soon--when it actually isn't going to. It relies on predictions of frame size that have to be very accurate. So if you can use a larger VBV buffer as I suggested (not maxrate), wouldn't this tend to mitigate the problem?
There's no reason to minimize the VBV buffer size. You just want it no bigger than the player's HW is providing.
Dark Shikari
19th February 2009, 04:50
So if you can use a larger VBV buffer as I suggested, wouldn't this tend to mitigate the problem?Theoretically, but such bugs (depending on the cause) can be triggered merely by VBV being on regardless of actual VBV state.There's no reason to minimize the VBV buffer size. You just want it no bigger than the player's HW is providing.But he's not encoding for hardware--he's encoding for a software stream.
If he has a buffer of, for example, 10 seconds, that means you have to wait 10 seconds before you can tune in to the stream.
Manao
19th February 2009, 05:00
His gop is already 10 second long. I think he can afford a slightly longer VBV. Furthermore, in the OP, why --level 51 ?
Dark Shikari
19th February 2009, 05:06
His gop is already 10 second long.Ah you're right. In this case he could certainly get away with more VBV.
thiagoprado
19th February 2009, 13:12
Thanks, Guys
I increased the maxrate to 700 and the bufsize two 1400 (two seconds of 700Kbps peak).
Since I'm using a prebuffering of 5 seconds and the flash media server 3.5 now have the dynamic buffering, I think will be fine.
What is GOP?
qbukhari
22nd March 2009, 18:26
Very impressive, Excellent work all of you
I am a mediacoder user too but a newbie I have learnt a lot from you guys. Hats Off !!!!
I am dyeing to know how to use these settings in mediacoder
# ".\codecs\x264.exe" "$(SourceFile)" --no-psnr --no-ssim --keyint 250 --min-keyint 25 --level 51 --vbv-maxrate 480 --vbv-bufsize 480 --me umh --merange 16 --no-fast-pskip --non-deterministic --subme 1 --ref 1 --partitions all --8x8dct --bframes 5 --direct auto --mixed-refs --trellis 2 --b-pyramid --weightb --deblock -2:-1 --bitrate $(VideoBitrate) --qcomp 0.6 --vbv-bufsize 480 --threads auto --stats "$(PassLogFile)" --pass 1 -o NUL
# ".\codecs\x264.exe" "$(SourceFile)" --no-psnr --no-ssim --keyint 250 --min-keyint 25 --level 51 --vbv-maxrate 480 --vbv-bufsize 480 --me umh --merange 16 --no-fast-pskip --non-deterministic --aq-mode 1 --aq-strength 1.0 --b-adapt 2 --ref 6 --subme 7 --psy-rd 1:0 --partitions all --8x8dct --bframes 5 --direct auto --mixed-refs --trellis 2 --b-pyramid --weightb --deblock -2:-1 --bitrate $(VideoBitrate) --qcomp 0.6 --vbv-bufsize 480 --threads auto --stats "$(PassLogFile)" --pass 2 -o "$(DestFile)"
how to enter these exact settings in my mediacoder ? a stupid question but please guide me.
Thanks
Bukhari
qbukhari@yahoo.com
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.