Xavier Arnau

I have a video that is 720x576 and it looks bad because isn't centered etc and i don't know how to center it or try to resize it, i have seen in the forum things like "Player.video.main.changeLayout(..." but i don't get how to use it... could you help me


Re: HD DVD Interactivity Authoring Can you help me with video position and size?

Andy Pennell MSFT

Is this with iHDSim or on a real player iHDSim gets video positioning all wrong.

If this is with a real player, then call

Player.video.main.changeLayout( 0,0, null, 0,0,1920,1080, "00:00:00:00" );

The null scale will center it regardless of format.




Re: HD DVD Interactivity Authoring Can you help me with video position and size?

Amy Dullard - MSFT

Code Snippet

/*horizontal position of upper left corner of video on screen - must be an even integer*/

var x = 0;

/*vertical position of upper left corner of video on screen - must be an even integer*/

var y = 0;

/*zooming in or out - value for numerator and denominator must be a integer 1 to 16*/

var video_scale = Player.createVideoScale(1, 1);

/*horizontal position of upper left corner of video where crop begins - must be an even integer*/

var crop_x = 0;

/*horizontal position of upper left corner of video where crop begins - must be an even integer*/

var crop_y = 0;

/*horizontal position of lower right corner of video where crop ends - must be an even integer*/

var crop_width = 1920;

/*horizontal position of lower right corner of video where crop ends - must be an even integer*/

var crop_height = 1080;

/*time over which layout change should occur*/

var transition_time = "00:00:00:00";

Player.video.main.changeLayout( x, y, video_scale, crop_x, crop_y, crop_width, crop_height, transition);

Xavier - you will probably want to modify the x and y values above to change the position of your video. Just make sure you are using an even integer






Re: HD DVD Interactivity Authoring Can you help me with video position and size?

Xavier Arnau

yes, it's with IHDSim. Are you saying that Sim always position bad Well, until i have access to a player i will imagine that the video is well positioned hehe, Thanks for all.




Re: HD DVD Interactivity Authoring Can you help me with video position and size?

Peter Torr - MSFT

Yes; if I remember correctly, HDiSim always calculates cropping and offset information for the PIP based on a 1920 x 1080 image, even though the PIP is only 720 x 480.






Re: HD DVD Interactivity Authoring Can you help me with video position and size?

Xavier Arnau

I try to center the video with something like

Player.video.main.changeLayout( 600,0, Player.createVideoScale(1, 1), 0,0,1920,1080, "00:00:00:00" );

but this only "cuts" a part of the left of the video... maybe i didn't understand something... what "crop" do

ps: the top left corner is on 600,0

ps2: when i pause (with control+p in sim) the video fits the full screen... is this normal






Re: HD DVD Interactivity Authoring Can you help me with video position and size?

Andy Pennell MSFT

Like I said: ihdsim gets video positioning wrong in various ways (assumes 1920x1080 widescreen, cropping is very wrong etc): ignore what it does, just make sure your code works correctly on a real player. The Pause bug is long-standing and happens on 4:3 content on ihdsim (only) as I recall.




Re: HD DVD Interactivity Authoring Can you help me with video position and size?

Mistix

Not long time ago I have found program for cropping video files. This is VidCrop. There can easy remove useless frames and also parts of the frames by cropping it.

You can try resize your video and reduce widht and heigh if needed.