View Full Version : x264 mp4 output broken (formerly PPS every picture)
lexor
29th March 2008, 03:56
/EDIT: This post is no longer relevant, see post #6
Hi guys, I've been trying to generate a ps3 compatible stream and I used both the ps3-360 profile and blu-ray one in MeGUI and they both didn't play. I tried passing them with h264info (thinking it didn't stamp it as level 4.1 correctly), and it worked, but then I noticed that there is another option that is enabled by default in h264info: "Write PPS every picture", I tried leaving it on and not setting the level (so all settings are black or checked off, only PPS setting is on). It worked.
So my question is this. Must I use h264info tool on every file I generate or can I make x264 write PPS the way h264info does?
MeGUI Blu-ray profile is as follows (I just changed 2 pass to crf):
--crf 22 --level 4.1 --keyint 24 --min-keyint 1 --ref 3 --mixed-refs --bframes 3 --bime --weightb --direct auto --partitions p8x8,b8x8,i4x4,i8x8 --8x8dct --ipratio 1.1 --pbratio 1.1 --vbv-bufsize 30000 --vbv-maxrate 38000 --qcomp 0.5 --merange 12 --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input" --mvrange 511 --aud --nal-hrd --sar 1:1
akupenguin
29th March 2008, 06:55
PPS every picture is insane, and I won't allow it in x264 even if it is required by some device.
Trahald
29th March 2008, 13:28
PPS every picture (access unit) is NOT mandatory in bluray. You see it alot in pro streams because the encoding is so dynamic that the info in the PPS changes every frame so the PPS is needed so the decoder has the values. In such a stream, not copying the values over would corrupt the stream which is why I had to add the option.
PPS is only required to be in the first access unit of a GOP in bluray spec. something else changed that allowed the stream to be accepted (not sure what tho.. if all you did was set level )
lexor
29th March 2008, 15:11
PPS is only required to be in the first access unit of a GOP in bluray spec. something else changed that allowed the stream to be accepted (not sure what tho.. if all you did was set level )
Alright, my original diagnosis was wrong (though x264 output still doesn't play). h264info is definitely doing something, though it may not be PPS thing.
Here is what I tried:
x264 output = doesn't play
PPS(ON) + level(blank) = play
PPS(OFF) + level(4.1) = play
So neither one of those options is responsible, so I tried.
everything(OFF and Blank) = play!
So h264info always does something that is not user controlled or maybe some of the blank values have defaults that are always applied to the stream. The later seems likely since my log grew over 30mb on last try (everything off), even though I had Log to File and to Screen disabled (always had those disabled).
Guest
29th March 2008, 15:24
If you post links to the stream that doesn't play and the same one that is passed through h264info and plays, I can compare them for you and suggest what might be the relevant differences.
lexor
29th March 2008, 16:21
Alright, lets make like Space Invaders and lets increase speed and reverse direction.
H264 stream is apparently fine. After realizing that cut up h264 stream put in mp4 played, I did a bit more testing. Here is what's happening:
the mp4 file produced by megui (possibly by x264 as I conjecture later) doesn't play (in ps3, plays fine in mpc with haali splitter)
if I try to remux mp4->new mp4 in megui, it doesn't play
if I try to remux mp4->new mp4 using Yamb, nothing happens (immediately says complete, without any output)
if I extract h264 stream and mux it into mp4 using either megui or yamb, it plays (both megui and yamb point to the same mp4box.exe)
Now I'm not entirely certain of how things work internally, but I'm pretty sure that x264 has built in support for mp4 output, thus my current theory is that when I use megui to encode it generates output mp4 using x264 built-in code and not mp4box (in tools dir), and something is broken in there. This will explain why when I remux that mp4 to a new one, the new one is also borked (it preserves whatever is wrong with the old mp4), but if I extract h264 stream and mux that using mp4box, it works.
mp4box in megui dir is: MP4Box - GPAC version - 0.4.5-DEV - compiled by Kurtnoise - Sep 14 2007
I don't know what GPAC version x264 was built with
Since I recall Sharktooth used to do GPAC updates for mp4 support on his compiles when he used to do those, preliminary fist shaking goes to this Jarod person who's apparently doing the new builds that come in megui.
bond
29th March 2008, 17:46
x264 and mp4box both use gpac's mp4 lib for mp4 muxing
lexor
29th March 2008, 19:13
x264 and mp4box both use gpac's mp4 lib for mp4 muxing
I noted that, but are they using the same version? I mean MeGUI recently rolled back the mp4box version (well it updated it then rolled it back), maybe there are issues with the gpac version build with x264.
Otherwise where else can the problem be? Same stream doesn't play in mp4 output by x264 but plays in mp4 output by mp4box. What else, but the container and therefore the muxer, can be the issue here? There are no other streams and no other tools.
lexor
31st March 2008, 04:17
Well since this isn't going anywhere on its own (though it might be the weekend), I was wondering who does the builds that MeGUI auto-updates to? The updater says Jarod, but I seem to recall that someone (sharktooth I think it was) said in the "Patches and Where to get them thread", that bob0r's latest builds were added to MeGUI even though that update still said Jarod. So is bob0r = Jarod? Is he the person to PM so we can at least find out which version of gpac is built into x264.exe?
Dark Shikari
31st March 2008, 05:25
So is bob0r = Jarod?Yes .
bob0r
31st March 2008, 07:11
On x264.nl under updates when you scroll down:
01-03-08: 740: gpac (.mp4 output) updated (changelog)
That link points to:
http://gpac.cvs.sourceforge.net/gpac/gpac/Changelog?revision=1.73&view=markup&sortby=date
Means i compiled gpac when changelog updated to 1.73.
I always use the CVS checkout code, exact versioning is hard on CVS.
lexor
31st March 2008, 15:33
Well I just tried with 736, which should have an older version of gpac, and it's still the same. mp4 output doesn't play, h264 extracted and muxed again with mp4box plays (although mp4box has an even older version). I don't know... I guess I'll just go back to generating raw avc as output and mux later.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.