Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
![]() |
#1 | Link |
Guest
Posts: n/a
|
Changing AVC Metadata Without Re-encoding
Is there a way to change the metadata of an AVC elementary stream without re-encoding? For example, it would be useful to be able to slow down a 25p stream encoded with PAFF/MBAFF and flag it as progressive. Of course, eac3to can accomplish the slowdown, but the stream still reads as interlaced. (Changing AR would be another potential use.)
In short, it would be nice to have something that does for AVC what Restream did for MPEG-2. Is this possible? I tried searching for a tool to accomplish this but drew a blank. |
![]() |
![]() |
#2 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,086
|
frame rate can be changed with: https://forum.doom9.org/showthread.php?t=152419, no clue about changing interlaced to progressive,..
|
![]() |
![]() |
![]() |
#4 | Link |
Registered User
Join Date: May 2016
Posts: 197
|
You don't need that ancient ffmpeg build; ffmpeg now has a bitstream filter h264_metadata for changing AR and framerate.
Regarding flagging from interlaced to progressive: If your stream is MBAFF and uses only progressive encoding (no interlaced macroblocks) -- e.g. if you use x264's fake-interlaced-option, then it should be possible to change the stream to progressive, but there isn't any tool that I know of that does this. If you are really using interlaced encoding (in particular with PAFF), there is no chance to change the bitstream to make it appear progressive. Your best option is to try to signal at the container level that your content is actually progressive. |
![]() |
![]() |
![]() |
#6 | Link |
Registered User
Join Date: May 2016
Posts: 197
|
I just tested it and it is indeed PAFF with every picture coded as frame. So maybe it is enough to change the frame_mbs_flag to 1, eliminate the mb_adaptive_frame_field_flag, update the pic_height_in_map_units_minus1, update the vertical cropping flags (attention: if frame_mbs_only_flag is set to 0, then the frames will be padded to mod 32, so that when the fake-interlaced is reversed, it may be that one crops 16 or more pixels away vertically; this is not against the H.264 spec, but AFAIK some players don't like it;1080 is well behaved in this regard), update the slice headers (delete the field_pic_flag). For cabac one also needs to ensure the byte alignment condition of the slice data. And of course all of this has to be done on the SODB or RBSP level, not the NAL level. Have I missed something?
|
![]() |
![]() |
![]() |
#7 | Link | |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,160
|
Quote:
![]()
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
|
![]() |
![]() |
![]() |
#8 | Link |
Registered User
Join Date: Nov 2004
Location: Poland
Posts: 2,834
|
Seeing this I assume it can be done (just a matter of an effort and price):
https://hdr.avtop.com/hdr_solutions_avtop |
![]() |
![]() |
![]() |
#9 | Link |
Guest
Posts: n/a
|
^Thanks! That's tool looks great but rather expensive.
Is it possible to change scan-type/store-method from separated fields to interleaved fields? EDIT: Here's a post that outlines the difference (though my primary interest in not in decoding, and these are not my files). EDIT: Is there a free tool that displays detailed information about the stream? MediaInfo has its uses, but the information that it presents is quite limited. Of course, x264-encoded streams contain information about how they were encoded, but this is not the case with all h.264 streams. Last edited by Richard1485; 18th March 2018 at 18:37. Reason: addition; added hyperlink |
![]() |
![]() |
#10 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
free: ffmpeg trace_headers bitstream filter, h264_parse; Allegedly buggy, leaving for reference: https://sourceforge.net/projects/h264streamanalysis/
expensive (but with free demos): Zond, CodecVisa Last edited by sneaker_ger; 19th March 2018 at 12:06. Reason: mkver informed me about "H264 Stream Analysis" being bugged. Added other free tools instead. |
![]() |
![]() |
![]() |
Tags |
analysis, avc, h.264, metadata, stream |
Thread Tools | Search this Thread |
Display Modes | |
|
|