OK, I found a fix for John's FLVPlayer when playing
videos recorded by a webcam.
It might not be the "Mother of all Fixes" but it will at least work
for those who are using or using a variation of John's Flex FLVPlayer.
Down around line 144 in PreviewWindow.mxml add the following to
the following function:
public function goNormalScreen():void
{
videoHolder.width = metaData.width;
videoHolder.height = metaData.height;
videoPlayer.width = metaData.width;
videoPlayer.height = metaData.height;
if (isNaN(metaData.width)) { < - Add what is in red
videoHolder.width = 360;
videoHolder.height = 240;
videoPlayer.width = 360;
videoPlayer.height = 240;
}
setFullScreen(false);
}
Also, down on line 271, 272 or 273, Change the following
// set percentage for use with keeping ratio
percentage = metaData.width / metaData.height;
videoPlayer.width = metaData.width;
videoPlayer.height = metaData.height;
if (isNaN(metaData.width)) { < - Add what is in red
videoPlayer.width = 360;
videoPlayer.height = 240;
percentage = videoPlayer.width / videoPlayer.height;
}
Hope this will help someone. All I did was set the video player width and
height back to the defaults.
Maybe I should know this already, but why is the Video Width and Height not
read in the metaData
like the Video Trailer Movies we have? Is it not there? I can see the Width
and Height defined in other FLV players
for the recorded Videos.
Thanks,
Lenny
On 8/23/07, Dominick Accattato <[EMAIL PROTECTED]> wrote:
>
> Remco, nice guess you win!
>
> On 8/23/07, Lenny Sorey <[EMAIL PROTECTED]> wrote:
> >
> > Hi Remco,
> >
> > You are right.
> >
> > It does not have proper metadata and therefore does not center properly.
> >
> > I found this out by surprise late yesterday when I was running John's
> > FLVPlayer
> > through a Flex Debug.
> >
> > So, looks like something extra (Code Wise) is going to have to added in
> > order to accommodate
> > Live webcam recording.
> >
> > I am assuming the same thing will happen if recorded from an HD Video
> > Camera but I cannot
> > confirm this.
> >
> > Thanks for your response.
> >
> > Regards,
> >
> > Lenny
> >
> >
> > On 8/23/07, Remco Vlierman <[EMAIL PROTECTED] > wrote:
> > >
> > > Hey Lenny,
> > >
> > > I noticed that FLV's recorded by webcam usually do not have proper
> > > metadata. You have to inject them. So maybe the player looks for metadata,
> > > cannot find it and faultly centers the FLV? but like dominick says, just a
> > > guess....;-)
> > >
> > > Remco
> > >
> > > On 8/23/07, Lenny Sorey <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi Dominick,
> > > >
> > > > The funny thing about this problem is none of he trailer videos have
> > > > any problem.
> > > >
> > > > Only the recorded videos. They all appear down in the right section
> > > > of the screen,while
> > > > a one of the trailer videos that is the same size appears correctly
> > > > centered. I did notice
> > > > that it looked like John was also using metadata in some of his
> > > > calcs for sizing the videos.
> > > >
> > > > It looks like it is not retrieving any of the Live recorded videos
> > > > Metadata. Or, this is why I saw
> > > > when running it through a Flex Debug.
> > > >
> > > > Strange.
> > > >
> > > > Lenny
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 8/22/07, Dominick Accattato <[EMAIL PROTECTED] > wrote:
> > > > >
> > > > > you're probably using a width and height that isn't the default in
> > > > > John's player. I'm not sure he does the checking for that and so your
> > > > > origin is probably not where it should be for the size of your video.
> > > > > Just
> > > > > a guess.
> > > > >
> > > > > On 8/22/07, Lenny Sorey < [EMAIL PROTECTED] > wrote:
> > > > >
> > > > > > Must be my day to ask questions.
> > > > > >
> > > > > > Can anyone tell me why an flv recorded with a webcam always
> > > > > > appears to the right and off center in John Grdens's Flex
> > > > > > FLVPlayer.
> > > > > >
> > > > > > It doesn't matter what size I can get get the final flv to, it
> > > > > > always appears
> > > > > > to the right and off center. then when you try to expand the
> > > > > > image, it appears
> > > > > > taller and rather thin in width.
> > > > > >
> > > > > > I just want to make sure I understand before I go about creating
> > > > > > an FLVPlayer
> > > > > > similar to John's example.
> > > > > >
> > > > > > I want all of my flv's to appear the same way. They do for the
> > > > > > most part
> > > > > > with the exception of the recorded flv's.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Lenny
> > > > > >
> > > > > > _______________________________________________
> > > > > > Red5 mailing list
> > > > > > [email protected]
> > > > > > http://osflash.org/mailman/listinfo/red5_osflash.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Dominick Accattato, CTO
> > > > > Infrared5 Inc.
> > > > > www.newviewnetworks.com
> > > > > _______________________________________________
> > > > > Red5 mailing list
> > > > > [email protected]
> > > > > http://osflash.org/mailman/listinfo/red5_osflash.org
> > > > >
> > > > >
> > > >
> > > > _______________________________________________
> > > > Red5 mailing list
> > > > [email protected]
> > > > http://osflash.org/mailman/listinfo/red5_osflash.org
> > > >
> > > >
> > >
> > > _______________________________________________
> > > Red5 mailing list
> > > [email protected]
> > > http://osflash.org/mailman/listinfo/red5_osflash.org
> > >
> > >
> >
> > _______________________________________________
> > Red5 mailing list
> > [email protected]
> > http://osflash.org/mailman/listinfo/red5_osflash.org
> >
> >
>
>
> --
> Dominick Accattato, CTO
> Infrared5 Inc.
> www.newviewnetworks.com
>
> _______________________________________________
> Red5 mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org