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. |
|
|
Thread Tools | Search this Thread | Display Modes |
13th May 2018, 00:33 | #21 | Link |
Registered User
Join Date: May 2015
Location: Russia
Posts: 17
|
Yes, I'll have to do that or remux into .h264 ES using FFMPEG, since it seems a different encoder was used.
Learned some new things from this thread, which is always good. Still I would like to be at least as close as I can to original video parameters. Speaking of, I'm making a simple script that tries to get parameters from FFMPEG trace_headers output. Is this a correct way to get video dimensions from SPS? Code:
parameters["width"] = ( pic_width_in_mbs_minus1 + 1 ) * 16 parameters["height"] = ( 2 - frame_mbs_only_flag ) * ( pic_height_in_map_units_minus1 + 1 ) * 16 if ( frame_cropping_flag == 1 ): cropUnitX = None cropUnitY = None if ( chroma_format_idc == 0 ): cropUnitX = 1 cropUnitY = 2 - frame_mbs_only_flag else: cropUnitX = 2 cropUnitY = 2 * ( 2 - frame_mbs_only_flag ) parameters["width"] = parameters["width"] - ( frame_crop_left_offset * cropUnitX ) - ( frame_crop_right_offset * cropUnitX ) parameters["height"] = parameters["height"] - ( frame_crop_top_offset * cropUnitY ) - ( frame_crop_bottom_offset * cropUnitY ) Last edited by NailBomber; 13th May 2018 at 00:36. |
Thread Tools | Search this Thread |
Display Modes | |
|
|