ok, it is, I really want to parse frames from the mov file. Get encoded h264 frames. and I managed to do this using ffmpeg, but when I try to make the movie again using ffmpeg -i test* test.mov , I get test00: Invalid data found when processing input , so there is something wrong with the frame structure. as I understand it, the frame should look like this:
00 00 00 01 XX data -------------
where XX says whether it is an I-, P- or B-frame. or more specifically, type(XX) = 0x0F && XX says it's me (type (XX) = 5?), P (type (XX) = 7?) or B (type (XX) = 8?). I am not sure about this quantity, I was looking for it, but I did not find good sources. so the question is number one, what number should have NALU for different frames?
anyway, when I use av_read_frame in the mov file, I get a frame that looks like this:
4B = size, 1B = XX, and then data. (at least this is what I think I get)
the files in which I store frames always have a size when I look at them in hexeditor (otherwise, of course). and XX is always 65 (i.e. type (XX) = 5) in the first, and then 61 (i.e. type (XX) = 1) for a pair of frames, and then back to 65 for one frame, etc. .
I assume that these are frames such as: I PPPPPPPPPPPPPPPPPPPPPP PPPPPPP P .... however, then my assumption about type numbers for different types of frames is false, which is very likely. (any reading suggestion about this, with the exception of ISO / IEC 14496-10, I really don't understand).
I tried to remove the size and add 00 00 00 01 to XX bytes and data, but to no avail. any tips on how I can change frames to be valid H264 encoded frames?