PDA

View Full Version : Write SSIM/PSNR to stream header (x264)


Ranguvar
7th August 2008, 04:59
When SSIM/PSNR is enabled, could the values be written to the header of the video stream along with the encode settings used?

:thanks:

LoRd_MuldeR
7th August 2008, 05:09
I think this info is only available at the end of the encode, so how could it be written to the header?

Ranguvar
7th August 2008, 05:35
Arrgh. Forgot about that. Apologies.

cogman
7th August 2008, 06:01
Not only that, But I believe that goes against the H.264 standard. The authors of x264 are much opposed to that (Doing anything not specified by the accepted standard) I could be wrong as I haven't read the entire standard. But I am pretty sure that is not in the provisions of it.

Dark Shikari
7th August 2008, 06:02
Not only that, But I believe that goes against the H.264 standard. The authors of x264 are much opposed to that (Doing anything not specified by the accepted standard) I could be wrong as I haven't read the entire standard. But I am pretty sure that is not in the provisions of it.You can put anything you want in a user-data SEI. x264 already does.

Sagekilla
7th August 2008, 06:09
IIRC, if you do --verbose it'll show you all the metric stats on a frame by frame basis, since it prints out SSIM, PSNR, along with the number of bits used for that frame across a number of different uses. The only thing that would have to be done is add an output handler to pass over the stats so it could be written along with that frame to the file. At least, that's what it seems like for me.

audyovydeo
7th August 2008, 09:13
Every video encoding API I've ever heard of takes frames in order, and what has been written is done with. GPAC, libmatroska, libavformat, mencoder, ..., none has any way to change the file header after we're done encoding, short of a whole remux. Worse yet, some formats store the SPS with every keyframe, and you'd have to remember/change all of them.


I asked the same question in another context, akupenguin buried that definitively.

cheers
audyovydeo