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.
+ Reply to Thread
Results 1 to 9 of 9
Thread: Cut H.264 using mkvmerge
Do I get correct information?
Some of the P-frames are missing in the end of the first file. Where do they go?
I get different length of the video if I try to merge the two files back again. ... Why?
(Wild guess: a/v synch/delay stuffing)
mkvtoolnix but for some reason the resulting files won't play on a hardware player I have.
Is length of the combined audio greater than the sum of the single files?
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.
Yes, the sum of video and audio tracks equals the lengths in the file I cut.
that doesn't answer the question
Maybe I'm too tired but I believe it does
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".
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
- 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.
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 10:49.