View Full Version : How to extract x264.exe parameters from *.h264, *.mkv or *.mp4 stream
alexVS
14th January 2012, 15:04
I have video encoded with x264.exe and packed in mkv. It's a hockey game. I want to cut it to do short clip with highlights, but cutting with YAMB (after repacking to mp4) always going on KEYFRAMES.
That's allright, but sometimes in one or two placed, keyframe is not the place I want to cut.
To preserve the quality of video I want to reencode that small part of video and join it with other not reencoded parts. I need to encode with the same parameters as original video, so how can i determine, with what parameters of x264 it was encoded?
I know only what mediainfo tells me:
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Bit rate mode : Variable
Bit rate : 3 567 Kbps
Maximum bit rate : 6 000 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.079
and that's all. There're no x264 string
And if some parameters -p4x4, -trellis, -bpyramid or others will not be the same, the result video also will not be the same, and I will not be able to join them back, or the result will not be correct. So how to deal with it?
PS. I know that almost all mpeg2 video editors (adobe premiere, mpeg video wizard, etc) reencode only what was changed. Is there such video editor for mp4 or mkv with h264?
poisondeathray
14th January 2012, 16:18
I have video encoded with x264.exe and packed in mkv. It's a hockey game. I want to cut it to do short clip with highlights, but cutting with YAMB (after repacking to mp4) always going on KEYFRAMES.
That's allright, but sometimes in one or two placed, keyframe is not the place I want to cut.
To preserve the quality of video I want to reencode that small part of video and join it with other not reencoded parts. I need to encode with the same parameters as original video, so how can i determine, with what parameters of x264 it was encoded?
You can go back to your encode logs and look what settings were used
PS. I know that almost all mpeg2 video editors (adobe premiere, mpeg video wizard, etc) reencode only what was changed. Is there such video editor for mp4 or mkv with h264?
"smart rendering" - only the frames in the GOP around the cutsite are re-encoded. Try videoredo 4 beta
alexVS
14th January 2012, 16:51
You can go back to your encode logs and look what settings were used
and what if there are no logs? I mean can I determine x264 parameters analysing h264 stream?
poisondeathray
14th January 2012, 17:08
and what if there are no logs? I mean can I determine x264 parameters analysing h264 stream?
Are you using a modified x264 ? or stripping the metadata ?
When I output rawavc, mp4 , mkv - the metadata is there, read by mediainfo
alexVS
14th January 2012, 18:56
unfortunately mediainfo shows no metadata both in mp4 and in raw 264
I can't even can't say what was the version of x264.exe that game was encoded, cause versions are updated frequently.
But it'OK. I will either leave "extended" version without reencode, either reencode all clip, hope the quality will not decrease very much.
So, it's just a theoretical question: having unknown h264 stream, is it possible to determine what parameters were used to encode it with x264.exe? Mediainfo shows only Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : V_MPEG4/ISO/AVC
Bit rate mode : Variable
Bit rate : 3 567 Kbps
Maximum bit rate : 6 000 Kbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16:9
Frame rate : 50.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.079
movmasty
18th January 2012, 17:38
So, it's just a theoretical question: having unknown h264 stream, is it possible to determine what parameters were used to encode it with x264.exe?
I need this too,
i've found 2 commercial program:
H264Visa, no more updated, and
CodecVisa
I'd like one free.
Would be useful not only for old movies, but for fresh encoding too,
in particular i'd like to know which quantizer was used per every frame.
*HUMPB*
Ehm, i forgot AVInaptic......
Here
http://fsinapsi.altervista.org/code/avinaptic/index.html
zinga
19th January 2012, 03:33
The x264 information SEI (?) is placed at the beginning of the stream, so if you've done some cutting/joining it may have been dropped. If you have an uncut version of the encode, it should be there, or if you only have cut clips, look at the first cut segment.
alexVS
8th March 2012, 13:41
Returning to my thread.
I have 10 minutes clip of hockey highlights. Encoded not by me.
Can I determine parameters of the stream, such as cabac, b_pyramid, mixed_ref, weightp/b, 8x8, cqm, threads/slices/sliced_threads, interlaced/contrained/intra, vbv/aud/hrd, reframes.
Here is sample. 5Mb (20sec) http://www.sendspace.com/file/i854p5
Is it possible at all?
Mediainfo: High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Bit rate : 2 066 Kbps
Maximum bit rate : 5 844 Kbps
Width : 1 024 pixels
Height : 576 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 50.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Tried AVInaptic, but got nothing (((
I need this because I want to add small intro to this clip (without reencoding the clip itself). So, my intro must be encoded with the same parameters, which I don't know. Otherwise it's impossible to merge two video clips.
Thanks for you help! :)
poisondeathray
8th March 2012, 15:14
You can try appending them with solveigmm video splitter , use the free trial
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.