Creator1
24th December 2007, 21:19
Hi,
I finally was able to have two files of the same movie, one that is encoded in 29.97fps for HD-DVD compliancy and one that is encoded in 23.976fps for Blu-Ray compliancy.
The problem is, I am not the one who was able to convert the HD-DVD compliant 29.97fps AVC elementary stream to a blu-ray compliant 23.976fps AVC stream. I was just lucky enough to find the blu-ray compliant version of the HD-DVD movie I own.
Now, it is clear to me that this is no re-encode, so some tool has been used to do the conversion or some hex edits were done. I have no idea what tool can do 29.97fps to 23.976fps on an AVC stream with no re-encode but if anybody has an idea please tell me.
I compared both streams with Elecard stream analyzer and I was able to find a pattern more or less clear of the changes that were made. Unfortunately, some are inconsistent to be applied in a simple serach and replace hex edit of the entire file. In fact the parts that are inconsistent makes no sense to me but maybe other people here who knows more about the video file formats in general will understand it more?
Here are the changes I can see:
In every H264 SEI structure, the guy replaced pic_struct from whatever value it was before (it changes in the 29.97 file from HEI structure to another) to 0 all the time (0 = frame instead of interlaced). The num_clock_ts is also changed to always be equal to 1. The cpb_removal_delay changes compared to the 29.97 file but the value of the change differs each time. Same thing for dpb_output_delay.
In every H264 Sequence Parameter Set, the guy changed the gaps_in_frame_num_value_allowed_flag from 1 to 0 but we already knew that. Also, in the same sequence parameter set, he changed num_units_in_tick from 1001 in the 29.97fps file to 5005 in the 23.976fps file. He changed the time_scale from 60000 in the 29.97fps file to 240000 in the 23.976fps file.
In each of the P slices he ADDED some three new elements in the 23.976 compared to the 29.97. Here are the elements:
pred_weight_table()
luma_log2_weight_denom=0
chroma_log2_weight_denom=0
Now, the hard to figure out parts in all this are the "cpb_removal_delay" and "dpb_output_delay" flags in each H264 SEI structure. I can't figure out the pattern after checking it out a little (will continue to check).
TO help you guys see it more clearly, I created two files using elecard stream analyzer. Those presents the entire structures of the first 5 megabytes of each of the files. I named the hd-dvd compliant file "hddvd_29_97.txt" and the bluray one "bluray_23_976.txt".
Do a compare on those two files using any standard text file compare program and you should easily see the differences between the two files.
I hope somebody can figure something out so that we can apply the same thing to any HD-DVD 29.97fps avc movie file to make them blu-ray compliant.
Thanks for any help!
I finally was able to have two files of the same movie, one that is encoded in 29.97fps for HD-DVD compliancy and one that is encoded in 23.976fps for Blu-Ray compliancy.
The problem is, I am not the one who was able to convert the HD-DVD compliant 29.97fps AVC elementary stream to a blu-ray compliant 23.976fps AVC stream. I was just lucky enough to find the blu-ray compliant version of the HD-DVD movie I own.
Now, it is clear to me that this is no re-encode, so some tool has been used to do the conversion or some hex edits were done. I have no idea what tool can do 29.97fps to 23.976fps on an AVC stream with no re-encode but if anybody has an idea please tell me.
I compared both streams with Elecard stream analyzer and I was able to find a pattern more or less clear of the changes that were made. Unfortunately, some are inconsistent to be applied in a simple serach and replace hex edit of the entire file. In fact the parts that are inconsistent makes no sense to me but maybe other people here who knows more about the video file formats in general will understand it more?
Here are the changes I can see:
In every H264 SEI structure, the guy replaced pic_struct from whatever value it was before (it changes in the 29.97 file from HEI structure to another) to 0 all the time (0 = frame instead of interlaced). The num_clock_ts is also changed to always be equal to 1. The cpb_removal_delay changes compared to the 29.97 file but the value of the change differs each time. Same thing for dpb_output_delay.
In every H264 Sequence Parameter Set, the guy changed the gaps_in_frame_num_value_allowed_flag from 1 to 0 but we already knew that. Also, in the same sequence parameter set, he changed num_units_in_tick from 1001 in the 29.97fps file to 5005 in the 23.976fps file. He changed the time_scale from 60000 in the 29.97fps file to 240000 in the 23.976fps file.
In each of the P slices he ADDED some three new elements in the 23.976 compared to the 29.97. Here are the elements:
pred_weight_table()
luma_log2_weight_denom=0
chroma_log2_weight_denom=0
Now, the hard to figure out parts in all this are the "cpb_removal_delay" and "dpb_output_delay" flags in each H264 SEI structure. I can't figure out the pattern after checking it out a little (will continue to check).
TO help you guys see it more clearly, I created two files using elecard stream analyzer. Those presents the entire structures of the first 5 megabytes of each of the files. I named the hd-dvd compliant file "hddvd_29_97.txt" and the bluray one "bluray_23_976.txt".
Do a compare on those two files using any standard text file compare program and you should easily see the differences between the two files.
I hope somebody can figure something out so that we can apply the same thing to any HD-DVD 29.97fps avc movie file to make them blu-ray compliant.
Thanks for any help!