VideoHelp Forum
+ Reply to Thread
Results 1 to 11 of 11
Thread
  1. Member
    Join Date
    Sep 2010
    Location
    India
    Search Comp PM
    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
    Quote Quote  
  2. Frame rate mode : Variable
    AVI container doesn't support variable frame rate
    Quote Quote  
  3. Member
    Join Date
    Sep 2010
    Location
    India
    Search Comp PM
    @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?
    Quote Quote  
  4. 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 10:51.
    Quote Quote  
  5. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    If poisondeathray's tip above still doesn't work, try dss2:

    LoadPlugin("F:\Program Files\Haali\MatroskaSplitter\avss.dll")
    dss2("video.mkv", fps=29.97)
    Quote Quote  
  6. Member
    Join Date
    Sep 2010
    Location
    India
    Search Comp PM
    @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
    Quote Quote  
  7. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    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".
    Quote Quote  
  8. Member
    Join Date
    Sep 2010
    Location
    India
    Search Comp PM
    @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.
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    MKVmerge, as far as I know, just remuxes the streams. The avisynth script(s) mentioned above are used when
    the source is re-encoded, since Avisynth passes uncompressed video to the host program.

    I had just assumed you were going to re-encode the file since you mentioned MKV > AVI.
    Quote Quote  
  10. Member
    Join Date
    Sep 2010
    Location
    India
    Search Comp PM
    @ davexnet

    Yes, my final aim is to produce and avi from MeGUI containing xvid+ac3. MeGUI has a script editor where those mentioned lines can be entered but vfr mkv gets altered in mkvmerge step itself.
    Quote Quote  
  11. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    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.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!