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.
		
			+ Reply to Thread
			
		
		
		
			
	
	
				Results 1 to 9 of 9
			
		- 
	
- 
	general suggestions: - try if it helps to remux the mkv files with mkvmerge
- MKV Cutter might be worth a shot.
 
 probably unless you H.264 streams use openGOPDo I get correct information?
 
 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.Some of the P-frames are missing in the end of the first file. Where do they go?
 
 Is length of the combined audio greater than the sum of the single files?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)
- 
	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 compare the files after using ffmpeg. Before and after using mkvmerge to cut.
 
 Yes, the sum of video and audio tracks equals the lengths in the file I cut.Is length of the combined audio greater than the sum of the single files?
- 
	I didn't write you should remux the mov files, I wrote you should remux the mkv 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.
 
 that doesn't answer the question, best would be that you post detailed mediainfo output of all the filesYes, the sum of video and audio tracks equals the lengths in the file I cut.
- 
	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). 
 
 Maybe I'm too tired but I believe it doesthat doesn't answer the question 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). 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).
- 
	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".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
 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)
- 
	
 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. 
Similar Threads
- 
  Why can't mkvmerge determine fps from h.264, but mediainfo can?By bigmweb in forum Newbie / General discussionsReplies: 1Last Post: 18th Sep 2011, 11:26
- 
  Suggestions to cut raw H.264 video streams?By AshleyQuick in forum EditingReplies: 0Last Post: 28th Jan 2011, 14:28
- 
  mkvmerge corrupts H.264 video?By edgar_riley in forum Video ConversionReplies: 6Last Post: 11th Jan 2011, 21:29
- 
  How to cut raw H.264 video streams?By Lastman369 in forum EditingReplies: 2Last Post: 15th Dec 2009, 16:16
- 
  merging .264 with ac3 with mkvmerge goes out of syncBy jylau125 in forum Video ConversionReplies: 2Last Post: 5th Nov 2009, 02:55


 
		
		 View Profile
				View Profile
			 View Forum Posts
				View Forum Posts
			 Private Message
				Private Message
			 
 
			
			
 Quote
 Quote Visit Homepage
				Visit Homepage
			