I'm trying to recode this mkv file
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=4, N=8
Codec ID : V_MPEG4/ISO/AVC
Duration : 3h 0mn
Bit rate : 813 Kbps
Width : 720 pixels
Height : 394 pixels
Display aspect ratio : 2.2:1
Original display aspect ratio : 2.2:1
Frame rate mode : Variable
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.096
Stream size : 1.02 GiB (70%)
Writing library : x264 core 112
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=29 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=22.8 / qcomp=0.60 / qpmin=3 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
Color primaries : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Audio
ID : 2
Format : AC-3
Format/Info : Audio Coding 3
Mode extension : CM (complete main)
Codec ID : A_AC3
Duration : 3h 0mn
Bit rate mode : Constant
Bit rate : 320 Kbps
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 KHz
Bit depth : 16 bits
Compression mode : Lossy
Stream size : 413 MiB (28%)
Language : Malayalam
I used mkvextract to extract the files from mkv. Then use mkvmerge to convert the video component back to mkv. The resulting file details-
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.0
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=4, N=8
Muxing mode : Header stripping
Codec ID : V_MPEG4/ISO/AVC
Duration : 2h 25mn
Bit rate : 1 014 Kbps
Width : 720 pixels
Height : 394 pixels
Display aspect ratio : 16:9
Original display aspect ratio : 2.2:1
Frame rate mode : Variable
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.119
Stream size : 1.03 GiB (98%)
Writing library : x264 core 112
Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=300 / keyint_min=29 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=22.8 / qcomp=0.60 / qpmin=3 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Color primaries : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.601-6 525, BT.1358 525, BT.1700 NTSC, SMPTE 170M
Then use MeGUI to get the resulting avi. But everytime output is out of sync. I have noticed a difference in the duration of the video component of original mkv and intermediate mkv (marked bold and underlined). I'm fairly well versed with MeGUI and MKV merge and extract. Kindly help me. Thanking you
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 11 of 11
Thread
-
-
Frame rate mode : Variable
-
@poisondeathray
Thanks for the reply. Now I understand. How can I work around this? The latest technique I'm using is to extract video, audio and video time codecs from mkv using mkvcleaver. The wrap the h264 file to mkv container again using mkvmerge but using the time codecs. This time i got the duration correct in the resulting 'pure video' mkv but the frame rate has dropped to 20.XX fps. Is that bad? I'm anyways procedding with the MeGUI step now. What do you think? -
I would leave it as is, AVI doesn't support VFR timecodes
You can try making it CFR by using directshowsource and convertfps=true . Sometimes it works ok
Take the original MKV
DirectShowSource("Video.mkv", fps=29.97, convertfps=true)Last edited by poisondeathray; 14th Jul 2011 at 09:51.
-
@davexnet and poisondeathray
Latest update....MeGUI worked 75%. The video and audio came out in sync. But as the frame rate was reduced, there is visible jerkiness. AVI quality is more than satisfactory.
I have noticed that both of you have had given suggestions but I have no idea where to add them. I'm not an expert but a good learner. Thanks -
Not that familiar with Megui, but I'm pretty sure it builds a script - there should be a place to insert or modify the script
to contain the above. You can also do it with Staxrip, even Avidemux using the proxy where it builds the script for you.
Unsure what you mean when you say the "frame rate was reduced". -
@davexnet
As from my limited knowhow, MeGUI does not accept raw video format such as h264. After extracting video n audio from the 'original' mkv, I need to wrap the h264 'pure' video into mkv again. For these two purposes, I used mkvcleaver/mkvextract and mkvmerge respectively. Before I found shortening of duration of video component when wrapping with mkvmerge, but now with the timecodes extracted and entered into mkvmerge, that problem is solved. MKVMERGE is where I should be inserting the 'extra' script lines that are mentioned because that is where the frame rate get altered. But I haven't found out where to enter them. If you are familiar with the software, please direct me.
I wrote 'frame rate was reduced' because as mentioned in the question, original file frame rate is 29.970 and mode is variable, the resulting mkv after wrapping the 'video' component only and time codes entered, showed a frame rate of 20.xxx. This resulted in slight jerkiness in the final avi from MeGUI. -
-
Then don't use MeGui ! Open the script in Virtualdub and encode the video.
Manually mux in the original audio when the AVI is created.
Similar Threads
-
Increasing Audio volume on AVI/DivX/Xvid with AC3 Audio
By Spacedementia87 in forum User guidesReplies: 21Last Post: 24th Dec 2021, 07:21 -
Audio out of sync after converting AC3 to MP3 in AVI with VD
By huykin in forum AudioReplies: 6Last Post: 1st Oct 2009, 13:27 -
SOLVED: Audio out of sync or no audio - mkv/h.264 to avi/xvid
By dwoozle in forum Video ConversionReplies: 3Last Post: 2nd Feb 2009, 16:14 -
trying to convert avi w/ dolby ac3 audio and it wont sync right
By cduval04 in forum Video ConversionReplies: 2Last Post: 14th Jan 2009, 18:40 -
Converting AVI to xvid AVI - Audio Sync Problem
By foochuck in forum Video ConversionReplies: 3Last Post: 4th Jul 2007, 23:22