Open GoogleCodeExporter opened 8 years ago
What is the content of file 2 ?if there is also header / metadata in file 2 you
need
to skip it.n and then it might not work 100 % as sound don't like to get cut up.
need to make sure the first frame you are outputting from file 2 is a keyframe
aswell. fires frame is always a keygrame, but if you seekat you need to make
usre its
actuarly a keyframe.
I have been working on a feature to do this using flv4php but its never been
perfected.
Original comment by fan...@gmail.com
on 28 May 2009 at 8:17
Hi Fannoj,
Thanks for your reply.
In my code I skipped the header of the second file. Actually I am trying to
seek
file2.flv from the middle via $seekat2.
I am struggling now with:
"making sure the first frame outputting from file 2 is a keyframe".
Do you have any hint(s) about this?
I am still trying .. didn't give up yet.
Thanks,
Raed Petro.
Original comment by raedpetro@gmail.com
on 28 May 2009 at 10:33
the only thing i can say from all the things i have tried is ht must be the
keyframe ?
are you 100 % sure you are at the keyframe start ?
Original comment by fan...@gmail.com
on 28 May 2009 at 12:50
No .. I am not sure .. I am asking you how to make sure that I am starting the
second file at a keyframe?
Original comment by raedpetro@gmail.com
on 28 May 2009 at 1:01
ohh i missed that sorry, if you look throw the flv4php framework:
getTag function will return "Tags" from the file.. it will return an object
while($tag = $FLV->getTag()) {
if($tag->type == FLV_TAG_TYPE_VIDEO && $tag->frametype == 1) {
// is video, and is keyframe
$keyframepointer = $FLV->getTagOffset();
}
}
-Morten Hundevad
Original comment by fan...@gmail.com
on 28 May 2009 at 1:13
I see .. I will have a look at this and try using it.
Original comment by raedpetro@gmail.com
on 28 May 2009 at 1:19
Yesss .. finally done :)
You were telling me to start at a keyframe. I recognized that this is what I
was
doing. I was getting the "filepositions" array of the keyframes of the FLV
file, and
seeking (via $seekat) at one of those keyframes to put the pointer at (to start
with). That what you told me "IT MUST BE LIKE THIS" and this is absolutely true.
The second thing that MUST be done is that you have to end every joined FLV
with "the end of a keyframe". This could be done by reading via "fread()" to
EXACTLY
a (filepositions - 1) using "ftell()". No byte less, no byte more.
Working excellent, Praise the LORD.
Now time to sleep .. now it is 12:40 AM here.
Thanks a lot Fannoj
Original comment by raedpetro@gmail.com
on 28 May 2009 at 9:41
Original issue reported on code.google.com by
raedpetro@gmail.com
on 27 May 2009 at 7:26