Log in

View Full Version : x264 encoding options, where do they come from?


RedDwarf1
23rd January 2010, 21:45
I have been doing some test encodes, trying various options and looked at a small video that I encoded and ran it through mediainfo. I hadn't thought about it before now and it raised a question.

Where does the encoding settings information come from as displayed by MediaInfo? Is that inserted by x264 or by the muxing program?

Dark Shikari
23rd January 2010, 21:55
x264 inserts it in the form of a userdata SEI.

RedDwarf1
23rd January 2010, 22:29
Thank you but excuse my ignorance but what does SEI mean or stand for?

Does a media player or hardware device rely on that information to play back the file?
Is that data optional, can it be enabled/disabled, can it be altered in any way and if so by what program?

Dark Shikari
23rd January 2010, 22:30
The data is optional but we will not help you remove it, because there is no legitimate reason to do so and plenty of very illegitimate reasons.

LoRd_MuldeR
23rd January 2010, 22:34
Thank you but excuse my ignorance but what does SEI mean or stand for?

SEI = Supplemental Enhancement Information

SEI messages assist in processes related to decoding, display or other purposes. However, SEI messages are not required for constructing the luma or chroma samples by the decoding process. Conforming decoders are not required to process this information for output order conformance to this Recommendation | International Standard (see Annex C for the specification of conformance). Some SEI message information is required to check bitstream conformance and for output timing decoder conformance.

Does a media player or hardware device rely on that information to play back the file?

H.264 decoders will simply ignore it. But that info is important if files are submitted for debugging purpose...

Is that data optional, can it be enabled/disabled, can it be altered in any way and if so by what program?

HexEditor ;)

Dark Shikari
23rd January 2010, 23:44
HexEditor ;)The last someone tried to do that, they broke libavcodec by producing an invalid stream. It's trickier than you think ;)

Terranigma
24th January 2010, 00:09
Well, setting all human-readable ASCII chars within the SEI message to 0x20, shouldn't break anything...

hey hey now, the developers don't want the info removed, so why're you sharing this? :)

LoRd_MuldeR
24th January 2010, 00:27
hey hey now, the developers don't want the info removed, so why're you sharing this? :)

Because it's trivial. It's not like that info is a secret...

Dark Shikari
24th January 2010, 00:57
Because it's trivial. It's not like that info is a secret...It's not at all a secret, and furthermore, that's not even the easiest way to do it. But posting HOWTOs is just an invitation for scriptkiddies to use it for nefarious purposes.

LoRd_MuldeR
24th January 2010, 01:05
Right. Post deleted. But can't delete what has been quoted by others...