VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Hello!
    I have .mov files (h.264 and PCM) from canon camera which I repacked to .mkv using ffmpeg. I tried to do the same using mkvtoolnix but for some reason the resulting files won't play on a hardware player I have. Now I need to cut some of the files. I'm trying to split them in mkvtoolnix specifying frame numbers. I have some questions:
    1. Is it ok to determine frame type and number using ffdshow OSD? Do I get correct information?
    2. Some of the P-frames are missing in the end of the first file. Where do they go?
    3. I get different length of the video if I try to merge the two files back again. I would think it would become shorter because some P-frames were lost but it's longer. Video was 25s 817ms and now it's 25s 901ms. Audio was 25s 818ms and now it's 25s 912ms. By the way video and audio were both 25s 817ms before I used ffmpeg to get a .mkv file. Why?
    I use MediaInfo to get information about length.
    Quote Quote  
  2. general suggestions:
    Do I get correct information?
    probably unless you H.264 streams use openGOP

    Some of the P-frames are missing in the end of the first file. Where do they go?
    ffmpeg probably dropped them since it assumed that the frames are missing some references. Looking at the output of ffmpeg during the remuxing might shed some light on this.

    I get different length of the video if I try to merge the two files back again. ... Why?
    Is length of the combined audio greater than the sum of the single files?
    (Wild guess: a/v synch/delay stuffing)
    Quote Quote  
  3. Originally Posted by Selur View Post
    general suggestions:
    • try if it helps to remux the mkv files with mkvmerge
    As I said: I tried to do the same using mkvtoolnix but for some reason the resulting files won't play on a hardware player I have.


    ffmpeg probably dropped them since it assumed that the frames are missing some references. Looking at the output of ffmpeg during the remuxing might shed some light on this.
    I compare the files after using ffmpeg. Before and after using mkvmerge to cut.

    Is length of the combined audio greater than the sum of the single files?
    Yes, the sum of video and audio tracks equals the lengths in the file I cut.
    Quote Quote  
  4. As I said: I tried to do the same using mkvtoolnix but for some reason the resulting files won't play on a hardware player I have.
    I didn't write you should remux the mov files, I wrote you should remux the mkv files.

    Yes, the sum of video and audio tracks equals the lengths in the file I cut.
    that doesn't answer the question, best would be that you post detailed mediainfo output of all the files
    Quote Quote  
  5. Originally Posted by Selur View Post
    I didn't write you should remux the mov files, I wrote you should remux the mkv files.
    Sorry, misread. I tried to do that and now there is "Delay relative to video : 17ms" in second file and the sum of too files is bigger than is should be (both video and audio).

    that doesn't answer the question
    Maybe I'm too tired but I believe it does Length of audio in combined file is 25s 912ms and it should be 25s 818ms (it is 1s 1ms in first file, 24s 817ms in second file).
    Quote Quote  
  6. Maybe I'm too tired but I believe it does
    since you didn't mention the length of the two separate files and you didn't mention if "the combined audio greater than the sum of the single files?" you only said that the length should be "25s 818ms", but is "25s 912ms".
    Quote Quote  
  7. Ok, probably I should have used "and" instead of "," in "Yes, the sum of video and audio tracks equals the lengths in the file I cut".
    Quote Quote  
  8. my guess atm. is that either:
    - the combined file X = A + B has the length of file A + the length of file B and there is not really a problem
    or
    - one or both of the files contain more frames than the length indicates (which wouldn't be a surprise since ffmpeg was used; unlike a lot of other muxers it tries to keep 'broken' frames)

    since the communication between us two here isn't really going well, I give up and let another user have a go at this.

    Wish you much luck in figuring out what is happening.

    Cu Selur

    Ps.: btw. the problems might also be related to the PCM paramters (iirc. mkvmerge doesn't handle all the possible PCM smaple rates well)
    Quote Quote  
  9. Originally Posted by Selur View Post
    my guess atm. is that either:
    - the combined file X = A + B has the length of file A + the length of file B and there is not really a problem

    since the communication between us two here isn't really going well, I give up and let another user have a go at this.

    Ps.: btw. the problems might also be related to the PCM paramters (iirc. mkvmerge doesn't handle all the possible PCM smaple rates well)

    Maybe you didn't notice I actually clarified audio lengths because I added this half a minute after sumbitting the message.
    Thanks anyway, I didn't think about PCM, I'll try to operate on video only for a test.

    PS Everything seems to be ok when I edit video only, so problem is really in PCM. I wonder what I have to do with it.
    In .mov it looked like:
    Code:
    Audio
    ID                             : 2
    Format                         : PCM
    Format settings, Endianness    : Little
    Format settings, Sign          : Signed
    Codec ID                       : sowt
    Duration                       : 25s 817ms
    Bit rate mode                  : Constant
    Bit rate                       : 1 536 Kbps
    Channel(s)                     : 2 channels
    Channel positions              : Front: L R
    Sampling rate                  : 48.0 KHz
    Bit depth                      : 16 bits
    Stream size                    : 4.73 MiB (4%)
    Last edited by Artyom; 31st Jan 2014 at 11:49.
    Quote Quote  



Similar Threads

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