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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
multi-threads break hd dvd compliance (bug?)
Hello.
While attempting to I learn to encode x264+ac3 for a HD-DVD player (Toshiba HD-E1) by adapting MeGUI's x264:SA-HD-DVD profile to my command-line MacOSX environment, I bumped into a strange behaviour triggered by "--thread auto" as opposed to "--thread 1" which may well be a bug. I can't say much more that when burned to HD-DVD format the encodes with "--threads 1" work fine, while for those with "--thread auto" (which is 3 in my case) playback stops abruptly, systematically at several and frequent spots, always the same (and it took me much longer than I'd like to admit to get to this stage). If I compare the x264 -v logs, the encodes are almost identical, the GOPs appear to be the same, while frame QPs, sizes and bitrates differ very, very marginally. Yet, when I play the disc, "--threads 1" work, "--threads 3" aborts playback with no message whatsoever, as if the end of the stream had occurred. I have verified this behaviour on winxp to, using MeGUI. Has anybody came across this? Is it likely to be a bug in the concurrency management? It'd be good to fix it, it's no fun to encode HD material with a single thread... :-( A few details: For x264, I have pulled it from git, patched with x264_hrd_pulldown.09_interlace.diff and with x264_psyrd-0.5.diff, nothing else, compiled (static, 64bit, gcc-4.2). Here is what I get: Code:
[macosx] x264_hrd --version x264 0.60.928M 4816918 [winxp virtual machine] "c:\Program Files\megui\tools\x264\x264.exe" --version x264 0.60.928M 4816918 Code:
$ "c:\Program Files\megui\tools\x264\x264.exe" test.avs --crf 21 --threads 3 --level 4.1 --keyint 14 --min-keyint 2 --ref 3 --mixed-refs --bframes 2 --b-rdo --bime --weightb --direct auto --filter -2,-1 --subme 6 --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 14745 --vbv-maxrate 29400 --qcomp 0.5 --direct-8x8 1 --me hex --progress --no-psnr --no-ssim --mvrange 511 --aud --nal-hrd --output test.264 For this fragment the summaries look something like this Code:
x264 [info]: slice I:162 Avg QP:19.43 size: 18069 x264 [info]: slice P:970 Avg QP:19.83 size: 10402 x264 [info]: slice B:919 Avg QP:21.47 size: 6438 x264 [info]: consecutive B-frames: 20.5% 26.2% 53.4% x264 [info]: mb I I16..4: 13.6% 75.9% 10.5% x264 [info]: mb P I16..4: 2.4% 12.7% 0.6% P16..4: 43.7% 17.2% 8.1% 0.0% 0.0% skip:15.4% x264 [info]: mb B I16..4: 0.2% 1.6% 0.0% B16..8: 54.2% 1.6% 2.7% direct:12.1% skip:27.6% L0:34.9% L1:50.9% BI:14.3% x264 [info]: 8x8 transform intra:78.9% inter:71.0% x264 [info]: direct mvs spatial:78.7% temporal:21.3% x264 [info]: ref P L0 72.2% 18.4% 9.4% x264 [info]: ref B L0 83.5% 16.5% x264 [info]: kb/s:1846.3 encoded 2051 frames, 13.98 fps, 1851.60 kb/s Regards, and thanks for any help you might be able to give. (currently travelling, I might answer slowly). (PS. It occurred to me that this might be a bug in one of the patches hrd or psy-rdo, for a long while I suspected a problem with vbv and later on with interlace) Last edited by vmrsss; 7th August 2008 at 01:56. |
|
|
|
|
|
#2 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
It's not quite a bug, it's rather a known subobtimality. x264 is close to useless in one pass encoding with VBV constraints. Things gets worse with multithreading which complicates x264's job in regard to VBV constraints. You're better off using two passes, even if you don't care about bitrate. Do the first pass in CRF without VBV constraints, and the second one at the obtained bitrate with VBV constraints. If you can afford it, don't multithread the second pass.
__________________
|
|
|
|
|
|
#3 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
I'd also say its rather obnoxious (and perhaps intentionally misleading, given that your company produces a competing product...) to claim that x264 is "close to useless" in onepass mode considering that my company's entire business model successfully depends on onepass mode working properly under heavy VBV constraints with large numbers of threads on hundreds of realtime encoders simultaneously. "Not multithreading the second pass" seems particularly absurd since the second-pass VBV algorithm is run before the encoding process as part of the 2pass ratecontrol--threading has no effect on this. I would, of course, recommend 2pass with VBV whenever possible, since it will give strictly better results.
__________________
Follow x264 development progress | akupenguin quotes | x264 git status ffmpeg and x264-related consulting/coding contracts | Doom10 Last edited by Dark Shikari; 7th August 2008 at 06:34. |
|
|
|
|
|
|
#4 | Link |
|
Testeur de codecs
Join Date: May 2003
Location: France
Posts: 2,546
|
Well seem not a vbv problem:
- If you use HDDVD player you use a HDDVD authoring software and there are vbv check at the mux. - The part use really low bitrate (local bitrate is 1850 Kbps with max at 29400 Kbps). There are another problem ... perhaps GOP compliancy or motion vector compliancy in multithread mode.
__________________
Le Sagittaire ... ;-) 1- Ateme AVC or x264 2- VP7 or RV10 only for anime 3- XviD, DivX or WMV9 |
|
|
|
|
|
#5 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Hi again. I did not mean to ignite a school-of-thought debate (I am just as amateur, a great fan of CRF who uses 2pass when a specific size is required). I just think I accidentally bumped into what look like a nasty bug, which may in principle manifest itself in other contexts and might therefore be worth a look.
No, I don't think it is a VBV problem. The bitrates are small (this is just a DVB I am using as a test). The only difference between the encodes appear in fact to be the pre-scenecut parameter. Inspecting the logs frame by frame, the differences that this induces on the QPs and bitrates are relatively minute, we are talking hundreds of bytes, and the largest the frames become is below 25KB. GOPs indeed differ with or without multithreads. But they do not exceed the limit of 14 frames (though they reach it in both versions). Sagittaire, are you saying that --keyint should be lower than 14? Hmm, I am not sure this is the way, because also the single-threaded versions has several GOPs running up to the limit, with no problems. Regarding the move vectors, sounds intriguing but I am not competent to guess. Is it a real possibility? What test might reveal it? Thx PS. I had forgotten to add the most important observation that I did of course run some of the over 100 tests I did with 2 passes, and the result is the same: both with my macosx-compiled x264 and with winxp's meGUI precompiled one, --threads 1 is complaint, --threads auto or 3 breaks it. (Incidentally, in doing this I notice that MeGUI's gui environment seems to ignore the --threads auto setting, which confused me for while.) Last edited by vmrsss; 8th August 2008 at 02:06. Reason: typo |
|
|
|
|
|
#6 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
|
|
|
|
|
|
|
#8 | Link |
|
Testeur de codecs
Join Date: May 2003
Location: France
Posts: 2,546
|
My intuition say problem with motion vector length. Try to reduce the mvrange at 255 and see the result ...
__________________
Le Sagittaire ... ;-) 1- Ateme AVC or x264 2- VP7 or RV10 only for anime 3- XviD, DivX or WMV9 |
|
|
|
|
|
#10 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
I have overlooked the low final bitrate, so indeed VBV shouldn't be an issue. I don't see how threading could increase MV length, since, if anything, threading put more constraints on MVs. I would search for a bug in HRD patch, but then so many people have used it successfully that I don't see why it wouldn't work for you.
Dark Shikari : I don't like gratuitous attack on my probity, especially when you yourself explicitely bash 1 pass VBV handling : http://forum.doom9.org/showthread.ph...60#post1167360 Not multithreading the second pass (or reducing the number of threads) was perhaps overdoing it, but I think in with small VBV (in duration) and average bitrate around half the maximum bitrate, it might still be necessary.
__________________
|
|
|
|
|
|
#11 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
My reasons for recommending against it are much the same reasons I wouldn't recommend 1pass ABR. |
|
|
|
|
|
|
#12 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
I have not tested "--thread 1 --pre-scenecut", good point, I will do and let you know. I will also test "--thread 2 --mvrange 255". I can't burn and do a full test on my SA, because I am travelling at the moment (I'll be home only at the end of next week), but I'll run a few encodes and log at the logs anyway.
As for upload, yes, any advice on the site to upload to? |
|
|
|
|
|
#13 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
|
|
|
|
|
|
|
#14 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Hello.
I have uploaded a zip file containing the same sequence encoded with --threads 1 and --thread 3, and the corresponding output from x264 -v. http://www.mediafire.com/?imsk2xfsgv1 playback on SA player stops at a frame 390 <= F <= 420 for --thread 3, goes fine for --thread 1. (The speed of my current connection advices again uploading the YUV source, though I will try if that is of the essence.) I have run a few more tests with --pre-scenecut, and although I cannot be completely certain of the reaction of my SA player, it really look as though there is where the problem lies. In particular, I have noticed that in all encodes with --pre-scenecut, whether forced by multithreading or explicitly added, whether with with --mvrange 255 or --mvrange 511, there are frame sequences I-I which do not occur without --pre-scenecut and that appear to break the command line setting --min-keyint 2. (These occurrences do not seem to be near the place where things go wrong, but seems to tell something is not quite right with --pre-scenecut...) (In the logs there is also a message about setting the move vectors range to 88 whose extent I don't think I understand.) Cheers. Last edited by vmrsss; 9th August 2008 at 02:31. |
|
|
|
|
|
#17 | Link |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
I notice nothing particularly odd about the sequences except for the fact that somehow they're constructed in a manner that prevents my stream analyzer from seeking correctly, which made it rather aggravating to do any sort of analysis at all.
|
|
|
|
|
|
#20 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Oh, I see now. NAL-HRD and PSY-RDO are the only "non-official" patches applied. It should be easy to answer this specific question by encoding with the same settings excluding --nal-hrd. More generally, could this all be a problem with nal-hrd? Is it influenced at all by the number of running threads? Perhaps nal-hrd's author is reading...
Last edited by vmrsss; 11th August 2008 at 12:16. |
|
|
|
|
|
#21 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
new tests
Hello. I have now been able to run a few more tests on this and I think I can confirm it seems to be all down to pre-scenecut: the playback problems seems to be triggered by having --pre-scenecut when making frame-type decisions, more precisely scenecuts (but I still don't know what it is that actually causes the crashes). In fact:
(a) encodes with --threads 1 and --pre-scenecut (as well as encodes with --threads 3) crash (at the same frame), as long as scenecut > 0, both with --crf and with --pass 1 --bitrate; (b) encodes with: --threads 1 and no --pre-scenecut or with: --scenecut 0 and any number of threads, work well. (c) 2-pass encodes work well if their --pass 1 falls in case (b), crash if their --pass 1 falls in case (a); in particular after "--pass 1 --threads 1" it is OK to run "--pass 2 --threads auto", if the first pass has --pre-scenecut, the second pass will produce a faulty stream. I have put these examples at http://www.mediafire.com/?c9d96s2t5iy with and without --nal-hrd, as Dark Shikari mentioned the latter makes analysis more difficult for him. (In the filenames T1, PS, T3, SOT1, SOT3 mean respectively --threads 1, --pre-scenecut, --threads 3, --scenecut 0 --threads 1, and --scenecut 0 --threads 3.) The problem frame is around frame 155 in PS and T3. I have no clue about what is actually happening, so I would like to compare the --scenecut and --pre-scenecut code to see if I can find out anything. Dark Shikari, would you have time to interact on this this week? Regards. |
|
|
|
|
|
#23 | Link | |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Quote:
Technically, how is it that x264 decides on fewer IDR-frames without threads? If your conclusion is right, then the breakage will happen with all sequences with quick scene changes: that --threads 1 avoid troubles might be just a lucky happening with this particular sequence which won't work in general... Or will it..? I have learned from one of Sagittaire's posts that --min-keyint must be 2 for HD-DVD. (Perhaps the information is incorrect, perhaps we are in the presence of a decoder bug.) I will now test a few more values for that parameter and then post again. Incidentally, I had already removed --min-keyint in some of my tests and, most surprisingly, an entire section of some 30 odd frames is dropped on playback around the "difficult" frame. This buggers me. Logically, what could cause that behaviour? At such low bitrates, I thought no sequence could challenge a HD player... And then, can a sequence of IDR-frames be considered "complex"? It will also be interesting to check whether the problem is in the authoring software which remuxes x264's output in .evo streams. Thanks for now. |
|
|
|
|
|
|
#24 | Link | |
|
Registered User
Join Date: Jun 2008
Posts: 175
|
Quote:
|
|
|
|
|
|
|
#25 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
|
|
|
|
|
|
|
#27 | Link | |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Hi DS
Quote:
Code:
h264 sequence: 376 frames; problem sequence 32 frames after HD-DVD authoring to evo containers: min-keyint 2: frames 362; problem sequence 32f; playback broken min-keyint 4: frames 325; problem sequence 24f; playback ok min-keyint 6: frames 312; problem sequence 20f; playback ok min-keyint 12: frames 290; problem sequence 09f; playback ok If you can spare time to give a look, I have packed a few h264 streams with the corresponding evos generated by authoring at http://www.mediafire.com/?iudl62uk3xy Hopefully, you might be able to spot something resolutive. Cheers. |
|
|
|
|
|
|
#29 | Link | |
|
Compiling Encoder
Join Date: Jan 2007
Posts: 1,348
|
Quote:
since that means that IDR frames will occur at exact increments of that value, giving x264 no relaxation at all in IDR placement i.e. potentially putting them in spots that really shouldn't deserve them. |
|
|
|
|
|
|
#30 | Link |
|
Software Developer
![]() Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,223
|
If you have two or even more scene-changes within your min-keyint, then the encoder is not allowed to place an IDR frame at each scene-change, although this would be most efficient way to encode these scene changes. Using a larger min-keyint obviously increases the probability that this happens...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 19th August 2008 at 04:12. |
|
|
|
|
|
#31 | Link |
|
Testeur de codecs
Join Date: May 2003
Location: France
Posts: 2,546
|
If you don't have problem only with --threads 1 it's IMO problem for GOP compliancy with x264. Use simply --threads 1 for fast first pass and use --threads 3 for slow second pass.
__________________
Le Sagittaire ... ;-) 1- Ateme AVC or x264 2- VP7 or RV10 only for anime 3- XviD, DivX or WMV9 |
|
|
|
|
|
#32 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
If you have a case of x264 violating the --min-keyint parameter, I would like a sample. However, I have never seen such a thing, and doubt I ever will. |
|
|
|
|
|
|
#33 | Link | ||
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Hi everybody.
Thanks to all for taking an interest in this. Let me retrace the key steps in this: I too started from the point of view that this ought to be x264's fault, because I just couldn't conceive how varying the number of threads could have any effect whatsoever on any decoder at all (that is, logically it shouldn't). Removing all patches and counting all GOPs from the -v logs (on several different short sequences showing the problem) is the first thing I did, and --keyint is not broken. I thought --min-keyint was, but DS explained i was confused between I and IDR frames. So, that leaves us with the following options: (1) --min-keyint 2 is after all not compliant with HD-DVD specs; this seems to be ruled out by several sources on the net, as well as the fact that "--threads 1 --min-keyint 2" works just fine. (2) it is x264's fault, but definitely something subtler than GOP compliancy. This would be something that happens only with --prescenecut and causes the hd-dvd authoring software to shed some "problem" GOPs when remuxing, apparently sufficiently many for the player to work when --min-keyint > 3, not enough when --min-keyint =2,3. I don't think we can discard this possibility, yet I don't believe I have a serious chance to catch it by running random experiments (eg, haven't tried --bframes 0 or --no-cabac or...) and without any analysis tools. That is why I started to post samples hoping that DS or some x264 cognoscenti of his calibre could give some help. (3) like 2 above, but not because x264 does something wrong, but because we don't fully understand HD-DVD compliance and pass it the "wrong" command line, if you see what I mean. In this case, it would be even more interesting to understand what triggers the problem. (4) the hd-dvd author software that is buggy, the other side of the coin of point 2 above. I have verified that going from .h264 files to .evo in HVDDVD_TS folders it drops frames if --pre-scenecut is set when frame-type decisions are made (and doesn't otherwise). I find this bizarre, there is no audio here, what reason are frames being dropped for? It could simply be a bug, and possibly it may be exactly such dropping which breaks compliance! I find this option rather attractive, which is why I packed some of the .evo files hoping for DS to give them a look. Quote:
Quote:
Regards. |
||
|
|
|
|
|
#34 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
Not a single one of your samples has shown a case where x264 violates the --min-keyint rule. |
|
|
|
|
|
|
#35 | Link | ||
|
Registered User
Join Date: Jun 2008
Posts: 175
|
Quote:
Quote:
|
||
|
|
|
|
|
#36 | Link | ||
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
Also, that quote is wrong, the correct quote is Quote:
|
||
|
|
|
|
|
#37 | Link |
|
MPC-HC Project Manager
Join Date: Mar 2007
Posts: 2,226
|
I may be misunderstanding here but.
All other settings equal: Threads1> File works Threads3> File breaks. All threads those is either spread, or not spread the work over several cores/hw threads. So its obvious that either threads1 is broken or threads3, with the latter being more obvious. So what we need is a sample file with threads1 and a sample file with threads3 + confirmation that 1 works and 3 is broken. (On the other hand its obvious that threading is not working 100% yet, might be better not to use it for anything but testing? It's difficult to troubleshoot it when it's only partially able to thread tasks) |
|
|
|
|
|
#38 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
Just because a setting triggers a problem does not mean the setting is at fault for the problem. As I have said a dozen times already, what's happening is pre-scenecut is more aggressive on scenecut and puts IDR frames closer together. Your device cannot handle this, yet you still refuse to stop using a min-keyint that is incompatible with it! I don't care if you are incapable of listening to basic instructions to solve your own problems, but I don't want you spreading FUD about "bugs in x264"--we have enough real bugs and don't need people to come up with fake new ones just to confuse people. |
|
|
|
|
|
|
#40 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
Having no-b-adapt with scenecut doesn't make that much sense, since if you want a single number of B-frames everywhere, scenecut will stop that (so you will lose the ability to have temporal scalability, which would be the primary reason to have no-b-adapt, I'd think). |
|
|
|
|
|
|
#41 | Link | |
|
MPC-HC Project Manager
Join Date: Mar 2007
Posts: 2,226
|
Quote:
Damn and i read it twice too, i didn't see his min-keyint in the first post. If he stops using that the file should work. |
|
|
|
|
|
|
#42 | Link |
|
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
... ill update the megui HD-DVD presets with min-keyint 4 so ppl will stop bitching ...
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
|
|
|
|
|
#44 | Link | |
|
Registered User
Join Date: Jun 2008
Posts: 175
|
Quote:
Is there any reason to have no-b-adapt with scenecut, maybe no-b-adapt should be no-b-adapt-and-scenecut?
|
|
|
|
|
|
|
#45 | Link | |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Quote:
|
|
|
|
|
|
|
#46 | Link | |
|
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
so whats the problem?
you said: Quote:
no it's not a bug. rise the min-keyint if you use more than 1 thread.
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
|
|
|
|
|
|
#48 | Link | ||
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Quote:
I believe 3 and 4 are much more likely than the rest; to understand what really is the problem may lead to an improved SA-HD-DVD profile (besides addressing my vested interest with my SA player) Quote:
Regards Last edited by vmrsss; 19th August 2008 at 17:36. |
||
|
|
|
|
|
#49 | Link |
|
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
good. well, i've done it for him some minutes ago. he just need to update the megui presets.
however min-keyint 2 always worked here... bah...
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
|
|
|
|
|
#51 | Link | |||
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Quote:
Quote:
Quote:
Friendly, -vmrsss |
|||
|
|
|
|
|
#52 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
|
|
|
|
|
|
|
#53 | Link | ||
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Quote:
Quote:
That is where I started to think that this may all be a red-herring, and after all there might be nothing wrong with --min-keyint 2 nor with my device, and that is the conjecture I am trying to test at the moment... PS. Again, lest we misunderstand each other, I am not saying x264 is at fault. I am investigating an issue with HW compatibility. Last edited by vmrsss; 19th August 2008 at 17:38. |
||
|
|
|
|
|
#54 | Link |
|
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
ok, so try using a different muxer and see if the problems persists
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
|
|
|
|
|
#55 | Link | |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Quote:
If instead your sentence is because of what you read in this thread, I would like to remark that the statement that --min-keyint 4 solves the problem is not a proven fact, it is just a conjecture of mine which I am still in the process of checking out. I would be very happy however to agree that this is not a bug with x264 (can I change the thread's title?), so that nobody has to feel defensive in this discussion. |
|
|
|
|
|
|
#57 | Link |
|
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
i was going by logic. 2 doesnt work, 4 does... keep 4.
however, have you access to another muxer? coz if not, we wont be able to estabilish if that's a muxer problem or not.
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
|
|
|
|
|
#58 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Trying with the tools I have. I am having problems with mplayer, seem to be having some success with ffmpeg and VLC. Unfortunately, I don't seem able to find an alternative to generate the HDDVD_TS folder with Toast, which is indeed the weakest link in the chain...
|
|
|
|
|
|
#62 | Link |
|
Testeur de codecs
Join Date: May 2003
Location: France
Posts: 2,546
|
1) You use certainely Sonic scenarist for the mux and Sonic Cinevision encoder profil use 4 frames for minimum interval between Iframe. Perhaps simply muxer limitation here.
2) For HDDVD compliant stream all the Iframe must be IDR.
__________________
Le Sagittaire ... ;-) 1- Ateme AVC or x264 2- VP7 or RV10 only for anime 3- XviD, DivX or WMV9 |
|
|
|
|
|
#64 | Link |
|
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
as i did for blu-ray megui presets, i ensured they will work on ALL HD-DVD compatible HW/SW, so i will keep min-keyint 4 in the HD-DVD presets.
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
|
|
|
|
|
#65 | Link | |
|
MPC-HC Project Manager
Join Date: Mar 2007
Posts: 2,226
|
Quote:
Also vmrsss said that although it fixes the first problem it causes a new one Last edited by tetsuo55; 20th August 2008 at 12:48. |
|
|
|
|
|
|
#66 | Link |
|
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
i dont care. 4 is ok and seems to work well with hd-dvd sw/hw.
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
|
|
|
|
|
#68 | Link | |
|
Registered User
Join Date: Jun 2008
Posts: 175
|
Correct me if this is wrong, but:
Quote:
Where it from? P.S. is IDR stays for "I Delete References"?
Last edited by Quark.Fusion; 20th August 2008 at 14:35. |
|
|
|
|
|
|
#69 | Link |
|
Compiling Encoder
Join Date: Jan 2007
Posts: 1,348
|
The major reason to reduce the min-keyint/max-keyint values is to increase the frequency of IDR frames to improve seeking.
since i'm not all that good with names of things, wikipedia had the answer of Instantaneous Decoding Refresh as for x264 producing non-IDR i-frames, afaik the only way it produces them is when it's told to via a qpfile. Would need akupenguin or DS's confirmation on this though. |
|
|
|
|
|
#70 | Link | |
|
x264 developer
Join Date: Sep 2005
Posts: 8,664
|
Quote:
|
|
|
|
|
|
|
#72 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Unfortunately, I can't confirm yet. I spent a lot of time on this, without any real result. I downloaded all the muxer/burners with a trial period I could find, but for one petty reason after another I couldn't get any of them to accept the h264 generated by x264. So, no actual burning, no actual tests on the HW. Very frustrating.
|
|
|
|
|
|
#75 | Link |
|
Registered User
Join Date: Oct 2007
Posts: 47
|
Is it at all possible that there could be an HD-DVD compliance issue caused by using I frames which are not IDR?
Sagittaire mentioned this above but sofar nobody has confirmed or denied it. If that is plausible, it might be worth checking vmrsss' "threads 1 without pre-scenecut" output to see if it just happens to have no I frames which are not IDR. It might also be interesting to do an encode with min-keyint of 1 (just for troubleshooting; I know it's off-spec) to see if that causes any problems with the muxer or hardware player. |
|
|
|
|
|
#76 | Link | ||
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Quote:
Quote:
Code:
x264 [debug]: frame= 0 QP=17.42 NAL=3 Slice:I Poc:0 I:6120 P:0 SKIP:0 size=41769 bytes x264 [debug]: frame= 1 QP=19.90 NAL=2 Slice:P Poc:4 I:0 P:262 SKIP:5858 size=478 bytes x264 [debug]: frame= 2 QP=25.00 NAL=0 Slice:B Poc:2 I:0 P:151 SKIP:5969 size=163 bytes |
||
|
|
|
|
|
#77 | Link |
|
Compiling Encoder
Join Date: Jan 2007
Posts: 1,348
|
in the .stats generated by x264
i.e. Code:
in:500 out:500 type:I q:16.45 itex:165538 ptex:0 mv:23069 misc:337 imb:1350 pmb:0 smb:0 d:s; a type of lower case 'i' is a regular i-frame so can run grep/find on the .stats looking for "type:i" and if any hits occur, it has i-frames: windows: find "type:i" xxx.stats linux (or with gnuwin32 tools for windows): grep type:i xxx.stats Last edited by kemuri-_9; 21st August 2008 at 18:06. |
|
|
|
|
|
#78 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
the bottom line
I think we can write the bottom line of this thread.
I have finally managed to feed another muxer with x264's output, and guess what: the muxer likes x264 and the toshiba hd-e1 plays the resulting hd-dvd perfectly, with --min-keyint = 1, 2, 3, ..., 14 (and --bframes 3, --ref 4, --b-pyramid and all the rest), 720x576, 1280x720, 1440x1080 and 1920x1080. I suppose this finally proves that it was all due to a bug with buggy Roxio Toast; not the first time I'm forced to make this observation after having wasted precious days. Indeed, the fact that it autonomously dropped frames when muxing was a strong indication that something wasn't quite right. Quite why then Toast appears to mux well h264 streams generated without --pre-scenecut and fails hopelessly with --pre-scenecut I will probably never know. Yet, quite frankly, I don't give a toss. I am going to buy something else anyway. (A just in time decision, as next week it is back to work, and at least till Xmas I won't be able to spend this sort of time on my encoding hobby :-) Thanks everybody for paying attention to me, and apologies for wasting your time too. Please feel free to round this up, if there is anything you want to add/ask. -vmrsss |
|
|
|
|
|
#79 | Link |
|
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
cool, so i can set min-keyint back to 2 into the megui hd-dvd presets... damn toast...
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
|
|
|
|
|
#80 | Link |
|
Registered User
Join Date: Mar 2008
Posts: 144
|
Indeed. Mind you, we have not really learned more about what is and what is not HD-DVD compliant: also --min-keyint 1 (as suggested in a post by Sagittaire) works well (and I am using --ref 4 --bframes 3 --b-pyramid just as well).
|
|
|
|
|
|
#81 | Link |
|
Mr. Sandman
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
|
i wont include b-pyramid in any hardware compatible presets until it gets properly fixed.
__________________
MPEG-4 ASP Custom Matrices: EQM V1(old), EQM AutoGK Sharpmatrix (aka EQM V2), EQM V3HR (updated 01/10/2004), EQM V3LR, EQM V3ULR (updated 04/02/2005), EQM V3UHR (updated 17/12/2004) and EQM V3EHR (updated 05/10/2004) Info about my ASP matrices. MPEG-4 AVC Custom Matrices: EQM AVC-HR Info about my AVC matrices My x264 builds. Mooo!!! |
|
|
|
![]() |
|
|