Release Name: h264info alpha 0026
Notes: Allows you to see nal packet info of a .es h264 stream. parts of source rewritten from mpeg4ip package under the Mozilla Public License. Therefore this package is released under the Mozilla Public License. This is very alpha. the pulldown routine is very untested. Where sei data is missing and needs to be added, some is data from a reference mpeg4 stream and may be incorrect. I am releasing this in its current form as i havent had time to work on it but spent enough time on it that I want to get it out there. The code is bad and un optimized (slow). Have Fun. x264 is protected under the GNU GPL general public license
Changes: source as I left it on or abouts april 08. 0026 this version was produced from a backup of the source dated early april. when compiled it was labeled as version .23. As such it is missing anything ive done in .24 and .25. some advances but more importantly some fixes. So its really a test version (since im too lazy to test it) fixed - changed cpb/dpb calcs to proper reliance on pts/dts. any input streams with odd layout (open gop with leading b-frames for example) will probably result in improper calcs (at least the initial b-frames). that is a rare case however so shouldnt be an issue. added - There is a new setting that only matters if pulldown ISNT being used and the original file has b-pyramid. you must tick this B-pyramid option so the PTS can be adjusted. if that option needs to be set and it isnt, the program will warn you when it encounters a situation where PTS is less than DTS. If anyone has had issues with b-pyramid streams, this should help. this also is not a 'lite' version so it will be slow. please use as a test version. not for production.
fixed - the byte_align routine from mpegip tools checked for a byte (0x7F) and skipped it if present. not sure why but the result is that any frame that starts with 0x7F immediately after the cabac align wont display properly. fixed this version.
updated - rewrote i/o to use mpegip tools bit stream code (i already used it for the sei's but now using it for just about everything).. it didnt seem to speed things up really tho (there is already my own buffering code in it) so now...
added - releases will generally come with 2 versions. a lite version which has all code related to the log commented out which speeds things up a great deal. the standard version will be released also but probably only when there are big changes. most people aren't interested in tho log output.
fixed - was 2 digits off on bit_rate_value_minus1 and cpb_size_value_minus1 on streams that did not already supply the values
changed - on streams without bitrate and cpb values h264info and none is supplied, i assign max for level. for L4.1 now i assign max for bluray spec which are lower values. you must override this if you want higher value for bitrate.
added - the ability to input cropping values. the amounts are entered in pixels. these values are added to any existing cropping values if applicable.
added - a tiny bit more resiliency for bad streams
fixed - on non-pro streams with I frames mid gop, the crd count was being reset when it shouldn't have been.
fixed - on rare occasions the write end of an extended pps wasnt being written causing dropped frames on playback
fixed - handles streams with short sync bytes (unusual for h264) which would cause crash.
added - HD to BR mode. It doesnt change the fps. just fixes gaps in frame num and a couple other params to make a hd stream work as a bluray stream. with this frame rate changes and thereby timing changes not needed. eliminates need for a 2-pass mode for accurate timing.
changed - reverse pulldown - it now uses original timing if able. Same as above. Eliminates need for 2 pass. (at least for streams that already have timing data in them which a HD stream would)
changed - log to file defaults off. speeds things up a bit. i tweaked some code a tiny bit to help. also used smaller variables when i could in efferts to speed this cow up. the file thing was a quick hack so killed visual log output altogether. will fix later.
added - command line support: -iInputpathname -oOutputfilename -f[Framerate] -bMaxBitrateKbps -aAspectRatio -lLevel -wWidth -hHeight -nNumRefFrames -3 toggles 3:2 pulldown own -r Removes 3:2 pulldown -p add picture structure (implied by -3 or -r ) -e turns pps every picture OFF (as defaults on) added - ability to set max bitrate. if none is supplied and none in stream then max for level is used. also if no cpb size is in stream then will set to max for level. cpb_size is not manually setable at this time. added - ability to change num_ref_frames.
0017 test release
fixed - negative POC values accounted for. Fixes UNKNOWN_ERROR during mux. its a kludge given this program only does a single pass. background: with some streams the idr is POC (displayed Picture Order Count) #0, but its not the first displayed frame. the first P is which is accomplished by using a negative POC... you have a IPPPBBPBBP... which displays as PPIBBPBBP... this fowls up my calculation for what the dpb will be. i can solve it completely by prescanning the file and detecting the fact the IDR isnt displayed first. or i can do what i am doing as of .
adjust once i get to the first P. That means the IDR will have the wrong dpb value. it seems to not effect the streams so far. It seems having too large of a dpb is worse than using to little. The UNKNOWN_ERROR was caused but having a ending P frame of a GOP with too large of a dpb. since i rely on the POC to figure out the dpb.
0016 test release
fixed - another issue with open gops i didn't foresee. would cause false underflow messages. fixed.
0015 test release
fixed - handles open gops properly fixed - pred_weight_table(), dec_ref_pic_marking(), ref_pic_list_reordering() parsing corrected. simple streams did not show parsing errors found in more robust streams. change - pps every picture defaults to on now. robust streams may alter pps . without this parameter set to on the stream will fail. this will increase the size of files that did not originally have a pps every picture. defaulting to on because the harm in leaving it off in cases its needed is too great.
0014 - test release
change - the entire slice_header is parsed and written now. Formally i only read/write the minimum. Because of the way the transition works going into the slice_data(), only cabac is supported. cavlc support will be added back later. added - remove pulldown command. allows pulldown to be stripped for and framerate set to 24fps for use with bluray. this is only for 30->24fps. 60->48 fps not supported yet.
added - Added option to add PPS every frame. This may cause buffer problems as will add a lot of size the the file.
fixed - lookahead error caused some rare crashing.
fixed - error when source has a shell buffer_sei.
added - ability to set resolution. no level compliance checking is done.
fixed -- when 59.94/60 fps was done a parameter was overwritten that caused the problems when the picture slice was reconstructed.
cpb removal delay calc matches reference encoder more closely (if not exactly)
split buffering period and pic timing sei messages into their own NALus.
oversight caused me to use wrong value for cpb_output_delay_length that would crash the app.
more tweaking. specifically dpb_output_delay on pulldown (@29.97) to more accurate values. i'll tweak for 720p later. added option for setting level. this sets all values 1-5.1. this does not check stream for compliancy with new level setting. may add later.
a little tweaking... 720p/480p(59.94fps with pulldown) seems ok but sca doesnt account for the pulldown so you get wrong timecodes and bitrate errors (since its muxing the frames too fast) it has the same prob with othersamples ive found so maybe its sca? anyways ... 1080p 29.97fps pulldown seems ok. waiting to hear :)
fixed (hopefully) cpbremovaldelay values to get better timing on pulldown. also writing dpboutputdelay has been updated. for dpboutputdelay i use max values (0 for b frames and for all other types the max using max_dec_frame_buffering
added ability to work with 720p and 480p 24fps streams for hddvd (ie will apply frame doubling and tripling to produce compliant streams that require 59.94 fps will add frame doubling for PAL at some point(for 720p,480p 25fps->50fps) i took away time stamp writing since it has been reported as broken. will add back as time allows (timestamps do not seem to be req'd) x264 with 3:2 pulldown binary added , implementing what was learned from h264info debuging update. split bp sei from pt sei into their own nals update. cefs aq patch and pthreadswin32 added. patch fill added (includes hrd and pulldown in 1)