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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 18th February 2009, 17:44   #1  |  Link
thiagoprado
Registered User
 
Join Date: Oct 2008
Posts: 30
x264 + Mediacoder + VBV + Maxrate = Bug

I'm trying to encode to streaming using a average bandwidth of 250Kbps.
But I would like to put a cap to limit the bitrate at 512Kbps.
So I used this setting:

# ".\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)"

And got this terrible result when changing from one frame to other (no fade):




So I thought the problem was the to low cap and removed the vbv-maxrate and vbv-bufsize

And got this perfect transition and a peak bitrate at 604:




Then I used the vbv-maxrate and vbv-bufsize at 700Kbps (96Kbps above the peak rate).

And got the same problem:




After I did a lot of tests (cap with 800, 900, 1000Kpbs) and got the same result.

It is a bug? How can I set the vbv-maxrate above the peak bitrate and still get a bad result?
Why the peak bitrate remained at 555Kbps if I used the vbv_maxrate at 700Kbps?

Configuration:

Intel Q8200
Windows Vista Ultimate 64
Medicoder x64


Links to the encoded movies:

http://www.thiagoprado.com.br/10_pap...er_500_500.mp4
http://www.thiagoprado.com.br/10_papeis_lider_0_0.mp4
http://www.thiagoprado.com.br/10_pap...er_700_700.mp4

Last edited by thiagoprado; 18th February 2009 at 18:32.
thiagoprado is offline   Reply With Quote
Old 18th February 2009, 17:54   #2  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
You're using an ancient version of x264, from years before VBV handling was modernized.

What is with this proliferation of MediaCoder users "reporting bugs" with ancient x264 builds anyways? We had one yesterday too.
Dark Shikari is offline   Reply With Quote
Old 18th February 2009, 17:56   #3  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Also "rc=abr" is a bad choice, I think. You better go with 2-Pass, especially when VBV is involved.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 18th February 2009, 17:57   #4  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by LoRd_MuldeR View Post
Also "rc=abr" is a bad choice, I think. You better go with 2-Pass, especially when VBV is involved.
Not with a version of x264 so old that it is from before 2pass VBV existed
Dark Shikari is offline   Reply With Quote
Old 18th February 2009, 18:02   #5  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Dark Shikari View Post
Not with a version of x264 so old that it is from before 2pass VBV existed
But given he follows the advice and updates to a recent revision of x264, he should also consider using 2-Pass instead of ABR...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 18th February 2009, 18:11   #6  |  Link
thiagoprado
Registered User
 
Join Date: Oct 2008
Posts: 30
Sorry guys, I'm using 2-pass with vbr.

I download the latest x264 build from the x264.nl and replaced the codec from the Mediacoder. I did the test with the original Mediacoder x264 and with the build 1114. Got the same result.
thiagoprado is offline   Reply With Quote
Old 18th February 2009, 18:13   #7  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by thiagoprado View Post
Sorry guys, I'm using 2-pass with vbr.
Your first post said something different:
... / rc=abr / ...

Also check the line "Writing library" in MediaInfo's report
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊

Last edited by LoRd_MuldeR; 18th February 2009 at 18:15.
LoRd_MuldeR is offline   Reply With Quote
Old 18th February 2009, 18:14   #8  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by thiagoprado View Post
Sorry guys, I'm using 2-pass with vbr.
Doesn't look like it to me.
Dark Shikari is offline   Reply With Quote
Old 18th February 2009, 18:21   #9  |  Link
thiagoprado
Registered User
 
Join Date: Oct 2008
Posts: 30
Sorry I wrote a wrong settings.

Correct

# ".\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)"
thiagoprado is offline   Reply With Quote
Old 18th February 2009, 18:32   #10  |  Link
thiagoprado
Registered User
 
Join Date: Oct 2008
Posts: 30
Links to the encoded movies:

http://www.thiagoprado.com.br/10_pap...er_500_500.mp4
http://www.thiagoprado.com.br/10_papeis_lider_0_0.mp4
http://www.thiagoprado.com.br/10_pap...er_700_700.mp4
thiagoprado is offline   Reply With Quote
Old 18th February 2009, 18:45   #11  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
I checked out the first video; it looks fine to me. Is there any particular frame # you're having issues with?
Dark Shikari is offline   Reply With Quote
Old 18th February 2009, 18:54   #12  |  Link
thiagoprado
Registered User
 
Join Date: Oct 2008
Posts: 30
00:01:12;25 to 00:01:12;26
00:01:13;21 to 00:01:13;22
00:01:19;21 to 00:01:19;22

In videos vbv_500_500 and vbv_700_700, vbv_0_0 is perfect.

Thanks
thiagoprado is offline   Reply With Quote
Old 18th February 2009, 19:04   #13  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Does the bug go away if you:

a) Don't use threads?
b) Don't use B-frames?
Dark Shikari is offline   Reply With Quote
Old 18th February 2009, 19:16   #14  |  Link
lexor
Registered User
 
Join Date: Jan 2004
Posts: 849
Quote:
Originally Posted by Dark Shikari View Post
Does the bug go away if you:

a) Don't use threads?
b) Don't use B-frames?
I would add:
c) decoder is too old/problematic (get latest ffdshow from the try-outs thread)
__________________
Geforce GTX 260
Windows 7, 64bit, Core i7
MPC-HC, Foobar2000
lexor is offline   Reply With Quote
Old 18th February 2009, 19:21   #15  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by lexor View Post
I would add:
c) decoder is too old/problematic (get latest ffdshow from the try-outs thread)
No, it's an encoder issue.
Dark Shikari is offline   Reply With Quote
Old 18th February 2009, 19:33   #16  |  Link
shon3i
BluRay Maniac
 
shon3i's Avatar
 
Join Date: Dec 2005
Posts: 2,419
Try this build http://www.mediafire.com/?3nozdw0ozn1
shon3i is offline   Reply With Quote
Old 18th February 2009, 19:34   #17  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by shon3i View Post
No, the fix in that build was already put into official x264.
Dark Shikari is offline   Reply With Quote
Old 18th February 2009, 20:34   #18  |  Link
thiagoprado
Registered User
 
Join Date: Oct 2008
Posts: 30
I did with no b-frames. Same problem.
I don't know how to disable threads. I can only set 0 (auto) or 1, 2, 3...
I also did with the suggested build and got the same problem.

I read in other post a similar problem with fade transition, but I'm having with dry cuts.

Thanks

Last edited by thiagoprado; 18th February 2009 at 20:36.
thiagoprado is offline   Reply With Quote
Old 18th February 2009, 20:35   #19  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by thiagoprado View Post
I don't know how to disable threads. I can only set 0 (auto) or 1, 2, 3...
Using "--threads 1" will disable multi-threading...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 18th February 2009, 20:52   #20  |  Link
thiagoprado
Registered User
 
Join Date: Oct 2008
Posts: 30
1) With vbv-maxrate and vbv-bufsize 480 to 900Kbps = Problem
2) With vbv-maxrate and vbv-bufsize 480 to 900Kbps + no b-frames + no threads = Problem
3) With vbv-maxrate and vbv-bufsize 0 = Perfect
4) With vbv-maxrate and vbv-bufsize 3000Kbps (incredible high to this bitrate and out of my bandwidth) = Perfect

Last edited by thiagoprado; 18th February 2009 at 21:01.
thiagoprado is offline   Reply With Quote
Reply

Tags
bug, mediacoder, vbv-maxrate, x264

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.