Log in

View Full Version : is it possible to change fields order in AVC stream?


Emelyanov
10th August 2009, 17:35
Anybody can help with an advice?

There ia a restream program that allow to change some parameters in the mpeg-2 stream without reencoding.
What about h.264 analog?
is it possible to change fields order in the AVC stream?

akupenguin
11th August 2009, 06:48
Field order in h.264 can be stored in two places. The first in in the slice header, which you can't just change, because it affects direct mv prediction and such things that depend on POC. The second is the pic_timing SEI, which you can add/remove/change with impunity.
However, any h.264 decoder is allowed to ignore any SEI message, so you have no guarantees about what happens if both infos are present and they disagree.

If you want a program to do the munging... sorry, I can only answer theoretical feasibility, not whether it has been implemented.

Emelyanov
12th August 2009, 08:49
Akupenguin, thank you!
Here is a link to the example picture with parameters.

http://rapidshare.com/files/266284983/Untitled-1.jpg.html

Let me know please where is the ones regards field order?

Sergey A. Sablin
12th August 2009, 12:04
Akupenguin, thank you!
Here is a link to the example picture with parameters.

http://rapidshare.com/files/266284983/Untitled-1.jpg.html

Let me know please where is the ones regards field order?

open up "if (!frame_mbs_only_flag)" in slice header. If field_pic_flag is equal to 1, then no luck for you.
If stream is coded in non field mode (field_pic_flag==0) then you can change associated SEI message to change display order of fields.

Guest
12th August 2009, 12:55
What program was used to get that JPG?

Emelyanov
12th August 2009, 14:39
What program was used to get that JPG?

Elecard StreamEye

Emelyanov
12th August 2009, 17:10
open up "if (!frame_mbs_only_flag)" in slice header. If field_pic_flag is equal to 1, then no luck for you.
If stream is coded in non field mode (field_pic_flag==0) then you can change associated SEI message to change display order of fields.

Thank you, Sergey
in my case of interlaced footage
field pic flag = 0
bottom field flag = na
What does it mean? video has been coded as a Frame stream, but why does field oder NA?

while in the pic_timing -->pic_struct =3 (top, bottom, in that order)
How can i change this order? what values are available?

Sergey A. Sablin
13th August 2009, 04:03
Thank you, Sergey
in my case of interlaced footage
field pic flag = 0
bottom field flag = na
What does it mean? video has been coded as a Frame stream, but why does field oder NA?

this means that stream is coded either as interlaced frames or as mbaff frames. Both might use SEI messages for field order signalling.
NA here because this information is only valid for field coded pictures.

while in the pic_timing -->pic_struct =3 (top, bottom, in that order)
How can i change this order? what values are available?

you should change SEI to specify required display order:
frame
top field
bottom field
top-bottom
bottom-top
top-bottom-top
bottom-top-bottom
frame doubling
frame tripling

I'd recommend to look into specification for the SEI syntax before changing it.

I expect next question to be - what program should I use for this purpose. The answer is - I've no idea. There are several bitstream modifiers floating around, probably one of those can fit your need.

Emelyanov
13th August 2009, 06:45
Thanks to you, Sergey