Code for Scaling Video to fill region.

Asked by bhavanitech

Hi,

After a long time I am visiting xibo launchpad. It feels good to see Xibo's continuing development and your commitment towards the project, really it feels inspirational. I think I should be donating.

As evident from the title I am looking for guidance in editing the the code so that a video can scale to fill an entire region. However, before posting, I came across the following question

https://answers.launchpad.net/xibo/+question/138485

wherein u hint at altering only the videomedia plugin. Were u referring to Client's dotnet code or the Server's php code. In any case could you please specify what changes needs to be made for this to work.

I need this functionality cause i have to waste lots of time in re-encoding the video for the size with a video converter to avoid black bars(letterboxing) and then there a several issues with the converters itself such as file size, no support for codecs etc, in short lots of time waste.

On previous occasion, Dan helped with dotnetclient code for resizing image to fill the region.

----------------
RESIZE IMAGE
----------------
Image.cs line 48.

Change to

_pictureBox.SizeMode = PictureBoxSizeMode.StretchImage;

I am on WinXP 32. Xibo server 1.2.0 and compatiable dotnetclient.

Thanks.
BT.

Question information

Language:
English Edit question
Status:
Answered
For:
Xibo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dan Garner (dangarner) said :
#1

I'd love to be able to give you a better answer than this after such a nice comment... however I can't. There is no way to remove the bars using the current media player in the client (WMP). It just doesnt support it.

I have read various things which would indicate that we could switch to VLC as the media player in the client, and would then have this stretch to fit option - however that is quite a bit of work!

If you did want to try that then perhaps a commercial company from the directory would help you - I am not sure it will get done on the roadmap for some time.

There is another possibility as you indicated... if you switched the using the Python client, then you might be able to make the tweak Alex suggested in his other thread.

Revision history for this message
bhavanitech (bhavanitechconsultant) said :
#2

hmm... Ok...but I have never tried Linux/Ubuntu and also powerpoint will not work with python client on Ubuntu. Is it possible to run the python client on windows and support powerpoint. I also read that a cross platform python client would be the future course of development but in that case will powerpoint be supported with that client. For me, powerpoint is a deciding factor and because of that I am not using the free media signage.com due to lack of native powerpoint support.

I thnk all these could make as potential choices for client development for the future.

VLC
Mediaportal (dev in C#)
Opensplash https://launchpad.net/opensplash (again dev in C#).

Regards,
BT.

Revision history for this message
Paul van Dun (venigo) said :
#3

The problem is the browsernode code in the python client. It only supports unix at the moment it needs to be ported to windows. (searching coder for it) After this is done the python client could also work on windows.

About your video question. Maybe you could use flash videos (flv) and modify the fittext plugin to work with flv files (width and height). It is in client133. This could be a proper work around for you.

Revision history for this message
Paul van Dun (venigo) said :
#4
Revision history for this message
Alex Harrington (alexharrington) said :
#5

Paul - neither client displays images using HTML. They use the C# or libavg controls for displaying images.

As Dan points out, the Python client won't put black bars on a video because the back of the player is inherently transparent.

It wouldn't be possible to develop a client in VLC. OpenSplash and Mediaportal are completely different systems to Xibo and would require rewrites to be suitable for our purposes.

The Python client will never support PowerPoint. PowerPoint 2010 has support for rendering presentations directly to video which is alot more reliable than any PowerPoint integration can ever be. PowerPoint is deliberately written to be difficult to integrate with in my opinion which is why most systems don't support it at all.

Alex

Revision history for this message
Dan Garner (dangarner) said :
#6

Just to be clear (I wasn't earlier, sorry) the current windows client uses Windows Media Player to render video content - this activex plug in doesn't support the stretch to fit property we would need.

The python client would be ideal as it wont show the black bars, and it will keep the aspect ratio - in the case where there would have been black bars, it will just show what's behind the region.

As a work around, it might be possible to switch to VLC as the rendering mechanism inside the current. NET client - I believe VLC does support stretch to fit... the aspect ratio would still be wrong though.

Can you help with this problem?

Provide an answer of your own, or ask bhavanitech for more information if necessary.

To post a message you must log in.