VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Hello,

    I'm trying to remux a m4v file (adapted for apple devices) into an mkv container.

    Demuxing the initial .m4v file went fine in MP4BOX and produced following 8 files:

    1. (HD)_track1.h264
    2. (HD)_track1.h264.mlmix
    3. (HD)_track1.aac
    4. (HD)_track2.aac
    5. (HD)_track3.ac3
    6. (HD)_6_text.srt
    7. (HD)_track7.text
    8. (HD)_track8.jpeg

    Having stripped off two audio streams (track1 & track3) I inserted the following 3 streams into MKVToolNix (additionally skipping the .jpeg and .text files the latter being an apple chapters file I believe and dropping the .mlmix file (having no clue what that is):

    1. (HD)_track1.h264
    2. (HD)_track2.aac
    3. (HD)_6_text.srt

    The resulting .mkv file plays back the video at a very high speed (the audio playing normally), rendering the file useless. I thought, may be the omitted streams might be the reason and tried to add the .mlmix file as input where MKVToolnix failed with this message:

    "mkvmerge FAILED with the return code of 2. There were ERRORS. mkvmerge cannot cope with yet) or this is a bug in mkvmerge itself. The error message was:"

    The .h264 file itself plays back normally in regular players and in the fast forward mode in Power DVD 14 player (default program for this extension).

    The .m4v file's specs are following. My question is what do I do wrong?

    Code:
    General
    Complete name                            : (HD).m4v
    Format                                   : MPEG-4
    Codec ID                                 : M4V 
    File size                                : 5.25 GiB
    Duration                                 : 1h 37mn
    Overall bit rate mode                    : Variable
    Overall bit rate                         : 7 713 Kbps
    Collection                               : 
    Season                                   : 
    Album                                    : 
    Album/Sorted by                          : 
    Album/Performer                          : 
    Part                                     : 1
    Part/Position                            : 1
    Part/Total                               : 1
    Track name                               : 
    Track name/Position                      : 1
    Performer                                : 
    Genre                                    : 
    ContentType                              : TV Show
    Description                              : 
    Recorded date                            : UTC 2008-09-01 08:00:00
    Encoded date                             : UTC 2015-01-22 13:49:00
    Tagged date                              : UTC 2015-01-23 19:44:45
    Cover                                    : Yes
    Rating                                   : None
    Part_ID                                  : 1
    HDVideo                                  : Yes
    AppleStoreCatalogID                      : 920289384
    Vendor                                   : Apple:vendor-id:2008-85208-1101
    
    Video #1
    ID                                       : 1
    Format                                   : AVC
    Format/Info                              : Advanced Video Codec
    Format profile                           : High@L3.1
    Format settings, CABAC                   : No
    Format settings, ReFrames                : 3 frames
    Codec ID                                 : avc1
    Codec ID/Info                            : Advanced Video Coding
    Duration                                 : 1h 37mn
    Bit rate                                 : 7 000 Kbps
    Width                                    : 1 280 pixels
    Height                                   : 720 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Frame rate                               : 23.976 fps
    Minimum frame rate                       : 23.974 fps
    Maximum frame rate                       : 90 000.000 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Scan type                                : Progressive
    Bits/(Pixel*Frame)                       : 0.317
    Stream size                              : 4.76 GiB (91%)
    Title                                    : Main Program
    Writing library                          : x264 core 130 r2273 b3065e6
    Encoding settings                        : cabac=0 / ref=3 / deblock=1:-3:-2 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.25 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=18 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=0 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=1 / weightb=0 / open_gop=0 / weightp=0 / keyint=240 / keyint_min=24 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=7000 / ratetol=1.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=9500 / vbv_bufsize=9500 / nal_hrd=none / ip_ratio=1.40 / aq=1:0.80
    Language                                 : English
    Encoded date                             : UTC 2015-01-22 13:49:00
    Tagged date                              : UTC 2015-01-22 13:54:58
    Color primaries                          : BT.709
    Transfer characteristics                 : BT.709
    Matrix coefficients                      : BT.709
    Color range                              : Limited
    
    Video #2
    ID                                       : 8
    Format                                   : JPEG
    Codec ID                                 : jpeg
    Duration                                 : 1h 37mn
    Bit rate mode                            : Variable
    Bit rate                                 : 747 bps
    Width                                    : 640 pixels
    Height                                   : 360 pixels
    Display aspect ratio                     : 16:9
    Frame rate mode                          : Variable
    Frame rate                               : 0.002 fps
    Minimum frame rate                       : 0.001 fps
    Maximum frame rate                       : 0.003 fps
    Color space                              : YUV
    Chroma subsampling                       : 4:2:0
    Bit depth                                : 8 bits
    Compression mode                         : Lossy
    Bits/(Pixel*Frame)                       : 1.621
    Stream size                              : 456 KiB (0%)
    Title                                    : Chapter Images
    Language                                 : English
    Encoded date                             : UTC 2015-01-23 19:44:26
    Tagged date                              : UTC 2015-01-23 19:44:26
    
    Audio #1
    ID                                       : 2
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 1h 37mn
    Bit rate mode                            : Variable
    Bit rate                                 : 158 Kbps
    Maximum bit rate                         : 234 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Stream size                              : 110 MiB (2%)
    Title                                    : Russian Stereo
    Language                                 : Russian
    Encoded date                             : UTC 2015-01-22 13:49:00
    Tagged date                              : UTC 2015-01-22 13:55:14
    
    Audio #2
    ID                                       : 3
    Format                                   : AAC
    Format/Info                              : Advanced Audio Codec
    Format profile                           : LC
    Codec ID                                 : 40
    Duration                                 : 1h 37mn
    Bit rate mode                            : Variable
    Bit rate                                 : 164 Kbps
    Maximum bit rate                         : 264 Kbps
    Channel(s)                               : 2 channels
    Channel positions                        : Front: L R
    Sampling rate                            : 48.0 KHz
    Compression mode                         : Lossy
    Stream size                              : 114 MiB (2%)
    Title                                    : English Stereo
    Language                                 : English
    Encoded date                             : UTC 2015-01-22 13:49:00
    Tagged date                              : UTC 2015-01-22 13:55:15
    
    Audio #3
    ID                                       : 4
    Format                                   : AC-3
    Format/Info                              : Audio Coding 3
    Mode extension                           : CM (complete main)
    Format settings, Endianness              : Big
    Codec ID                                 : ac-3
    Duration                                 : 1h 37mn
    Bit rate mode                            : Constant
    Bit rate                                 : 384 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                              : 267 MiB (5%)
    Title                                    : Russian DD 5.1
    Language                                 : Russian
    Encoded date                             : UTC 2015-01-22 13:49:00
    Tagged date                              : UTC 2015-01-22 13:49:39
    
    Text #1
    ID                                       : 5
    Format                                   : Timed Text
    Muxing mode                              : sbtl
    Codec ID                                 : tx3g
    Duration                                 : 1h 36mn
    Bit rate mode                            : Variable
    Bit rate                                 : 137 bps
    Stream size                              : 96.4 KiB (0%)
    Title                                    : Russian Subtitle
    Language                                 : Russian
    Encoded date                             : UTC 2015-01-22 13:49:00
    Tagged date                              : UTC 2015-01-22 13:49:00
    
    Text #2
    ID                                       : 6
    Format                                   : Timed Text
    Muxing mode                              : sbtl
    Codec ID                                 : tx3g
    Duration                                 : 1h 36mn
    Bit rate mode                            : Variable
    Bit rate                                 : 90 bps
    Stream size                              : 63.2 KiB (0%)
    Title                                    : English Subtitle
    Language                                 : English
    Encoded date                             : UTC 2015-01-23 19:43:55
    Tagged date                              : UTC 2015-01-23 19:43:55
    
    Menu #1
    00:00:00.000                             : 1
    00:07:44.964                             : 2
    00:20:43.200                             : 3
    00:30:20.861                             : 4
    00:40:38.853                             : 5
    00:49:55.492                             : 6
    01:01:07.873                             : 7
    01:11:25.198                             : 8
    01:22:04.628                             : 9
    01:32:00.390                             : 10
    
    Menu #2
    ID                                       : 7
    Codec ID                                 : text
    Duration                                 : 1h 37mn
    Title                                    : Chapter Titles
    Language                                 : English
    Encoded date                             : UTC 2015-01-23 19:44:20
    Tagged date                              : UTC 2015-01-23 19:44:20
    00:00:00.000                             : 1
    00:07:44.964                             : 2
    00:20:43.200                             : 3
    00:30:20.861                             : 4
    00:40:38.853                             : 5
    00:49:55.492                             : 6
    01:01:07.873                             : 7
    01:11:25.198                             : 8
    01:22:04.628                             : 9
    01:32:00.390                             : 10
    Bit rate mode                            : VBR
    Quote Quote  
  2. In mkvtoolnix, highlight the video track. In the format specific options tab, under "FPS", force the framerate to 24000/1001 , then remux

    If that doesn't work, try importinig the m4v directly into mkvtoolnix, without demuxing beforehand. Then checkmark/uncheckmark the the wanted/unwanted streams and then mux
    Quote Quote  
  3. Thanks poisondeathray,

    That worked. The frame rate of the output file isn't made different from the original by this, isn't it? It just enforces it - am I correct?
    Quote Quote  
  4. Originally Posted by Aquinax View Post
    Thanks poisondeathray,

    That worked. The frame rate of the output file isn't made different from the original by this, isn't it? It just enforces it - am I correct?
    Double check that it's in sync, and that you can seek throughout the file.

    Chances are , it supposed to be a CFR (constant frame rate) file. The base frame rate is supposed to be 23.976 (which is an approximation of the actual frame rate of 24000/1001) . The only reason the FPS is "off" in the first place is because of the way it was muxed as a m4v. Even if original file is fine, various software like mkvtoolnix, ffmpeg etc.. are reading the wrong information in the timecodes. So when you remux it, it muxes with the wrong fps information. Obviously, the max framerate isn't 90000 , even if it was really VFR.

    Frame rate mode : Variable
    Frame rate : 23.976 fps
    Minimum frame rate : 23.974 fps
    Maximum frame rate : 90 000.000 fps
    Quote Quote  
  5. The final video file is in sync and quite fine. As to the reasons why it reports as VFR ... - the initial encoding of the main video stream ( _track1.h264) might be the cause as it plays back crazily as a standalone file. But I wouldn't want to explore further, your piece of advice was like a beam of light in total darkness for me so I'm glad and satisfied with the end result and this does it for me. My sincere thanks again, poisondeathray.

    Kind regards.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!