PDA

View Full Version : x264 preheader use


patrick_
15th July 2009, 12:44
I'm just wondering, what's the use of the preheader in the .264 file created by x264? I'm talking about what seems to be a 0x00 terminated string, starting with: "x264 - core 68 r1181 49bf767 - H.264/MPEG-4 AVC codec - Copyleft 2003-2009 - http://www.videolan.org/x264.html - options: "
Is there any program (player, decoder) that uses this information or is it just some reminder about the configuration used? Maybe to track possible encoding bugs?

Guest
15th July 2009, 13:48
Players don't use it. It is just a recording of the options used.

akupenguin
15th July 2009, 14:04
libavcodec uses such version headers for bug workarounds, though that's only happened once long ago for x264.

Dark Shikari
15th July 2009, 18:36
libavcodec uses such version headers for bug workaroundsAs does CoreAVC.

patrick_
19th July 2009, 08:13
Thanks to all of you. So actually it's something that used to be usefull, but right now it shouldn't be. Anyway, the point of my question was to know if I could freely use that space to store any other info. I noticed that all players (WMP, VLC, MPC, XBOX360) reproduce the video without problems. MediaInfo also shows the information fine (at least the newest version, some older one hangs depending on the content of those bytes).
BTW Just to make clear, I have no intencion to remove the copyright notice, just the version and options part.

Dark Shikari
19th July 2009, 10:02
Thanks to all of you. So actually it's something that used to be usefull, but right now it shouldn't be. Anyway, the point of my question was to know if I could freely use that space to store any other info. I noticed that all players (WMP, VLC, MPC, XBOX360) reproduce the video without problems. MediaInfo also shows the information fine (at least the newest version, some older one hangs depending on the content of those bytes).
BTW Just to make clear, I have no intencion to remove the copyright notice, just the version and options part.Why remove the version and options section? Why not just add the extra information after (or before) it by increasing the size of the SEI data?

Also, if you try to manually hexedit it, the results will not be what you expect. (Read: you will break things)

akupenguin
19th July 2009, 18:55
So actually it's something that used to be usefull, but right now it shouldn't be.
If we knew in advance which releases contained bugs, we would have fixed them before committing. Everything has to contain the header, in case we later notice that earlier streams need a workaround.